Skip to content

Commit

Permalink
feat: support lwc-record-picker (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxuanzhangsfdx authored Jul 12, 2024
1 parent b8417d8 commit 2c40ded
Show file tree
Hide file tree
Showing 3 changed files with 360 additions and 0 deletions.
153 changes: 153 additions & 0 deletions packages/aura-language-server/src/resources/lwc-standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,159 @@
],
"description": "Displays a phone number as a hyperlink with the tel: URL scheme."
},
"lightning-record-picker": {
"type": "module",
"namespace": "lightning",
"attributes": [
{
"name": "disabled",
"type": "BOOLEAN",
"description": "If present, the component is disabled and you can't interact with it.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "display-info",
"type": "",
"description": "The display configuration used to customize the way retrieved records are presented.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "field-level-help",
"type": "STRING",
"description": "Help text detailing the purpose and function of the record picker, displayed on hover for desktop and on click for mobile",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "filter",
"type": "",
"description": "The filter applied to the retrieved records.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "label",
"type": "STRING",
"description": "The text label for the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": true
},
{
"name": "matching-info",
"type": "",
"description": "The matching configuration to customize the fields used to match the search results to the search term entered by the user.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "message-when-bad-input",
"type": "STRING",
"description": "The error message displayed when the user enters a search term in the input but doesn't select an option.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "object-api-name",
"type": "STRING",
"description": "The API name of the object for the retrieved records.",
"access": "global",
"parent": "lightning-record-picker",
"required": true
},
{
"name": "placeholder",
"type": "STRING",
"description": "The text displayed when the input is empty to prompt the user to enter a search term.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "required",
"type": "BOOLEAN",
"description": "If present, specifies that a user must select a record. If no record is selected, the record picker is in an invalid state.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "value",
"type": "STRING",
"description": "The ID of the record that is selected in the record picker.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "variant",
"type": "STRING",
"description": "The variant changes the appearance of the component. The component displays the label above the combobox by default. Specify variant=\"label-hidden\" to hide the label but make it available to assistive technology. The only variant is label-hidden.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
}
],
"methods": [
{
"name": "blur",
"type": "",
"description": "Remove the focus of the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "checkValidity",
"type": "",
"description": "Check if the component is in a valid state.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "clearSelection",
"type": "",
"description": "Clears the selected record.\nThis method does not clear the search term or refresh the validity message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "focus",
"type": "",
"description": "Set the focus of the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "reportValidity",
"type": "",
"description": "Check if the component is in a valid state and refresh the validity message.\nIf the component is valid, it clears the validity error message.\nIf the component is invalid, it displays the validity error message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "setCustomValidity",
"type": "",
"description": "Set a custom validity error message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
}
],
"description": "A component that provides an input search field, that can search for Salesforce records."
},
"lightningsnapin-base-prechat": {
"type": "module",
"namespace": "lightningsnapin",
Expand Down
153 changes: 153 additions & 0 deletions packages/lwc-language-server/src/resources/lwc-standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,159 @@
],
"description": "Displays a phone number as a hyperlink with the tel: URL scheme."
},
"lightning-record-picker": {
"type": "module",
"namespace": "lightning",
"attributes": [
{
"name": "disabled",
"type": "BOOLEAN",
"description": "If present, the component is disabled and you can't interact with it.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "display-info",
"type": "",
"description": "The display configuration used to customize the way retrieved records are presented.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "field-level-help",
"type": "STRING",
"description": "Help text detailing the purpose and function of the record picker, displayed on hover for desktop and on click for mobile",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "filter",
"type": "",
"description": "The filter applied to the retrieved records.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "label",
"type": "STRING",
"description": "The text label for the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": true
},
{
"name": "matching-info",
"type": "",
"description": "The matching configuration to customize the fields used to match the search results to the search term entered by the user.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "message-when-bad-input",
"type": "STRING",
"description": "The error message displayed when the user enters a search term in the input but doesn't select an option.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "object-api-name",
"type": "STRING",
"description": "The API name of the object for the retrieved records.",
"access": "global",
"parent": "lightning-record-picker",
"required": true
},
{
"name": "placeholder",
"type": "STRING",
"description": "The text displayed when the input is empty to prompt the user to enter a search term.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "required",
"type": "BOOLEAN",
"description": "If present, specifies that a user must select a record. If no record is selected, the record picker is in an invalid state.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "value",
"type": "STRING",
"description": "The ID of the record that is selected in the record picker.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "variant",
"type": "STRING",
"description": "The variant changes the appearance of the component. The component displays the label above the combobox by default. Specify variant=\"label-hidden\" to hide the label but make it available to assistive technology. The only variant is label-hidden.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
}
],
"methods": [
{
"name": "blur",
"type": "",
"description": "Remove the focus of the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "checkValidity",
"type": "",
"description": "Check if the component is in a valid state.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "clearSelection",
"type": "",
"description": "Clears the selected record.\nThis method does not clear the search term or refresh the validity message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "focus",
"type": "",
"description": "Set the focus of the component.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "reportValidity",
"type": "",
"description": "Check if the component is in a valid state and refresh the validity message.\nIf the component is valid, it clears the validity error message.\nIf the component is invalid, it displays the validity error message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
},
{
"name": "setCustomValidity",
"type": "",
"description": "Set a custom validity error message.",
"access": "global",
"parent": "lightning-record-picker",
"required": false
}
],
"description": "A component that provides an input search field, that can search for Salesforce records."
},
"lightningsnapin-base-prechat": {
"type": "module",
"namespace": "lightningsnapin",
Expand Down
54 changes: 54 additions & 0 deletions packages/lwc-language-server/src/resources/standard-lwc.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,60 @@
}
]
},
{
"name": "lightning-record-picker",
"description": "A component that provides an input search field, that can search for Salesforce records.\n[View in Component Library](https://developer.salesforce.com/docs/component-library/bundle/lightning-record-picker)\n### Attributes\n* **disabled**: *BOOLEAN* If present, the component is disabled and you can't interact with it.\n* **display-info**\n* **field-level-help**: *STRING* Help text detailing the purpose and function of the record picker, displayed on hover for desktop and on click for mobile\n* **filter**\n* **label**: *STRING* The text label for the component.\n* **matching-info**\n* **message-when-bad-input**: *STRING* The error message displayed when the user enters a search term in the input but doesn't select an option.\n* **object-api-name**: *STRING* The API name of the object for the retrieved records.\n* **placeholder**: *STRING* The text displayed when the input is empty to prompt the user to enter a search term.\n* **required**: *BOOLEAN* If present, specifies that a user must select a record. If no record is selected, the record picker is in an invalid state.\n* **value**: *STRING* The ID of the record that is selected in the record picker.\n* **variant**: *STRING* The variant changes the appearance of the component. The component displays the label above the combobox by default. Specify variant=\"label-hidden\" to hide the label but make it available to assistive technology. The only variant is label-hidden.\n",
"attributes": [
{
"name": "disabled",
"description": "If present, the component is disabled and you can't interact with it."
},
{
"name": "display-info",
"description": "The display configuration used to customize the way retrieved records are presented."
},
{
"name": "field-level-help",
"description": "Help text detailing the purpose and function of the record picker, displayed on hover for desktop and on click for mobile"
},
{
"name": "filter",
"description": "The filter applied to the retrieved records."
},
{
"name": "label",
"description": "The text label for the component."
},
{
"name": "matching-info",
"description": "The matching configuration to customize the fields used to match the search results to the search term entered by the user."
},
{
"name": "message-when-bad-input",
"description": "The error message displayed when the user enters a search term in the input but doesn't select an option."
},
{
"name": "object-api-name",
"description": "The API name of the object for the retrieved records."
},
{
"name": "placeholder",
"description": "The text displayed when the input is empty to prompt the user to enter a search term."
},
{
"name": "required",
"description": "If present, specifies that a user must select a record. If no record is selected, the record picker is in an invalid state."
},
{
"name": "value",
"description": "The ID of the record that is selected in the record picker."
},
{
"name": "variant",
"description": "The variant changes the appearance of the component. The component displays the label above the combobox by default. Specify variant=\"label-hidden\" to hide the label but make it available to assistive technology. The only variant is label-hidden."
}
]
},
{
"name": "lightningsnapin-base-prechat",
"description": "null\n[View in Component Library](https://developer.salesforce.com/docs/component-library/bundle/lightningsnapin-base-prechat)\n### Attributes\n",
Expand Down

0 comments on commit 2c40ded

Please sign in to comment.