@plaidev/karte-action-sdk 1.1.132 → 1.1.133-27959748.3b2d212e

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,10 @@ import { setContext, getContext, createEventDispatcher, onMount, onDestroy as on
6
6
  /** @internal */
7
7
  const NOOP = (_args) => { }; // eslint-disable-line @typescript-eslint/no-unused-vars
8
8
  /** @internal */
9
+ const isPreview = () => {
10
+ return true;
11
+ };
12
+ /** @internal */
9
13
  const handleFocus = (node) => (e) => {
10
14
  if (node) {
11
15
  // trap focus
@@ -1531,6 +1535,7 @@ function collection$1(config) {
1531
1535
  };
1532
1536
  }
1533
1537
  function request(url, data, cb) {
1538
+ console.log('[debug] request', isPreview(), url, JSON.stringify(data));
1534
1539
  fetch(url, {
1535
1540
  method: 'POST',
1536
1541
  headers: {
@@ -1554,6 +1559,7 @@ const loadActionTableQuery = async (config, api_key, endpoint) => {
1554
1559
  return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.default.table_name }).getByQuery(config.default.query_name, config.default.params, null, (err, data) => (err ? reject(err) : resolve(data))));
1555
1560
  };
1556
1561
  const loadActionTable = async (config, api_key, endpoint) => {
1562
+ console.log('[debug] loadActionTable', isPreview(), api_key, endpoint, JSON.stringify(config));
1557
1563
  const results = config.map(c => c.preview_value)
1558
1564
  ;
1559
1565
  return config.reduce((acc, c, i) => {
package/dist/index.es.js CHANGED
@@ -6,6 +6,10 @@ import { setContext, getContext, createEventDispatcher, onMount, onDestroy as on
6
6
  /** @internal */
7
7
  const NOOP = (_args) => { }; // eslint-disable-line @typescript-eslint/no-unused-vars
8
8
  /** @internal */
9
+ const isPreview = () => {
10
+ return false;
11
+ };
12
+ /** @internal */
9
13
  const handleFocus = (node) => (e) => {
10
14
  if (node) {
11
15
  // trap focus
@@ -1601,6 +1605,7 @@ function collection$1(config) {
1601
1605
  };
1602
1606
  }
1603
1607
  function request(url, data, cb) {
1608
+ console.log('[debug] request', isPreview(), url, JSON.stringify(data));
1604
1609
  fetch(url, {
1605
1610
  method: 'POST',
1606
1611
  headers: {
@@ -1624,6 +1629,7 @@ const loadActionTableQuery = async (config, api_key, endpoint) => {
1624
1629
  return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.default.table_name }).getByQuery(config.default.query_name, config.default.params, null, (err, data) => (err ? reject(err) : resolve(data))));
1625
1630
  };
1626
1631
  const loadActionTable = async (config, api_key, endpoint) => {
1632
+ console.log('[debug] loadActionTable', isPreview(), api_key, endpoint, JSON.stringify(config));
1627
1633
  const results = await Promise.all(config
1628
1634
  .filter(c => c.resolver === 'action-table-row' ||
1629
1635
  c.resolver === 'action-table-rows' ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.132",
3
+ "version": "1.1.133-27959748.3b2d212e",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",