@plaidev/karte-action-sdk 1.1.204-28190320.97e87b1d → 1.1.204-28199907.4843b7f4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1428,8 +1428,13 @@ function initActionTable(localVariablesQuery) {
1428
1428
  /** @internal */
1429
1429
  const handleState = (event) => {
1430
1430
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
1431
- send_event('_message_state_changed', { state: event.detail.to });
1432
- setState$1(event.detail.to, { disableInPreview: event.detail.disableInPreview });
1431
+ send_event('_message_state_changed', {
1432
+ oldState: event.detail.from ?? '',
1433
+ newState: event.detail.to ?? '',
1434
+ });
1435
+ setState$1(event.detail.to, {
1436
+ disableInPreview: event.detail.disableInPreview,
1437
+ });
1433
1438
  }
1434
1439
  };
1435
1440
  /**
@@ -2876,7 +2881,10 @@ function submit() {
2876
2881
  * モーダル(ポップアップ)のコンポーネントが利用するコードの管理
2877
2882
  */
2878
2883
  function _moveTo(to) {
2879
- window.dispatchEvent(new CustomEvent(ACTION_CHANGE_STATE_EVENT, { detail: { to, actionId } }));
2884
+ const currentState = getState$1();
2885
+ window.dispatchEvent(new CustomEvent(ACTION_CHANGE_STATE_EVENT, {
2886
+ detail: { from: currentState, to, actionId },
2887
+ }));
2880
2888
  }
2881
2889
  /** @internal */
2882
2890
  const moveTo = (to) => () => {
@@ -4758,7 +4766,7 @@ function add_css$o(target) {
4758
4766
  append_styles(target, "svelte-9ixs0b", ".text-element-wrapper.svelte-9ixs0b.svelte-9ixs0b{position:relative;height:100%}.text-element.svelte-9ixs0b.svelte-9ixs0b{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;margin:0px;padding:0px;border-width:0px;border-style:solid;border-color:#000000;overflow:hidden;font-size:12px;line-height:1.5}.text-link-element.svelte-9ixs0b.svelte-9ixs0b{text-decoration:none;color:inherit}.text-element-inner.svelte-9ixs0b.svelte-9ixs0b{width:100%;height:auto}.text-direction-vertical.svelte-9ixs0b.svelte-9ixs0b{writing-mode:vertical-rl}.text-direction-vertical.svelte-9ixs0b .text-element-inner.svelte-9ixs0b{width:auto;height:100%}.tooltip.svelte-9ixs0b.svelte-9ixs0b{display:none;position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);color:#fff;background-color:#3d4948;white-space:nowrap;padding:4px 8px 4px 8px;border-radius:4px;font-size:12px;z-index:2147483647}.tooltip.svelte-9ixs0b.svelte-9ixs0b:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-9ixs0b.svelte-9ixs0b{display:block}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b{background-color:#c00}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b:before{border-bottom:7px solid #c00}");
4759
4767
  }
4760
4768
 
4761
- // (93:2) {:else}
4769
+ // (94:2) {:else}
4762
4770
  function create_else_block$1(ctx) {
4763
4771
  let div1;
4764
4772
  let div0;
@@ -4824,7 +4832,7 @@ function create_else_block$1(ctx) {
4824
4832
  };
4825
4833
  }
4826
4834
 
4827
- // (79:2) {#if enableCopy}
4835
+ // (80:2) {#if enableCopy}
4828
4836
  function create_if_block$3(ctx) {
4829
4837
  let a;
4830
4838
  let div0;
@@ -5036,6 +5044,7 @@ function instance$p($$self, $$props, $$invalidate) {
5036
5044
 
5037
5045
  try {
5038
5046
  await navigator.clipboard.writeText(text);
5047
+ send_event('_click_copy', { text });
5039
5048
 
5040
5049
  if (eventName) {
5041
5050
  send_event(eventName, eventValue);
package/dist/index.es.js CHANGED
@@ -1464,8 +1464,13 @@ function initActionTable(localVariablesQuery) {
1464
1464
  /** @internal */
1465
1465
  const handleState = (event) => {
1466
1466
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
1467
- send_event('_message_state_changed', { state: event.detail.to });
1468
- setState$1(event.detail.to, { disableInPreview: event.detail.disableInPreview });
1467
+ send_event('_message_state_changed', {
1468
+ oldState: event.detail.from ?? '',
1469
+ newState: event.detail.to ?? '',
1470
+ });
1471
+ setState$1(event.detail.to, {
1472
+ disableInPreview: event.detail.disableInPreview,
1473
+ });
1469
1474
  }
1470
1475
  };
1471
1476
  /**
@@ -2895,7 +2900,10 @@ function submit() {
2895
2900
  * モーダル(ポップアップ)のコンポーネントが利用するコードの管理
2896
2901
  */
2897
2902
  function _moveTo(to) {
2898
- window.dispatchEvent(new CustomEvent(ACTION_CHANGE_STATE_EVENT, { detail: { to, actionId } }));
2903
+ const currentState = getState$1();
2904
+ window.dispatchEvent(new CustomEvent(ACTION_CHANGE_STATE_EVENT, {
2905
+ detail: { from: currentState, to, actionId },
2906
+ }));
2899
2907
  }
2900
2908
  /** @internal */
2901
2909
  const moveTo = (to) => () => {
@@ -4650,7 +4658,7 @@ function add_css$o(target) {
4650
4658
  append_styles(target, "svelte-9ixs0b", ".text-element-wrapper.svelte-9ixs0b.svelte-9ixs0b{position:relative;height:100%}.text-element.svelte-9ixs0b.svelte-9ixs0b{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;margin:0px;padding:0px;border-width:0px;border-style:solid;border-color:#000000;overflow:hidden;font-size:12px;line-height:1.5}.text-link-element.svelte-9ixs0b.svelte-9ixs0b{text-decoration:none;color:inherit}.text-element-inner.svelte-9ixs0b.svelte-9ixs0b{width:100%;height:auto}.text-direction-vertical.svelte-9ixs0b.svelte-9ixs0b{writing-mode:vertical-rl}.text-direction-vertical.svelte-9ixs0b .text-element-inner.svelte-9ixs0b{width:auto;height:100%}.tooltip.svelte-9ixs0b.svelte-9ixs0b{display:none;position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);color:#fff;background-color:#3d4948;white-space:nowrap;padding:4px 8px 4px 8px;border-radius:4px;font-size:12px;z-index:2147483647}.tooltip.svelte-9ixs0b.svelte-9ixs0b:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-9ixs0b.svelte-9ixs0b{display:block}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b{background-color:#c00}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b:before{border-bottom:7px solid #c00}");
4651
4659
  }
4652
4660
 
4653
- // (93:2) {:else}
4661
+ // (94:2) {:else}
4654
4662
  function create_else_block$1(ctx) {
4655
4663
  let div1;
4656
4664
  let div0;
@@ -4703,7 +4711,7 @@ function create_else_block$1(ctx) {
4703
4711
  };
4704
4712
  }
4705
4713
 
4706
- // (79:2) {#if enableCopy}
4714
+ // (80:2) {#if enableCopy}
4707
4715
  function create_if_block$3(ctx) {
4708
4716
  let a;
4709
4717
  let div0;
@@ -4878,6 +4886,7 @@ function instance$p($$self, $$props, $$invalidate) {
4878
4886
 
4879
4887
  try {
4880
4888
  await navigator.clipboard.writeText(text);
4889
+ send_event('_click_copy', { text });
4881
4890
 
4882
4891
  if (eventName) {
4883
4892
  send_event(eventName, eventValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.204-28190320.97e87b1d",
3
+ "version": "1.1.204-28199907.4843b7f4",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",