@plaidev/karte-action-sdk 1.1.108-27919072.89513d87 → 1.1.108-27919404.8048beda
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.
- package/dist/hydrate/index.es.d.ts +24 -2
- package/dist/hydrate/index.es.js +460 -285
- package/dist/index.es.d.ts +24 -2
- package/dist/index.es.js +421 -275
- package/dist/templates.js +1 -1
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { writable, get } from 'svelte/store';
|
|
2
2
|
import 'svelte/easing';
|
|
3
3
|
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, claim_component, claim_space, mount_component, insert_hydration, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, element, claim_element, children, attr, noop, listen, is_function, append_hydration, add_render_callback, create_in_transition, svg_element, claim_svg_element, binding_callbacks, destroy_each, text, claim_text, set_data, null_to_empty, src_url_equal, set_style } from 'svelte/internal';
|
|
4
|
-
import { createEventDispatcher, onMount, onDestroy as onDestroy$1
|
|
4
|
+
import { setContext, getContext, createEventDispatcher, onMount, onDestroy as onDestroy$1 } from 'svelte';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* 内部的に使われている、UIから選択できない関数
|
|
@@ -461,6 +461,10 @@ function updateCustomVariables(variables) {
|
|
|
461
461
|
});
|
|
462
462
|
return getCustomVariables();
|
|
463
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Store for form data
|
|
466
|
+
*/
|
|
467
|
+
const formData = writable({});
|
|
464
468
|
|
|
465
469
|
const ALL_ACTION_ID = 'KARTE_ALL_ACTION_ID';
|
|
466
470
|
const ALL_ACTION_SHORTEN_ID = 'KARTE_ALL_ACTION_SHORTEN_ID';
|
|
@@ -1713,8 +1717,8 @@ function add_css$j(target) {
|
|
|
1713
1717
|
append_styles(target, "svelte-2qb6dm", ".state-item.svelte-2qb6dm{position:absolute;display:none}");
|
|
1714
1718
|
}
|
|
1715
1719
|
|
|
1716
|
-
// (
|
|
1717
|
-
function create_if_block$
|
|
1720
|
+
// (23:0) {#if $state === path}
|
|
1721
|
+
function create_if_block$4(ctx) {
|
|
1718
1722
|
let div;
|
|
1719
1723
|
let t;
|
|
1720
1724
|
let current;
|
|
@@ -1789,7 +1793,7 @@ function create_if_block$3(ctx) {
|
|
|
1789
1793
|
function create_fragment$n(ctx) {
|
|
1790
1794
|
let if_block_anchor;
|
|
1791
1795
|
let current;
|
|
1792
|
-
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$
|
|
1796
|
+
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$4(ctx);
|
|
1793
1797
|
|
|
1794
1798
|
return {
|
|
1795
1799
|
c() {
|
|
@@ -1814,7 +1818,7 @@ function create_fragment$n(ctx) {
|
|
|
1814
1818
|
transition_in(if_block, 1);
|
|
1815
1819
|
}
|
|
1816
1820
|
} else {
|
|
1817
|
-
if_block = create_if_block$
|
|
1821
|
+
if_block = create_if_block$4(ctx);
|
|
1818
1822
|
if_block.c();
|
|
1819
1823
|
transition_in(if_block, 1);
|
|
1820
1824
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -1845,11 +1849,18 @@ function create_fragment$n(ctx) {
|
|
|
1845
1849
|
};
|
|
1846
1850
|
}
|
|
1847
1851
|
|
|
1852
|
+
const STATE_ITEM_CONTEXT_KEY = Symbol();
|
|
1853
|
+
|
|
1854
|
+
function getStateItemContext() {
|
|
1855
|
+
return getContext(STATE_ITEM_CONTEXT_KEY);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1848
1858
|
function instance$n($$self, $$props, $$invalidate) {
|
|
1849
1859
|
let $state;
|
|
1850
1860
|
component_subscribe($$self, state, $$value => $$invalidate(1, $state = $$value));
|
|
1851
1861
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1852
1862
|
let { path } = $$props;
|
|
1863
|
+
setContext(STATE_ITEM_CONTEXT_KEY, { path });
|
|
1853
1864
|
|
|
1854
1865
|
$$self.$$set = $$props => {
|
|
1855
1866
|
if ('path' in $$props) $$invalidate(0, path = $$props.path);
|
|
@@ -1881,7 +1892,7 @@ function add_css$i(target) {
|
|
|
1881
1892
|
}
|
|
1882
1893
|
|
|
1883
1894
|
// (9:0) {#if backgroundOverray}
|
|
1884
|
-
function create_if_block$
|
|
1895
|
+
function create_if_block$3(ctx) {
|
|
1885
1896
|
let div;
|
|
1886
1897
|
let mounted;
|
|
1887
1898
|
let dispose;
|
|
@@ -1918,7 +1929,7 @@ function create_if_block$2(ctx) {
|
|
|
1918
1929
|
|
|
1919
1930
|
function create_fragment$m(ctx) {
|
|
1920
1931
|
let if_block_anchor;
|
|
1921
|
-
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$
|
|
1932
|
+
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$3(ctx);
|
|
1922
1933
|
|
|
1923
1934
|
return {
|
|
1924
1935
|
c() {
|
|
@@ -1938,7 +1949,7 @@ function create_fragment$m(ctx) {
|
|
|
1938
1949
|
if (if_block) {
|
|
1939
1950
|
if_block.p(ctx, dirty);
|
|
1940
1951
|
} else {
|
|
1941
|
-
if_block = create_if_block$
|
|
1952
|
+
if_block = create_if_block$3(ctx);
|
|
1942
1953
|
if_block.c();
|
|
1943
1954
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
1944
1955
|
}
|
|
@@ -1982,7 +1993,7 @@ function add_css$h(target) {
|
|
|
1982
1993
|
}
|
|
1983
1994
|
|
|
1984
1995
|
// (142:0) {#if visible}
|
|
1985
|
-
function create_if_block$
|
|
1996
|
+
function create_if_block$2(ctx) {
|
|
1986
1997
|
let div1;
|
|
1987
1998
|
let t;
|
|
1988
1999
|
let div0;
|
|
@@ -2225,7 +2236,7 @@ function create_fragment$l(ctx) {
|
|
|
2225
2236
|
if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
|
|
2226
2237
|
});
|
|
2227
2238
|
|
|
2228
|
-
let if_block = /*visible*/ ctx[6] && create_if_block$
|
|
2239
|
+
let if_block = /*visible*/ ctx[6] && create_if_block$2(ctx);
|
|
2229
2240
|
|
|
2230
2241
|
return {
|
|
2231
2242
|
c() {
|
|
@@ -2269,7 +2280,7 @@ function create_fragment$l(ctx) {
|
|
|
2269
2280
|
transition_in(if_block, 1);
|
|
2270
2281
|
}
|
|
2271
2282
|
} else {
|
|
2272
|
-
if_block = create_if_block$
|
|
2283
|
+
if_block = create_if_block$2(ctx);
|
|
2273
2284
|
if_block.c();
|
|
2274
2285
|
transition_in(if_block, 1);
|
|
2275
2286
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -3367,14 +3378,14 @@ class FlexItem extends SvelteComponent {
|
|
|
3367
3378
|
|
|
3368
3379
|
/* src/components/RenderText.svelte generated by Svelte v3.53.1 */
|
|
3369
3380
|
|
|
3370
|
-
function get_each_context$
|
|
3381
|
+
function get_each_context$2(ctx, list, i) {
|
|
3371
3382
|
const child_ctx = ctx.slice();
|
|
3372
3383
|
child_ctx[2] = list[i];
|
|
3373
3384
|
return child_ctx;
|
|
3374
3385
|
}
|
|
3375
3386
|
|
|
3376
3387
|
// (12:2) {:else}
|
|
3377
|
-
function create_else_block(ctx) {
|
|
3388
|
+
function create_else_block$1(ctx) {
|
|
3378
3389
|
let t_value = /*item*/ ctx[2] + "";
|
|
3379
3390
|
let t;
|
|
3380
3391
|
|
|
@@ -3398,7 +3409,7 @@ function create_else_block(ctx) {
|
|
|
3398
3409
|
}
|
|
3399
3410
|
|
|
3400
3411
|
// (10:2) {#if item.match(regexp)}
|
|
3401
|
-
function create_if_block(ctx) {
|
|
3412
|
+
function create_if_block$1(ctx) {
|
|
3402
3413
|
let br;
|
|
3403
3414
|
|
|
3404
3415
|
return {
|
|
@@ -3419,15 +3430,15 @@ function create_if_block(ctx) {
|
|
|
3419
3430
|
}
|
|
3420
3431
|
|
|
3421
3432
|
// (9:0) {#each items as item}
|
|
3422
|
-
function create_each_block$
|
|
3433
|
+
function create_each_block$2(ctx) {
|
|
3423
3434
|
let show_if;
|
|
3424
3435
|
let if_block_anchor;
|
|
3425
3436
|
|
|
3426
3437
|
function select_block_type(ctx, dirty) {
|
|
3427
3438
|
if (dirty & /*items*/ 1) show_if = null;
|
|
3428
3439
|
if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
|
|
3429
|
-
if (show_if) return create_if_block;
|
|
3430
|
-
return create_else_block;
|
|
3440
|
+
if (show_if) return create_if_block$1;
|
|
3441
|
+
return create_else_block$1;
|
|
3431
3442
|
}
|
|
3432
3443
|
|
|
3433
3444
|
let current_block_type = select_block_type(ctx, -1);
|
|
@@ -3472,7 +3483,7 @@ function create_fragment$f(ctx) {
|
|
|
3472
3483
|
let each_blocks = [];
|
|
3473
3484
|
|
|
3474
3485
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3475
|
-
each_blocks[i] = create_each_block$
|
|
3486
|
+
each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
|
|
3476
3487
|
}
|
|
3477
3488
|
|
|
3478
3489
|
return {
|
|
@@ -3503,12 +3514,12 @@ function create_fragment$f(ctx) {
|
|
|
3503
3514
|
let i;
|
|
3504
3515
|
|
|
3505
3516
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3506
|
-
const child_ctx = get_each_context$
|
|
3517
|
+
const child_ctx = get_each_context$2(ctx, each_value, i);
|
|
3507
3518
|
|
|
3508
3519
|
if (each_blocks[i]) {
|
|
3509
3520
|
each_blocks[i].p(child_ctx, dirty);
|
|
3510
3521
|
} else {
|
|
3511
|
-
each_blocks[i] = create_each_block$
|
|
3522
|
+
each_blocks[i] = create_each_block$2(child_ctx);
|
|
3512
3523
|
each_blocks[i].c();
|
|
3513
3524
|
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
3514
3525
|
}
|
|
@@ -4805,190 +4816,108 @@ class MovieVimeoElement extends SvelteComponent {
|
|
|
4805
4816
|
}
|
|
4806
4817
|
}
|
|
4807
4818
|
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
/*$$scope*/ ctx[3],
|
|
4853
|
-
!current
|
|
4854
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
|
|
4855
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
|
|
4856
|
-
null
|
|
4857
|
-
);
|
|
4858
|
-
}
|
|
4859
|
-
}
|
|
4860
|
-
},
|
|
4861
|
-
i(local) {
|
|
4862
|
-
if (current) return;
|
|
4863
|
-
transition_in(default_slot, local);
|
|
4864
|
-
current = true;
|
|
4865
|
-
},
|
|
4866
|
-
o(local) {
|
|
4867
|
-
transition_out(default_slot, local);
|
|
4868
|
-
current = false;
|
|
4869
|
-
},
|
|
4870
|
-
d(detaching) {
|
|
4871
|
-
if (detaching) detach(div);
|
|
4872
|
-
if (default_slot) default_slot.d(detaching);
|
|
4873
|
-
}
|
|
4874
|
-
};
|
|
4875
|
-
}
|
|
4876
|
-
|
|
4877
|
-
const FORM_CONTEXT_KEY = Symbol();
|
|
4878
|
-
|
|
4879
|
-
function getValue($formData, name) {
|
|
4880
|
-
return $formData._data[name];
|
|
4881
|
-
}
|
|
4882
|
-
|
|
4883
|
-
function updateValue(data, name, update) {
|
|
4884
|
-
data.update(prev => {
|
|
4885
|
-
const { value, isValid } = update(prev._data[name]);
|
|
4886
|
-
prev._data[name] = value;
|
|
4887
|
-
prev._isValidMap[name] = isValid;
|
|
4888
|
-
return { ...prev };
|
|
4889
|
-
});
|
|
4890
|
-
}
|
|
4891
|
-
|
|
4892
|
-
function checkIfDataAreValid($formData) {
|
|
4893
|
-
const dataAreValid = Object.entries($formData._data).reduce(
|
|
4894
|
-
(dataAreValid, [name]) => {
|
|
4895
|
-
return dataAreValid && ($formData._isValidMap[name] ?? true);
|
|
4896
|
-
},
|
|
4897
|
-
true
|
|
4898
|
-
);
|
|
4899
|
-
|
|
4900
|
-
return dataAreValid;
|
|
4819
|
+
function registerInput({ name, statePath, validator = () => true, initialValue, }) {
|
|
4820
|
+
const writableValue = {
|
|
4821
|
+
subscribe(run) {
|
|
4822
|
+
return formData.subscribe(formData => {
|
|
4823
|
+
run(formData[name]?.value);
|
|
4824
|
+
});
|
|
4825
|
+
},
|
|
4826
|
+
set(value) {
|
|
4827
|
+
formData.update(prev => ({
|
|
4828
|
+
...prev,
|
|
4829
|
+
[name]: {
|
|
4830
|
+
statePath,
|
|
4831
|
+
value,
|
|
4832
|
+
isValid: validator(value),
|
|
4833
|
+
},
|
|
4834
|
+
}));
|
|
4835
|
+
},
|
|
4836
|
+
update(updater) {
|
|
4837
|
+
formData.update(prev => {
|
|
4838
|
+
const prevValue = prev[name]?.value;
|
|
4839
|
+
return {
|
|
4840
|
+
...prev,
|
|
4841
|
+
[name]: {
|
|
4842
|
+
statePath,
|
|
4843
|
+
value: updater(prevValue),
|
|
4844
|
+
isValid: validator(prevValue),
|
|
4845
|
+
},
|
|
4846
|
+
};
|
|
4847
|
+
});
|
|
4848
|
+
},
|
|
4849
|
+
};
|
|
4850
|
+
writableValue.set(initialValue);
|
|
4851
|
+
return writableValue;
|
|
4852
|
+
}
|
|
4853
|
+
function deleteValues(statePath) {
|
|
4854
|
+
formData.update(prev => {
|
|
4855
|
+
const targetNames = Object.entries(prev)
|
|
4856
|
+
.filter(([_, { statePath: s }]) => s === statePath)
|
|
4857
|
+
.map(([name]) => name);
|
|
4858
|
+
targetNames.forEach(name => {
|
|
4859
|
+
delete prev[name];
|
|
4860
|
+
});
|
|
4861
|
+
return { ...prev };
|
|
4862
|
+
});
|
|
4901
4863
|
}
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
};
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
setContext(FORM_CONTEXT_KEY, {
|
|
4938
|
-
formComponentData,
|
|
4939
|
-
submit: ({ stateId }) => {
|
|
4940
|
-
if (checkIfDataAreValid($formComponentData)) {
|
|
4941
|
-
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
|
4942
|
-
console.log('will send', $formData);
|
|
4943
|
-
setState$1(stateId, true);
|
|
4944
|
-
}
|
|
4945
|
-
},
|
|
4946
|
-
next: ({ stateId }) => {
|
|
4947
|
-
if (checkIfDataAreValid($formComponentData)) {
|
|
4948
|
-
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
|
4949
|
-
setState$1(stateId, true);
|
|
4950
|
-
console.log('formData after next()', $formData);
|
|
4951
|
-
}
|
|
4952
|
-
},
|
|
4953
|
-
prev: ({ stateId }) => {
|
|
4954
|
-
formData.update(prev => {
|
|
4955
|
-
Object.keys($formComponentData._data).forEach(name => {
|
|
4956
|
-
delete prev[name];
|
|
4957
|
-
});
|
|
4958
|
-
|
|
4959
|
-
return { ...prev };
|
|
4960
|
-
});
|
|
4961
|
-
|
|
4962
|
-
setState$1(stateId, true);
|
|
4963
|
-
console.log('formData after prev()', $formData);
|
|
4964
|
-
}
|
|
4965
|
-
});
|
|
4966
|
-
|
|
4967
|
-
const formData = createFormDataAccessor(formId);
|
|
4968
|
-
component_subscribe($$self, formData, value => $$invalidate(5, $formData = value));
|
|
4969
|
-
|
|
4970
|
-
$$self.$$set = $$props => {
|
|
4971
|
-
if ('formId' in $$props) $$invalidate(2, formId = $$props.formId);
|
|
4972
|
-
if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
|
|
4973
|
-
};
|
|
4974
|
-
|
|
4975
|
-
return [formComponentData, formData, formId, $$scope, slots];
|
|
4864
|
+
const getValuesAreValidReader = statePath => ({
|
|
4865
|
+
subscribe(callback) {
|
|
4866
|
+
return formData.subscribe(formData => {
|
|
4867
|
+
const valuesAreValid = Object.entries(formData)
|
|
4868
|
+
.filter(([_, { statePath: s }]) => s === statePath)
|
|
4869
|
+
.every(([_, { isValid }]) => isValid);
|
|
4870
|
+
callback(valuesAreValid);
|
|
4871
|
+
});
|
|
4872
|
+
},
|
|
4873
|
+
});
|
|
4874
|
+
function formDataToEventValues(campaignId, formData) {
|
|
4875
|
+
const questions = [];
|
|
4876
|
+
const answersMap = {};
|
|
4877
|
+
Object.entries(formData).forEach(([name, dataItem]) => {
|
|
4878
|
+
questions.push(name);
|
|
4879
|
+
const value = dataItem.value;
|
|
4880
|
+
const answerKey = `question_${name}`;
|
|
4881
|
+
if (Array.isArray(value)) {
|
|
4882
|
+
answersMap[answerKey] = {
|
|
4883
|
+
choices: value,
|
|
4884
|
+
};
|
|
4885
|
+
}
|
|
4886
|
+
else if (typeof value === 'string') {
|
|
4887
|
+
answersMap[answerKey] = {
|
|
4888
|
+
free_answer: value,
|
|
4889
|
+
};
|
|
4890
|
+
}
|
|
4891
|
+
});
|
|
4892
|
+
return {
|
|
4893
|
+
[campaignId]: {
|
|
4894
|
+
questions,
|
|
4895
|
+
...answersMap,
|
|
4896
|
+
},
|
|
4897
|
+
};
|
|
4976
4898
|
}
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4899
|
+
function submit() {
|
|
4900
|
+
const systemConfig = getSystem();
|
|
4901
|
+
const campaignId = systemConfig.campaignId;
|
|
4902
|
+
if (campaignId) {
|
|
4903
|
+
const formData$1 = get(formData);
|
|
4904
|
+
const values = formDataToEventValues(campaignId, formData$1);
|
|
4905
|
+
send_event('_answer_question', values);
|
|
4906
|
+
}
|
|
4907
|
+
{
|
|
4908
|
+
const formData$1 = get(formData);
|
|
4909
|
+
const values = formDataToEventValues('mock', formData$1);
|
|
4910
|
+
console.log('values: ', values);
|
|
4911
|
+
}
|
|
4983
4912
|
}
|
|
4984
4913
|
|
|
4985
4914
|
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
|
4986
4915
|
|
|
4987
|
-
function add_css$
|
|
4916
|
+
function add_css$5(target) {
|
|
4988
4917
|
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}");
|
|
4989
4918
|
}
|
|
4990
4919
|
|
|
4991
|
-
function create_fragment$
|
|
4920
|
+
function create_fragment$6(ctx) {
|
|
4992
4921
|
let div;
|
|
4993
4922
|
let textarea;
|
|
4994
4923
|
let mounted;
|
|
@@ -5016,7 +4945,7 @@ function create_fragment$5(ctx) {
|
|
|
5016
4945
|
},
|
|
5017
4946
|
h() {
|
|
5018
4947
|
attr(textarea, "class", "textarea svelte-kyay3k");
|
|
5019
|
-
textarea.value =
|
|
4948
|
+
textarea.value = /*$value*/ ctx[3];
|
|
5020
4949
|
textarea.required = /*required*/ ctx[0];
|
|
5021
4950
|
attr(textarea, "rows", /*rows*/ ctx[1]);
|
|
5022
4951
|
attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
|
|
@@ -5032,8 +4961,8 @@ function create_fragment$5(ctx) {
|
|
|
5032
4961
|
}
|
|
5033
4962
|
},
|
|
5034
4963
|
p(ctx, [dirty]) {
|
|
5035
|
-
if (dirty &
|
|
5036
|
-
textarea.value =
|
|
4964
|
+
if (dirty & /*$value*/ 8) {
|
|
4965
|
+
textarea.value = /*$value*/ ctx[3];
|
|
5037
4966
|
}
|
|
5038
4967
|
|
|
5039
4968
|
if (dirty & /*required*/ 1) {
|
|
@@ -5058,30 +4987,30 @@ function create_fragment$5(ctx) {
|
|
|
5058
4987
|
};
|
|
5059
4988
|
}
|
|
5060
4989
|
|
|
5061
|
-
function instance$
|
|
5062
|
-
let value;
|
|
5063
|
-
let $formComponentData;
|
|
4990
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
4991
|
+
let $value;
|
|
5064
4992
|
let { name = '' } = $$props;
|
|
5065
4993
|
let { required = true } = $$props;
|
|
5066
4994
|
let { rows = 2 } = $$props;
|
|
5067
4995
|
let { placeholder = '' } = $$props;
|
|
5068
|
-
const {
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
4996
|
+
const { path: statePath } = getStateItemContext();
|
|
4997
|
+
|
|
4998
|
+
const value = registerInput({
|
|
4999
|
+
name,
|
|
5000
|
+
statePath,
|
|
5001
|
+
initialValue: '',
|
|
5002
|
+
validator(value) {
|
|
5003
|
+
return required ? !!value : true;
|
|
5004
|
+
}
|
|
5005
|
+
});
|
|
5006
|
+
|
|
5007
|
+
component_subscribe($$self, value, value => $$invalidate(3, $value = value));
|
|
5077
5008
|
|
|
5078
5009
|
function handleInput(event) {
|
|
5079
|
-
const
|
|
5080
|
-
|
|
5010
|
+
const updated = event.target.value;
|
|
5011
|
+
value.set(updated);
|
|
5081
5012
|
}
|
|
5082
5013
|
|
|
5083
|
-
setValue(value);
|
|
5084
|
-
|
|
5085
5014
|
$$self.$$set = $$props => {
|
|
5086
5015
|
if ('name' in $$props) $$invalidate(6, name = $$props.name);
|
|
5087
5016
|
if ('required' in $$props) $$invalidate(0, required = $$props.required);
|
|
@@ -5089,22 +5018,7 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
5089
5018
|
if ('placeholder' in $$props) $$invalidate(2, placeholder = $$props.placeholder);
|
|
5090
5019
|
};
|
|
5091
5020
|
|
|
5092
|
-
|
|
5093
|
-
if ($$self.$$.dirty & /*$formComponentData, name*/ 192) {
|
|
5094
|
-
$$invalidate(3, value = getValue($formComponentData, name) ?? '');
|
|
5095
|
-
}
|
|
5096
|
-
};
|
|
5097
|
-
|
|
5098
|
-
return [
|
|
5099
|
-
required,
|
|
5100
|
-
rows,
|
|
5101
|
-
placeholder,
|
|
5102
|
-
value,
|
|
5103
|
-
formComponentData,
|
|
5104
|
-
handleInput,
|
|
5105
|
-
name,
|
|
5106
|
-
$formComponentData
|
|
5107
|
-
];
|
|
5021
|
+
return [required, rows, placeholder, $value, value, handleInput, name];
|
|
5108
5022
|
}
|
|
5109
5023
|
|
|
5110
5024
|
class FormTextarea extends SvelteComponent {
|
|
@@ -5114,8 +5028,8 @@ class FormTextarea extends SvelteComponent {
|
|
|
5114
5028
|
init(
|
|
5115
5029
|
this,
|
|
5116
5030
|
options,
|
|
5117
|
-
instance$
|
|
5118
|
-
create_fragment$
|
|
5031
|
+
instance$6,
|
|
5032
|
+
create_fragment$6,
|
|
5119
5033
|
safe_not_equal,
|
|
5120
5034
|
{
|
|
5121
5035
|
name: 6,
|
|
@@ -5123,14 +5037,14 @@ class FormTextarea extends SvelteComponent {
|
|
|
5123
5037
|
rows: 1,
|
|
5124
5038
|
placeholder: 2
|
|
5125
5039
|
},
|
|
5126
|
-
add_css$
|
|
5040
|
+
add_css$5
|
|
5127
5041
|
);
|
|
5128
5042
|
}
|
|
5129
5043
|
}
|
|
5130
5044
|
|
|
5131
5045
|
/* src/components/FormButton.svelte generated by Svelte v3.53.1 */
|
|
5132
5046
|
|
|
5133
|
-
function create_fragment$
|
|
5047
|
+
function create_fragment$5(ctx) {
|
|
5134
5048
|
let input;
|
|
5135
5049
|
let mounted;
|
|
5136
5050
|
let dispose;
|
|
@@ -5155,7 +5069,7 @@ function create_fragment$4(ctx) {
|
|
|
5155
5069
|
insert_hydration(target, input, anchor);
|
|
5156
5070
|
|
|
5157
5071
|
if (!mounted) {
|
|
5158
|
-
dispose = listen(input, "click", /*handleClick*/ ctx[
|
|
5072
|
+
dispose = listen(input, "click", /*handleClick*/ ctx[2]);
|
|
5159
5073
|
mounted = true;
|
|
5160
5074
|
}
|
|
5161
5075
|
},
|
|
@@ -5178,89 +5092,90 @@ function create_fragment$4(ctx) {
|
|
|
5178
5092
|
};
|
|
5179
5093
|
}
|
|
5180
5094
|
|
|
5181
|
-
function instance$
|
|
5095
|
+
function instance$5($$self, $$props, $$invalidate) {
|
|
5182
5096
|
let disabled;
|
|
5183
|
-
let $
|
|
5097
|
+
let $valuesAreValid;
|
|
5184
5098
|
let { text = '' } = $$props;
|
|
5185
5099
|
let { type = { type: 'submit' } } = $$props;
|
|
5186
|
-
const {
|
|
5187
|
-
component_subscribe($$self, formComponentData, value => $$invalidate(5, $formComponentData = value));
|
|
5100
|
+
const { path: statePath } = getStateItemContext();
|
|
5188
5101
|
|
|
5189
5102
|
function handleClick() {
|
|
5190
5103
|
switch (type.type) {
|
|
5191
5104
|
case 'submit':
|
|
5192
5105
|
{
|
|
5193
|
-
|
|
5194
|
-
|
|
5106
|
+
if ($valuesAreValid) {
|
|
5107
|
+
submit();
|
|
5108
|
+
const stateId = type.stateId;
|
|
5109
|
+
setState$1(stateId, true);
|
|
5110
|
+
}
|
|
5111
|
+
|
|
5195
5112
|
break;
|
|
5196
5113
|
}
|
|
5197
5114
|
case 'next':
|
|
5198
5115
|
{
|
|
5199
|
-
|
|
5200
|
-
|
|
5116
|
+
if ($valuesAreValid) {
|
|
5117
|
+
const stateId = type.stateId;
|
|
5118
|
+
setState$1(stateId, true);
|
|
5119
|
+
}
|
|
5120
|
+
|
|
5201
5121
|
break;
|
|
5202
5122
|
}
|
|
5203
5123
|
case 'prev':
|
|
5204
5124
|
{
|
|
5125
|
+
deleteValues(statePath);
|
|
5205
5126
|
const stateId = type.stateId;
|
|
5206
|
-
|
|
5127
|
+
setState$1(stateId, true);
|
|
5207
5128
|
break;
|
|
5208
5129
|
}
|
|
5209
5130
|
}
|
|
5210
5131
|
}
|
|
5211
5132
|
|
|
5133
|
+
const valuesAreValid = getValuesAreValidReader(statePath);
|
|
5134
|
+
component_subscribe($$self, valuesAreValid, value => $$invalidate(5, $valuesAreValid = value));
|
|
5135
|
+
|
|
5212
5136
|
$$self.$$set = $$props => {
|
|
5213
5137
|
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
|
5214
5138
|
if ('type' in $$props) $$invalidate(4, type = $$props.type);
|
|
5215
5139
|
};
|
|
5216
5140
|
|
|
5217
5141
|
$$self.$$.update = () => {
|
|
5218
|
-
if ($$self.$$.dirty & /*type, $
|
|
5142
|
+
if ($$self.$$.dirty & /*type, $valuesAreValid*/ 48) {
|
|
5219
5143
|
$$invalidate(1, disabled = (() => {
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
const dataAreValid = Object.entries($formComponentData._data).reduce(
|
|
5223
|
-
(dataAreValid, [name]) => {
|
|
5224
|
-
return dataAreValid && ($formComponentData._isValidMap[name] ?? true);
|
|
5225
|
-
},
|
|
5226
|
-
true
|
|
5227
|
-
);
|
|
5228
|
-
|
|
5229
|
-
return !dataAreValid;
|
|
5144
|
+
const enabled = type.type === 'prev' || $valuesAreValid;
|
|
5145
|
+
return !enabled;
|
|
5230
5146
|
})());
|
|
5231
5147
|
}
|
|
5232
5148
|
};
|
|
5233
5149
|
|
|
5234
|
-
return [text, disabled,
|
|
5150
|
+
return [text, disabled, handleClick, valuesAreValid, type, $valuesAreValid];
|
|
5235
5151
|
}
|
|
5236
5152
|
|
|
5237
5153
|
class FormButton extends SvelteComponent {
|
|
5238
5154
|
constructor(options) {
|
|
5239
5155
|
super();
|
|
5240
|
-
init(this, options, instance$
|
|
5156
|
+
init(this, options, instance$5, create_fragment$5, safe_not_equal, { text: 0, type: 4 });
|
|
5241
5157
|
}
|
|
5242
5158
|
}
|
|
5243
5159
|
|
|
5244
5160
|
/* src/components/FormRadioButtons.svelte generated by Svelte v3.53.1 */
|
|
5245
5161
|
|
|
5246
|
-
function add_css$
|
|
5162
|
+
function add_css$4(target) {
|
|
5247
5163
|
append_styles(target, "svelte-1ajmbw1", ".radio-buttons.svelte-1ajmbw1{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%}");
|
|
5248
5164
|
}
|
|
5249
5165
|
|
|
5250
|
-
function get_each_context(ctx, list, i) {
|
|
5166
|
+
function get_each_context$1(ctx, list, i) {
|
|
5251
5167
|
const child_ctx = ctx.slice();
|
|
5252
|
-
child_ctx[
|
|
5253
|
-
child_ctx[
|
|
5168
|
+
child_ctx[7] = list[i];
|
|
5169
|
+
child_ctx[9] = i;
|
|
5254
5170
|
return child_ctx;
|
|
5255
5171
|
}
|
|
5256
5172
|
|
|
5257
|
-
// (
|
|
5258
|
-
function create_each_block(ctx) {
|
|
5173
|
+
// (23:2) {#each _options as option, i}
|
|
5174
|
+
function create_each_block$1(ctx) {
|
|
5259
5175
|
let label;
|
|
5260
5176
|
let input;
|
|
5261
|
-
let input_value_value;
|
|
5262
5177
|
let t0;
|
|
5263
|
-
let t1_value = /*option*/ ctx[
|
|
5178
|
+
let t1_value = /*option*/ ctx[7] + "";
|
|
5264
5179
|
let t1;
|
|
5265
5180
|
let t2;
|
|
5266
5181
|
let mounted;
|
|
@@ -5288,7 +5203,7 @@ function create_each_block(ctx) {
|
|
|
5288
5203
|
h() {
|
|
5289
5204
|
attr(input, "type", "radio");
|
|
5290
5205
|
attr(input, "name", /*name*/ ctx[0]);
|
|
5291
|
-
input.value =
|
|
5206
|
+
input.value = /*$value*/ ctx[2];
|
|
5292
5207
|
},
|
|
5293
5208
|
m(target, anchor) {
|
|
5294
5209
|
insert_hydration(target, label, anchor);
|
|
@@ -5298,7 +5213,7 @@ function create_each_block(ctx) {
|
|
|
5298
5213
|
append_hydration(label, t2);
|
|
5299
5214
|
|
|
5300
5215
|
if (!mounted) {
|
|
5301
|
-
dispose = listen(input, "change", /*handleChange*/ ctx[
|
|
5216
|
+
dispose = listen(input, "change", /*handleChange*/ ctx[4](/*i*/ ctx[9]));
|
|
5302
5217
|
mounted = true;
|
|
5303
5218
|
}
|
|
5304
5219
|
},
|
|
@@ -5309,11 +5224,11 @@ function create_each_block(ctx) {
|
|
|
5309
5224
|
attr(input, "name", /*name*/ ctx[0]);
|
|
5310
5225
|
}
|
|
5311
5226
|
|
|
5312
|
-
if (dirty &
|
|
5313
|
-
input.value =
|
|
5227
|
+
if (dirty & /*$value*/ 4) {
|
|
5228
|
+
input.value = /*$value*/ ctx[2];
|
|
5314
5229
|
}
|
|
5315
5230
|
|
|
5316
|
-
if (dirty & /*_options*/ 2 && t1_value !== (t1_value = /*option*/ ctx[
|
|
5231
|
+
if (dirty & /*_options*/ 2 && t1_value !== (t1_value = /*option*/ ctx[7] + "")) set_data(t1, t1_value);
|
|
5317
5232
|
},
|
|
5318
5233
|
d(detaching) {
|
|
5319
5234
|
if (detaching) detach(label);
|
|
@@ -5323,13 +5238,13 @@ function create_each_block(ctx) {
|
|
|
5323
5238
|
};
|
|
5324
5239
|
}
|
|
5325
5240
|
|
|
5326
|
-
function create_fragment$
|
|
5241
|
+
function create_fragment$4(ctx) {
|
|
5327
5242
|
let div;
|
|
5328
5243
|
let each_value = /*_options*/ ctx[1];
|
|
5329
5244
|
let each_blocks = [];
|
|
5330
5245
|
|
|
5331
5246
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
5332
|
-
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
5247
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
|
5333
5248
|
}
|
|
5334
5249
|
|
|
5335
5250
|
return {
|
|
@@ -5364,17 +5279,17 @@ function create_fragment$3(ctx) {
|
|
|
5364
5279
|
}
|
|
5365
5280
|
},
|
|
5366
5281
|
p(ctx, [dirty]) {
|
|
5367
|
-
if (dirty & /*_options, name, handleChange*/
|
|
5282
|
+
if (dirty & /*_options, name, $value, handleChange*/ 23) {
|
|
5368
5283
|
each_value = /*_options*/ ctx[1];
|
|
5369
5284
|
let i;
|
|
5370
5285
|
|
|
5371
5286
|
for (i = 0; i < each_value.length; i += 1) {
|
|
5372
|
-
const child_ctx = get_each_context(ctx, each_value, i);
|
|
5287
|
+
const child_ctx = get_each_context$1(ctx, each_value, i);
|
|
5373
5288
|
|
|
5374
5289
|
if (each_blocks[i]) {
|
|
5375
5290
|
each_blocks[i].p(child_ctx, dirty);
|
|
5376
5291
|
} else {
|
|
5377
|
-
each_blocks[i] = create_each_block(child_ctx);
|
|
5292
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
|
5378
5293
|
each_blocks[i].c();
|
|
5379
5294
|
each_blocks[i].m(div, null);
|
|
5380
5295
|
}
|
|
@@ -5396,38 +5311,298 @@ function create_fragment$3(ctx) {
|
|
|
5396
5311
|
};
|
|
5397
5312
|
}
|
|
5398
5313
|
|
|
5399
|
-
function instance$
|
|
5314
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
5400
5315
|
let _options;
|
|
5316
|
+
let $value;
|
|
5401
5317
|
let { name = '' } = $$props;
|
|
5402
5318
|
let { options = '人参,レタス,キャベツ' } = $$props;
|
|
5403
|
-
const {
|
|
5319
|
+
const { path: statePath } = getStateItemContext();
|
|
5320
|
+
|
|
5321
|
+
const value = registerInput({
|
|
5322
|
+
name,
|
|
5323
|
+
statePath,
|
|
5324
|
+
initialValue: [],
|
|
5325
|
+
validator(value) {
|
|
5326
|
+
return value.length > 0;
|
|
5327
|
+
}
|
|
5328
|
+
});
|
|
5329
|
+
|
|
5330
|
+
component_subscribe($$self, value, value => $$invalidate(2, $value = value));
|
|
5404
5331
|
|
|
5405
5332
|
const handleChange = index => event => {
|
|
5406
5333
|
if (event.target.checked) {
|
|
5407
|
-
|
|
5334
|
+
value.set([_options[index]]);
|
|
5408
5335
|
}
|
|
5409
5336
|
};
|
|
5410
5337
|
|
|
5411
|
-
updateValue(formComponentData, name, () => ({ value: '', isValid: false }));
|
|
5412
|
-
|
|
5413
5338
|
$$self.$$set = $$props => {
|
|
5414
5339
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
5415
|
-
if ('options' in $$props) $$invalidate(
|
|
5340
|
+
if ('options' in $$props) $$invalidate(5, options = $$props.options);
|
|
5416
5341
|
};
|
|
5417
5342
|
|
|
5418
5343
|
$$self.$$.update = () => {
|
|
5419
|
-
if ($$self.$$.dirty & /*options*/
|
|
5344
|
+
if ($$self.$$.dirty & /*options*/ 32) {
|
|
5420
5345
|
$$invalidate(1, _options = options.split(','));
|
|
5421
5346
|
}
|
|
5422
5347
|
};
|
|
5423
5348
|
|
|
5424
|
-
return [name, _options, handleChange, options];
|
|
5349
|
+
return [name, _options, $value, value, handleChange, options];
|
|
5425
5350
|
}
|
|
5426
5351
|
|
|
5427
5352
|
class FormRadioButtons extends SvelteComponent {
|
|
5428
5353
|
constructor(options) {
|
|
5429
5354
|
super();
|
|
5430
|
-
init(this, options, instance$
|
|
5355
|
+
init(this, options, instance$4, create_fragment$4, safe_not_equal, { name: 0, options: 5 }, add_css$4);
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
/* src/components/FormSelect.svelte generated by Svelte v3.53.1 */
|
|
5360
|
+
|
|
5361
|
+
function add_css$3(target) {
|
|
5362
|
+
append_styles(target, "svelte-1ajmbw1", ".radio-buttons.svelte-1ajmbw1{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%}");
|
|
5363
|
+
}
|
|
5364
|
+
|
|
5365
|
+
function get_each_context(ctx, list, i) {
|
|
5366
|
+
const child_ctx = ctx.slice();
|
|
5367
|
+
child_ctx[6] = list[i];
|
|
5368
|
+
child_ctx[8] = i;
|
|
5369
|
+
return child_ctx;
|
|
5370
|
+
}
|
|
5371
|
+
|
|
5372
|
+
// (28:8) {:else}
|
|
5373
|
+
function create_else_block(ctx) {
|
|
5374
|
+
let t;
|
|
5375
|
+
|
|
5376
|
+
return {
|
|
5377
|
+
c() {
|
|
5378
|
+
t = text("回答を選択して下さい");
|
|
5379
|
+
},
|
|
5380
|
+
l(nodes) {
|
|
5381
|
+
t = claim_text(nodes, "回答を選択して下さい");
|
|
5382
|
+
},
|
|
5383
|
+
m(target, anchor) {
|
|
5384
|
+
insert_hydration(target, t, anchor);
|
|
5385
|
+
},
|
|
5386
|
+
p: noop,
|
|
5387
|
+
d(detaching) {
|
|
5388
|
+
if (detaching) detach(t);
|
|
5389
|
+
}
|
|
5390
|
+
};
|
|
5391
|
+
}
|
|
5392
|
+
|
|
5393
|
+
// (26:8) {#if option}
|
|
5394
|
+
function create_if_block(ctx) {
|
|
5395
|
+
let t_value = /*option*/ ctx[6] + "";
|
|
5396
|
+
let t;
|
|
5397
|
+
|
|
5398
|
+
return {
|
|
5399
|
+
c() {
|
|
5400
|
+
t = text(t_value);
|
|
5401
|
+
},
|
|
5402
|
+
l(nodes) {
|
|
5403
|
+
t = claim_text(nodes, t_value);
|
|
5404
|
+
},
|
|
5405
|
+
m(target, anchor) {
|
|
5406
|
+
insert_hydration(target, t, anchor);
|
|
5407
|
+
},
|
|
5408
|
+
p(ctx, dirty) {
|
|
5409
|
+
if (dirty & /*_options*/ 1 && t_value !== (t_value = /*option*/ ctx[6] + "")) set_data(t, t_value);
|
|
5410
|
+
},
|
|
5411
|
+
d(detaching) {
|
|
5412
|
+
if (detaching) detach(t);
|
|
5413
|
+
}
|
|
5414
|
+
};
|
|
5415
|
+
}
|
|
5416
|
+
|
|
5417
|
+
// (24:4) {#each _options as option, i}
|
|
5418
|
+
function create_each_block(ctx) {
|
|
5419
|
+
let option;
|
|
5420
|
+
let t;
|
|
5421
|
+
let option_value_value;
|
|
5422
|
+
|
|
5423
|
+
function select_block_type(ctx, dirty) {
|
|
5424
|
+
if (/*option*/ ctx[6]) return create_if_block;
|
|
5425
|
+
return create_else_block;
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
let current_block_type = select_block_type(ctx);
|
|
5429
|
+
let if_block = current_block_type(ctx);
|
|
5430
|
+
|
|
5431
|
+
return {
|
|
5432
|
+
c() {
|
|
5433
|
+
option = element("option");
|
|
5434
|
+
if_block.c();
|
|
5435
|
+
t = space();
|
|
5436
|
+
this.h();
|
|
5437
|
+
},
|
|
5438
|
+
l(nodes) {
|
|
5439
|
+
option = claim_element(nodes, "OPTION", {});
|
|
5440
|
+
var option_nodes = children(option);
|
|
5441
|
+
if_block.l(option_nodes);
|
|
5442
|
+
t = claim_space(option_nodes);
|
|
5443
|
+
option_nodes.forEach(detach);
|
|
5444
|
+
this.h();
|
|
5445
|
+
},
|
|
5446
|
+
h() {
|
|
5447
|
+
option.__value = option_value_value = /*option*/ ctx[6];
|
|
5448
|
+
option.value = option.__value;
|
|
5449
|
+
},
|
|
5450
|
+
m(target, anchor) {
|
|
5451
|
+
insert_hydration(target, option, anchor);
|
|
5452
|
+
if_block.m(option, null);
|
|
5453
|
+
append_hydration(option, t);
|
|
5454
|
+
},
|
|
5455
|
+
p(ctx, dirty) {
|
|
5456
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
5457
|
+
if_block.p(ctx, dirty);
|
|
5458
|
+
} else {
|
|
5459
|
+
if_block.d(1);
|
|
5460
|
+
if_block = current_block_type(ctx);
|
|
5461
|
+
|
|
5462
|
+
if (if_block) {
|
|
5463
|
+
if_block.c();
|
|
5464
|
+
if_block.m(option, t);
|
|
5465
|
+
}
|
|
5466
|
+
}
|
|
5467
|
+
|
|
5468
|
+
if (dirty & /*_options*/ 1 && option_value_value !== (option_value_value = /*option*/ ctx[6])) {
|
|
5469
|
+
option.__value = option_value_value;
|
|
5470
|
+
option.value = option.__value;
|
|
5471
|
+
}
|
|
5472
|
+
},
|
|
5473
|
+
d(detaching) {
|
|
5474
|
+
if (detaching) detach(option);
|
|
5475
|
+
if_block.d();
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
function create_fragment$3(ctx) {
|
|
5481
|
+
let div;
|
|
5482
|
+
let select;
|
|
5483
|
+
let mounted;
|
|
5484
|
+
let dispose;
|
|
5485
|
+
let each_value = /*_options*/ ctx[0];
|
|
5486
|
+
let each_blocks = [];
|
|
5487
|
+
|
|
5488
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
5489
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
return {
|
|
5493
|
+
c() {
|
|
5494
|
+
div = element("div");
|
|
5495
|
+
select = element("select");
|
|
5496
|
+
|
|
5497
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5498
|
+
each_blocks[i].c();
|
|
5499
|
+
}
|
|
5500
|
+
|
|
5501
|
+
this.h();
|
|
5502
|
+
},
|
|
5503
|
+
l(nodes) {
|
|
5504
|
+
div = claim_element(nodes, "DIV", { class: true });
|
|
5505
|
+
var div_nodes = children(div);
|
|
5506
|
+
select = claim_element(div_nodes, "SELECT", {});
|
|
5507
|
+
var select_nodes = children(select);
|
|
5508
|
+
|
|
5509
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5510
|
+
each_blocks[i].l(select_nodes);
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
select_nodes.forEach(detach);
|
|
5514
|
+
div_nodes.forEach(detach);
|
|
5515
|
+
this.h();
|
|
5516
|
+
},
|
|
5517
|
+
h() {
|
|
5518
|
+
attr(div, "class", "radio-buttons svelte-1ajmbw1");
|
|
5519
|
+
},
|
|
5520
|
+
m(target, anchor) {
|
|
5521
|
+
insert_hydration(target, div, anchor);
|
|
5522
|
+
append_hydration(div, select);
|
|
5523
|
+
|
|
5524
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
5525
|
+
each_blocks[i].m(select, null);
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
if (!mounted) {
|
|
5529
|
+
dispose = listen(select, "change", /*handleChange*/ ctx[1]);
|
|
5530
|
+
mounted = true;
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5533
|
+
p(ctx, [dirty]) {
|
|
5534
|
+
if (dirty & /*_options*/ 1) {
|
|
5535
|
+
each_value = /*_options*/ ctx[0];
|
|
5536
|
+
let i;
|
|
5537
|
+
|
|
5538
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
5539
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
5540
|
+
|
|
5541
|
+
if (each_blocks[i]) {
|
|
5542
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
5543
|
+
} else {
|
|
5544
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
5545
|
+
each_blocks[i].c();
|
|
5546
|
+
each_blocks[i].m(select, null);
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5550
|
+
for (; i < each_blocks.length; i += 1) {
|
|
5551
|
+
each_blocks[i].d(1);
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
each_blocks.length = each_value.length;
|
|
5555
|
+
}
|
|
5556
|
+
},
|
|
5557
|
+
i: noop,
|
|
5558
|
+
o: noop,
|
|
5559
|
+
d(detaching) {
|
|
5560
|
+
if (detaching) detach(div);
|
|
5561
|
+
destroy_each(each_blocks, detaching);
|
|
5562
|
+
mounted = false;
|
|
5563
|
+
dispose();
|
|
5564
|
+
}
|
|
5565
|
+
};
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
function instance$3($$self, $$props, $$invalidate) {
|
|
5569
|
+
let _options;
|
|
5570
|
+
let { name = '' } = $$props;
|
|
5571
|
+
let { options = 'プルダウン1,プルダウン2,プルダウン3' } = $$props;
|
|
5572
|
+
const { path: statePath } = getStateItemContext();
|
|
5573
|
+
|
|
5574
|
+
const value = registerInput({
|
|
5575
|
+
name,
|
|
5576
|
+
statePath,
|
|
5577
|
+
initialValue: [],
|
|
5578
|
+
validator(value) {
|
|
5579
|
+
return value.length > 0;
|
|
5580
|
+
}
|
|
5581
|
+
});
|
|
5582
|
+
|
|
5583
|
+
function handleChange(event) {
|
|
5584
|
+
const updated = event.target.value ? [event.target.value] : [];
|
|
5585
|
+
value.set(updated);
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
$$self.$$set = $$props => {
|
|
5589
|
+
if ('name' in $$props) $$invalidate(2, name = $$props.name);
|
|
5590
|
+
if ('options' in $$props) $$invalidate(3, options = $$props.options);
|
|
5591
|
+
};
|
|
5592
|
+
|
|
5593
|
+
$$self.$$.update = () => {
|
|
5594
|
+
if ($$self.$$.dirty & /*options*/ 8) {
|
|
5595
|
+
$$invalidate(0, _options = ['', ...options.split(',')]);
|
|
5596
|
+
}
|
|
5597
|
+
};
|
|
5598
|
+
|
|
5599
|
+
return [_options, handleChange, name, options];
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
class FormSelect extends SvelteComponent {
|
|
5603
|
+
constructor(options) {
|
|
5604
|
+
super();
|
|
5605
|
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, { name: 2, options: 3 }, add_css$3);
|
|
5431
5606
|
}
|
|
5432
5607
|
}
|
|
5433
5608
|
|
|
@@ -5818,4 +5993,4 @@ class ImageBlock extends SvelteComponent {
|
|
|
5818
5993
|
}
|
|
5819
5994
|
}
|
|
5820
5995
|
|
|
5821
|
-
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem,
|
|
5996
|
+
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, FormButton, FormRadioButtons, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_ACTION_RID, KARTE_ACTION_ROOT, KARTE_ACTION_SHORTEN_ID, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, NOOP, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, actionId, actionSetting, addState, applyCss, applyGlobalCss, close, closeAction, closeApp, closed, collection$1 as collection, create, createApp, createFog, customAnimation, customHandlers, customVariables, destroy, destroyed, dispatchDestroyEvent, embed, ensureActionRoot, ensureModalRoot, execOnClickOperation, finalize, formData, getActionSetting, getActionShadowRoot, getCustomHandlers, getCustomVariables, getInternalHandlers, getMarginStyle, getPositionStyle, getState$1 as getState, getStates, getStoreState, getSystem, getTransform, h, handleFocus, handleKeydown, handleState, hasSuffix, hashCode, haveFunction, hideOnScroll, hideOnTime, initialize, internalHandlers, isClosed, isDestroyed, isOpened, isPreview, isStopped, linkTo, loadGlobalScript, loadGlobalStyle, loadStyle, maximumZindex, moveTo, none, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, randStr, resetActionSetting, runScript, send_event, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setDestroyed, setInternalHandlers, setMaximumZindex, setOpened, setPreviousFocus, setState$1 as setState, setStopped, setSystem, show, showAction, showModal, showOnScroll, showOnTime, state, states, stopped, system, toBr, updateCustomHandlers, updateCustomVariables, updateInternalHandlers, widget };
|