File

src/lib/schema.service.ts

Index

Methods

Methods

convertDataToLabelData
convertDataToLabelData(fields: ILabelField[], data: object[], select?: string)

Convert data matching label fields (ILabelField) to a data that can be displayed im the Label Designer.

Parameters :
Name Type Optional Description
fields ILabelField[] No
data object[] No
select string Yes

level to choose as a base in multidimensional arrays of objects. If there are levels under this only the first item will be picked. If there is no value given then the root will be used and only one item from arrays beneath it will be selected

Returns : ILabelData[]
convertSchemaDataToLabelData
convertSchemaDataToLabelData(schema: any, data: object[], select?: string, options?: ISchemaOptions)

Convert data matching schema to a data that can be displayed in the Label Designer.

Parameters :
Name Type Optional Description
schema any No
data object[] No
select string Yes

level to choose as a base in multidimensional arrays of objects. If there are levels under this only the first item will be picked. If there is no value given then the root will be used and only one item from arrays beneath it will be selected

options ISchemaOptions Yes
Returns : ILabelData[]
schemaToAvailableFields
schemaToAvailableFields(schema: any, base?: ILabelField[], options?: ISchemaOptions)

Convert json schema to list of label fields. This list can be used for the LabelDesigner components availableFields.

Parameters :
Name Type Optional
schema any No
base ILabelField[] Yes
options ISchemaOptions Yes
Returns : ILabelField[]

result-matching ""

    No results matching ""