@plaidev/karte-action-sdk 1.1.206-28201768.b3b325dd → 1.1.206-28211793.cd4e1282

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.
@@ -1333,12 +1333,24 @@ function request(url, data, cb) {
1333
1333
  }
1334
1334
  /** @internal */
1335
1335
  const loadActionTableRow = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
1336
+ const defaultValue = config.query.default_value ?? null;
1336
1337
  const key = data[config.query.key] ?? null;
1337
1338
  if (key == null) {
1338
1339
  console.warn('key is not found. key: ', config.query.key);
1340
+ if (defaultValue != null) {
1341
+ return resolve(defaultValue);
1342
+ }
1339
1343
  return reject('key is not found.');
1340
1344
  }
1341
- return collection$1({ endpoint, api_key, table: config.query.table_name }).get(key, (err, data) => err ? reject(err) : resolve(data));
1345
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).get(key, (err, data) => {
1346
+ if (!err) {
1347
+ resolve(data);
1348
+ }
1349
+ if (defaultValue != null) {
1350
+ resolve(defaultValue);
1351
+ }
1352
+ reject(err);
1353
+ });
1342
1354
  });
1343
1355
  /** @internal */
1344
1356
  const loadActionTableRows = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
@@ -1346,21 +1358,33 @@ const loadActionTableRows = async (config, data, api_key, endpoint) => new Promi
1346
1358
  console.warn('key is not defined.');
1347
1359
  return reject('key is not defined.');
1348
1360
  }
1361
+ const defaultValue = config.query.default_value ?? null;
1349
1362
  const keys = [];
1350
1363
  let hasError = false;
1351
1364
  const originalKeys = Array.isArray(config.query.key) ? config.query.key : [config.query.key];
1352
1365
  originalKeys.forEach(key => {
1353
1366
  const d = data[key];
1354
- if (d == null) {
1367
+ if (d == null || d === '') {
1355
1368
  console.warn('key is not found. key: ', key);
1356
1369
  hasError = true;
1357
1370
  }
1358
1371
  keys.push(d);
1359
1372
  });
1360
1373
  if (hasError) {
1374
+ if (defaultValue != null) {
1375
+ return resolve(defaultValue);
1376
+ }
1361
1377
  return reject('key is not found.');
1362
1378
  }
1363
- return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => (err ? reject(err) : resolve(data)));
1379
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => {
1380
+ if (!err) {
1381
+ resolve(data);
1382
+ }
1383
+ if (defaultValue != null) {
1384
+ resolve(defaultValue);
1385
+ }
1386
+ reject(err);
1387
+ });
1364
1388
  });
1365
1389
  /** @internal */
1366
1390
  const loadActionTableQuery = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
@@ -1368,20 +1392,32 @@ const loadActionTableQuery = async (config, data, api_key, endpoint) => new Prom
1368
1392
  console.warn('key is not defined.');
1369
1393
  return reject('key is not defined.');
1370
1394
  }
1395
+ const defaultValue = config.query.default_value ?? null;
1371
1396
  const params = {};
1372
1397
  let hasError = false;
1373
1398
  Object.entries(config.query.params).forEach(([key, param]) => {
1374
1399
  const d = data[param];
1375
- if (d == null) {
1400
+ if (d == null || d === '') {
1376
1401
  console.warn('key is not found. param: ', param);
1377
1402
  hasError = true;
1378
1403
  }
1379
1404
  params[key] = d;
1380
1405
  });
1381
1406
  if (hasError) {
1407
+ if (defaultValue != null) {
1408
+ return resolve(defaultValue);
1409
+ }
1382
1410
  return reject('key is not found.');
1383
1411
  }
1384
- return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => (err ? reject(err) : resolve(data)));
1412
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => {
1413
+ if (!err) {
1414
+ resolve(data);
1415
+ }
1416
+ if (defaultValue != null) {
1417
+ resolve(defaultValue);
1418
+ }
1419
+ reject(err);
1420
+ });
1385
1421
  });
1386
1422
  /** @internal */
1387
1423
  const loadActionTable = async (config, data, api_key, endpoint) => {
@@ -6493,7 +6529,7 @@ class MovieVimeoElement extends SvelteComponent {
6493
6529
  /* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
6494
6530
 
6495
6531
  function add_css$g(target) {
6496
- append_styles(target, "svelte-kyay3k", ".textarea-wrapper.svelte-kyay3k{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-kyay3k{width:100%;resize:none}");
6532
+ append_styles(target, "svelte-zxvkkc", ".textarea-wrapper.svelte-zxvkkc{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-zxvkkc{width:100%;height:100%;box-sizing:border-box;resize:none;appearance:none;background-color:#fff;border:solid 2px #ccc;border-radius:6px;padding:6px 10px 6px 10px;font-size:12px;line-height:1.5}.textarea.svelte-zxvkkc::placeholder{color:var(--placeholder-color)}.textarea.svelte-zxvkkc:focus{outline:none;border-width:var(--focus-border-width) !important;border-color:var(--focus-border-color) !important;border-style:var(--focus-border-style) !important}");
6497
6533
  }
6498
6534
 
6499
6535
  function create_fragment$h(ctx) {
@@ -6509,13 +6545,13 @@ function create_fragment$h(ctx) {
6509
6545
  this.h();
6510
6546
  },
6511
6547
  l(nodes) {
6512
- div = claim_element(nodes, "DIV", { class: true });
6548
+ div = claim_element(nodes, "DIV", { class: true, style: true });
6513
6549
  var div_nodes = children(div);
6514
6550
 
6515
6551
  textarea = claim_element(div_nodes, "TEXTAREA", {
6516
6552
  class: true,
6517
- rows: true,
6518
- placeholder: true
6553
+ placeholder: true,
6554
+ style: true
6519
6555
  });
6520
6556
 
6521
6557
  children(textarea).forEach(detach);
@@ -6523,37 +6559,42 @@ function create_fragment$h(ctx) {
6523
6559
  this.h();
6524
6560
  },
6525
6561
  h() {
6526
- attr(textarea, "class", "textarea svelte-kyay3k");
6527
- textarea.value = /*$value*/ ctx[3];
6528
- textarea.required = /*required*/ ctx[0];
6529
- attr(textarea, "rows", /*rows*/ ctx[1]);
6530
- attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
6531
- attr(div, "class", "textarea-wrapper svelte-kyay3k");
6562
+ attr(textarea, "class", "textarea svelte-zxvkkc");
6563
+ textarea.value = /*$value*/ ctx[4];
6564
+ textarea.required = /*required*/ ctx[1];
6565
+ attr(textarea, "placeholder", /*placeholder*/ ctx[0]);
6566
+ attr(textarea, "style", /*style*/ ctx[3]);
6567
+ attr(div, "class", "textarea-wrapper svelte-zxvkkc");
6568
+ attr(div, "style", /*styleVariables*/ ctx[2]);
6532
6569
  },
6533
6570
  m(target, anchor) {
6534
6571
  insert_hydration(target, div, anchor);
6535
6572
  append_hydration(div, textarea);
6536
6573
 
6537
6574
  if (!mounted) {
6538
- dispose = listen(textarea, "input", /*handleInput*/ ctx[5]);
6575
+ dispose = listen(textarea, "input", /*handleInput*/ ctx[6]);
6539
6576
  mounted = true;
6540
6577
  }
6541
6578
  },
6542
6579
  p(ctx, [dirty]) {
6543
- if (dirty & /*$value*/ 8) {
6544
- textarea.value = /*$value*/ ctx[3];
6580
+ if (dirty & /*$value*/ 16) {
6581
+ textarea.value = /*$value*/ ctx[4];
6545
6582
  }
6546
6583
 
6547
- if (dirty & /*required*/ 1) {
6548
- textarea.required = /*required*/ ctx[0];
6584
+ if (dirty & /*required*/ 2) {
6585
+ textarea.required = /*required*/ ctx[1];
6549
6586
  }
6550
6587
 
6551
- if (dirty & /*rows*/ 2) {
6552
- attr(textarea, "rows", /*rows*/ ctx[1]);
6588
+ if (dirty & /*placeholder*/ 1) {
6589
+ attr(textarea, "placeholder", /*placeholder*/ ctx[0]);
6590
+ }
6591
+
6592
+ if (dirty & /*style*/ 8) {
6593
+ attr(textarea, "style", /*style*/ ctx[3]);
6553
6594
  }
6554
6595
 
6555
- if (dirty & /*placeholder*/ 4) {
6556
- attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
6596
+ if (dirty & /*styleVariables*/ 4) {
6597
+ attr(div, "style", /*styleVariables*/ ctx[2]);
6557
6598
  }
6558
6599
  },
6559
6600
  i: noop,
@@ -6567,11 +6608,17 @@ function create_fragment$h(ctx) {
6567
6608
  }
6568
6609
 
6569
6610
  function instance$h($$self, $$props, $$invalidate) {
6611
+ let style;
6612
+ let styleVariables;
6570
6613
  let $value;
6571
6614
  let { name = '' } = $$props;
6615
+ let { placeholder = '回答を入力してください' } = $$props;
6572
6616
  let { required = true } = $$props;
6573
- let { rows = 2 } = $$props;
6574
- let { placeholder = '' } = $$props;
6617
+ let { _style = '' } = $$props;
6618
+ let { _focusStyle = 'border-width: 2px; border-color: #2aab9f; border-style: solid' } = $$props;
6619
+ let { font = SYSTEM_FONT } = $$props;
6620
+ let { _textStyle = '' } = $$props;
6621
+ let { _placeholderStyle = 'color: #ccc;' } = $$props;
6575
6622
  const { path: statePath } = getStateItemContext();
6576
6623
 
6577
6624
  const value = registerInput({
@@ -6583,7 +6630,7 @@ function instance$h($$self, $$props, $$invalidate) {
6583
6630
  }
6584
6631
  });
6585
6632
 
6586
- component_subscribe($$self, value, value => $$invalidate(3, $value = value));
6633
+ component_subscribe($$self, value, value => $$invalidate(4, $value = value));
6587
6634
 
6588
6635
  function handleInput(event) {
6589
6636
  const updated = event.target.value;
@@ -6591,13 +6638,54 @@ function instance$h($$self, $$props, $$invalidate) {
6591
6638
  }
6592
6639
 
6593
6640
  $$self.$$set = $$props => {
6594
- if ('name' in $$props) $$invalidate(6, name = $$props.name);
6595
- if ('required' in $$props) $$invalidate(0, required = $$props.required);
6596
- if ('rows' in $$props) $$invalidate(1, rows = $$props.rows);
6597
- if ('placeholder' in $$props) $$invalidate(2, placeholder = $$props.placeholder);
6641
+ if ('name' in $$props) $$invalidate(7, name = $$props.name);
6642
+ if ('placeholder' in $$props) $$invalidate(0, placeholder = $$props.placeholder);
6643
+ if ('required' in $$props) $$invalidate(1, required = $$props.required);
6644
+ if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
6645
+ if ('_focusStyle' in $$props) $$invalidate(9, _focusStyle = $$props._focusStyle);
6646
+ if ('font' in $$props) $$invalidate(10, font = $$props.font);
6647
+ if ('_textStyle' in $$props) $$invalidate(11, _textStyle = $$props._textStyle);
6648
+ if ('_placeholderStyle' in $$props) $$invalidate(12, _placeholderStyle = $$props._placeholderStyle);
6598
6649
  };
6599
6650
 
6600
- return [required, rows, placeholder, $value, value, handleInput, name];
6651
+ $$self.$$.update = () => {
6652
+ if ($$self.$$.dirty & /*font*/ 1024) {
6653
+ addFont(font);
6654
+ }
6655
+
6656
+ if ($$self.$$.dirty & /*_style, _textStyle, font*/ 3328) {
6657
+ $$invalidate(3, style = [..._style.split(';'), ..._textStyle.split(';'), `font-family:${font}`].join(';'));
6658
+ }
6659
+
6660
+ if ($$self.$$.dirty & /*_focusStyle, _placeholderStyle*/ 4608) {
6661
+ $$invalidate(2, styleVariables = (() => {
6662
+ const variables = {};
6663
+ const focusStyleObj = parseStyle(_focusStyle);
6664
+ const placeholderStyle = parseStyle(_placeholderStyle);
6665
+ if (focusStyleObj['border-width']) variables['--focus-border-width'] = focusStyleObj['border-width'];
6666
+ if (focusStyleObj['border-color']) variables['--focus-border-color'] = focusStyleObj['border-color'];
6667
+ if (focusStyleObj['border-style']) variables['--focus-border-style'] = focusStyleObj['border-style'];
6668
+ if (placeholderStyle.color) variables['--placeholder-color'] = placeholderStyle.color;
6669
+ return stringifyStyleObj(variables);
6670
+ })());
6671
+ }
6672
+ };
6673
+
6674
+ return [
6675
+ placeholder,
6676
+ required,
6677
+ styleVariables,
6678
+ style,
6679
+ $value,
6680
+ value,
6681
+ handleInput,
6682
+ name,
6683
+ _style,
6684
+ _focusStyle,
6685
+ font,
6686
+ _textStyle,
6687
+ _placeholderStyle
6688
+ ];
6601
6689
  }
6602
6690
 
6603
6691
  class FormTextarea extends SvelteComponent {
@@ -6611,10 +6699,14 @@ class FormTextarea extends SvelteComponent {
6611
6699
  create_fragment$h,
6612
6700
  safe_not_equal,
6613
6701
  {
6614
- name: 6,
6615
- required: 0,
6616
- rows: 1,
6617
- placeholder: 2
6702
+ name: 7,
6703
+ placeholder: 0,
6704
+ required: 1,
6705
+ _style: 8,
6706
+ _focusStyle: 9,
6707
+ font: 10,
6708
+ _textStyle: 11,
6709
+ _placeholderStyle: 12
6618
6710
  },
6619
6711
  add_css$g
6620
6712
  );
@@ -6629,12 +6721,12 @@ function add_css$f(target) {
6629
6721
 
6630
6722
  function get_each_context$5(ctx, list, i) {
6631
6723
  const child_ctx = ctx.slice();
6632
- child_ctx[16] = list[i];
6633
- child_ctx[18] = i;
6724
+ child_ctx[17] = list[i];
6725
+ child_ctx[19] = i;
6634
6726
  return child_ctx;
6635
6727
  }
6636
6728
 
6637
- // (98:2) {#each _options as option, i}
6729
+ // (99:2) {#each _options as option, i}
6638
6730
  function create_each_block$5(ctx) {
6639
6731
  let label;
6640
6732
  let input;
@@ -6642,8 +6734,9 @@ function create_each_block$5(ctx) {
6642
6734
  let input_checked_value;
6643
6735
  let t0;
6644
6736
  let span;
6645
- let t1_value = /*option*/ ctx[16] + "";
6737
+ let t1_value = /*option*/ ctx[17] + "";
6646
6738
  let t1;
6739
+ let span_style_value;
6647
6740
  let t2;
6648
6741
  let mounted;
6649
6742
  let dispose;
@@ -6683,10 +6776,10 @@ function create_each_block$5(ctx) {
6683
6776
  attr(input, "class", "radio-button-input svelte-17s08g");
6684
6777
  attr(input, "style", /*buttonStyle*/ ctx[5]);
6685
6778
  attr(input, "name", /*name*/ ctx[0]);
6686
- input.value = input_value_value = /*option*/ ctx[16];
6687
- input.checked = input_checked_value = /*option*/ ctx[16] === /*_value*/ ctx[3];
6779
+ input.value = input_value_value = /*option*/ ctx[17];
6780
+ input.checked = input_checked_value = /*option*/ ctx[17] === /*_value*/ ctx[3];
6688
6781
  attr(span, "class", "radio-button-text svelte-17s08g");
6689
- attr(span, "style", /*_textStyle*/ ctx[2]);
6782
+ attr(span, "style", span_style_value = `${/*_textStyle*/ ctx[2]} ${/*fontCss*/ ctx[6]}`);
6690
6783
  attr(label, "class", "radio-button svelte-17s08g");
6691
6784
  },
6692
6785
  m(target, anchor) {
@@ -6698,7 +6791,7 @@ function create_each_block$5(ctx) {
6698
6791
  append_hydration(label, t2);
6699
6792
 
6700
6793
  if (!mounted) {
6701
- dispose = listen(input, "change", /*handleChange*/ ctx[7](/*i*/ ctx[18]));
6794
+ dispose = listen(input, "change", /*handleChange*/ ctx[8](/*i*/ ctx[19]));
6702
6795
  mounted = true;
6703
6796
  }
6704
6797
  },
@@ -6713,18 +6806,18 @@ function create_each_block$5(ctx) {
6713
6806
  attr(input, "name", /*name*/ ctx[0]);
6714
6807
  }
6715
6808
 
6716
- if (dirty & /*_options*/ 16 && input_value_value !== (input_value_value = /*option*/ ctx[16])) {
6809
+ if (dirty & /*_options*/ 16 && input_value_value !== (input_value_value = /*option*/ ctx[17])) {
6717
6810
  input.value = input_value_value;
6718
6811
  }
6719
6812
 
6720
- if (dirty & /*_options, _value*/ 24 && input_checked_value !== (input_checked_value = /*option*/ ctx[16] === /*_value*/ ctx[3])) {
6813
+ if (dirty & /*_options, _value*/ 24 && input_checked_value !== (input_checked_value = /*option*/ ctx[17] === /*_value*/ ctx[3])) {
6721
6814
  input.checked = input_checked_value;
6722
6815
  }
6723
6816
 
6724
- if (dirty & /*_options*/ 16 && t1_value !== (t1_value = /*option*/ ctx[16] + "")) set_data(t1, t1_value);
6817
+ if (dirty & /*_options*/ 16 && t1_value !== (t1_value = /*option*/ ctx[17] + "")) set_data(t1, t1_value);
6725
6818
 
6726
- if (dirty & /*_textStyle*/ 4) {
6727
- attr(span, "style", /*_textStyle*/ ctx[2]);
6819
+ if (dirty & /*_textStyle*/ 4 && span_style_value !== (span_style_value = `${/*_textStyle*/ ctx[2]} ${/*fontCss*/ ctx[6]}`)) {
6820
+ attr(span, "style", span_style_value);
6728
6821
  }
6729
6822
  },
6730
6823
  d(detaching) {
@@ -6777,7 +6870,7 @@ function create_fragment$g(ctx) {
6777
6870
  }
6778
6871
  },
6779
6872
  p(ctx, [dirty]) {
6780
- if (dirty & /*_textStyle, _options, buttonStyle, name, _value, handleChange*/ 189) {
6873
+ if (dirty & /*_textStyle, fontCss, _options, buttonStyle, name, _value, handleChange*/ 381) {
6781
6874
  each_value = /*_options*/ ctx[4];
6782
6875
  let i;
6783
6876
 
@@ -6823,6 +6916,7 @@ function instance$g($$self, $$props, $$invalidate) {
6823
6916
  let { required = false } = $$props;
6824
6917
  let { _layoutStyle = 'flex-direction: column; gap: 0px;' } = $$props;
6825
6918
  let { font = SYSTEM_FONT } = $$props;
6919
+ const fontCss = font ? 'font-family:' + font : '';
6826
6920
  let { _textStyle = 'color: #333; font-size: 12px; line-height:1.5;' } = $$props;
6827
6921
  let { buttonSize = '16px' } = $$props;
6828
6922
  let { buttonColor = { main: '#f0f1f1', sub: '#f0f1f1' } } = $$props;
@@ -6839,7 +6933,7 @@ function instance$g($$self, $$props, $$invalidate) {
6839
6933
  }
6840
6934
  });
6841
6935
 
6842
- component_subscribe($$self, value, value => $$invalidate(14, $value = value));
6936
+ component_subscribe($$self, value, value => $$invalidate(15, $value = value));
6843
6937
 
6844
6938
  const handleChange = index => event => {
6845
6939
  if (event.target.checked) {
@@ -6849,26 +6943,26 @@ function instance$g($$self, $$props, $$invalidate) {
6849
6943
 
6850
6944
  $$self.$$set = $$props => {
6851
6945
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
6852
- if ('options' in $$props) $$invalidate(8, options = $$props.options);
6853
- if ('required' in $$props) $$invalidate(9, required = $$props.required);
6946
+ if ('options' in $$props) $$invalidate(9, options = $$props.options);
6947
+ if ('required' in $$props) $$invalidate(10, required = $$props.required);
6854
6948
  if ('_layoutStyle' in $$props) $$invalidate(1, _layoutStyle = $$props._layoutStyle);
6855
- if ('font' in $$props) $$invalidate(10, font = $$props.font);
6949
+ if ('font' in $$props) $$invalidate(11, font = $$props.font);
6856
6950
  if ('_textStyle' in $$props) $$invalidate(2, _textStyle = $$props._textStyle);
6857
- if ('buttonSize' in $$props) $$invalidate(11, buttonSize = $$props.buttonSize);
6858
- if ('buttonColor' in $$props) $$invalidate(12, buttonColor = $$props.buttonColor);
6859
- if ('buttonColorActive' in $$props) $$invalidate(13, buttonColorActive = $$props.buttonColorActive);
6951
+ if ('buttonSize' in $$props) $$invalidate(12, buttonSize = $$props.buttonSize);
6952
+ if ('buttonColor' in $$props) $$invalidate(13, buttonColor = $$props.buttonColor);
6953
+ if ('buttonColorActive' in $$props) $$invalidate(14, buttonColorActive = $$props.buttonColorActive);
6860
6954
  };
6861
6955
 
6862
6956
  $$self.$$.update = () => {
6863
- if ($$self.$$.dirty & /*font*/ 1024) {
6957
+ if ($$self.$$.dirty & /*font*/ 2048) {
6864
6958
  addFont(font);
6865
6959
  }
6866
6960
 
6867
- if ($$self.$$.dirty & /*options*/ 256) {
6961
+ if ($$self.$$.dirty & /*options*/ 512) {
6868
6962
  $$invalidate(4, _options = options.split(','));
6869
6963
  }
6870
6964
 
6871
- if ($$self.$$.dirty & /*buttonColor, buttonColorActive, buttonSize*/ 14336) {
6965
+ if ($$self.$$.dirty & /*buttonColor, buttonColorActive, buttonSize*/ 28672) {
6872
6966
  $$invalidate(5, buttonStyle = (() => {
6873
6967
  return stringifyStyleObj({
6874
6968
  '--color-main': buttonColor.main,
@@ -6880,7 +6974,7 @@ function instance$g($$self, $$props, $$invalidate) {
6880
6974
  })());
6881
6975
  }
6882
6976
 
6883
- if ($$self.$$.dirty & /*$value*/ 16384) {
6977
+ if ($$self.$$.dirty & /*$value*/ 32768) {
6884
6978
  $$invalidate(3, _value = $value[0]);
6885
6979
  }
6886
6980
  };
@@ -6892,6 +6986,7 @@ function instance$g($$self, $$props, $$invalidate) {
6892
6986
  _value,
6893
6987
  _options,
6894
6988
  buttonStyle,
6989
+ fontCss,
6895
6990
  value,
6896
6991
  handleChange,
6897
6992
  options,
@@ -6916,14 +7011,14 @@ class FormRadioButtons extends SvelteComponent {
6916
7011
  safe_not_equal,
6917
7012
  {
6918
7013
  name: 0,
6919
- options: 8,
6920
- required: 9,
7014
+ options: 9,
7015
+ required: 10,
6921
7016
  _layoutStyle: 1,
6922
- font: 10,
7017
+ font: 11,
6923
7018
  _textStyle: 2,
6924
- buttonSize: 11,
6925
- buttonColor: 12,
6926
- buttonColorActive: 13
7019
+ buttonSize: 12,
7020
+ buttonColor: 13,
7021
+ buttonColorActive: 14
6927
7022
  },
6928
7023
  add_css$f
6929
7024
  );
@@ -6943,7 +7038,7 @@ function get_each_context$4(ctx, list, i) {
6943
7038
  return child_ctx;
6944
7039
  }
6945
7040
 
6946
- // (108:10) {:else}
7041
+ // (107:10) {:else}
6947
7042
  function create_else_block(ctx) {
6948
7043
  let t;
6949
7044
 
@@ -6966,7 +7061,7 @@ function create_else_block(ctx) {
6966
7061
  };
6967
7062
  }
6968
7063
 
6969
- // (106:10) {#if option}
7064
+ // (105:10) {#if option}
6970
7065
  function create_if_block$2(ctx) {
6971
7066
  let t_value = /*option*/ ctx[19] + "";
6972
7067
  let t;
@@ -6990,7 +7085,7 @@ function create_if_block$2(ctx) {
6990
7085
  };
6991
7086
  }
6992
7087
 
6993
- // (104:6) {#each _options as option, i}
7088
+ // (103:6) {#each _options as option, i}
6994
7089
  function create_each_block$4(ctx) {
6995
7090
  let option;
6996
7091
  let t;
@@ -7232,11 +7327,12 @@ function instance$f($$self, $$props, $$invalidate) {
7232
7327
  $$invalidate(1, _value = $value[0]);
7233
7328
  }
7234
7329
 
7235
- if ($$self.$$.dirty & /*_style, _textStyle, _value, _placeholderStyle*/ 25602) {
7330
+ if ($$self.$$.dirty & /*_style, _textStyle, _value, _placeholderStyle, font*/ 29698) {
7236
7331
  $$invalidate(3, style = [
7237
7332
  ..._style.split(';'),
7238
7333
  ..._textStyle.split(';'),
7239
- ...!_value ? _placeholderStyle.split(';') : []
7334
+ ...!_value ? _placeholderStyle.split(';') : [],
7335
+ `font-family:${font}`
7240
7336
  ].join(';'));
7241
7337
  }
7242
7338
 
@@ -7244,11 +7340,10 @@ function instance$f($$self, $$props, $$invalidate) {
7244
7340
  $$invalidate(2, styleVariables = (() => {
7245
7341
  const variables = {};
7246
7342
  const focusStyleObj = parseStyle(_focusStyle);
7247
- const placeholderStyle = parseStyle(_placeholderStyle);
7343
+ parseStyle(_placeholderStyle);
7248
7344
  if (focusStyleObj['border-width']) variables['--focus-border-width'] = focusStyleObj['border-width'];
7249
7345
  if (focusStyleObj['border-color']) variables['--focus-border-color'] = focusStyleObj['border-color'];
7250
7346
  if (focusStyleObj['border-style']) variables['--focus-border-style'] = focusStyleObj['border-style'];
7251
- if (placeholderStyle.color) variables['--placeholder-color'] = placeholderStyle.color;
7252
7347
  variables['--icon-color'] = iconColor;
7253
7348
  variables['--icon-size'] = iconSize;
7254
7349
  return stringifyStyleObj(variables);
@@ -7813,9 +7908,11 @@ function instance$d($$self, $$props, $$invalidate) {
7813
7908
  };
7814
7909
 
7815
7910
  function getTextButtonStyle(isActive) {
7816
- return isActive
7817
- ? [...buttonStyle.split(';'), ...buttonActiveStyle.split(';')].join(';')
7818
- : buttonStyle;
7911
+ return [
7912
+ ...buttonStyle.split(';'),
7913
+ `font-family:${font}`,
7914
+ ...isActive ? buttonActiveStyle : []
7915
+ ].join(';');
7819
7916
  }
7820
7917
 
7821
7918
  $$self.$$set = $$props => {
package/dist/index.es.js CHANGED
@@ -1356,12 +1356,24 @@ function request(url, data, cb) {
1356
1356
  }
1357
1357
  /** @internal */
1358
1358
  const loadActionTableRow = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
1359
+ const defaultValue = config.query.default_value ?? null;
1359
1360
  const key = data[config.query.key] ?? null;
1360
1361
  if (key == null) {
1361
1362
  console.warn('key is not found. key: ', config.query.key);
1363
+ if (defaultValue != null) {
1364
+ return resolve(defaultValue);
1365
+ }
1362
1366
  return reject('key is not found.');
1363
1367
  }
1364
- return collection$1({ endpoint, api_key, table: config.query.table_name }).get(key, (err, data) => err ? reject(err) : resolve(data));
1368
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).get(key, (err, data) => {
1369
+ if (!err) {
1370
+ resolve(data);
1371
+ }
1372
+ if (defaultValue != null) {
1373
+ resolve(defaultValue);
1374
+ }
1375
+ reject(err);
1376
+ });
1365
1377
  });
1366
1378
  /** @internal */
1367
1379
  const loadActionTableRows = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
@@ -1369,21 +1381,33 @@ const loadActionTableRows = async (config, data, api_key, endpoint) => new Promi
1369
1381
  console.warn('key is not defined.');
1370
1382
  return reject('key is not defined.');
1371
1383
  }
1384
+ const defaultValue = config.query.default_value ?? null;
1372
1385
  const keys = [];
1373
1386
  let hasError = false;
1374
1387
  const originalKeys = Array.isArray(config.query.key) ? config.query.key : [config.query.key];
1375
1388
  originalKeys.forEach(key => {
1376
1389
  const d = data[key];
1377
- if (d == null) {
1390
+ if (d == null || d === '') {
1378
1391
  console.warn('key is not found. key: ', key);
1379
1392
  hasError = true;
1380
1393
  }
1381
1394
  keys.push(d);
1382
1395
  });
1383
1396
  if (hasError) {
1397
+ if (defaultValue != null) {
1398
+ return resolve(defaultValue);
1399
+ }
1384
1400
  return reject('key is not found.');
1385
1401
  }
1386
- return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => (err ? reject(err) : resolve(data)));
1402
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => {
1403
+ if (!err) {
1404
+ resolve(data);
1405
+ }
1406
+ if (defaultValue != null) {
1407
+ resolve(defaultValue);
1408
+ }
1409
+ reject(err);
1410
+ });
1387
1411
  });
1388
1412
  /** @internal */
1389
1413
  const loadActionTableQuery = async (config, data, api_key, endpoint) => new Promise((resolve, reject) => {
@@ -1391,20 +1415,32 @@ const loadActionTableQuery = async (config, data, api_key, endpoint) => new Prom
1391
1415
  console.warn('key is not defined.');
1392
1416
  return reject('key is not defined.');
1393
1417
  }
1418
+ const defaultValue = config.query.default_value ?? null;
1394
1419
  const params = {};
1395
1420
  let hasError = false;
1396
1421
  Object.entries(config.query.params).forEach(([key, param]) => {
1397
1422
  const d = data[param];
1398
- if (d == null) {
1423
+ if (d == null || d === '') {
1399
1424
  console.warn('key is not found. param: ', param);
1400
1425
  hasError = true;
1401
1426
  }
1402
1427
  params[key] = d;
1403
1428
  });
1404
1429
  if (hasError) {
1430
+ if (defaultValue != null) {
1431
+ return resolve(defaultValue);
1432
+ }
1405
1433
  return reject('key is not found.');
1406
1434
  }
1407
- return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => (err ? reject(err) : resolve(data)));
1435
+ return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => {
1436
+ if (!err) {
1437
+ resolve(data);
1438
+ }
1439
+ if (defaultValue != null) {
1440
+ resolve(defaultValue);
1441
+ }
1442
+ reject(err);
1443
+ });
1408
1444
  });
1409
1445
  /** @internal */
1410
1446
  const loadActionTable = async (config, data, api_key, endpoint) => {
@@ -6242,7 +6278,7 @@ class MovieVimeoElement extends SvelteComponent {
6242
6278
  /* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
6243
6279
 
6244
6280
  function add_css$g(target) {
6245
- append_styles(target, "svelte-kyay3k", ".textarea-wrapper.svelte-kyay3k{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-kyay3k{width:100%;resize:none}");
6281
+ append_styles(target, "svelte-zxvkkc", ".textarea-wrapper.svelte-zxvkkc{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-zxvkkc{width:100%;height:100%;box-sizing:border-box;resize:none;appearance:none;background-color:#fff;border:solid 2px #ccc;border-radius:6px;padding:6px 10px 6px 10px;font-size:12px;line-height:1.5}.textarea.svelte-zxvkkc::placeholder{color:var(--placeholder-color)}.textarea.svelte-zxvkkc:focus{outline:none;border-width:var(--focus-border-width) !important;border-color:var(--focus-border-color) !important;border-style:var(--focus-border-style) !important}");
6246
6282
  }
6247
6283
 
6248
6284
  function create_fragment$h(ctx) {
@@ -6255,37 +6291,42 @@ function create_fragment$h(ctx) {
6255
6291
  c() {
6256
6292
  div = element("div");
6257
6293
  textarea = element("textarea");
6258
- attr(textarea, "class", "textarea svelte-kyay3k");
6259
- textarea.value = /*$value*/ ctx[3];
6260
- textarea.required = /*required*/ ctx[0];
6261
- attr(textarea, "rows", /*rows*/ ctx[1]);
6262
- attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
6263
- attr(div, "class", "textarea-wrapper svelte-kyay3k");
6294
+ attr(textarea, "class", "textarea svelte-zxvkkc");
6295
+ textarea.value = /*$value*/ ctx[4];
6296
+ textarea.required = /*required*/ ctx[1];
6297
+ attr(textarea, "placeholder", /*placeholder*/ ctx[0]);
6298
+ attr(textarea, "style", /*style*/ ctx[3]);
6299
+ attr(div, "class", "textarea-wrapper svelte-zxvkkc");
6300
+ attr(div, "style", /*styleVariables*/ ctx[2]);
6264
6301
  },
6265
6302
  m(target, anchor) {
6266
6303
  insert(target, div, anchor);
6267
6304
  append(div, textarea);
6268
6305
 
6269
6306
  if (!mounted) {
6270
- dispose = listen(textarea, "input", /*handleInput*/ ctx[5]);
6307
+ dispose = listen(textarea, "input", /*handleInput*/ ctx[6]);
6271
6308
  mounted = true;
6272
6309
  }
6273
6310
  },
6274
6311
  p(ctx, [dirty]) {
6275
- if (dirty & /*$value*/ 8) {
6276
- textarea.value = /*$value*/ ctx[3];
6312
+ if (dirty & /*$value*/ 16) {
6313
+ textarea.value = /*$value*/ ctx[4];
6277
6314
  }
6278
6315
 
6279
- if (dirty & /*required*/ 1) {
6280
- textarea.required = /*required*/ ctx[0];
6316
+ if (dirty & /*required*/ 2) {
6317
+ textarea.required = /*required*/ ctx[1];
6281
6318
  }
6282
6319
 
6283
- if (dirty & /*rows*/ 2) {
6284
- attr(textarea, "rows", /*rows*/ ctx[1]);
6320
+ if (dirty & /*placeholder*/ 1) {
6321
+ attr(textarea, "placeholder", /*placeholder*/ ctx[0]);
6285
6322
  }
6286
6323
 
6287
- if (dirty & /*placeholder*/ 4) {
6288
- attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
6324
+ if (dirty & /*style*/ 8) {
6325
+ attr(textarea, "style", /*style*/ ctx[3]);
6326
+ }
6327
+
6328
+ if (dirty & /*styleVariables*/ 4) {
6329
+ attr(div, "style", /*styleVariables*/ ctx[2]);
6289
6330
  }
6290
6331
  },
6291
6332
  i: noop,
@@ -6299,11 +6340,17 @@ function create_fragment$h(ctx) {
6299
6340
  }
6300
6341
 
6301
6342
  function instance$h($$self, $$props, $$invalidate) {
6343
+ let style;
6344
+ let styleVariables;
6302
6345
  let $value;
6303
6346
  let { name = '' } = $$props;
6347
+ let { placeholder = '回答を入力してください' } = $$props;
6304
6348
  let { required = true } = $$props;
6305
- let { rows = 2 } = $$props;
6306
- let { placeholder = '' } = $$props;
6349
+ let { _style = '' } = $$props;
6350
+ let { _focusStyle = 'border-width: 2px; border-color: #2aab9f; border-style: solid' } = $$props;
6351
+ let { font = SYSTEM_FONT } = $$props;
6352
+ let { _textStyle = '' } = $$props;
6353
+ let { _placeholderStyle = 'color: #ccc;' } = $$props;
6307
6354
  const { path: statePath } = getStateItemContext();
6308
6355
 
6309
6356
  const value = registerInput({
@@ -6315,7 +6362,7 @@ function instance$h($$self, $$props, $$invalidate) {
6315
6362
  }
6316
6363
  });
6317
6364
 
6318
- component_subscribe($$self, value, value => $$invalidate(3, $value = value));
6365
+ component_subscribe($$self, value, value => $$invalidate(4, $value = value));
6319
6366
 
6320
6367
  function handleInput(event) {
6321
6368
  const updated = event.target.value;
@@ -6323,13 +6370,54 @@ function instance$h($$self, $$props, $$invalidate) {
6323
6370
  }
6324
6371
 
6325
6372
  $$self.$$set = $$props => {
6326
- if ('name' in $$props) $$invalidate(6, name = $$props.name);
6327
- if ('required' in $$props) $$invalidate(0, required = $$props.required);
6328
- if ('rows' in $$props) $$invalidate(1, rows = $$props.rows);
6329
- if ('placeholder' in $$props) $$invalidate(2, placeholder = $$props.placeholder);
6373
+ if ('name' in $$props) $$invalidate(7, name = $$props.name);
6374
+ if ('placeholder' in $$props) $$invalidate(0, placeholder = $$props.placeholder);
6375
+ if ('required' in $$props) $$invalidate(1, required = $$props.required);
6376
+ if ('_style' in $$props) $$invalidate(8, _style = $$props._style);
6377
+ if ('_focusStyle' in $$props) $$invalidate(9, _focusStyle = $$props._focusStyle);
6378
+ if ('font' in $$props) $$invalidate(10, font = $$props.font);
6379
+ if ('_textStyle' in $$props) $$invalidate(11, _textStyle = $$props._textStyle);
6380
+ if ('_placeholderStyle' in $$props) $$invalidate(12, _placeholderStyle = $$props._placeholderStyle);
6381
+ };
6382
+
6383
+ $$self.$$.update = () => {
6384
+ if ($$self.$$.dirty & /*font*/ 1024) {
6385
+ addFont(font);
6386
+ }
6387
+
6388
+ if ($$self.$$.dirty & /*_style, _textStyle, font*/ 3328) {
6389
+ $$invalidate(3, style = [..._style.split(';'), ..._textStyle.split(';'), `font-family:${font}`].join(';'));
6390
+ }
6391
+
6392
+ if ($$self.$$.dirty & /*_focusStyle, _placeholderStyle*/ 4608) {
6393
+ $$invalidate(2, styleVariables = (() => {
6394
+ const variables = {};
6395
+ const focusStyleObj = parseStyle(_focusStyle);
6396
+ const placeholderStyle = parseStyle(_placeholderStyle);
6397
+ if (focusStyleObj['border-width']) variables['--focus-border-width'] = focusStyleObj['border-width'];
6398
+ if (focusStyleObj['border-color']) variables['--focus-border-color'] = focusStyleObj['border-color'];
6399
+ if (focusStyleObj['border-style']) variables['--focus-border-style'] = focusStyleObj['border-style'];
6400
+ if (placeholderStyle.color) variables['--placeholder-color'] = placeholderStyle.color;
6401
+ return stringifyStyleObj(variables);
6402
+ })());
6403
+ }
6330
6404
  };
6331
6405
 
6332
- return [required, rows, placeholder, $value, value, handleInput, name];
6406
+ return [
6407
+ placeholder,
6408
+ required,
6409
+ styleVariables,
6410
+ style,
6411
+ $value,
6412
+ value,
6413
+ handleInput,
6414
+ name,
6415
+ _style,
6416
+ _focusStyle,
6417
+ font,
6418
+ _textStyle,
6419
+ _placeholderStyle
6420
+ ];
6333
6421
  }
6334
6422
 
6335
6423
  class FormTextarea extends SvelteComponent {
@@ -6343,10 +6431,14 @@ class FormTextarea extends SvelteComponent {
6343
6431
  create_fragment$h,
6344
6432
  safe_not_equal,
6345
6433
  {
6346
- name: 6,
6347
- required: 0,
6348
- rows: 1,
6349
- placeholder: 2
6434
+ name: 7,
6435
+ placeholder: 0,
6436
+ required: 1,
6437
+ _style: 8,
6438
+ _focusStyle: 9,
6439
+ font: 10,
6440
+ _textStyle: 11,
6441
+ _placeholderStyle: 12
6350
6442
  },
6351
6443
  add_css$g
6352
6444
  );
@@ -6361,12 +6453,12 @@ function add_css$f(target) {
6361
6453
 
6362
6454
  function get_each_context$5(ctx, list, i) {
6363
6455
  const child_ctx = ctx.slice();
6364
- child_ctx[16] = list[i];
6365
- child_ctx[18] = i;
6456
+ child_ctx[17] = list[i];
6457
+ child_ctx[19] = i;
6366
6458
  return child_ctx;
6367
6459
  }
6368
6460
 
6369
- // (98:2) {#each _options as option, i}
6461
+ // (99:2) {#each _options as option, i}
6370
6462
  function create_each_block$5(ctx) {
6371
6463
  let label;
6372
6464
  let input;
@@ -6374,8 +6466,9 @@ function create_each_block$5(ctx) {
6374
6466
  let input_checked_value;
6375
6467
  let t0;
6376
6468
  let span;
6377
- let t1_value = /*option*/ ctx[16] + "";
6469
+ let t1_value = /*option*/ ctx[17] + "";
6378
6470
  let t1;
6471
+ let span_style_value;
6379
6472
  let t2;
6380
6473
  let mounted;
6381
6474
  let dispose;
@@ -6392,10 +6485,10 @@ function create_each_block$5(ctx) {
6392
6485
  attr(input, "class", "radio-button-input svelte-17s08g");
6393
6486
  attr(input, "style", /*buttonStyle*/ ctx[5]);
6394
6487
  attr(input, "name", /*name*/ ctx[0]);
6395
- input.value = input_value_value = /*option*/ ctx[16];
6396
- input.checked = input_checked_value = /*option*/ ctx[16] === /*_value*/ ctx[3];
6488
+ input.value = input_value_value = /*option*/ ctx[17];
6489
+ input.checked = input_checked_value = /*option*/ ctx[17] === /*_value*/ ctx[3];
6397
6490
  attr(span, "class", "radio-button-text svelte-17s08g");
6398
- attr(span, "style", /*_textStyle*/ ctx[2]);
6491
+ attr(span, "style", span_style_value = `${/*_textStyle*/ ctx[2]} ${/*fontCss*/ ctx[6]}`);
6399
6492
  attr(label, "class", "radio-button svelte-17s08g");
6400
6493
  },
6401
6494
  m(target, anchor) {
@@ -6407,7 +6500,7 @@ function create_each_block$5(ctx) {
6407
6500
  append(label, t2);
6408
6501
 
6409
6502
  if (!mounted) {
6410
- dispose = listen(input, "change", /*handleChange*/ ctx[7](/*i*/ ctx[18]));
6503
+ dispose = listen(input, "change", /*handleChange*/ ctx[8](/*i*/ ctx[19]));
6411
6504
  mounted = true;
6412
6505
  }
6413
6506
  },
@@ -6422,18 +6515,18 @@ function create_each_block$5(ctx) {
6422
6515
  attr(input, "name", /*name*/ ctx[0]);
6423
6516
  }
6424
6517
 
6425
- if (dirty & /*_options*/ 16 && input_value_value !== (input_value_value = /*option*/ ctx[16])) {
6518
+ if (dirty & /*_options*/ 16 && input_value_value !== (input_value_value = /*option*/ ctx[17])) {
6426
6519
  input.value = input_value_value;
6427
6520
  }
6428
6521
 
6429
- if (dirty & /*_options, _value*/ 24 && input_checked_value !== (input_checked_value = /*option*/ ctx[16] === /*_value*/ ctx[3])) {
6522
+ if (dirty & /*_options, _value*/ 24 && input_checked_value !== (input_checked_value = /*option*/ ctx[17] === /*_value*/ ctx[3])) {
6430
6523
  input.checked = input_checked_value;
6431
6524
  }
6432
6525
 
6433
- if (dirty & /*_options*/ 16 && t1_value !== (t1_value = /*option*/ ctx[16] + "")) set_data(t1, t1_value);
6526
+ if (dirty & /*_options*/ 16 && t1_value !== (t1_value = /*option*/ ctx[17] + "")) set_data(t1, t1_value);
6434
6527
 
6435
- if (dirty & /*_textStyle*/ 4) {
6436
- attr(span, "style", /*_textStyle*/ ctx[2]);
6528
+ if (dirty & /*_textStyle*/ 4 && span_style_value !== (span_style_value = `${/*_textStyle*/ ctx[2]} ${/*fontCss*/ ctx[6]}`)) {
6529
+ attr(span, "style", span_style_value);
6437
6530
  }
6438
6531
  },
6439
6532
  d(detaching) {
@@ -6472,7 +6565,7 @@ function create_fragment$g(ctx) {
6472
6565
  }
6473
6566
  },
6474
6567
  p(ctx, [dirty]) {
6475
- if (dirty & /*_textStyle, _options, buttonStyle, name, _value, handleChange*/ 189) {
6568
+ if (dirty & /*_textStyle, fontCss, _options, buttonStyle, name, _value, handleChange*/ 381) {
6476
6569
  each_value = /*_options*/ ctx[4];
6477
6570
  let i;
6478
6571
 
@@ -6518,6 +6611,7 @@ function instance$g($$self, $$props, $$invalidate) {
6518
6611
  let { required = false } = $$props;
6519
6612
  let { _layoutStyle = 'flex-direction: column; gap: 0px;' } = $$props;
6520
6613
  let { font = SYSTEM_FONT } = $$props;
6614
+ const fontCss = font ? 'font-family:' + font : '';
6521
6615
  let { _textStyle = 'color: #333; font-size: 12px; line-height:1.5;' } = $$props;
6522
6616
  let { buttonSize = '16px' } = $$props;
6523
6617
  let { buttonColor = { main: '#f0f1f1', sub: '#f0f1f1' } } = $$props;
@@ -6534,7 +6628,7 @@ function instance$g($$self, $$props, $$invalidate) {
6534
6628
  }
6535
6629
  });
6536
6630
 
6537
- component_subscribe($$self, value, value => $$invalidate(14, $value = value));
6631
+ component_subscribe($$self, value, value => $$invalidate(15, $value = value));
6538
6632
 
6539
6633
  const handleChange = index => event => {
6540
6634
  if (event.target.checked) {
@@ -6544,26 +6638,26 @@ function instance$g($$self, $$props, $$invalidate) {
6544
6638
 
6545
6639
  $$self.$$set = $$props => {
6546
6640
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
6547
- if ('options' in $$props) $$invalidate(8, options = $$props.options);
6548
- if ('required' in $$props) $$invalidate(9, required = $$props.required);
6641
+ if ('options' in $$props) $$invalidate(9, options = $$props.options);
6642
+ if ('required' in $$props) $$invalidate(10, required = $$props.required);
6549
6643
  if ('_layoutStyle' in $$props) $$invalidate(1, _layoutStyle = $$props._layoutStyle);
6550
- if ('font' in $$props) $$invalidate(10, font = $$props.font);
6644
+ if ('font' in $$props) $$invalidate(11, font = $$props.font);
6551
6645
  if ('_textStyle' in $$props) $$invalidate(2, _textStyle = $$props._textStyle);
6552
- if ('buttonSize' in $$props) $$invalidate(11, buttonSize = $$props.buttonSize);
6553
- if ('buttonColor' in $$props) $$invalidate(12, buttonColor = $$props.buttonColor);
6554
- if ('buttonColorActive' in $$props) $$invalidate(13, buttonColorActive = $$props.buttonColorActive);
6646
+ if ('buttonSize' in $$props) $$invalidate(12, buttonSize = $$props.buttonSize);
6647
+ if ('buttonColor' in $$props) $$invalidate(13, buttonColor = $$props.buttonColor);
6648
+ if ('buttonColorActive' in $$props) $$invalidate(14, buttonColorActive = $$props.buttonColorActive);
6555
6649
  };
6556
6650
 
6557
6651
  $$self.$$.update = () => {
6558
- if ($$self.$$.dirty & /*font*/ 1024) {
6652
+ if ($$self.$$.dirty & /*font*/ 2048) {
6559
6653
  addFont(font);
6560
6654
  }
6561
6655
 
6562
- if ($$self.$$.dirty & /*options*/ 256) {
6656
+ if ($$self.$$.dirty & /*options*/ 512) {
6563
6657
  $$invalidate(4, _options = options.split(','));
6564
6658
  }
6565
6659
 
6566
- if ($$self.$$.dirty & /*buttonColor, buttonColorActive, buttonSize*/ 14336) {
6660
+ if ($$self.$$.dirty & /*buttonColor, buttonColorActive, buttonSize*/ 28672) {
6567
6661
  $$invalidate(5, buttonStyle = (() => {
6568
6662
  return stringifyStyleObj({
6569
6663
  '--color-main': buttonColor.main,
@@ -6575,7 +6669,7 @@ function instance$g($$self, $$props, $$invalidate) {
6575
6669
  })());
6576
6670
  }
6577
6671
 
6578
- if ($$self.$$.dirty & /*$value*/ 16384) {
6672
+ if ($$self.$$.dirty & /*$value*/ 32768) {
6579
6673
  $$invalidate(3, _value = $value[0]);
6580
6674
  }
6581
6675
  };
@@ -6587,6 +6681,7 @@ function instance$g($$self, $$props, $$invalidate) {
6587
6681
  _value,
6588
6682
  _options,
6589
6683
  buttonStyle,
6684
+ fontCss,
6590
6685
  value,
6591
6686
  handleChange,
6592
6687
  options,
@@ -6611,14 +6706,14 @@ class FormRadioButtons extends SvelteComponent {
6611
6706
  safe_not_equal,
6612
6707
  {
6613
6708
  name: 0,
6614
- options: 8,
6615
- required: 9,
6709
+ options: 9,
6710
+ required: 10,
6616
6711
  _layoutStyle: 1,
6617
- font: 10,
6712
+ font: 11,
6618
6713
  _textStyle: 2,
6619
- buttonSize: 11,
6620
- buttonColor: 12,
6621
- buttonColorActive: 13
6714
+ buttonSize: 12,
6715
+ buttonColor: 13,
6716
+ buttonColorActive: 14
6622
6717
  },
6623
6718
  add_css$f
6624
6719
  );
@@ -6638,7 +6733,7 @@ function get_each_context$4(ctx, list, i) {
6638
6733
  return child_ctx;
6639
6734
  }
6640
6735
 
6641
- // (108:10) {:else}
6736
+ // (107:10) {:else}
6642
6737
  function create_else_block(ctx) {
6643
6738
  let t;
6644
6739
 
@@ -6658,7 +6753,7 @@ function create_else_block(ctx) {
6658
6753
  };
6659
6754
  }
6660
6755
 
6661
- // (106:10) {#if option}
6756
+ // (105:10) {#if option}
6662
6757
  function create_if_block$2(ctx) {
6663
6758
  let t_value = /*option*/ ctx[19] + "";
6664
6759
  let t;
@@ -6679,7 +6774,7 @@ function create_if_block$2(ctx) {
6679
6774
  };
6680
6775
  }
6681
6776
 
6682
- // (104:6) {#each _options as option, i}
6777
+ // (103:6) {#each _options as option, i}
6683
6778
  function create_each_block$4(ctx) {
6684
6779
  let option;
6685
6780
  let t;
@@ -6890,11 +6985,12 @@ function instance$f($$self, $$props, $$invalidate) {
6890
6985
  $$invalidate(1, _value = $value[0]);
6891
6986
  }
6892
6987
 
6893
- if ($$self.$$.dirty & /*_style, _textStyle, _value, _placeholderStyle*/ 25602) {
6988
+ if ($$self.$$.dirty & /*_style, _textStyle, _value, _placeholderStyle, font*/ 29698) {
6894
6989
  $$invalidate(3, style = [
6895
6990
  ..._style.split(';'),
6896
6991
  ..._textStyle.split(';'),
6897
- ...!_value ? _placeholderStyle.split(';') : []
6992
+ ...!_value ? _placeholderStyle.split(';') : [],
6993
+ `font-family:${font}`
6898
6994
  ].join(';'));
6899
6995
  }
6900
6996
 
@@ -6902,11 +6998,10 @@ function instance$f($$self, $$props, $$invalidate) {
6902
6998
  $$invalidate(2, styleVariables = (() => {
6903
6999
  const variables = {};
6904
7000
  const focusStyleObj = parseStyle(_focusStyle);
6905
- const placeholderStyle = parseStyle(_placeholderStyle);
7001
+ parseStyle(_placeholderStyle);
6906
7002
  if (focusStyleObj['border-width']) variables['--focus-border-width'] = focusStyleObj['border-width'];
6907
7003
  if (focusStyleObj['border-color']) variables['--focus-border-color'] = focusStyleObj['border-color'];
6908
7004
  if (focusStyleObj['border-style']) variables['--focus-border-style'] = focusStyleObj['border-style'];
6909
- if (placeholderStyle.color) variables['--placeholder-color'] = placeholderStyle.color;
6910
7005
  variables['--icon-color'] = iconColor;
6911
7006
  variables['--icon-size'] = iconSize;
6912
7007
  return stringifyStyleObj(variables);
@@ -7409,9 +7504,11 @@ function instance$d($$self, $$props, $$invalidate) {
7409
7504
  };
7410
7505
 
7411
7506
  function getTextButtonStyle(isActive) {
7412
- return isActive
7413
- ? [...buttonStyle.split(';'), ...buttonActiveStyle.split(';')].join(';')
7414
- : buttonStyle;
7507
+ return [
7508
+ ...buttonStyle.split(';'),
7509
+ `font-family:${font}`,
7510
+ ...isActive ? buttonActiveStyle : []
7511
+ ].join(';');
7415
7512
  }
7416
7513
 
7417
7514
  $$self.$$set = $$props => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.206-28201768.b3b325dd",
3
+ "version": "1.1.206-28211793.cd4e1282",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",