poe-svelte-ui-lib 1.23.2 → 1.24.0
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 +2 -2
- package/dist/Button/ButtonProps.svelte +2 -2
- package/dist/ColorPicker/ColorPickerProps.svelte +2 -2
- package/dist/Divider/DividerProps.svelte +2 -2
- package/dist/FileAttach/FileAttachProps.svelte +2 -2
- package/dist/Graph/GraphProps.svelte +2 -2
- package/dist/Input/InputProps.svelte +2 -2
- package/dist/Joystick/JoystickProps.svelte +2 -2
- package/dist/Map/MapProps.svelte +2 -2
- package/dist/PeriodChart/PeriodChartProps.svelte +2 -2
- package/dist/ProgressBar/ProgressBarProps.svelte +107 -102
- package/dist/PropsListModal.svelte +34 -0
- package/dist/PropsListModal.svelte.d.ts +10 -0
- package/dist/Select/SelectProps.svelte +96 -91
- package/dist/Slider/SliderProps.svelte +2 -2
- package/dist/Switch/SwitchProps.svelte +88 -81
- package/dist/Table/TableProps.svelte +347 -333
- package/dist/Tabs/TabsProps.svelte +90 -85
- package/dist/TextField/TextFieldProps.svelte +2 -2
- package/dist/VideoViewer/VideoViewerProps.svelte +2 -2
- package/dist/Widget/WidgetProps.svelte +2 -2
- package/dist/WidgetWiFi/WidgetWiFiProps.svelte +1 -1
- package/package.json +1 -1
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
{/snippet}
|
|
94
94
|
|
|
95
95
|
{#if forConstructor}
|
|
96
|
-
<div class="
|
|
96
|
+
<div class="flex flex-col gap-2">
|
|
97
97
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
98
98
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
99
99
|
</PropsGroup>
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</PropsGroup>
|
|
118
118
|
</div>
|
|
119
119
|
{:else}
|
|
120
|
-
<div class="
|
|
120
|
+
<div class="flex flex-col gap-2">
|
|
121
121
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
122
122
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
123
123
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
{/snippet}
|
|
167
167
|
|
|
168
168
|
{#if forConstructor}
|
|
169
|
-
<div class="
|
|
169
|
+
<div class="flex flex-col gap-2">
|
|
170
170
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
171
171
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
172
172
|
{@render ButtonHeaderArgument()}
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
</PropsGroup>
|
|
193
193
|
</div>
|
|
194
194
|
{:else}
|
|
195
|
-
<div class="
|
|
195
|
+
<div class="flex flex-col gap-2">
|
|
196
196
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
197
197
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
198
198
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{/snippet}
|
|
60
60
|
|
|
61
61
|
{#if forConstructor}
|
|
62
|
-
<div class="
|
|
62
|
+
<div class="flex flex-col gap-2">
|
|
63
63
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
64
64
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
65
65
|
</PropsGroup>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
</PropsGroup>
|
|
74
74
|
</div>
|
|
75
75
|
{:else}
|
|
76
|
-
<div class="
|
|
76
|
+
<div class="flex flex-col gap-2">
|
|
77
77
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
78
78
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
79
79
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
{/snippet}
|
|
66
66
|
|
|
67
67
|
{#if forConstructor}
|
|
68
|
-
<div class="
|
|
68
|
+
<div class="flex flex-col gap-2">
|
|
69
69
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
70
70
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
71
71
|
{@render DividerType()}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
</PropsGroup>
|
|
80
80
|
</div>
|
|
81
81
|
{:else}
|
|
82
|
-
<div class="
|
|
82
|
+
<div class="flex flex-col gap-2">
|
|
83
83
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
84
84
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
85
85
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
{/snippet}
|
|
83
83
|
|
|
84
84
|
{#if forConstructor}
|
|
85
|
-
<div class="
|
|
85
|
+
<div class="flex flex-col gap-2">
|
|
86
86
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
87
87
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
88
88
|
</PropsGroup>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
</PropsGroup>
|
|
96
96
|
</div>
|
|
97
97
|
{:else}
|
|
98
|
-
<div class="
|
|
98
|
+
<div class="flex flex-col gap-2">
|
|
99
99
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
100
100
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
101
101
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
{/snippet}
|
|
50
50
|
|
|
51
51
|
{#if forConstructor}
|
|
52
|
-
<div class="
|
|
52
|
+
<div class="flex flex-col gap-2">
|
|
53
53
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
54
54
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
55
55
|
<CommonSnippets snippet="Variable" {VARIABLE_OPTIONS} {component} {onPropertyChange} />
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</PropsGroup>
|
|
65
65
|
</div>
|
|
66
66
|
{:else}
|
|
67
|
-
<div class="
|
|
67
|
+
<div class="flex flex-col gap-2">
|
|
68
68
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
69
69
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
70
70
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
{/snippet}
|
|
378
378
|
|
|
379
379
|
{#if forConstructor}
|
|
380
|
-
<div class="
|
|
380
|
+
<div class="flex flex-col gap-2">
|
|
381
381
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
382
382
|
{@render InputAccess()}
|
|
383
383
|
{@render InputVariable()}
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
</PropsGroup>
|
|
399
399
|
</div>
|
|
400
400
|
{:else}
|
|
401
|
-
<div class="
|
|
401
|
+
<div class="flex flex-col gap-2">
|
|
402
402
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
403
403
|
{@render InputIdentificator()}
|
|
404
404
|
{@render InputWrapperClass()}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
{#if forConstructor}
|
|
84
84
|
<div>
|
|
85
|
-
<div class="
|
|
85
|
+
<div class="flex flex-col gap-2">
|
|
86
86
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
87
87
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
88
88
|
<CommonSnippets snippet="Variable" {VARIABLE_OPTIONS} {component} {onPropertyChange} />
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</div>
|
|
112
112
|
{:else}
|
|
113
113
|
<div>
|
|
114
|
-
<div class="
|
|
114
|
+
<div class="flex flex-col gap-2">
|
|
115
115
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
116
116
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
117
117
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
package/dist/Map/MapProps.svelte
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
33
|
{#if forConstructor}
|
|
34
|
-
<div class="
|
|
34
|
+
<div class="flex flex-col gap-2">
|
|
35
35
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
36
36
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
37
37
|
<CommonSnippets snippet="Variable" {VARIABLE_OPTIONS} {component} {onPropertyChange} />
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</PropsGroup>
|
|
71
71
|
</div>
|
|
72
72
|
{:else}
|
|
73
|
-
<div class="
|
|
73
|
+
<div class="flex flex-col gap-2">
|
|
74
74
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
75
75
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
76
76
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
{/snippet}
|
|
148
148
|
|
|
149
149
|
{#if forConstructor}
|
|
150
|
-
<div class="
|
|
150
|
+
<div class="flex flex-col gap-2">
|
|
151
151
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
152
152
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
153
153
|
<CommonSnippets snippet="Colors" initialValue={{ color: initialColor, uselessColors: ["bg-max"] }} {component} {onPropertyChange} />
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
</div>
|
|
160
160
|
{@render PeriodChartLevels()}
|
|
161
161
|
{:else}
|
|
162
|
-
<div class="
|
|
162
|
+
<div class="flex flex-col gap-2">
|
|
163
163
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
164
164
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
165
165
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { optionsStore } from "../options"
|
|
7
7
|
import CommonSnippets from "../CommonSnippets.svelte"
|
|
8
8
|
import PropsGroup from "../PropsGroup.svelte"
|
|
9
|
+
import PropsListModal from "../PropsListModal.svelte"
|
|
9
10
|
import ButtonAdd from "../libIcons/ButtonAdd.svelte"
|
|
10
11
|
import ButtonDelete from "../libIcons/ButtonDelete.svelte"
|
|
11
12
|
|
|
@@ -45,117 +46,121 @@
|
|
|
45
46
|
{/snippet}
|
|
46
47
|
|
|
47
48
|
{#snippet ProgressBarOptions()}
|
|
48
|
-
<
|
|
49
|
-
{#snippet
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
content={{ icon: ButtonAdd }}
|
|
53
|
-
onClick={() => {
|
|
54
|
-
const newProgress = {
|
|
55
|
-
name: `Label ${component.properties?.items.length + 1}`,
|
|
56
|
-
class: "bg-blue",
|
|
57
|
-
}
|
|
58
|
-
const progresses = [...(component.properties?.items || []), newProgress]
|
|
59
|
-
updateProperty("items", progresses, component, onPropertyChange)
|
|
60
|
-
updateProperty(
|
|
61
|
-
"value",
|
|
62
|
-
Array.from(component.properties?.items, (x: { name?: string; class?: string }) => {
|
|
63
|
-
return { Name: x.name, Value: (component.properties.number.maxNum - component.properties.number.minNum) / 2 }
|
|
64
|
-
}),
|
|
65
|
-
component,
|
|
66
|
-
onPropertyChange,
|
|
67
|
-
)
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
{/snippet}
|
|
71
|
-
|
|
72
|
-
<div bind:this={itemsContainer} class="flex flex-col gap-2">
|
|
73
|
-
{#each component.properties.items || [] as progress, index}
|
|
74
|
-
<div id="item-{index}" class="flex items-end gap-1 rounded-lg border border-(--hairline-color) bg-(--container-color)/60 p-2">
|
|
75
|
-
<UI.Dragging
|
|
76
|
-
wrapperClass="w-9"
|
|
77
|
-
container={itemsContainer}
|
|
78
|
-
array={component.properties.items}
|
|
79
|
-
elementIndex={index}
|
|
80
|
-
onUpdate={(updatedArray) => {
|
|
81
|
-
updateProperty("items", updatedArray, component, onPropertyChange)
|
|
82
|
-
}}
|
|
83
|
-
/>
|
|
84
|
-
<UI.Input
|
|
85
|
-
label={{ name: $T("constructor.props.optionname") }}
|
|
86
|
-
wrapperClass="w-1/4"
|
|
87
|
-
value={progress.name}
|
|
88
|
-
onUpdate={(value) => {
|
|
89
|
-
const progresses = [...(component.properties?.items || [])]
|
|
90
|
-
progresses[index]["name"] = value
|
|
91
|
-
updateProperty("items", progresses, component, onPropertyChange)
|
|
92
|
-
}}
|
|
93
|
-
/>
|
|
94
|
-
{#if forConstructor}
|
|
95
|
-
<UI.Select
|
|
96
|
-
label={{ name: $T("constructor.props.colors") }}
|
|
97
|
-
wrapperClass="w-1/2 h-14.5"
|
|
98
|
-
type="buttons"
|
|
99
|
-
options={$optionsStore.COLOR_OPTIONS.filter((option) => option.value !== "bg-max")}
|
|
100
|
-
value={$optionsStore.COLOR_OPTIONS.find((c) =>
|
|
101
|
-
(c.value as string).includes(progress.class.split(" ").find((cls: string) => cls.startsWith("bg-"))),
|
|
102
|
-
)}
|
|
103
|
-
onUpdate={(value) => {
|
|
104
|
-
const progresses = [...(component.properties?.items || [])]
|
|
105
|
-
progresses[index]["class"] = (value as UI.IOption).value
|
|
106
|
-
updateProperty("items", progresses, component, onPropertyChange)
|
|
107
|
-
}}
|
|
108
|
-
/>
|
|
109
|
-
{:else}
|
|
110
|
-
<UI.Input
|
|
111
|
-
label={{ name: $T("constructor.props.optionvalue") }}
|
|
112
|
-
wrapperClass="w-1/4"
|
|
113
|
-
value={(component.properties.value || [])[index]?.Value}
|
|
114
|
-
type="number"
|
|
115
|
-
onUpdate={(value) => {
|
|
116
|
-
const progresses = [
|
|
117
|
-
...(component.properties?.value ||
|
|
118
|
-
component.properties?.items.map((item: { name?: string; class?: string }, i: number) => {
|
|
119
|
-
return {
|
|
120
|
-
Name: item.name,
|
|
121
|
-
Value: i == index ? value : 0,
|
|
122
|
-
}
|
|
123
|
-
})),
|
|
124
|
-
]
|
|
125
|
-
progresses[index].Value = value
|
|
126
|
-
updateProperty("value", progresses, component, onPropertyChange)
|
|
127
|
-
}}
|
|
128
|
-
/>
|
|
129
|
-
<UI.Input
|
|
130
|
-
label={{ name: $T("constructor.props.optionclass") }}
|
|
131
|
-
wrapperClass="w-1/3"
|
|
132
|
-
value={progress.class}
|
|
133
|
-
onUpdate={(value) => {
|
|
134
|
-
const progresses = [...(component.properties?.items || [])]
|
|
135
|
-
progresses[index]["class"] = value
|
|
136
|
-
updateProperty("items", progresses, component, onPropertyChange)
|
|
137
|
-
}}
|
|
138
|
-
/>
|
|
139
|
-
{/if}
|
|
140
|
-
|
|
49
|
+
<PropsListModal label={$T("constructor.props.progressbar.title")} count={component.properties.items?.length ?? 0} wrapperClass="w-200 h-[70%]">
|
|
50
|
+
{#snippet main()}
|
|
51
|
+
<PropsGroup>
|
|
52
|
+
{#snippet headerActions()}
|
|
141
53
|
<UI.Button
|
|
142
54
|
wrapperClass="w-8"
|
|
143
|
-
content={{ icon:
|
|
55
|
+
content={{ icon: ButtonAdd }}
|
|
144
56
|
onClick={() => {
|
|
145
|
-
const
|
|
146
|
-
|
|
57
|
+
const newProgress = {
|
|
58
|
+
name: `Label ${component.properties?.items.length + 1}`,
|
|
59
|
+
class: "bg-blue",
|
|
60
|
+
}
|
|
61
|
+
const progresses = [...(component.properties?.items || []), newProgress]
|
|
147
62
|
updateProperty("items", progresses, component, onPropertyChange)
|
|
63
|
+
updateProperty(
|
|
64
|
+
"value",
|
|
65
|
+
Array.from(component.properties?.items, (x: { name?: string; class?: string }) => {
|
|
66
|
+
return { Name: x.name, Value: (component.properties.number.maxNum - component.properties.number.minNum) / 2 }
|
|
67
|
+
}),
|
|
68
|
+
component,
|
|
69
|
+
onPropertyChange,
|
|
70
|
+
)
|
|
148
71
|
}}
|
|
149
72
|
/>
|
|
73
|
+
{/snippet}
|
|
74
|
+
|
|
75
|
+
<div bind:this={itemsContainer} class="flex flex-col gap-2">
|
|
76
|
+
{#each component.properties.items || [] as progress, index}
|
|
77
|
+
<div id="item-{index}" class="flex items-end gap-1 rounded-lg border border-(--hairline-color) bg-(--container-color)/60 p-2">
|
|
78
|
+
<UI.Dragging
|
|
79
|
+
wrapperClass="w-9"
|
|
80
|
+
container={itemsContainer}
|
|
81
|
+
array={component.properties.items}
|
|
82
|
+
elementIndex={index}
|
|
83
|
+
onUpdate={(updatedArray) => {
|
|
84
|
+
updateProperty("items", updatedArray, component, onPropertyChange)
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
<UI.Input
|
|
88
|
+
label={{ name: $T("constructor.props.optionname") }}
|
|
89
|
+
wrapperClass="w-1/4"
|
|
90
|
+
value={progress.name}
|
|
91
|
+
onUpdate={(value) => {
|
|
92
|
+
const progresses = [...(component.properties?.items || [])]
|
|
93
|
+
progresses[index]["name"] = value
|
|
94
|
+
updateProperty("items", progresses, component, onPropertyChange)
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
{#if forConstructor}
|
|
98
|
+
<UI.Select
|
|
99
|
+
label={{ name: $T("constructor.props.colors") }}
|
|
100
|
+
wrapperClass="w-1/2 h-14.5"
|
|
101
|
+
type="buttons"
|
|
102
|
+
options={$optionsStore.COLOR_OPTIONS.filter((option) => option.value !== "bg-max")}
|
|
103
|
+
value={$optionsStore.COLOR_OPTIONS.find((c) =>
|
|
104
|
+
(c.value as string).includes(progress.class.split(" ").find((cls: string) => cls.startsWith("bg-"))),
|
|
105
|
+
)}
|
|
106
|
+
onUpdate={(value) => {
|
|
107
|
+
const progresses = [...(component.properties?.items || [])]
|
|
108
|
+
progresses[index]["class"] = (value as UI.IOption).value
|
|
109
|
+
updateProperty("items", progresses, component, onPropertyChange)
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
{:else}
|
|
113
|
+
<UI.Input
|
|
114
|
+
label={{ name: $T("constructor.props.optionvalue") }}
|
|
115
|
+
wrapperClass="w-1/4"
|
|
116
|
+
value={(component.properties.value || [])[index]?.Value}
|
|
117
|
+
type="number"
|
|
118
|
+
onUpdate={(value) => {
|
|
119
|
+
const progresses = [
|
|
120
|
+
...(component.properties?.value ||
|
|
121
|
+
component.properties?.items.map((item: { name?: string; class?: string }, i: number) => {
|
|
122
|
+
return {
|
|
123
|
+
Name: item.name,
|
|
124
|
+
Value: i == index ? value : 0,
|
|
125
|
+
}
|
|
126
|
+
})),
|
|
127
|
+
]
|
|
128
|
+
progresses[index].Value = value
|
|
129
|
+
updateProperty("value", progresses, component, onPropertyChange)
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
<UI.Input
|
|
133
|
+
label={{ name: $T("constructor.props.optionclass") }}
|
|
134
|
+
wrapperClass="w-1/3"
|
|
135
|
+
value={progress.class}
|
|
136
|
+
onUpdate={(value) => {
|
|
137
|
+
const progresses = [...(component.properties?.items || [])]
|
|
138
|
+
progresses[index]["class"] = value
|
|
139
|
+
updateProperty("items", progresses, component, onPropertyChange)
|
|
140
|
+
}}
|
|
141
|
+
/>
|
|
142
|
+
{/if}
|
|
143
|
+
|
|
144
|
+
<UI.Button
|
|
145
|
+
wrapperClass="w-8"
|
|
146
|
+
content={{ icon: ButtonDelete }}
|
|
147
|
+
onClick={() => {
|
|
148
|
+
const progresses = [...(component.properties?.items || [])]
|
|
149
|
+
progresses.splice(index, 1)
|
|
150
|
+
updateProperty("items", progresses, component, onPropertyChange)
|
|
151
|
+
}}
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
154
|
+
{/each}
|
|
155
|
+
<div id="item-{component.properties.items.length}" class="min-h-4"></div>
|
|
150
156
|
</div>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</PropsGroup>
|
|
157
|
+
</PropsGroup>
|
|
158
|
+
{/snippet}
|
|
159
|
+
</PropsListModal>
|
|
155
160
|
{/snippet}
|
|
156
161
|
|
|
157
162
|
{#if forConstructor}
|
|
158
|
-
<div class="
|
|
163
|
+
<div class="flex flex-col gap-2">
|
|
159
164
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
160
165
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
161
166
|
<CommonSnippets snippet="Variable" {VARIABLE_OPTIONS} {component} {onPropertyChange} />
|
|
@@ -183,7 +188,7 @@
|
|
|
183
188
|
</div>
|
|
184
189
|
{@render ProgressBarOptions()}
|
|
185
190
|
{:else}
|
|
186
|
-
<div class="
|
|
191
|
+
<div class="flex flex-col gap-2">
|
|
187
192
|
<PropsGroup label={$T("constructor.props.group.general")}>
|
|
188
193
|
<CommonSnippets snippet="Access" {component} {onPropertyChange} />
|
|
189
194
|
<CommonSnippets snippet="Identificator" {component} {onPropertyChange} />
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- $lib/PropsListModal.svelte — вынос "тяжёлых" списковых секций панелей свойств (столбцы
|
|
2
|
+
Table, опции ProgressBar/Select/Switch/Tabs) в модалку вместо попытки втиснуть их в узкий
|
|
3
|
+
сайдбар конструктора (ConstructorUI.svelte). Кнопка-триггер показывает счётчик элементов. -->
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import type { Snippet } from "svelte"
|
|
6
|
+
import * as UI from "./"
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
label,
|
|
10
|
+
count,
|
|
11
|
+
wrapperClass = "w-300 h-[85%]",
|
|
12
|
+
main,
|
|
13
|
+
}: {
|
|
14
|
+
label: string
|
|
15
|
+
count: number
|
|
16
|
+
wrapperClass?: string
|
|
17
|
+
main: Snippet
|
|
18
|
+
} = $props()
|
|
19
|
+
|
|
20
|
+
let isOpen = $state(false)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
class="flex w-full cursor-pointer items-center justify-between rounded-[10px] border border-(--hairline-color) bg-(--back-color) p-2 text-left hover:bg-(--container-color)"
|
|
26
|
+
onclick={() => (isOpen = true)}
|
|
27
|
+
>
|
|
28
|
+
<span class="text-[11px] font-semibold text-(--muted-color)">{label} ({count})</span>
|
|
29
|
+
<span class="text-[12px] text-(--accent-color)">Настроить →</span>
|
|
30
|
+
</button>
|
|
31
|
+
|
|
32
|
+
{#if isOpen}
|
|
33
|
+
<UI.Modal title={label} bind:isOpen {wrapperClass} {main} />
|
|
34
|
+
{/if}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
count: number;
|
|
5
|
+
wrapperClass?: string;
|
|
6
|
+
main: Snippet;
|
|
7
|
+
};
|
|
8
|
+
declare const PropsListModal: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type PropsListModal = ReturnType<typeof PropsListModal>;
|
|
10
|
+
export default PropsListModal;
|