@plaidev/karte-action-sdk 1.1.120-27931993.5f24f9af → 1.1.120-27932497.7c9501cf

Sign up to get free protection for your applications and to get access to all the features.
@@ -2153,7 +2153,7 @@ function add_css$n(target) {
2153
2153
  }
2154
2154
 
2155
2155
  // (23:0) {#if $state === path}
2156
- function create_if_block$7(ctx) {
2156
+ function create_if_block$8(ctx) {
2157
2157
  let div;
2158
2158
  let t;
2159
2159
  let current;
@@ -2228,7 +2228,7 @@ function create_if_block$7(ctx) {
2228
2228
  function create_fragment$q(ctx) {
2229
2229
  let if_block_anchor;
2230
2230
  let current;
2231
- let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$7(ctx);
2231
+ let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$8(ctx);
2232
2232
 
2233
2233
  return {
2234
2234
  c() {
@@ -2253,7 +2253,7 @@ function create_fragment$q(ctx) {
2253
2253
  transition_in(if_block, 1);
2254
2254
  }
2255
2255
  } else {
2256
- if_block = create_if_block$7(ctx);
2256
+ if_block = create_if_block$8(ctx);
2257
2257
  if_block.c();
2258
2258
  transition_in(if_block, 1);
2259
2259
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -2327,7 +2327,7 @@ function add_css$m(target) {
2327
2327
  }
2328
2328
 
2329
2329
  // (9:0) {#if backgroundOverray}
2330
- function create_if_block$6(ctx) {
2330
+ function create_if_block$7(ctx) {
2331
2331
  let div;
2332
2332
  let mounted;
2333
2333
  let dispose;
@@ -2364,7 +2364,7 @@ function create_if_block$6(ctx) {
2364
2364
 
2365
2365
  function create_fragment$p(ctx) {
2366
2366
  let if_block_anchor;
2367
- let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$6(ctx);
2367
+ let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$7(ctx);
2368
2368
 
2369
2369
  return {
2370
2370
  c() {
@@ -2384,7 +2384,7 @@ function create_fragment$p(ctx) {
2384
2384
  if (if_block) {
2385
2385
  if_block.p(ctx, dirty);
2386
2386
  } else {
2387
- if_block = create_if_block$6(ctx);
2387
+ if_block = create_if_block$7(ctx);
2388
2388
  if_block.c();
2389
2389
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
2390
2390
  }
@@ -2428,7 +2428,7 @@ function add_css$l(target) {
2428
2428
  }
2429
2429
 
2430
2430
  // (142:0) {#if visible}
2431
- function create_if_block$5(ctx) {
2431
+ function create_if_block$6(ctx) {
2432
2432
  let div1;
2433
2433
  let t;
2434
2434
  let div0;
@@ -2671,7 +2671,7 @@ function create_fragment$o(ctx) {
2671
2671
  if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
2672
2672
  });
2673
2673
 
2674
- let if_block = /*visible*/ ctx[6] && create_if_block$5(ctx);
2674
+ let if_block = /*visible*/ ctx[6] && create_if_block$6(ctx);
2675
2675
 
2676
2676
  return {
2677
2677
  c() {
@@ -2715,7 +2715,7 @@ function create_fragment$o(ctx) {
2715
2715
  transition_in(if_block, 1);
2716
2716
  }
2717
2717
  } else {
2718
- if_block = create_if_block$5(ctx);
2718
+ if_block = create_if_block$6(ctx);
2719
2719
  if_block.c();
2720
2720
  transition_in(if_block, 1);
2721
2721
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -3844,7 +3844,7 @@ function create_else_block$1(ctx) {
3844
3844
  }
3845
3845
 
3846
3846
  // (10:2) {#if item.match(regexp)}
3847
- function create_if_block$4(ctx) {
3847
+ function create_if_block$5(ctx) {
3848
3848
  let br;
3849
3849
 
3850
3850
  return {
@@ -3872,7 +3872,7 @@ function create_each_block$5(ctx) {
3872
3872
  function select_block_type(ctx, dirty) {
3873
3873
  if (dirty & /*items*/ 1) show_if = null;
3874
3874
  if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
3875
- if (show_if) return create_if_block$4;
3875
+ if (show_if) return create_if_block$5;
3876
3876
  return create_else_block$1;
3877
3877
  }
3878
3878
 
@@ -4005,56 +4005,144 @@ class RenderText extends SvelteComponent {
4005
4005
  /* src/components/TextElement.svelte generated by Svelte v3.53.1 */
4006
4006
 
4007
4007
  function add_css$h(target) {
4008
- append_styles(target, "svelte-9en2jg", ".text-element.svelte-9en2jg.svelte-9en2jg{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-9en2jg.svelte-9en2jg{width:100%;height:auto}.text-direction-vertical.svelte-9en2jg.svelte-9en2jg{writing-mode:vertical-rl}.text-direction-vertical.svelte-9en2jg .text-element-inner.svelte-9en2jg{width:auto;height:100%}");
4008
+ append_styles(target, "svelte-13cs3g2", ".text-element-wrapper.svelte-13cs3g2.svelte-13cs3g2{position:relative;height:100%}.text-element.svelte-13cs3g2.svelte-13cs3g2{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-13cs3g2.svelte-13cs3g2{width:100%;height:auto}.text-direction-vertical.svelte-13cs3g2.svelte-13cs3g2{writing-mode:vertical-rl}.text-direction-vertical.svelte-13cs3g2 .text-element-inner.svelte-13cs3g2{width:auto;height:100%}.tooltip.svelte-13cs3g2.svelte-13cs3g2{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-13cs3g2.svelte-13cs3g2:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-13cs3g2.svelte-13cs3g2{display:block}.tooltip-error.svelte-13cs3g2.svelte-13cs3g2{background-color:#c00}.tooltip-error.svelte-13cs3g2.svelte-13cs3g2:before{border-bottom:7px solid #c00}");
4009
+ }
4010
+
4011
+ // (56:2) {#if enableCopy}
4012
+ function create_if_block$4(ctx) {
4013
+ let div0;
4014
+ let t0;
4015
+ let t1;
4016
+ let div1;
4017
+ let t2;
4018
+
4019
+ return {
4020
+ c() {
4021
+ div0 = element("div");
4022
+ t0 = text("コピーしました");
4023
+ t1 = space();
4024
+ div1 = element("div");
4025
+ t2 = text("コピーできませんでした");
4026
+ this.h();
4027
+ },
4028
+ l(nodes) {
4029
+ div0 = claim_element(nodes, "DIV", { class: true });
4030
+ var div0_nodes = children(div0);
4031
+ t0 = claim_text(div0_nodes, "コピーしました");
4032
+ div0_nodes.forEach(detach);
4033
+ t1 = claim_space(nodes);
4034
+ div1 = claim_element(nodes, "DIV", { class: true });
4035
+ var div1_nodes = children(div1);
4036
+ t2 = claim_text(div1_nodes, "コピーできませんでした");
4037
+ div1_nodes.forEach(detach);
4038
+ this.h();
4039
+ },
4040
+ h() {
4041
+ attr(div0, "class", "tooltip svelte-13cs3g2");
4042
+ attr(div1, "class", "tooltip tooltip-error svelte-13cs3g2");
4043
+ },
4044
+ m(target, anchor) {
4045
+ insert_hydration(target, div0, anchor);
4046
+ append_hydration(div0, t0);
4047
+ /*div0_binding*/ ctx[9](div0);
4048
+ insert_hydration(target, t1, anchor);
4049
+ insert_hydration(target, div1, anchor);
4050
+ append_hydration(div1, t2);
4051
+ /*div1_binding*/ ctx[10](div1);
4052
+ },
4053
+ p: noop,
4054
+ d(detaching) {
4055
+ if (detaching) detach(div0);
4056
+ /*div0_binding*/ ctx[9](null);
4057
+ if (detaching) detach(t1);
4058
+ if (detaching) detach(div1);
4059
+ /*div1_binding*/ ctx[10](null);
4060
+ }
4061
+ };
4009
4062
  }
4010
4063
 
4011
4064
  function create_fragment$h(ctx) {
4065
+ let div2;
4012
4066
  let div1;
4013
4067
  let div0;
4014
4068
  let rendertext;
4015
4069
  let div1_class_value;
4070
+ let t;
4016
4071
  let current;
4072
+ let mounted;
4073
+ let dispose;
4017
4074
  rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4075
+ let if_block = /*enableCopy*/ ctx[1] && create_if_block$4(ctx);
4018
4076
 
4019
4077
  return {
4020
4078
  c() {
4079
+ div2 = element("div");
4021
4080
  div1 = element("div");
4022
4081
  div0 = element("div");
4023
4082
  create_component(rendertext.$$.fragment);
4083
+ t = space();
4084
+ if (if_block) if_block.c();
4024
4085
  this.h();
4025
4086
  },
4026
4087
  l(nodes) {
4027
- div1 = claim_element(nodes, "DIV", { class: true, style: true });
4088
+ div2 = claim_element(nodes, "DIV", { class: true });
4089
+ var div2_nodes = children(div2);
4090
+ div1 = claim_element(div2_nodes, "DIV", { class: true, style: true });
4028
4091
  var div1_nodes = children(div1);
4029
4092
  div0 = claim_element(div1_nodes, "DIV", { class: true });
4030
4093
  var div0_nodes = children(div0);
4031
4094
  claim_component(rendertext.$$.fragment, div0_nodes);
4032
4095
  div0_nodes.forEach(detach);
4033
4096
  div1_nodes.forEach(detach);
4097
+ t = claim_space(div2_nodes);
4098
+ if (if_block) if_block.l(div2_nodes);
4099
+ div2_nodes.forEach(detach);
4034
4100
  this.h();
4035
4101
  },
4036
4102
  h() {
4037
- attr(div0, "class", "text-element-inner svelte-9en2jg");
4038
- attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"));
4039
- attr(div1, "style", /*style*/ ctx[2]);
4103
+ attr(div0, "class", "text-element-inner svelte-13cs3g2");
4104
+ attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"));
4105
+ attr(div1, "style", /*style*/ ctx[5]);
4106
+ attr(div2, "class", "text-element-wrapper svelte-13cs3g2");
4040
4107
  },
4041
4108
  m(target, anchor) {
4042
- insert_hydration(target, div1, anchor);
4109
+ insert_hydration(target, div2, anchor);
4110
+ append_hydration(div2, div1);
4043
4111
  append_hydration(div1, div0);
4044
4112
  mount_component(rendertext, div0, null);
4113
+ append_hydration(div2, t);
4114
+ if (if_block) if_block.m(div2, null);
4045
4115
  current = true;
4116
+
4117
+ if (!mounted) {
4118
+ dispose = listen(div1, "click", /*click*/ ctx[6]);
4119
+ mounted = true;
4120
+ }
4046
4121
  },
4047
4122
  p(ctx, [dirty]) {
4048
4123
  const rendertext_changes = {};
4049
4124
  if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
4050
4125
  rendertext.$set(rendertext_changes);
4051
4126
 
4052
- if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"))) {
4127
+ if (!current || dirty & /*textDirection*/ 4 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"))) {
4053
4128
  attr(div1, "class", div1_class_value);
4054
4129
  }
4055
4130
 
4056
- if (!current || dirty & /*style*/ 4) {
4057
- attr(div1, "style", /*style*/ ctx[2]);
4131
+ if (!current || dirty & /*style*/ 32) {
4132
+ attr(div1, "style", /*style*/ ctx[5]);
4133
+ }
4134
+
4135
+ if (/*enableCopy*/ ctx[1]) {
4136
+ if (if_block) {
4137
+ if_block.p(ctx, dirty);
4138
+ } else {
4139
+ if_block = create_if_block$4(ctx);
4140
+ if_block.c();
4141
+ if_block.m(div2, null);
4142
+ }
4143
+ } else if (if_block) {
4144
+ if_block.d(1);
4145
+ if_block = null;
4058
4146
  }
4059
4147
  },
4060
4148
  i(local) {
@@ -4067,8 +4155,11 @@ function create_fragment$h(ctx) {
4067
4155
  current = false;
4068
4156
  },
4069
4157
  d(detaching) {
4070
- if (detaching) detach(div1);
4158
+ if (detaching) detach(div2);
4071
4159
  destroy_component(rendertext);
4160
+ if (if_block) if_block.d();
4161
+ mounted = false;
4162
+ dispose();
4072
4163
  }
4073
4164
  };
4074
4165
  }
@@ -4076,24 +4167,74 @@ function create_fragment$h(ctx) {
4076
4167
  function instance$h($$self, $$props, $$invalidate) {
4077
4168
  let style;
4078
4169
  let { text = 'サンプルSample' } = $$props;
4170
+ let { enableCopy = false } = $$props;
4171
+ let tooltipEl;
4172
+ let tooltipErrorEl;
4173
+
4174
+ const click = async () => {
4175
+ if (enableCopy) {
4176
+ try {
4177
+ await navigator.clipboard.writeText(text);
4178
+ tooltipEl.classList.add('show');
4179
+ } catch(err) {
4180
+ tooltipErrorEl.classList.add('show');
4181
+ }
4182
+
4183
+ setTimeout(
4184
+ () => {
4185
+ tooltipEl.classList.remove('show');
4186
+ tooltipErrorEl.classList.remove('show');
4187
+ },
4188
+ 1000
4189
+ );
4190
+ }
4191
+ };
4192
+
4079
4193
  let { _textStyle = 'font-size:12px;' } = $$props;
4080
4194
  let { textDirection = 'horizontal' } = $$props;
4081
4195
  let { _style = '' } = $$props;
4082
4196
 
4197
+ function div0_binding($$value) {
4198
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4199
+ tooltipEl = $$value;
4200
+ $$invalidate(3, tooltipEl);
4201
+ });
4202
+ }
4203
+
4204
+ function div1_binding($$value) {
4205
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4206
+ tooltipErrorEl = $$value;
4207
+ $$invalidate(4, tooltipErrorEl);
4208
+ });
4209
+ }
4210
+
4083
4211
  $$self.$$set = $$props => {
4084
4212
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
4085
- if ('_textStyle' in $$props) $$invalidate(3, _textStyle = $$props._textStyle);
4086
- if ('textDirection' in $$props) $$invalidate(1, textDirection = $$props.textDirection);
4087
- if ('_style' in $$props) $$invalidate(4, _style = $$props._style);
4213
+ if ('enableCopy' in $$props) $$invalidate(1, enableCopy = $$props.enableCopy);
4214
+ if ('_textStyle' in $$props) $$invalidate(7, _textStyle = $$props._textStyle);
4215
+ if ('textDirection' in $$props) $$invalidate(2, textDirection = $$props.textDirection);
4216
+ if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
4088
4217
  };
4089
4218
 
4090
4219
  $$self.$$.update = () => {
4091
- if ($$self.$$.dirty & /*_textStyle, _style*/ 24) {
4092
- $$invalidate(2, style = [..._textStyle.split(';'), ..._style.split(';')].join(';'));
4220
+ if ($$self.$$.dirty & /*_textStyle, _style*/ 384) {
4221
+ $$invalidate(5, style = [..._textStyle.split(';'), ..._style.split(';')].join(';'));
4093
4222
  }
4094
4223
  };
4095
4224
 
4096
- return [text, textDirection, style, _textStyle, _style];
4225
+ return [
4226
+ text,
4227
+ enableCopy,
4228
+ textDirection,
4229
+ tooltipEl,
4230
+ tooltipErrorEl,
4231
+ style,
4232
+ click,
4233
+ _textStyle,
4234
+ _style,
4235
+ div0_binding,
4236
+ div1_binding
4237
+ ];
4097
4238
  }
4098
4239
 
4099
4240
  class TextElement extends SvelteComponent {
@@ -4108,9 +4249,10 @@ class TextElement extends SvelteComponent {
4108
4249
  safe_not_equal,
4109
4250
  {
4110
4251
  text: 0,
4111
- _textStyle: 3,
4112
- textDirection: 1,
4113
- _style: 4
4252
+ enableCopy: 1,
4253
+ _textStyle: 7,
4254
+ textDirection: 2,
4255
+ _style: 8
4114
4256
  },
4115
4257
  add_css$h
4116
4258
  );
package/dist/index.es.js CHANGED
@@ -2263,7 +2263,7 @@ function add_css$n(target) {
2263
2263
  }
2264
2264
 
2265
2265
  // (23:0) {#if $state === path}
2266
- function create_if_block$7(ctx) {
2266
+ function create_if_block$8(ctx) {
2267
2267
  let div;
2268
2268
  let t;
2269
2269
  let current;
@@ -2328,7 +2328,7 @@ function create_if_block$7(ctx) {
2328
2328
  function create_fragment$q(ctx) {
2329
2329
  let if_block_anchor;
2330
2330
  let current;
2331
- let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$7(ctx);
2331
+ let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$8(ctx);
2332
2332
 
2333
2333
  return {
2334
2334
  c() {
@@ -2349,7 +2349,7 @@ function create_fragment$q(ctx) {
2349
2349
  transition_in(if_block, 1);
2350
2350
  }
2351
2351
  } else {
2352
- if_block = create_if_block$7(ctx);
2352
+ if_block = create_if_block$8(ctx);
2353
2353
  if_block.c();
2354
2354
  transition_in(if_block, 1);
2355
2355
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -2423,7 +2423,7 @@ function add_css$m(target) {
2423
2423
  }
2424
2424
 
2425
2425
  // (9:0) {#if backgroundOverray}
2426
- function create_if_block$6(ctx) {
2426
+ function create_if_block$7(ctx) {
2427
2427
  let div;
2428
2428
  let mounted;
2429
2429
  let dispose;
@@ -2452,7 +2452,7 @@ function create_if_block$6(ctx) {
2452
2452
 
2453
2453
  function create_fragment$p(ctx) {
2454
2454
  let if_block_anchor;
2455
- let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$6(ctx);
2455
+ let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$7(ctx);
2456
2456
 
2457
2457
  return {
2458
2458
  c() {
@@ -2468,7 +2468,7 @@ function create_fragment$p(ctx) {
2468
2468
  if (if_block) {
2469
2469
  if_block.p(ctx, dirty);
2470
2470
  } else {
2471
- if_block = create_if_block$6(ctx);
2471
+ if_block = create_if_block$7(ctx);
2472
2472
  if_block.c();
2473
2473
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
2474
2474
  }
@@ -2512,7 +2512,7 @@ function add_css$l(target) {
2512
2512
  }
2513
2513
 
2514
2514
  // (142:0) {#if visible}
2515
- function create_if_block$5(ctx) {
2515
+ function create_if_block$6(ctx) {
2516
2516
  let div1;
2517
2517
  let t;
2518
2518
  let div0;
@@ -2706,7 +2706,7 @@ function create_fragment$o(ctx) {
2706
2706
  if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
2707
2707
  });
2708
2708
 
2709
- let if_block = /*visible*/ ctx[6] && create_if_block$5(ctx);
2709
+ let if_block = /*visible*/ ctx[6] && create_if_block$6(ctx);
2710
2710
 
2711
2711
  return {
2712
2712
  c() {
@@ -2744,7 +2744,7 @@ function create_fragment$o(ctx) {
2744
2744
  transition_in(if_block, 1);
2745
2745
  }
2746
2746
  } else {
2747
- if_block = create_if_block$5(ctx);
2747
+ if_block = create_if_block$6(ctx);
2748
2748
  if_block.c();
2749
2749
  transition_in(if_block, 1);
2750
2750
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -3807,7 +3807,7 @@ function create_else_block$1(ctx) {
3807
3807
  }
3808
3808
 
3809
3809
  // (10:2) {#if item.match(regexp)}
3810
- function create_if_block$4(ctx) {
3810
+ function create_if_block$5(ctx) {
3811
3811
  let br;
3812
3812
 
3813
3813
  return {
@@ -3832,7 +3832,7 @@ function create_each_block$5(ctx) {
3832
3832
  function select_block_type(ctx, dirty) {
3833
3833
  if (dirty & /*items*/ 1) show_if = null;
3834
3834
  if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
3835
- if (show_if) return create_if_block$4;
3835
+ if (show_if) return create_if_block$5;
3836
3836
  return create_else_block$1;
3837
3837
  }
3838
3838
 
@@ -3954,43 +3954,107 @@ class RenderText extends SvelteComponent {
3954
3954
  /* src/components/TextElement.svelte generated by Svelte v3.53.1 */
3955
3955
 
3956
3956
  function add_css$h(target) {
3957
- append_styles(target, "svelte-9en2jg", ".text-element.svelte-9en2jg.svelte-9en2jg{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-9en2jg.svelte-9en2jg{width:100%;height:auto}.text-direction-vertical.svelte-9en2jg.svelte-9en2jg{writing-mode:vertical-rl}.text-direction-vertical.svelte-9en2jg .text-element-inner.svelte-9en2jg{width:auto;height:100%}");
3957
+ append_styles(target, "svelte-13cs3g2", ".text-element-wrapper.svelte-13cs3g2.svelte-13cs3g2{position:relative;height:100%}.text-element.svelte-13cs3g2.svelte-13cs3g2{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-13cs3g2.svelte-13cs3g2{width:100%;height:auto}.text-direction-vertical.svelte-13cs3g2.svelte-13cs3g2{writing-mode:vertical-rl}.text-direction-vertical.svelte-13cs3g2 .text-element-inner.svelte-13cs3g2{width:auto;height:100%}.tooltip.svelte-13cs3g2.svelte-13cs3g2{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-13cs3g2.svelte-13cs3g2:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-13cs3g2.svelte-13cs3g2{display:block}.tooltip-error.svelte-13cs3g2.svelte-13cs3g2{background-color:#c00}.tooltip-error.svelte-13cs3g2.svelte-13cs3g2:before{border-bottom:7px solid #c00}");
3958
+ }
3959
+
3960
+ // (56:2) {#if enableCopy}
3961
+ function create_if_block$4(ctx) {
3962
+ let div0;
3963
+ let t1;
3964
+ let div1;
3965
+
3966
+ return {
3967
+ c() {
3968
+ div0 = element("div");
3969
+ div0.textContent = "コピーしました";
3970
+ t1 = space();
3971
+ div1 = element("div");
3972
+ div1.textContent = "コピーできませんでした";
3973
+ attr(div0, "class", "tooltip svelte-13cs3g2");
3974
+ attr(div1, "class", "tooltip tooltip-error svelte-13cs3g2");
3975
+ },
3976
+ m(target, anchor) {
3977
+ insert(target, div0, anchor);
3978
+ /*div0_binding*/ ctx[9](div0);
3979
+ insert(target, t1, anchor);
3980
+ insert(target, div1, anchor);
3981
+ /*div1_binding*/ ctx[10](div1);
3982
+ },
3983
+ p: noop,
3984
+ d(detaching) {
3985
+ if (detaching) detach(div0);
3986
+ /*div0_binding*/ ctx[9](null);
3987
+ if (detaching) detach(t1);
3988
+ if (detaching) detach(div1);
3989
+ /*div1_binding*/ ctx[10](null);
3990
+ }
3991
+ };
3958
3992
  }
3959
3993
 
3960
3994
  function create_fragment$h(ctx) {
3995
+ let div2;
3961
3996
  let div1;
3962
3997
  let div0;
3963
3998
  let rendertext;
3964
3999
  let div1_class_value;
4000
+ let t;
3965
4001
  let current;
4002
+ let mounted;
4003
+ let dispose;
3966
4004
  rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4005
+ let if_block = /*enableCopy*/ ctx[1] && create_if_block$4(ctx);
3967
4006
 
3968
4007
  return {
3969
4008
  c() {
4009
+ div2 = element("div");
3970
4010
  div1 = element("div");
3971
4011
  div0 = element("div");
3972
4012
  create_component(rendertext.$$.fragment);
3973
- attr(div0, "class", "text-element-inner svelte-9en2jg");
3974
- attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"));
3975
- attr(div1, "style", /*style*/ ctx[2]);
4013
+ t = space();
4014
+ if (if_block) if_block.c();
4015
+ attr(div0, "class", "text-element-inner svelte-13cs3g2");
4016
+ attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"));
4017
+ attr(div1, "style", /*style*/ ctx[5]);
4018
+ attr(div2, "class", "text-element-wrapper svelte-13cs3g2");
3976
4019
  },
3977
4020
  m(target, anchor) {
3978
- insert(target, div1, anchor);
4021
+ insert(target, div2, anchor);
4022
+ append(div2, div1);
3979
4023
  append(div1, div0);
3980
4024
  mount_component(rendertext, div0, null);
4025
+ append(div2, t);
4026
+ if (if_block) if_block.m(div2, null);
3981
4027
  current = true;
4028
+
4029
+ if (!mounted) {
4030
+ dispose = listen(div1, "click", /*click*/ ctx[6]);
4031
+ mounted = true;
4032
+ }
3982
4033
  },
3983
4034
  p(ctx, [dirty]) {
3984
4035
  const rendertext_changes = {};
3985
4036
  if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
3986
4037
  rendertext.$set(rendertext_changes);
3987
4038
 
3988
- if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-9en2jg"))) {
4039
+ if (!current || dirty & /*textDirection*/ 4 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"))) {
3989
4040
  attr(div1, "class", div1_class_value);
3990
4041
  }
3991
4042
 
3992
- if (!current || dirty & /*style*/ 4) {
3993
- attr(div1, "style", /*style*/ ctx[2]);
4043
+ if (!current || dirty & /*style*/ 32) {
4044
+ attr(div1, "style", /*style*/ ctx[5]);
4045
+ }
4046
+
4047
+ if (/*enableCopy*/ ctx[1]) {
4048
+ if (if_block) {
4049
+ if_block.p(ctx, dirty);
4050
+ } else {
4051
+ if_block = create_if_block$4(ctx);
4052
+ if_block.c();
4053
+ if_block.m(div2, null);
4054
+ }
4055
+ } else if (if_block) {
4056
+ if_block.d(1);
4057
+ if_block = null;
3994
4058
  }
3995
4059
  },
3996
4060
  i(local) {
@@ -4003,8 +4067,11 @@ function create_fragment$h(ctx) {
4003
4067
  current = false;
4004
4068
  },
4005
4069
  d(detaching) {
4006
- if (detaching) detach(div1);
4070
+ if (detaching) detach(div2);
4007
4071
  destroy_component(rendertext);
4072
+ if (if_block) if_block.d();
4073
+ mounted = false;
4074
+ dispose();
4008
4075
  }
4009
4076
  };
4010
4077
  }
@@ -4012,24 +4079,74 @@ function create_fragment$h(ctx) {
4012
4079
  function instance$h($$self, $$props, $$invalidate) {
4013
4080
  let style;
4014
4081
  let { text = 'サンプルSample' } = $$props;
4082
+ let { enableCopy = false } = $$props;
4083
+ let tooltipEl;
4084
+ let tooltipErrorEl;
4085
+
4086
+ const click = async () => {
4087
+ if (enableCopy) {
4088
+ try {
4089
+ await navigator.clipboard.writeText(text);
4090
+ tooltipEl.classList.add('show');
4091
+ } catch(err) {
4092
+ tooltipErrorEl.classList.add('show');
4093
+ }
4094
+
4095
+ setTimeout(
4096
+ () => {
4097
+ tooltipEl.classList.remove('show');
4098
+ tooltipErrorEl.classList.remove('show');
4099
+ },
4100
+ 1000
4101
+ );
4102
+ }
4103
+ };
4104
+
4015
4105
  let { _textStyle = 'font-size:12px;' } = $$props;
4016
4106
  let { textDirection = 'horizontal' } = $$props;
4017
4107
  let { _style = '' } = $$props;
4018
4108
 
4109
+ function div0_binding($$value) {
4110
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4111
+ tooltipEl = $$value;
4112
+ $$invalidate(3, tooltipEl);
4113
+ });
4114
+ }
4115
+
4116
+ function div1_binding($$value) {
4117
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4118
+ tooltipErrorEl = $$value;
4119
+ $$invalidate(4, tooltipErrorEl);
4120
+ });
4121
+ }
4122
+
4019
4123
  $$self.$$set = $$props => {
4020
4124
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
4021
- if ('_textStyle' in $$props) $$invalidate(3, _textStyle = $$props._textStyle);
4022
- if ('textDirection' in $$props) $$invalidate(1, textDirection = $$props.textDirection);
4023
- if ('_style' in $$props) $$invalidate(4, _style = $$props._style);
4125
+ if ('enableCopy' in $$props) $$invalidate(1, enableCopy = $$props.enableCopy);
4126
+ if ('_textStyle' in $$props) $$invalidate(7, _textStyle = $$props._textStyle);
4127
+ if ('textDirection' in $$props) $$invalidate(2, textDirection = $$props.textDirection);
4128
+ if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
4024
4129
  };
4025
4130
 
4026
4131
  $$self.$$.update = () => {
4027
- if ($$self.$$.dirty & /*_textStyle, _style*/ 24) {
4028
- $$invalidate(2, style = [..._textStyle.split(';'), ..._style.split(';')].join(';'));
4132
+ if ($$self.$$.dirty & /*_textStyle, _style*/ 384) {
4133
+ $$invalidate(5, style = [..._textStyle.split(';'), ..._style.split(';')].join(';'));
4029
4134
  }
4030
4135
  };
4031
4136
 
4032
- return [text, textDirection, style, _textStyle, _style];
4137
+ return [
4138
+ text,
4139
+ enableCopy,
4140
+ textDirection,
4141
+ tooltipEl,
4142
+ tooltipErrorEl,
4143
+ style,
4144
+ click,
4145
+ _textStyle,
4146
+ _style,
4147
+ div0_binding,
4148
+ div1_binding
4149
+ ];
4033
4150
  }
4034
4151
 
4035
4152
  class TextElement extends SvelteComponent {
@@ -4044,9 +4161,10 @@ class TextElement extends SvelteComponent {
4044
4161
  safe_not_equal,
4045
4162
  {
4046
4163
  text: 0,
4047
- _textStyle: 3,
4048
- textDirection: 1,
4049
- _style: 4
4164
+ enableCopy: 1,
4165
+ _textStyle: 7,
4166
+ textDirection: 2,
4167
+ _style: 8
4050
4168
  },
4051
4169
  add_css$h
4052
4170
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.120-27931993.5f24f9af",
3
+ "version": "1.1.120-27932497.7c9501cf",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",