@kissflow/lowcode-client-sdk 1.0.19-beta.1 → 1.0.19-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -139,7 +139,7 @@ Appends row details to the table.
139
139
  const table = kf.context.getTable(tableId);
140
140
  table.addRow({ columnId1: value, columnId2: value });
141
141
  ```
142
- // Note: If there are more than one rows to be added to table then use addRows() instead for these bulk operations
142
+ > ##### Note: If there are more than one rows to be added to table then use `addRows()` instead for these bulk operations
143
143
 
144
144
  #### b) addRows()
145
145
 
@@ -169,8 +169,20 @@ Deletes a row from the table based on the row id
169
169
  const table = kf.context.getTable(tableId);
170
170
  await table.deleteRow(rowId);
171
171
  ```
172
+ > ##### Note: If there are more than one rows to be deleted then use `deleteRows()` instead.
172
173
 
173
- #### d) getRow()
174
+ #### d) deleteRows()
175
+
176
+ ###### Description:
177
+ Deletes multiple rows from the table based on given array of strings.
178
+
179
+ ###### Syntax:
180
+ ```js
181
+ const table = kf.context.getTable(tableId);
182
+ await table.deleteRows([rowId1, rowId2, rowId3]);
183
+ ```
184
+
185
+ #### e) getRow()
174
186
 
175
187
  ###### Description:
176
188
  Use this function to perform form actions on any row inside a child table
@@ -184,7 +196,7 @@ const row = table.getRow(rowId);
184
196
  ###### Output:
185
197
  Returns an instance of `TableForm` class
186
198
 
187
- #### e) getRows()
199
+ #### f) getRows()
188
200
 
189
201
  ###### Description:
190
202
  Gets all the rows of the table
@@ -197,7 +209,7 @@ const rows = await kf.context.getTable(tableId).getRows();
197
209
  ###### Output:
198
210
  Returns an array of `TableForm` instances
199
211
 
200
- ##### f) toJSON()
212
+ ##### g) toJSON()
201
213
 
202
214
  ###### Description:
203
215
  Use this function to get the JSON data of the child table
package/dist/index.d.ts CHANGED
@@ -260,6 +260,7 @@ declare module "form/index" {
260
260
  addRow(rowObject: object): any;
261
261
  addRows(rows: [object]): any;
262
262
  deleteRow(rowId: string): any;
263
+ deleteRows(rows: [string]): any;
263
264
  }
264
265
  export class TableForm extends BaseSDK {
265
266
  private instanceId;
@@ -259,7 +259,13 @@ class Table extends BaseSDK {
259
259
  deleteRow(rowId) {
260
260
  return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
261
261
  tableId: this.tableId,
262
- rowId
262
+ rows: [rowId]
263
+ });
264
+ }
265
+ deleteRows(rows) {
266
+ return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
267
+ tableId: this.tableId,
268
+ rows
263
269
  });
264
270
  }
265
271
  }
@@ -248,7 +248,13 @@ class Table extends BaseSDK {
248
248
  deleteRow(rowId) {
249
249
  return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
250
250
  tableId: this.tableId,
251
- rowId
251
+ rows: [rowId]
252
+ });
253
+ }
254
+ deleteRows(rows) {
255
+ return this._postMessageAsync(LISTENER_CMDS.DELETE_TABLE_ROW, {
256
+ tableId: this.tableId,
257
+ rows
252
258
  });
253
259
  }
254
260
  }
package/dist/lowcode.d.ts CHANGED
@@ -93,6 +93,7 @@ declare module "form/index" {
93
93
  addRow(rowObject: object): any;
94
94
  addRows(rows: [object]): any;
95
95
  deleteRow(rowId: string): any;
96
+ deleteRows(rows: [string]): any;
96
97
  }
97
98
  export class TableForm extends BaseSDK {
98
99
  private instanceId;
@@ -13,6 +13,7 @@ declare class Table {
13
13
  addRow(rowObject: object): any;
14
14
  addRows(rows: [object]): any;
15
15
  deleteRow(rowId: string): any;
16
+ deleteRows(rows: [string]): any;
16
17
  }
17
18
  declare class TableForm {
18
19
  type: string
package/dist/nocode.d.ts CHANGED
@@ -93,6 +93,7 @@ declare module "form/index" {
93
93
  addRow(rowObject: object): any;
94
94
  addRows(rows: [object]): any;
95
95
  deleteRow(rowId: string): any;
96
+ deleteRows(rows: [string]): any;
96
97
  }
97
98
  export class TableForm extends BaseSDK {
98
99
  private instanceId;
@@ -13,6 +13,7 @@ declare class Table {
13
13
  addRow(rowObject: object): any;
14
14
  addRows(rows: [object]): any;
15
15
  deleteRow(rowId: string): any;
16
+ deleteRows(rows: [string]): any;
16
17
  }
17
18
  declare class TableForm {
18
19
  type: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kissflow/lowcode-client-sdk",
3
- "version": "1.0.19-beta.1",
3
+ "version": "1.0.19-beta.2",
4
4
  "description": "JavaScript SDK for developing over the Kissflow lowcode platform",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [