Skip to content

Commit d4de5af

Browse files
[update] Salesforce and Whats new
1 parent dd39af1 commit d4de5af

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

docs/guides/integration_with_salesforce.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,49 @@ description: Learn how to integrate DHTMLX Kanban into Salesforce. This guide ex
77
# Integration with Salesforce
88

99
:::tip
10-
You should be familiar with the basic concepts and patterns of [**Saleforce**](https://www.salesforce.com/) before reading this documentation. To refresh your knowledge, please refer to the [**Saleforce documentation**](https://developer.salesforce.com/docs).
10+
You should be familiar with the basic concepts and patterns of [**Salesforce**](https://www.salesforce.com/) before reading this documentation. To refresh your knowledge, please refer to the [**Salesforce documentation**](https://developer.salesforce.com/docs).
1111
:::
1212

13-
DHTMLX Kanban is compatible with [Salesforce](https://www.salesforce.com/). We have prepared code examples on how to use DHTMLX Kanban with Saleforce. For more information, refer to the corresponding [**Example on GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo).
14-
15-
The JavaScript Kanban widget automatically detects that it operates within a [Salesforce](https://www.salesforce.com/) environment and configures the integration logic internally.
13+
DHTMLX Kanban is compatible with [Salesforce](https://www.salesforce.com/) platform. We have prepared code examples on how to add DHTMLX Kanban into Salesforce environment. For more information, refer to the corresponding [Example on GitHub](https://github.com/DHTMLX/salesforce-lwc-demo).
1614

1715
:::note
18-
In most cases, you do not need to call any [Salesforce-specific methods](#available-methods) manually.
16+
The JavaScript Kanban widget automatically detects that it operates within a [Salesforce](https://www.salesforce.com/) environment and configures the integration logic internally. In most cases, you do not need to call any [Salesforce-specific methods](#selesforce-specific-methods) manually.
1917
:::
2018

2119
## Preparing environment
2220

23-
If you want to add JS Kanban into your Salesforce project, you need to mark the root container with the `data-wx-root="true"` HTML attribute. This attribute allows the library to locate the main node for mounting **Kanban** and **Toolbar** widgets.
21+
If you want to add Kanban into your Salesforce project, you need to mark the *root* container with the `data-wx-root="true"` HTML attribute. This attribute allows the library to locate the main node for mounting **Kanban** and **Toolbar** widgets.
2422

2523
```html title="kanban.html"
2624
<template>
2725
<div id="wx-root" data-wx-root="true" class="kanban-wrapper" tabindex="0">
28-
<div class="sf_toolbar" lwc:dom="manual" data-wx-portal-root="1" style="width: 100%;"></div>
29-
<div class="sf_kanban" lwc:dom="manual" data-wx-portal-root="1" style="width: 100%; flex-grow: 1;"></div>
26+
<div class="sf_toolbar" lwc:dom="manual" data-wx-portal-root="1"></div>
27+
<div class="sf_kanban" lwc:dom="manual" data-wx-portal-root="1"></div>
3028
</div>
3129
</template>
3230
```
3331

34-
Nested elements with `data-wx-portal-root="1"` serve as containers for DHTMLX components (for example, **Toolbar** and **Kanban**).
32+
Nested elements marked with the `data-wx-portal-root="1"` attribute serve as containers for DHTMLX components (for example, **Toolbar** and **Kanban**).
3533

3634
## Salesforce environment API
3735

38-
The DHTMLX Kanban includes the `salesForceEnv` helper class that stores methods for manual control of the Salesforce environment.
39-
Normally, these methods are not required, but they can be available only as a fallback in case automatic detection fails.
36+
The DHTMLX Kanban includes the `salesForceEnv` helper class that stores methods for manual control of the Salesforce environment. You can import the `salesForceEnv` helper class as follows:
37+
38+
```jsx {4}
39+
import {
40+
Kanban,
41+
Toolbar,
42+
salesForceEnv
43+
} from "@dhx/trial-kanban";
44+
```
45+
46+
:::note
47+
Normally, salesforce-specific methods are not required, but they can be available only as a fallback in case automatic detection fails.
48+
:::
49+
50+
### Salesforce-specific methods
4051

41-
### Available methods
52+
You can use the following methods of the `salesForceEnv` helper class:
4253

4354
| Method | Description |
4455
| :--------------------------------------------------------------- | :----------------------------------------------------------------------------- |
@@ -55,23 +66,24 @@ Normally, these methods are not required, but they can be available only as a fa
5566
## Workflow steps
5667

5768
1. Add the `data-wx-root="true"` attribute to your LWC container
58-
2. Import and initialize DHTMLX Kanban
59-
3. The JS Kanban widget automatically detects the Salesforce context and applies internal configuration
60-
4. You do not need to call `enableSalesForce()` or use `salesForceEnv` methods unless your app runs in a non-standard embedding scenario
69+
2. Import and initialize DHTMLX Kanban and Toolbar (optionaly)
70+
3. The JavaScript Kanban widget automatically detects the Salesforce context and applies internal configuration
71+
4. You do not need to call the `enableSalesForce()` function or use `salesForceEnv` methods unless your app runs in a non-standard embedding scenario
6172

6273
### Example
6374

64-
```js title="kanban.js"
75+
```jsx title="kanban.js"
6576
import { Kanban, Toolbar } from "@dhx/trial-kanban";
6677
import "@dhx/trial-kanban/dist/kanban.css";
6778

6879
export default class KanbanLWC {
6980
connectedCallback() {
70-
const root = document.querySelector("[data-wx-root='true']");
71-
const kanban = new Kanban(root.querySelector(".sf_kanban"), {});
72-
const toolbar = new Toolbar(root.querySelector(".sf_toolbar"), { api: kanban.api });
81+
const kanban_container = this.template.querySelector(".sf_kanban");
82+
const toolbar_container = this.template.querySelector(".sf_toolbar");
83+
const kanban = new Kanban(kanban_container, { /* configuration properties */ });
84+
const toolbar = new Toolbar(toolbar_container, { api: kanban.api });
7385
}
7486
}
7587
```
7688

77-
Now the DHTMLX Kanban component is fully integrated into your **Salesforce Lightning** environment. The widget automatically handles DOM hierarchy and event binding inside LWC. You can continue configuring Kanban through its standard API and customize its appearance and logic according to your project needs. The final example you can find on [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo).
89+
Now the DHTMLX Kanban component is fully integrated into your **Salesforce Lightning** environment. The widget automatically handles DOM hierarchy and event binding inside LWC. You can continue configuring Kanban through its standard API and customize Kanban appearance and logic according to your project needs. The final example you can find on [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo).

docs/news/whats_new.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ If you are updating Kanban from an older version, check [Migration to newer vers
1010

1111
## Version 1.7.0
1212

13-
Released on September Day, 2025
13+
Released on October Day, 2025
14+
15+
### New functionality
16+
17+
Starting from v1.7 you can leverage JavaScript Kanban within Salesforce environment. Refer to the following guide for more information: [Integration with Selesforce](guides/integration_with_salesforce.md). You can also explore our [GitHub example](https://github.com/DHTMLX/salesforce-lwc-demo) or run [Online demo](https://dhtmlx-dev-ed.develop.lightning.force.com/) (*Login*: ***user***, *Password*: ***demo***).
1418

1519
### New API
1620

0 commit comments

Comments
 (0)