Component:DataFeedItemMapper: Difference between revisions

From Resonite Wiki
Automated: update DeDuplicate
add info
Line 3: Line 3:
|Name=Data Feed Item Mapper
|Name=Data Feed Item Mapper
}}
}}
{{stub}}
The DataFeedItemMapper allows you to define which data feed items map to which UI templates.
The DataFeedItemMapper allows you to define which data feed items map to which UI templates.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Mappings|{{RootFieldType|SyncList`1|[[#ItemMapping|ItemMapping]]}}|TypeAdv0=true|
|Mappings|{{RootFieldType|SyncList`1|[[#ItemMapping|ItemMapping]]}}|TypeAdv0=true| A list of item Mappings to map data feed item types to Feed Templates.
}}
}}


== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|OnSetupTemplate()|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]]: button, [[Type:ButtonEventData|ButtonEventData]]: data>|
|OnSetupTemplate()|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]]: button, [[Type:ButtonEventData|ButtonEventData]]: data>| Set up a basic settup with this component with a bunch of example UIs.
}}
 
== ItemMapping ==
{{Table TypeFields
|ItemType|{{RootFieldType|SyncType}}|TypeAdv0=true| The type to map to a template. The type coming from a data feed usually is based on the class DataFeedItem.
|GenericReplacementTypes|{{RootFieldType|SyncTypeList}}|TypeAdv1=true| If <code>ItemType</code> is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
|Template|'''[[Component:FeedItemInterface|FeedItemInterface]]'''|TypeAdv2=true| The template to duplicate when matched with this item mapping.
}}
}}


== Behavior ==
== Usage ==


This component will use the item mappings defined in the Mappings list to match specific [[Type:Type|Types]] of data feed items to corresponding feed item interface templates.
This component will use the item mappings defined in the Mappings list to match specific [[Type:Type|Types]] of data feed items to corresponding feed item interface templates.
Line 28: Line 33:
[[Category:Components{{#translation:}}|Data Feed Item Mapper]]
[[Category:Components{{#translation:}}|Data Feed Item Mapper]]
[[Category:Components With Nested Types{{#translation:}}|Data Feed Item Mapper]]
[[Category:Components With Nested Types{{#translation:}}|Data Feed Item Mapper]]
[[Category:ComponentStubs]]

Revision as of 06:12, 12 January 2025

Component image 
Data Feed Item Mapper component as seen in the Scene Inspector

The DataFeedItemMapper allows you to define which data feed items map to which UI templates.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
Mappings list of ItemMapping A list of item Mappings to map data feed item types to Feed Templates.

Sync Delegates

Lua error in mw.text.lua at line 25: bad argument #1 to 'match' (string expected, got nil).
Triggers
Method Name Method type and Arguments. Is the method hidden? Description

ItemMapping

Fields
Name Type Description
ItemType direct SyncType The type to map to a template. The type coming from a data feed usually is based on the class DataFeedItem.
GenericReplacementTypes list of SyncType If ItemType is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
Template FeedItemInterface The template to duplicate when matched with this item mapping.

Usage

This component will use the item mappings defined in the Mappings list to match specific Types of data feed items to corresponding feed item interface templates.

Examples

See Also