@plaidev/karte-action-sdk 1.1.197-28169546.1b64123d → 1.1.198-28170852.9d9fb983

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.
@@ -1721,9 +1721,11 @@ declare namespace widget {
1721
1721
  [key: string]: any;
1722
1722
  }>;
1723
1723
  /** @internal */
1724
- function setupActionTable(localVariablesQuery: any, apiKey: string): Promise<{
1724
+ function setupActionTable(localVariablesQuery: Array<VariableQuery>, apiKey: string): Promise<{
1725
1725
  success: boolean;
1726
1726
  }>;
1727
+ /** @internal */
1728
+ function initActionTable(localVariablesQuery: Array<VariableQuery> | undefined): void;
1727
1729
  /**
1728
1730
  * モーダル(ポップアップ)のプロパティ
1729
1731
  *
@@ -1368,6 +1368,17 @@ async function setupActionTable(localVariablesQuery, apiKey) {
1368
1368
  success,
1369
1369
  };
1370
1370
  }
1371
+ /** @internal */
1372
+ function initActionTable(localVariablesQuery) {
1373
+ const initValues = {
1374
+ // default values
1375
+ action_table: [],
1376
+ };
1377
+ localVariablesQuery?.forEach((query) => {
1378
+ initValues[query.name] = [];
1379
+ });
1380
+ setVariables(initValues);
1381
+ }
1371
1382
 
1372
1383
  /**
1373
1384
  * モーダル(ポップアップ)に関連するコードの管理
@@ -1666,6 +1677,7 @@ function createModal(App, options = {
1666
1677
  // ここからメインの処理
1667
1678
  initialize({ send: options.send, initialState: data.initial_state });
1668
1679
  // ActionTable APIへの非同期リクエスト
1680
+ initActionTable(options.localVariablesQuery);
1669
1681
  let actionTablePromise = null;
1670
1682
  if (options.localVariablesQuery && data.api_key) {
1671
1683
  actionTablePromise = setupActionTable(options.localVariablesQuery, data.api_key);
@@ -1721,9 +1721,11 @@ declare namespace widget {
1721
1721
  [key: string]: any;
1722
1722
  }>;
1723
1723
  /** @internal */
1724
- function setupActionTable(localVariablesQuery: any, apiKey: string): Promise<{
1724
+ function setupActionTable(localVariablesQuery: Array<VariableQuery>, apiKey: string): Promise<{
1725
1725
  success: boolean;
1726
1726
  }>;
1727
+ /** @internal */
1728
+ function initActionTable(localVariablesQuery: Array<VariableQuery> | undefined): void;
1727
1729
  /**
1728
1730
  * モーダル(ポップアップ)のプロパティ
1729
1731
  *
package/dist/index.es.js CHANGED
@@ -1404,6 +1404,17 @@ async function setupActionTable(localVariablesQuery, apiKey) {
1404
1404
  success,
1405
1405
  };
1406
1406
  }
1407
+ /** @internal */
1408
+ function initActionTable(localVariablesQuery) {
1409
+ const initValues = {
1410
+ // default values
1411
+ action_table: [],
1412
+ };
1413
+ localVariablesQuery?.forEach((query) => {
1414
+ initValues[query.name] = [];
1415
+ });
1416
+ setVariables(initValues);
1417
+ }
1407
1418
 
1408
1419
  /**
1409
1420
  * モーダル(ポップアップ)に関連するコードの管理
@@ -1725,6 +1736,7 @@ function createModal(App, options = {
1725
1736
  // ここからメインの処理
1726
1737
  initialize({ send: options.send, initialState: data.initial_state });
1727
1738
  // ActionTable APIへの非同期リクエスト
1739
+ initActionTable(options.localVariablesQuery);
1728
1740
  let actionTablePromise = null;
1729
1741
  if (options.localVariablesQuery && data.api_key) {
1730
1742
  actionTablePromise = setupActionTable(options.localVariablesQuery, data.api_key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.197-28169546.1b64123d",
3
+ "version": "1.1.198-28170852.9d9fb983",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",