Change UserData in IKeyValue[]
This commit is contained in:
parent
d40cd8cf8e
commit
cd620e2c1f
5 changed files with 12 additions and 8 deletions
|
@ -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<string, string> userData;
|
||||
}
|
||||
}
|
|
@ -192,11 +192,7 @@ describe.concurrent('Models test suite', () => {
|
|||
],
|
||||
CustomSVG: 'string',
|
||||
Style: {},
|
||||
UserData: {
|
||||
additionalProp1: 'string',
|
||||
additionalProp2: 'string',
|
||||
additionalProp3: 'string'
|
||||
}
|
||||
UserData: []
|
||||
};
|
||||
|
||||
it('AvailableContainerModel', async() => {
|
||||
|
|
|
@ -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[]
|
||||
}
|
||||
|
|
|
@ -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[]
|
||||
}
|
||||
|
|
5
src/Interfaces/IKeyValue.ts
Normal file
5
src/Interfaces/IKeyValue.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
export interface IKeyValue {
|
||||
Key: string
|
||||
Value: string
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue