poe-svelte-ui-lib 1.1.21 → 1.2.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 +3 -3
- package/dist/FileAttach/FileAttach.svelte +0 -1
- package/dist/Graph/GraphProps.svelte +0 -2
- package/dist/{Accordion/IconsLib → IconsCatalog}/common.edit.svg +5 -4
- package/dist/{Accordion/IconsLib → IconsCatalog}/iconsLib.js +2 -2
- package/dist/{Accordion/IconsLib → IconsCatalog}/settings.debug.svg +1 -1
- package/dist/{Accordion/IconsLib → IconsCatalog}/settings.save.svg +5 -4
- package/dist/Input/Input.svelte +1 -1
- package/dist/Joystick/Joystick.svelte +97 -0
- package/dist/Joystick/Joystick.svelte.d.ts +4 -0
- package/dist/Joystick/JoystickProps.svelte +0 -0
- package/dist/Joystick/JoystickProps.svelte.d.ts +26 -0
- package/dist/ProgressBar/ProgressBar.svelte +4 -6
- package/dist/Table/Table.svelte +10 -6
- package/dist/Table/TableProps.svelte +223 -145
- package/dist/Tabs/Tabs.svelte +86 -0
- package/dist/Tabs/Tabs.svelte.d.ts +4 -0
- package/dist/Tabs/TabsProps.svelte +349 -0
- package/dist/Tabs/TabsProps.svelte.d.ts +11 -0
- package/dist/TextField/TextFieldProps.svelte +3 -9
- package/dist/{Accordion/icons.js → icons.js} +22 -22
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/locales/translations.js +8 -5
- package/dist/options.d.ts +10 -0
- package/dist/options.js +11 -0
- package/dist/types.d.ts +22 -6
- package/package.json +9 -9
- /package/dist/{Accordion/IconsLib → IconsCatalog}/access.card.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/access.key.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/access.lock.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.battery.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.block.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.list.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.search.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.trash.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/common.warning.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/iconsLib.d.ts +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/info.bell.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/info.clock.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/info.graph.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/info.info.svg +0 -0
- /package/dist/{Accordion/IconsLib/image.camera.svg → IconsCatalog/media.camera.svg} +0 -0
- /package/dist/{Accordion/IconsLib/image.movie.svg → IconsCatalog/media.movie.svg} +0 -0
- /package/dist/{Accordion/IconsLib/electronic.sound.svg → IconsCatalog/media.sound.svg} +0 -0
- /package/dist/{Accordion/IconsLib/image.webcam.svg → IconsCatalog/media.webcam.svg} +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.cellular.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.cloud.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.globe.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.link.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.radio.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.share.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/network.wifi.svg +0 -0
- /package/dist/{Accordion/IconsLib/electronic.board.svg → IconsCatalog/periphery.board.svg} +0 -0
- /package/dist/{Accordion/IconsLib/electronic.chip.svg → IconsCatalog/periphery.chip.svg} +0 -0
- /package/dist/{Accordion/IconsLib/electronic.magnit.svg → IconsCatalog/periphery.magnit.svg} +0 -0
- /package/dist/{Accordion/IconsLib/electronic.memory.svg → IconsCatalog/periphery.memory.svg} +0 -0
- /package/dist/{Accordion/IconsLib/electronic.volume.svg → IconsCatalog/periphery.volume.svg} +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/power.jeck.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/power.power.svg +0 -0
- /package/dist/{Accordion/IconsLib/control.point.svg → IconsCatalog/scenarios.point.svg} +0 -0
- /package/dist/{Accordion/IconsLib/control.speed.svg → IconsCatalog/scenarios.speed.svg} +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/settings.hammer.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/settings.list.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/settings.settings.svg +0 -0
- /package/dist/{Accordion/IconsLib → IconsCatalog}/settings.spanner.svg +0 -0
- /package/dist/{Accordion/IconsLib/electronic.terminal.svg → IconsCatalog/settings.terminal.svg} +0 -0
- /package/dist/{Accordion/icons.d.ts → icons.d.ts} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { updateProperty, type IAccordionProps, type UIComponent } from '../types'
|
|
5
5
|
import * as UI from '..'
|
|
6
6
|
import { optionsStore } from '../options'
|
|
7
|
-
import { ICONS } from '
|
|
7
|
+
import { ICONS } from '../icons'
|
|
8
8
|
import Modal from '../Modal.svelte'
|
|
9
9
|
import Button from '../Button/Button.svelte'
|
|
10
10
|
import CrossIcon from '../libIcons/CrossIcon.svelte'
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
65
65
|
<div class="relative mt-6 flex w-full gap-2">
|
|
66
|
-
<UI.Button content={{ name: '
|
|
66
|
+
<UI.Button content={{ name: $t('constructor.props.labelicon') }} onClick={() => (showIconLib = true)} />
|
|
67
67
|
{#if showIconLib}
|
|
68
68
|
<Modal bind:isOpen={showIconLib} wrapperClass="w-130">
|
|
69
69
|
{#snippet main()}
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
|
|
175
175
|
/>
|
|
176
176
|
<div class="relative mt-5 flex w-full gap-2">
|
|
177
|
-
<UI.Button content={{ name: '
|
|
177
|
+
<UI.Button content={{ name: $t('constructor.props.labelicon') }} onClick={() => (showIconLib = true)} />
|
|
178
178
|
{#if showIconLib}
|
|
179
179
|
<Modal bind:isOpen={showIconLib} wrapperClass="w-130">
|
|
180
180
|
{#snippet main()}
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
forConstructor?: boolean
|
|
15
15
|
}>()
|
|
16
16
|
|
|
17
|
-
console.log(component.properties.streamingData)
|
|
18
|
-
|
|
19
17
|
const DeviceVariables = getContext<{ id: string; value: string; name: string }[]>('DeviceVariables')
|
|
20
18
|
let VARIABLE_OPTIONS = $derived(DeviceVariables && Array.isArray(DeviceVariables) ? DeviceVariables : [])
|
|
21
19
|
</script>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
2
|
-
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"
|
|
2
|
+
>
|
|
3
|
+
<path
|
|
3
4
|
fill="none"
|
|
4
5
|
stroke="currentColor"
|
|
5
6
|
stroke-linecap="round"
|
|
6
7
|
stroke-linejoin="round"
|
|
7
8
|
stroke-width="1.5"
|
|
8
9
|
d="M14.44 5.78L4.198 16.02a2 2 0 0 0-.565 1.125l-.553 3.774l3.775-.553A2 2 0 0 0 7.98 19.8L18.22 9.56m-3.78-3.78l2.229-2.23a1.6 1.6 0 0 1 2.263 0l1.518 1.518a1.6 1.6 0 0 1 0 2.263l-2.23 2.23M14.44 5.78l3.78 3.78"
|
|
9
|
-
|
|
10
|
-
>
|
|
10
|
+
/>
|
|
11
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
const scanAllIcons = async () => {
|
|
4
|
-
const dirPath = 'src/lib/
|
|
4
|
+
const dirPath = 'src/lib/IconsCatalog';
|
|
5
5
|
const files = fs.readdirSync(dirPath);
|
|
6
6
|
const categories = {};
|
|
7
7
|
files
|
|
@@ -31,7 +31,7 @@ ${Object.entries(categories)
|
|
|
31
31
|
]
|
|
32
32
|
|
|
33
33
|
`;
|
|
34
|
-
fs.writeFileSync('src/lib/
|
|
34
|
+
fs.writeFileSync('src/lib/icons.ts', content);
|
|
35
35
|
console.log('icons.ts создан:', Object.keys(categories));
|
|
36
36
|
};
|
|
37
37
|
scanAllIcons();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
2
|
-
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"
|
|
2
|
+
>
|
|
3
|
+
<path
|
|
3
4
|
fill="currentColor"
|
|
4
5
|
d="M3 5.75A2.75 2.75 0 0 1 5.75 3h9.965a3.25 3.25 0 0 1 2.298.952l2.035 2.035c.61.61.952 1.437.952 2.299v9.964A2.75 2.75 0 0 1 18.25 21H5.75A2.75 2.75 0 0 1 3 18.25zM5.75 4.5c-.69 0-1.25.56-1.25 1.25v12.5c0 .69.56 1.25 1.25 1.25H6v-5.25A2.25 2.25 0 0 1 8.25 12h7.5A2.25 2.25 0 0 1 18 14.25v5.25h.25c.69 0 1.25-.56 1.25-1.25V8.286c0-.465-.184-.91-.513-1.238l-2.035-2.035a1.75 1.75 0 0 0-.952-.49V7.25a2.25 2.25 0 0 1-2.25 2.25h-4.5A2.25 2.25 0 0 1 7 7.25V4.5zm10.75 15v-5.25a.75.75 0 0 0-.75-.75h-7.5a.75.75 0 0 0-.75.75v5.25zm-8-15v2.75c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75V4.5z"
|
|
5
|
-
|
|
6
|
-
>
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
{#if showInfo}
|
|
224
224
|
<div
|
|
225
225
|
transition:fly={{ x: -15, duration: 250 }}
|
|
226
|
-
class="absolute top-
|
|
226
|
+
class="absolute top-5 left-10 z-50 w-auto -translate-y-1/2 rounded bg-(--container-color) px-2 py-1 shadow-lg"
|
|
227
227
|
>
|
|
228
228
|
{help?.info}
|
|
229
229
|
</div>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<!-- $lib/ElementsUI/ProgressBar.svelte -->
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { twMerge } from 'tailwind-merge'
|
|
4
|
+
import type { IProgressBarProps } from '../types'
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
id = crypto.randomUUID(),
|
|
8
|
+
wrapperClass = '',
|
|
9
|
+
label = { name: '', class: '' },
|
|
10
|
+
value = $bindable(0),
|
|
11
|
+
number = {
|
|
12
|
+
minNum: 0,
|
|
13
|
+
maxNum: 100,
|
|
14
|
+
units: '%',
|
|
15
|
+
},
|
|
16
|
+
}: IProgressBarProps = $props()
|
|
17
|
+
|
|
18
|
+
const directions = [
|
|
19
|
+
{ id: 'right', angle: 30.5, content: true },
|
|
20
|
+
{ id: 'bottom-right', angle: 58, content: false },
|
|
21
|
+
{ id: 'bottom', angle: 122, content: true },
|
|
22
|
+
{ id: 'bottom-left', angle: 149.5, content: false },
|
|
23
|
+
{ id: 'left', angle: 212, content: true },
|
|
24
|
+
{ id: 'top-left', angle: 239, content: false },
|
|
25
|
+
{ id: 'top', angle: 301, content: true },
|
|
26
|
+
{
|
|
27
|
+
id: 'top-right',
|
|
28
|
+
angle: 328,
|
|
29
|
+
content: false,
|
|
30
|
+
},
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
let sectorHeight = 2 * 5 * Math.sin(Math.PI / directions.length)
|
|
34
|
+
let clipPos = Math.cos(Math.PI / directions.length) * 100
|
|
35
|
+
let angle = 360 / directions.length
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div {id} class={twMerge(`bg-red relative flex w-full flex-col items-center`, wrapperClass)}>
|
|
39
|
+
{#if label.name}
|
|
40
|
+
<h5 class={twMerge(` w-full px-4 text-center`, label.class)}>{label.name}</h5>
|
|
41
|
+
{/if}
|
|
42
|
+
|
|
43
|
+
<div class="relative flex size-40 items-center justify-center rounded-full bg-(--bg-color) shadow-[0_0_20px_rgb(0_0_0_/0.25)]">
|
|
44
|
+
<div class="absolute h-full w-full overflow-hidden rounded-full">
|
|
45
|
+
{#each directions as direction, index}
|
|
46
|
+
<button class="pointer-events-none absolute top-1/2 left-1/2 block w-1/2 -translate-y-1/2 cursor-pointer" title="">
|
|
47
|
+
<span
|
|
48
|
+
class="relative flex w-full origin-left items-center justify-center pl-[60%] h-[{direction.content
|
|
49
|
+
? 2 * 5 * Math.sin((Math.PI * 65) / 360)
|
|
50
|
+
: 2 * 5 * Math.sin((Math.PI * 25) / 360)}rem] pointer-events-auto
|
|
51
|
+
{direction.content ? 'bg-(--bg-color)' : ''}
|
|
52
|
+
"
|
|
53
|
+
style="transform: rotate({angle * index}deg); clip-path: polygon(100% 0, {clipPos}% 0, 0 50%, {clipPos}% 100%, 100% 100%)"
|
|
54
|
+
role="application"
|
|
55
|
+
onmouseenter={(e) => (e.currentTarget.style.backgroundColor = 'color-mix(in srgb, var(--bg-color), var(--shadow-color) 20%)')}
|
|
56
|
+
onmouseleave={(e) => (e.currentTarget.style.backgroundColor = 'var(--bg-color)')}
|
|
57
|
+
>
|
|
58
|
+
{#if direction.content}
|
|
59
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"
|
|
60
|
+
><path
|
|
61
|
+
fill="currentColor"
|
|
62
|
+
d="M12.6 12L8.7 8.1q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.6 4.6q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.6 4.6q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7z"
|
|
63
|
+
/></svg
|
|
64
|
+
>
|
|
65
|
+
{/if}
|
|
66
|
+
</span>
|
|
67
|
+
</button>
|
|
68
|
+
{/each}
|
|
69
|
+
</div>
|
|
70
|
+
<div class=" pointer-events-none absolute h-full w-full overflow-hidden rounded-full">
|
|
71
|
+
{#each directions as direction, index}
|
|
72
|
+
<span
|
|
73
|
+
class=" absolute top-1/2 left-1/2 h-0 w-[52%] origin-left border-b border-(--bg-color) {index % 2 == 0
|
|
74
|
+
? 'shadow-[0_3px_5px_rgb(0_0_0_/0.5)] '
|
|
75
|
+
: 'shadow-[0_-3px_5px_rgb(0_0_0_/0.5)]'}"
|
|
76
|
+
style="transform: rotate({direction.angle}deg);"
|
|
77
|
+
>
|
|
78
|
+
</span>
|
|
79
|
+
{/each}
|
|
80
|
+
</div>
|
|
81
|
+
<div class="z-10 flex size-20 items-center justify-center rounded-full bg-(--bg-color) shadow-[0_0_15px_rgb(0_0_0_/0.25)]">
|
|
82
|
+
<button class="flex size-18 cursor-pointer items-center justify-center rounded-full bg-(--bg-color)" title=""
|
|
83
|
+
><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"
|
|
84
|
+
><path
|
|
85
|
+
fill="currentColor"
|
|
86
|
+
d="M6 19h3v-5q0-.425.288-.712T10 13h4q.425 0 .713.288T15 14v5h3v-9l-6-4.5L6 10zm-2 0v-9q0-.475.213-.9t.587-.7l6-4.5q.525-.4 1.2-.4t1.2.4l6 4.5q.375.275.588.7T20 10v9q0 .825-.588 1.413T18 21h-4q-.425 0-.712-.288T13 20v-5h-2v5q0 .425-.288.713T10 21H6q-.825 0-1.412-.587T4 19m8-6.75"
|
|
87
|
+
/></svg
|
|
88
|
+
></button
|
|
89
|
+
>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<!-- {direction.content ? 2 * 6.25 * Math.sin((Math.PI * 65) / 360) : 2 * 6.25 * Math.sin((Math.PI * 25) / 360)} -->
|
|
94
|
+
<!-- angle / 2 + angle * index -->
|
|
95
|
+
<!-- ? 'shadow-[0_-2px_5px_rgb(254_202_202)] '
|
|
96
|
+
: 'shadow-[0_2px_5px_rgb(254_202_202)]'}" -->
|
|
97
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default JoystickProps;
|
|
2
|
+
type JoystickProps = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const JoystickProps: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
return Math.max(min, Math.min(max, value))
|
|
25
25
|
} else if (typeof value === 'string') {
|
|
26
26
|
const parsedValue = parseFloat(value)
|
|
27
|
-
console.log(value)
|
|
28
27
|
if (!isNaN(parsedValue)) {
|
|
29
28
|
return Math.max(min, Math.min(max, parsedValue))
|
|
30
29
|
}
|
|
@@ -46,11 +45,10 @@
|
|
|
46
45
|
<h5 class={twMerge(` w-full px-4 text-center`, label.class)}>{label.name}</h5>
|
|
47
46
|
{/if}
|
|
48
47
|
|
|
49
|
-
<div class="flex w-full
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
48
|
+
<div class="flex h-7 w-full items-center gap-2 rounded-full bg-(--bg-color) px-2">
|
|
49
|
+
<span class="m-auto font-semibold">{numericValue?.toFixed(2)}{number.units}</span>
|
|
50
|
+
<div class="relative my-auto h-3.5 w-[85%] rounded-full bg-(--back-color)/40">
|
|
51
|
+
<div class="absolute top-0 left-0 flex h-full rounded-full bg-(--field-color)" style="width: {progressPercent()}%;"></div>
|
|
54
52
|
</div>
|
|
55
53
|
</div>
|
|
56
54
|
</div>
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
rawData: text,
|
|
99
99
|
formattedData: formatting ? formatting(text) : (text ?? ''),
|
|
100
100
|
}
|
|
101
|
-
// console.log(modalData)
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
const showTooltip = (event: MouseEvent, text: string, formatting?: (text: string) => string) => {
|
|
@@ -186,7 +185,7 @@
|
|
|
186
185
|
</button>
|
|
187
186
|
{/each}
|
|
188
187
|
</div>
|
|
189
|
-
{:else if column.image}
|
|
188
|
+
{:else if column.image?.src || column.image?.defaultIcon}
|
|
190
189
|
<div
|
|
191
190
|
class="flex items-center justify-center"
|
|
192
191
|
style={`width: ${column.image.width || '5rem'}; height: ${column.image.height || '5rem'};`}
|
|
@@ -199,14 +198,16 @@
|
|
|
199
198
|
loading="lazy"
|
|
200
199
|
/>
|
|
201
200
|
{:else if column.image.defaultIcon}
|
|
202
|
-
|
|
201
|
+
{#if typeof column.image.defaultIcon === 'string'}
|
|
202
|
+
{@html column.image.defaultIcon}
|
|
203
|
+
{:else}
|
|
204
|
+
<column.image.defaultIcon />
|
|
205
|
+
{/if}
|
|
203
206
|
{/if}
|
|
204
207
|
</div>
|
|
205
208
|
{:else}
|
|
206
209
|
<div
|
|
207
|
-
class="w-full max-w-full wrap-break-word {column.overflow?.truncated
|
|
208
|
-
? 'overflow-hidden text-ellipsis whitespace-nowrap'
|
|
209
|
-
: 'whitespace-normal '}"
|
|
210
|
+
class=" w-full max-w-full wrap-break-word {column.overflow?.truncated ? 'truncate' : ' whitespace-normal'}"
|
|
210
211
|
onmouseenter={column.overflow?.truncated ? (e) => showTooltip(e, row[column.key], column.overflow?.formatting) : undefined}
|
|
211
212
|
onmouseleave={column.overflow?.truncated ? hideTooltip : undefined}
|
|
212
213
|
onmousemove={column.overflow?.truncated
|
|
@@ -232,6 +233,9 @@
|
|
|
232
233
|
{@html row[column.key]}
|
|
233
234
|
{/if}
|
|
234
235
|
</div>
|
|
236
|
+
<!-- {#if column.overflow?.truncated}
|
|
237
|
+
<div class="whitespace-nowrap">{row[column.key].slice(-5)}</div>
|
|
238
|
+
{/if} -->
|
|
235
239
|
|
|
236
240
|
{#if column.overflow?.copy}
|
|
237
241
|
<button
|