File

platform-components-ng/projects/platform-components-lib/src/lib/components/meta/qpp-meta-info.ts

Description

Qpp meta info

Index

Properties
Methods

Constructor

constructor(metaInfo: literal type)
Parameters :
Name Type Optional
metaInfo literal type No

Properties

additionalInfo
Type : any
Default value : {}
category
Type : META_CATEGORY
component
Type : QppMetaAttributeComponentTypes | null
Default value : null
dataType
Type : null
Default value : null
defaultValue
Type : string[]
Default value : []
disabled
Default value : false
disableHighlights
Default value : false
displayText
Type : string
endpoint
Type : boolean
filterFunction
Type : Function
friendlyText
Type : string
hidden
Default value : false
inputFieldValue
Type : string
insideReference
Type : boolean
items
Type : QppMetaInfo[]
Default value : []
lock
Type : boolean
mandatory
Default value : false
members
Type : QppMetaCollectionMember[]
Default value : []
name
Type : string
oldRawValue
Type : any
oldSerializeValue
Type : string[]
Default value : []
oldValue
Type : string[]
Default value : []
params
Type : null
Default value : null
parent
Type : QppMetaInfo
possibleValueResolver$
Type : Observable<Object[]>
possibleValues
Type : string[]
priority
Type : number
rawValue
Type : any
readOnly
Type : boolean
scope
Type : Object
serializeField
Type : string
serializeValue
Type : string[]
Default value : []
show
Default value : true
showInCanvas
Default value : false
source
Type : string
sourceValue
Type : string[]
Default value : []
type
Type : "attrib" | "attrib-multivalue" | "group" | "collection" | "meta"
value
Type : string[]
Default value : []
valueField
Type : string

Methods

canBeDisabled
canBeDisabled()
Returns : boolean
Static containsAnyAttribute
containsAnyAttribute(meta: QppAbstractMeta, ignoreAttribute: string[])

Checks if the given meta object or any of its nested groups or collections contain any attributes.

Parameters :
Name Type Optional Description
meta QppAbstractMeta No
  • The meta object to check.
ignoreAttribute string[] No
Returns : boolean

true if the meta object or any of its nested groups or collections contain any attributes, otherwise false.

containsAnyValue
containsAnyValue()

Checks if any of the properties of QppMetaInfo object contains a value.

Returns : any

true if any of the properties contains a value, false otherwise.

Static from
from(metaDefinition, metaValue, metaFriendlyNames, readonly, componentUri?)

Converted Meta definition and meta value to MetaInfo which can be feed to angular componentns. In this process, meta values are applied to meta definition and then converted to Meta Info object.

Parameters :
Name Optional Description
metaDefinition No

Meta definition object

metaValue No

meta value object corresponding to meta definition.

metaFriendlyNames No
readonly No
componentUri Yes
Returns : QppMetaInfo
Static fromJSON
fromJSON(qppMetaInfo: any)

Convert plain QppMetaInfo JSON object to QppMetaInfo class Instance.

Parameters :
Name Type Optional Description
qppMetaInfo any No

plain QppMetaInfo JSON object

Returns : any

QppMetaInfo class Instance

getClonnedCopy
getClonnedCopy(keysToExclude: [])

Creates a deep clone of the current object, excluding specified keys.

Parameters :
Name Type Optional Default value Description
keysToExclude [] No ["parent"]
  • An array of keys to exclude from the cloning process. Defaults to ["parent"].
Returns : any

A deep clone of the current object with the specified keys excluded.

getMetaByCategory
getMetaByCategory(category: META_CATEGORY, flattenMeta, metaInfo: QppMetaInfo)

Retrieves metadata information filtered by the specified category.

Parameters :
Name Type Optional Default value Description
category META_CATEGORY No
  • The metadata category to filter by
flattenMeta No true
  • If true, returns a flattened array of all matching metadata items. If false, preserves the hierarchical structure with filtered content.
metaInfo QppMetaInfo No this
  • The metadata object to search within. Defaults to the current instance.
Returns : QppMetaInfo[]

An array of QppMetaInfo objects that match the specified category. When flattenMeta is true, returns all matching items in a flat structure. When flattenMeta is false, returns cloned metadata objects maintaining hierarchy but containing only items and members that match the category.

getMetaByFriendlyText
getMetaByFriendlyText(friendlyText: string)

Retrieves metadata information by its friendly text.

Parameters :
Name Type Optional Description
friendlyText string No

Friendly text of meta info

Returns : QppMetaInfo | null

The metadata information, or null if not found.

getMetaByName
getMetaByName(name: string)

Retrieves metadata information by its name.

Parameters :
Name Type Optional Description
name string No

Name of meta info

Returns : QppMetaInfo | null

The metadata information, or null if not found.

getMetaValueByFriendlyText
getMetaValueByFriendlyText(friendlyText: string)

Retrieves the value of the metadata item by its friendly text.

Parameters :
Name Type Optional Description
friendlyText string No

Friendly text of meta info

Returns : string[]

The value of the metadata item, or an empty array if not found.

getMetaValueByName
getMetaValueByName(name: string)

Retrieves the value of the metadata item by its name.

Parameters :
Name Type Optional Description
name string No

Name of meta info

Returns : string[]

The value of the metadata item, or an empty array if not found.

getParentHierarchy
getParentHierarchy()

Retrieves the parent hierarchy of the current object.

Returns : any

The parent hierarchy as a string.

getValueByDisplayName
getValueByDisplayName(displayName: string)

Retrieves the value of the metadata item by its display name.

Parameters :
Name Type Optional Description
displayName string No

The display name of the metadata item.

Returns : string[]

The value of the metadata item, or an empty array if not found.

isSameSourceValue
isSameSourceValue(attributeMetaInfo: QppMetaInfo)

Checks if the source value of the attribute meta info is the same as the value.

Parameters :
Name Type Optional Description
attributeMetaInfo QppMetaInfo No
  • The attribute meta info to compare.
Returns : any

True if the source value is the same as the value, false otherwise.

isValuePresent
isValuePresent()

Checks if the value property is present and contains at least one non-empty string.

Returns : boolean

true if the value property is present and contains at least one non-empty string, false otherwise.

registerValueChange
registerValueChange()

Register value change

Returns : any

Observable

setMetaValueByFriendlyText
setMetaValueByFriendlyText(friendlyText: string, value: string[])

Sets the value of a metadata item by its friendly text.

Parameters :
Name Type Optional Description
friendlyText string No

The friendly text of the metadata item.

value string[] No

The new value to set.

Returns : void
setMetaValueByName
setMetaValueByName(name: string, value: string[])

Sets the value of a metadata item by its name.

Parameters :
Name Type Optional Description
name string No

The name of the metadata item.

value string[] No

The new value to set.

Returns : void
setValue
setValue(newValue)

Set value

Parameters :
Name Optional Description
newValue No

New value

Returns : void

void

toJSON
toJSON()

Convert class instance to a plain JSON object.

Returns : any

qppMetaInfo Plain JSON object

toMetaObject
toMetaObject()

Converted Meta info object to Meta value object that can be stored in AUX data using MetadataManager APIs.

Returns : QppMeta

Meta

result-matching ""

    No results matching ""