poe-svelte-ui-lib 1.2.24 → 1.2.26
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.
- package/dist/Accordion/AccordionProps.svelte +18 -4
- package/dist/Accordion/AccordionProps.svelte.d.ts +1 -1
- package/dist/Button/ButtonProps.svelte +15 -7
- package/dist/Button/ButtonProps.svelte.d.ts +1 -1
- package/dist/ColorPicker/ColorPickerProps.svelte +17 -9
- package/dist/ColorPicker/ColorPickerProps.svelte.d.ts +1 -1
- package/dist/FileAttach/FileAttach.svelte +4 -10
- package/dist/FileAttach/FileAttachProps.svelte +1 -1
- package/dist/FileAttach/FileAttachProps.svelte.d.ts +1 -1
- package/dist/Graph/GraphProps.svelte +3 -2
- package/dist/Graph/GraphProps.svelte.d.ts +1 -1
- package/dist/Input/InputProps.svelte +11 -4
- package/dist/Input/InputProps.svelte.d.ts +1 -1
- package/dist/Joystick/Joystick.svelte +1 -1
- package/dist/ProgressBar/ProgressBarProps.svelte +1 -1
- package/dist/ProgressBar/ProgressBarProps.svelte.d.ts +1 -1
- package/dist/Select/SelectProps.svelte +27 -25
- package/dist/Select/SelectProps.svelte.d.ts +1 -1
- package/dist/Slider/Slider.svelte +168 -128
- package/dist/Slider/SliderProps.svelte +17 -2
- package/dist/Slider/SliderProps.svelte.d.ts +1 -1
- package/dist/Switch/Switch.svelte +1 -1
- package/dist/Switch/SwitchProps.svelte +26 -8
- package/dist/Switch/SwitchProps.svelte.d.ts +1 -1
- package/dist/Table/Table.svelte +2 -2
- package/dist/Table/TableProps.svelte +33 -7
- package/dist/Table/TableProps.svelte.d.ts +1 -1
- package/dist/Tabs/TabsProps.svelte +1 -1
- package/dist/Tabs/TabsProps.svelte.d.ts +1 -1
- package/dist/TextField/TextFieldProps.svelte +13 -6
- package/dist/TextField/TextFieldProps.svelte.d.ts +1 -1
- package/dist/locales/translations.js +4 -6
- package/dist/types.d.ts +2 -1
- package/dist/types.js +2 -2
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
forConstructor = true,
|
|
16
16
|
} = $props<{
|
|
17
17
|
component: UIComponent & { properties: Partial<IAccordionProps> }
|
|
18
|
-
onPropertyChange: (value
|
|
18
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
19
19
|
forConstructor?: boolean
|
|
20
20
|
}>()
|
|
21
21
|
|
|
@@ -46,8 +46,15 @@
|
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
48
|
{#if forConstructor}
|
|
49
|
-
<div class="flex items-
|
|
49
|
+
<div class="flex items-start justify-center gap-8">
|
|
50
50
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
51
|
+
<UI.Select
|
|
52
|
+
label={{ name: $t('constructor.props.access') }}
|
|
53
|
+
type="buttons"
|
|
54
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
55
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
56
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
57
|
+
/>
|
|
51
58
|
<UI.Input
|
|
52
59
|
label={{ name: $t('constructor.props.label') }}
|
|
53
60
|
value={component.properties.label.name}
|
|
@@ -130,13 +137,20 @@
|
|
|
130
137
|
</div>
|
|
131
138
|
</div>
|
|
132
139
|
{:else}
|
|
133
|
-
<div class="flex items-
|
|
140
|
+
<div class="flex items-start justify-center gap-8">
|
|
134
141
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
135
142
|
<UI.Input
|
|
136
143
|
label={{ name: $t('constructor.props.id') }}
|
|
137
144
|
value={component.properties.id}
|
|
138
145
|
onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
|
|
139
146
|
/>
|
|
147
|
+
<UI.Select
|
|
148
|
+
label={{ name: $t('constructor.props.access') }}
|
|
149
|
+
type="buttons"
|
|
150
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
151
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
152
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
153
|
+
/>
|
|
140
154
|
<UI.Select
|
|
141
155
|
label={{ name: $t('constructor.props.type') }}
|
|
142
156
|
type="buttons"
|
|
@@ -168,7 +182,7 @@
|
|
|
168
182
|
onChange={(value) => updateProperty('isOpen', value, component, onPropertyChange)}
|
|
169
183
|
/>
|
|
170
184
|
</div>
|
|
171
|
-
<div class="flex w-1/3 flex-col
|
|
185
|
+
<div class="flex w-1/3 flex-col px-2">
|
|
172
186
|
<UI.Input
|
|
173
187
|
label={{ name: $t('constructor.props.wrapperclass') }}
|
|
174
188
|
value={component.properties.wrapperClass}
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IAccordionProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const AccordionProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IButtonProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
help={{ info: $t('constructor.props.argument.info'), autocomplete: 'on', regExp: /^[a-zA-Z0-9\-_]{0,32}$/ }}
|
|
77
77
|
onUpdate={(value) => updateProperty('eventHandler.Argument', value as string, component, onPropertyChange)}
|
|
78
78
|
/>
|
|
79
|
-
|
|
79
|
+
</div>
|
|
80
|
+
<div class="flex w-1/3 flex-col items-center px-2">
|
|
80
81
|
{#if (component.properties.eventHandler.Argument !== 'Save' && component.properties.eventHandler.Argument !== 'NoSave') || Header.value === 'SET'}
|
|
81
82
|
<UI.Input
|
|
82
83
|
label={{ name: $t('constructor.props.value') }}
|
|
@@ -97,15 +98,15 @@
|
|
|
97
98
|
updateProperty('eventHandler.Variables', parts, component, onPropertyChange)
|
|
98
99
|
}}
|
|
99
100
|
/>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="flex w-1/3 flex-col px-2">
|
|
102
101
|
<UI.Select
|
|
103
|
-
label={{ name: $t('constructor.props.
|
|
102
|
+
label={{ name: $t('constructor.props.access') }}
|
|
104
103
|
type="buttons"
|
|
105
104
|
options={$optionsStore.ACCESS_OPTION}
|
|
106
|
-
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.
|
|
107
|
-
onUpdate={(option) =>
|
|
105
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
106
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
108
107
|
/>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="flex w-1/3 flex-col items-center px-2">
|
|
109
110
|
<UI.Input
|
|
110
111
|
label={{ name: $t('constructor.props.name') }}
|
|
111
112
|
value={component.properties.content.name}
|
|
@@ -139,6 +140,13 @@
|
|
|
139
140
|
value={component.properties.id}
|
|
140
141
|
onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
|
|
141
142
|
/>
|
|
143
|
+
<UI.Select
|
|
144
|
+
label={{ name: $t('constructor.props.access') }}
|
|
145
|
+
type="buttons"
|
|
146
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
147
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
148
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
149
|
+
/>
|
|
142
150
|
<UI.Input
|
|
143
151
|
label={{ name: $t('constructor.props.wrapperclass') }}
|
|
144
152
|
value={component.properties.wrapperClass}
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IButtonProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ButtonProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IColorPickerProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
options={VARIABLE_OPTIONS}
|
|
36
36
|
value={VARIABLE_OPTIONS.find((opt) => opt.value === component.properties.id)}
|
|
37
37
|
onUpdate={(value) => {
|
|
38
|
-
updateProperty('id', value.value as string, component, onPropertyChange
|
|
38
|
+
updateProperty('id', value.value as string, component, onPropertyChange)
|
|
39
39
|
updateProperty('eventHandler.Variables', value.value as string, component, onPropertyChange)
|
|
40
|
+
onPropertyChange(null, value.name?.split('—')[1].trim(), null)
|
|
40
41
|
}}
|
|
41
42
|
/>
|
|
42
43
|
<UI.Select
|
|
@@ -51,11 +52,11 @@
|
|
|
51
52
|
</div>
|
|
52
53
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
53
54
|
<UI.Select
|
|
54
|
-
label={{ name: $t('constructor.props.
|
|
55
|
+
label={{ name: $t('constructor.props.access') }}
|
|
55
56
|
type="buttons"
|
|
56
57
|
options={$optionsStore.ACCESS_OPTION}
|
|
57
|
-
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.
|
|
58
|
-
onUpdate={(option) =>
|
|
58
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
59
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
59
60
|
/>
|
|
60
61
|
</div>
|
|
61
62
|
<div class="flex w-1/3 flex-col px-2">
|
|
@@ -82,10 +83,12 @@
|
|
|
82
83
|
value={component.properties.id}
|
|
83
84
|
onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
|
|
84
85
|
/>
|
|
85
|
-
<UI.
|
|
86
|
-
label={{ name: $t('constructor.props.
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
<UI.Select
|
|
87
|
+
label={{ name: $t('constructor.props.access') }}
|
|
88
|
+
type="buttons"
|
|
89
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
90
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
91
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
89
92
|
/>
|
|
90
93
|
</div>
|
|
91
94
|
<div class="flex w-1/3 flex-col px-2">
|
|
@@ -101,6 +104,11 @@
|
|
|
101
104
|
/>
|
|
102
105
|
</div>
|
|
103
106
|
<div class="flex w-1/3 flex-col px-2">
|
|
107
|
+
<UI.Input
|
|
108
|
+
label={{ name: $t('constructor.props.wrapperclass') }}
|
|
109
|
+
value={component.properties.wrapperClass}
|
|
110
|
+
onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
|
|
111
|
+
/>
|
|
104
112
|
<UI.TextField content={{ name: $t('constructor.props.defaultcolor'), class: 'font-bold' }} />
|
|
105
113
|
<div class="flex items-center gap-3">
|
|
106
114
|
<UI.TextField wrapperClass="w-4" content={{ name: 'R', class: 'font-bold' }} />
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IColorPickerProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ColorPickerProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
onChange = () => {},
|
|
26
26
|
}: IFileInputProps = $props()
|
|
27
27
|
|
|
28
|
+
let ID = `${id}-${crypto.randomUUID().slice(0, 6)}`
|
|
28
29
|
let selectedFile = $state<File | null>(null)
|
|
29
30
|
let previewUrl = $derived(currentImage ? (currentImage.startsWith('data:') ? currentImage : `data:image/png;base64,${currentImage}`) : null)
|
|
30
31
|
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
const triggerFileInput = () => {
|
|
47
|
-
const input = document.getElementById(
|
|
48
|
+
const input = document.getElementById(ID)
|
|
48
49
|
input?.click()
|
|
49
50
|
}
|
|
50
51
|
</script>
|
|
@@ -77,19 +78,12 @@
|
|
|
77
78
|
<span class="text-sm text-gray-500">Image</span>
|
|
78
79
|
{/if}
|
|
79
80
|
</button>
|
|
80
|
-
<input
|
|
81
|
-
id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
|
|
82
|
-
type="file"
|
|
83
|
-
class="absolute -z-10 h-0 w-0 overflow-hidden opacity-0"
|
|
84
|
-
{accept}
|
|
85
|
-
{disabled}
|
|
86
|
-
onchange={handleFileChange}
|
|
87
|
-
/>
|
|
81
|
+
<input id={ID} type="file" class="absolute -z-10 h-0 w-0 overflow-hidden opacity-0" {accept} {disabled} onchange={handleFileChange} />
|
|
88
82
|
</div>
|
|
89
83
|
{:else}
|
|
90
84
|
<label class="relative inline-block w-full">
|
|
91
85
|
<input
|
|
92
|
-
id={
|
|
86
|
+
id={ID}
|
|
93
87
|
type="file"
|
|
94
88
|
class={`h-8.5 w-full rounded-2xl bg-(--back-color) font-semibold shadow-sm transition duration-250 hover:shadow-md
|
|
95
89
|
${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'} invalid:shadow-[0_0_6px(--red-color) file:h-full file:w-1/3
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IFileInputProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
</script>
|
|
@@ -4,7 +4,7 @@ type $$ComponentProps = {
|
|
|
4
4
|
component: UIComponent & {
|
|
5
5
|
properties: Partial<IFileInputProps>;
|
|
6
6
|
};
|
|
7
|
-
onPropertyChange: (value
|
|
7
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
8
8
|
forConstructor?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const FileAttachProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
forConstructor = true,
|
|
11
11
|
} = $props<{
|
|
12
12
|
component: UIComponent & { properties: Partial<IGraphProps> }
|
|
13
|
-
onPropertyChange: (value
|
|
13
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
14
14
|
forConstructor?: boolean
|
|
15
15
|
}>()
|
|
16
16
|
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
options={VARIABLE_OPTIONS}
|
|
28
28
|
value={VARIABLE_OPTIONS.find((opt) => opt.value === component.properties.id)}
|
|
29
29
|
onUpdate={(value) => {
|
|
30
|
-
updateProperty('id', value.value as string, component, onPropertyChange
|
|
30
|
+
updateProperty('id', value.value as string, component, onPropertyChange)
|
|
31
31
|
updateProperty('eventHandler.Variables', value.value as string, component, onPropertyChange)
|
|
32
|
+
onPropertyChange(null, value.name?.split('—')[1].trim(), null)
|
|
32
33
|
}}
|
|
33
34
|
/>
|
|
34
35
|
</div>
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IGraphProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const GraphProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IInputProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
}}
|
|
102
102
|
/>
|
|
103
103
|
<UI.Select
|
|
104
|
-
label={{ name: $t('constructor.props.
|
|
104
|
+
label={{ name: $t('constructor.props.access') }}
|
|
105
105
|
type="buttons"
|
|
106
106
|
options={$optionsStore.ACCESS_OPTION}
|
|
107
|
-
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.
|
|
108
|
-
onUpdate={(option) =>
|
|
107
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
108
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
109
109
|
/>
|
|
110
110
|
<UI.Select
|
|
111
111
|
label={{ name: $t('constructor.props.type') }}
|
|
@@ -247,6 +247,13 @@
|
|
|
247
247
|
/>
|
|
248
248
|
</div>
|
|
249
249
|
<div class="flex w-1/3 flex-col px-2">
|
|
250
|
+
<UI.Select
|
|
251
|
+
label={{ name: $t('constructor.props.access') }}
|
|
252
|
+
type="buttons"
|
|
253
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
254
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
255
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
256
|
+
/>
|
|
250
257
|
<UI.Input
|
|
251
258
|
label={{ name: $t('constructor.props.value') }}
|
|
252
259
|
value={component.properties.value}
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IInputProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const InputProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
</div>
|
|
306
306
|
</div>
|
|
307
307
|
|
|
308
|
-
<div class="
|
|
308
|
+
<div class="right-10 flex items-center md:absolute">
|
|
309
309
|
<div id={`${id}-${crypto.randomUUID().slice(0, 6)}`} class="flex h-full flex-col justify-center rounded-full p-10">
|
|
310
310
|
{#each sensitivityOptions as option, index}
|
|
311
311
|
<button
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IProgressBarProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IProgressBarProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ProgressBarProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
forConstructor = true,
|
|
15
15
|
} = $props<{
|
|
16
16
|
component: UIComponent & { properties: Partial<ISelectProps> }
|
|
17
|
-
onPropertyChange: (value
|
|
17
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
18
18
|
forConstructor?: boolean
|
|
19
19
|
}>()
|
|
20
20
|
|
|
@@ -105,6 +105,13 @@
|
|
|
105
105
|
/>
|
|
106
106
|
</div>
|
|
107
107
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
108
|
+
<UI.Select
|
|
109
|
+
label={{ name: $t('constructor.props.access') }}
|
|
110
|
+
type="buttons"
|
|
111
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
112
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
113
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
114
|
+
/>
|
|
108
115
|
<UI.Select
|
|
109
116
|
label={{ name: $t('constructor.props.type') }}
|
|
110
117
|
type="buttons"
|
|
@@ -131,30 +138,17 @@
|
|
|
131
138
|
}}
|
|
132
139
|
/>
|
|
133
140
|
{#if component.properties.bitMode}
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/>
|
|
146
|
-
<UI.Input
|
|
147
|
-
label={{ name: $t('constructor.props.range.end') }}
|
|
148
|
-
value={component.properties.range.end}
|
|
149
|
-
onUpdate={(value) => {
|
|
150
|
-
updateProperty('range.end', value as number, component, onPropertyChange)
|
|
151
|
-
generateBitOptions(component.properties.range.start, component.properties.range.end)
|
|
152
|
-
}}
|
|
153
|
-
number={{ minNum: 0, maxNum: 31, step: 1 }}
|
|
154
|
-
help={{ info: $t('constructor.props.range.end.help') }}
|
|
155
|
-
type="number"
|
|
156
|
-
/>
|
|
157
|
-
</div>
|
|
141
|
+
<UI.Slider
|
|
142
|
+
label={{ name: $t('constructor.props.range') }}
|
|
143
|
+
type="range"
|
|
144
|
+
number={{ minNum: 0, maxNum: 31, step: 1 }}
|
|
145
|
+
value={[component.properties.range.start, component.properties.range.end]}
|
|
146
|
+
onUpdate={(value) => {
|
|
147
|
+
updateProperty('range.start', value[0] as [number, number], component, onPropertyChange)
|
|
148
|
+
updateProperty('range.end', value as number[][1] as number, component, onPropertyChange)
|
|
149
|
+
generateBitOptions(component.properties.range.start, component.properties.range.end)
|
|
150
|
+
}}
|
|
151
|
+
/>
|
|
158
152
|
{/if}
|
|
159
153
|
</div>
|
|
160
154
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
@@ -229,6 +223,7 @@
|
|
|
229
223
|
label={{ name: $t('constructor.props.optionvalue') }}
|
|
230
224
|
wrapperClass="!w-3/10"
|
|
231
225
|
value={option.value}
|
|
226
|
+
readonly={component.properties.bitMode}
|
|
232
227
|
type={currentValueType.value}
|
|
233
228
|
onUpdate={(value) => {
|
|
234
229
|
const options = [...(component.properties?.options || [])]
|
|
@@ -270,6 +265,13 @@
|
|
|
270
265
|
value={component.properties.id}
|
|
271
266
|
onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
|
|
272
267
|
/>
|
|
268
|
+
<UI.Select
|
|
269
|
+
label={{ name: $t('constructor.props.access') }}
|
|
270
|
+
type="buttons"
|
|
271
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
272
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
273
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
274
|
+
/>
|
|
273
275
|
<UI.Input
|
|
274
276
|
label={{ name: $t('constructor.props.wrapperclass') }}
|
|
275
277
|
value={component.properties.wrapperClass}
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ISelectProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const SelectProps: import("svelte").Component<$$ComponentProps, {}, "">;
|