poe-svelte-ui-lib 1.1.19 → 1.1.21
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/icons.js +59 -86
- package/dist/Button/ButtonProps.svelte +0 -4
- package/dist/FileAttach/FileAttachProps.svelte +6 -4
- package/dist/Input/Input.svelte +1 -1
- package/dist/Input/InputProps.svelte +14 -2
- package/dist/ProgressBar/ProgressBar.svelte +4 -3
- package/dist/ProgressBar/ProgressBarProps.svelte +2 -0
- package/dist/Select/SelectProps.svelte +12 -41
- package/dist/Slider/SliderProps.svelte +2 -2
- package/dist/Switch/Switch.svelte +2 -2
- package/dist/Switch/SwitchProps.svelte +1 -1
- package/dist/Table/Table.svelte +25 -10
- package/dist/Table/TableProps.svelte +41 -24
- package/dist/TextField/TextField.svelte +1 -4
- package/dist/locales/translations.js +66 -21
- package/dist/options.d.ts +5 -0
- package/dist/options.js +73 -4
- package/dist/types.d.ts +9 -4
- package/package.json +4 -4
|
@@ -90,7 +90,8 @@
|
|
|
90
90
|
help={{ info: $t('constructor.props.argument.info'), autocomplete: 'on', regExp: /^[a-zA-Z0-9\-_]{0,32}$/ }}
|
|
91
91
|
onUpdate={(value) => updateProperty('eventHandler.Argument', value as string, component, onPropertyChange)}
|
|
92
92
|
/>
|
|
93
|
-
|
|
93
|
+
</div>
|
|
94
|
+
<div class="flex w-1/3 flex-col items-center px-2">
|
|
94
95
|
<UI.Select
|
|
95
96
|
label={{ name: $t('constructor.props.type') }}
|
|
96
97
|
type="buttons"
|
|
@@ -98,8 +99,6 @@
|
|
|
98
99
|
options={$optionsStore.SELECT_TYPE_OPTIONS}
|
|
99
100
|
onUpdate={(item) => updateProperty('type', item.value as string, component, onPropertyChange)}
|
|
100
101
|
/>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="flex w-1/3 flex-col items-center px-2">
|
|
103
102
|
<UI.Select
|
|
104
103
|
wrapperClass="h-14"
|
|
105
104
|
label={{ name: $t('constructor.props.valuetype') }}
|
|
@@ -117,21 +116,6 @@
|
|
|
117
116
|
updateProperty('options', options, component, onPropertyChange)
|
|
118
117
|
}}
|
|
119
118
|
/>
|
|
120
|
-
<UI.Select
|
|
121
|
-
wrapperClass=" h-14"
|
|
122
|
-
label={{ name: $t('constructor.props.colors') }}
|
|
123
|
-
type="buttons"
|
|
124
|
-
options={$optionsStore.COLOR_OPTIONS}
|
|
125
|
-
value={initialColor}
|
|
126
|
-
onUpdate={(option) => {
|
|
127
|
-
updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
|
|
128
|
-
const options = [...(component.properties?.options || [])]
|
|
129
|
-
options.forEach((o) => {
|
|
130
|
-
o['class'] = option.value
|
|
131
|
-
})
|
|
132
|
-
updateProperty('options', options, component, onPropertyChange)
|
|
133
|
-
}}
|
|
134
|
-
/>
|
|
135
119
|
</div>
|
|
136
120
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
137
121
|
<UI.Input
|
|
@@ -161,7 +145,8 @@
|
|
|
161
145
|
onClick={() => {
|
|
162
146
|
const newOption: ISelectOption = {
|
|
163
147
|
id: crypto.randomUUID(),
|
|
164
|
-
name:
|
|
148
|
+
name: `Option ${component.properties?.options.length + 1}`,
|
|
149
|
+
value: component.properties?.options.length + 1,
|
|
165
150
|
class: 'bg-max',
|
|
166
151
|
}
|
|
167
152
|
const options = [...(component.properties?.options || []), newOption]
|
|
@@ -232,21 +217,6 @@
|
|
|
232
217
|
value={component.properties.wrapperClass}
|
|
233
218
|
onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
|
|
234
219
|
/>
|
|
235
|
-
<UI.Select
|
|
236
|
-
wrapperClass=" h-14"
|
|
237
|
-
label={{ name: $t('constructor.props.colors') }}
|
|
238
|
-
type="buttons"
|
|
239
|
-
options={$optionsStore.COLOR_OPTIONS}
|
|
240
|
-
value={initialColor}
|
|
241
|
-
onUpdate={(option) => {
|
|
242
|
-
updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
|
|
243
|
-
const options = [...(component.properties?.options || [])]
|
|
244
|
-
options.forEach((o) => {
|
|
245
|
-
o['class'] = option.value
|
|
246
|
-
})
|
|
247
|
-
updateProperty('options', options, component, onPropertyChange)
|
|
248
|
-
}}
|
|
249
|
-
/>
|
|
250
220
|
</div>
|
|
251
221
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
252
222
|
<UI.Input
|
|
@@ -259,6 +229,12 @@
|
|
|
259
229
|
value={component.properties.label.class}
|
|
260
230
|
onUpdate={(value) => updateProperty('label.class', value as string, component, onPropertyChange)}
|
|
261
231
|
/>
|
|
232
|
+
<UI.Switch
|
|
233
|
+
wrapperClass="bg-blue"
|
|
234
|
+
label={{ name: $t('constructor.props.disabled') }}
|
|
235
|
+
value={component.properties.disabled ? 2 : 1}
|
|
236
|
+
onChange={(value) => updateProperty('disabled', value === 2, component, onPropertyChange)}
|
|
237
|
+
/>
|
|
262
238
|
</div>
|
|
263
239
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
264
240
|
<UI.Select
|
|
@@ -285,12 +261,6 @@
|
|
|
285
261
|
updateProperty('options', options, component, onPropertyChange)
|
|
286
262
|
}}
|
|
287
263
|
/>
|
|
288
|
-
<UI.Switch
|
|
289
|
-
wrapperClass="bg-blue"
|
|
290
|
-
label={{ name: $t('constructor.props.disabled') }}
|
|
291
|
-
value={component.properties.disabled ? 2 : 1}
|
|
292
|
-
onChange={(value) => updateProperty('disabled', value === 2, component, onPropertyChange)}
|
|
293
|
-
/>
|
|
294
264
|
</div>
|
|
295
265
|
</div>
|
|
296
266
|
|
|
@@ -306,7 +276,8 @@
|
|
|
306
276
|
onClick={() => {
|
|
307
277
|
const newOption: ISelectOption = {
|
|
308
278
|
id: crypto.randomUUID(),
|
|
309
|
-
name:
|
|
279
|
+
name: `Option ${component.properties?.options.length + 1}`,
|
|
280
|
+
value: component.properties?.options.length + 1,
|
|
310
281
|
class: 'bg-max',
|
|
311
282
|
}
|
|
312
283
|
const options = [...(component.properties?.options || []), newOption]
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
wrapperClass="!h-14"
|
|
102
102
|
label={{ name: $t('constructor.props.colors') }}
|
|
103
103
|
type="buttons"
|
|
104
|
-
options={$optionsStore.COLOR_OPTIONS}
|
|
104
|
+
options={$optionsStore.COLOR_OPTIONS.filter((option) => option.value !== 'bg-gray')}
|
|
105
105
|
value={initialColor}
|
|
106
106
|
onUpdate={(option) => updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)}
|
|
107
107
|
/>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
wrapperClass=" h-14"
|
|
125
125
|
label={{ name: $t('constructor.props.colors') }}
|
|
126
126
|
type="buttons"
|
|
127
|
-
options={$optionsStore.COLOR_OPTIONS}
|
|
127
|
+
options={$optionsStore.COLOR_OPTIONS.filter((option) => option.value !== 'bg-gray')}
|
|
128
128
|
value={initialColor}
|
|
129
129
|
onUpdate={(option) => {
|
|
130
130
|
updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
id = crypto.randomUUID(),
|
|
8
8
|
disabled = false,
|
|
9
9
|
wrapperClass = '',
|
|
10
|
-
label = { name: '', captionLeft: '', captionRight: '' },
|
|
10
|
+
label = { name: '', class: '', captionLeft: '', captionRight: '' },
|
|
11
11
|
height = '2rem',
|
|
12
12
|
value = $bindable(),
|
|
13
13
|
onChange = () => {},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
<div class={twMerge(`bg-blue relative flex w-full flex-col items-center justify-center`, wrapperClass)}>
|
|
48
48
|
{#if label.name}
|
|
49
|
-
<h5 class={`w-full px-4 text-center
|
|
49
|
+
<h5 class={twMerge(`w-full px-4 text-center`, label.class)}>{label.name}</h5>
|
|
50
50
|
{/if}
|
|
51
51
|
|
|
52
52
|
<div class="relative flex w-full grow items-center justify-center bg-transparent">
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
wrapperClass=" h-14"
|
|
101
101
|
label={{ name: $t('constructor.props.colors') }}
|
|
102
102
|
type="buttons"
|
|
103
|
-
options={$optionsStore.COLOR_OPTIONS}
|
|
103
|
+
options={$optionsStore.COLOR_OPTIONS.filter((option) => option.value !== 'bg-max' && option.value !== 'bg-gray')}
|
|
104
104
|
value={initialColor}
|
|
105
105
|
onUpdate={(option) => {
|
|
106
106
|
updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
body = [],
|
|
13
13
|
header = [],
|
|
14
14
|
footer = '',
|
|
15
|
+
outline = false,
|
|
15
16
|
cursor = null,
|
|
16
17
|
loader,
|
|
17
18
|
getData = () => {},
|
|
@@ -126,11 +127,22 @@
|
|
|
126
127
|
<h5 class={twMerge(`w-full px-4 text-center`, label.class)}>{label.name}</h5>
|
|
127
128
|
{/if}
|
|
128
129
|
|
|
129
|
-
<div class="flex h-full flex-col overflow-hidden rounded-xl border-(--border-color)">
|
|
130
|
+
<div class="flex h-full flex-col overflow-hidden rounded-xl border {outline ? ' border-(--border-color)' : 'border-transparent'} ">
|
|
130
131
|
<!-- Table Header -->
|
|
131
132
|
<div class="grid font-semibold" style={`grid-template-columns: ${header.map((c) => c.width || 'minmax(0, 1fr)').join(' ')};`}>
|
|
132
|
-
{#each header as column (column)}
|
|
133
|
-
<div
|
|
133
|
+
{#each header as column, index (column)}
|
|
134
|
+
<div
|
|
135
|
+
class={twMerge(
|
|
136
|
+
`justify-center border-l ${outline && index !== 0 ? ' border-(--border-color)' : 'border-transparent'} ${
|
|
137
|
+
column.align?.header === 'center'
|
|
138
|
+
? 'flex justify-center text-center'
|
|
139
|
+
: column.align?.header === 'right'
|
|
140
|
+
? 'flex justify-end text-right'
|
|
141
|
+
: 'flex justify-start text-left'
|
|
142
|
+
} bg-(--bg-color) p-2 text-left`,
|
|
143
|
+
column.label?.class,
|
|
144
|
+
)}
|
|
145
|
+
>
|
|
134
146
|
<span>{column.label?.name}</span>
|
|
135
147
|
{#if column.sortable}
|
|
136
148
|
<button
|
|
@@ -148,21 +160,24 @@
|
|
|
148
160
|
<div class="flex-1 overflow-y-auto bg-(--container-color)/50" bind:this={container} onscroll={handleScroll}>
|
|
149
161
|
<div class="grid min-w-0" style={`grid-template-columns: ${header.map((c) => c.width || 'minmax(0, 1fr)').join(' ')};`}>
|
|
150
162
|
{#each body as row, index (row)}
|
|
151
|
-
{#each header as column (column)}
|
|
163
|
+
{#each header as column, j (column)}
|
|
152
164
|
<div
|
|
153
165
|
class="relative flex w-full min-w-0 items-center px-2 py-1 wrap-break-word
|
|
154
166
|
{index % 2 ? 'bg-(--back-color)/40' : 'bg-[#edeef3] dark:bg-[#1f2a3a]'}
|
|
155
|
-
{column.align === 'center'
|
|
167
|
+
{column.align?.content === 'center'
|
|
156
168
|
? 'flex justify-center text-center'
|
|
157
|
-
: column.align === 'right'
|
|
169
|
+
: column.align?.content === 'right'
|
|
158
170
|
? 'flex justify-end text-right'
|
|
159
|
-
: 'flex justify-start text-left'}
|
|
171
|
+
: 'flex justify-start text-left'}
|
|
172
|
+
border-t
|
|
173
|
+
{j !== 0 ? ' border-l ' : ''}
|
|
174
|
+
{outline ? 'border-(--border-color)' : 'border-transparent'} "
|
|
160
175
|
>
|
|
161
176
|
{#if column.buttons}
|
|
162
177
|
<div class="flex w-full flex-col gap-1">
|
|
163
178
|
{#each column.buttons as button (button)}
|
|
164
179
|
<button
|
|
165
|
-
class="{twMerge(`cursor-pointer rounded-full
|
|
180
|
+
class="{twMerge(`cursor-pointer rounded-full
|
|
166
181
|
px-4 py-1 font-medium transition-shadow outline-none select-none hover:shadow-md
|
|
167
182
|
${typeof button.class === 'function' ? button.class(row) : button.class}`)} bg-(--bg-color)"
|
|
168
183
|
onclick={() => buttonClick(row, button)}
|
|
@@ -191,7 +206,7 @@
|
|
|
191
206
|
<div
|
|
192
207
|
class="w-full max-w-full wrap-break-word {column.overflow?.truncated
|
|
193
208
|
? 'overflow-hidden text-ellipsis whitespace-nowrap'
|
|
194
|
-
: 'whitespace-normal'}"
|
|
209
|
+
: 'whitespace-normal '}"
|
|
195
210
|
onmouseenter={column.overflow?.truncated ? (e) => showTooltip(e, row[column.key], column.overflow?.formatting) : undefined}
|
|
196
211
|
onmouseleave={column.overflow?.truncated ? hideTooltip : undefined}
|
|
197
212
|
onmousemove={column.overflow?.truncated
|
|
@@ -254,7 +269,7 @@
|
|
|
254
269
|
|
|
255
270
|
{#if tooltip.show}
|
|
256
271
|
<div
|
|
257
|
-
class="fixed z-50 max-w-
|
|
272
|
+
class="fixed z-50 w-max max-w-min rounded-md px-2 py-1 text-sm whitespace-pre-wrap shadow-lg"
|
|
258
273
|
style="background: color-mix(in srgb, var(--yellow-color) 30%, var(--back-color)); transform: translateX(-50%); left: {tooltip.x +
|
|
259
274
|
10}px; top: {tooltip.y + 10}px;"
|
|
260
275
|
transition:fly={{ y: 10, duration: 200 }}
|
|
@@ -103,6 +103,11 @@
|
|
|
103
103
|
value={initialColor}
|
|
104
104
|
onUpdate={(option) => updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)}
|
|
105
105
|
/>
|
|
106
|
+
<UI.Switch
|
|
107
|
+
label={{ name: $t('constructor.props.outline') }}
|
|
108
|
+
value={component.properties.outline ? 2 : 1}
|
|
109
|
+
onChange={(value) => updateProperty('outline', value === 2, component, onPropertyChange)}
|
|
110
|
+
/>
|
|
106
111
|
</div>
|
|
107
112
|
<div class="flex w-1/3 flex-col px-2">
|
|
108
113
|
<UI.Input
|
|
@@ -163,6 +168,7 @@
|
|
|
163
168
|
/>
|
|
164
169
|
<UI.Input
|
|
165
170
|
label={{ name: $t('constructor.props.table.columns.width') }}
|
|
171
|
+
wrapperClass="w-120"
|
|
166
172
|
type="number"
|
|
167
173
|
value={Number(column.width.replace('%', ''))}
|
|
168
174
|
onUpdate={(value) => updateTableHeader(columnIndex, 'width', `${value}%`)}
|
|
@@ -181,7 +187,7 @@
|
|
|
181
187
|
/>
|
|
182
188
|
<UI.Button
|
|
183
189
|
wrapperClass="w-8"
|
|
184
|
-
content={{ icon: ButtonAdd, info: $t('constructor.props.table.addaction') }}
|
|
190
|
+
content={{ icon: ButtonAdd, info: { text: $t('constructor.props.table.addaction'), side: 'top' } }}
|
|
185
191
|
onClick={() => {
|
|
186
192
|
const newButton = {
|
|
187
193
|
name: `button${(component.properties.header[columnIndex].buttons ? component.properties.header[columnIndex].buttons.length : 0) + 1}`,
|
|
@@ -204,9 +210,9 @@
|
|
|
204
210
|
/>
|
|
205
211
|
</div>
|
|
206
212
|
{#if column.buttons && column.buttons.length > 0}
|
|
207
|
-
<div class="mb-5 rounded-lg
|
|
213
|
+
<div class="mb-5 rounded-lg py-1">
|
|
208
214
|
{#each column.buttons as button, buttonIndex (buttonIndex)}
|
|
209
|
-
<div class="
|
|
215
|
+
<div class="ml-14 flex items-end justify-around gap-2">
|
|
210
216
|
<UI.Input
|
|
211
217
|
label={{ name: $t('constructor.props.name') }}
|
|
212
218
|
wrapperClass="!w-3/10"
|
|
@@ -294,11 +300,19 @@
|
|
|
294
300
|
value={component.properties.label.class}
|
|
295
301
|
onUpdate={(value) => updateProperty('label.class', value as string, component, onPropertyChange)}
|
|
296
302
|
/>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<div class="flex w-1/3 flex-col px-2">
|
|
297
306
|
<UI.Input
|
|
298
307
|
label={{ name: $t('constructor.props.footer') }}
|
|
299
308
|
value={component.properties.footer}
|
|
300
309
|
onUpdate={(value) => updateProperty('footer', value as string, component, onPropertyChange)}
|
|
301
310
|
/>
|
|
311
|
+
<UI.Switch
|
|
312
|
+
label={{ name: $t('constructor.props.outline') }}
|
|
313
|
+
value={component.properties.outline ? 2 : 1}
|
|
314
|
+
onChange={(value) => updateProperty('outline', value === 2, component, onPropertyChange)}
|
|
315
|
+
/>
|
|
302
316
|
</div>
|
|
303
317
|
</div>
|
|
304
318
|
|
|
@@ -330,6 +344,7 @@
|
|
|
330
344
|
<div class="mr-2 flex items-end justify-around gap-6">
|
|
331
345
|
<UI.Input
|
|
332
346
|
label={{ name: $t('constructor.props.table.columns.key') }}
|
|
347
|
+
wrapperClass="w-150"
|
|
333
348
|
value={column.key}
|
|
334
349
|
help={{ regExp: /^[0-9a-zA-Z_-]{0,16}$/ }}
|
|
335
350
|
onUpdate={(value) => {
|
|
@@ -345,26 +360,34 @@
|
|
|
345
360
|
}}
|
|
346
361
|
/>
|
|
347
362
|
<UI.Input
|
|
348
|
-
label={{ name: $t('constructor.props.table.columns.width') }}
|
|
363
|
+
label={{ name: $t('constructor.props.table.columns.width'), class: 'px-0' }}
|
|
364
|
+
wrapperClass="w-150"
|
|
349
365
|
type="number"
|
|
350
366
|
value={Number(column.width.replace('%', ''))}
|
|
351
367
|
onUpdate={(value) => updateTableHeader(columnIndex, 'width', `${value}%`)}
|
|
352
368
|
/>
|
|
369
|
+
<UI.Select
|
|
370
|
+
label={{ name: $t('constructor.props.align.header') }}
|
|
371
|
+
type="buttons"
|
|
372
|
+
value={$optionsStore.ALIGN_OPTIONS.find((a) => (a.value as string).includes(column.align?.header) || 'left')}
|
|
373
|
+
options={$optionsStore.ALIGN_OPTIONS}
|
|
374
|
+
onUpdate={(option) => updateTableHeader(columnIndex, 'align', { header: option.value, content: column.align?.content })}
|
|
375
|
+
/>
|
|
353
376
|
<UI.Switch
|
|
354
|
-
|
|
355
|
-
|
|
377
|
+
label={{ name: $t('constructor.props.table.columns.sortable'), class: 'px-0' }}
|
|
378
|
+
wrapperClass="w-30"
|
|
356
379
|
value={column.sortable ? 2 : 1}
|
|
357
380
|
onChange={(value) => updateTableHeader(columnIndex, 'sortable', value === 2)}
|
|
358
381
|
/>
|
|
359
382
|
<UI.Switch
|
|
360
|
-
|
|
361
|
-
|
|
383
|
+
label={{ name: $t('constructor.props.copy'), class: 'px-0' }}
|
|
384
|
+
wrapperClass="w-30"
|
|
362
385
|
value={column.overflow?.copy ? 2 : 1}
|
|
363
|
-
onChange={(value) => updateTableHeader(columnIndex, 'overflow', { copy: value === 2 })}
|
|
386
|
+
onChange={(value) => updateTableHeader(columnIndex, 'overflow', { copy: value === 2, truncated: column.overflow?.truncated })}
|
|
364
387
|
/>
|
|
365
388
|
<UI.Button
|
|
366
389
|
wrapperClass="w-8"
|
|
367
|
-
content={{ icon: ButtonAdd, info: $t('constructor.props.table.addaction') }}
|
|
390
|
+
content={{ icon: ButtonAdd, info: { text: $t('constructor.props.table.addaction'), side: 'top' } }}
|
|
368
391
|
onClick={() => {
|
|
369
392
|
const newButton = {
|
|
370
393
|
name: `button${(component.properties.header[columnIndex].buttons ? component.properties.header[columnIndex].buttons.length : 0) + 1}`,
|
|
@@ -388,30 +411,24 @@
|
|
|
388
411
|
</div>
|
|
389
412
|
<div class="mr-2 flex items-end justify-around gap-6">
|
|
390
413
|
<UI.Select
|
|
391
|
-
label={{ name: $t('constructor.props.align') }}
|
|
414
|
+
label={{ name: $t('constructor.props.align.content') }}
|
|
392
415
|
type="buttons"
|
|
393
|
-
value={$optionsStore.ALIGN_OPTIONS.find((a) => (a.value as string).includes(column.align) || 'left')}
|
|
416
|
+
value={$optionsStore.ALIGN_OPTIONS.find((a) => (a.value as string).includes(column.align?.content) || 'left')}
|
|
394
417
|
options={$optionsStore.ALIGN_OPTIONS}
|
|
395
|
-
onUpdate={(option) => updateTableHeader(columnIndex, 'align', option.value)}
|
|
418
|
+
onUpdate={(option) => updateTableHeader(columnIndex, 'align', { header: column.align?.header, content: option.value })}
|
|
396
419
|
/>
|
|
397
420
|
<UI.Switch
|
|
398
421
|
wrapperClass="w-2/10"
|
|
399
422
|
label={{ name: $t('constructor.props.table.columns.truncated') }}
|
|
400
423
|
value={column.overflow?.truncated ? 2 : 1}
|
|
401
|
-
onChange={(value) => updateTableHeader(columnIndex, 'overflow', {
|
|
402
|
-
/>
|
|
403
|
-
<UI.Input
|
|
404
|
-
label={{ name: $t('constructor.props.table.columns.alt') }}
|
|
405
|
-
value={column.image?.alt}
|
|
406
|
-
onUpdate={(value) => {
|
|
407
|
-
updateTableHeader(columnIndex, 'image', { ['alt']: value })
|
|
408
|
-
}}
|
|
424
|
+
onChange={(value) => updateTableHeader(columnIndex, 'overflow', { truncated: value === 2, copy: column.overflow?.copy })}
|
|
409
425
|
/>
|
|
426
|
+
|
|
410
427
|
<UI.Input
|
|
411
428
|
label={{ name: $t('constructor.props.table.columns.class') }}
|
|
412
429
|
value={column.image?.class}
|
|
413
430
|
onUpdate={(value) => {
|
|
414
|
-
updateTableHeader(columnIndex, 'image', {
|
|
431
|
+
updateTableHeader(columnIndex, 'image', { class: value, width: column.image?.width, height: column.image?.height })
|
|
415
432
|
}}
|
|
416
433
|
/>
|
|
417
434
|
<UI.Input
|
|
@@ -419,7 +436,7 @@
|
|
|
419
436
|
wrapperClass="w-150"
|
|
420
437
|
value={column.image?.width}
|
|
421
438
|
onUpdate={(value) => {
|
|
422
|
-
updateTableHeader(columnIndex, 'image', {
|
|
439
|
+
updateTableHeader(columnIndex, 'image', { class: column.image?.class, width: value, height: column.image?.height })
|
|
423
440
|
}}
|
|
424
441
|
/>
|
|
425
442
|
<UI.Input
|
|
@@ -427,7 +444,7 @@
|
|
|
427
444
|
wrapperClass="w-150"
|
|
428
445
|
value={column.image?.height}
|
|
429
446
|
onUpdate={(value) => {
|
|
430
|
-
updateTableHeader(columnIndex, 'image', {
|
|
447
|
+
updateTableHeader(columnIndex, 'image', { class: column.image?.class, width: column.image?.width, height: value })
|
|
431
448
|
}}
|
|
432
449
|
/>
|
|
433
450
|
</div>
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
} as const
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<div
|
|
17
|
-
{id}
|
|
18
|
-
class={twMerge(`relative flex w-full flex-col items-center ${background ? 'rounded-2xl bg-(--container-color) px-6 py-2' : ''}`, wrapperClass)}
|
|
19
|
-
>
|
|
16
|
+
<div {id} class={twMerge(`relative flex w-full flex-col items-center ${background ? 'rounded-2xl bg-(--back-color) px-6 py-2' : ''}`, wrapperClass)}>
|
|
20
17
|
<p class={twMerge(`w-full text-center ${textSize[content.size ?? 'base']}`, content.class)}>
|
|
21
18
|
{content.name}
|
|
22
19
|
</p>
|
|
@@ -47,8 +47,8 @@ const translations = {
|
|
|
47
47
|
'constructor.props.open': 'Разворачивание',
|
|
48
48
|
'constructor.props.defaultcolor': 'Первоначальный цвет',
|
|
49
49
|
'constructor.props.file.accept': 'Допустимые файлы',
|
|
50
|
-
'constructor.props.imageSize.height': '
|
|
51
|
-
'constructor.props.imageSize.width': '
|
|
50
|
+
'constructor.props.imageSize.height': 'Высота, rem',
|
|
51
|
+
'constructor.props.imageSize.width': 'Ширина, rem',
|
|
52
52
|
'constructor.props.fitmode': 'Вид',
|
|
53
53
|
'constructor.props.form': 'Форма',
|
|
54
54
|
'constructor.props.type': 'Тип',
|
|
@@ -62,16 +62,19 @@ const translations = {
|
|
|
62
62
|
'constructor.props.value': 'Значение',
|
|
63
63
|
'constructor.props.value.info': 'Поле для ввода Value пакета в формате JSON',
|
|
64
64
|
'constructor.props.align': 'Выравнивание',
|
|
65
|
+
'constructor.props.align.header': 'Выравнивание заголовка',
|
|
66
|
+
'constructor.props.align.content': 'Выравнивание контента',
|
|
65
67
|
'constructor.props.image': 'Фоновое изображение',
|
|
66
68
|
'constructor.props.labelicon': 'Иконка заголовка',
|
|
67
69
|
'constructor.props.removeimage': 'Удалить изображение',
|
|
68
70
|
'constructor.props.name': 'Текст',
|
|
69
71
|
'constructor.props.height': 'Высота',
|
|
70
72
|
'constructor.props.colors': 'Цвет фона',
|
|
73
|
+
'constructor.props.outline': 'Границы таблицы',
|
|
71
74
|
'constructor.props.textcolors': 'Цвет текста',
|
|
72
75
|
'constructor.props.textarea.rows': 'Количество строк',
|
|
73
76
|
'constructor.props.autocomplete': 'Автозаполнение',
|
|
74
|
-
'constructor.props.
|
|
77
|
+
'constructor.props.maxlength': 'Максимальная длина',
|
|
75
78
|
'constructor.props.regexp': 'Выражение валидации',
|
|
76
79
|
'constructor.props.regexp.info': 'Введите RegExp без /.../ (например: ^\\d+$)',
|
|
77
80
|
'constructor.props.minnum': 'Минимальное значение',
|
|
@@ -109,9 +112,9 @@ const translations = {
|
|
|
109
112
|
'constructor.props.size.height': 'Высота сетки',
|
|
110
113
|
'constructor.props.size.width': 'Ширина сетки',
|
|
111
114
|
'constructor.props.table.columns': 'Колонки таблицы',
|
|
112
|
-
'constructor.props.table.columns.key': '
|
|
113
|
-
'constructor.props.table.columns.label': 'Название',
|
|
114
|
-
'constructor.props.table.columns.width': '
|
|
115
|
+
'constructor.props.table.columns.key': 'Ключ',
|
|
116
|
+
'constructor.props.table.columns.label': 'Название колонки',
|
|
117
|
+
'constructor.props.table.columns.width': 'Ширина, %',
|
|
115
118
|
'constructor.props.table.columns.sortable': 'Сортировка',
|
|
116
119
|
'constructor.props.table.columns.truncated': 'Скрыть',
|
|
117
120
|
'constructor.props.table.columns.alt': 'Альтернативное название иконок',
|
|
@@ -132,21 +135,63 @@ const translations = {
|
|
|
132
135
|
'constructor.props.icon.network': 'Сеть',
|
|
133
136
|
'constructor.props.icon.power': 'Питание',
|
|
134
137
|
'constructor.props.icon.settings': 'Настройки',
|
|
135
|
-
'constructor.props.autocomplete.on': '
|
|
136
|
-
'constructor.props.autocomplete.off': '
|
|
137
|
-
'constructor.props.autocomplete.
|
|
138
|
-
'constructor.props.autocomplete.
|
|
139
|
-
'constructor.props.autocomplete.name': '
|
|
140
|
-
'constructor.props.autocomplete.
|
|
141
|
-
'constructor.props.autocomplete.
|
|
142
|
-
'constructor.props.autocomplete.
|
|
143
|
-
'constructor.props.autocomplete.
|
|
144
|
-
'constructor.props.autocomplete.
|
|
145
|
-
'constructor.props.autocomplete.
|
|
146
|
-
'constructor.props.autocomplete.
|
|
147
|
-
'constructor.props.autocomplete.
|
|
148
|
-
'constructor.props.autocomplete.
|
|
149
|
-
'constructor.props.autocomplete.
|
|
138
|
+
'constructor.props.autocomplete.on': 'Включено',
|
|
139
|
+
'constructor.props.autocomplete.off': 'Выключено',
|
|
140
|
+
'constructor.props.autocomplete.name': 'Полное имя',
|
|
141
|
+
'constructor.props.autocomplete.honorific-prefix': 'Обращение (г-н, г-жа, др.)',
|
|
142
|
+
'constructor.props.autocomplete.given-name': 'Имя',
|
|
143
|
+
'constructor.props.autocomplete.additional-name': 'Отчество',
|
|
144
|
+
'constructor.props.autocomplete.family-name': 'Фамилия',
|
|
145
|
+
'constructor.props.autocomplete.honorific-suffix': 'Постфикс (мл., ст.)',
|
|
146
|
+
'constructor.props.autocomplete.nickname': 'Псевдоним',
|
|
147
|
+
'constructor.props.autocomplete.username': 'Имя пользователя',
|
|
148
|
+
'constructor.props.autocomplete.new-password': 'Новый пароль',
|
|
149
|
+
'constructor.props.autocomplete.current-password': 'Текущий пароль',
|
|
150
|
+
'constructor.props.autocomplete.one-time-code': 'Одноразовый код',
|
|
151
|
+
'constructor.props.autocomplete.organization-title': 'Должность',
|
|
152
|
+
'constructor.props.autocomplete.organization': 'Организация',
|
|
153
|
+
'constructor.props.autocomplete.street-address': 'Адрес, начиная с улицы',
|
|
154
|
+
'constructor.props.autocomplete.address-line1': 'Адресная строка 1',
|
|
155
|
+
'constructor.props.autocomplete.address-line2': 'Адресная строка 2',
|
|
156
|
+
'constructor.props.autocomplete.address-line3': 'Адресная строка 3',
|
|
157
|
+
'constructor.props.autocomplete.address-level4': 'Уровень адреса 4',
|
|
158
|
+
'constructor.props.autocomplete.address-level3': 'Уровень адреса 3',
|
|
159
|
+
'constructor.props.autocomplete.address-level2': 'Населённый пункт',
|
|
160
|
+
'constructor.props.autocomplete.address-level1': 'Область, регион или штат',
|
|
161
|
+
'constructor.props.autocomplete.country': 'Код страны',
|
|
162
|
+
'constructor.props.autocomplete.country-name': 'Страна',
|
|
163
|
+
'constructor.props.autocomplete.postal-code': 'Почтовый индекс',
|
|
164
|
+
'constructor.props.autocomplete.cc-name': 'Имя владельца карты',
|
|
165
|
+
'constructor.props.autocomplete.cc-given-name': 'Имя владельца карты',
|
|
166
|
+
'constructor.props.autocomplete.cc-additional-name': 'Отчество владельца карты',
|
|
167
|
+
'constructor.props.autocomplete.cc-family-name': 'Фамилия владельца карты',
|
|
168
|
+
'constructor.props.autocomplete.cc-number': 'Номер карты',
|
|
169
|
+
'constructor.props.autocomplete.cc-exp': 'Срок действия',
|
|
170
|
+
'constructor.props.autocomplete.cc-exp-month': 'Месяц срока действия',
|
|
171
|
+
'constructor.props.autocomplete.cc-exp-year': 'Год срока действия',
|
|
172
|
+
'constructor.props.autocomplete.cc-csc': 'Код безопасности',
|
|
173
|
+
'constructor.props.autocomplete.cc-type': 'Тип карты',
|
|
174
|
+
'constructor.props.autocomplete.transaction-currency': 'Валюта транзакции',
|
|
175
|
+
'constructor.props.autocomplete.transaction-amount': 'Сумма транзакции',
|
|
176
|
+
'constructor.props.autocomplete.language': 'Язык',
|
|
177
|
+
'constructor.props.autocomplete.bday': 'Дата рождения',
|
|
178
|
+
'constructor.props.autocomplete.bday-day': 'День рождения',
|
|
179
|
+
'constructor.props.autocomplete.bday-month': 'Месяц рождения',
|
|
180
|
+
'constructor.props.autocomplete.bday-year': 'Год рождения',
|
|
181
|
+
'constructor.props.autocomplete.sex': 'Пол',
|
|
182
|
+
'constructor.props.autocomplete.url': 'URL-адрес',
|
|
183
|
+
'constructor.props.autocomplete.photo': 'Фото',
|
|
184
|
+
'constructor.props.autocomplete.email': 'Адрес электронной почты',
|
|
185
|
+
'constructor.props.autocomplete.tel': 'Полный номер телефона',
|
|
186
|
+
'constructor.props.autocomplete.tel-country-code': 'Код страны телефона',
|
|
187
|
+
'constructor.props.autocomplete.tel-national': 'Национальный номер телефона',
|
|
188
|
+
'constructor.props.autocomplete.tel-area-code': 'Код региона/области',
|
|
189
|
+
'constructor.props.autocomplete.tel-local': 'Местный номер',
|
|
190
|
+
'constructor.props.autocomplete.tel-local-prefix': 'Префикс местного номера',
|
|
191
|
+
'constructor.props.autocomplete.tel-local-suffix': 'Суффикс местного номера',
|
|
192
|
+
'constructor.props.autocomplete.tel-extension': 'Добавочный номер',
|
|
193
|
+
'constructor.props.autocomplete.impp': 'Мессенджер',
|
|
194
|
+
'constructor.props.autocomplete.fax': 'Номер факса',
|
|
150
195
|
},
|
|
151
196
|
en: {},
|
|
152
197
|
zh: {},
|
package/dist/options.d.ts
CHANGED
|
@@ -95,6 +95,11 @@ export declare const optionsStore: import("svelte/store").Readable<{
|
|
|
95
95
|
value: string;
|
|
96
96
|
name: string;
|
|
97
97
|
}[];
|
|
98
|
+
AUTOCOMPLETE_CONSTRUCTOR_OPTIONS: {
|
|
99
|
+
id: string;
|
|
100
|
+
value: string;
|
|
101
|
+
name: string;
|
|
102
|
+
}[];
|
|
98
103
|
AUTOCOMPLETE_OPTIONS: {
|
|
99
104
|
id: string;
|
|
100
105
|
value: string;
|