mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 19:50:42 +08:00
138 lines
4.5 KiB
XML
138 lines
4.5 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
|
<!--
|
||
|
|
BASIC LWC COMPONENT TEMPLATE - METADATA
|
||
|
|
|
||
|
|
This file configures where and how the component can be used.
|
||
|
|
|
||
|
|
targets: Where the component is available
|
||
|
|
targetConfigs: Configuration for each target
|
||
|
|
properties: Configurable attributes in App Builder
|
||
|
|
-->
|
||
|
|
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
||
|
|
<apiVersion>66.0</apiVersion>
|
||
|
|
<isExposed>true</isExposed>
|
||
|
|
<masterLabel>Basic Component</masterLabel>
|
||
|
|
<description>A reusable component that displays a list of records with loading, error, and empty states.</description>
|
||
|
|
|
||
|
|
<!-- Where this component can be used -->
|
||
|
|
<targets>
|
||
|
|
<!-- Standard Salesforce pages -->
|
||
|
|
<target>lightning__RecordPage</target>
|
||
|
|
<target>lightning__AppPage</target>
|
||
|
|
<target>lightning__HomePage</target>
|
||
|
|
|
||
|
|
<!-- Flow integration -->
|
||
|
|
<target>lightning__FlowScreen</target>
|
||
|
|
|
||
|
|
<!-- Experience Cloud (Communities) -->
|
||
|
|
<target>lightningCommunity__Page</target>
|
||
|
|
<target>lightningCommunity__Default</target>
|
||
|
|
|
||
|
|
<!-- Utility Bar -->
|
||
|
|
<target>lightning__UtilityBar</target>
|
||
|
|
</targets>
|
||
|
|
|
||
|
|
<!-- Configuration for each target -->
|
||
|
|
<targetConfigs>
|
||
|
|
<!-- Record Page Configuration -->
|
||
|
|
<targetConfig targets="lightning__RecordPage">
|
||
|
|
<!-- Limit to specific objects (optional) -->
|
||
|
|
<objects>
|
||
|
|
<object>Account</object>
|
||
|
|
<object>Contact</object>
|
||
|
|
<object>Opportunity</object>
|
||
|
|
</objects>
|
||
|
|
|
||
|
|
<!-- Configurable properties in App Builder -->
|
||
|
|
<property
|
||
|
|
name="title"
|
||
|
|
type="String"
|
||
|
|
label="Card Title"
|
||
|
|
description="Title displayed on the card header"
|
||
|
|
default="Related Records"/>
|
||
|
|
|
||
|
|
<property
|
||
|
|
name="maxRecords"
|
||
|
|
type="Integer"
|
||
|
|
label="Maximum Records"
|
||
|
|
description="Maximum number of records to display"
|
||
|
|
default="10"
|
||
|
|
min="1"
|
||
|
|
max="100"/>
|
||
|
|
|
||
|
|
<property
|
||
|
|
name="showRefreshButton"
|
||
|
|
type="Boolean"
|
||
|
|
label="Show Refresh Button"
|
||
|
|
description="Display the refresh button in the header"
|
||
|
|
default="true"/>
|
||
|
|
</targetConfig>
|
||
|
|
|
||
|
|
<!-- App Page / Home Page Configuration -->
|
||
|
|
<targetConfig targets="lightning__AppPage,lightning__HomePage">
|
||
|
|
<property
|
||
|
|
name="title"
|
||
|
|
type="String"
|
||
|
|
label="Card Title"
|
||
|
|
default="My Records"/>
|
||
|
|
|
||
|
|
<property
|
||
|
|
name="objectApiName"
|
||
|
|
type="String"
|
||
|
|
label="Object API Name"
|
||
|
|
description="API name of the object to display"
|
||
|
|
default="Account"
|
||
|
|
datasource="apex://ObjectPicklistProvider"/>
|
||
|
|
</targetConfig>
|
||
|
|
|
||
|
|
<!-- Flow Screen Configuration -->
|
||
|
|
<targetConfig targets="lightning__FlowScreen">
|
||
|
|
<!-- Input properties (from Flow to component) -->
|
||
|
|
<property
|
||
|
|
name="recordId"
|
||
|
|
type="String"
|
||
|
|
label="Record ID"
|
||
|
|
description="ID of the parent record"
|
||
|
|
role="inputOnly"/>
|
||
|
|
|
||
|
|
<property
|
||
|
|
name="title"
|
||
|
|
type="String"
|
||
|
|
label="Title"
|
||
|
|
role="inputOnly"
|
||
|
|
default="Select a Record"/>
|
||
|
|
|
||
|
|
<!-- Output properties (from component to Flow) -->
|
||
|
|
<property
|
||
|
|
name="selectedRecordId"
|
||
|
|
type="String"
|
||
|
|
label="Selected Record ID"
|
||
|
|
description="ID of the selected record"
|
||
|
|
role="outputOnly"/>
|
||
|
|
|
||
|
|
<property
|
||
|
|
name="selectedRecordName"
|
||
|
|
type="String"
|
||
|
|
label="Selected Record Name"
|
||
|
|
role="outputOnly"/>
|
||
|
|
</targetConfig>
|
||
|
|
|
||
|
|
<!-- Experience Cloud Configuration -->
|
||
|
|
<targetConfig targets="lightningCommunity__Default">
|
||
|
|
<property
|
||
|
|
name="title"
|
||
|
|
type="String"
|
||
|
|
label="Title"
|
||
|
|
default="Records"/>
|
||
|
|
|
||
|
|
<!-- Community-specific theme property -->
|
||
|
|
<property
|
||
|
|
name="variant"
|
||
|
|
type="String"
|
||
|
|
label="Visual Variant"
|
||
|
|
default="standard"
|
||
|
|
datasource="standard,compact,minimal"/>
|
||
|
|
</targetConfig>
|
||
|
|
</targetConfigs>
|
||
|
|
</LightningComponentBundle>
|