poe-svelte-ui-lib 1.2.24 → 1.2.25
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 +8 -1
- package/dist/Accordion/AccordionProps.svelte.d.ts +1 -1
- package/dist/Button/ButtonProps.svelte +1 -1
- package/dist/Button/ButtonProps.svelte.d.ts +1 -1
- package/dist/ColorPicker/ColorPickerProps.svelte +1 -1
- package/dist/ColorPicker/ColorPickerProps.svelte.d.ts +1 -1
- package/dist/FileAttach/FileAttachProps.svelte +1 -1
- package/dist/FileAttach/FileAttachProps.svelte.d.ts +1 -1
- package/dist/Graph/GraphProps.svelte +1 -1
- package/dist/Graph/GraphProps.svelte.d.ts +1 -1
- package/dist/Input/InputProps.svelte +1 -1
- package/dist/Input/InputProps.svelte.d.ts +1 -1
- package/dist/ProgressBar/ProgressBarProps.svelte +1 -1
- package/dist/ProgressBar/ProgressBarProps.svelte.d.ts +1 -1
- package/dist/Select/SelectProps.svelte +2 -1
- package/dist/Select/SelectProps.svelte.d.ts +1 -1
- package/dist/Slider/SliderProps.svelte +1 -1
- package/dist/Slider/SliderProps.svelte.d.ts +1 -1
- package/dist/Switch/Switch.svelte +1 -1
- package/dist/Switch/SwitchProps.svelte +3 -2
- package/dist/Switch/SwitchProps.svelte.d.ts +1 -1
- package/dist/Table/TableProps.svelte +1 -1
- package/dist/Table/TableProps.svelte.d.ts +1 -1
- package/dist/Tabs/TabsProps.svelte +1 -1
- package/dist/Tabs/TabsProps.svelte.d.ts +1 -1
- package/dist/TextField/TextFieldProps.svelte +1 -1
- package/dist/TextField/TextFieldProps.svelte.d.ts +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.js +2 -2
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
forConstructor = true,
|
|
16
16
|
} = $props<{
|
|
17
17
|
component: UIComponent & { properties: Partial<IAccordionProps> }
|
|
18
|
-
onPropertyChange: (value
|
|
18
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
19
19
|
forConstructor?: boolean
|
|
20
20
|
}>()
|
|
21
21
|
|
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
{#if forConstructor}
|
|
49
49
|
<div class="flex items-center justify-center gap-8">
|
|
50
50
|
<div class="flex w-1/3 flex-col items-center px-2">
|
|
51
|
+
<UI.Select
|
|
52
|
+
label={{ name: $t('constructor.props.icon.access') }}
|
|
53
|
+
type="buttons"
|
|
54
|
+
options={$optionsStore.ACCESS_OPTION}
|
|
55
|
+
value={$optionsStore.ACCESS_OPTION.find((o) => o.value === component.access)}
|
|
56
|
+
onUpdate={(option) => onPropertyChange(null, null, option.value)}
|
|
57
|
+
/>
|
|
51
58
|
<UI.Input
|
|
52
59
|
label={{ name: $t('constructor.props.label') }}
|
|
53
60
|
value={component.properties.label.name}
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IAccordionProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const AccordionProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IButtonProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IButtonProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ButtonProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IColorPickerProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IColorPickerProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ColorPickerProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IFileInputProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
</script>
|
|
@@ -4,7 +4,7 @@ type $$ComponentProps = {
|
|
|
4
4
|
component: UIComponent & {
|
|
5
5
|
properties: Partial<IFileInputProps>;
|
|
6
6
|
};
|
|
7
|
-
onPropertyChange: (value
|
|
7
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
8
8
|
forConstructor?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const FileAttachProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
forConstructor = true,
|
|
11
11
|
} = $props<{
|
|
12
12
|
component: UIComponent & { properties: Partial<IGraphProps> }
|
|
13
|
-
onPropertyChange: (value
|
|
13
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
14
14
|
forConstructor?: boolean
|
|
15
15
|
}>()
|
|
16
16
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IGraphProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const GraphProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IInputProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IInputProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const InputProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<IProgressBarProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<IProgressBarProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const ProgressBarProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
forConstructor = true,
|
|
15
15
|
} = $props<{
|
|
16
16
|
component: UIComponent & { properties: Partial<ISelectProps> }
|
|
17
|
-
onPropertyChange: (value
|
|
17
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
18
18
|
forConstructor?: boolean
|
|
19
19
|
}>()
|
|
20
20
|
|
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
label={{ name: $t('constructor.props.optionvalue') }}
|
|
230
230
|
wrapperClass="!w-3/10"
|
|
231
231
|
value={option.value}
|
|
232
|
+
readonly={component.properties.bitMode}
|
|
232
233
|
type={currentValueType.value}
|
|
233
234
|
onUpdate={(value) => {
|
|
234
235
|
const options = [...(component.properties?.options || [])]
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ISelectProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const SelectProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<ISliderProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ISliderProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const SliderProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
{#if label.name}
|
|
58
58
|
<h5 class={twMerge(`w-full px-4 text-center`, label.class)}>{label.name}</h5>
|
|
59
59
|
{/if}
|
|
60
|
-
<div class="flex w-full flex-wrap justify-
|
|
60
|
+
<div class="flex w-full flex-wrap items-end justify-around gap-5">
|
|
61
61
|
{#each localOptions as option, index}
|
|
62
62
|
<div class={twMerge(`bg-blue flex flex-col`, option.class)}>
|
|
63
63
|
{#if option.name}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
forConstructor = true,
|
|
15
15
|
} = $props<{
|
|
16
16
|
component: UIComponent & { properties: Partial<ISwitchProps> }
|
|
17
|
-
onPropertyChange: (value
|
|
17
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
18
18
|
forConstructor?: boolean
|
|
19
19
|
}>()
|
|
20
20
|
const DeviceVariables = getContext<{ id: string; value: string; name: string }[]>('DeviceVariables')
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
onClick={() => {
|
|
134
134
|
const newOption: ISelectOption = {
|
|
135
135
|
id: crypto.randomUUID(),
|
|
136
|
-
name:
|
|
136
|
+
name: component.properties?.options.length,
|
|
137
137
|
value: component.properties?.options.length,
|
|
138
138
|
class: 'bg-blue',
|
|
139
139
|
}
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
label={{ name: $t('constructor.props.optionname') }}
|
|
150
150
|
wrapperClass="!w-3/10"
|
|
151
151
|
value={option.name}
|
|
152
|
+
maxlength={4}
|
|
152
153
|
onUpdate={(value) => {
|
|
153
154
|
const options = [...(component.properties?.options || [])]
|
|
154
155
|
options[index]['name'] = value
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ISwitchProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const SwitchProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
forConstructor = true,
|
|
18
18
|
} = $props<{
|
|
19
19
|
component: UIComponent & { properties: Partial<ITableProps<object>> }
|
|
20
|
-
onPropertyChange: (value
|
|
20
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
21
21
|
forConstructor?: boolean
|
|
22
22
|
}>()
|
|
23
23
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ITableProps<object>>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const TableProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
forConstructor = true,
|
|
18
18
|
} = $props<{
|
|
19
19
|
component: UIComponent & { properties: Partial<ITabsProps> }
|
|
20
|
-
onPropertyChange: (value
|
|
20
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
21
21
|
forConstructor?: boolean
|
|
22
22
|
}>()
|
|
23
23
|
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ITabsProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const TabsProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
forConstructor = true,
|
|
13
13
|
} = $props<{
|
|
14
14
|
component: UIComponent & { properties: Partial<ITextFieldProps> }
|
|
15
|
-
onPropertyChange: (value
|
|
15
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void
|
|
16
16
|
forConstructor?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
const DeviceVariables = getContext<{ id: string; value: string; name: string }[]>('DeviceVariables')
|
|
@@ -3,7 +3,7 @@ type $$ComponentProps = {
|
|
|
3
3
|
component: UIComponent & {
|
|
4
4
|
properties: Partial<ITextFieldProps>;
|
|
5
5
|
};
|
|
6
|
-
onPropertyChange: (value
|
|
6
|
+
onPropertyChange: (value?: string | object, name?: string, access?: string) => void;
|
|
7
7
|
forConstructor?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const TextFieldProps: import("svelte").Component<$$ComponentProps, {}, "">;
|
package/dist/types.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import type { Writable } from 'svelte/store';
|
|
|
3
3
|
import type { IFileInputProps } from './FileAttach/FileAttach.svelte';
|
|
4
4
|
export declare const updateProperty: (path: string, value: string | number | boolean | object | string[], component: UIComponent & {
|
|
5
5
|
properties: Partial<UIComponent["properties"]>;
|
|
6
|
-
}, onPropertyChange: (value
|
|
6
|
+
}, onPropertyChange: (value?: string | object, name?: string, access?: string) => void) => void;
|
|
7
7
|
export interface UIComponent {
|
|
8
8
|
id: string;
|
|
9
9
|
name?: string;
|
|
10
|
+
access?: 'full' | 'viewOnly' | 'hidden';
|
|
10
11
|
type: 'Button' | 'Accordion' | 'Input' | 'Select' | 'Switch' | 'ColorPicker' | 'Slider' | 'TextField' | 'Joystick' | 'ProgressBar' | 'Graph' | 'Table' | 'Tabs' | 'FileAttach';
|
|
11
12
|
properties: IAccordionProps | IButtonProps | IInputProps | ISelectProps | ISwitchProps | IColorPickerProps | ISliderProps | ITextFieldProps | IProgressBarProps | IGraphProps | ITableProps<object> | ITabsProps | IFileInputProps | IJoystickProps;
|
|
12
13
|
position: Position;
|
package/dist/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const updateProperty = (path, value, component, onPropertyChange
|
|
1
|
+
export const updateProperty = (path, value, component, onPropertyChange) => {
|
|
2
2
|
const newProperties = JSON.parse(JSON.stringify(component.properties));
|
|
3
3
|
const parts = path.split('.');
|
|
4
4
|
let obj = newProperties;
|
|
@@ -9,5 +9,5 @@ export const updateProperty = (path, value, component, onPropertyChange, name) =
|
|
|
9
9
|
obj = obj[part];
|
|
10
10
|
}
|
|
11
11
|
obj[parts[parts.length - 1]] = value;
|
|
12
|
-
onPropertyChange(newProperties
|
|
12
|
+
onPropertyChange(newProperties);
|
|
13
13
|
};
|