@plaidev/karte-action-sdk 1.1.174-28032930.8633c15b → 1.1.174-28033114.16b04b8e
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.js +98 -51
- package/dist/index.es.js +99 -56
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import 'svelte/easing';
|
2
2
|
import { writable, get } from 'svelte/store';
|
3
3
|
import { onMount as onMount$1, onDestroy as onDestroy$1, beforeUpdate as beforeUpdate$1, afterUpdate as afterUpdate$1, tick as tick$1, setContext, getContext, createEventDispatcher } from 'svelte';
|
4
|
-
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot,
|
4
|
+
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, space, claim_space, insert_hydration, transition_in, group_outros, transition_out, check_outros, update_slot_base, get_all_dirty_from_scope, get_slot_changes, detach, create_component, claim_component, mount_component, destroy_component, empty, component_subscribe, element, claim_element, children, attr, noop, listen, null_to_empty, is_function, add_render_callback, create_in_transition, binding_callbacks, set_style, svg_element, claim_svg_element, append_hydration, destroy_each, text, claim_text, set_data, src_url_equal, HtmlTagHydration, claim_html_tag, construct_svelte_component, subscribe } from 'svelte/internal';
|
5
5
|
|
6
6
|
/** @internal */
|
7
7
|
const PropTypes = [
|
@@ -2315,27 +2315,57 @@ class Normalize extends SvelteComponent {
|
|
2315
2315
|
|
2316
2316
|
/* src/components/State.svelte generated by Svelte v3.53.1 */
|
2317
2317
|
|
2318
|
-
function
|
2318
|
+
function create_if_block$9(ctx) {
|
2319
2319
|
let normalize;
|
2320
|
-
let t;
|
2321
2320
|
let current;
|
2322
2321
|
normalize = new Normalize({});
|
2323
|
-
const default_slot_template = /*#slots*/ ctx[1].default;
|
2324
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null);
|
2325
2322
|
|
2326
2323
|
return {
|
2327
2324
|
c() {
|
2328
2325
|
create_component(normalize.$$.fragment);
|
2326
|
+
},
|
2327
|
+
l(nodes) {
|
2328
|
+
claim_component(normalize.$$.fragment, nodes);
|
2329
|
+
},
|
2330
|
+
m(target, anchor) {
|
2331
|
+
mount_component(normalize, target, anchor);
|
2332
|
+
current = true;
|
2333
|
+
},
|
2334
|
+
i(local) {
|
2335
|
+
if (current) return;
|
2336
|
+
transition_in(normalize.$$.fragment, local);
|
2337
|
+
current = true;
|
2338
|
+
},
|
2339
|
+
o(local) {
|
2340
|
+
transition_out(normalize.$$.fragment, local);
|
2341
|
+
current = false;
|
2342
|
+
},
|
2343
|
+
d(detaching) {
|
2344
|
+
destroy_component(normalize, detaching);
|
2345
|
+
}
|
2346
|
+
};
|
2347
|
+
}
|
2348
|
+
|
2349
|
+
function create_fragment$x(ctx) {
|
2350
|
+
let t;
|
2351
|
+
let current;
|
2352
|
+
let if_block = /*_enableNormalize*/ ctx[0] && create_if_block$9();
|
2353
|
+
const default_slot_template = /*#slots*/ ctx[2].default;
|
2354
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[1], null);
|
2355
|
+
|
2356
|
+
return {
|
2357
|
+
c() {
|
2358
|
+
if (if_block) if_block.c();
|
2329
2359
|
t = space();
|
2330
2360
|
if (default_slot) default_slot.c();
|
2331
2361
|
},
|
2332
2362
|
l(nodes) {
|
2333
|
-
|
2363
|
+
if (if_block) if_block.l(nodes);
|
2334
2364
|
t = claim_space(nodes);
|
2335
2365
|
if (default_slot) default_slot.l(nodes);
|
2336
2366
|
},
|
2337
2367
|
m(target, anchor) {
|
2338
|
-
|
2368
|
+
if (if_block) if_block.m(target, anchor);
|
2339
2369
|
insert_hydration(target, t, anchor);
|
2340
2370
|
|
2341
2371
|
if (default_slot) {
|
@@ -2345,16 +2375,37 @@ function create_fragment$x(ctx) {
|
|
2345
2375
|
current = true;
|
2346
2376
|
},
|
2347
2377
|
p(ctx, [dirty]) {
|
2378
|
+
if (/*_enableNormalize*/ ctx[0]) {
|
2379
|
+
if (if_block) {
|
2380
|
+
if (dirty & /*_enableNormalize*/ 1) {
|
2381
|
+
transition_in(if_block, 1);
|
2382
|
+
}
|
2383
|
+
} else {
|
2384
|
+
if_block = create_if_block$9();
|
2385
|
+
if_block.c();
|
2386
|
+
transition_in(if_block, 1);
|
2387
|
+
if_block.m(t.parentNode, t);
|
2388
|
+
}
|
2389
|
+
} else if (if_block) {
|
2390
|
+
group_outros();
|
2391
|
+
|
2392
|
+
transition_out(if_block, 1, 1, () => {
|
2393
|
+
if_block = null;
|
2394
|
+
});
|
2395
|
+
|
2396
|
+
check_outros();
|
2397
|
+
}
|
2398
|
+
|
2348
2399
|
if (default_slot) {
|
2349
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
2400
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 2)) {
|
2350
2401
|
update_slot_base(
|
2351
2402
|
default_slot,
|
2352
2403
|
default_slot_template,
|
2353
2404
|
ctx,
|
2354
|
-
/*$$scope*/ ctx[
|
2405
|
+
/*$$scope*/ ctx[1],
|
2355
2406
|
!current
|
2356
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
2357
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
2407
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[1])
|
2408
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[1], dirty, null),
|
2358
2409
|
null
|
2359
2410
|
);
|
2360
2411
|
}
|
@@ -2362,17 +2413,17 @@ function create_fragment$x(ctx) {
|
|
2362
2413
|
},
|
2363
2414
|
i(local) {
|
2364
2415
|
if (current) return;
|
2365
|
-
transition_in(
|
2416
|
+
transition_in(if_block);
|
2366
2417
|
transition_in(default_slot, local);
|
2367
2418
|
current = true;
|
2368
2419
|
},
|
2369
2420
|
o(local) {
|
2370
|
-
transition_out(
|
2421
|
+
transition_out(if_block);
|
2371
2422
|
transition_out(default_slot, local);
|
2372
2423
|
current = false;
|
2373
2424
|
},
|
2374
2425
|
d(detaching) {
|
2375
|
-
|
2426
|
+
if (if_block) if_block.d(detaching);
|
2376
2427
|
if (detaching) detach(t);
|
2377
2428
|
if (default_slot) default_slot.d(detaching);
|
2378
2429
|
}
|
@@ -2381,18 +2432,20 @@ function create_fragment$x(ctx) {
|
|
2381
2432
|
|
2382
2433
|
function instance$x($$self, $$props, $$invalidate) {
|
2383
2434
|
let { $$slots: slots = {}, $$scope } = $$props;
|
2435
|
+
let { _enableNormalize = true } = $$props;
|
2384
2436
|
|
2385
2437
|
$$self.$$set = $$props => {
|
2386
|
-
if ('
|
2438
|
+
if ('_enableNormalize' in $$props) $$invalidate(0, _enableNormalize = $$props._enableNormalize);
|
2439
|
+
if ('$$scope' in $$props) $$invalidate(1, $$scope = $$props.$$scope);
|
2387
2440
|
};
|
2388
2441
|
|
2389
|
-
return [$$scope, slots];
|
2442
|
+
return [_enableNormalize, $$scope, slots];
|
2390
2443
|
}
|
2391
2444
|
|
2392
2445
|
class State extends SvelteComponent {
|
2393
2446
|
constructor(options) {
|
2394
2447
|
super();
|
2395
|
-
init(this, options, instance$x, create_fragment$x, safe_not_equal, {});
|
2448
|
+
init(this, options, instance$x, create_fragment$x, safe_not_equal, { _enableNormalize: 0 });
|
2396
2449
|
}
|
2397
2450
|
}
|
2398
2451
|
|
@@ -3163,7 +3216,7 @@ function add_css$q(target) {
|
|
3163
3216
|
append_styles(target, "svelte-yyiwdt", ".modal.svelte-yyiwdt{position:fixed;box-sizing:border-box;z-index:2147483647;display:flex}.modal.svelte-yyiwdt > .button{flex:auto;display:flex}.close.svelte-yyiwdt{position:absolute;top:0;right:0}.close.svelte-yyiwdt > .button{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-yyiwdt > .button:hover{transform:rotate(90deg)}.modal-content.svelte-yyiwdt{flex:auto;display:flex;justify-content:center;align-items:center}");
|
3164
3217
|
}
|
3165
3218
|
|
3166
|
-
// (
|
3219
|
+
// (144:0) {#if visible}
|
3167
3220
|
function create_if_block$5(ctx) {
|
3168
3221
|
let div;
|
3169
3222
|
let button;
|
@@ -3209,7 +3262,7 @@ function create_if_block$5(ctx) {
|
|
3209
3262
|
m(target, anchor) {
|
3210
3263
|
insert_hydration(target, div, anchor);
|
3211
3264
|
mount_component(button, div, null);
|
3212
|
-
/*div_binding*/ ctx[
|
3265
|
+
/*div_binding*/ ctx[28](div);
|
3213
3266
|
current = true;
|
3214
3267
|
},
|
3215
3268
|
p(new_ctx, dirty) {
|
@@ -3219,7 +3272,7 @@ function create_if_block$5(ctx) {
|
|
3219
3272
|
if (dirty & /*clickEventName*/ 2) button_changes.eventName = /*clickEventName*/ ctx[1];
|
3220
3273
|
if (dirty & /*clickEventValue*/ 4) button_changes.eventValue = /*clickEventValue*/ ctx[2];
|
3221
3274
|
|
3222
|
-
if (dirty & /*$$scope, _style, $maximumZindex, onClose, _closeStyle, closeEventName, closeEventValue, closeButtonColor, closable*/
|
3275
|
+
if (dirty & /*$$scope, _style, $maximumZindex, onClose, _closeStyle, closeEventName, closeEventValue, closeButtonColor, closable*/ 538444784) {
|
3223
3276
|
button_changes.$$scope = { dirty, ctx };
|
3224
3277
|
}
|
3225
3278
|
|
@@ -3253,12 +3306,12 @@ function create_if_block$5(ctx) {
|
|
3253
3306
|
d(detaching) {
|
3254
3307
|
if (detaching) detach(div);
|
3255
3308
|
destroy_component(button);
|
3256
|
-
/*div_binding*/ ctx[
|
3309
|
+
/*div_binding*/ ctx[28](null);
|
3257
3310
|
}
|
3258
3311
|
};
|
3259
3312
|
}
|
3260
3313
|
|
3261
|
-
// (
|
3314
|
+
// (161:6) {#if closable}
|
3262
3315
|
function create_if_block_1$1(ctx) {
|
3263
3316
|
let div;
|
3264
3317
|
let button;
|
@@ -3304,7 +3357,7 @@ function create_if_block_1$1(ctx) {
|
|
3304
3357
|
if (dirty & /*closeEventName*/ 64) button_changes.eventName = /*closeEventName*/ ctx[6];
|
3305
3358
|
if (dirty & /*closeEventValue*/ 128) button_changes.eventValue = /*closeEventValue*/ ctx[7];
|
3306
3359
|
|
3307
|
-
if (dirty & /*$$scope, closeButtonColor*/
|
3360
|
+
if (dirty & /*$$scope, closeButtonColor*/ 536871168) {
|
3308
3361
|
button_changes.$$scope = { dirty, ctx };
|
3309
3362
|
}
|
3310
3363
|
|
@@ -3330,7 +3383,7 @@ function create_if_block_1$1(ctx) {
|
|
3330
3383
|
};
|
3331
3384
|
}
|
3332
3385
|
|
3333
|
-
// (
|
3386
|
+
// (163:10) <Button onClick={onClose} style={_closeStyle} eventName={closeEventName} eventValue={closeEventValue}>
|
3334
3387
|
function create_default_slot_1$1(ctx) {
|
3335
3388
|
let svg;
|
3336
3389
|
let path;
|
@@ -3387,14 +3440,14 @@ function create_default_slot_1$1(ctx) {
|
|
3387
3440
|
};
|
3388
3441
|
}
|
3389
3442
|
|
3390
|
-
// (
|
3443
|
+
// (160:4) <Button {onClick} eventName={clickEventName} eventValue={clickEventValue}>
|
3391
3444
|
function create_default_slot$6(ctx) {
|
3392
3445
|
let t;
|
3393
3446
|
let div;
|
3394
3447
|
let current;
|
3395
3448
|
let if_block = /*closable*/ ctx[19] && create_if_block_1$1(ctx);
|
3396
|
-
const default_slot_template = /*#slots*/ ctx[
|
3397
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
3449
|
+
const default_slot_template = /*#slots*/ ctx[27].default;
|
3450
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[29], null);
|
3398
3451
|
|
3399
3452
|
return {
|
3400
3453
|
c() {
|
@@ -3453,15 +3506,15 @@ function create_default_slot$6(ctx) {
|
|
3453
3506
|
}
|
3454
3507
|
|
3455
3508
|
if (default_slot) {
|
3456
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
3509
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 536870912)) {
|
3457
3510
|
update_slot_base(
|
3458
3511
|
default_slot,
|
3459
3512
|
default_slot_template,
|
3460
3513
|
ctx,
|
3461
|
-
/*$$scope*/ ctx[
|
3514
|
+
/*$$scope*/ ctx[29],
|
3462
3515
|
!current
|
3463
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
3464
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
3516
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[29])
|
3517
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[29], dirty, null),
|
3465
3518
|
null
|
3466
3519
|
);
|
3467
3520
|
}
|
@@ -3620,7 +3673,6 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3620
3673
|
let backgroundOverray = DefaultModalPlacement.backgroundOverlay;
|
3621
3674
|
let backgroundClickFunction = DefaultModalPlacement.backgroundClick;
|
3622
3675
|
let modal;
|
3623
|
-
let { debugDisableAnimation = false } = $$props;
|
3624
3676
|
|
3625
3677
|
onMount$1(() => {
|
3626
3678
|
$$invalidate(12, visible = true);
|
@@ -3648,13 +3700,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3648
3700
|
if ('closeEventValue' in $$props) $$invalidate(7, closeEventValue = $$props.closeEventValue);
|
3649
3701
|
if ('closeButtonColor' in $$props) $$invalidate(8, closeButtonColor = $$props.closeButtonColor);
|
3650
3702
|
if ('_closeStyle' in $$props) $$invalidate(9, _closeStyle = $$props._closeStyle);
|
3651
|
-
if ('
|
3652
|
-
if ('$$scope' in $$props) $$invalidate(30, $$scope = $$props.$$scope);
|
3703
|
+
if ('$$scope' in $$props) $$invalidate(29, $$scope = $$props.$$scope);
|
3653
3704
|
};
|
3654
3705
|
|
3655
3706
|
$$self.$$.update = () => {
|
3656
3707
|
if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 224) {
|
3657
|
-
$$invalidate(
|
3708
|
+
$$invalidate(24, close = () => {
|
3658
3709
|
if (closeEventName) {
|
3659
3710
|
send_event(closeEventName, closeEventValue);
|
3660
3711
|
}
|
@@ -3678,12 +3729,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3678
3729
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3679
3730
|
{
|
3680
3731
|
if (placement && placement.backgroundClick) {
|
3681
|
-
$$invalidate(
|
3732
|
+
$$invalidate(23, backgroundClickFunction = placement.backgroundClick);
|
3682
3733
|
}
|
3683
3734
|
}
|
3684
3735
|
}
|
3685
3736
|
|
3686
|
-
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/
|
3737
|
+
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 8388800) {
|
3687
3738
|
$$invalidate(18, backgroundClick = () => {
|
3688
3739
|
if (closeEventName) {
|
3689
3740
|
send_event(closeEventName, closeEventValue);
|
@@ -3694,12 +3745,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3694
3745
|
}
|
3695
3746
|
|
3696
3747
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3697
|
-
$$invalidate(
|
3748
|
+
$$invalidate(26, overwritePosition = 'center'
|
3698
3749
|
);
|
3699
3750
|
}
|
3700
3751
|
|
3701
3752
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3702
|
-
$$invalidate(
|
3753
|
+
$$invalidate(25, overwriteMargin = {
|
3703
3754
|
left: '0px',
|
3704
3755
|
right: '0px',
|
3705
3756
|
top: '0px',
|
@@ -3712,30 +3763,28 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3712
3763
|
$$invalidate(17, overwriteElasticity = 'none' );
|
3713
3764
|
}
|
3714
3765
|
|
3715
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
3766
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
3716
3767
|
$$invalidate(16, pos = getPositionStyle(overwritePosition));
|
3717
3768
|
}
|
3718
3769
|
|
3719
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
3770
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
3720
3771
|
$$invalidate(15, transform = getTransform(overwritePosition));
|
3721
3772
|
}
|
3722
3773
|
|
3723
|
-
if ($$self.$$.dirty & /*overwriteMargin*/
|
3774
|
+
if ($$self.$$.dirty & /*overwriteMargin*/ 33554432) {
|
3724
3775
|
$$invalidate(14, marginStyle = getMarginStyle(overwriteMargin));
|
3725
3776
|
}
|
3726
3777
|
|
3727
|
-
if ($$self.$$.dirty & /*close, modal*/
|
3778
|
+
if ($$self.$$.dirty & /*close, modal*/ 16778240) {
|
3728
3779
|
$$invalidate(13, handle_keydown = handleKeydown({ Escape: close, Tab: handleFocus(modal) }));
|
3729
3780
|
}
|
3730
|
-
|
3731
|
-
if ($$self.$$.dirty & /*debugDisableAnimation*/ 8388608) {
|
3732
|
-
// svelteコンポーネントのアニメーションを発火させるためにマウント時にvisibleをtrueにする。
|
3733
|
-
$$invalidate(12, visible = debugDisableAnimation ? true : false);
|
3734
|
-
}
|
3735
3781
|
};
|
3736
3782
|
|
3737
3783
|
$$invalidate(10, modal = null);
|
3738
3784
|
|
3785
|
+
// svelteコンポーネントのアニメーションを発火させるためにマウント時にvisibleをtrueにする。
|
3786
|
+
$$invalidate(12, visible = false);
|
3787
|
+
|
3739
3788
|
return [
|
3740
3789
|
onClick,
|
3741
3790
|
clickEventName,
|
@@ -3760,7 +3809,6 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3760
3809
|
$maximumZindex,
|
3761
3810
|
placement,
|
3762
3811
|
elasticity,
|
3763
|
-
debugDisableAnimation,
|
3764
3812
|
backgroundClickFunction,
|
3765
3813
|
close,
|
3766
3814
|
overwriteMargin,
|
@@ -3793,8 +3841,7 @@ class Modal extends SvelteComponent {
|
|
3793
3841
|
closeEventName: 6,
|
3794
3842
|
closeEventValue: 7,
|
3795
3843
|
closeButtonColor: 8,
|
3796
|
-
_closeStyle: 9
|
3797
|
-
debugDisableAnimation: 23
|
3844
|
+
_closeStyle: 9
|
3798
3845
|
},
|
3799
3846
|
add_css$q
|
3800
3847
|
);
|
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { linear, elasticOut, cubicOut } from 'svelte/easing';
|
2
2
|
import { writable, get } from 'svelte/store';
|
3
3
|
import { onMount as onMount$1, onDestroy as onDestroy$1, beforeUpdate as beforeUpdate$1, afterUpdate as afterUpdate$1, tick as tick$1, setContext, getContext, createEventDispatcher } from 'svelte';
|
4
|
-
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot,
|
4
|
+
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, space, insert, transition_in, group_outros, transition_out, check_outros, update_slot_base, get_all_dirty_from_scope, get_slot_changes, detach, create_component, mount_component, destroy_component, empty, component_subscribe, element, attr, noop, listen, null_to_empty, is_function, add_render_callback, create_in_transition, binding_callbacks, set_style, svg_element, append, destroy_each, text, set_data, src_url_equal, HtmlTag, construct_svelte_component, subscribe } from 'svelte/internal';
|
5
5
|
|
6
6
|
/** @internal */
|
7
7
|
const PropTypes = [
|
@@ -908,9 +908,11 @@ const ALL_ACTION_ID = 'KARTE_ALL_ACTION_ID';
|
|
908
908
|
const ALL_ACTION_SHORTEN_ID = 'KARTE_ALL_ACTION_SHORTEN_ID';
|
909
909
|
// prettier-ignore
|
910
910
|
/** @internal */
|
911
|
-
const actionId = typeof
|
912
|
-
?
|
913
|
-
:
|
911
|
+
const actionId = typeof __FIX_ACTION_CHANGE_STATE_EVENT__ === 'string'
|
912
|
+
? __FIX_ACTION_CHANGE_STATE_EVENT__
|
913
|
+
: typeof __FLYER_GEN_ACTION_ID_ON_BUILD__ === 'string'
|
914
|
+
? __FLYER_GEN_ACTION_ID_ON_BUILD__
|
915
|
+
: randStr();
|
914
916
|
/** @internal */
|
915
917
|
const ACTION_SHOW_EVENT = `KARTE-ACTION-SHOW-${actionId}`;
|
916
918
|
/** @internal */
|
@@ -1066,9 +1068,6 @@ const EASING = {
|
|
1066
1068
|
* @internal
|
1067
1069
|
*/
|
1068
1070
|
function customAnimation(node, { transform, animationStyle, delay = 0, duration = 1000 }) {
|
1069
|
-
if (animationStyle === 'none') {
|
1070
|
-
return {};
|
1071
|
-
}
|
1072
1071
|
const [x, y] = transform;
|
1073
1072
|
return {
|
1074
1073
|
delay,
|
@@ -2425,22 +2424,49 @@ class Normalize extends SvelteComponent {
|
|
2425
2424
|
|
2426
2425
|
/* src/components/State.svelte generated by Svelte v3.53.1 */
|
2427
2426
|
|
2428
|
-
function
|
2427
|
+
function create_if_block$9(ctx) {
|
2429
2428
|
let normalize;
|
2430
|
-
let t;
|
2431
2429
|
let current;
|
2432
2430
|
normalize = new Normalize({});
|
2433
|
-
const default_slot_template = /*#slots*/ ctx[1].default;
|
2434
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null);
|
2435
2431
|
|
2436
2432
|
return {
|
2437
2433
|
c() {
|
2438
2434
|
create_component(normalize.$$.fragment);
|
2435
|
+
},
|
2436
|
+
m(target, anchor) {
|
2437
|
+
mount_component(normalize, target, anchor);
|
2438
|
+
current = true;
|
2439
|
+
},
|
2440
|
+
i(local) {
|
2441
|
+
if (current) return;
|
2442
|
+
transition_in(normalize.$$.fragment, local);
|
2443
|
+
current = true;
|
2444
|
+
},
|
2445
|
+
o(local) {
|
2446
|
+
transition_out(normalize.$$.fragment, local);
|
2447
|
+
current = false;
|
2448
|
+
},
|
2449
|
+
d(detaching) {
|
2450
|
+
destroy_component(normalize, detaching);
|
2451
|
+
}
|
2452
|
+
};
|
2453
|
+
}
|
2454
|
+
|
2455
|
+
function create_fragment$x(ctx) {
|
2456
|
+
let t;
|
2457
|
+
let current;
|
2458
|
+
let if_block = /*_enableNormalize*/ ctx[0] && create_if_block$9();
|
2459
|
+
const default_slot_template = /*#slots*/ ctx[2].default;
|
2460
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[1], null);
|
2461
|
+
|
2462
|
+
return {
|
2463
|
+
c() {
|
2464
|
+
if (if_block) if_block.c();
|
2439
2465
|
t = space();
|
2440
2466
|
if (default_slot) default_slot.c();
|
2441
2467
|
},
|
2442
2468
|
m(target, anchor) {
|
2443
|
-
|
2469
|
+
if (if_block) if_block.m(target, anchor);
|
2444
2470
|
insert(target, t, anchor);
|
2445
2471
|
|
2446
2472
|
if (default_slot) {
|
@@ -2450,16 +2476,37 @@ function create_fragment$x(ctx) {
|
|
2450
2476
|
current = true;
|
2451
2477
|
},
|
2452
2478
|
p(ctx, [dirty]) {
|
2479
|
+
if (/*_enableNormalize*/ ctx[0]) {
|
2480
|
+
if (if_block) {
|
2481
|
+
if (dirty & /*_enableNormalize*/ 1) {
|
2482
|
+
transition_in(if_block, 1);
|
2483
|
+
}
|
2484
|
+
} else {
|
2485
|
+
if_block = create_if_block$9();
|
2486
|
+
if_block.c();
|
2487
|
+
transition_in(if_block, 1);
|
2488
|
+
if_block.m(t.parentNode, t);
|
2489
|
+
}
|
2490
|
+
} else if (if_block) {
|
2491
|
+
group_outros();
|
2492
|
+
|
2493
|
+
transition_out(if_block, 1, 1, () => {
|
2494
|
+
if_block = null;
|
2495
|
+
});
|
2496
|
+
|
2497
|
+
check_outros();
|
2498
|
+
}
|
2499
|
+
|
2453
2500
|
if (default_slot) {
|
2454
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
2501
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 2)) {
|
2455
2502
|
update_slot_base(
|
2456
2503
|
default_slot,
|
2457
2504
|
default_slot_template,
|
2458
2505
|
ctx,
|
2459
|
-
/*$$scope*/ ctx[
|
2506
|
+
/*$$scope*/ ctx[1],
|
2460
2507
|
!current
|
2461
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
2462
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
2508
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[1])
|
2509
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[1], dirty, null),
|
2463
2510
|
null
|
2464
2511
|
);
|
2465
2512
|
}
|
@@ -2467,17 +2514,17 @@ function create_fragment$x(ctx) {
|
|
2467
2514
|
},
|
2468
2515
|
i(local) {
|
2469
2516
|
if (current) return;
|
2470
|
-
transition_in(
|
2517
|
+
transition_in(if_block);
|
2471
2518
|
transition_in(default_slot, local);
|
2472
2519
|
current = true;
|
2473
2520
|
},
|
2474
2521
|
o(local) {
|
2475
|
-
transition_out(
|
2522
|
+
transition_out(if_block);
|
2476
2523
|
transition_out(default_slot, local);
|
2477
2524
|
current = false;
|
2478
2525
|
},
|
2479
2526
|
d(detaching) {
|
2480
|
-
|
2527
|
+
if (if_block) if_block.d(detaching);
|
2481
2528
|
if (detaching) detach(t);
|
2482
2529
|
if (default_slot) default_slot.d(detaching);
|
2483
2530
|
}
|
@@ -2486,18 +2533,20 @@ function create_fragment$x(ctx) {
|
|
2486
2533
|
|
2487
2534
|
function instance$x($$self, $$props, $$invalidate) {
|
2488
2535
|
let { $$slots: slots = {}, $$scope } = $$props;
|
2536
|
+
let { _enableNormalize = true } = $$props;
|
2489
2537
|
|
2490
2538
|
$$self.$$set = $$props => {
|
2491
|
-
if ('
|
2539
|
+
if ('_enableNormalize' in $$props) $$invalidate(0, _enableNormalize = $$props._enableNormalize);
|
2540
|
+
if ('$$scope' in $$props) $$invalidate(1, $$scope = $$props.$$scope);
|
2492
2541
|
};
|
2493
2542
|
|
2494
|
-
return [$$scope, slots];
|
2543
|
+
return [_enableNormalize, $$scope, slots];
|
2495
2544
|
}
|
2496
2545
|
|
2497
2546
|
class State extends SvelteComponent {
|
2498
2547
|
constructor(options) {
|
2499
2548
|
super();
|
2500
|
-
init(this, options, instance$x, create_fragment$x, safe_not_equal, {});
|
2549
|
+
init(this, options, instance$x, create_fragment$x, safe_not_equal, { _enableNormalize: 0 });
|
2501
2550
|
}
|
2502
2551
|
}
|
2503
2552
|
|
@@ -3192,7 +3241,7 @@ function add_css$q(target) {
|
|
3192
3241
|
append_styles(target, "svelte-yyiwdt", ".modal.svelte-yyiwdt{position:fixed;box-sizing:border-box;z-index:2147483647;display:flex}.modal.svelte-yyiwdt > .button{flex:auto;display:flex}.close.svelte-yyiwdt{position:absolute;top:0;right:0}.close.svelte-yyiwdt > .button{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-yyiwdt > .button:hover{transform:rotate(90deg)}.modal-content.svelte-yyiwdt{flex:auto;display:flex;justify-content:center;align-items:center}");
|
3193
3242
|
}
|
3194
3243
|
|
3195
|
-
// (
|
3244
|
+
// (144:0) {#if visible}
|
3196
3245
|
function create_if_block$5(ctx) {
|
3197
3246
|
let div;
|
3198
3247
|
let button;
|
@@ -3222,7 +3271,7 @@ function create_if_block$5(ctx) {
|
|
3222
3271
|
m(target, anchor) {
|
3223
3272
|
insert(target, div, anchor);
|
3224
3273
|
mount_component(button, div, null);
|
3225
|
-
/*div_binding*/ ctx[
|
3274
|
+
/*div_binding*/ ctx[28](div);
|
3226
3275
|
current = true;
|
3227
3276
|
},
|
3228
3277
|
p(new_ctx, dirty) {
|
@@ -3232,7 +3281,7 @@ function create_if_block$5(ctx) {
|
|
3232
3281
|
if (dirty & /*clickEventName*/ 2) button_changes.eventName = /*clickEventName*/ ctx[1];
|
3233
3282
|
if (dirty & /*clickEventValue*/ 4) button_changes.eventValue = /*clickEventValue*/ ctx[2];
|
3234
3283
|
|
3235
|
-
if (dirty & /*$$scope, _style, $maximumZindex, onClose, _closeStyle, closeEventName, closeEventValue, closeButtonColor, closable*/
|
3284
|
+
if (dirty & /*$$scope, _style, $maximumZindex, onClose, _closeStyle, closeEventName, closeEventValue, closeButtonColor, closable*/ 538444784) {
|
3236
3285
|
button_changes.$$scope = { dirty, ctx };
|
3237
3286
|
}
|
3238
3287
|
|
@@ -3266,12 +3315,12 @@ function create_if_block$5(ctx) {
|
|
3266
3315
|
d(detaching) {
|
3267
3316
|
if (detaching) detach(div);
|
3268
3317
|
destroy_component(button);
|
3269
|
-
/*div_binding*/ ctx[
|
3318
|
+
/*div_binding*/ ctx[28](null);
|
3270
3319
|
}
|
3271
3320
|
};
|
3272
3321
|
}
|
3273
3322
|
|
3274
|
-
// (
|
3323
|
+
// (161:6) {#if closable}
|
3275
3324
|
function create_if_block_1$1(ctx) {
|
3276
3325
|
let div;
|
3277
3326
|
let button;
|
@@ -3307,7 +3356,7 @@ function create_if_block_1$1(ctx) {
|
|
3307
3356
|
if (dirty & /*closeEventName*/ 64) button_changes.eventName = /*closeEventName*/ ctx[6];
|
3308
3357
|
if (dirty & /*closeEventValue*/ 128) button_changes.eventValue = /*closeEventValue*/ ctx[7];
|
3309
3358
|
|
3310
|
-
if (dirty & /*$$scope, closeButtonColor*/
|
3359
|
+
if (dirty & /*$$scope, closeButtonColor*/ 536871168) {
|
3311
3360
|
button_changes.$$scope = { dirty, ctx };
|
3312
3361
|
}
|
3313
3362
|
|
@@ -3333,7 +3382,7 @@ function create_if_block_1$1(ctx) {
|
|
3333
3382
|
};
|
3334
3383
|
}
|
3335
3384
|
|
3336
|
-
// (
|
3385
|
+
// (163:10) <Button onClick={onClose} style={_closeStyle} eventName={closeEventName} eventValue={closeEventValue}>
|
3337
3386
|
function create_default_slot_1$1(ctx) {
|
3338
3387
|
let svg;
|
3339
3388
|
let path;
|
@@ -3366,14 +3415,14 @@ function create_default_slot_1$1(ctx) {
|
|
3366
3415
|
};
|
3367
3416
|
}
|
3368
3417
|
|
3369
|
-
// (
|
3418
|
+
// (160:4) <Button {onClick} eventName={clickEventName} eventValue={clickEventValue}>
|
3370
3419
|
function create_default_slot$6(ctx) {
|
3371
3420
|
let t;
|
3372
3421
|
let div;
|
3373
3422
|
let current;
|
3374
3423
|
let if_block = /*closable*/ ctx[19] && create_if_block_1$1(ctx);
|
3375
|
-
const default_slot_template = /*#slots*/ ctx[
|
3376
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
3424
|
+
const default_slot_template = /*#slots*/ ctx[27].default;
|
3425
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[29], null);
|
3377
3426
|
|
3378
3427
|
return {
|
3379
3428
|
c() {
|
@@ -3420,15 +3469,15 @@ function create_default_slot$6(ctx) {
|
|
3420
3469
|
}
|
3421
3470
|
|
3422
3471
|
if (default_slot) {
|
3423
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
3472
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 536870912)) {
|
3424
3473
|
update_slot_base(
|
3425
3474
|
default_slot,
|
3426
3475
|
default_slot_template,
|
3427
3476
|
ctx,
|
3428
|
-
/*$$scope*/ ctx[
|
3477
|
+
/*$$scope*/ ctx[29],
|
3429
3478
|
!current
|
3430
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
3431
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
3479
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[29])
|
3480
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[29], dirty, null),
|
3432
3481
|
null
|
3433
3482
|
);
|
3434
3483
|
}
|
@@ -3581,7 +3630,6 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3581
3630
|
let backgroundOverray = DefaultModalPlacement.backgroundOverlay;
|
3582
3631
|
let backgroundClickFunction = DefaultModalPlacement.backgroundClick;
|
3583
3632
|
let modal;
|
3584
|
-
let { debugDisableAnimation = false } = $$props;
|
3585
3633
|
|
3586
3634
|
onMount$1(() => {
|
3587
3635
|
$$invalidate(12, visible = true);
|
@@ -3609,13 +3657,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3609
3657
|
if ('closeEventValue' in $$props) $$invalidate(7, closeEventValue = $$props.closeEventValue);
|
3610
3658
|
if ('closeButtonColor' in $$props) $$invalidate(8, closeButtonColor = $$props.closeButtonColor);
|
3611
3659
|
if ('_closeStyle' in $$props) $$invalidate(9, _closeStyle = $$props._closeStyle);
|
3612
|
-
if ('
|
3613
|
-
if ('$$scope' in $$props) $$invalidate(30, $$scope = $$props.$$scope);
|
3660
|
+
if ('$$scope' in $$props) $$invalidate(29, $$scope = $$props.$$scope);
|
3614
3661
|
};
|
3615
3662
|
|
3616
3663
|
$$self.$$.update = () => {
|
3617
3664
|
if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 224) {
|
3618
|
-
$$invalidate(
|
3665
|
+
$$invalidate(24, close = () => {
|
3619
3666
|
if (closeEventName) {
|
3620
3667
|
send_event(closeEventName, closeEventValue);
|
3621
3668
|
}
|
@@ -3639,12 +3686,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3639
3686
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3640
3687
|
{
|
3641
3688
|
if (placement && placement.backgroundClick) {
|
3642
|
-
$$invalidate(
|
3689
|
+
$$invalidate(23, backgroundClickFunction = placement.backgroundClick);
|
3643
3690
|
}
|
3644
3691
|
}
|
3645
3692
|
}
|
3646
3693
|
|
3647
|
-
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/
|
3694
|
+
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 8388800) {
|
3648
3695
|
$$invalidate(18, backgroundClick = () => {
|
3649
3696
|
if (closeEventName) {
|
3650
3697
|
send_event(closeEventName, closeEventValue);
|
@@ -3655,13 +3702,13 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3655
3702
|
}
|
3656
3703
|
|
3657
3704
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3658
|
-
$$invalidate(
|
3705
|
+
$$invalidate(26, overwritePosition = placement && placement.position != null
|
3659
3706
|
? placement.position
|
3660
3707
|
: DefaultModalPlacement.position);
|
3661
3708
|
}
|
3662
3709
|
|
3663
3710
|
if ($$self.$$.dirty & /*placement*/ 2097152) {
|
3664
|
-
$$invalidate(
|
3711
|
+
$$invalidate(25, overwriteMargin = placement && placement.margin != null
|
3665
3712
|
? placement.margin
|
3666
3713
|
: DefaultModalPlacement.margin);
|
3667
3714
|
}
|
@@ -3670,30 +3717,28 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3670
3717
|
$$invalidate(17, overwriteElasticity = elasticity);
|
3671
3718
|
}
|
3672
3719
|
|
3673
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
3720
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
3674
3721
|
$$invalidate(16, pos = getPositionStyle(overwritePosition));
|
3675
3722
|
}
|
3676
3723
|
|
3677
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
3724
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
3678
3725
|
$$invalidate(15, transform = getTransform(overwritePosition));
|
3679
3726
|
}
|
3680
3727
|
|
3681
|
-
if ($$self.$$.dirty & /*overwriteMargin*/
|
3728
|
+
if ($$self.$$.dirty & /*overwriteMargin*/ 33554432) {
|
3682
3729
|
$$invalidate(14, marginStyle = getMarginStyle(overwriteMargin));
|
3683
3730
|
}
|
3684
3731
|
|
3685
|
-
if ($$self.$$.dirty & /*close, modal*/
|
3732
|
+
if ($$self.$$.dirty & /*close, modal*/ 16778240) {
|
3686
3733
|
$$invalidate(13, handle_keydown = handleKeydown({ Escape: close, Tab: handleFocus(modal) }));
|
3687
3734
|
}
|
3688
|
-
|
3689
|
-
if ($$self.$$.dirty & /*debugDisableAnimation*/ 8388608) {
|
3690
|
-
// svelteコンポーネントのアニメーションを発火させるためにマウント時にvisibleをtrueにする。
|
3691
|
-
$$invalidate(12, visible = debugDisableAnimation ? true : false);
|
3692
|
-
}
|
3693
3735
|
};
|
3694
3736
|
|
3695
3737
|
$$invalidate(10, modal = null);
|
3696
3738
|
|
3739
|
+
// svelteコンポーネントのアニメーションを発火させるためにマウント時にvisibleをtrueにする。
|
3740
|
+
$$invalidate(12, visible = false);
|
3741
|
+
|
3697
3742
|
return [
|
3698
3743
|
onClick,
|
3699
3744
|
clickEventName,
|
@@ -3718,7 +3763,6 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
3718
3763
|
$maximumZindex,
|
3719
3764
|
placement,
|
3720
3765
|
elasticity,
|
3721
|
-
debugDisableAnimation,
|
3722
3766
|
backgroundClickFunction,
|
3723
3767
|
close,
|
3724
3768
|
overwriteMargin,
|
@@ -3751,8 +3795,7 @@ class Modal extends SvelteComponent {
|
|
3751
3795
|
closeEventName: 6,
|
3752
3796
|
closeEventValue: 7,
|
3753
3797
|
closeButtonColor: 8,
|
3754
|
-
_closeStyle: 9
|
3755
|
-
debugDisableAnimation: 23
|
3798
|
+
_closeStyle: 9
|
3756
3799
|
},
|
3757
3800
|
add_css$q
|
3758
3801
|
);
|