diff --git a/csharp/SVGLDLibs/SVGLDLibs/Models/ContainerProperties.cs b/csharp/SVGLDLibs/SVGLDLibs/Models/ContainerProperties.cs index e973393..27bd9ab 100644 --- a/csharp/SVGLDLibs/SVGLDLibs/Models/ContainerProperties.cs +++ b/csharp/SVGLDLibs/SVGLDLibs/Models/ContainerProperties.cs @@ -1,4 +1,5 @@ using System.Runtime.Serialization; +using System.Collections.Generic; namespace SVGLDLibs.Models { @@ -149,6 +150,6 @@ namespace SVGLDLibs.Models * User data that can be used for data storage or custom SVG */ [DataMember(EmitDefaultValue = false)] - public object userData; + public Dictionary userData; } } \ No newline at end of file diff --git a/src/Components/API/api.test.tsx b/src/Components/API/api.test.tsx index cf8ae3f..f8d01e5 100644 --- a/src/Components/API/api.test.tsx +++ b/src/Components/API/api.test.tsx @@ -192,11 +192,7 @@ describe.concurrent('Models test suite', () => { ], CustomSVG: 'string', Style: {}, - UserData: { - additionalProp1: 'string', - additionalProp2: 'string', - additionalProp3: 'string' - } + UserData: [] }; it('AvailableContainerModel', async() => { diff --git a/src/Interfaces/IAvailableContainer.ts b/src/Interfaces/IAvailableContainer.ts index c973d41..a4067e3 100644 --- a/src/Interfaces/IAvailableContainer.ts +++ b/src/Interfaces/IAvailableContainer.ts @@ -6,6 +6,7 @@ import { IAction } from './IAction'; import { IMargin } from './IMargin'; import { Orientation } from '../Enums/Orientation'; import { Position } from '../Enums/Position'; +import { IKeyValue } from './IKeyValue'; /** Model of available container used in application configuration */ export interface IAvailableContainer { @@ -161,5 +162,5 @@ export interface IAvailableContainer { * (optional) * User data that can be used for data storage or custom SVG */ - UserData?: object + UserData?: IKeyValue[] } diff --git a/src/Interfaces/IContainerProperties.ts b/src/Interfaces/IContainerProperties.ts index 11ae73f..35b1db7 100644 --- a/src/Interfaces/IContainerProperties.ts +++ b/src/Interfaces/IContainerProperties.ts @@ -3,6 +3,7 @@ import { PositionReference } from '../Enums/PositionReference'; import { IMargin } from './IMargin'; import { Orientation } from '../Enums/Orientation'; import { Position } from '../Enums/Position'; +import { IKeyValue } from './IKeyValue'; /** * Properties of a container @@ -122,5 +123,5 @@ export interface IContainerProperties { * (optional) * User data that can be used for data storage or custom SVG */ - userData?: object + userData?: IKeyValue[] } diff --git a/src/Interfaces/IKeyValue.ts b/src/Interfaces/IKeyValue.ts new file mode 100644 index 0000000..06a7b0c --- /dev/null +++ b/src/Interfaces/IKeyValue.ts @@ -0,0 +1,5 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +export interface IKeyValue { + Key: string + Value: string +}