@plaidev/karte-action-sdk 1.1.119 → 1.1.120-27930660.06640d93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hydrate/index.es.d.ts +18 -22
- package/dist/hydrate/index.es.js +798 -372
- package/dist/index.es.d.ts +18 -22
- package/dist/index.es.js +684 -349
- package/dist/templates.js +1 -1
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
@@ -586,6 +586,104 @@ function updateCustomVariables(variables) {
|
|
586
586
|
*/
|
587
587
|
const formData = writable({});
|
588
588
|
|
589
|
+
function isEmpty(value) {
|
590
|
+
if (Array.isArray(value)) {
|
591
|
+
return value.length === 0;
|
592
|
+
}
|
593
|
+
else {
|
594
|
+
return !value;
|
595
|
+
}
|
596
|
+
}
|
597
|
+
/** @internal */
|
598
|
+
function registerInput({ name, statePath, validator = () => true, initialValue, }) {
|
599
|
+
const writableValue = {
|
600
|
+
subscribe(run) {
|
601
|
+
return formData.subscribe(formData => {
|
602
|
+
run(formData[name]?.value);
|
603
|
+
});
|
604
|
+
},
|
605
|
+
set(value) {
|
606
|
+
formData.update(prev => ({
|
607
|
+
...prev,
|
608
|
+
[name]: {
|
609
|
+
statePath,
|
610
|
+
value,
|
611
|
+
isValid: validator(value),
|
612
|
+
},
|
613
|
+
}));
|
614
|
+
},
|
615
|
+
update(updater) {
|
616
|
+
formData.update(prev => {
|
617
|
+
const prevValue = prev[name]?.value;
|
618
|
+
return {
|
619
|
+
...prev,
|
620
|
+
[name]: {
|
621
|
+
statePath,
|
622
|
+
value: updater(prevValue),
|
623
|
+
isValid: validator(prevValue),
|
624
|
+
},
|
625
|
+
};
|
626
|
+
});
|
627
|
+
},
|
628
|
+
};
|
629
|
+
if (isEmpty(get(writableValue))) {
|
630
|
+
writableValue.set(initialValue);
|
631
|
+
}
|
632
|
+
return writableValue;
|
633
|
+
}
|
634
|
+
/** @internal */
|
635
|
+
const getValuesAreValidReader = statePath => ({
|
636
|
+
subscribe(callback) {
|
637
|
+
return formData.subscribe(formData => {
|
638
|
+
const valuesAreValid = Object.entries(formData)
|
639
|
+
.filter(([_, { statePath: s }]) => s === statePath) // eslint-disable-line @typescript-eslint/no-unused-vars
|
640
|
+
.every(([_, { isValid }]) => isValid); // eslint-disable-line @typescript-eslint/no-unused-vars
|
641
|
+
callback(valuesAreValid);
|
642
|
+
});
|
643
|
+
},
|
644
|
+
});
|
645
|
+
function formDataToEventValues(campaignId, formData) {
|
646
|
+
const questions = [];
|
647
|
+
const answersMap = {};
|
648
|
+
Object.entries(formData).forEach(([name, dataItem]) => {
|
649
|
+
questions.push(name);
|
650
|
+
const value = dataItem.value;
|
651
|
+
const answerKey = `question_${name}`;
|
652
|
+
if (Array.isArray(value)) {
|
653
|
+
answersMap[answerKey] = {
|
654
|
+
choices: value,
|
655
|
+
};
|
656
|
+
}
|
657
|
+
else if (typeof value === 'string') {
|
658
|
+
answersMap[answerKey] = {
|
659
|
+
free_answer: value,
|
660
|
+
};
|
661
|
+
}
|
662
|
+
});
|
663
|
+
return {
|
664
|
+
[campaignId]: {
|
665
|
+
questions,
|
666
|
+
...answersMap,
|
667
|
+
},
|
668
|
+
};
|
669
|
+
}
|
670
|
+
/** @internal */
|
671
|
+
function submit() {
|
672
|
+
const systemConfig = getSystem();
|
673
|
+
const campaignId = systemConfig.campaignId;
|
674
|
+
if (campaignId) {
|
675
|
+
const formData$1 = get(formData);
|
676
|
+
const values = formDataToEventValues(campaignId, formData$1);
|
677
|
+
return values;
|
678
|
+
}
|
679
|
+
{
|
680
|
+
const formData$1 = get(formData);
|
681
|
+
const values = formDataToEventValues('mock', formData$1);
|
682
|
+
console.log('values: ', values);
|
683
|
+
return values;
|
684
|
+
}
|
685
|
+
}
|
686
|
+
|
589
687
|
/** @internal */
|
590
688
|
const ALL_ACTION_ID = 'KARTE_ALL_ACTION_ID';
|
591
689
|
/** @internal */
|
@@ -631,10 +729,13 @@ const send_event = (event_name, values) => {
|
|
631
729
|
const setting = getActionSetting();
|
632
730
|
setting?.send?.(event_name, values);
|
633
731
|
};
|
634
|
-
|
635
|
-
const moveTo = (to) => () => {
|
732
|
+
function _moveTo(to) {
|
636
733
|
send_event('_message_state_changed', { state: to });
|
637
734
|
window.dispatchEvent(new CustomEvent(ACTION_CHANGE_STATE_EVENT, { detail: { to, actionId } }));
|
735
|
+
}
|
736
|
+
/** @internal */
|
737
|
+
const moveTo = (to) => () => {
|
738
|
+
_moveTo(to);
|
638
739
|
};
|
639
740
|
/** @internal */
|
640
741
|
const linkTo = (to, targetBlank = true) => () => {
|
@@ -664,6 +765,21 @@ const runScript = (handlerName) => () => {
|
|
664
765
|
}
|
665
766
|
};
|
666
767
|
/** @internal */
|
768
|
+
const submitForm = (to) => () => {
|
769
|
+
const values = submit();
|
770
|
+
send_event('_answer_question', values);
|
771
|
+
_moveTo(to);
|
772
|
+
};
|
773
|
+
/** @internal */
|
774
|
+
const nextForm = (to) => () => {
|
775
|
+
_moveTo(to);
|
776
|
+
};
|
777
|
+
/** @internal */
|
778
|
+
const prevForm = (to) => () => {
|
779
|
+
// deleteValues(stateId);
|
780
|
+
_moveTo(to);
|
781
|
+
};
|
782
|
+
/** @internal */
|
667
783
|
const execOnClickOperation = (onClickOperation) => {
|
668
784
|
if (onClickOperation.operation === 'linkTo') {
|
669
785
|
linkTo(...onClickOperation.args)();
|
@@ -677,6 +793,15 @@ const execOnClickOperation = (onClickOperation) => {
|
|
677
793
|
else if (onClickOperation.operation === 'runScript') {
|
678
794
|
runScript(onClickOperation.args[0])();
|
679
795
|
}
|
796
|
+
else if (onClickOperation.operation === 'submitForm') {
|
797
|
+
submitForm(onClickOperation.args[0])();
|
798
|
+
}
|
799
|
+
else if (onClickOperation.operation === 'nextForm') {
|
800
|
+
nextForm(onClickOperation.args[0])();
|
801
|
+
}
|
802
|
+
else if (onClickOperation.operation === 'prevForm') {
|
803
|
+
prevForm(onClickOperation.args[0])();
|
804
|
+
}
|
680
805
|
};
|
681
806
|
/** @internal */
|
682
807
|
const haveFunction = (onClickOperation) => {
|
@@ -992,11 +1117,8 @@ const OnClickOperationOptions = [
|
|
992
1117
|
},
|
993
1118
|
],
|
994
1119
|
},
|
995
|
-
];
|
996
|
-
/** @internal */
|
997
|
-
const FormOperationOptions = [
|
998
1120
|
{
|
999
|
-
operation: '
|
1121
|
+
operation: 'submitForm',
|
1000
1122
|
args: [
|
1001
1123
|
{
|
1002
1124
|
type: 'TransitState',
|
@@ -1005,7 +1127,7 @@ const FormOperationOptions = [
|
|
1005
1127
|
],
|
1006
1128
|
},
|
1007
1129
|
{
|
1008
|
-
operation: '
|
1130
|
+
operation: 'nextForm',
|
1009
1131
|
args: [
|
1010
1132
|
{
|
1011
1133
|
type: 'TransitState',
|
@@ -1014,7 +1136,7 @@ const FormOperationOptions = [
|
|
1014
1136
|
],
|
1015
1137
|
},
|
1016
1138
|
{
|
1017
|
-
operation: '
|
1139
|
+
operation: 'prevForm',
|
1018
1140
|
args: [
|
1019
1141
|
{
|
1020
1142
|
type: 'TransitState',
|
@@ -1930,14 +2052,14 @@ var widget = /*#__PURE__*/Object.freeze({
|
|
1930
2052
|
|
1931
2053
|
/* src/components/Normalize.svelte generated by Svelte v3.53.1 */
|
1932
2054
|
|
1933
|
-
function add_css$
|
2055
|
+
function add_css$o(target) {
|
1934
2056
|
append_styles(target, "svelte-tr4qnr", "@import 'https://esm.sh/normalize.css';");
|
1935
2057
|
}
|
1936
2058
|
|
1937
2059
|
class Normalize extends SvelteComponent {
|
1938
2060
|
constructor(options) {
|
1939
2061
|
super();
|
1940
|
-
init(this, options, null, null, safe_not_equal, {}, add_css$
|
2062
|
+
init(this, options, null, null, safe_not_equal, {}, add_css$o);
|
1941
2063
|
}
|
1942
2064
|
}
|
1943
2065
|
|
@@ -2026,12 +2148,12 @@ class State extends SvelteComponent {
|
|
2026
2148
|
|
2027
2149
|
/* src/components/StateItem.svelte generated by Svelte v3.53.1 */
|
2028
2150
|
|
2029
|
-
function add_css$
|
2151
|
+
function add_css$n(target) {
|
2030
2152
|
append_styles(target, "svelte-2qb6dm", ".state-item.svelte-2qb6dm{position:absolute;display:none}");
|
2031
2153
|
}
|
2032
2154
|
|
2033
2155
|
// (23:0) {#if $state === path}
|
2034
|
-
function create_if_block$
|
2156
|
+
function create_if_block$7(ctx) {
|
2035
2157
|
let div;
|
2036
2158
|
let t;
|
2037
2159
|
let current;
|
@@ -2106,7 +2228,7 @@ function create_if_block$5(ctx) {
|
|
2106
2228
|
function create_fragment$q(ctx) {
|
2107
2229
|
let if_block_anchor;
|
2108
2230
|
let current;
|
2109
|
-
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$
|
2231
|
+
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$7(ctx);
|
2110
2232
|
|
2111
2233
|
return {
|
2112
2234
|
c() {
|
@@ -2131,7 +2253,7 @@ function create_fragment$q(ctx) {
|
|
2131
2253
|
transition_in(if_block, 1);
|
2132
2254
|
}
|
2133
2255
|
} else {
|
2134
|
-
if_block = create_if_block$
|
2256
|
+
if_block = create_if_block$7(ctx);
|
2135
2257
|
if_block.c();
|
2136
2258
|
transition_in(if_block, 1);
|
2137
2259
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
@@ -2194,18 +2316,18 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
2194
2316
|
class StateItem extends SvelteComponent {
|
2195
2317
|
constructor(options) {
|
2196
2318
|
super();
|
2197
|
-
init(this, options, instance$q, create_fragment$q, safe_not_equal, { path: 0 }, add_css$
|
2319
|
+
init(this, options, instance$q, create_fragment$q, safe_not_equal, { path: 0 }, add_css$n);
|
2198
2320
|
}
|
2199
2321
|
}
|
2200
2322
|
|
2201
2323
|
/* src/components/BackgroundOverray.svelte generated by Svelte v3.53.1 */
|
2202
2324
|
|
2203
|
-
function add_css$
|
2325
|
+
function add_css$m(target) {
|
2204
2326
|
append_styles(target, "svelte-1d4fta", ".background.svelte-1d4fta{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3);z-index:2147483646}");
|
2205
2327
|
}
|
2206
2328
|
|
2207
2329
|
// (9:0) {#if backgroundOverray}
|
2208
|
-
function create_if_block$
|
2330
|
+
function create_if_block$6(ctx) {
|
2209
2331
|
let div;
|
2210
2332
|
let mounted;
|
2211
2333
|
let dispose;
|
@@ -2242,7 +2364,7 @@ function create_if_block$4(ctx) {
|
|
2242
2364
|
|
2243
2365
|
function create_fragment$p(ctx) {
|
2244
2366
|
let if_block_anchor;
|
2245
|
-
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$
|
2367
|
+
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$6(ctx);
|
2246
2368
|
|
2247
2369
|
return {
|
2248
2370
|
c() {
|
@@ -2262,7 +2384,7 @@ function create_fragment$p(ctx) {
|
|
2262
2384
|
if (if_block) {
|
2263
2385
|
if_block.p(ctx, dirty);
|
2264
2386
|
} else {
|
2265
|
-
if_block = create_if_block$
|
2387
|
+
if_block = create_if_block$6(ctx);
|
2266
2388
|
if_block.c();
|
2267
2389
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
2268
2390
|
}
|
@@ -2295,18 +2417,18 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
2295
2417
|
class BackgroundOverray extends SvelteComponent {
|
2296
2418
|
constructor(options) {
|
2297
2419
|
super();
|
2298
|
-
init(this, options, instance$p, create_fragment$p, safe_not_equal, { backgroundOverray: 0 }, add_css$
|
2420
|
+
init(this, options, instance$p, create_fragment$p, safe_not_equal, { backgroundOverray: 0 }, add_css$m);
|
2299
2421
|
}
|
2300
2422
|
}
|
2301
2423
|
|
2302
2424
|
/* src/components/Modal.svelte generated by Svelte v3.53.1 */
|
2303
2425
|
|
2304
|
-
function add_css$
|
2426
|
+
function add_css$l(target) {
|
2305
2427
|
append_styles(target, "svelte-12dkw0q", ".modal.svelte-12dkw0q{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-12dkw0q{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-12dkw0q:hover{transform:rotate(90deg)}.modal-content.svelte-12dkw0q{display:flex;justify-content:center;align-items:center}");
|
2306
2428
|
}
|
2307
2429
|
|
2308
2430
|
// (142:0) {#if visible}
|
2309
|
-
function create_if_block$
|
2431
|
+
function create_if_block$5(ctx) {
|
2310
2432
|
let div1;
|
2311
2433
|
let t;
|
2312
2434
|
let div0;
|
@@ -2315,7 +2437,7 @@ function create_if_block$3(ctx) {
|
|
2315
2437
|
let current;
|
2316
2438
|
let mounted;
|
2317
2439
|
let dispose;
|
2318
|
-
let if_block = /*closable*/ ctx[14] && create_if_block_1$
|
2440
|
+
let if_block = /*closable*/ ctx[14] && create_if_block_1$2(ctx);
|
2319
2441
|
const default_slot_template = /*#slots*/ ctx[29].default;
|
2320
2442
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[28], null);
|
2321
2443
|
|
@@ -2382,7 +2504,7 @@ function create_if_block$3(ctx) {
|
|
2382
2504
|
if (if_block) {
|
2383
2505
|
if_block.p(ctx, dirty);
|
2384
2506
|
} else {
|
2385
|
-
if_block = create_if_block_1$
|
2507
|
+
if_block = create_if_block_1$2(ctx);
|
2386
2508
|
if_block.c();
|
2387
2509
|
if_block.m(div1, t);
|
2388
2510
|
}
|
@@ -2447,7 +2569,7 @@ function create_if_block$3(ctx) {
|
|
2447
2569
|
}
|
2448
2570
|
|
2449
2571
|
// (159:4) {#if closable}
|
2450
|
-
function create_if_block_1$
|
2572
|
+
function create_if_block_1$2(ctx) {
|
2451
2573
|
let button;
|
2452
2574
|
let svg;
|
2453
2575
|
let path;
|
@@ -2549,7 +2671,7 @@ function create_fragment$o(ctx) {
|
|
2549
2671
|
if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
|
2550
2672
|
});
|
2551
2673
|
|
2552
|
-
let if_block = /*visible*/ ctx[6] && create_if_block$
|
2674
|
+
let if_block = /*visible*/ ctx[6] && create_if_block$5(ctx);
|
2553
2675
|
|
2554
2676
|
return {
|
2555
2677
|
c() {
|
@@ -2593,7 +2715,7 @@ function create_fragment$o(ctx) {
|
|
2593
2715
|
transition_in(if_block, 1);
|
2594
2716
|
}
|
2595
2717
|
} else {
|
2596
|
-
if_block = create_if_block$
|
2718
|
+
if_block = create_if_block$5(ctx);
|
2597
2719
|
if_block.c();
|
2598
2720
|
transition_in(if_block, 1);
|
2599
2721
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
@@ -2838,7 +2960,7 @@ class Modal extends SvelteComponent {
|
|
2838
2960
|
closeButtonColor: 2,
|
2839
2961
|
_closeStyle: 3
|
2840
2962
|
},
|
2841
|
-
add_css$
|
2963
|
+
add_css$l
|
2842
2964
|
);
|
2843
2965
|
}
|
2844
2966
|
}
|
@@ -3293,7 +3415,7 @@ class GridModalState extends SvelteComponent {
|
|
3293
3415
|
|
3294
3416
|
/* src/components/GridItem.svelte generated by Svelte v3.53.1 */
|
3295
3417
|
|
3296
|
-
function add_css$
|
3418
|
+
function add_css$k(target) {
|
3297
3419
|
append_styles(target, "svelte-n7kdl3", ".grid-item.svelte-n7kdl3{word-break:break-all;position:relative}.grid-item-inner.svelte-n7kdl3{position:absolute;inset:0}");
|
3298
3420
|
}
|
3299
3421
|
|
@@ -3442,14 +3564,14 @@ class GridItem extends SvelteComponent {
|
|
3442
3564
|
z: 6,
|
3443
3565
|
background: 7
|
3444
3566
|
},
|
3445
|
-
add_css$
|
3567
|
+
add_css$k
|
3446
3568
|
);
|
3447
3569
|
}
|
3448
3570
|
}
|
3449
3571
|
|
3450
3572
|
/* src/components/Flex.svelte generated by Svelte v3.53.1 */
|
3451
3573
|
|
3452
|
-
function add_css$
|
3574
|
+
function add_css$j(target) {
|
3453
3575
|
append_styles(target, "svelte-1e71ejc", ".flex.svelte-1e71ejc{display:flex}");
|
3454
3576
|
}
|
3455
3577
|
|
@@ -3563,14 +3685,14 @@ class Flex extends SvelteComponent {
|
|
3563
3685
|
height: 2,
|
3564
3686
|
_style: 3
|
3565
3687
|
},
|
3566
|
-
add_css$
|
3688
|
+
add_css$j
|
3567
3689
|
);
|
3568
3690
|
}
|
3569
3691
|
}
|
3570
3692
|
|
3571
3693
|
/* src/components/FlexItem.svelte generated by Svelte v3.53.1 */
|
3572
3694
|
|
3573
|
-
function add_css$
|
3695
|
+
function add_css$i(target) {
|
3574
3696
|
append_styles(target, "svelte-1p0bk1x", ".flex-item.svelte-1p0bk1x{max-width:100%;max-height:100%;position:relative;isolation:isolate}");
|
3575
3697
|
}
|
3576
3698
|
|
@@ -3685,13 +3807,13 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
3685
3807
|
class FlexItem extends SvelteComponent {
|
3686
3808
|
constructor(options) {
|
3687
3809
|
super();
|
3688
|
-
init(this, options, instance$j, create_fragment$j, safe_not_equal, { length: 1, _style: 2 }, add_css$
|
3810
|
+
init(this, options, instance$j, create_fragment$j, safe_not_equal, { length: 1, _style: 2 }, add_css$i);
|
3689
3811
|
}
|
3690
3812
|
}
|
3691
3813
|
|
3692
3814
|
/* src/components/RenderText.svelte generated by Svelte v3.53.1 */
|
3693
3815
|
|
3694
|
-
function get_each_context$
|
3816
|
+
function get_each_context$5(ctx, list, i) {
|
3695
3817
|
const child_ctx = ctx.slice();
|
3696
3818
|
child_ctx[2] = list[i];
|
3697
3819
|
return child_ctx;
|
@@ -3722,7 +3844,7 @@ function create_else_block$1(ctx) {
|
|
3722
3844
|
}
|
3723
3845
|
|
3724
3846
|
// (10:2) {#if item.match(regexp)}
|
3725
|
-
function create_if_block$
|
3847
|
+
function create_if_block$4(ctx) {
|
3726
3848
|
let br;
|
3727
3849
|
|
3728
3850
|
return {
|
@@ -3743,14 +3865,14 @@ function create_if_block$2(ctx) {
|
|
3743
3865
|
}
|
3744
3866
|
|
3745
3867
|
// (9:0) {#each items as item}
|
3746
|
-
function create_each_block$
|
3868
|
+
function create_each_block$5(ctx) {
|
3747
3869
|
let show_if;
|
3748
3870
|
let if_block_anchor;
|
3749
3871
|
|
3750
3872
|
function select_block_type(ctx, dirty) {
|
3751
3873
|
if (dirty & /*items*/ 1) show_if = null;
|
3752
3874
|
if (show_if == null) show_if = !!/*item*/ ctx[2].match(regexp);
|
3753
|
-
if (show_if) return create_if_block$
|
3875
|
+
if (show_if) return create_if_block$4;
|
3754
3876
|
return create_else_block$1;
|
3755
3877
|
}
|
3756
3878
|
|
@@ -3796,7 +3918,7 @@ function create_fragment$i(ctx) {
|
|
3796
3918
|
let each_blocks = [];
|
3797
3919
|
|
3798
3920
|
for (let i = 0; i < each_value.length; i += 1) {
|
3799
|
-
each_blocks[i] = create_each_block$
|
3921
|
+
each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i));
|
3800
3922
|
}
|
3801
3923
|
|
3802
3924
|
return {
|
@@ -3827,12 +3949,12 @@ function create_fragment$i(ctx) {
|
|
3827
3949
|
let i;
|
3828
3950
|
|
3829
3951
|
for (i = 0; i < each_value.length; i += 1) {
|
3830
|
-
const child_ctx = get_each_context$
|
3952
|
+
const child_ctx = get_each_context$5(ctx, each_value, i);
|
3831
3953
|
|
3832
3954
|
if (each_blocks[i]) {
|
3833
3955
|
each_blocks[i].p(child_ctx, dirty);
|
3834
3956
|
} else {
|
3835
|
-
each_blocks[i] = create_each_block$
|
3957
|
+
each_blocks[i] = create_each_block$5(child_ctx);
|
3836
3958
|
each_blocks[i].c();
|
3837
3959
|
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
3838
3960
|
}
|
@@ -3882,7 +4004,7 @@ class RenderText extends SvelteComponent {
|
|
3882
4004
|
|
3883
4005
|
/* src/components/TextElement.svelte generated by Svelte v3.53.1 */
|
3884
4006
|
|
3885
|
-
function add_css$
|
4007
|
+
function add_css$h(target) {
|
3886
4008
|
append_styles(target, "svelte-9en2jg", ".text-element.svelte-9en2jg.svelte-9en2jg{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-9en2jg.svelte-9en2jg{width:100%;height:auto}.text-direction-vertical.svelte-9en2jg.svelte-9en2jg{writing-mode:vertical-rl}.text-direction-vertical.svelte-9en2jg .text-element-inner.svelte-9en2jg{width:auto;height:100%}");
|
3887
4009
|
}
|
3888
4010
|
|
@@ -3990,21 +4112,23 @@ class TextElement extends SvelteComponent {
|
|
3990
4112
|
textDirection: 1,
|
3991
4113
|
_style: 4
|
3992
4114
|
},
|
3993
|
-
add_css$
|
4115
|
+
add_css$h
|
3994
4116
|
);
|
3995
4117
|
}
|
3996
4118
|
}
|
3997
4119
|
|
3998
4120
|
/* src/components/TextButtonElement.svelte generated by Svelte v3.53.1 */
|
3999
4121
|
|
4000
|
-
function add_css$
|
4001
|
-
append_styles(target, "svelte-
|
4122
|
+
function add_css$g(target) {
|
4123
|
+
append_styles(target, "svelte-1igv5yx", ".text-button-element.svelte-1igv5yx{width:100%;height:100%}.text-button-element._disabled.svelte-1igv5yx{opacity:0.2}.text-button.svelte-1igv5yx{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s;white-space:pre-wrap;overflow:hidden}.text-button._disabled.svelte-1igv5yx{cursor:not-allowed}.text-button.svelte-1igv5yx:active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button.svelte-1igv5yx:hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
|
4002
4124
|
}
|
4003
4125
|
|
4004
4126
|
function create_fragment$g(ctx) {
|
4005
4127
|
let div;
|
4006
4128
|
let button;
|
4007
4129
|
let rendertext;
|
4130
|
+
let button_class_value;
|
4131
|
+
let div_class_value;
|
4008
4132
|
let current;
|
4009
4133
|
let mounted;
|
4010
4134
|
let dispose;
|
@@ -4028,9 +4152,10 @@ function create_fragment$g(ctx) {
|
|
4028
4152
|
this.h();
|
4029
4153
|
},
|
4030
4154
|
h() {
|
4031
|
-
attr(button, "class", "text-button svelte-
|
4155
|
+
attr(button, "class", button_class_value = "" + (null_to_empty(`text-button${/*disabled*/ ctx[3] ? ' _disabled' : ''}`) + " svelte-1igv5yx"));
|
4032
4156
|
attr(button, "style", /*_buttonStyle*/ ctx[1]);
|
4033
|
-
|
4157
|
+
button.disabled = /*disabled*/ ctx[3];
|
4158
|
+
attr(div, "class", div_class_value = "" + (null_to_empty(`text-button-element${/*disabled*/ ctx[3] ? ' _disabled' : ''}`) + " svelte-1igv5yx"));
|
4034
4159
|
attr(div, "style", /*_style*/ ctx[2]);
|
4035
4160
|
},
|
4036
4161
|
m(target, anchor) {
|
@@ -4040,7 +4165,7 @@ function create_fragment$g(ctx) {
|
|
4040
4165
|
current = true;
|
4041
4166
|
|
4042
4167
|
if (!mounted) {
|
4043
|
-
dispose = listen(button, "click", /*click*/ ctx[
|
4168
|
+
dispose = listen(button, "click", /*click*/ ctx[4]);
|
4044
4169
|
mounted = true;
|
4045
4170
|
}
|
4046
4171
|
},
|
@@ -4049,10 +4174,22 @@ function create_fragment$g(ctx) {
|
|
4049
4174
|
if (dirty & /*text*/ 1) rendertext_changes.text = /*text*/ ctx[0];
|
4050
4175
|
rendertext.$set(rendertext_changes);
|
4051
4176
|
|
4177
|
+
if (!current || dirty & /*disabled*/ 8 && button_class_value !== (button_class_value = "" + (null_to_empty(`text-button${/*disabled*/ ctx[3] ? ' _disabled' : ''}`) + " svelte-1igv5yx"))) {
|
4178
|
+
attr(button, "class", button_class_value);
|
4179
|
+
}
|
4180
|
+
|
4052
4181
|
if (!current || dirty & /*_buttonStyle*/ 2) {
|
4053
4182
|
attr(button, "style", /*_buttonStyle*/ ctx[1]);
|
4054
4183
|
}
|
4055
4184
|
|
4185
|
+
if (!current || dirty & /*disabled*/ 8) {
|
4186
|
+
button.disabled = /*disabled*/ ctx[3];
|
4187
|
+
}
|
4188
|
+
|
4189
|
+
if (!current || dirty & /*disabled*/ 8 && div_class_value !== (div_class_value = "" + (null_to_empty(`text-button-element${/*disabled*/ ctx[3] ? ' _disabled' : ''}`) + " svelte-1igv5yx"))) {
|
4190
|
+
attr(div, "class", div_class_value);
|
4191
|
+
}
|
4192
|
+
|
4056
4193
|
if (!current || dirty & /*_style*/ 4) {
|
4057
4194
|
attr(div, "style", /*_style*/ ctx[2]);
|
4058
4195
|
}
|
@@ -4076,6 +4213,8 @@ function create_fragment$g(ctx) {
|
|
4076
4213
|
}
|
4077
4214
|
|
4078
4215
|
function instance$g($$self, $$props, $$invalidate) {
|
4216
|
+
let disabled;
|
4217
|
+
let $valuesAreValid;
|
4079
4218
|
let { text = 'ボタンラベル' } = $$props;
|
4080
4219
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
4081
4220
|
|
@@ -4090,16 +4229,45 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
4090
4229
|
let { eventName = '' } = $$props;
|
4091
4230
|
let { _buttonStyle = 'color:#ffffff; font-size:14px; font-weight:bold; justify-content:center; align-items:center; padding:1px 6px 1px 6px;' } = $$props;
|
4092
4231
|
let { _style = 'background-color: #000000; border-radius:4px;' } = $$props;
|
4232
|
+
const { path: statePath } = getStateItemContext() ?? { path: '/' };
|
4233
|
+
const valuesAreValid = getValuesAreValidReader(statePath);
|
4234
|
+
component_subscribe($$self, valuesAreValid, value => $$invalidate(8, $valuesAreValid = value));
|
4093
4235
|
|
4094
4236
|
$$self.$$set = $$props => {
|
4095
4237
|
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
4096
|
-
if ('onClick' in $$props) $$invalidate(
|
4097
|
-
if ('eventName' in $$props) $$invalidate(
|
4238
|
+
if ('onClick' in $$props) $$invalidate(6, onClick = $$props.onClick);
|
4239
|
+
if ('eventName' in $$props) $$invalidate(7, eventName = $$props.eventName);
|
4098
4240
|
if ('_buttonStyle' in $$props) $$invalidate(1, _buttonStyle = $$props._buttonStyle);
|
4099
4241
|
if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
|
4100
4242
|
};
|
4101
4243
|
|
4102
|
-
|
4244
|
+
$$self.$$.update = () => {
|
4245
|
+
if ($$self.$$.dirty & /*onClick, $valuesAreValid*/ 320) {
|
4246
|
+
$$invalidate(3, disabled = (() => {
|
4247
|
+
let isEnabled = true;
|
4248
|
+
|
4249
|
+
if (onClick.operation === 'submitForm') {
|
4250
|
+
isEnabled = $valuesAreValid;
|
4251
|
+
} else if (onClick.operation === 'nextForm') {
|
4252
|
+
isEnabled = $valuesAreValid;
|
4253
|
+
}
|
4254
|
+
|
4255
|
+
return !isEnabled;
|
4256
|
+
})());
|
4257
|
+
}
|
4258
|
+
};
|
4259
|
+
|
4260
|
+
return [
|
4261
|
+
text,
|
4262
|
+
_buttonStyle,
|
4263
|
+
_style,
|
4264
|
+
disabled,
|
4265
|
+
click,
|
4266
|
+
valuesAreValid,
|
4267
|
+
onClick,
|
4268
|
+
eventName,
|
4269
|
+
$valuesAreValid
|
4270
|
+
];
|
4103
4271
|
}
|
4104
4272
|
|
4105
4273
|
class TextButtonElement extends SvelteComponent {
|
@@ -4114,19 +4282,19 @@ class TextButtonElement extends SvelteComponent {
|
|
4114
4282
|
safe_not_equal,
|
4115
4283
|
{
|
4116
4284
|
text: 0,
|
4117
|
-
onClick:
|
4118
|
-
eventName:
|
4285
|
+
onClick: 6,
|
4286
|
+
eventName: 7,
|
4119
4287
|
_buttonStyle: 1,
|
4120
4288
|
_style: 2
|
4121
4289
|
},
|
4122
|
-
add_css$
|
4290
|
+
add_css$g
|
4123
4291
|
);
|
4124
4292
|
}
|
4125
4293
|
}
|
4126
4294
|
|
4127
4295
|
/* src/components/ImageElement.svelte generated by Svelte v3.53.1 */
|
4128
4296
|
|
4129
|
-
function add_css$
|
4297
|
+
function add_css$f(target) {
|
4130
4298
|
append_styles(target, "svelte-t8kpqw", ".image-element.svelte-t8kpqw{display:flex;position:relative;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;white-space:nowrap;box-sizing:border-box;overflow:hidden}.image.svelte-t8kpqw{width:100%;height:100%}.transport.svelte-t8kpqw:hover,.transport.svelte-t8kpqw:focus{opacity:0.75;box-shadow:0 5px 16px rgba(0, 0, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.16)}");
|
4131
4299
|
}
|
4132
4300
|
|
@@ -4262,14 +4430,14 @@ class ImageElement extends SvelteComponent {
|
|
4262
4430
|
_imageStyle: 3,
|
4263
4431
|
_style: 4
|
4264
4432
|
},
|
4265
|
-
add_css$
|
4433
|
+
add_css$f
|
4266
4434
|
);
|
4267
4435
|
}
|
4268
4436
|
}
|
4269
4437
|
|
4270
4438
|
/* src/components/List.svelte generated by Svelte v3.53.1 */
|
4271
4439
|
|
4272
|
-
function add_css$
|
4440
|
+
function add_css$e(target) {
|
4273
4441
|
append_styles(target, "svelte-dfqtyx", ".list.svelte-dfqtyx{display:flex;width:100%;height:100%;overflow:hidden}");
|
4274
4442
|
}
|
4275
4443
|
|
@@ -4419,14 +4587,14 @@ class List extends SvelteComponent {
|
|
4419
4587
|
background: 3,
|
4420
4588
|
_style: 4
|
4421
4589
|
},
|
4422
|
-
add_css$
|
4590
|
+
add_css$e
|
4423
4591
|
);
|
4424
4592
|
}
|
4425
4593
|
}
|
4426
4594
|
|
4427
4595
|
/* src/components/ListItem.svelte generated by Svelte v3.53.1 */
|
4428
4596
|
|
4429
|
-
function add_css$
|
4597
|
+
function add_css$d(target) {
|
4430
4598
|
append_styles(target, "svelte-h5j4xe", ".list-item.svelte-h5j4xe{flex:auto;box-sizing:border-box;min-width:0;min-height:0;position:relative}.list-item-inner.svelte-h5j4xe{position:absolute;inset:0}");
|
4431
4599
|
}
|
4432
4600
|
|
@@ -4614,13 +4782,13 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
4614
4782
|
class ListItem extends SvelteComponent {
|
4615
4783
|
constructor(options) {
|
4616
4784
|
super();
|
4617
|
-
init(this, options, instance$d, create_fragment$d, safe_not_equal, { onClick: 3, clickEventName: 4, _style: 0 }, add_css$
|
4785
|
+
init(this, options, instance$d, create_fragment$d, safe_not_equal, { onClick: 3, clickEventName: 4, _style: 0 }, add_css$d);
|
4618
4786
|
}
|
4619
4787
|
}
|
4620
4788
|
|
4621
4789
|
/* src/components/EmbedElement.svelte generated by Svelte v3.53.1 */
|
4622
4790
|
|
4623
|
-
function add_css$
|
4791
|
+
function add_css$c(target) {
|
4624
4792
|
append_styles(target, "svelte-17rkg8u", ".embed.svelte-17rkg8u{box-shadow:0 1px rgba(0, 0, 0, 0.06);overflow:hidden;width:100%;height:100%}.embed.svelte-17rkg8u iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
4625
4793
|
}
|
4626
4794
|
|
@@ -4675,13 +4843,13 @@ function instance$c($$self, $$props, $$invalidate) {
|
|
4675
4843
|
class EmbedElement extends SvelteComponent {
|
4676
4844
|
constructor(options) {
|
4677
4845
|
super();
|
4678
|
-
init(this, options, instance$c, create_fragment$c, safe_not_equal, { code: 0, _style: 1 }, add_css$
|
4846
|
+
init(this, options, instance$c, create_fragment$c, safe_not_equal, { code: 0, _style: 1 }, add_css$c);
|
4679
4847
|
}
|
4680
4848
|
}
|
4681
4849
|
|
4682
4850
|
/* src/components/MovieYouTubeElement.svelte generated by Svelte v3.53.1 */
|
4683
4851
|
|
4684
|
-
function add_css$
|
4852
|
+
function add_css$b(target) {
|
4685
4853
|
append_styles(target, "svelte-17rkg8u", ".embed.svelte-17rkg8u{box-shadow:0 1px rgba(0, 0, 0, 0.06);overflow:hidden;width:100%;height:100%}.embed.svelte-17rkg8u iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
4686
4854
|
}
|
4687
4855
|
|
@@ -4917,14 +5085,14 @@ class MovieYouTubeElement extends SvelteComponent {
|
|
4917
5085
|
mute: 6,
|
4918
5086
|
_style: 0
|
4919
5087
|
},
|
4920
|
-
add_css$
|
5088
|
+
add_css$b
|
4921
5089
|
);
|
4922
5090
|
}
|
4923
5091
|
}
|
4924
5092
|
|
4925
5093
|
/* src/components/MovieVimeoElement.svelte generated by Svelte v3.53.1 */
|
4926
5094
|
|
4927
|
-
function add_css$
|
5095
|
+
function add_css$a(target) {
|
4928
5096
|
append_styles(target, "svelte-17rkg8u", ".embed.svelte-17rkg8u{box-shadow:0 1px rgba(0, 0, 0, 0.06);overflow:hidden;width:100%;height:100%}.embed.svelte-17rkg8u iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
4929
5097
|
}
|
4930
5098
|
|
@@ -5124,114 +5292,15 @@ class MovieVimeoElement extends SvelteComponent {
|
|
5124
5292
|
mute: 6,
|
5125
5293
|
_style: 0
|
5126
5294
|
},
|
5127
|
-
add_css$
|
5295
|
+
add_css$a
|
5128
5296
|
);
|
5129
5297
|
}
|
5130
5298
|
}
|
5131
5299
|
|
5132
|
-
|
5133
|
-
|
5134
|
-
|
5135
|
-
|
5136
|
-
return formData.subscribe(formData => {
|
5137
|
-
run(formData[name]?.value);
|
5138
|
-
});
|
5139
|
-
},
|
5140
|
-
set(value) {
|
5141
|
-
formData.update(prev => ({
|
5142
|
-
...prev,
|
5143
|
-
[name]: {
|
5144
|
-
statePath,
|
5145
|
-
value,
|
5146
|
-
isValid: validator(value),
|
5147
|
-
},
|
5148
|
-
}));
|
5149
|
-
},
|
5150
|
-
update(updater) {
|
5151
|
-
formData.update(prev => {
|
5152
|
-
const prevValue = prev[name]?.value;
|
5153
|
-
return {
|
5154
|
-
...prev,
|
5155
|
-
[name]: {
|
5156
|
-
statePath,
|
5157
|
-
value: updater(prevValue),
|
5158
|
-
isValid: validator(prevValue),
|
5159
|
-
},
|
5160
|
-
};
|
5161
|
-
});
|
5162
|
-
},
|
5163
|
-
};
|
5164
|
-
writableValue.set(initialValue);
|
5165
|
-
return writableValue;
|
5166
|
-
}
|
5167
|
-
/** @internal */
|
5168
|
-
function deleteValues(statePath) {
|
5169
|
-
formData.update(prev => {
|
5170
|
-
const targetNames = Object.entries(prev)
|
5171
|
-
.filter(([_, { statePath: s }]) => s === statePath) // eslint-disable-line @typescript-eslint/no-unused-vars
|
5172
|
-
.map(([name]) => name);
|
5173
|
-
targetNames.forEach(name => {
|
5174
|
-
delete prev[name];
|
5175
|
-
});
|
5176
|
-
return { ...prev };
|
5177
|
-
});
|
5178
|
-
}
|
5179
|
-
/** @internal */
|
5180
|
-
const getValuesAreValidReader = statePath => ({
|
5181
|
-
subscribe(callback) {
|
5182
|
-
return formData.subscribe(formData => {
|
5183
|
-
const valuesAreValid = Object.entries(formData)
|
5184
|
-
.filter(([_, { statePath: s }]) => s === statePath) // eslint-disable-line @typescript-eslint/no-unused-vars
|
5185
|
-
.every(([_, { isValid }]) => isValid); // eslint-disable-line @typescript-eslint/no-unused-vars
|
5186
|
-
callback(valuesAreValid);
|
5187
|
-
});
|
5188
|
-
},
|
5189
|
-
});
|
5190
|
-
function formDataToEventValues(campaignId, formData) {
|
5191
|
-
const questions = [];
|
5192
|
-
const answersMap = {};
|
5193
|
-
Object.entries(formData).forEach(([name, dataItem]) => {
|
5194
|
-
questions.push(name);
|
5195
|
-
const value = dataItem.value;
|
5196
|
-
const answerKey = `question_${name}`;
|
5197
|
-
if (Array.isArray(value)) {
|
5198
|
-
answersMap[answerKey] = {
|
5199
|
-
choices: value,
|
5200
|
-
};
|
5201
|
-
}
|
5202
|
-
else if (typeof value === 'string') {
|
5203
|
-
answersMap[answerKey] = {
|
5204
|
-
free_answer: value,
|
5205
|
-
};
|
5206
|
-
}
|
5207
|
-
});
|
5208
|
-
return {
|
5209
|
-
[campaignId]: {
|
5210
|
-
questions,
|
5211
|
-
...answersMap,
|
5212
|
-
},
|
5213
|
-
};
|
5214
|
-
}
|
5215
|
-
/** @internal */
|
5216
|
-
function submit() {
|
5217
|
-
const systemConfig = getSystem();
|
5218
|
-
const campaignId = systemConfig.campaignId;
|
5219
|
-
if (campaignId) {
|
5220
|
-
const formData$1 = get(formData);
|
5221
|
-
const values = formDataToEventValues(campaignId, formData$1);
|
5222
|
-
send_event('_answer_question', values);
|
5223
|
-
}
|
5224
|
-
{
|
5225
|
-
const formData$1 = get(formData);
|
5226
|
-
const values = formDataToEventValues('mock', formData$1);
|
5227
|
-
console.log('values: ', values);
|
5228
|
-
}
|
5229
|
-
}
|
5230
|
-
|
5231
|
-
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
5232
|
-
|
5233
|
-
function add_css$8(target) {
|
5234
|
-
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}");
|
5300
|
+
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
5301
|
+
|
5302
|
+
function add_css$9(target) {
|
5303
|
+
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}");
|
5235
5304
|
}
|
5236
5305
|
|
5237
5306
|
function create_fragment$9(ctx) {
|
@@ -5354,145 +5423,33 @@ class FormTextarea extends SvelteComponent {
|
|
5354
5423
|
rows: 1,
|
5355
5424
|
placeholder: 2
|
5356
5425
|
},
|
5357
|
-
add_css$
|
5426
|
+
add_css$9
|
5358
5427
|
);
|
5359
5428
|
}
|
5360
5429
|
}
|
5361
5430
|
|
5362
|
-
/* src/components/FormButton.svelte generated by Svelte v3.53.1 */
|
5363
|
-
|
5364
|
-
function create_fragment$8(ctx) {
|
5365
|
-
let input;
|
5366
|
-
let mounted;
|
5367
|
-
let dispose;
|
5368
|
-
|
5369
|
-
return {
|
5370
|
-
c() {
|
5371
|
-
input = element("input");
|
5372
|
-
this.h();
|
5373
|
-
},
|
5374
|
-
l(nodes) {
|
5375
|
-
input = claim_element(nodes, "INPUT", { type: true, style: true });
|
5376
|
-
this.h();
|
5377
|
-
},
|
5378
|
-
h() {
|
5379
|
-
attr(input, "type", "button");
|
5380
|
-
set_style(input, "width", "100%");
|
5381
|
-
set_style(input, "height", "100%");
|
5382
|
-
input.value = /*text*/ ctx[0];
|
5383
|
-
input.disabled = /*disabled*/ ctx[1];
|
5384
|
-
},
|
5385
|
-
m(target, anchor) {
|
5386
|
-
insert_hydration(target, input, anchor);
|
5387
|
-
|
5388
|
-
if (!mounted) {
|
5389
|
-
dispose = listen(input, "click", /*handleClick*/ ctx[2]);
|
5390
|
-
mounted = true;
|
5391
|
-
}
|
5392
|
-
},
|
5393
|
-
p(ctx, [dirty]) {
|
5394
|
-
if (dirty & /*text*/ 1) {
|
5395
|
-
input.value = /*text*/ ctx[0];
|
5396
|
-
}
|
5397
|
-
|
5398
|
-
if (dirty & /*disabled*/ 2) {
|
5399
|
-
input.disabled = /*disabled*/ ctx[1];
|
5400
|
-
}
|
5401
|
-
},
|
5402
|
-
i: noop,
|
5403
|
-
o: noop,
|
5404
|
-
d(detaching) {
|
5405
|
-
if (detaching) detach(input);
|
5406
|
-
mounted = false;
|
5407
|
-
dispose();
|
5408
|
-
}
|
5409
|
-
};
|
5410
|
-
}
|
5411
|
-
|
5412
|
-
function instance$8($$self, $$props, $$invalidate) {
|
5413
|
-
let disabled;
|
5414
|
-
let $valuesAreValid;
|
5415
|
-
let { text = '' } = $$props;
|
5416
|
-
let { onClick = { operation: 'submit', args: ['/'] } } = $$props;
|
5417
|
-
const { path: statePath } = getStateItemContext();
|
5418
|
-
|
5419
|
-
function handleClick() {
|
5420
|
-
switch (onClick.operation) {
|
5421
|
-
case 'submit':
|
5422
|
-
{
|
5423
|
-
if ($valuesAreValid) {
|
5424
|
-
submit();
|
5425
|
-
const stateId = onClick.args[0];
|
5426
|
-
setState$1(stateId);
|
5427
|
-
}
|
5428
|
-
|
5429
|
-
break;
|
5430
|
-
}
|
5431
|
-
case 'next':
|
5432
|
-
{
|
5433
|
-
if ($valuesAreValid) {
|
5434
|
-
const stateId = onClick.args[0];
|
5435
|
-
setState$1(stateId);
|
5436
|
-
}
|
5437
|
-
|
5438
|
-
break;
|
5439
|
-
}
|
5440
|
-
case 'prev':
|
5441
|
-
{
|
5442
|
-
deleteValues(statePath);
|
5443
|
-
const stateId = onClick.args[0];
|
5444
|
-
setState$1(stateId);
|
5445
|
-
break;
|
5446
|
-
}
|
5447
|
-
}
|
5448
|
-
}
|
5449
|
-
|
5450
|
-
const valuesAreValid = getValuesAreValidReader(statePath);
|
5451
|
-
component_subscribe($$self, valuesAreValid, value => $$invalidate(5, $valuesAreValid = value));
|
5452
|
-
|
5453
|
-
$$self.$$set = $$props => {
|
5454
|
-
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
5455
|
-
if ('onClick' in $$props) $$invalidate(4, onClick = $$props.onClick);
|
5456
|
-
};
|
5457
|
-
|
5458
|
-
$$self.$$.update = () => {
|
5459
|
-
if ($$self.$$.dirty & /*onClick, $valuesAreValid*/ 48) {
|
5460
|
-
$$invalidate(1, disabled = (() => {
|
5461
|
-
const enabled = onClick.operation === 'prev' || $valuesAreValid;
|
5462
|
-
return !enabled;
|
5463
|
-
})());
|
5464
|
-
}
|
5465
|
-
};
|
5466
|
-
|
5467
|
-
return [text, disabled, handleClick, valuesAreValid, onClick, $valuesAreValid];
|
5468
|
-
}
|
5469
|
-
|
5470
|
-
class FormButton extends SvelteComponent {
|
5471
|
-
constructor(options) {
|
5472
|
-
super();
|
5473
|
-
init(this, options, instance$8, create_fragment$8, safe_not_equal, { text: 0, onClick: 4 });
|
5474
|
-
}
|
5475
|
-
}
|
5476
|
-
|
5477
5431
|
/* src/components/FormRadioButtons.svelte generated by Svelte v3.53.1 */
|
5478
5432
|
|
5479
|
-
function add_css$
|
5480
|
-
append_styles(target, "svelte-
|
5433
|
+
function add_css$8(target) {
|
5434
|
+
append_styles(target, "svelte-1574x6a", ".radio-buttons.svelte-1574x6a{display:flex;justify-content:space-evenly;flex-direction:column;width:100%;height:100%}.radio-button.svelte-1574x6a{font-size:12px;cursor:pointer;display:flex;align-items:center}.radio-button-input.svelte-1574x6a{appearance:none;margin:0;width:1.3em;height:1.3em;box-sizing:border-box;border-radius:0.7em;position:relative;background-color:rgba(0, 16, 14, 0.06);;;cursor:pointer}.radio-button-input.svelte-1574x6a:checked{border:solid 0.4em #2aab9f;background-color:#fff;box-shadow:0px 1px 8px 2px rgba(18,160,160,.08),0px 1px 4px -1px rgba(18,160,160,.24)}.radio-button-text.svelte-1574x6a{margin-left:0.4em}");
|
5481
5435
|
}
|
5482
5436
|
|
5483
|
-
function get_each_context$
|
5437
|
+
function get_each_context$4(ctx, list, i) {
|
5484
5438
|
const child_ctx = ctx.slice();
|
5485
|
-
child_ctx[
|
5486
|
-
child_ctx[
|
5439
|
+
child_ctx[8] = list[i];
|
5440
|
+
child_ctx[10] = i;
|
5487
5441
|
return child_ctx;
|
5488
5442
|
}
|
5489
5443
|
|
5490
|
-
// (
|
5491
|
-
function create_each_block$
|
5444
|
+
// (24:2) {#each _options as option, i}
|
5445
|
+
function create_each_block$4(ctx) {
|
5492
5446
|
let label;
|
5493
5447
|
let input;
|
5448
|
+
let input_value_value;
|
5449
|
+
let input_checked_value;
|
5494
5450
|
let t0;
|
5495
|
-
let
|
5451
|
+
let span;
|
5452
|
+
let t1_value = /*option*/ ctx[8] + "";
|
5496
5453
|
let t1;
|
5497
5454
|
let t2;
|
5498
5455
|
let mounted;
|
@@ -5503,34 +5460,43 @@ function create_each_block$3(ctx) {
|
|
5503
5460
|
label = element("label");
|
5504
5461
|
input = element("input");
|
5505
5462
|
t0 = space();
|
5463
|
+
span = element("span");
|
5506
5464
|
t1 = text(t1_value);
|
5507
5465
|
t2 = space();
|
5508
5466
|
this.h();
|
5509
5467
|
},
|
5510
5468
|
l(nodes) {
|
5511
|
-
label = claim_element(nodes, "LABEL", {});
|
5469
|
+
label = claim_element(nodes, "LABEL", { class: true });
|
5512
5470
|
var label_nodes = children(label);
|
5513
|
-
input = claim_element(label_nodes, "INPUT", { type: true, name: true });
|
5471
|
+
input = claim_element(label_nodes, "INPUT", { type: true, class: true, name: true });
|
5514
5472
|
t0 = claim_space(label_nodes);
|
5515
|
-
|
5473
|
+
span = claim_element(label_nodes, "SPAN", { class: true });
|
5474
|
+
var span_nodes = children(span);
|
5475
|
+
t1 = claim_text(span_nodes, t1_value);
|
5476
|
+
span_nodes.forEach(detach);
|
5516
5477
|
t2 = claim_space(label_nodes);
|
5517
5478
|
label_nodes.forEach(detach);
|
5518
5479
|
this.h();
|
5519
5480
|
},
|
5520
5481
|
h() {
|
5521
5482
|
attr(input, "type", "radio");
|
5483
|
+
attr(input, "class", "radio-button-input svelte-1574x6a");
|
5522
5484
|
attr(input, "name", /*name*/ ctx[0]);
|
5523
|
-
input.value =
|
5485
|
+
input.value = input_value_value = /*option*/ ctx[8];
|
5486
|
+
input.checked = input_checked_value = /*option*/ ctx[8] === /*_value*/ ctx[1];
|
5487
|
+
attr(span, "class", "radio-button-text svelte-1574x6a");
|
5488
|
+
attr(label, "class", "radio-button svelte-1574x6a");
|
5524
5489
|
},
|
5525
5490
|
m(target, anchor) {
|
5526
5491
|
insert_hydration(target, label, anchor);
|
5527
5492
|
append_hydration(label, input);
|
5528
5493
|
append_hydration(label, t0);
|
5529
|
-
append_hydration(label,
|
5494
|
+
append_hydration(label, span);
|
5495
|
+
append_hydration(span, t1);
|
5530
5496
|
append_hydration(label, t2);
|
5531
5497
|
|
5532
5498
|
if (!mounted) {
|
5533
|
-
dispose = listen(input, "change", /*handleChange*/ ctx[4](/*i*/ ctx[
|
5499
|
+
dispose = listen(input, "change", /*handleChange*/ ctx[4](/*i*/ ctx[10]));
|
5534
5500
|
mounted = true;
|
5535
5501
|
}
|
5536
5502
|
},
|
@@ -5541,11 +5507,15 @@ function create_each_block$3(ctx) {
|
|
5541
5507
|
attr(input, "name", /*name*/ ctx[0]);
|
5542
5508
|
}
|
5543
5509
|
|
5544
|
-
if (dirty &
|
5545
|
-
input.value =
|
5510
|
+
if (dirty & /*_options*/ 4 && input_value_value !== (input_value_value = /*option*/ ctx[8])) {
|
5511
|
+
input.value = input_value_value;
|
5512
|
+
}
|
5513
|
+
|
5514
|
+
if (dirty & /*_options, _value*/ 6 && input_checked_value !== (input_checked_value = /*option*/ ctx[8] === /*_value*/ ctx[1])) {
|
5515
|
+
input.checked = input_checked_value;
|
5546
5516
|
}
|
5547
5517
|
|
5548
|
-
if (dirty & /*_options*/
|
5518
|
+
if (dirty & /*_options*/ 4 && t1_value !== (t1_value = /*option*/ ctx[8] + "")) set_data(t1, t1_value);
|
5549
5519
|
},
|
5550
5520
|
d(detaching) {
|
5551
5521
|
if (detaching) detach(label);
|
@@ -5555,13 +5525,13 @@ function create_each_block$3(ctx) {
|
|
5555
5525
|
};
|
5556
5526
|
}
|
5557
5527
|
|
5558
|
-
function create_fragment$
|
5528
|
+
function create_fragment$8(ctx) {
|
5559
5529
|
let div;
|
5560
|
-
let each_value = /*_options*/ ctx[
|
5530
|
+
let each_value = /*_options*/ ctx[2];
|
5561
5531
|
let each_blocks = [];
|
5562
5532
|
|
5563
5533
|
for (let i = 0; i < each_value.length; i += 1) {
|
5564
|
-
each_blocks[i] = create_each_block$
|
5534
|
+
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
|
5565
5535
|
}
|
5566
5536
|
|
5567
5537
|
return {
|
@@ -5586,7 +5556,7 @@ function create_fragment$7(ctx) {
|
|
5586
5556
|
this.h();
|
5587
5557
|
},
|
5588
5558
|
h() {
|
5589
|
-
attr(div, "class", "radio-buttons svelte-
|
5559
|
+
attr(div, "class", "radio-buttons svelte-1574x6a");
|
5590
5560
|
},
|
5591
5561
|
m(target, anchor) {
|
5592
5562
|
insert_hydration(target, div, anchor);
|
@@ -5596,17 +5566,17 @@ function create_fragment$7(ctx) {
|
|
5596
5566
|
}
|
5597
5567
|
},
|
5598
5568
|
p(ctx, [dirty]) {
|
5599
|
-
if (dirty & /*_options, name,
|
5600
|
-
each_value = /*_options*/ ctx[
|
5569
|
+
if (dirty & /*_options, name, _value, handleChange*/ 23) {
|
5570
|
+
each_value = /*_options*/ ctx[2];
|
5601
5571
|
let i;
|
5602
5572
|
|
5603
5573
|
for (i = 0; i < each_value.length; i += 1) {
|
5604
|
-
const child_ctx = get_each_context$
|
5574
|
+
const child_ctx = get_each_context$4(ctx, each_value, i);
|
5605
5575
|
|
5606
5576
|
if (each_blocks[i]) {
|
5607
5577
|
each_blocks[i].p(child_ctx, dirty);
|
5608
5578
|
} else {
|
5609
|
-
each_blocks[i] = create_each_block$
|
5579
|
+
each_blocks[i] = create_each_block$4(child_ctx);
|
5610
5580
|
each_blocks[i].c();
|
5611
5581
|
each_blocks[i].m(div, null);
|
5612
5582
|
}
|
@@ -5628,8 +5598,9 @@ function create_fragment$7(ctx) {
|
|
5628
5598
|
};
|
5629
5599
|
}
|
5630
5600
|
|
5631
|
-
function instance$
|
5601
|
+
function instance$8($$self, $$props, $$invalidate) {
|
5632
5602
|
let _options;
|
5603
|
+
let _value;
|
5633
5604
|
let $value;
|
5634
5605
|
let { name = '' } = $$props;
|
5635
5606
|
let { options = 'ラジオボタン1,ラジオボタン2,ラジオボタン3' } = $$props;
|
@@ -5644,7 +5615,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
5644
5615
|
}
|
5645
5616
|
});
|
5646
5617
|
|
5647
|
-
component_subscribe($$self, value, value => $$invalidate(
|
5618
|
+
component_subscribe($$self, value, value => $$invalidate(6, $value = value));
|
5648
5619
|
|
5649
5620
|
const handleChange = index => event => {
|
5650
5621
|
if (event.target.checked) {
|
@@ -5659,34 +5630,38 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
5659
5630
|
|
5660
5631
|
$$self.$$.update = () => {
|
5661
5632
|
if ($$self.$$.dirty & /*options*/ 32) {
|
5662
|
-
$$invalidate(
|
5633
|
+
$$invalidate(2, _options = options.split(','));
|
5634
|
+
}
|
5635
|
+
|
5636
|
+
if ($$self.$$.dirty & /*$value*/ 64) {
|
5637
|
+
$$invalidate(1, _value = $value[0]);
|
5663
5638
|
}
|
5664
5639
|
};
|
5665
5640
|
|
5666
|
-
return [name,
|
5641
|
+
return [name, _value, _options, value, handleChange, options, $value];
|
5667
5642
|
}
|
5668
5643
|
|
5669
5644
|
class FormRadioButtons extends SvelteComponent {
|
5670
5645
|
constructor(options) {
|
5671
5646
|
super();
|
5672
|
-
init(this, options, instance$
|
5647
|
+
init(this, options, instance$8, create_fragment$8, safe_not_equal, { name: 0, options: 5 }, add_css$8);
|
5673
5648
|
}
|
5674
5649
|
}
|
5675
5650
|
|
5676
5651
|
/* src/components/FormSelect.svelte generated by Svelte v3.53.1 */
|
5677
5652
|
|
5678
|
-
function add_css$
|
5679
|
-
append_styles(target, "svelte-
|
5653
|
+
function add_css$7(target) {
|
5654
|
+
append_styles(target, "svelte-1esvjlb", ".select-wrapper.svelte-1esvjlb{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%;position:relative\n}.select-select.svelte-1esvjlb{position:relative;font-size:12px;appearance:none;border:solid 2px #ccc;border-radius:6px;padding:0.8em 1.6em 0.8em 0.8em;width:100%}.select-select.svelte-1esvjlb:focus{outline:none;border-color:#2aab9f}.select-icon.svelte-1esvjlb{position:absolute;width:0.5em;height:0.5em;top:calc(50% - 0.2em);right:0.8em;box-sizing:border-box;border-right:solid 2px #666;border-top:solid 2px #666;transform:translateY(-35.4%) rotate(135deg);pointer-events:none}");
|
5680
5655
|
}
|
5681
5656
|
|
5682
|
-
function get_each_context$
|
5657
|
+
function get_each_context$3(ctx, list, i) {
|
5683
5658
|
const child_ctx = ctx.slice();
|
5684
5659
|
child_ctx[6] = list[i];
|
5685
5660
|
child_ctx[8] = i;
|
5686
5661
|
return child_ctx;
|
5687
5662
|
}
|
5688
5663
|
|
5689
|
-
// (
|
5664
|
+
// (29:10) {:else}
|
5690
5665
|
function create_else_block(ctx) {
|
5691
5666
|
let t;
|
5692
5667
|
|
@@ -5707,8 +5682,8 @@ function create_else_block(ctx) {
|
|
5707
5682
|
};
|
5708
5683
|
}
|
5709
5684
|
|
5710
|
-
// (
|
5711
|
-
function create_if_block$
|
5685
|
+
// (27:10) {#if option}
|
5686
|
+
function create_if_block$3(ctx) {
|
5712
5687
|
let t_value = /*option*/ ctx[6] + "";
|
5713
5688
|
let t;
|
5714
5689
|
|
@@ -5731,14 +5706,14 @@ function create_if_block$1(ctx) {
|
|
5731
5706
|
};
|
5732
5707
|
}
|
5733
5708
|
|
5734
|
-
// (
|
5735
|
-
function create_each_block$
|
5709
|
+
// (25:6) {#each _options as option, i}
|
5710
|
+
function create_each_block$3(ctx) {
|
5736
5711
|
let option;
|
5737
5712
|
let t;
|
5738
5713
|
let option_value_value;
|
5739
5714
|
|
5740
5715
|
function select_block_type(ctx, dirty) {
|
5741
|
-
if (/*option*/ ctx[6]) return create_if_block$
|
5716
|
+
if (/*option*/ ctx[6]) return create_if_block$3;
|
5742
5717
|
return create_else_block;
|
5743
5718
|
}
|
5744
5719
|
|
@@ -5794,33 +5769,41 @@ function create_each_block$2(ctx) {
|
|
5794
5769
|
};
|
5795
5770
|
}
|
5796
5771
|
|
5797
|
-
function create_fragment$
|
5798
|
-
let
|
5772
|
+
function create_fragment$7(ctx) {
|
5773
|
+
let div2;
|
5774
|
+
let div1;
|
5799
5775
|
let select;
|
5776
|
+
let t;
|
5777
|
+
let div0;
|
5800
5778
|
let mounted;
|
5801
5779
|
let dispose;
|
5802
5780
|
let each_value = /*_options*/ ctx[0];
|
5803
5781
|
let each_blocks = [];
|
5804
5782
|
|
5805
5783
|
for (let i = 0; i < each_value.length; i += 1) {
|
5806
|
-
each_blocks[i] = create_each_block$
|
5784
|
+
each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
|
5807
5785
|
}
|
5808
5786
|
|
5809
5787
|
return {
|
5810
5788
|
c() {
|
5811
|
-
|
5789
|
+
div2 = element("div");
|
5790
|
+
div1 = element("div");
|
5812
5791
|
select = element("select");
|
5813
5792
|
|
5814
5793
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
5815
5794
|
each_blocks[i].c();
|
5816
5795
|
}
|
5817
5796
|
|
5797
|
+
t = space();
|
5798
|
+
div0 = element("div");
|
5818
5799
|
this.h();
|
5819
5800
|
},
|
5820
5801
|
l(nodes) {
|
5821
|
-
|
5822
|
-
var
|
5823
|
-
|
5802
|
+
div2 = claim_element(nodes, "DIV", { class: true });
|
5803
|
+
var div2_nodes = children(div2);
|
5804
|
+
div1 = claim_element(div2_nodes, "DIV", { class: true });
|
5805
|
+
var div1_nodes = children(div1);
|
5806
|
+
select = claim_element(div1_nodes, "SELECT", { class: true });
|
5824
5807
|
var select_nodes = children(select);
|
5825
5808
|
|
5826
5809
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
@@ -5828,20 +5811,31 @@ function create_fragment$6(ctx) {
|
|
5828
5811
|
}
|
5829
5812
|
|
5830
5813
|
select_nodes.forEach(detach);
|
5831
|
-
|
5814
|
+
t = claim_space(div1_nodes);
|
5815
|
+
div0 = claim_element(div1_nodes, "DIV", { class: true });
|
5816
|
+
children(div0).forEach(detach);
|
5817
|
+
div1_nodes.forEach(detach);
|
5818
|
+
div2_nodes.forEach(detach);
|
5832
5819
|
this.h();
|
5833
5820
|
},
|
5834
5821
|
h() {
|
5835
|
-
attr(
|
5822
|
+
attr(select, "class", "select-select svelte-1esvjlb");
|
5823
|
+
attr(div0, "class", "select-icon svelte-1esvjlb");
|
5824
|
+
attr(div1, "class", "select");
|
5825
|
+
attr(div2, "class", "select-wrapper svelte-1esvjlb");
|
5836
5826
|
},
|
5837
5827
|
m(target, anchor) {
|
5838
|
-
insert_hydration(target,
|
5839
|
-
append_hydration(
|
5828
|
+
insert_hydration(target, div2, anchor);
|
5829
|
+
append_hydration(div2, div1);
|
5830
|
+
append_hydration(div1, select);
|
5840
5831
|
|
5841
5832
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
5842
5833
|
each_blocks[i].m(select, null);
|
5843
5834
|
}
|
5844
5835
|
|
5836
|
+
append_hydration(div1, t);
|
5837
|
+
append_hydration(div1, div0);
|
5838
|
+
|
5845
5839
|
if (!mounted) {
|
5846
5840
|
dispose = listen(select, "change", /*handleChange*/ ctx[1]);
|
5847
5841
|
mounted = true;
|
@@ -5853,12 +5847,12 @@ function create_fragment$6(ctx) {
|
|
5853
5847
|
let i;
|
5854
5848
|
|
5855
5849
|
for (i = 0; i < each_value.length; i += 1) {
|
5856
|
-
const child_ctx = get_each_context$
|
5850
|
+
const child_ctx = get_each_context$3(ctx, each_value, i);
|
5857
5851
|
|
5858
5852
|
if (each_blocks[i]) {
|
5859
5853
|
each_blocks[i].p(child_ctx, dirty);
|
5860
5854
|
} else {
|
5861
|
-
each_blocks[i] = create_each_block$
|
5855
|
+
each_blocks[i] = create_each_block$3(child_ctx);
|
5862
5856
|
each_blocks[i].c();
|
5863
5857
|
each_blocks[i].m(select, null);
|
5864
5858
|
}
|
@@ -5874,7 +5868,7 @@ function create_fragment$6(ctx) {
|
|
5874
5868
|
i: noop,
|
5875
5869
|
o: noop,
|
5876
5870
|
d(detaching) {
|
5877
|
-
if (detaching) detach(
|
5871
|
+
if (detaching) detach(div2);
|
5878
5872
|
destroy_each(each_blocks, detaching);
|
5879
5873
|
mounted = false;
|
5880
5874
|
dispose();
|
@@ -5882,7 +5876,7 @@ function create_fragment$6(ctx) {
|
|
5882
5876
|
};
|
5883
5877
|
}
|
5884
5878
|
|
5885
|
-
function instance$
|
5879
|
+
function instance$7($$self, $$props, $$invalidate) {
|
5886
5880
|
let _options;
|
5887
5881
|
let { name = '' } = $$props;
|
5888
5882
|
let { options = 'プルダウン1,プルダウン2,プルダウン3' } = $$props;
|
@@ -5919,64 +5913,135 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
5919
5913
|
class FormSelect extends SvelteComponent {
|
5920
5914
|
constructor(options) {
|
5921
5915
|
super();
|
5922
|
-
init(this, options, instance$
|
5916
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { name: 2, options: 3 }, add_css$7);
|
5923
5917
|
}
|
5924
5918
|
}
|
5925
5919
|
|
5926
5920
|
/* src/components/FormCheckBoxes.svelte generated by Svelte v3.53.1 */
|
5927
5921
|
|
5928
|
-
function add_css$
|
5929
|
-
append_styles(target, "svelte-
|
5922
|
+
function add_css$6(target) {
|
5923
|
+
append_styles(target, "svelte-1g004f9", ".check-boxes.svelte-1g004f9{display:flex;justify-content:space-evenly;flex-direction:column;width:100%;height:100%}.check-box.svelte-1g004f9{display:flex;align-items:center;font-size:12px;height:1.7em;position:relative;cursor:pointer}.check-box-input.svelte-1g004f9{width:0;height:0;margin:0}.check-box-check.svelte-1g004f9{display:inline-flex;background-color:rgba(0, 16, 14, 0.06);width:1.3em;height:1.3em;border-radius:0.3em;justify-content:center;align-items:center}.check-box-check._checked.svelte-1g004f9{box-shadow:0 4px 8px -2px rgb(0 16 14 / 31%)}.check-box-text.svelte-1g004f9{margin-left:0.5em}.check-box-icon.svelte-1g004f9{display:inline-block;width:12px;height:12px}.check-box-icon-inner.svelte-1g004f9{content:'';display:block;box-sizing:border-box;width:45%;height:91%;transform:translate(60%, -8%) rotate(45deg);border-style:none solid solid none;border-width:2px;border-color:#000}");
|
5930
5924
|
}
|
5931
5925
|
|
5932
|
-
function get_each_context$
|
5926
|
+
function get_each_context$2(ctx, list, i) {
|
5933
5927
|
const child_ctx = ctx.slice();
|
5934
5928
|
child_ctx[8] = list[i];
|
5935
5929
|
child_ctx[10] = i;
|
5936
5930
|
return child_ctx;
|
5937
5931
|
}
|
5938
5932
|
|
5933
|
+
// (34:8) {#if isCheckedArray[i]}
|
5934
|
+
function create_if_block$2(ctx) {
|
5935
|
+
let span1;
|
5936
|
+
let span0;
|
5937
|
+
|
5938
|
+
return {
|
5939
|
+
c() {
|
5940
|
+
span1 = element("span");
|
5941
|
+
span0 = element("span");
|
5942
|
+
this.h();
|
5943
|
+
},
|
5944
|
+
l(nodes) {
|
5945
|
+
span1 = claim_element(nodes, "SPAN", { class: true, style: true });
|
5946
|
+
var span1_nodes = children(span1);
|
5947
|
+
span0 = claim_element(span1_nodes, "SPAN", { class: true, style: true });
|
5948
|
+
children(span0).forEach(detach);
|
5949
|
+
span1_nodes.forEach(detach);
|
5950
|
+
this.h();
|
5951
|
+
},
|
5952
|
+
h() {
|
5953
|
+
attr(span0, "class", "check-box-icon-inner svelte-1g004f9");
|
5954
|
+
set_style(span0, "border-color", "#fff");
|
5955
|
+
attr(span1, "class", "check-box-icon svelte-1g004f9");
|
5956
|
+
set_style(span1, "width", "0.9em");
|
5957
|
+
set_style(span1, "height", "0.9em");
|
5958
|
+
},
|
5959
|
+
m(target, anchor) {
|
5960
|
+
insert_hydration(target, span1, anchor);
|
5961
|
+
append_hydration(span1, span0);
|
5962
|
+
},
|
5963
|
+
d(detaching) {
|
5964
|
+
if (detaching) detach(span1);
|
5965
|
+
}
|
5966
|
+
};
|
5967
|
+
}
|
5968
|
+
|
5939
5969
|
// (30:2) {#each _options as option, i}
|
5940
|
-
function create_each_block$
|
5970
|
+
function create_each_block$2(ctx) {
|
5941
5971
|
let label;
|
5942
5972
|
let input;
|
5973
|
+
let input_checked_value;
|
5943
5974
|
let t0;
|
5944
|
-
let
|
5975
|
+
let span0;
|
5976
|
+
let span0_class_value;
|
5977
|
+
let span0_style_value;
|
5945
5978
|
let t1;
|
5979
|
+
let span1;
|
5980
|
+
let t2_value = /*option*/ ctx[8] + "";
|
5946
5981
|
let t2;
|
5982
|
+
let t3;
|
5947
5983
|
let mounted;
|
5948
5984
|
let dispose;
|
5985
|
+
let if_block = /*isCheckedArray*/ ctx[2][/*i*/ ctx[10]] && create_if_block$2();
|
5949
5986
|
|
5950
5987
|
return {
|
5951
5988
|
c() {
|
5952
5989
|
label = element("label");
|
5953
5990
|
input = element("input");
|
5954
5991
|
t0 = space();
|
5955
|
-
|
5956
|
-
|
5992
|
+
span0 = element("span");
|
5993
|
+
if (if_block) if_block.c();
|
5994
|
+
t1 = space();
|
5995
|
+
span1 = element("span");
|
5996
|
+
t2 = text(t2_value);
|
5997
|
+
t3 = space();
|
5957
5998
|
this.h();
|
5958
5999
|
},
|
5959
6000
|
l(nodes) {
|
5960
|
-
label = claim_element(nodes, "LABEL", {});
|
6001
|
+
label = claim_element(nodes, "LABEL", { class: true });
|
5961
6002
|
var label_nodes = children(label);
|
5962
|
-
input = claim_element(label_nodes, "INPUT", { type: true, name: true });
|
6003
|
+
input = claim_element(label_nodes, "INPUT", { class: true, type: true, name: true });
|
5963
6004
|
t0 = claim_space(label_nodes);
|
5964
|
-
|
5965
|
-
|
6005
|
+
span0 = claim_element(label_nodes, "SPAN", { class: true, style: true });
|
6006
|
+
var span0_nodes = children(span0);
|
6007
|
+
if (if_block) if_block.l(span0_nodes);
|
6008
|
+
span0_nodes.forEach(detach);
|
6009
|
+
t1 = claim_space(label_nodes);
|
6010
|
+
span1 = claim_element(label_nodes, "SPAN", { class: true });
|
6011
|
+
var span1_nodes = children(span1);
|
6012
|
+
t2 = claim_text(span1_nodes, t2_value);
|
6013
|
+
span1_nodes.forEach(detach);
|
6014
|
+
t3 = claim_space(label_nodes);
|
5966
6015
|
label_nodes.forEach(detach);
|
5967
6016
|
this.h();
|
5968
6017
|
},
|
5969
6018
|
h() {
|
6019
|
+
attr(input, "class", "check-box-input svelte-1g004f9");
|
5970
6020
|
attr(input, "type", "checkbox");
|
5971
6021
|
attr(input, "name", /*name*/ ctx[0]);
|
5972
|
-
input.
|
6022
|
+
input.checked = input_checked_value = /*isCheckedArray*/ ctx[2][/*i*/ ctx[10]];
|
6023
|
+
|
6024
|
+
attr(span0, "class", span0_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[2][/*i*/ ctx[10]]
|
6025
|
+
? ' _checked'
|
6026
|
+
: ''}`) + " svelte-1g004f9"));
|
6027
|
+
|
6028
|
+
attr(span0, "style", span0_style_value = `${/*isCheckedArray*/ ctx[2][/*i*/ ctx[10]]
|
6029
|
+
? 'background-color: #2aab9f;'
|
6030
|
+
: ''}`);
|
6031
|
+
|
6032
|
+
attr(span1, "class", "check-box-text svelte-1g004f9");
|
6033
|
+
attr(label, "class", "check-box svelte-1g004f9");
|
5973
6034
|
},
|
5974
6035
|
m(target, anchor) {
|
5975
6036
|
insert_hydration(target, label, anchor);
|
5976
6037
|
append_hydration(label, input);
|
5977
6038
|
append_hydration(label, t0);
|
6039
|
+
append_hydration(label, span0);
|
6040
|
+
if (if_block) if_block.m(span0, null);
|
5978
6041
|
append_hydration(label, t1);
|
5979
|
-
append_hydration(label,
|
6042
|
+
append_hydration(label, span1);
|
6043
|
+
append_hydration(span1, t2);
|
6044
|
+
append_hydration(label, t3);
|
5980
6045
|
|
5981
6046
|
if (!mounted) {
|
5982
6047
|
dispose = listen(input, "change", /*handleChange*/ ctx[4](/*i*/ ctx[10]));
|
@@ -5990,27 +6055,51 @@ function create_each_block$1(ctx) {
|
|
5990
6055
|
attr(input, "name", /*name*/ ctx[0]);
|
5991
6056
|
}
|
5992
6057
|
|
5993
|
-
if (dirty &
|
5994
|
-
input.
|
6058
|
+
if (dirty & /*isCheckedArray*/ 4 && input_checked_value !== (input_checked_value = /*isCheckedArray*/ ctx[2][/*i*/ ctx[10]])) {
|
6059
|
+
input.checked = input_checked_value;
|
5995
6060
|
}
|
5996
6061
|
|
5997
|
-
if (
|
6062
|
+
if (/*isCheckedArray*/ ctx[2][/*i*/ ctx[10]]) {
|
6063
|
+
if (if_block) ; else {
|
6064
|
+
if_block = create_if_block$2();
|
6065
|
+
if_block.c();
|
6066
|
+
if_block.m(span0, null);
|
6067
|
+
}
|
6068
|
+
} else if (if_block) {
|
6069
|
+
if_block.d(1);
|
6070
|
+
if_block = null;
|
6071
|
+
}
|
6072
|
+
|
6073
|
+
if (dirty & /*isCheckedArray*/ 4 && span0_class_value !== (span0_class_value = "" + (null_to_empty(`check-box-check${/*isCheckedArray*/ ctx[2][/*i*/ ctx[10]]
|
6074
|
+
? ' _checked'
|
6075
|
+
: ''}`) + " svelte-1g004f9"))) {
|
6076
|
+
attr(span0, "class", span0_class_value);
|
6077
|
+
}
|
6078
|
+
|
6079
|
+
if (dirty & /*isCheckedArray*/ 4 && span0_style_value !== (span0_style_value = `${/*isCheckedArray*/ ctx[2][/*i*/ ctx[10]]
|
6080
|
+
? 'background-color: #2aab9f;'
|
6081
|
+
: ''}`)) {
|
6082
|
+
attr(span0, "style", span0_style_value);
|
6083
|
+
}
|
6084
|
+
|
6085
|
+
if (dirty & /*_options*/ 2 && t2_value !== (t2_value = /*option*/ ctx[8] + "")) set_data(t2, t2_value);
|
5998
6086
|
},
|
5999
6087
|
d(detaching) {
|
6000
6088
|
if (detaching) detach(label);
|
6089
|
+
if (if_block) if_block.d();
|
6001
6090
|
mounted = false;
|
6002
6091
|
dispose();
|
6003
6092
|
}
|
6004
6093
|
};
|
6005
6094
|
}
|
6006
6095
|
|
6007
|
-
function create_fragment$
|
6096
|
+
function create_fragment$6(ctx) {
|
6008
6097
|
let div;
|
6009
6098
|
let each_value = /*_options*/ ctx[1];
|
6010
6099
|
let each_blocks = [];
|
6011
6100
|
|
6012
6101
|
for (let i = 0; i < each_value.length; i += 1) {
|
6013
|
-
each_blocks[i] = create_each_block$
|
6102
|
+
each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
|
6014
6103
|
}
|
6015
6104
|
|
6016
6105
|
return {
|
@@ -6035,7 +6124,7 @@ function create_fragment$5(ctx) {
|
|
6035
6124
|
this.h();
|
6036
6125
|
},
|
6037
6126
|
h() {
|
6038
|
-
attr(div, "class", "check-boxes svelte-
|
6127
|
+
attr(div, "class", "check-boxes svelte-1g004f9");
|
6039
6128
|
},
|
6040
6129
|
m(target, anchor) {
|
6041
6130
|
insert_hydration(target, div, anchor);
|
@@ -6045,17 +6134,17 @@ function create_fragment$5(ctx) {
|
|
6045
6134
|
}
|
6046
6135
|
},
|
6047
6136
|
p(ctx, [dirty]) {
|
6048
|
-
if (dirty & /*_options,
|
6137
|
+
if (dirty & /*_options, isCheckedArray, name, handleChange*/ 23) {
|
6049
6138
|
each_value = /*_options*/ ctx[1];
|
6050
6139
|
let i;
|
6051
6140
|
|
6052
6141
|
for (i = 0; i < each_value.length; i += 1) {
|
6053
|
-
const child_ctx = get_each_context$
|
6142
|
+
const child_ctx = get_each_context$2(ctx, each_value, i);
|
6054
6143
|
|
6055
6144
|
if (each_blocks[i]) {
|
6056
6145
|
each_blocks[i].p(child_ctx, dirty);
|
6057
6146
|
} else {
|
6058
|
-
each_blocks[i] = create_each_block$
|
6147
|
+
each_blocks[i] = create_each_block$2(child_ctx);
|
6059
6148
|
each_blocks[i].c();
|
6060
6149
|
each_blocks[i].m(div, null);
|
6061
6150
|
}
|
@@ -6077,7 +6166,7 @@ function create_fragment$5(ctx) {
|
|
6077
6166
|
};
|
6078
6167
|
}
|
6079
6168
|
|
6080
|
-
function instance$
|
6169
|
+
function instance$6($$self, $$props, $$invalidate) {
|
6081
6170
|
let _options;
|
6082
6171
|
let isCheckedArray;
|
6083
6172
|
let $value;
|
@@ -6094,12 +6183,12 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
6094
6183
|
}
|
6095
6184
|
});
|
6096
6185
|
|
6097
|
-
component_subscribe($$self, value, value => $$invalidate(
|
6186
|
+
component_subscribe($$self, value, value => $$invalidate(6, $value = value));
|
6098
6187
|
|
6099
6188
|
const handleChange = index => event => {
|
6100
6189
|
if (isCheckedArray[index] !== event.target.checked) {
|
6101
|
-
isCheckedArray[index] = event.target.checked;
|
6102
|
-
isCheckedArray = [...isCheckedArray];
|
6190
|
+
$$invalidate(2, isCheckedArray[index] = event.target.checked, isCheckedArray);
|
6191
|
+
$$invalidate(2, isCheckedArray = [...isCheckedArray]);
|
6103
6192
|
const updated = _options.filter((option, i) => isCheckedArray[i]);
|
6104
6193
|
value.set(updated);
|
6105
6194
|
}
|
@@ -6115,21 +6204,358 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
6115
6204
|
$$invalidate(1, _options = options.split(','));
|
6116
6205
|
}
|
6117
6206
|
|
6118
|
-
if ($$self.$$.dirty & /*$value, _options*/
|
6119
|
-
isCheckedArray = (() => {
|
6207
|
+
if ($$self.$$.dirty & /*$value, _options*/ 66) {
|
6208
|
+
$$invalidate(2, isCheckedArray = (() => {
|
6120
6209
|
const checkedSet = new Set($value);
|
6121
6210
|
return _options.map(option => checkedSet.has(option));
|
6122
|
-
})();
|
6211
|
+
})());
|
6123
6212
|
}
|
6124
6213
|
};
|
6125
6214
|
|
6126
|
-
return [name, _options,
|
6215
|
+
return [name, _options, isCheckedArray, value, handleChange, options, $value];
|
6127
6216
|
}
|
6128
6217
|
|
6129
6218
|
class FormCheckBoxes extends SvelteComponent {
|
6130
6219
|
constructor(options) {
|
6131
6220
|
super();
|
6132
|
-
init(this, options, instance$
|
6221
|
+
init(this, options, instance$6, create_fragment$6, safe_not_equal, { name: 0, options: 5 }, add_css$6);
|
6222
|
+
}
|
6223
|
+
}
|
6224
|
+
|
6225
|
+
/* src/components/FormRatingButtons.svelte generated by Svelte v3.53.1 */
|
6226
|
+
|
6227
|
+
function add_css$5(target) {
|
6228
|
+
append_styles(target, "svelte-14cxkfs", ".rating-buttons.svelte-14cxkfs.svelte-14cxkfs{display:flex;justify-content:space-evenly;align-items:center;width:100%;height:100%}.rating-button.svelte-14cxkfs.svelte-14cxkfs{cursor:pointer;display:flex}.rating-button.svelte-14cxkfs svg.svelte-14cxkfs{fill:#ccc}.rating-button._selected.svelte-14cxkfs svg.svelte-14cxkfs{fill:#2aab9f}");
|
6229
|
+
}
|
6230
|
+
|
6231
|
+
function get_each_context$1(ctx, list, i) {
|
6232
|
+
const child_ctx = ctx.slice();
|
6233
|
+
child_ctx[8] = list[i];
|
6234
|
+
return child_ctx;
|
6235
|
+
}
|
6236
|
+
|
6237
|
+
// (36:30)
|
6238
|
+
function create_if_block_1$1(ctx) {
|
6239
|
+
let div;
|
6240
|
+
let svg;
|
6241
|
+
let path;
|
6242
|
+
let t;
|
6243
|
+
let div_class_value;
|
6244
|
+
let mounted;
|
6245
|
+
let dispose;
|
6246
|
+
|
6247
|
+
return {
|
6248
|
+
c() {
|
6249
|
+
div = element("div");
|
6250
|
+
svg = svg_element("svg");
|
6251
|
+
path = svg_element("path");
|
6252
|
+
t = space();
|
6253
|
+
this.h();
|
6254
|
+
},
|
6255
|
+
l(nodes) {
|
6256
|
+
div = claim_element(nodes, "DIV", { class: true });
|
6257
|
+
var div_nodes = children(div);
|
6258
|
+
|
6259
|
+
svg = claim_svg_element(div_nodes, "svg", {
|
6260
|
+
width: true,
|
6261
|
+
height: true,
|
6262
|
+
viewBox: true,
|
6263
|
+
fill: true,
|
6264
|
+
xmlns: true,
|
6265
|
+
class: true
|
6266
|
+
});
|
6267
|
+
|
6268
|
+
var svg_nodes = children(svg);
|
6269
|
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
6270
|
+
children(path).forEach(detach);
|
6271
|
+
svg_nodes.forEach(detach);
|
6272
|
+
t = claim_space(div_nodes);
|
6273
|
+
div_nodes.forEach(detach);
|
6274
|
+
this.h();
|
6275
|
+
},
|
6276
|
+
h() {
|
6277
|
+
attr(path, "d", /*LIKERT_FACE_SVG_DATA*/ ctx[4][/*i*/ ctx[8]]);
|
6278
|
+
attr(svg, "width", "24");
|
6279
|
+
attr(svg, "height", "24");
|
6280
|
+
attr(svg, "viewBox", "0 0 24 24");
|
6281
|
+
attr(svg, "fill", "none");
|
6282
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
6283
|
+
attr(svg, "class", "svelte-14cxkfs");
|
6284
|
+
attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[8] === /*_value*/ ctx[1] ? ' _selected' : '') + " svelte-14cxkfs");
|
6285
|
+
},
|
6286
|
+
m(target, anchor) {
|
6287
|
+
insert_hydration(target, div, anchor);
|
6288
|
+
append_hydration(div, svg);
|
6289
|
+
append_hydration(svg, path);
|
6290
|
+
append_hydration(div, t);
|
6291
|
+
|
6292
|
+
if (!mounted) {
|
6293
|
+
dispose = listen(div, "click", /*handleClick*/ ctx[3](/*i*/ ctx[8]));
|
6294
|
+
mounted = true;
|
6295
|
+
}
|
6296
|
+
},
|
6297
|
+
p(new_ctx, dirty) {
|
6298
|
+
ctx = new_ctx;
|
6299
|
+
|
6300
|
+
if (dirty & /*_value*/ 2 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[8] === /*_value*/ ctx[1] ? ' _selected' : '') + " svelte-14cxkfs")) {
|
6301
|
+
attr(div, "class", div_class_value);
|
6302
|
+
}
|
6303
|
+
},
|
6304
|
+
d(detaching) {
|
6305
|
+
if (detaching) detach(div);
|
6306
|
+
mounted = false;
|
6307
|
+
dispose();
|
6308
|
+
}
|
6309
|
+
};
|
6310
|
+
}
|
6311
|
+
|
6312
|
+
// (30:4) {#if type === 'star'}
|
6313
|
+
function create_if_block$1(ctx) {
|
6314
|
+
let div;
|
6315
|
+
let svg;
|
6316
|
+
let path;
|
6317
|
+
let t;
|
6318
|
+
let div_class_value;
|
6319
|
+
let mounted;
|
6320
|
+
let dispose;
|
6321
|
+
|
6322
|
+
return {
|
6323
|
+
c() {
|
6324
|
+
div = element("div");
|
6325
|
+
svg = svg_element("svg");
|
6326
|
+
path = svg_element("path");
|
6327
|
+
t = space();
|
6328
|
+
this.h();
|
6329
|
+
},
|
6330
|
+
l(nodes) {
|
6331
|
+
div = claim_element(nodes, "DIV", { class: true });
|
6332
|
+
var div_nodes = children(div);
|
6333
|
+
|
6334
|
+
svg = claim_svg_element(div_nodes, "svg", {
|
6335
|
+
width: true,
|
6336
|
+
height: true,
|
6337
|
+
viewBox: true,
|
6338
|
+
fill: true,
|
6339
|
+
xmlns: true,
|
6340
|
+
class: true
|
6341
|
+
});
|
6342
|
+
|
6343
|
+
var svg_nodes = children(svg);
|
6344
|
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
6345
|
+
children(path).forEach(detach);
|
6346
|
+
svg_nodes.forEach(detach);
|
6347
|
+
t = claim_space(div_nodes);
|
6348
|
+
div_nodes.forEach(detach);
|
6349
|
+
this.h();
|
6350
|
+
},
|
6351
|
+
h() {
|
6352
|
+
attr(path, "d", "M11.2184 0.80902L8.42249 6.78134L2.09938 7.72433C0.981006 7.90395 0.550862 9.3409 1.36814 10.1941L5.88464 14.8193L4.80928 21.3304C4.63723 22.498 5.84163 23.396 6.83096 22.8572L12.4658 19.7588L18.0577 22.8572C19.047 23.396 20.2514 22.498 20.0794 21.3304L19.004 14.8193L23.5205 10.1941C24.3378 9.3409 23.9077 7.90395 22.7893 7.72433L16.5092 6.78134L13.6702 0.80902C13.1971 -0.223786 11.7346 -0.268691 11.2184 0.80902Z");
|
6353
|
+
attr(svg, "width", "24");
|
6354
|
+
attr(svg, "height", "24");
|
6355
|
+
attr(svg, "viewBox", "0 0 24 24");
|
6356
|
+
attr(svg, "fill", "none");
|
6357
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
6358
|
+
attr(svg, "class", "svelte-14cxkfs");
|
6359
|
+
attr(div, "class", div_class_value = "rating-button" + (/*i*/ ctx[8] <= /*_value*/ ctx[1] ? ' _selected' : '') + " svelte-14cxkfs");
|
6360
|
+
},
|
6361
|
+
m(target, anchor) {
|
6362
|
+
insert_hydration(target, div, anchor);
|
6363
|
+
append_hydration(div, svg);
|
6364
|
+
append_hydration(svg, path);
|
6365
|
+
append_hydration(div, t);
|
6366
|
+
|
6367
|
+
if (!mounted) {
|
6368
|
+
dispose = listen(div, "click", /*handleClick*/ ctx[3](/*i*/ ctx[8]));
|
6369
|
+
mounted = true;
|
6370
|
+
}
|
6371
|
+
},
|
6372
|
+
p(new_ctx, dirty) {
|
6373
|
+
ctx = new_ctx;
|
6374
|
+
|
6375
|
+
if (dirty & /*_value*/ 2 && div_class_value !== (div_class_value = "rating-button" + (/*i*/ ctx[8] <= /*_value*/ ctx[1] ? ' _selected' : '') + " svelte-14cxkfs")) {
|
6376
|
+
attr(div, "class", div_class_value);
|
6377
|
+
}
|
6378
|
+
},
|
6379
|
+
d(detaching) {
|
6380
|
+
if (detaching) detach(div);
|
6381
|
+
mounted = false;
|
6382
|
+
dispose();
|
6383
|
+
}
|
6384
|
+
};
|
6385
|
+
}
|
6386
|
+
|
6387
|
+
// (29:2) {#each [...Array(5).keys()].map(i => i + 1) as i}
|
6388
|
+
function create_each_block$1(ctx) {
|
6389
|
+
let if_block_anchor;
|
6390
|
+
|
6391
|
+
function select_block_type(ctx, dirty) {
|
6392
|
+
if (/*type*/ ctx[0] === 'star') return create_if_block$1;
|
6393
|
+
if (/*type*/ ctx[0] === 'face') return create_if_block_1$1;
|
6394
|
+
}
|
6395
|
+
|
6396
|
+
let current_block_type = select_block_type(ctx);
|
6397
|
+
let if_block = current_block_type && current_block_type(ctx);
|
6398
|
+
|
6399
|
+
return {
|
6400
|
+
c() {
|
6401
|
+
if (if_block) if_block.c();
|
6402
|
+
if_block_anchor = empty();
|
6403
|
+
},
|
6404
|
+
l(nodes) {
|
6405
|
+
if (if_block) if_block.l(nodes);
|
6406
|
+
if_block_anchor = empty();
|
6407
|
+
},
|
6408
|
+
m(target, anchor) {
|
6409
|
+
if (if_block) if_block.m(target, anchor);
|
6410
|
+
insert_hydration(target, if_block_anchor, anchor);
|
6411
|
+
},
|
6412
|
+
p(ctx, dirty) {
|
6413
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
6414
|
+
if_block.p(ctx, dirty);
|
6415
|
+
} else {
|
6416
|
+
if (if_block) if_block.d(1);
|
6417
|
+
if_block = current_block_type && current_block_type(ctx);
|
6418
|
+
|
6419
|
+
if (if_block) {
|
6420
|
+
if_block.c();
|
6421
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
6422
|
+
}
|
6423
|
+
}
|
6424
|
+
},
|
6425
|
+
d(detaching) {
|
6426
|
+
if (if_block) {
|
6427
|
+
if_block.d(detaching);
|
6428
|
+
}
|
6429
|
+
|
6430
|
+
if (detaching) detach(if_block_anchor);
|
6431
|
+
}
|
6432
|
+
};
|
6433
|
+
}
|
6434
|
+
|
6435
|
+
function create_fragment$5(ctx) {
|
6436
|
+
let div;
|
6437
|
+
let each_value = [...Array(5).keys()].map(func);
|
6438
|
+
let each_blocks = [];
|
6439
|
+
|
6440
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
6441
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
6442
|
+
}
|
6443
|
+
|
6444
|
+
return {
|
6445
|
+
c() {
|
6446
|
+
div = element("div");
|
6447
|
+
|
6448
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
6449
|
+
each_blocks[i].c();
|
6450
|
+
}
|
6451
|
+
|
6452
|
+
this.h();
|
6453
|
+
},
|
6454
|
+
l(nodes) {
|
6455
|
+
div = claim_element(nodes, "DIV", { class: true });
|
6456
|
+
var div_nodes = children(div);
|
6457
|
+
|
6458
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
6459
|
+
each_blocks[i].l(div_nodes);
|
6460
|
+
}
|
6461
|
+
|
6462
|
+
div_nodes.forEach(detach);
|
6463
|
+
this.h();
|
6464
|
+
},
|
6465
|
+
h() {
|
6466
|
+
attr(div, "class", "rating-buttons svelte-14cxkfs");
|
6467
|
+
},
|
6468
|
+
m(target, anchor) {
|
6469
|
+
insert_hydration(target, div, anchor);
|
6470
|
+
|
6471
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
6472
|
+
each_blocks[i].m(div, null);
|
6473
|
+
}
|
6474
|
+
},
|
6475
|
+
p(ctx, [dirty]) {
|
6476
|
+
if (dirty & /*Array, _value, handleClick, type, LIKERT_FACE_SVG_DATA*/ 27) {
|
6477
|
+
each_value = [...Array(5).keys()].map(func);
|
6478
|
+
let i;
|
6479
|
+
|
6480
|
+
for (i = 0; i < each_value.length; i += 1) {
|
6481
|
+
const child_ctx = get_each_context$1(ctx, each_value, i);
|
6482
|
+
|
6483
|
+
if (each_blocks[i]) {
|
6484
|
+
each_blocks[i].p(child_ctx, dirty);
|
6485
|
+
} else {
|
6486
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
6487
|
+
each_blocks[i].c();
|
6488
|
+
each_blocks[i].m(div, null);
|
6489
|
+
}
|
6490
|
+
}
|
6491
|
+
|
6492
|
+
for (; i < each_blocks.length; i += 1) {
|
6493
|
+
each_blocks[i].d(1);
|
6494
|
+
}
|
6495
|
+
|
6496
|
+
each_blocks.length = each_value.length;
|
6497
|
+
}
|
6498
|
+
},
|
6499
|
+
i: noop,
|
6500
|
+
o: noop,
|
6501
|
+
d(detaching) {
|
6502
|
+
if (detaching) detach(div);
|
6503
|
+
destroy_each(each_blocks, detaching);
|
6504
|
+
}
|
6505
|
+
};
|
6506
|
+
}
|
6507
|
+
|
6508
|
+
const func = i => i + 1;
|
6509
|
+
|
6510
|
+
function instance$5($$self, $$props, $$invalidate) {
|
6511
|
+
let _value;
|
6512
|
+
let $value;
|
6513
|
+
let { name = '' } = $$props;
|
6514
|
+
let { type = 'face' } = $$props;
|
6515
|
+
const { path: statePath } = getStateItemContext();
|
6516
|
+
|
6517
|
+
const value = registerInput({
|
6518
|
+
name,
|
6519
|
+
statePath,
|
6520
|
+
initialValue: [],
|
6521
|
+
validator(value) {
|
6522
|
+
return value.length > 0;
|
6523
|
+
}
|
6524
|
+
});
|
6525
|
+
|
6526
|
+
component_subscribe($$self, value, value => $$invalidate(6, $value = value));
|
6527
|
+
|
6528
|
+
const handleClick = index => event => {
|
6529
|
+
value.set([String(index)]);
|
6530
|
+
};
|
6531
|
+
|
6532
|
+
// 5段階スケールで使用する顔絵文字のsvgデータ
|
6533
|
+
const LIKERT_FACE_SVG_DATA = {
|
6534
|
+
1: 'M12 0.375C5.57812 0.375 0.375 5.57812 0.375 12C0.375 18.4219 5.57812 23.625 12 23.625C18.4219 23.625 23.625 18.4219 23.625 12C23.625 5.57812 18.4219 0.375 12 0.375ZM12 21.375C6.79688 21.375 2.625 17.2031 2.625 12C2.625 6.84375 6.79688 2.625 12 2.625C17.1562 2.625 21.375 6.84375 21.375 12C21.375 17.2031 17.1562 21.375 12 21.375ZM18.0469 7.17188C17.8594 6.9375 17.5312 6.89062 17.2969 7.03125L13.5469 9.28125C13.4062 9.375 13.3125 9.5625 13.3125 9.75C13.3125 9.98438 13.4062 10.1719 13.5469 10.2656L17.2969 12.5156C17.5781 12.6562 17.8594 12.5625 18.0469 12.375C18.1875 12.1875 18.2344 11.8594 18.0469 11.6719L16.4531 9.75L18.0469 7.875C18.2344 7.6875 18.1875 7.35938 18.0469 7.17188ZM10.6875 9.75C10.6875 9.5625 10.5469 9.375 10.4062 9.28125L6.65625 7.03125C6.42188 6.89062 6.09375 6.9375 5.90625 7.17188C5.76562 7.35938 5.76562 7.6875 5.90625 7.875L7.5 9.75L5.90625 11.6719C5.76562 11.8594 5.76562 12.1875 5.90625 12.375C6.09375 12.5625 6.375 12.6562 6.65625 12.5156L10.4062 10.2656C10.5469 10.1719 10.6875 9.98438 10.6875 9.75ZM12 12.75C9.84375 12.75 7.26562 14.5781 6.9375 17.1562C6.84375 17.7188 7.26562 18.1406 7.64062 18C8.71875 17.5312 10.3125 17.25 12 17.25C13.6875 17.25 15.2344 17.5312 16.3125 18C16.6875 18.1406 17.1094 17.7188 17.0156 17.1562C16.6875 14.5781 14.1094 12.75 12 12.75Z',
|
6535
|
+
2: 'M12 0.375C5.57812 0.375 0.375 5.57812 0.375 12C0.375 18.4219 5.57812 23.625 12 23.625C18.4219 23.625 23.625 18.4219 23.625 12C23.625 5.57812 18.4219 0.375 12 0.375ZM12 21.375C6.79688 21.375 2.625 17.2031 2.625 12C2.625 6.84375 6.79688 2.625 12 2.625C17.1562 2.625 21.375 6.84375 21.375 12C21.375 17.2031 17.1562 21.375 12 21.375ZM8.25 11.25C9.04688 11.25 9.75 10.5938 9.75 9.75C9.75 8.95312 9.04688 8.25 8.25 8.25C7.40625 8.25 6.75 8.95312 6.75 9.75C6.75 10.5938 7.40625 11.25 8.25 11.25ZM15.75 8.25C14.9062 8.25 14.25 8.95312 14.25 9.75C14.25 10.5938 14.9062 11.25 15.75 11.25C16.5469 11.25 17.25 10.5938 17.25 9.75C17.25 8.95312 16.5469 8.25 15.75 8.25ZM12 14.25C10.0781 14.25 8.34375 15.0938 7.125 16.5469C6.70312 17.0156 6.79688 17.7188 7.26562 18.1406C7.73438 18.5156 8.4375 18.4688 8.85938 18C9.60938 17.0625 10.7812 16.5 12 16.5C13.1719 16.5 14.3438 17.0625 15.0938 18C15.5156 18.4219 16.2188 18.5625 16.6875 18.1406C17.1562 17.7188 17.25 17.0156 16.8281 16.5469C15.6562 15.0938 13.875 14.25 12 14.25Z',
|
6536
|
+
3: 'M12 0.375C5.57812 0.375 0.375 5.57812 0.375 12C0.375 18.4219 5.57812 23.625 12 23.625C18.4219 23.625 23.625 18.4219 23.625 12C23.625 5.57812 18.4219 0.375 12 0.375ZM12 21.375C6.79688 21.375 2.625 17.2031 2.625 12C2.625 6.84375 6.79688 2.625 12 2.625C17.1562 2.625 21.375 6.84375 21.375 12C21.375 17.2031 17.1562 21.375 12 21.375ZM8.25 11.25C9.04688 11.25 9.75 10.5938 9.75 9.75C9.75 8.95312 9.04688 8.25 8.25 8.25C7.40625 8.25 6.75 8.95312 6.75 9.75C6.75 10.5938 7.40625 11.25 8.25 11.25ZM15.75 8.25C14.9062 8.25 14.25 8.95312 14.25 9.75C14.25 10.5938 14.9062 11.25 15.75 11.25C16.5469 11.25 17.25 10.5938 17.25 9.75C17.25 8.95312 16.5469 8.25 15.75 8.25ZM16.125 15H7.875C7.21875 15 6.75 15.5156 6.75 16.125C6.75 16.7812 7.21875 17.25 7.875 17.25H16.125C16.7344 17.25 17.25 16.7812 17.25 16.125C17.25 15.5156 16.7344 15 16.125 15Z',
|
6537
|
+
4: 'M15.75 8.4375C14.5312 8.4375 13.125 9.23438 12.9375 10.4531C12.8438 10.9688 13.4531 11.2969 13.8281 10.9219L14.2969 10.5469C15 9.9375 16.4531 9.9375 17.1562 10.5469L17.625 10.9219C18 11.2969 18.6094 10.9688 18.5156 10.4531C18.3281 9.23438 16.9219 8.4375 15.75 8.4375ZM8.25 11.25C9.04688 11.25 9.75 10.5938 9.75 9.75C9.75 8.95312 9.04688 8.25 8.25 8.25C7.40625 8.25 6.75 8.95312 6.75 9.75C6.75 10.5938 7.40625 11.25 8.25 11.25ZM16.9219 14.2969C15.7031 14.6719 13.9219 14.9062 12 14.9062C10.0312 14.9062 8.25 14.6719 7.03125 14.2969C6.5625 14.1562 6.14062 14.5781 6.1875 15C6.5625 17.25 9.5625 18.75 12 18.75C14.3906 18.75 17.3906 17.25 17.7656 15C17.8125 14.5781 17.3906 14.1562 16.9219 14.2969ZM12 0.375C5.57812 0.375 0.375 5.625 0.375 12C0.375 18.4219 5.57812 23.625 12 23.625C18.375 23.625 23.625 18.4219 23.625 12C23.625 5.625 18.375 0.375 12 0.375ZM12 21.375C6.79688 21.375 2.625 17.2031 2.625 12C2.625 6.84375 6.79688 2.625 12 2.625C17.1562 2.625 21.375 6.84375 21.375 12C21.375 17.2031 17.1562 21.375 12 21.375Z',
|
6538
|
+
5: 'M12 0.375C5.57812 0.375 0.375 5.57812 0.375 12C0.375 18.4219 5.57812 23.625 12 23.625C18.4219 23.625 23.625 18.4219 23.625 12C23.625 5.57812 18.4219 0.375 12 0.375ZM12 21.375C6.79688 21.375 2.625 17.2031 2.625 12C2.625 6.84375 6.79688 2.625 12 2.625C17.1562 2.625 21.375 6.84375 21.375 12C21.375 17.2031 17.1562 21.375 12 21.375ZM16.9219 14.2969C15.7031 14.6719 13.9219 14.9062 12 14.9062C10.0312 14.9062 8.25 14.6719 7.03125 14.2969C6.5625 14.1562 6.14062 14.5312 6.1875 15C6.5625 17.2031 9.5625 18.75 12 18.75C14.4375 18.75 17.3906 17.2031 17.7656 15C17.8125 14.5781 17.3906 14.1562 16.9219 14.2969ZM5.90625 12.375C6.09375 12.5625 6.375 12.6562 6.65625 12.5156L10.4062 10.2656C10.5469 10.1719 10.6875 9.98438 10.6875 9.75C10.6875 9.5625 10.5469 9.375 10.4062 9.28125L6.65625 7.03125C6.42188 6.89062 6.09375 6.9375 5.90625 7.17188C5.76562 7.35938 5.76562 7.6875 5.90625 7.875L7.5 9.75L5.90625 11.6719C5.76562 11.8594 5.76562 12.1875 5.90625 12.375ZM17.2969 12.5156C17.5781 12.6562 17.8594 12.5625 18.0469 12.375C18.1875 12.1875 18.1875 11.8594 18.0469 11.6719L16.4531 9.75L18.0469 7.875C18.2344 7.6875 18.1875 7.35938 18.0469 7.17188C17.8594 6.9375 17.5312 6.89062 17.2969 7.03125L13.5469 9.28125C13.4062 9.375 13.3125 9.5625 13.3125 9.75C13.3125 9.98438 13.4062 10.1719 13.5469 10.2656L17.2969 12.5156Z'
|
6539
|
+
};
|
6540
|
+
|
6541
|
+
$$self.$$set = $$props => {
|
6542
|
+
if ('name' in $$props) $$invalidate(5, name = $$props.name);
|
6543
|
+
if ('type' in $$props) $$invalidate(0, type = $$props.type);
|
6544
|
+
};
|
6545
|
+
|
6546
|
+
$$self.$$.update = () => {
|
6547
|
+
if ($$self.$$.dirty & /*$value*/ 64) {
|
6548
|
+
$$invalidate(1, _value = Number($value[0] ?? -1));
|
6549
|
+
}
|
6550
|
+
};
|
6551
|
+
|
6552
|
+
return [type, _value, value, handleClick, LIKERT_FACE_SVG_DATA, name, $value];
|
6553
|
+
}
|
6554
|
+
|
6555
|
+
class FormRatingButtons extends SvelteComponent {
|
6556
|
+
constructor(options) {
|
6557
|
+
super();
|
6558
|
+
init(this, options, instance$5, create_fragment$5, safe_not_equal, { name: 5, type: 0 }, add_css$5);
|
6133
6559
|
}
|
6134
6560
|
}
|
6135
6561
|
|
@@ -7487,4 +7913,4 @@ class ImageBlock extends SvelteComponent {
|
|
7487
7913
|
}
|
7488
7914
|
}
|
7489
7915
|
|
7490
|
-
export { Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem,
|
7916
|
+
export { Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtons, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slide, SlideItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, applyCss, applyGlobalCss, close, closeAction, closed, collection$1 as collection, create, createApp, createFog, customHandlers, customVariables, destroy, destroyed, ensureModalRoot, finalize, formData, getActionShadowRoot, getCustomHandlers, getCustomVariables, getState$1 as getState, getStates, getStoreState, getSystem, hideOnScroll, hideOnTime, initialize, isClosed, isOpened, loadGlobalScript, loadGlobalStyle, loadStyle, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setState$1 as setState, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, widget };
|