forked from sheetjs/docs.sheetjs.com
sf57
This commit is contained in:
parent
5b755a1370
commit
e7e2d1a709
@ -12,7 +12,7 @@ This demo assumes familiarity with Lightning Web Components. Salesforce has a
|
||||
:::caution
|
||||
|
||||
Some of the details may differ across releases of Salesforce. This demo is based
|
||||
on Lightning API version `55.0` and was last tested on 2022 June 26.
|
||||
on Lightning API version `57.0` and was last tested on 2023 April 09.
|
||||
|
||||
Salesforce may change the platform in backwards-incompatible ways, so the demo
|
||||
may require some adjustments. The official documentation should be consulted.
|
||||
@ -47,7 +47,7 @@ be changed:
|
||||
|
||||
`force-app\main\default\lwc\sheetComponent\sheetComponent.html` add some HTML:
|
||||
|
||||
```html force-app\main\default\lwc\sheetComponent\sheetComponent.html
|
||||
```html title="force-app\main\default\lwc\sheetComponent\sheetComponent.html"
|
||||
<template>
|
||||
<!-- highlight-next-line -->
|
||||
<b>SheetForce demo</b>
|
||||
@ -57,10 +57,10 @@ be changed:
|
||||
`force-app\main\default\lwc\sheetComponent\sheetComponent.js-meta.xml` change
|
||||
`isExposed` from `false` to `true` and add some metadata:
|
||||
|
||||
```xml
|
||||
```xml title="force-app\main\default\lwc\sheetComponent\sheetComponent.js-meta.xml"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>55.0</apiVersion>
|
||||
<apiVersion>57.0</apiVersion>
|
||||
<!-- highlight-start -->
|
||||
<isExposed>true</isExposed>
|
||||
<masterLabel>SheetForce</masterLabel>
|
||||
@ -97,7 +97,7 @@ The following options should be set:
|
||||
Under Custom components, you should see "SheetForce". Click and drag it into
|
||||
the app builder main view to add it to the page.
|
||||
|
||||
Click "Save" and click "Yes" to activate. The following options should be set:
|
||||
Click "Save" then click "Activate". The following options should be set:
|
||||
- Click "Change..." next to "Icon" and pick a memorable icon
|
||||
- Under "Lightning Experience" click "LightningBolt" then "Add page to app"
|
||||
|
||||
@ -131,7 +131,7 @@ The easiest approach is to right-click the link and select "Save Link As..."
|
||||
|
||||
3) Create `force-app/main/default/staticresources/sheetjs.resource-meta.xml`:
|
||||
|
||||
```xml
|
||||
```xml title="force-app/main/default/staticresources/sheetjs.resource-meta.xml"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<cacheControl>Private</cacheControl>
|
||||
@ -168,7 +168,7 @@ The library includes a version number that can be displayed:
|
||||
|
||||
1) Add a reference in `sheetComponent.js` and expose the `version` property:
|
||||
|
||||
```js
|
||||
```js title="force-app/main/default/lwc/sheetComponent/sheetComponent.js"
|
||||
import { LightningElement } from 'lwc';
|
||||
import { loadScript } from 'lightning/platformResourceLoader';
|
||||
// highlight-next-line
|
||||
@ -187,7 +187,7 @@ export default class SheetComponent extends LightningElement {
|
||||
|
||||
2) Reference the variable in `sheetComponent.html`:
|
||||
|
||||
```html
|
||||
```html title="force-app/main/default/lwc/sheetComponent/sheetComponent.html"
|
||||
<template>
|
||||
<!-- highlight-next-line -->
|
||||
<b>SheetForce {version}</b>
|
||||
@ -318,7 +318,7 @@ This is readily exported to a spreadsheet in a callback function:
|
||||
|
||||
1) Add a button to `sheetComponent.html` that will call a `download` callback:
|
||||
|
||||
```html
|
||||
```html title="force-app/main/default/lwc/sheetComponent/sheetComponent.html"
|
||||
<template>
|
||||
<!-- if the `aoa` property is set, show a button -->
|
||||
<template if:true={aoa}>
|
||||
@ -331,7 +331,7 @@ This is readily exported to a spreadsheet in a callback function:
|
||||
|
||||
2) Replace `sheetComponent.js` with the following:
|
||||
|
||||
```js
|
||||
```js title="force-app/main/default/lwc/sheetComponent/sheetComponent.js"
|
||||
import { LightningElement, wire, api } from 'lwc';
|
||||
import { loadScript } from 'lightning/platformResourceLoader';
|
||||
import { getListUi } from 'lightning/uiListApi';
|
||||
|
Loading…
Reference in New Issue
Block a user