poe-svelte-ui-lib 2.17.2 → 2.17.3
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 +3 -0
- package/dist/Button/ButtonProps.svelte +3 -0
- package/dist/CommonSnippets.svelte +12 -1
- package/dist/Divider/DividerProps.svelte +4 -0
- package/dist/Graph/GraphProps.svelte +2 -0
- package/dist/Input/InputProps.svelte +8 -1
- package/dist/ProgressBar/ProgressBarProps.svelte +1 -0
- package/dist/Select/SelectProps.svelte +6 -0
- package/dist/Slider/SliderProps.svelte +1 -0
- package/dist/Switch/SwitchProps.svelte +3 -0
- package/dist/Table/README.md +1 -1
- package/dist/Table/Table.svelte +8 -5
- package/dist/Tabs/TabsProps.svelte +4 -0
- package/dist/TextField/TextFieldProps.svelte +2 -0
- package/dist/VideoViewer/VideoViewerProps.svelte +3 -0
- package/dist/Widget/WidgetProps.svelte +2 -0
- package/dist/WidgetDeviceInfo/WidgetDeviceInfoProps.svelte +7 -1
- package/dist/WidgetFileSystem/README.md +1 -1
- package/dist/WidgetFileSystem/WidgetFileSystemProps.svelte +11 -6
- package/dist/WidgetLoRa/WidgetLoRaProps.svelte +7 -1
- package/dist/WidgetMap/WidgetMapProps.svelte +11 -1
- package/dist/WidgetPFD/WidgetPFDProps.svelte +63 -9
- package/dist/WidgetRGBStrip/WidgetRGBStripProps.svelte +6 -1
- package/dist/WidgetStackInfo/README.md +1 -1
- package/dist/WidgetStackInfo/WidgetStackInfoProps.svelte +7 -3
- package/dist/WidgetWiFi/README.md +1 -1
- package/dist/WidgetWiFi/WidgetWiFiProps.svelte +19 -5
- package/dist/locales/constructor.d.ts +385 -0
- package/dist/locales/constructor.js +400 -15
- package/dist/locales/translations.js +27 -27
- package/package.json +1 -1
|
@@ -52,12 +52,14 @@
|
|
|
52
52
|
<UI.Switch
|
|
53
53
|
type="checkbox"
|
|
54
54
|
label={{ name: $T("constructor.props.accordion.stripe") }}
|
|
55
|
+
help={{ info: $T("constructor.props.accordion.stripe.info") }}
|
|
55
56
|
value={component.properties.stripe ? 1 : 0}
|
|
56
57
|
onUpdate={(value) => edit.set("stripe", value === 1)}
|
|
57
58
|
/>
|
|
58
59
|
<UI.Switch
|
|
59
60
|
type="checkbox"
|
|
60
61
|
label={{ name: $T("constructor.props.accordion.outline") }}
|
|
62
|
+
help={{ info: $T("constructor.props.accordion.outline.info") }}
|
|
61
63
|
value={component.properties.outline === false ? 0 : 1}
|
|
62
64
|
disabled={!!component.properties.stripe}
|
|
63
65
|
onUpdate={(value) => edit.set("outline", value === 1)}
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
<UI.FileAttach
|
|
67
69
|
type="image"
|
|
68
70
|
label={{ name: $T("constructor.props.image") }}
|
|
71
|
+
help={{ info: $T("constructor.props.accordion.image.info") }}
|
|
69
72
|
accept="image/png, image/jpeg, image/webp"
|
|
70
73
|
currentImage={component.properties.image ?? ""}
|
|
71
74
|
onUpdate={setImage}
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
61
61
|
<UI.Select
|
|
62
62
|
label={{ name: $T("constructor.props.header") }}
|
|
63
|
+
help={{ info: $T("constructor.props.button.header.info") }}
|
|
63
64
|
type="buttons"
|
|
64
65
|
value={component.eventHandler?.Header}
|
|
65
66
|
options={$optionsStore.HEADER_OPTIONS}
|
|
@@ -89,6 +90,7 @@
|
|
|
89
90
|
<UI.Button wrapperClass="w-8" content={{ icon: InfoIcon, info: { text: $T("constructor.props.button.colors.hint"), side: "right" } }} />
|
|
90
91
|
<UI.Select
|
|
91
92
|
label={{ name: $T("constructor.props.colors") }}
|
|
93
|
+
help={{ info: $T("constructor.props.button.colors.info") }}
|
|
92
94
|
type="buttons"
|
|
93
95
|
options={$optionsStore.ACCENT_OPTIONS}
|
|
94
96
|
value={colorValue}
|
|
@@ -107,6 +109,7 @@
|
|
|
107
109
|
{#if hasName || !properties.content?.icon}
|
|
108
110
|
<UI.Select
|
|
109
111
|
label={{ name: $T("constructor.props.height") }}
|
|
112
|
+
help={{ info: $T("constructor.props.button.height.info") }}
|
|
110
113
|
type="buttons"
|
|
111
114
|
options={$optionsStore.HEIGHT_OPTIONS}
|
|
112
115
|
value={optionByClass($optionsStore.HEIGHT_OPTIONS, properties.componentClass)?.value}
|
|
@@ -63,7 +63,12 @@
|
|
|
63
63
|
</script>
|
|
64
64
|
|
|
65
65
|
{#snippet Flag(name: string, key: "disabled" | "readonly")}
|
|
66
|
-
<UI.Switch
|
|
66
|
+
<UI.Switch
|
|
67
|
+
label={{ name }}
|
|
68
|
+
help={{ info: $T(`constructor.props.${key}.info`) }}
|
|
69
|
+
value={properties[key] ? 1 : 0}
|
|
70
|
+
onUpdate={(value) => edit.set(key, value === 1)}
|
|
71
|
+
/>
|
|
67
72
|
{/snippet}
|
|
68
73
|
|
|
69
74
|
{#snippet MinMaxStep({ number, bitMode, onUpdate }: { number?: NumberRange; bitMode?: boolean; onUpdate: (number: NumberRange) => void })}
|
|
@@ -72,6 +77,7 @@
|
|
|
72
77
|
{#if key !== "step" || (component.type !== "ProgressBar" && component.type !== "Joystick")}
|
|
73
78
|
<UI.Input
|
|
74
79
|
label={{ name: $T(`constructor.props.${caption}`) }}
|
|
80
|
+
help={{ info: $T(`constructor.props.${caption}.info`) }}
|
|
75
81
|
value={number?.[key]}
|
|
76
82
|
type="number"
|
|
77
83
|
number={key === "step" ? { minNum: 0, maxNum: 1000000, step: 1 } : undefined}
|
|
@@ -145,6 +151,7 @@
|
|
|
145
151
|
{#if snippet === "Variable"}
|
|
146
152
|
<UI.Select
|
|
147
153
|
label={{ name: $T("constructor.props.variable") }}
|
|
154
|
+
help={{ info: $T("constructor.props.variable.info") }}
|
|
148
155
|
type="input"
|
|
149
156
|
options={VARIABLE_OPTIONS}
|
|
150
157
|
value={properties.id}
|
|
@@ -161,6 +168,7 @@
|
|
|
161
168
|
{:else if snippet === "Access"}
|
|
162
169
|
<UI.Select
|
|
163
170
|
label={{ name: $T("constructor.props.access") }}
|
|
171
|
+
help={{ info: $T("constructor.props.access.info") }}
|
|
164
172
|
type="buttons"
|
|
165
173
|
options={["Accordion", "Tabs", "ProgressBar", "TextField", "Graph", "PeriodChart"].includes(component.type)
|
|
166
174
|
? $optionsStore.ACCESS_OPTION.filter((option) => option.value !== "viewOnly")
|
|
@@ -171,6 +179,7 @@
|
|
|
171
179
|
{:else if snippet === "Accent"}
|
|
172
180
|
<UI.Select
|
|
173
181
|
label={{ name: $T("ui.accent") }}
|
|
182
|
+
help={{ info: $T("ui.accent.info") }}
|
|
174
183
|
type="buttons"
|
|
175
184
|
options={$optionsStore.ACCENT_OPTIONS.filter((option) => !initialValue?.exclude?.includes(option.value))}
|
|
176
185
|
value={properties.accent}
|
|
@@ -181,6 +190,7 @@
|
|
|
181
190
|
{:else if snippet === "LabelAlign"}
|
|
182
191
|
<UI.Select
|
|
183
192
|
label={{ name: $T("constructor.props.align") }}
|
|
193
|
+
help={{ info: $T("constructor.props.align.info") }}
|
|
184
194
|
type="buttons"
|
|
185
195
|
value={optionByClass(alignOptions, properties[alignKey]?.class)?.value}
|
|
186
196
|
options={alignOptions}
|
|
@@ -193,6 +203,7 @@
|
|
|
193
203
|
{:else if snippet === "EventHandlerArgument"}
|
|
194
204
|
<UI.Select
|
|
195
205
|
label={{ name: $T("constructor.props.action") }}
|
|
206
|
+
help={{ info: $T("constructor.props.action.info") }}
|
|
196
207
|
type="buttons"
|
|
197
208
|
value={component.eventHandler?.Argument}
|
|
198
209
|
options={$optionsStore.SHORT_ARGUMENT_OPTION}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
25
25
|
<UI.Select
|
|
26
26
|
label={{ name: $T("constructor.props.divider.type") }}
|
|
27
|
+
help={{ info: $T("constructor.props.divider.type.info") }}
|
|
27
28
|
type="buttons"
|
|
28
29
|
value={component.properties.type}
|
|
29
30
|
options={$optionsStore.DIVIDER_TYPE_OPTIONS}
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
<PropsGroup label={$T("constructor.props.group.layout")}>
|
|
34
35
|
<UI.Select
|
|
35
36
|
label={{ name: $T("constructor.props.orientation") }}
|
|
37
|
+
help={{ info: $T("constructor.props.divider.orientation.info") }}
|
|
36
38
|
type="buttons"
|
|
37
39
|
value={component.properties.orientation ?? "horizontal"}
|
|
38
40
|
options={$optionsStore.ORIENTATION_OPTIONS}
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
/>
|
|
41
43
|
<UI.Select
|
|
42
44
|
label={{ name: $T("constructor.props.divider.anchor") }}
|
|
45
|
+
help={{ info: $T("constructor.props.divider.anchor.info") }}
|
|
43
46
|
type="buttons"
|
|
44
47
|
value={component.properties.anchor}
|
|
45
48
|
options={component.properties.orientation === "vertical" ? $optionsStore.DIVIDER_ANCHOR_VERTICAL_OPTIONS : $optionsStore.DIVIDER_ANCHOR_OPTIONS}
|
|
@@ -47,6 +50,7 @@
|
|
|
47
50
|
/>
|
|
48
51
|
<UI.Input
|
|
49
52
|
label={{ name: $T("constructor.props.divider.width") }}
|
|
53
|
+
help={{ info: $T("constructor.props.divider.width.info") }}
|
|
50
54
|
value={component.properties.width}
|
|
51
55
|
onUpdate={(value) => edit.set("width", Number(value))}
|
|
52
56
|
number={{ minNum: 1, maxNum: 20, step: 1 }}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<PropsGroup>
|
|
27
27
|
<UI.Switch
|
|
28
28
|
label={{ name: $T("constructor.props.simulation") }}
|
|
29
|
+
help={{ info: $T("constructor.props.graph.simulation.info") }}
|
|
29
30
|
value={component.properties.isTest ? 1 : 0}
|
|
30
31
|
onUpdate={(value) => edit.set("isTest", value === 1)}
|
|
31
32
|
/>
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
<PropsGroup label={$T("constructor.props.group.behavior")}>
|
|
44
45
|
<UI.Select
|
|
45
46
|
label={{ name: $T("constructor.props.refreshrate") }}
|
|
47
|
+
help={{ info: $T("constructor.props.graph.refreshrate.info") }}
|
|
46
48
|
options={REFRESH_OPTIONS}
|
|
47
49
|
value={component.properties.refreshRate ?? 0}
|
|
48
50
|
onUpdate={(refreshRate) => edit.set("refreshRate", refreshRate)}
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
<CommonSnippets snippet="Variable" {VARIABLE_OPTIONS} {component} {onPropertyChange} />
|
|
78
78
|
<UI.Select
|
|
79
79
|
label={{ name: $T("constructor.props.type") }}
|
|
80
|
+
help={{ info: $T("constructor.props.input.type.info") }}
|
|
80
81
|
options={$optionsStore.INPUT_TYPE_OPTIONS}
|
|
81
82
|
type="buttons"
|
|
82
83
|
value={properties.type ?? "text"}
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
{#if isText}
|
|
86
87
|
<UI.Input
|
|
87
88
|
label={{ name: $T("constructor.props.maxlength") }}
|
|
89
|
+
help={{ info: $T("constructor.props.maxlength.info") }}
|
|
88
90
|
type="number"
|
|
89
91
|
number={{ minNum: 1, maxNum: 1000000, step: 1 }}
|
|
90
92
|
value={properties.maxlength}
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
<div class="flex items-end">
|
|
94
96
|
<UI.Input
|
|
95
97
|
label={{ name: $T("constructor.props.regexp") }}
|
|
98
|
+
help={{ info: $T("constructor.props.regexp.info") }}
|
|
96
99
|
value={properties.help?.regExp?.toString()}
|
|
97
100
|
maxlength={150}
|
|
98
101
|
accent={isValidRegExp ? undefined : "red"}
|
|
@@ -124,6 +127,7 @@
|
|
|
124
127
|
{#if properties.type === "text-area"}
|
|
125
128
|
<UI.Input
|
|
126
129
|
label={{ name: $T("constructor.props.textarea.rows") }}
|
|
130
|
+
help={{ info: $T("constructor.props.textarea.rows.info") }}
|
|
127
131
|
type="number"
|
|
128
132
|
value={properties.textareaRows}
|
|
129
133
|
onUpdate={(value) => edit.set("textareaRows", Number(value))}
|
|
@@ -132,6 +136,7 @@
|
|
|
132
136
|
{#if properties.type !== "password"}
|
|
133
137
|
<UI.Select
|
|
134
138
|
label={{ name: $T("constructor.props.align.content") }}
|
|
139
|
+
help={{ info: $T("constructor.props.align.content.info") }}
|
|
135
140
|
options={$optionsStore.TEXT_ALIGN_OPTIONS}
|
|
136
141
|
type="buttons"
|
|
137
142
|
value={optionByClass($optionsStore.TEXT_ALIGN_OPTIONS, properties.componentClass)?.value ?? "text-left"}
|
|
@@ -148,6 +153,7 @@
|
|
|
148
153
|
{:else if properties.type === "bitMode"}
|
|
149
154
|
<UI.Slider
|
|
150
155
|
label={{ name: $T("constructor.props.range") }}
|
|
156
|
+
help={{ info: $T("constructor.props.range.info") }}
|
|
151
157
|
type="range"
|
|
152
158
|
number={{ minNum: 0, maxNum: 31, step: 1 }}
|
|
153
159
|
value={[bitRange.start, bitRange.end]}
|
|
@@ -158,7 +164,7 @@
|
|
|
158
164
|
<PropsGroup label={$T("constructor.props.group.value")}>
|
|
159
165
|
<UI.Input
|
|
160
166
|
label={{ name: $T("constructor.props.defaultvalue") }}
|
|
161
|
-
help={{ regExp: properties.type === "number" ? /^-?\d*\.?\d+$/ : undefined }}
|
|
167
|
+
help={{ info: $T("constructor.props.defaultvalue.info"), regExp: properties.type === "number" ? /^-?\d*\.?\d+$/ : undefined }}
|
|
162
168
|
value={properties.value}
|
|
163
169
|
onUpdate={(value) => edit.set("value", value)}
|
|
164
170
|
/>
|
|
@@ -184,6 +190,7 @@
|
|
|
184
190
|
<CommonSnippets snippet="LabelAlign" {component} {onPropertyChange} />
|
|
185
191
|
<UI.Select
|
|
186
192
|
label={{ name: $T("constructor.props.autocomplete") }}
|
|
193
|
+
help={{ info: $T("constructor.props.autocomplete.info") }}
|
|
187
194
|
options={$optionsStore.AUTOCOMPLETE_CONSTRUCTOR_OPTIONS as IOption<string>[]}
|
|
188
195
|
value={properties.help?.autocomplete || "off"}
|
|
189
196
|
onUpdate={(autocomplete) => edit.patch("help", { autocomplete: autocomplete as NonNullable<IInputProps["help"]>["autocomplete"] })}
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
<UI.Select
|
|
42
42
|
wrapperClass="!h-14"
|
|
43
43
|
label={{ name: $T("constructor.props.type") }}
|
|
44
|
+
help={{ info: $T("constructor.props.progressbar.type.info") }}
|
|
44
45
|
type="buttons"
|
|
45
46
|
options={$optionsStore.SWITCH_OPTIONS.filter((option) => option.value !== "checkbox")}
|
|
46
47
|
value={component.properties.type}
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
<PropsGroup label={$T("constructor.props.group.value")}>
|
|
54
54
|
<UI.Select
|
|
55
55
|
label={{ name: $T("constructor.props.type") }}
|
|
56
|
+
help={{ info: $T("constructor.props.select.type.info") }}
|
|
56
57
|
type="buttons"
|
|
57
58
|
value={component.properties.type}
|
|
58
59
|
options={$optionsStore.SELECT_TYPE_OPTIONS}
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
<UI.Select
|
|
69
70
|
wrapperClass="h-14"
|
|
70
71
|
label={{ name: $T("constructor.props.valuetype") }}
|
|
72
|
+
help={{ info: $T("constructor.props.valuetype.info") }}
|
|
71
73
|
type="buttons"
|
|
72
74
|
disabled={component.properties.bitMode}
|
|
73
75
|
options={$optionsStore.SELECT_VALUE_TYPE_OPTIONS}
|
|
@@ -85,6 +87,7 @@
|
|
|
85
87
|
<CommonSnippets snippet="LabelAlign" {component} {onPropertyChange} />
|
|
86
88
|
<UI.Select
|
|
87
89
|
label={{ name: $T("constructor.props.align.content") }}
|
|
90
|
+
help={{ info: $T("constructor.props.select.align.info") }}
|
|
88
91
|
type="buttons"
|
|
89
92
|
value={optionByClass(contentAlignOptions, component.properties.componentClass)?.value ?? "text-left"}
|
|
90
93
|
options={contentAlignOptions}
|
|
@@ -92,6 +95,7 @@
|
|
|
92
95
|
/>
|
|
93
96
|
<UI.Switch
|
|
94
97
|
label={{ name: $T("constructor.props.bitMode") }}
|
|
98
|
+
help={{ info: $T("constructor.props.bitMode.info") }}
|
|
95
99
|
value={component.properties.bitMode ? 1 : 0}
|
|
96
100
|
onUpdate={(value) =>
|
|
97
101
|
onPropertyChange({
|
|
@@ -104,6 +108,7 @@
|
|
|
104
108
|
{#if component.properties.type === "buttons" && !component.properties.bitMode}
|
|
105
109
|
<UI.Switch
|
|
106
110
|
label={{ name: $T("constructor.props.multiselect") }}
|
|
111
|
+
help={{ info: $T("constructor.props.multiselect.info") }}
|
|
107
112
|
value={component.properties.multiSelect ? 1 : 0}
|
|
108
113
|
onUpdate={(value) => edit.set("multiSelect", value === 1)}
|
|
109
114
|
/>
|
|
@@ -111,6 +116,7 @@
|
|
|
111
116
|
{#if component.properties.bitMode}
|
|
112
117
|
<UI.Slider
|
|
113
118
|
label={{ name: $T("constructor.props.range") }}
|
|
119
|
+
help={{ info: $T("constructor.props.range.info") }}
|
|
114
120
|
type="range"
|
|
115
121
|
number={{ minNum: 0, maxNum: 31, step: 1 }}
|
|
116
122
|
value={[bitRange.start, bitRange.end]}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<PropsGroup label={$T("constructor.props.group.value")}>
|
|
30
30
|
<UI.Select
|
|
31
31
|
label={{ name: $T("constructor.props.type") }}
|
|
32
|
+
help={{ info: $T("constructor.props.slider.type.info") }}
|
|
32
33
|
type="buttons"
|
|
33
34
|
value={component.properties.type ?? "single"}
|
|
34
35
|
options={$optionsStore.SLIDER_TYPE_OPTIONS}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<UI.Select
|
|
40
40
|
wrapperClass="!h-14"
|
|
41
41
|
label={{ name: $T("constructor.props.type") }}
|
|
42
|
+
help={{ info: $T("constructor.props.switch.type.info") }}
|
|
42
43
|
type="buttons"
|
|
43
44
|
options={$optionsStore.SWITCH_OPTIONS.map((option) => ({ ...option, disabled: bitMode && option.value == "checkbox" }))}
|
|
44
45
|
value={component.properties.type}
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
{#if component.properties.type != "checkbox"}
|
|
58
59
|
<UI.Switch
|
|
59
60
|
label={{ name: $T("constructor.props.bitMode") }}
|
|
61
|
+
help={{ info: $T("constructor.props.switch.bitMode.info") }}
|
|
60
62
|
value={bitMode ? 1 : 0}
|
|
61
63
|
onUpdate={(value) => onPropertyChange({ properties: { bitMode: value === 1, value: 0 } })}
|
|
62
64
|
/>
|
|
@@ -102,6 +104,7 @@
|
|
|
102
104
|
/>
|
|
103
105
|
<UI.Switch
|
|
104
106
|
label={{ captionRight: $T("constructor.props.disabled") }}
|
|
107
|
+
help={{ info: $T("constructor.props.switch.bit.disabled.info") }}
|
|
105
108
|
value={bit.disabled ? 1 : 0}
|
|
106
109
|
onUpdate={(value) => edit.updateItem("options", index, { disabled: value === 1 })}
|
|
107
110
|
/>
|
package/dist/Table/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- ↕️ Сортирует строки по клику на стрелки в заголовке колонки.
|
|
14
14
|
- 📋 Копирует значение ячейки одной кнопкой.
|
|
15
15
|
- 🔍 Длинное значение открывается целиком в отдельном окне, а короткая подсказка всплывает при наведении.
|
|
16
|
-
- 🔎 Широкую таблицу можно сузить: часть колонок показывается только в окне подробностей строки, оно открывается кнопкой «›» в конце строки. Кнопки, списки и полосы прогресса в окне работают так же, как в таблице, и обновляются вместе с ней. Колонка «По ширине» стоит в строке, пока таблице хватает места, и сама уходит в окно на узкой таблице (уже 640 px: телефон, узкая ячейка GUI).
|
|
16
|
+
- 🔎 Широкую таблицу можно сузить: часть колонок показывается только в окне подробностей строки, оно открывается кнопкой «›» в конце строки. В окне каждое поле - отдельная строка под чертой, название жирным, на узком окне название над значением. Кнопки, списки и полосы прогресса в окне работают так же, как в таблице, и обновляются вместе с ней. Колонка «По ширине» стоит в строке, пока таблице хватает места, и сама уходит в окно на узкой таблице (уже 640 px: телефон, узкая ячейка GUI).
|
|
17
17
|
- 📜 Работает как журнал: новые строки не заменяют старые, а дописываются, старые уходят, когда буфер заполнен.
|
|
18
18
|
- 🧹 В режиме журнала может показать кнопку очистки.
|
|
19
19
|
- ⏬ Умеет подгружать данные порциями, когда таблицу прокрутили до конца.
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -621,12 +621,15 @@
|
|
|
621
621
|
{#snippet main()}
|
|
622
622
|
{#if detailsEntry}
|
|
623
623
|
{@const row = withPicks(detailsEntry.row)}
|
|
624
|
-
|
|
624
|
+
<!-- Строки разделены чертой, название жирным; на узком окне название над значением -->
|
|
625
|
+
<div class="@container flex flex-col divide-y divide-(--border-color) text-left">
|
|
625
626
|
{#each detailColumns as { column, index } (index)}
|
|
626
|
-
<div class="
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
<div class="grid gap-1.5 py-3 first:pt-0 last:pb-0 @sm:grid-cols-[9rem_minmax(0,1fr)] @sm:items-center @sm:gap-4">
|
|
628
|
+
<div class="text-[13px] font-bold">{$T(column.label?.name ?? "")}</div>
|
|
629
|
+
<!-- Выпадающие списки окна - со своими номерами строк, чтобы не открывался список той же ячейки в таблице -->
|
|
630
|
+
<div class="flex min-w-0 flex-wrap items-center gap-2 text-[13px] [&>*]:min-w-0">
|
|
631
|
+
{@render items(row, detailsEntry.row, columnContent(column, row) as ITableContent<Row>[], true, -1 - detailsIndex, index)}
|
|
632
|
+
</div>
|
|
630
633
|
</div>
|
|
631
634
|
{/each}
|
|
632
635
|
</div>
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
<PropsGroup label={$T("constructor.props.group.appearance")}>
|
|
59
59
|
<UI.Select
|
|
60
60
|
label={{ name: $T("constructor.props.orientation") }}
|
|
61
|
+
help={{ info: $T("constructor.props.tabs.orientation.info") }}
|
|
61
62
|
type="buttons"
|
|
62
63
|
options={$optionsStore.ORIENTATION_OPTIONS}
|
|
63
64
|
value={component.properties.orientation ?? "horizontal"}
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
<UI.Select
|
|
67
68
|
wrapperClass="h-14"
|
|
68
69
|
label={{ name: $T("constructor.props.icon.text.position") }}
|
|
70
|
+
help={{ info: $T("constructor.props.tabs.iconpos.info") }}
|
|
69
71
|
type="buttons"
|
|
70
72
|
options={$optionsStore.ICON_TEXT_POSITION_OPTIONS}
|
|
71
73
|
value={position}
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
/>
|
|
74
76
|
<UI.Switch
|
|
75
77
|
label={{ name: $T("constructor.props.widthMode"), captionLeft: $T("constructor.props.height.small"), captionRight: $T("constructor.props.equal") }}
|
|
78
|
+
help={{ info: $T("constructor.props.tabs.widthMode.info") }}
|
|
76
79
|
value={equalWidth ? 1 : 0}
|
|
77
80
|
onUpdate={(value) => setItems(items, value === 1)}
|
|
78
81
|
/>
|
|
@@ -126,6 +129,7 @@
|
|
|
126
129
|
<UI.Switch
|
|
127
130
|
wrapperClass="w-auto"
|
|
128
131
|
label={{ captionRight: $T("constructor.props.disabled") }}
|
|
132
|
+
help={{ info: $T("constructor.props.tabs.tab.disabled.info") }}
|
|
129
133
|
value={tab.disabled ? 1 : 0}
|
|
130
134
|
onUpdate={(value) => edit.updateItem("items", index, { disabled: value === 1 })}
|
|
131
135
|
/>
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
<PropsGroup label={$T("constructor.props.group.appearance")}>
|
|
59
59
|
<UI.Select
|
|
60
60
|
label={{ name: $T("constructor.props.size") }}
|
|
61
|
+
help={{ info: $T("constructor.props.textfield.size.info") }}
|
|
61
62
|
type="buttons"
|
|
62
63
|
value={component.properties.content?.size}
|
|
63
64
|
options={$optionsStore.TEXTFIELD_SIZE_OPTIONS}
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
/>
|
|
66
67
|
<UI.Select
|
|
67
68
|
label={{ name: $T("constructor.props.textfield.settings") }}
|
|
69
|
+
help={{ info: $T("constructor.props.textfield.settings.info") }}
|
|
68
70
|
type="buttons"
|
|
69
71
|
multiSelect
|
|
70
72
|
value={settings}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
captionLeft: $T("constructor.props.video.viewer.source.camera"),
|
|
31
31
|
captionRight: $T("constructor.props.video.viewer.source.remote"),
|
|
32
32
|
}}
|
|
33
|
+
help={{ info: $T("constructor.props.video.source.info") }}
|
|
33
34
|
value={component.properties.source === "remote" ? 1 : 0}
|
|
34
35
|
onUpdate={(value) => edit.set("source", value === 1 ? "remote" : "camera")}
|
|
35
36
|
/>
|
|
@@ -37,12 +38,14 @@
|
|
|
37
38
|
<PropsGroup label={$T("constructor.props.group.appearance")}>
|
|
38
39
|
<UI.Switch
|
|
39
40
|
label={{ name: $T("constructor.props.showSelect") }}
|
|
41
|
+
help={{ info: $T("constructor.props.video.showSelect.info") }}
|
|
40
42
|
value={component.properties.showSelect ? 1 : 0}
|
|
41
43
|
onUpdate={(value) => edit.set("showSelect", value === 1)}
|
|
42
44
|
/>
|
|
43
45
|
{#if component.properties.source === "remote"}
|
|
44
46
|
<UI.Input
|
|
45
47
|
label={{ name: $T("constructor.props.video.viewer.stream.key") }}
|
|
48
|
+
help={{ info: $T("constructor.props.video.streamKey.info") }}
|
|
46
49
|
value={component.properties.streamKey ?? ""}
|
|
47
50
|
onUpdate={(value) => edit.set("streamKey", String(value))}
|
|
48
51
|
/>
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
/>
|
|
45
45
|
<UI.Switch
|
|
46
46
|
label={{ name: $T("constructor.props.widget.mode") }}
|
|
47
|
+
help={{ info: $T("constructor.props.widget.cycling.info") }}
|
|
47
48
|
value={component.properties.icons?.cycling ? 1 : 0}
|
|
48
49
|
onUpdate={(value) => edit.set("icons", { array: [], ...component.properties.icons, cycling: value === 1 })}
|
|
49
50
|
/>
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
<CommonSnippets snippet="Accent" initialValue={{ exclude: [""] }} {component} {onPropertyChange} />
|
|
53
54
|
<UI.Select
|
|
54
55
|
label={{ name: $T("constructor.props.settings.type") }}
|
|
56
|
+
help={{ info: $T("constructor.props.widget.settings.type.info") }}
|
|
55
57
|
type="buttons"
|
|
56
58
|
options={$optionsStore.WIDGET_TYPE_OPTIONS}
|
|
57
59
|
value={settings?.type}
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
{#snippet WidgetCommand(path: "restartCommand" | "resetCommand", defaultArgument: string)}
|
|
58
58
|
<UI.Select
|
|
59
59
|
label={{ name: $T("widget.common.packet_header") }}
|
|
60
|
+
help={{ info: $T("constructor.props.button.header.info") }}
|
|
60
61
|
type="buttons"
|
|
61
62
|
options={$optionsStore.HEADER_OPTIONS}
|
|
62
63
|
value={component.properties[path]?.header || "SET"}
|
|
@@ -72,7 +73,12 @@
|
|
|
72
73
|
<div class="flex flex-col gap-2">
|
|
73
74
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
74
75
|
<TextsEditor {component} {onPropertyChange} />
|
|
75
|
-
<UI.Input
|
|
76
|
+
<UI.Input
|
|
77
|
+
label={{ name: $T("widget.common.group_prefix") }}
|
|
78
|
+
help={{ info: $T("widget.common.group_prefix.info") }}
|
|
79
|
+
value={component.properties.id}
|
|
80
|
+
onUpdate={(value) => edit.set("id", value as string)}
|
|
81
|
+
/>
|
|
76
82
|
<CommonSnippets snippet="Accent" {component} {onPropertyChange} />
|
|
77
83
|
</PropsGroup>
|
|
78
84
|
<PropsGroup label={$T("widget.info.fields")}>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
|
|
147
147
|
- **Общие:** заголовок и переводы, префикс группы, мастер-цвет.
|
|
148
148
|
- **Закачка файлов:** допустимые файлы (`accept`), наибольшая длина имени (от 1 до 255, по умолчанию 31).
|
|
149
|
-
- **Устройство:** поле состояния ФС (`keys.FS`), аргумент команд (`argument
|
|
149
|
+
- **Устройство:** поле состояния ФС (`keys.FS`), аргумент команд (`argument`, выбор из словаря команд).
|
|
150
150
|
|
|
151
151
|
| Пропс | Тип | Описание |
|
|
152
152
|
| ------------------ | ---------------------------------- | ----------------------------------------------------- |
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { UIComponent, IWidgetFileSystemProps } from "../types"
|
|
7
7
|
import { createPropsEditor, type PropertyChange } from "../propsEditor"
|
|
8
8
|
import PropsGroup from "../PropsGroup.svelte"
|
|
9
|
+
import ArgumentSelect from "../ArgumentSelect.svelte"
|
|
9
10
|
import CommonSnippets from "../CommonSnippets.svelte"
|
|
10
11
|
|
|
11
12
|
const {
|
|
@@ -22,18 +23,25 @@
|
|
|
22
23
|
<div class="flex flex-col gap-2">
|
|
23
24
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
24
25
|
<TextsEditor {component} {onPropertyChange} />
|
|
25
|
-
<UI.Input
|
|
26
|
+
<UI.Input
|
|
27
|
+
label={{ name: $T("widget.common.group_prefix") }}
|
|
28
|
+
help={{ info: $T("widget.common.group_prefix.info") }}
|
|
29
|
+
value={component.properties.id}
|
|
30
|
+
onUpdate={(value) => edit.set("id", value as string)}
|
|
31
|
+
/>
|
|
26
32
|
<CommonSnippets snippet="Accent" {component} {onPropertyChange} />
|
|
27
33
|
</PropsGroup>
|
|
28
34
|
<PropsGroup label={$T("widget.fs.upload_group")}>
|
|
29
35
|
<UI.Input
|
|
30
36
|
label={{ name: $T("widget.fs.accept") }}
|
|
37
|
+
help={{ info: $T("widget.fs.accept.info") }}
|
|
31
38
|
value={component.properties.accept ?? "*/*"}
|
|
32
39
|
placeholder=".bin, .txt, .pem"
|
|
33
40
|
onUpdate={(value) => edit.set("accept", value as string)}
|
|
34
41
|
/>
|
|
35
42
|
<UI.Input
|
|
36
43
|
label={{ name: $T("widget.fs.max_name") }}
|
|
44
|
+
help={{ info: $T("widget.fs.max_name.info") }}
|
|
37
45
|
type="number"
|
|
38
46
|
number={{ minNum: 1, maxNum: 255, step: 1 }}
|
|
39
47
|
value={component.properties.maxNameLength ?? 31}
|
|
@@ -43,13 +51,10 @@
|
|
|
43
51
|
<PropsGroup label={$T("widget.common.device")}>
|
|
44
52
|
<UI.Input
|
|
45
53
|
label={{ name: $T("widget.fs.state_field") }}
|
|
54
|
+
help={{ info: $T("widget.fs.state_field.info") }}
|
|
46
55
|
value={component.properties.keys?.FS ?? "FS"}
|
|
47
56
|
onUpdate={(value) => edit.patch("keys", { FS: value as string })}
|
|
48
57
|
/>
|
|
49
|
-
<
|
|
50
|
-
label={{ name: $T("widget.fs.command_arg") }}
|
|
51
|
-
value={component.properties.argument ?? "FS"}
|
|
52
|
-
onUpdate={(value) => edit.set("argument", value as string)}
|
|
53
|
-
/>
|
|
58
|
+
<ArgumentSelect label={$T("widget.fs.command_arg")} value={component.properties.argument ?? "FS"} onUpdate={(argument) => edit.set("argument", argument)} />
|
|
54
59
|
</PropsGroup>
|
|
55
60
|
</div>
|
|
@@ -165,12 +165,18 @@
|
|
|
165
165
|
<div class="flex flex-col gap-2">
|
|
166
166
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
167
167
|
<TextsEditor {component} {onPropertyChange} />
|
|
168
|
-
<UI.Input
|
|
168
|
+
<UI.Input
|
|
169
|
+
label={{ name: $T("widget.common.group_prefix") }}
|
|
170
|
+
help={{ info: $T("widget.common.group_prefix.info") }}
|
|
171
|
+
value={component.properties.id}
|
|
172
|
+
onUpdate={(value) => edit.set("id", value as string)}
|
|
173
|
+
/>
|
|
169
174
|
<CommonSnippets snippet="Accent" {component} {onPropertyChange} />
|
|
170
175
|
</PropsGroup>
|
|
171
176
|
<PropsGroup label={$T("widget.lora.props.params")}>
|
|
172
177
|
<UI.Select
|
|
173
178
|
label={{ name: $T("widget.lora.props.preset") }}
|
|
179
|
+
help={{ info: $T("widget.lora.props.preset.info") }}
|
|
174
180
|
type="buttons"
|
|
175
181
|
options={PRESET_OPTIONS}
|
|
176
182
|
value={component.properties.preset}
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
<PropsGroup>
|
|
46
46
|
<UI.Select
|
|
47
47
|
label={{ name: $T("widget.map.mode") }}
|
|
48
|
+
help={{ info: $T("widget.map.mode.info") }}
|
|
48
49
|
type="buttons"
|
|
49
50
|
options={MODE_OPTIONS}
|
|
50
51
|
value={component.properties.mode ?? "objects"}
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
<PropsGroup>
|
|
55
56
|
<UI.Switch
|
|
56
57
|
label={{ name: $T("constructor.props.simulation") }}
|
|
58
|
+
help={{ info: $T("widget.map.simulation.info") }}
|
|
57
59
|
value={component.properties.isTest ? 1 : 0}
|
|
58
60
|
onUpdate={(value) => edit.set("isTest", value === 1)}
|
|
59
61
|
/>
|
|
@@ -62,12 +64,18 @@
|
|
|
62
64
|
<div class={twMerge("flex flex-col gap-2 transition-opacity", component.properties.isTest && "opacity-40 grayscale")} inert={component.properties.isTest}>
|
|
63
65
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
64
66
|
<TextsEditor {component} {onPropertyChange} />
|
|
65
|
-
<UI.Input
|
|
67
|
+
<UI.Input
|
|
68
|
+
label={{ name: $T("widget.map.groups") }}
|
|
69
|
+
help={{ info: $T("widget.map.groups.info") }}
|
|
70
|
+
value={(component.properties.groups ?? ["MAV"]).join(" ")}
|
|
71
|
+
onUpdate={setGroups}
|
|
72
|
+
/>
|
|
66
73
|
<CommonSnippets snippet="Accent" {component} {onPropertyChange} />
|
|
67
74
|
</PropsGroup>
|
|
68
75
|
<PropsGroup label={$T("constructor.props.group.appearance")}>
|
|
69
76
|
<UI.Select
|
|
70
77
|
label={{ name: $T("widget.map.height") }}
|
|
78
|
+
help={{ info: $T("widget.map.height.info") }}
|
|
71
79
|
type="buttons"
|
|
72
80
|
options={HEIGHT_OPTIONS}
|
|
73
81
|
value={component.properties.height ?? 400}
|
|
@@ -88,11 +96,13 @@
|
|
|
88
96
|
<PropsGroup label={$T("widget.map.defaults")}>
|
|
89
97
|
<UI.Switch
|
|
90
98
|
label={{ name: $T("constructor.props.map.track") }}
|
|
99
|
+
help={{ info: $T("widget.map.track.info") }}
|
|
91
100
|
value={component.properties.trackEnabled ? 1 : 0}
|
|
92
101
|
onUpdate={(value) => edit.set("trackEnabled", Boolean(value))}
|
|
93
102
|
/>
|
|
94
103
|
<UI.Select
|
|
95
104
|
label={{ name: $T("constructor.props.map.trackLength") }}
|
|
105
|
+
help={{ info: $T("widget.map.track_length.info") }}
|
|
96
106
|
type="input"
|
|
97
107
|
options={TRACK_LENGTH_OPTIONS}
|
|
98
108
|
value={component.properties.trackLength ?? 1000}
|