poe-svelte-ui-lib 1.5.12 → 1.5.14

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.
@@ -186,7 +186,7 @@
186
186
 
187
187
  $effect(() => {
188
188
  const currentType = type
189
- if (type === 'logger') {
189
+ if (currentType === 'logger') {
190
190
  header = [
191
191
  {
192
192
  key: 'color',
@@ -99,9 +99,54 @@
99
99
  value={$optionsStore.TABLE_TYPE_OPTIONS.find((o) => o.value === component.properties.type)}
100
100
  onUpdate={(option) => {
101
101
  updateProperty('type', option.value as string, component, onPropertyChange)
102
- if (option.value === 'logger') updateProperty('dataBuffer.stashData', true, component, onPropertyChange)
103
- if (option.value === 'logger') updateProperty('dataBuffer.clearButton', true, component, onPropertyChange)
104
- if (option.value === 'table') updateProperty('dataBuffer.clearButton', false, component, onPropertyChange)
102
+ if (option.value === 'logger') {
103
+ updateProperty('dataBuffer.stashData', true, component, onPropertyChange)
104
+ updateProperty('dataBuffer.clearButton', true, component, onPropertyChange)
105
+
106
+ const headers = [
107
+ {
108
+ key: 'color',
109
+ label: { name: 'Type' },
110
+ width: '3rem',
111
+ } as ITableHeader<any>,
112
+ {
113
+ key: 'data',
114
+ label: { name: 'Data' },
115
+ width: 'calc(100% - 3rem)',
116
+ } as ITableHeader<any>,
117
+ ]
118
+ updateProperty('header', headers, component, onPropertyChange)
119
+ } else {
120
+ updateProperty('dataBuffer.clearButton', false, component, onPropertyChange)
121
+ const headers = [
122
+ {
123
+ key: 'id',
124
+ label: { name: 'ID' },
125
+ width: '40%',
126
+ sortable: true,
127
+ image: {
128
+ width: '0rem',
129
+ height: '0rem',
130
+ },
131
+ align: 'left',
132
+ } as ITableHeader<any>,
133
+ {
134
+ key: 'device',
135
+ label: { name: 'Device' },
136
+ width: '60%',
137
+ sortable: false,
138
+ image: {
139
+ width: '0rem',
140
+ height: '0rem',
141
+ },
142
+ align: 'left',
143
+ overflow: {
144
+ truncated: true,
145
+ },
146
+ } as ITableHeader<any>,
147
+ ]
148
+ updateProperty('header', headers, component, onPropertyChange)
149
+ }
105
150
  }}
106
151
  />
107
152
  </div>
@@ -142,12 +187,13 @@
142
187
  options={$optionsStore.TEXT_ALIGN_OPTIONS}
143
188
  onUpdate={(option) => updateProperty('label.class', twMerge(component.properties.label.class, option.value), component, onPropertyChange)}
144
189
  />
145
- {#if component.properties.stashData}
146
- <UI.Input
190
+ {#if component.properties.dataBuffer.stashData}
191
+ <UI.Select
147
192
  label={{ name: $t('constructor.props.table.buffersize') }}
148
- type="number"
149
- value={component.properties.dataBuffer.rowsAmmount}
150
- onUpdate={(value) => updateProperty('dataBuffer.rowsAmmount', value as string, component, onPropertyChange)}
193
+ type="buttons"
194
+ options={$optionsStore.BUFFER_SIFE_OPTIONS}
195
+ value={$optionsStore.BUFFER_SIFE_OPTIONS.find((o) => o.value === component.properties.dataBuffer.rowsAmmount)}
196
+ onUpdate={(value) => updateProperty('dataBuffer.rowsAmmount', value.value as number, component, onPropertyChange)}
151
197
  />
152
198
  {/if}
153
199
  </div>
@@ -376,8 +422,54 @@
376
422
  value={$optionsStore.TABLE_TYPE_OPTIONS.find((o) => o.value === component.properties.type)}
377
423
  onUpdate={(option) => {
378
424
  updateProperty('type', option.value as string, component, onPropertyChange)
379
- if (option.value === 'logger') updateProperty('dataBuffer.stashData', true, component, onPropertyChange)
380
- if (option.value === 'table') updateProperty('dataBuffer.clearButton', false, component, onPropertyChange)
425
+ if (option.value === 'logger') {
426
+ updateProperty('dataBuffer.stashData', true, component, onPropertyChange)
427
+ updateProperty('dataBuffer.clearButton', true, component, onPropertyChange)
428
+
429
+ const headers = [
430
+ {
431
+ key: 'color',
432
+ label: { name: 'Type' },
433
+ width: '3rem',
434
+ } as ITableHeader<any>,
435
+ {
436
+ key: 'data',
437
+ label: { name: 'Data' },
438
+ width: 'calc(100% - 3rem)',
439
+ } as ITableHeader<any>,
440
+ ]
441
+ updateProperty('header', headers, component, onPropertyChange)
442
+ } else {
443
+ updateProperty('dataBuffer.clearButton', false, component, onPropertyChange)
444
+ const headers = [
445
+ {
446
+ key: 'id',
447
+ label: { name: 'ID' },
448
+ width: '40%',
449
+ sortable: true,
450
+ image: {
451
+ width: '0rem',
452
+ height: '0rem',
453
+ },
454
+ align: 'left',
455
+ } as ITableHeader<any>,
456
+ {
457
+ key: 'device',
458
+ label: { name: 'Device' },
459
+ width: '60%',
460
+ sortable: false,
461
+ image: {
462
+ width: '0rem',
463
+ height: '0rem',
464
+ },
465
+ align: 'left',
466
+ overflow: {
467
+ truncated: true,
468
+ },
469
+ } as ITableHeader<any>,
470
+ ]
471
+ updateProperty('header', headers, component, onPropertyChange)
472
+ }
381
473
  }}
382
474
  />
383
475
  <div class="flex">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {