@plaidev/karte-action-sdk 1.1.176-28038941.d49e152f → 1.1.176-28039377.8c3b0568

Sign up to get free protection for your applications and to get access to all the features.
@@ -2651,7 +2651,7 @@ function add_css$r(target) {
2651
2651
  }
2652
2652
 
2653
2653
  // (48:0) {:else}
2654
- function create_else_block$2(ctx) {
2654
+ function create_else_block$3(ctx) {
2655
2655
  let button;
2656
2656
  let current;
2657
2657
  let mounted;
@@ -2967,7 +2967,7 @@ function create_fragment$u(ctx) {
2967
2967
  let if_block;
2968
2968
  let if_block_anchor;
2969
2969
  let current;
2970
- const if_block_creators = [create_if_block$6, create_if_block_1$2, create_if_block_2, create_else_block$2];
2970
+ const if_block_creators = [create_if_block$6, create_if_block_1$2, create_if_block_2, create_else_block$3];
2971
2971
  const if_blocks = [];
2972
2972
 
2973
2973
  function select_block_type(ctx, dirty) {
@@ -4068,7 +4068,7 @@ function get_each_context$6(ctx, list, i) {
4068
4068
  }
4069
4069
 
4070
4070
  // (13:2) {:else}
4071
- function create_else_block$1(ctx) {
4071
+ function create_else_block$2(ctx) {
4072
4072
  let t_value = /*item*/ ctx[2] + "";
4073
4073
  let t;
4074
4074
 
@@ -4121,7 +4121,7 @@ function create_each_block$6(ctx) {
4121
4121
  if (dirty & /*items*/ 1) show_if = null;
4122
4122
  if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
4123
4123
  if (show_if) return create_if_block$4;
4124
- return create_else_block$1;
4124
+ return create_else_block$2;
4125
4125
  }
4126
4126
 
4127
4127
  let current_block_type = select_block_type(ctx, -1);
@@ -4254,159 +4254,163 @@ class RenderText extends SvelteComponent {
4254
4254
  /* src/components/TextElement.svelte generated by Svelte v3.53.1 */
4255
4255
 
4256
4256
  function add_css$o(target) {
4257
- 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}");
4257
+ append_styles(target, "svelte-600oh0", ".text-element-wrapper.svelte-600oh0.svelte-600oh0{position:relative;height:100%}.text-element.svelte-600oh0.svelte-600oh0{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto;margin:0px;padding:0px}.text-link-element.svelte-600oh0.svelte-600oh0{text-decoration:none;color:inherit}.text-element-inner.svelte-600oh0.svelte-600oh0{width:100%;height:auto}.text-direction-vertical.svelte-600oh0.svelte-600oh0{writing-mode:vertical-rl}.text-direction-vertical.svelte-600oh0 .text-element-inner.svelte-600oh0{width:auto;height:100%}.tooltip.svelte-600oh0.svelte-600oh0{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-600oh0.svelte-600oh0:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-600oh0.svelte-600oh0{display:block}.tooltip-error.svelte-600oh0.svelte-600oh0{background-color:#c00}.tooltip-error.svelte-600oh0.svelte-600oh0:before{border-bottom:7px solid #c00}");
4258
4258
  }
4259
4259
 
4260
- // (58:2) {#if enableCopy}
4261
- function create_if_block$3(ctx) {
4262
- let div0;
4263
- let t0;
4264
- let t1;
4260
+ // (78:2) {:else}
4261
+ function create_else_block$1(ctx) {
4265
4262
  let div1;
4266
- let t2;
4263
+ let div0;
4264
+ let rendertext;
4265
+ let div1_class_value;
4266
+ let current;
4267
+ rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4267
4268
 
4268
4269
  return {
4269
4270
  c() {
4270
- div0 = element("div");
4271
- t0 = text("コピーしました");
4272
- t1 = space();
4273
4271
  div1 = element("div");
4274
- t2 = text("コピーできませんでした");
4272
+ div0 = element("div");
4273
+ create_component(rendertext.$$.fragment);
4275
4274
  this.h();
4276
4275
  },
4277
4276
  l(nodes) {
4278
- div0 = claim_element(nodes, "DIV", { class: true });
4277
+ div1 = claim_element(nodes, "DIV", { class: true, style: true });
4278
+ var div1_nodes = children(div1);
4279
+ div0 = claim_element(div1_nodes, "DIV", { class: true });
4279
4280
  var div0_nodes = children(div0);
4280
- t0 = claim_text(div0_nodes, "コピーしました");
4281
+ claim_component(rendertext.$$.fragment, div0_nodes);
4281
4282
  div0_nodes.forEach(detach);
4282
- t1 = claim_space(nodes);
4283
- div1 = claim_element(nodes, "DIV", { class: true });
4284
- var div1_nodes = children(div1);
4285
- t2 = claim_text(div1_nodes, "コピーできませんでした");
4286
4283
  div1_nodes.forEach(detach);
4287
4284
  this.h();
4288
4285
  },
4289
4286
  h() {
4290
- attr(div0, "class", "tooltip svelte-13cs3g2");
4291
- attr(div1, "class", "tooltip tooltip-error svelte-13cs3g2");
4287
+ attr(div0, "class", "text-element-inner svelte-600oh0");
4288
+ attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"));
4289
+ attr(div1, "style", /*style*/ ctx[5]);
4292
4290
  },
4293
4291
  m(target, anchor) {
4294
- insert_hydration(target, div0, anchor);
4295
- append_hydration(div0, t0);
4296
- /*div0_binding*/ ctx[9](div0);
4297
- insert_hydration(target, t1, anchor);
4298
4292
  insert_hydration(target, div1, anchor);
4299
- append_hydration(div1, t2);
4300
- /*div1_binding*/ ctx[10](div1);
4293
+ append_hydration(div1, div0);
4294
+ mount_component(rendertext, div0, null);
4295
+ current = true;
4296
+ },
4297
+ p(ctx, dirty) {
4298
+ const rendertext_changes = {};
4299
+ if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
4300
+ rendertext.$set(rendertext_changes);
4301
+
4302
+ if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"))) {
4303
+ attr(div1, "class", div1_class_value);
4304
+ }
4305
+
4306
+ if (!current || dirty & /*style*/ 32) {
4307
+ attr(div1, "style", /*style*/ ctx[5]);
4308
+ }
4309
+ },
4310
+ i(local) {
4311
+ if (current) return;
4312
+ transition_in(rendertext.$$.fragment, local);
4313
+ current = true;
4314
+ },
4315
+ o(local) {
4316
+ transition_out(rendertext.$$.fragment, local);
4317
+ current = false;
4301
4318
  },
4302
- p: noop,
4303
4319
  d(detaching) {
4304
- if (detaching) detach(div0);
4305
- /*div0_binding*/ ctx[9](null);
4306
- if (detaching) detach(t1);
4307
4320
  if (detaching) detach(div1);
4308
- /*div1_binding*/ ctx[10](null);
4321
+ destroy_component(rendertext);
4309
4322
  }
4310
4323
  };
4311
4324
  }
4312
4325
 
4313
- function create_fragment$p(ctx) {
4314
- let div2;
4315
- let link;
4316
- let link_href_value;
4317
- let t0;
4318
- let div1;
4326
+ // (69:2) {#if enableCopy}
4327
+ function create_if_block$3(ctx) {
4328
+ let a;
4319
4329
  let div0;
4320
4330
  let rendertext;
4321
- let div1_class_value;
4331
+ let a_class_value;
4332
+ let t0;
4333
+ let div1;
4322
4334
  let t1;
4335
+ let t2;
4336
+ let div2;
4337
+ let t3;
4323
4338
  let current;
4324
4339
  let mounted;
4325
4340
  let dispose;
4326
4341
  rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4327
- let if_block = /*enableCopy*/ ctx[1] && create_if_block$3(ctx);
4328
4342
 
4329
4343
  return {
4330
4344
  c() {
4331
- div2 = element("div");
4332
- link = element("link");
4333
- t0 = space();
4334
- div1 = element("div");
4345
+ a = element("a");
4335
4346
  div0 = element("div");
4336
4347
  create_component(rendertext.$$.fragment);
4337
- t1 = space();
4338
- if (if_block) if_block.c();
4348
+ t0 = space();
4349
+ div1 = element("div");
4350
+ t1 = text("コピーしました");
4351
+ t2 = space();
4352
+ div2 = element("div");
4353
+ t3 = text("コピーできませんでした");
4339
4354
  this.h();
4340
4355
  },
4341
4356
  l(nodes) {
4342
- div2 = claim_element(nodes, "DIV", { class: true });
4343
- var div2_nodes = children(div2);
4344
- link = claim_element(div2_nodes, "LINK", { href: true, rel: true });
4345
- t0 = claim_space(div2_nodes);
4346
- div1 = claim_element(div2_nodes, "DIV", { class: true, style: true });
4347
- var div1_nodes = children(div1);
4348
- div0 = claim_element(div1_nodes, "DIV", { class: true });
4357
+ a = claim_element(nodes, "A", { href: true, class: true, style: true });
4358
+ var a_nodes = children(a);
4359
+ div0 = claim_element(a_nodes, "DIV", { class: true });
4349
4360
  var div0_nodes = children(div0);
4350
4361
  claim_component(rendertext.$$.fragment, div0_nodes);
4351
4362
  div0_nodes.forEach(detach);
4363
+ a_nodes.forEach(detach);
4364
+ t0 = claim_space(nodes);
4365
+ div1 = claim_element(nodes, "DIV", { class: true });
4366
+ var div1_nodes = children(div1);
4367
+ t1 = claim_text(div1_nodes, "コピーしました");
4352
4368
  div1_nodes.forEach(detach);
4353
- t1 = claim_space(div2_nodes);
4354
- if (if_block) if_block.l(div2_nodes);
4369
+ t2 = claim_space(nodes);
4370
+ div2 = claim_element(nodes, "DIV", { class: true });
4371
+ var div2_nodes = children(div2);
4372
+ t3 = claim_text(div2_nodes, "コピーできませんでした");
4355
4373
  div2_nodes.forEach(detach);
4356
4374
  this.h();
4357
4375
  },
4358
4376
  h() {
4359
- attr(link, "href", link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`);
4360
- attr(link, "rel", "stylesheet");
4361
- attr(div0, "class", "text-element-inner svelte-13cs3g2");
4362
- attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"));
4363
- attr(div1, "style", /*style*/ ctx[5]);
4364
- attr(div2, "class", "text-element-wrapper svelte-13cs3g2");
4377
+ attr(div0, "class", "text-element-inner svelte-600oh0");
4378
+ attr(a, "href", '');
4379
+ attr(a, "class", a_class_value = "" + (null_to_empty(`text-element text-link-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"));
4380
+ attr(a, "style", /*style*/ ctx[5]);
4381
+ attr(div1, "class", "tooltip svelte-600oh0");
4382
+ attr(div2, "class", "tooltip tooltip-error svelte-600oh0");
4365
4383
  },
4366
4384
  m(target, anchor) {
4367
- insert_hydration(target, div2, anchor);
4368
- append_hydration(div2, link);
4369
- append_hydration(div2, t0);
4370
- append_hydration(div2, div1);
4371
- append_hydration(div1, div0);
4385
+ insert_hydration(target, a, anchor);
4386
+ append_hydration(a, div0);
4372
4387
  mount_component(rendertext, div0, null);
4373
- append_hydration(div2, t1);
4374
- if (if_block) if_block.m(div2, null);
4388
+ insert_hydration(target, t0, anchor);
4389
+ insert_hydration(target, div1, anchor);
4390
+ append_hydration(div1, t1);
4391
+ /*div1_binding*/ ctx[10](div1);
4392
+ insert_hydration(target, t2, anchor);
4393
+ insert_hydration(target, div2, anchor);
4394
+ append_hydration(div2, t3);
4395
+ /*div2_binding*/ ctx[11](div2);
4375
4396
  current = true;
4376
4397
 
4377
4398
  if (!mounted) {
4378
- dispose = listen(div1, "click", /*click*/ ctx[6]);
4399
+ dispose = listen(a, "click", /*onCopy*/ ctx[6]);
4379
4400
  mounted = true;
4380
4401
  }
4381
4402
  },
4382
- p(ctx, [dirty]) {
4383
- if (!current || dirty & /*text*/ 1 && link_href_value !== (link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`)) {
4384
- attr(link, "href", link_href_value);
4385
- }
4386
-
4403
+ p(ctx, dirty) {
4387
4404
  const rendertext_changes = {};
4388
4405
  if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
4389
4406
  rendertext.$set(rendertext_changes);
4390
4407
 
4391
- if (!current || dirty & /*textDirection*/ 4 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"))) {
4392
- attr(div1, "class", div1_class_value);
4408
+ if (!current || dirty & /*textDirection*/ 2 && a_class_value !== (a_class_value = "" + (null_to_empty(`text-element text-link-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"))) {
4409
+ attr(a, "class", a_class_value);
4393
4410
  }
4394
4411
 
4395
4412
  if (!current || dirty & /*style*/ 32) {
4396
- attr(div1, "style", /*style*/ ctx[5]);
4397
- }
4398
-
4399
- if (/*enableCopy*/ ctx[1]) {
4400
- if (if_block) {
4401
- if_block.p(ctx, dirty);
4402
- } else {
4403
- if_block = create_if_block$3(ctx);
4404
- if_block.c();
4405
- if_block.m(div2, null);
4406
- }
4407
- } else if (if_block) {
4408
- if_block.d(1);
4409
- if_block = null;
4413
+ attr(a, "style", /*style*/ ctx[5]);
4410
4414
  }
4411
4415
  },
4412
4416
  i(local) {
@@ -4419,53 +4423,159 @@ function create_fragment$p(ctx) {
4419
4423
  current = false;
4420
4424
  },
4421
4425
  d(detaching) {
4422
- if (detaching) detach(div2);
4426
+ if (detaching) detach(a);
4423
4427
  destroy_component(rendertext);
4424
- if (if_block) if_block.d();
4428
+ if (detaching) detach(t0);
4429
+ if (detaching) detach(div1);
4430
+ /*div1_binding*/ ctx[10](null);
4431
+ if (detaching) detach(t2);
4432
+ if (detaching) detach(div2);
4433
+ /*div2_binding*/ ctx[11](null);
4425
4434
  mounted = false;
4426
4435
  dispose();
4427
4436
  }
4428
4437
  };
4429
4438
  }
4430
4439
 
4440
+ function create_fragment$p(ctx) {
4441
+ let div;
4442
+ let link;
4443
+ let link_href_value;
4444
+ let t;
4445
+ let current_block_type_index;
4446
+ let if_block;
4447
+ let current;
4448
+ const if_block_creators = [create_if_block$3, create_else_block$1];
4449
+ const if_blocks = [];
4450
+
4451
+ function select_block_type(ctx, dirty) {
4452
+ if (/*enableCopy*/ ctx[2]) return 0;
4453
+ return 1;
4454
+ }
4455
+
4456
+ current_block_type_index = select_block_type(ctx);
4457
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
4458
+
4459
+ return {
4460
+ c() {
4461
+ div = element("div");
4462
+ link = element("link");
4463
+ t = space();
4464
+ if_block.c();
4465
+ this.h();
4466
+ },
4467
+ l(nodes) {
4468
+ div = claim_element(nodes, "DIV", { class: true });
4469
+ var div_nodes = children(div);
4470
+ link = claim_element(div_nodes, "LINK", { href: true, rel: true });
4471
+ t = claim_space(div_nodes);
4472
+ if_block.l(div_nodes);
4473
+ div_nodes.forEach(detach);
4474
+ this.h();
4475
+ },
4476
+ h() {
4477
+ attr(link, "href", link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`);
4478
+ attr(link, "rel", "stylesheet");
4479
+ attr(div, "class", "text-element-wrapper svelte-600oh0");
4480
+ },
4481
+ m(target, anchor) {
4482
+ insert_hydration(target, div, anchor);
4483
+ append_hydration(div, link);
4484
+ append_hydration(div, t);
4485
+ if_blocks[current_block_type_index].m(div, null);
4486
+ current = true;
4487
+ },
4488
+ p(ctx, [dirty]) {
4489
+ if (!current || dirty & /*text*/ 1 && link_href_value !== (link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`)) {
4490
+ attr(link, "href", link_href_value);
4491
+ }
4492
+
4493
+ let previous_block_index = current_block_type_index;
4494
+ current_block_type_index = select_block_type(ctx);
4495
+
4496
+ if (current_block_type_index === previous_block_index) {
4497
+ if_blocks[current_block_type_index].p(ctx, dirty);
4498
+ } else {
4499
+ group_outros();
4500
+
4501
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
4502
+ if_blocks[previous_block_index] = null;
4503
+ });
4504
+
4505
+ check_outros();
4506
+ if_block = if_blocks[current_block_type_index];
4507
+
4508
+ if (!if_block) {
4509
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
4510
+ if_block.c();
4511
+ } else {
4512
+ if_block.p(ctx, dirty);
4513
+ }
4514
+
4515
+ transition_in(if_block, 1);
4516
+ if_block.m(div, null);
4517
+ }
4518
+ },
4519
+ i(local) {
4520
+ if (current) return;
4521
+ transition_in(if_block);
4522
+ current = true;
4523
+ },
4524
+ o(local) {
4525
+ transition_out(if_block);
4526
+ current = false;
4527
+ },
4528
+ d(detaching) {
4529
+ if (detaching) detach(div);
4530
+ if_blocks[current_block_type_index].d();
4531
+ }
4532
+ };
4533
+ }
4534
+
4431
4535
  function instance$p($$self, $$props, $$invalidate) {
4432
4536
  let style;
4433
4537
  let { text = 'サンプルSample' } = $$props;
4538
+ let { _textStyle = 'font-size:12px; line-height: 1.5;' } = $$props;
4539
+ let { textDirection = 'horizontal' } = $$props;
4540
+ let { _style = '' } = $$props;
4434
4541
  let { enableCopy = false } = $$props;
4542
+ let { eventName = '' } = $$props;
4543
+ let eventValue = undefined;
4435
4544
  let tooltipEl;
4436
4545
  let tooltipErrorEl;
4437
4546
 
4438
- const click = async () => {
4439
- if (enableCopy) {
4440
- try {
4441
- await navigator.clipboard.writeText(text);
4442
- tooltipEl.classList.add('show');
4443
- } catch(err) {
4444
- tooltipErrorEl.classList.add('show');
4445
- }
4446
-
4447
- setTimeout(
4448
- () => {
4449
- tooltipEl.classList.remove('show');
4450
- tooltipErrorEl.classList.remove('show');
4451
- },
4452
- 1000
4453
- );
4547
+ const onCopy = async e => {
4548
+ e.preventDefault();
4549
+
4550
+ try {
4551
+ await navigator.clipboard.writeText(text);
4552
+
4553
+ if (eventName) {
4554
+ send_event(eventName, eventValue);
4555
+ }
4556
+
4557
+ tooltipEl.classList.add('show');
4558
+ } catch(err) {
4559
+ tooltipErrorEl.classList.add('show');
4454
4560
  }
4455
- };
4456
4561
 
4457
- let { _textStyle = 'font-size:12px; line-height: 1.5;' } = $$props;
4458
- let { textDirection = 'horizontal' } = $$props;
4459
- let { _style = '' } = $$props;
4562
+ setTimeout(
4563
+ () => {
4564
+ tooltipEl.classList.remove('show');
4565
+ tooltipErrorEl.classList.remove('show');
4566
+ },
4567
+ 1000
4568
+ );
4569
+ };
4460
4570
 
4461
- function div0_binding($$value) {
4571
+ function div1_binding($$value) {
4462
4572
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4463
4573
  tooltipEl = $$value;
4464
4574
  $$invalidate(3, tooltipEl);
4465
4575
  });
4466
4576
  }
4467
4577
 
4468
- function div1_binding($$value) {
4578
+ function div2_binding($$value) {
4469
4579
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4470
4580
  tooltipErrorEl = $$value;
4471
4581
  $$invalidate(4, tooltipErrorEl);
@@ -4474,10 +4584,11 @@ function instance$p($$self, $$props, $$invalidate) {
4474
4584
 
4475
4585
  $$self.$$set = $$props => {
4476
4586
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
4477
- if ('enableCopy' in $$props) $$invalidate(1, enableCopy = $$props.enableCopy);
4478
4587
  if ('_textStyle' in $$props) $$invalidate(7, _textStyle = $$props._textStyle);
4479
- if ('textDirection' in $$props) $$invalidate(2, textDirection = $$props.textDirection);
4588
+ if ('textDirection' in $$props) $$invalidate(1, textDirection = $$props.textDirection);
4480
4589
  if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
4590
+ if ('enableCopy' in $$props) $$invalidate(2, enableCopy = $$props.enableCopy);
4591
+ if ('eventName' in $$props) $$invalidate(9, eventName = $$props.eventName);
4481
4592
  };
4482
4593
 
4483
4594
  $$self.$$.update = () => {
@@ -4488,16 +4599,17 @@ function instance$p($$self, $$props, $$invalidate) {
4488
4599
 
4489
4600
  return [
4490
4601
  text,
4491
- enableCopy,
4492
4602
  textDirection,
4603
+ enableCopy,
4493
4604
  tooltipEl,
4494
4605
  tooltipErrorEl,
4495
4606
  style,
4496
- click,
4607
+ onCopy,
4497
4608
  _textStyle,
4498
4609
  _style,
4499
- div0_binding,
4500
- div1_binding
4610
+ eventName,
4611
+ div1_binding,
4612
+ div2_binding
4501
4613
  ];
4502
4614
  }
4503
4615
 
@@ -4513,10 +4625,11 @@ class TextElement extends SvelteComponent {
4513
4625
  safe_not_equal,
4514
4626
  {
4515
4627
  text: 0,
4516
- enableCopy: 1,
4517
4628
  _textStyle: 7,
4518
- textDirection: 2,
4519
- _style: 8
4629
+ textDirection: 1,
4630
+ _style: 8,
4631
+ enableCopy: 2,
4632
+ eventName: 9
4520
4633
  },
4521
4634
  add_css$o
4522
4635
  );
package/dist/index.es.js CHANGED
@@ -2731,7 +2731,7 @@ function add_css$r(target) {
2731
2731
  }
2732
2732
 
2733
2733
  // (48:0) {:else}
2734
- function create_else_block$2(ctx) {
2734
+ function create_else_block$3(ctx) {
2735
2735
  let button;
2736
2736
  let current;
2737
2737
  let mounted;
@@ -3001,7 +3001,7 @@ function create_fragment$u(ctx) {
3001
3001
  let if_block;
3002
3002
  let if_block_anchor;
3003
3003
  let current;
3004
- const if_block_creators = [create_if_block$6, create_if_block_1$2, create_if_block_2, create_else_block$2];
3004
+ const if_block_creators = [create_if_block$6, create_if_block_1$2, create_if_block_2, create_else_block$3];
3005
3005
  const if_blocks = [];
3006
3006
 
3007
3007
  function select_block_type(ctx, dirty) {
@@ -3998,7 +3998,7 @@ function get_each_context$6(ctx, list, i) {
3998
3998
  }
3999
3999
 
4000
4000
  // (13:2) {:else}
4001
- function create_else_block$1(ctx) {
4001
+ function create_else_block$2(ctx) {
4002
4002
  let t_value = /*item*/ ctx[2] + "";
4003
4003
  let t;
4004
4004
 
@@ -4045,7 +4045,7 @@ function create_each_block$6(ctx) {
4045
4045
  if (dirty & /*items*/ 1) show_if = null;
4046
4046
  if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
4047
4047
  if (show_if) return create_if_block$4;
4048
- return create_else_block$1;
4048
+ return create_else_block$2;
4049
4049
  }
4050
4050
 
4051
4051
  let current_block_type = select_block_type(ctx, -1);
@@ -4167,120 +4167,123 @@ class RenderText extends SvelteComponent {
4167
4167
  /* src/components/TextElement.svelte generated by Svelte v3.53.1 */
4168
4168
 
4169
4169
  function add_css$o(target) {
4170
- 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}");
4170
+ append_styles(target, "svelte-600oh0", ".text-element-wrapper.svelte-600oh0.svelte-600oh0{position:relative;height:100%}.text-element.svelte-600oh0.svelte-600oh0{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto;margin:0px;padding:0px}.text-link-element.svelte-600oh0.svelte-600oh0{text-decoration:none;color:inherit}.text-element-inner.svelte-600oh0.svelte-600oh0{width:100%;height:auto}.text-direction-vertical.svelte-600oh0.svelte-600oh0{writing-mode:vertical-rl}.text-direction-vertical.svelte-600oh0 .text-element-inner.svelte-600oh0{width:auto;height:100%}.tooltip.svelte-600oh0.svelte-600oh0{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-600oh0.svelte-600oh0:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-600oh0.svelte-600oh0{display:block}.tooltip-error.svelte-600oh0.svelte-600oh0{background-color:#c00}.tooltip-error.svelte-600oh0.svelte-600oh0:before{border-bottom:7px solid #c00}");
4171
4171
  }
4172
4172
 
4173
- // (58:2) {#if enableCopy}
4174
- function create_if_block$3(ctx) {
4175
- let div0;
4176
- let t1;
4173
+ // (78:2) {:else}
4174
+ function create_else_block$1(ctx) {
4177
4175
  let div1;
4176
+ let div0;
4177
+ let rendertext;
4178
+ let div1_class_value;
4179
+ let current;
4180
+ rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4178
4181
 
4179
4182
  return {
4180
4183
  c() {
4181
- div0 = element("div");
4182
- div0.textContent = "コピーしました";
4183
- t1 = space();
4184
4184
  div1 = element("div");
4185
- div1.textContent = "コピーできませんでした";
4186
- attr(div0, "class", "tooltip svelte-13cs3g2");
4187
- attr(div1, "class", "tooltip tooltip-error svelte-13cs3g2");
4185
+ div0 = element("div");
4186
+ create_component(rendertext.$$.fragment);
4187
+ attr(div0, "class", "text-element-inner svelte-600oh0");
4188
+ attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"));
4189
+ attr(div1, "style", /*style*/ ctx[5]);
4188
4190
  },
4189
4191
  m(target, anchor) {
4190
- insert(target, div0, anchor);
4191
- /*div0_binding*/ ctx[9](div0);
4192
- insert(target, t1, anchor);
4193
4192
  insert(target, div1, anchor);
4194
- /*div1_binding*/ ctx[10](div1);
4193
+ append(div1, div0);
4194
+ mount_component(rendertext, div0, null);
4195
+ current = true;
4196
+ },
4197
+ p(ctx, dirty) {
4198
+ const rendertext_changes = {};
4199
+ if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
4200
+ rendertext.$set(rendertext_changes);
4201
+
4202
+ if (!current || dirty & /*textDirection*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"))) {
4203
+ attr(div1, "class", div1_class_value);
4204
+ }
4205
+
4206
+ if (!current || dirty & /*style*/ 32) {
4207
+ attr(div1, "style", /*style*/ ctx[5]);
4208
+ }
4209
+ },
4210
+ i(local) {
4211
+ if (current) return;
4212
+ transition_in(rendertext.$$.fragment, local);
4213
+ current = true;
4214
+ },
4215
+ o(local) {
4216
+ transition_out(rendertext.$$.fragment, local);
4217
+ current = false;
4195
4218
  },
4196
- p: noop,
4197
4219
  d(detaching) {
4198
- if (detaching) detach(div0);
4199
- /*div0_binding*/ ctx[9](null);
4200
- if (detaching) detach(t1);
4201
4220
  if (detaching) detach(div1);
4202
- /*div1_binding*/ ctx[10](null);
4221
+ destroy_component(rendertext);
4203
4222
  }
4204
4223
  };
4205
4224
  }
4206
4225
 
4207
- function create_fragment$p(ctx) {
4208
- let div2;
4209
- let link;
4210
- let link_href_value;
4211
- let t0;
4212
- let div1;
4226
+ // (69:2) {#if enableCopy}
4227
+ function create_if_block$3(ctx) {
4228
+ let a;
4213
4229
  let div0;
4214
4230
  let rendertext;
4215
- let div1_class_value;
4216
- let t1;
4231
+ let a_class_value;
4232
+ let t0;
4233
+ let div1;
4234
+ let t2;
4235
+ let div2;
4217
4236
  let current;
4218
4237
  let mounted;
4219
4238
  let dispose;
4220
4239
  rendertext = new RenderText({ props: { text: /*text*/ ctx[0] } });
4221
- let if_block = /*enableCopy*/ ctx[1] && create_if_block$3(ctx);
4222
4240
 
4223
4241
  return {
4224
4242
  c() {
4225
- div2 = element("div");
4226
- link = element("link");
4227
- t0 = space();
4228
- div1 = element("div");
4243
+ a = element("a");
4229
4244
  div0 = element("div");
4230
4245
  create_component(rendertext.$$.fragment);
4231
- t1 = space();
4232
- if (if_block) if_block.c();
4233
- attr(link, "href", link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`);
4234
- attr(link, "rel", "stylesheet");
4235
- attr(div0, "class", "text-element-inner svelte-13cs3g2");
4236
- attr(div1, "class", div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"));
4237
- attr(div1, "style", /*style*/ ctx[5]);
4238
- attr(div2, "class", "text-element-wrapper svelte-13cs3g2");
4246
+ t0 = space();
4247
+ div1 = element("div");
4248
+ div1.textContent = "コピーしました";
4249
+ t2 = space();
4250
+ div2 = element("div");
4251
+ div2.textContent = "コピーできませんでした";
4252
+ attr(div0, "class", "text-element-inner svelte-600oh0");
4253
+ attr(a, "href", '');
4254
+ attr(a, "class", a_class_value = "" + (null_to_empty(`text-element text-link-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"));
4255
+ attr(a, "style", /*style*/ ctx[5]);
4256
+ attr(div1, "class", "tooltip svelte-600oh0");
4257
+ attr(div2, "class", "tooltip tooltip-error svelte-600oh0");
4239
4258
  },
4240
4259
  m(target, anchor) {
4241
- insert(target, div2, anchor);
4242
- append(div2, link);
4243
- append(div2, t0);
4244
- append(div2, div1);
4245
- append(div1, div0);
4260
+ insert(target, a, anchor);
4261
+ append(a, div0);
4246
4262
  mount_component(rendertext, div0, null);
4247
- append(div2, t1);
4248
- if (if_block) if_block.m(div2, null);
4263
+ insert(target, t0, anchor);
4264
+ insert(target, div1, anchor);
4265
+ /*div1_binding*/ ctx[10](div1);
4266
+ insert(target, t2, anchor);
4267
+ insert(target, div2, anchor);
4268
+ /*div2_binding*/ ctx[11](div2);
4249
4269
  current = true;
4250
4270
 
4251
4271
  if (!mounted) {
4252
- dispose = listen(div1, "click", /*click*/ ctx[6]);
4272
+ dispose = listen(a, "click", /*onCopy*/ ctx[6]);
4253
4273
  mounted = true;
4254
4274
  }
4255
4275
  },
4256
- p(ctx, [dirty]) {
4257
- if (!current || dirty & /*text*/ 1 && link_href_value !== (link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`)) {
4258
- attr(link, "href", link_href_value);
4259
- }
4260
-
4276
+ p(ctx, dirty) {
4261
4277
  const rendertext_changes = {};
4262
4278
  if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
4263
4279
  rendertext.$set(rendertext_changes);
4264
4280
 
4265
- if (!current || dirty & /*textDirection*/ 4 && div1_class_value !== (div1_class_value = "" + (null_to_empty(`text-element text-direction-${/*textDirection*/ ctx[2]}`) + " svelte-13cs3g2"))) {
4266
- attr(div1, "class", div1_class_value);
4281
+ if (!current || dirty & /*textDirection*/ 2 && a_class_value !== (a_class_value = "" + (null_to_empty(`text-element text-link-element text-direction-${/*textDirection*/ ctx[1]}`) + " svelte-600oh0"))) {
4282
+ attr(a, "class", a_class_value);
4267
4283
  }
4268
4284
 
4269
4285
  if (!current || dirty & /*style*/ 32) {
4270
- attr(div1, "style", /*style*/ ctx[5]);
4271
- }
4272
-
4273
- if (/*enableCopy*/ ctx[1]) {
4274
- if (if_block) {
4275
- if_block.p(ctx, dirty);
4276
- } else {
4277
- if_block = create_if_block$3(ctx);
4278
- if_block.c();
4279
- if_block.m(div2, null);
4280
- }
4281
- } else if (if_block) {
4282
- if_block.d(1);
4283
- if_block = null;
4286
+ attr(a, "style", /*style*/ ctx[5]);
4284
4287
  }
4285
4288
  },
4286
4289
  i(local) {
@@ -4293,53 +4296,147 @@ function create_fragment$p(ctx) {
4293
4296
  current = false;
4294
4297
  },
4295
4298
  d(detaching) {
4296
- if (detaching) detach(div2);
4299
+ if (detaching) detach(a);
4297
4300
  destroy_component(rendertext);
4298
- if (if_block) if_block.d();
4301
+ if (detaching) detach(t0);
4302
+ if (detaching) detach(div1);
4303
+ /*div1_binding*/ ctx[10](null);
4304
+ if (detaching) detach(t2);
4305
+ if (detaching) detach(div2);
4306
+ /*div2_binding*/ ctx[11](null);
4299
4307
  mounted = false;
4300
4308
  dispose();
4301
4309
  }
4302
4310
  };
4303
4311
  }
4304
4312
 
4313
+ function create_fragment$p(ctx) {
4314
+ let div;
4315
+ let link;
4316
+ let link_href_value;
4317
+ let t;
4318
+ let current_block_type_index;
4319
+ let if_block;
4320
+ let current;
4321
+ const if_block_creators = [create_if_block$3, create_else_block$1];
4322
+ const if_blocks = [];
4323
+
4324
+ function select_block_type(ctx, dirty) {
4325
+ if (/*enableCopy*/ ctx[2]) return 0;
4326
+ return 1;
4327
+ }
4328
+
4329
+ current_block_type_index = select_block_type(ctx);
4330
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
4331
+
4332
+ return {
4333
+ c() {
4334
+ div = element("div");
4335
+ link = element("link");
4336
+ t = space();
4337
+ if_block.c();
4338
+ attr(link, "href", link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`);
4339
+ attr(link, "rel", "stylesheet");
4340
+ attr(div, "class", "text-element-wrapper svelte-600oh0");
4341
+ },
4342
+ m(target, anchor) {
4343
+ insert(target, div, anchor);
4344
+ append(div, link);
4345
+ append(div, t);
4346
+ if_blocks[current_block_type_index].m(div, null);
4347
+ current = true;
4348
+ },
4349
+ p(ctx, [dirty]) {
4350
+ if (!current || dirty & /*text*/ 1 && link_href_value !== (link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`)) {
4351
+ attr(link, "href", link_href_value);
4352
+ }
4353
+
4354
+ let previous_block_index = current_block_type_index;
4355
+ current_block_type_index = select_block_type(ctx);
4356
+
4357
+ if (current_block_type_index === previous_block_index) {
4358
+ if_blocks[current_block_type_index].p(ctx, dirty);
4359
+ } else {
4360
+ group_outros();
4361
+
4362
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
4363
+ if_blocks[previous_block_index] = null;
4364
+ });
4365
+
4366
+ check_outros();
4367
+ if_block = if_blocks[current_block_type_index];
4368
+
4369
+ if (!if_block) {
4370
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
4371
+ if_block.c();
4372
+ } else {
4373
+ if_block.p(ctx, dirty);
4374
+ }
4375
+
4376
+ transition_in(if_block, 1);
4377
+ if_block.m(div, null);
4378
+ }
4379
+ },
4380
+ i(local) {
4381
+ if (current) return;
4382
+ transition_in(if_block);
4383
+ current = true;
4384
+ },
4385
+ o(local) {
4386
+ transition_out(if_block);
4387
+ current = false;
4388
+ },
4389
+ d(detaching) {
4390
+ if (detaching) detach(div);
4391
+ if_blocks[current_block_type_index].d();
4392
+ }
4393
+ };
4394
+ }
4395
+
4305
4396
  function instance$p($$self, $$props, $$invalidate) {
4306
4397
  let style;
4307
4398
  let { text = 'サンプルSample' } = $$props;
4399
+ let { _textStyle = 'font-size:12px; line-height: 1.5;' } = $$props;
4400
+ let { textDirection = 'horizontal' } = $$props;
4401
+ let { _style = '' } = $$props;
4308
4402
  let { enableCopy = false } = $$props;
4403
+ let { eventName = '' } = $$props;
4404
+ let eventValue = undefined;
4309
4405
  let tooltipEl;
4310
4406
  let tooltipErrorEl;
4311
4407
 
4312
- const click = async () => {
4313
- if (enableCopy) {
4314
- try {
4315
- await navigator.clipboard.writeText(text);
4316
- tooltipEl.classList.add('show');
4317
- } catch(err) {
4318
- tooltipErrorEl.classList.add('show');
4408
+ const onCopy = async e => {
4409
+ e.preventDefault();
4410
+
4411
+ try {
4412
+ await navigator.clipboard.writeText(text);
4413
+
4414
+ if (eventName) {
4415
+ send_event(eventName, eventValue);
4319
4416
  }
4320
4417
 
4321
- setTimeout(
4322
- () => {
4323
- tooltipEl.classList.remove('show');
4324
- tooltipErrorEl.classList.remove('show');
4325
- },
4326
- 1000
4327
- );
4418
+ tooltipEl.classList.add('show');
4419
+ } catch(err) {
4420
+ tooltipErrorEl.classList.add('show');
4328
4421
  }
4329
- };
4330
4422
 
4331
- let { _textStyle = 'font-size:12px; line-height: 1.5;' } = $$props;
4332
- let { textDirection = 'horizontal' } = $$props;
4333
- let { _style = '' } = $$props;
4423
+ setTimeout(
4424
+ () => {
4425
+ tooltipEl.classList.remove('show');
4426
+ tooltipErrorEl.classList.remove('show');
4427
+ },
4428
+ 1000
4429
+ );
4430
+ };
4334
4431
 
4335
- function div0_binding($$value) {
4432
+ function div1_binding($$value) {
4336
4433
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4337
4434
  tooltipEl = $$value;
4338
4435
  $$invalidate(3, tooltipEl);
4339
4436
  });
4340
4437
  }
4341
4438
 
4342
- function div1_binding($$value) {
4439
+ function div2_binding($$value) {
4343
4440
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
4344
4441
  tooltipErrorEl = $$value;
4345
4442
  $$invalidate(4, tooltipErrorEl);
@@ -4348,10 +4445,11 @@ function instance$p($$self, $$props, $$invalidate) {
4348
4445
 
4349
4446
  $$self.$$set = $$props => {
4350
4447
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
4351
- if ('enableCopy' in $$props) $$invalidate(1, enableCopy = $$props.enableCopy);
4352
4448
  if ('_textStyle' in $$props) $$invalidate(7, _textStyle = $$props._textStyle);
4353
- if ('textDirection' in $$props) $$invalidate(2, textDirection = $$props.textDirection);
4449
+ if ('textDirection' in $$props) $$invalidate(1, textDirection = $$props.textDirection);
4354
4450
  if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
4451
+ if ('enableCopy' in $$props) $$invalidate(2, enableCopy = $$props.enableCopy);
4452
+ if ('eventName' in $$props) $$invalidate(9, eventName = $$props.eventName);
4355
4453
  };
4356
4454
 
4357
4455
  $$self.$$.update = () => {
@@ -4362,16 +4460,17 @@ function instance$p($$self, $$props, $$invalidate) {
4362
4460
 
4363
4461
  return [
4364
4462
  text,
4365
- enableCopy,
4366
4463
  textDirection,
4464
+ enableCopy,
4367
4465
  tooltipEl,
4368
4466
  tooltipErrorEl,
4369
4467
  style,
4370
- click,
4468
+ onCopy,
4371
4469
  _textStyle,
4372
4470
  _style,
4373
- div0_binding,
4374
- div1_binding
4471
+ eventName,
4472
+ div1_binding,
4473
+ div2_binding
4375
4474
  ];
4376
4475
  }
4377
4476
 
@@ -4387,10 +4486,11 @@ class TextElement extends SvelteComponent {
4387
4486
  safe_not_equal,
4388
4487
  {
4389
4488
  text: 0,
4390
- enableCopy: 1,
4391
4489
  _textStyle: 7,
4392
- textDirection: 2,
4393
- _style: 8
4490
+ textDirection: 1,
4491
+ _style: 8,
4492
+ enableCopy: 2,
4493
+ eventName: 9
4394
4494
  },
4395
4495
  add_css$o
4396
4496
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.176-28038941.d49e152f",
3
+ "version": "1.1.176-28039377.8c3b0568",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",