@plaidev/karte-action-sdk 1.0.29 → 1.0.32
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/index.es.d.ts +56 -11
- package/dist/index.es.js +435 -258
- package/package.json +3 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ declare const PropTypes: readonly [
|
|
|
36
36
|
"Length",
|
|
37
37
|
"Color",
|
|
38
38
|
"Alignment",
|
|
39
|
+
"State",
|
|
39
40
|
"Style"
|
|
40
41
|
];
|
|
41
42
|
type PropType = typeof PropTypes[number];
|
|
@@ -159,15 +160,15 @@ declare const ModalMarginTranslations: {
|
|
|
159
160
|
};
|
|
160
161
|
};
|
|
161
162
|
type ModalMargin = {
|
|
162
|
-
left
|
|
163
|
-
right
|
|
164
|
-
top
|
|
165
|
-
bottom
|
|
163
|
+
left?: string;
|
|
164
|
+
right?: string;
|
|
165
|
+
top?: string;
|
|
166
|
+
bottom?: string;
|
|
166
167
|
};
|
|
167
168
|
type ModalPlacement = {
|
|
168
|
-
position
|
|
169
|
-
margin
|
|
170
|
-
backgroundOverlay
|
|
169
|
+
position?: ModalPosition;
|
|
170
|
+
margin?: ModalMargin;
|
|
171
|
+
backgroundOverlay?: boolean;
|
|
171
172
|
};
|
|
172
173
|
declare const DefaultModalPlacement: ModalPlacement;
|
|
173
174
|
type LongText = string;
|
|
@@ -230,10 +231,54 @@ declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw
|
|
|
230
231
|
declare function toBr(text: string): string;
|
|
231
232
|
declare function randStr(digit?: number): string;
|
|
232
233
|
declare const _default: "dummy";
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
declare function hideOnScroll<Props extends {
|
|
235
|
+
hide_on_scroll: boolean;
|
|
236
|
+
hide_on_scroll_rate: number;
|
|
237
|
+
show_on_scroll_reenter: boolean;
|
|
238
|
+
}>(props: Props, fn?: () => void): () => void;
|
|
239
|
+
declare function hideOnTime<Props extends {
|
|
240
|
+
hide_on_time: boolean;
|
|
241
|
+
hide_on_time_count: number;
|
|
242
|
+
}>(props: Props, fn?: () => void): () => void;
|
|
243
|
+
declare function showOnScroll<Props extends {
|
|
244
|
+
show_on_scroll: boolean;
|
|
245
|
+
show_on_scroll_rate: number;
|
|
246
|
+
show_on_scroll_reenter: boolean;
|
|
247
|
+
}>(props: Props, fn?: Function): () => void;
|
|
248
|
+
declare function showOnTime<Props extends {
|
|
249
|
+
show_on_time: boolean;
|
|
250
|
+
show_on_time_count: number;
|
|
251
|
+
}>(props: Props, fn?: Function): () => void;
|
|
252
|
+
declare function ensureModalRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
|
|
253
|
+
declare const h: (type: string, props: any, ...children: Array<any>) => HTMLElement;
|
|
254
|
+
declare function createFog({ color, opacity, zIndex, onclick }: {
|
|
255
|
+
color?: string;
|
|
256
|
+
opacity?: string;
|
|
257
|
+
zIndex?: number;
|
|
258
|
+
onclick: () => void;
|
|
259
|
+
}): {
|
|
260
|
+
fog: HTMLDivElement;
|
|
261
|
+
close: () => void;
|
|
262
|
+
};
|
|
263
|
+
type EmbedLogic = "replace" | "append" | "prepend" | "after" | "before";
|
|
264
|
+
declare function embed(target: HTMLElement, replace: HTMLElement, embed_method: EmbedLogic): void;
|
|
265
|
+
declare const collection: (config: {
|
|
266
|
+
api_key: string;
|
|
267
|
+
table: string;
|
|
268
|
+
endpoint?: string;
|
|
269
|
+
}) => {
|
|
270
|
+
get(key: string | string[], cb: (err: Error | null, items?: any) => void): void;
|
|
271
|
+
getByQuery(query_name: string, params: {
|
|
272
|
+
[p: string]: string | number | boolean | (string | number | boolean)[];
|
|
273
|
+
}, options: {
|
|
274
|
+
ignore_fields?: string[];
|
|
275
|
+
} | null | undefined, cb: (err: Error | null, items?: any) => void): void;
|
|
276
|
+
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
|
277
|
+
};
|
|
278
|
+
export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ensureModalRoot, h, createFog, EmbedLogic, embed, collection };
|
|
279
|
+
export { default as State } from './components/State.svelte';
|
|
280
|
+
export { default as GridModalState } from './components/GridModalState.svelte';
|
|
281
|
+
export { default as GridItem } from './components/GridItem.svelte';
|
|
237
282
|
export { default as Flex } from './components/Flex.svelte';
|
|
238
283
|
export { default as FlexItem } from './components/FlexItem.svelte';
|
|
239
284
|
export { default as Modal } from './components/Modal.svelte';
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writable, get } from 'svelte/store';
|
|
2
|
-
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, noop, element, attr, listen, null_to_empty, append,
|
|
2
|
+
import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, noop, element, attr, listen, null_to_empty, append, binding_callbacks, svg_element, src_url_equal } from 'svelte/internal';
|
|
3
3
|
import { createEventDispatcher, onDestroy, onMount, setContext, getContext } from 'svelte';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -67,7 +67,7 @@ const getPositionStyle = (position) => {
|
|
|
67
67
|
.trimStart();
|
|
68
68
|
};
|
|
69
69
|
const getMarginStyle = (margin) => {
|
|
70
|
-
return `margin: ${margin
|
|
70
|
+
return `margin: ${margin?.top ?? 0} ${margin?.right ?? 0} ${margin?.bottom ?? 0} ${margin?.left ?? 0};`;
|
|
71
71
|
};
|
|
72
72
|
function onScroll(fn, rate) {
|
|
73
73
|
const target = document.querySelector('body');
|
|
@@ -178,6 +178,7 @@ const PropTypes = [
|
|
|
178
178
|
'Length',
|
|
179
179
|
'Color',
|
|
180
180
|
'Alignment',
|
|
181
|
+
'State',
|
|
181
182
|
'Style',
|
|
182
183
|
];
|
|
183
184
|
const MediaQueries = {
|
|
@@ -310,7 +311,179 @@ const ObjectFits = ['fill', 'contain', 'cover'];
|
|
|
310
311
|
const Repeats = ['repeat', 'space', 'round', 'no-repeat'];
|
|
311
312
|
const BackgroundSizes = ['cover', 'contain', 'auto'];
|
|
312
313
|
|
|
313
|
-
|
|
314
|
+
const NOOP = () => { };
|
|
315
|
+
function hideOnScroll(props, fn) {
|
|
316
|
+
return props.hide_on_scroll && props.hide_on_scroll_rate
|
|
317
|
+
? onScroll(() => {
|
|
318
|
+
fn && fn();
|
|
319
|
+
return props.show_on_scroll_reenter;
|
|
320
|
+
}, props.hide_on_scroll_rate / 100)
|
|
321
|
+
: NOOP;
|
|
322
|
+
}
|
|
323
|
+
function hideOnTime(props, fn) {
|
|
324
|
+
return props.hide_on_time && props.hide_on_time_count
|
|
325
|
+
? onTime(() => {
|
|
326
|
+
fn && fn();
|
|
327
|
+
}, props.hide_on_time_count * 1000)
|
|
328
|
+
: NOOP;
|
|
329
|
+
}
|
|
330
|
+
function showOnScroll(props, fn) {
|
|
331
|
+
return props.show_on_scroll && props.show_on_scroll_rate
|
|
332
|
+
? onScroll(() => {
|
|
333
|
+
fn && fn();
|
|
334
|
+
return props.show_on_scroll_reenter;
|
|
335
|
+
}, props.show_on_scroll_rate / 100)
|
|
336
|
+
: NOOP;
|
|
337
|
+
}
|
|
338
|
+
function showOnTime(props, fn) {
|
|
339
|
+
return props.show_on_time && props.show_on_time_count
|
|
340
|
+
? onTime(() => {
|
|
341
|
+
fn && fn();
|
|
342
|
+
}, props.show_on_time_count * 1000)
|
|
343
|
+
: NOOP;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const KARTE_MODAL_ROOT = 'karte-modal-root';
|
|
347
|
+
function ensureModalRoot(useShadow = true) {
|
|
348
|
+
let el = document.getElementById(KARTE_MODAL_ROOT);
|
|
349
|
+
if (el == null) {
|
|
350
|
+
el = h('div', { id: KARTE_MODAL_ROOT });
|
|
351
|
+
document.body.appendChild(el);
|
|
352
|
+
}
|
|
353
|
+
const isShadow = !!document.body.attachShadow && useShadow;
|
|
354
|
+
if (isShadow) {
|
|
355
|
+
return el.shadowRoot ?? el.attachShadow({ mode: 'open' });
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
return el;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const h = (type, props, ...children) => {
|
|
362
|
+
const el = document.createElement(type);
|
|
363
|
+
for (const key of Object.keys(props)) {
|
|
364
|
+
const v = props[key];
|
|
365
|
+
if (key === 'style') {
|
|
366
|
+
Object.assign(el.style, v);
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
// @ts-ignore
|
|
370
|
+
el[key] = v;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
for (const child of children) {
|
|
374
|
+
el.appendChild(child);
|
|
375
|
+
}
|
|
376
|
+
return el;
|
|
377
|
+
};
|
|
378
|
+
function createFog({ color = '#000', opacity = '50%', zIndex = 999, onclick, }) {
|
|
379
|
+
const root = ensureModalRoot(false);
|
|
380
|
+
if (root.querySelector('.__krt-fog')) {
|
|
381
|
+
return { fog: null, close: () => { } };
|
|
382
|
+
}
|
|
383
|
+
const fog = document.createElement('div');
|
|
384
|
+
fog.className = '__krt-fog';
|
|
385
|
+
Object.assign(fog.style, {
|
|
386
|
+
position: 'fixed',
|
|
387
|
+
left: 0,
|
|
388
|
+
top: 0,
|
|
389
|
+
width: '100%',
|
|
390
|
+
height: '100%',
|
|
391
|
+
'z-index': zIndex,
|
|
392
|
+
'background-color': color,
|
|
393
|
+
opacity,
|
|
394
|
+
});
|
|
395
|
+
const close = () => {
|
|
396
|
+
onclick();
|
|
397
|
+
fog.remove();
|
|
398
|
+
};
|
|
399
|
+
fog.onclick = close;
|
|
400
|
+
root.appendChild(fog);
|
|
401
|
+
return { fog, close };
|
|
402
|
+
}
|
|
403
|
+
function embed(target, replace, embed_method) {
|
|
404
|
+
if (embed_method == 'replace') {
|
|
405
|
+
if (target.parentNode) {
|
|
406
|
+
target.parentNode.replaceChild(replace, target);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
else if (embed_method == 'append') {
|
|
410
|
+
target.append(replace);
|
|
411
|
+
}
|
|
412
|
+
else if (embed_method == 'prepend') {
|
|
413
|
+
target.prepend(replace);
|
|
414
|
+
}
|
|
415
|
+
else if (embed_method == 'after') {
|
|
416
|
+
target.after(replace);
|
|
417
|
+
}
|
|
418
|
+
else if (embed_method == 'before') {
|
|
419
|
+
target.before(replace);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const ENDPOINT = 'https://t.karte.io/collection';
|
|
424
|
+
const collection = (config) => {
|
|
425
|
+
const endpoint = config.endpoint ?? ENDPOINT;
|
|
426
|
+
const api_key = config.api_key;
|
|
427
|
+
const table = config.table;
|
|
428
|
+
return {
|
|
429
|
+
get(key, cb) {
|
|
430
|
+
if (Array.isArray(key)) {
|
|
431
|
+
return request(`${endpoint}/getByKeys`, {
|
|
432
|
+
api_key,
|
|
433
|
+
name: table,
|
|
434
|
+
keys: key,
|
|
435
|
+
}, cb);
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
request(`${endpoint}/getByKey`, {
|
|
439
|
+
api_key,
|
|
440
|
+
name: table,
|
|
441
|
+
key,
|
|
442
|
+
}, cb);
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
getByQuery(query_name, params, options, cb) {
|
|
446
|
+
request(`${endpoint}/getByQuery`, {
|
|
447
|
+
api_key,
|
|
448
|
+
name: table,
|
|
449
|
+
query_name,
|
|
450
|
+
params,
|
|
451
|
+
options,
|
|
452
|
+
}, cb);
|
|
453
|
+
},
|
|
454
|
+
set(key, value, cb) {
|
|
455
|
+
request(`${endpoint}/set`, {
|
|
456
|
+
api_key,
|
|
457
|
+
name: table,
|
|
458
|
+
key,
|
|
459
|
+
value,
|
|
460
|
+
}, cb);
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
function request(url, data, cb) {
|
|
465
|
+
const xhr = new XMLHttpRequest();
|
|
466
|
+
xhr.onreadystatechange = () => {
|
|
467
|
+
if (xhr.readyState != 4) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (xhr.status != 200) {
|
|
471
|
+
return cb(new Error(`fail to send collection api request. reason: ${xhr.responseText}`));
|
|
472
|
+
}
|
|
473
|
+
try {
|
|
474
|
+
data = JSON.parse(xhr.responseText);
|
|
475
|
+
return cb(null, data);
|
|
476
|
+
}
|
|
477
|
+
catch (err) {
|
|
478
|
+
return cb(err);
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
xhr.open('POST', url);
|
|
482
|
+
xhr.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8');
|
|
483
|
+
xhr.send(JSON.stringify({ ...data }));
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* src/components/elements/Normalize.svelte generated by Svelte v3.44.1 */
|
|
314
487
|
|
|
315
488
|
function add_css$9(target) {
|
|
316
489
|
append_styles(target, "svelte-zmz1k7", "@import 'https://cdn.skypack.dev/normalize.css';");
|
|
@@ -323,7 +496,7 @@ class Normalize extends SvelteComponent {
|
|
|
323
496
|
}
|
|
324
497
|
}
|
|
325
498
|
|
|
326
|
-
/* src/State.svelte generated by Svelte v3.44.1 */
|
|
499
|
+
/* src/components/State.svelte generated by Svelte v3.44.1 */
|
|
327
500
|
|
|
328
501
|
function create_fragment$c(ctx) {
|
|
329
502
|
let normalize;
|
|
@@ -526,7 +699,7 @@ class StateItem extends SvelteComponent {
|
|
|
526
699
|
}
|
|
527
700
|
}
|
|
528
701
|
|
|
529
|
-
/* src/components/BackgroundOverray.svelte generated by Svelte v3.44.1 */
|
|
702
|
+
/* src/components/elements/BackgroundOverray.svelte generated by Svelte v3.44.1 */
|
|
530
703
|
|
|
531
704
|
function add_css$8(target) {
|
|
532
705
|
append_styles(target, "svelte-1h4b6e3", ".background.svelte-1h4b6e3{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3)}");
|
|
@@ -615,7 +788,7 @@ class BackgroundOverray extends SvelteComponent {
|
|
|
615
788
|
}
|
|
616
789
|
}
|
|
617
790
|
|
|
618
|
-
/* src/components/Animation.svelte generated by Svelte v3.44.1 */
|
|
791
|
+
/* src/components/elements/Animation.svelte generated by Svelte v3.44.1 */
|
|
619
792
|
|
|
620
793
|
function add_css$7(target) {
|
|
621
794
|
append_styles(target, "svelte-sa0cac", "@keyframes svelte-sa0cac-fade{0%{opacity:0}100%{opacity:1}}.fade.svelte-sa0cac{animation-name:svelte-sa0cac-fade;animation-duration:1s}@keyframes svelte-sa0cac-bounce{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}.bounce.svelte-sa0cac{animation-name:svelte-sa0cac-bounce;animation-duration:1s}@keyframes svelte-sa0cac-slide-down{0%{transform:translate3d(0, -100%, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-down.svelte-sa0cac{animation-name:svelte-sa0cac-slide-down;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-up{0%{transform:translate3d(0, 100%, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-up.svelte-sa0cac{animation-name:svelte-sa0cac-slide-up;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-left{0%{transform:translate3d(100%, 0, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-left.svelte-sa0cac{animation-name:svelte-sa0cac-slide-left;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-right{0%{transform:translate3d(-100%, 0, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-right.svelte-sa0cac{animation-name:svelte-sa0cac-slide-right;animation-duration:1s;animation-delay:0.1s}");
|
|
@@ -700,7 +873,7 @@ function add_css$6(target) {
|
|
|
700
873
|
append_styles(target, "svelte-1bxl6mz", ".modal.svelte-1bxl6mz{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-1bxl6mz{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-1bxl6mz:hover{transform:rotate(90deg)}");
|
|
701
874
|
}
|
|
702
875
|
|
|
703
|
-
// (
|
|
876
|
+
// (84:4) {#if closable}
|
|
704
877
|
function create_if_block(ctx) {
|
|
705
878
|
let button;
|
|
706
879
|
let svg;
|
|
@@ -715,7 +888,7 @@ function create_if_block(ctx) {
|
|
|
715
888
|
svg = svg_element("svg");
|
|
716
889
|
path = svg_element("path");
|
|
717
890
|
attr(path, "d", "M5.78516 4.75L8.73828 1.82422C8.90234 1.66016 8.90234 1.35938 8.73828 1.19531L8.05469 0.511719C7.89062 0.347656 7.58984 0.347656 7.42578 0.511719L4.5 3.46484L1.54688 0.511719C1.38281 0.347656 1.08203 0.347656 0.917969 0.511719L0.234375 1.19531C0.0703125 1.35938 0.0703125 1.66016 0.234375 1.82422L3.1875 4.75L0.234375 7.70312C0.0703125 7.86719 0.0703125 8.16797 0.234375 8.33203L0.917969 9.01562C1.08203 9.17969 1.38281 9.17969 1.54688 9.01562L4.5 6.0625L7.42578 9.01562C7.58984 9.17969 7.89062 9.17969 8.05469 9.01562L8.73828 8.33203C8.90234 8.16797 8.90234 7.86719 8.73828 7.70312L5.78516 4.75Z");
|
|
718
|
-
attr(path, "fill", /*closeButtonColor*/ ctx[
|
|
891
|
+
attr(path, "fill", /*closeButtonColor*/ ctx[3]);
|
|
719
892
|
attr(path, "fill-opacity", "0.8");
|
|
720
893
|
attr(svg, "width", "100%");
|
|
721
894
|
attr(svg, "height", "100%");
|
|
@@ -723,7 +896,7 @@ function create_if_block(ctx) {
|
|
|
723
896
|
attr(svg, "fill", "none");
|
|
724
897
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
725
898
|
attr(button, "class", "close svelte-1bxl6mz");
|
|
726
|
-
attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[
|
|
899
|
+
attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[9] + 1) + "; " + /*_closeStyle*/ ctx[4] + "");
|
|
727
900
|
},
|
|
728
901
|
m(target, anchor) {
|
|
729
902
|
insert(target, button, anchor);
|
|
@@ -731,16 +904,16 @@ function create_if_block(ctx) {
|
|
|
731
904
|
append(svg, path);
|
|
732
905
|
|
|
733
906
|
if (!mounted) {
|
|
734
|
-
dispose = listen(button, "click", /*close*/ ctx[
|
|
907
|
+
dispose = listen(button, "click", /*close*/ ctx[10]);
|
|
735
908
|
mounted = true;
|
|
736
909
|
}
|
|
737
910
|
},
|
|
738
911
|
p(ctx, dirty) {
|
|
739
|
-
if (dirty & /*closeButtonColor*/
|
|
740
|
-
attr(path, "fill", /*closeButtonColor*/ ctx[
|
|
912
|
+
if (dirty & /*closeButtonColor*/ 8) {
|
|
913
|
+
attr(path, "fill", /*closeButtonColor*/ ctx[3]);
|
|
741
914
|
}
|
|
742
915
|
|
|
743
|
-
if (dirty & /*$maximumZindex, _closeStyle*/
|
|
916
|
+
if (dirty & /*$maximumZindex, _closeStyle*/ 528 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[9] + 1) + "; " + /*_closeStyle*/ ctx[4] + "")) {
|
|
744
917
|
attr(button, "style", button_style_value);
|
|
745
918
|
}
|
|
746
919
|
},
|
|
@@ -752,16 +925,15 @@ function create_if_block(ctx) {
|
|
|
752
925
|
};
|
|
753
926
|
}
|
|
754
927
|
|
|
755
|
-
|
|
928
|
+
// (72:0) <Animation {animation}>
|
|
929
|
+
function create_default_slot$1(ctx) {
|
|
756
930
|
let div;
|
|
757
931
|
let t;
|
|
758
932
|
let div_style_value;
|
|
759
933
|
let current;
|
|
760
|
-
let
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
const default_slot_template = /*#slots*/ ctx[15].default;
|
|
764
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
|
|
934
|
+
let if_block = /*closable*/ ctx[2] && create_if_block(ctx);
|
|
935
|
+
const default_slot_template = /*#slots*/ ctx[17].default;
|
|
936
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[19], null);
|
|
765
937
|
|
|
766
938
|
return {
|
|
767
939
|
c() {
|
|
@@ -772,7 +944,7 @@ function create_fragment$8(ctx) {
|
|
|
772
944
|
attr(div, "class", "modal svelte-1bxl6mz");
|
|
773
945
|
attr(div, "role", "dialog");
|
|
774
946
|
attr(div, "aria-modal", "true");
|
|
775
|
-
attr(div, "style", div_style_value = "" + /*pos*/ ctx[
|
|
947
|
+
attr(div, "style", div_style_value = "" + /*pos*/ ctx[7] + " " + /*marginStyle*/ ctx[6] + " " + /*_style*/ ctx[1] + "");
|
|
776
948
|
},
|
|
777
949
|
m(target, anchor) {
|
|
778
950
|
insert(target, div, anchor);
|
|
@@ -783,16 +955,11 @@ function create_fragment$8(ctx) {
|
|
|
783
955
|
default_slot.m(div, null);
|
|
784
956
|
}
|
|
785
957
|
|
|
786
|
-
/*div_binding*/ ctx[
|
|
958
|
+
/*div_binding*/ ctx[18](div);
|
|
787
959
|
current = true;
|
|
788
|
-
|
|
789
|
-
if (!mounted) {
|
|
790
|
-
dispose = listen(window, "keydown", /*handle_keydown*/ ctx[9]);
|
|
791
|
-
mounted = true;
|
|
792
|
-
}
|
|
793
960
|
},
|
|
794
|
-
p(ctx,
|
|
795
|
-
if (/*closable*/ ctx[
|
|
961
|
+
p(ctx, dirty) {
|
|
962
|
+
if (/*closable*/ ctx[2]) {
|
|
796
963
|
if (if_block) {
|
|
797
964
|
if_block.p(ctx, dirty);
|
|
798
965
|
} else {
|
|
@@ -806,21 +973,21 @@ function create_fragment$8(ctx) {
|
|
|
806
973
|
}
|
|
807
974
|
|
|
808
975
|
if (default_slot) {
|
|
809
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
976
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 524288)) {
|
|
810
977
|
update_slot_base(
|
|
811
978
|
default_slot,
|
|
812
979
|
default_slot_template,
|
|
813
980
|
ctx,
|
|
814
|
-
/*$$scope*/ ctx[
|
|
981
|
+
/*$$scope*/ ctx[19],
|
|
815
982
|
!current
|
|
816
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
817
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
983
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[19])
|
|
984
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[19], dirty, null),
|
|
818
985
|
null
|
|
819
986
|
);
|
|
820
987
|
}
|
|
821
988
|
}
|
|
822
989
|
|
|
823
|
-
if (!current || dirty & /*pos, marginStyle, _style*/
|
|
990
|
+
if (!current || dirty & /*pos, marginStyle, _style*/ 194 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[7] + " " + /*marginStyle*/ ctx[6] + " " + /*_style*/ ctx[1] + "")) {
|
|
824
991
|
attr(div, "style", div_style_value);
|
|
825
992
|
}
|
|
826
993
|
},
|
|
@@ -837,7 +1004,80 @@ function create_fragment$8(ctx) {
|
|
|
837
1004
|
if (detaching) detach(div);
|
|
838
1005
|
if (if_block) if_block.d();
|
|
839
1006
|
if (default_slot) default_slot.d(detaching);
|
|
840
|
-
/*div_binding*/ ctx[
|
|
1007
|
+
/*div_binding*/ ctx[18](null);
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
function create_fragment$8(ctx) {
|
|
1013
|
+
let backgroundoverray;
|
|
1014
|
+
let t;
|
|
1015
|
+
let animation_1;
|
|
1016
|
+
let current;
|
|
1017
|
+
let mounted;
|
|
1018
|
+
let dispose;
|
|
1019
|
+
|
|
1020
|
+
backgroundoverray = new BackgroundOverray({
|
|
1021
|
+
props: {
|
|
1022
|
+
backgroundOverray: /*backgroundOverray*/ ctx[8]
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
backgroundoverray.$on("click", /*close*/ ctx[10]);
|
|
1027
|
+
|
|
1028
|
+
animation_1 = new Animation({
|
|
1029
|
+
props: {
|
|
1030
|
+
animation: /*animation*/ ctx[0],
|
|
1031
|
+
$$slots: { default: [create_default_slot$1] },
|
|
1032
|
+
$$scope: { ctx }
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
|
|
1036
|
+
return {
|
|
1037
|
+
c() {
|
|
1038
|
+
create_component(backgroundoverray.$$.fragment);
|
|
1039
|
+
t = space();
|
|
1040
|
+
create_component(animation_1.$$.fragment);
|
|
1041
|
+
},
|
|
1042
|
+
m(target, anchor) {
|
|
1043
|
+
mount_component(backgroundoverray, target, anchor);
|
|
1044
|
+
insert(target, t, anchor);
|
|
1045
|
+
mount_component(animation_1, target, anchor);
|
|
1046
|
+
current = true;
|
|
1047
|
+
|
|
1048
|
+
if (!mounted) {
|
|
1049
|
+
dispose = listen(window, "keydown", /*handle_keydown*/ ctx[11]);
|
|
1050
|
+
mounted = true;
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
p(ctx, [dirty]) {
|
|
1054
|
+
const backgroundoverray_changes = {};
|
|
1055
|
+
if (dirty & /*backgroundOverray*/ 256) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[8];
|
|
1056
|
+
backgroundoverray.$set(backgroundoverray_changes);
|
|
1057
|
+
const animation_1_changes = {};
|
|
1058
|
+
if (dirty & /*animation*/ 1) animation_1_changes.animation = /*animation*/ ctx[0];
|
|
1059
|
+
|
|
1060
|
+
if (dirty & /*$$scope, pos, marginStyle, _style, modal, $maximumZindex, _closeStyle, closeButtonColor, closable*/ 525054) {
|
|
1061
|
+
animation_1_changes.$$scope = { dirty, ctx };
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
animation_1.$set(animation_1_changes);
|
|
1065
|
+
},
|
|
1066
|
+
i(local) {
|
|
1067
|
+
if (current) return;
|
|
1068
|
+
transition_in(backgroundoverray.$$.fragment, local);
|
|
1069
|
+
transition_in(animation_1.$$.fragment, local);
|
|
1070
|
+
current = true;
|
|
1071
|
+
},
|
|
1072
|
+
o(local) {
|
|
1073
|
+
transition_out(backgroundoverray.$$.fragment, local);
|
|
1074
|
+
transition_out(animation_1.$$.fragment, local);
|
|
1075
|
+
current = false;
|
|
1076
|
+
},
|
|
1077
|
+
d(detaching) {
|
|
1078
|
+
destroy_component(backgroundoverray, detaching);
|
|
1079
|
+
if (detaching) detach(t);
|
|
1080
|
+
destroy_component(animation_1, detaching);
|
|
841
1081
|
mounted = false;
|
|
842
1082
|
dispose();
|
|
843
1083
|
}
|
|
@@ -845,35 +1085,21 @@ function create_fragment$8(ctx) {
|
|
|
845
1085
|
}
|
|
846
1086
|
|
|
847
1087
|
function instance$8($$self, $$props, $$invalidate) {
|
|
1088
|
+
let backgroundOverray;
|
|
1089
|
+
let overwritePosition;
|
|
1090
|
+
let overwriteMargin;
|
|
848
1091
|
let pos;
|
|
849
1092
|
let marginStyle;
|
|
850
1093
|
let $maximumZindex;
|
|
851
|
-
component_subscribe($$self, maximumZindex, $$value => $$invalidate(
|
|
1094
|
+
component_subscribe($$self, maximumZindex, $$value => $$invalidate(9, $maximumZindex = $$value));
|
|
852
1095
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1096
|
+
let { placement = DefaultModalPlacement } = $$props;
|
|
1097
|
+
let { animation = 'none' } = $$props;
|
|
1098
|
+
let { _style = '' } = $$props;
|
|
853
1099
|
let { closable = true } = $$props;
|
|
854
1100
|
let { closeButtonColor = '#000000' } = $$props;
|
|
855
1101
|
let { eventName = '' } = $$props;
|
|
856
1102
|
let { eventValue = null } = $$props;
|
|
857
|
-
let { position = 'center' } = $$props;
|
|
858
|
-
const overwritePosition = isPreview() ? 'center' : position;
|
|
859
|
-
|
|
860
|
-
let { margin = {
|
|
861
|
-
left: '0px',
|
|
862
|
-
right: '0px',
|
|
863
|
-
top: '0px',
|
|
864
|
-
bottom: '0px'
|
|
865
|
-
} } = $$props;
|
|
866
|
-
|
|
867
|
-
const overwriteMargin = isPreview()
|
|
868
|
-
? {
|
|
869
|
-
left: '0px',
|
|
870
|
-
right: '0px',
|
|
871
|
-
top: '0px',
|
|
872
|
-
bottom: '0px'
|
|
873
|
-
}
|
|
874
|
-
: margin;
|
|
875
|
-
|
|
876
|
-
let { _style = '' } = $$props;
|
|
877
1103
|
let { _closeStyle = '' } = $$props;
|
|
878
1104
|
|
|
879
1105
|
/**
|
|
@@ -896,43 +1122,80 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
896
1122
|
function div_binding($$value) {
|
|
897
1123
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
898
1124
|
modal = $$value;
|
|
899
|
-
$$invalidate(
|
|
1125
|
+
$$invalidate(5, modal);
|
|
900
1126
|
});
|
|
901
1127
|
}
|
|
902
1128
|
|
|
903
1129
|
$$self.$$set = $$props => {
|
|
904
|
-
if ('
|
|
905
|
-
if ('
|
|
906
|
-
if ('
|
|
907
|
-
if ('
|
|
908
|
-
if ('
|
|
909
|
-
if ('
|
|
910
|
-
if ('
|
|
911
|
-
if ('_closeStyle' in $$props) $$invalidate(
|
|
912
|
-
if ('$$scope' in $$props) $$invalidate(
|
|
1130
|
+
if ('placement' in $$props) $$invalidate(12, placement = $$props.placement);
|
|
1131
|
+
if ('animation' in $$props) $$invalidate(0, animation = $$props.animation);
|
|
1132
|
+
if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
|
|
1133
|
+
if ('closable' in $$props) $$invalidate(2, closable = $$props.closable);
|
|
1134
|
+
if ('closeButtonColor' in $$props) $$invalidate(3, closeButtonColor = $$props.closeButtonColor);
|
|
1135
|
+
if ('eventName' in $$props) $$invalidate(13, eventName = $$props.eventName);
|
|
1136
|
+
if ('eventValue' in $$props) $$invalidate(14, eventValue = $$props.eventValue);
|
|
1137
|
+
if ('_closeStyle' in $$props) $$invalidate(4, _closeStyle = $$props._closeStyle);
|
|
1138
|
+
if ('$$scope' in $$props) $$invalidate(19, $$scope = $$props.$$scope);
|
|
913
1139
|
};
|
|
914
1140
|
|
|
915
|
-
$$
|
|
916
|
-
|
|
1141
|
+
$$self.$$.update = () => {
|
|
1142
|
+
if ($$self.$$.dirty & /*placement*/ 4096) {
|
|
1143
|
+
$$invalidate(8, backgroundOverray = placement && placement.backgroundOverlay != null
|
|
1144
|
+
? placement.backgroundOverlay
|
|
1145
|
+
: DefaultModalPlacement.backgroundOverlay);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
if ($$self.$$.dirty & /*placement*/ 4096) {
|
|
1149
|
+
$$invalidate(16, overwritePosition = isPreview()
|
|
1150
|
+
? 'center'
|
|
1151
|
+
: placement && placement.position != null
|
|
1152
|
+
? placement.position
|
|
1153
|
+
: DefaultModalPlacement.position);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if ($$self.$$.dirty & /*placement*/ 4096) {
|
|
1157
|
+
$$invalidate(15, overwriteMargin = isPreview()
|
|
1158
|
+
? {
|
|
1159
|
+
left: '0px',
|
|
1160
|
+
right: '0px',
|
|
1161
|
+
top: '0px',
|
|
1162
|
+
bottom: '0px'
|
|
1163
|
+
}
|
|
1164
|
+
: placement && placement.margin != null
|
|
1165
|
+
? placement.margin
|
|
1166
|
+
: DefaultModalPlacement.margin);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 65536) {
|
|
1170
|
+
$$invalidate(7, pos = getPositionStyle(overwritePosition));
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
if ($$self.$$.dirty & /*overwriteMargin*/ 32768) {
|
|
1174
|
+
$$invalidate(6, marginStyle = getMarginStyle(overwriteMargin));
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
917
1177
|
|
|
918
1178
|
return [
|
|
1179
|
+
animation,
|
|
1180
|
+
_style,
|
|
919
1181
|
closable,
|
|
920
1182
|
closeButtonColor,
|
|
921
|
-
_style,
|
|
922
1183
|
_closeStyle,
|
|
923
1184
|
modal,
|
|
924
1185
|
marginStyle,
|
|
925
1186
|
pos,
|
|
1187
|
+
backgroundOverray,
|
|
926
1188
|
$maximumZindex,
|
|
927
1189
|
close,
|
|
928
1190
|
handle_keydown,
|
|
1191
|
+
placement,
|
|
929
1192
|
eventName,
|
|
930
1193
|
eventValue,
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
$$scope,
|
|
1194
|
+
overwriteMargin,
|
|
1195
|
+
overwritePosition,
|
|
934
1196
|
slots,
|
|
935
|
-
div_binding
|
|
1197
|
+
div_binding,
|
|
1198
|
+
$$scope
|
|
936
1199
|
];
|
|
937
1200
|
}
|
|
938
1201
|
|
|
@@ -947,14 +1210,14 @@ class Modal extends SvelteComponent {
|
|
|
947
1210
|
create_fragment$8,
|
|
948
1211
|
safe_not_equal,
|
|
949
1212
|
{
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
_closeStyle:
|
|
1213
|
+
placement: 12,
|
|
1214
|
+
animation: 0,
|
|
1215
|
+
_style: 1,
|
|
1216
|
+
closable: 2,
|
|
1217
|
+
closeButtonColor: 3,
|
|
1218
|
+
eventName: 13,
|
|
1219
|
+
eventValue: 14,
|
|
1220
|
+
_closeStyle: 4
|
|
958
1221
|
},
|
|
959
1222
|
add_css$6
|
|
960
1223
|
);
|
|
@@ -1077,12 +1340,12 @@ class Grid extends SvelteComponent {
|
|
|
1077
1340
|
}
|
|
1078
1341
|
}
|
|
1079
1342
|
|
|
1080
|
-
/* src/GridModalState.svelte generated by Svelte v3.44.1 */
|
|
1343
|
+
/* src/components/GridModalState.svelte generated by Svelte v3.44.1 */
|
|
1081
1344
|
|
|
1082
|
-
function
|
|
1345
|
+
function create_default_slot_2(ctx) {
|
|
1083
1346
|
let current;
|
|
1084
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
1085
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
1347
|
+
const default_slot_template = /*#slots*/ ctx[16].default;
|
|
1348
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[17], null);
|
|
1086
1349
|
|
|
1087
1350
|
return {
|
|
1088
1351
|
c() {
|
|
@@ -1097,15 +1360,15 @@ function create_default_slot_3(ctx) {
|
|
|
1097
1360
|
},
|
|
1098
1361
|
p(ctx, dirty) {
|
|
1099
1362
|
if (default_slot) {
|
|
1100
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
1363
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 131072)) {
|
|
1101
1364
|
update_slot_base(
|
|
1102
1365
|
default_slot,
|
|
1103
1366
|
default_slot_template,
|
|
1104
1367
|
ctx,
|
|
1105
|
-
/*$$scope*/ ctx[
|
|
1368
|
+
/*$$scope*/ ctx[17],
|
|
1106
1369
|
!current
|
|
1107
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
1108
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
1370
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[17])
|
|
1371
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[17], dirty, null),
|
|
1109
1372
|
null
|
|
1110
1373
|
);
|
|
1111
1374
|
}
|
|
@@ -1126,20 +1389,20 @@ function create_default_slot_3(ctx) {
|
|
|
1126
1389
|
};
|
|
1127
1390
|
}
|
|
1128
1391
|
|
|
1129
|
-
// (
|
|
1130
|
-
function
|
|
1392
|
+
// (85:2) <Modal {eventName} {eventValue} {closable} {closeButtonColor} {_closeStyle} _style={_modalStyle} on:close={close} >
|
|
1393
|
+
function create_default_slot_1(ctx) {
|
|
1131
1394
|
let grid;
|
|
1132
1395
|
let current;
|
|
1133
1396
|
|
|
1134
1397
|
grid = new Grid({
|
|
1135
1398
|
props: {
|
|
1136
|
-
width: /*width*/ ctx[
|
|
1137
|
-
height: /*height*/ ctx[
|
|
1138
|
-
rows: /*rows*/ ctx[
|
|
1139
|
-
columns: /*columns*/ ctx[
|
|
1140
|
-
gap: /*gap*/ ctx[
|
|
1141
|
-
background: /*background*/ ctx[
|
|
1142
|
-
$$slots: { default: [
|
|
1399
|
+
width: /*width*/ ctx[7],
|
|
1400
|
+
height: /*height*/ ctx[8],
|
|
1401
|
+
rows: /*rows*/ ctx[9],
|
|
1402
|
+
columns: /*columns*/ ctx[10],
|
|
1403
|
+
gap: /*gap*/ ctx[11],
|
|
1404
|
+
background: /*background*/ ctx[12],
|
|
1405
|
+
$$slots: { default: [create_default_slot_2] },
|
|
1143
1406
|
$$scope: { ctx }
|
|
1144
1407
|
}
|
|
1145
1408
|
});
|
|
@@ -1154,14 +1417,14 @@ function create_default_slot_2(ctx) {
|
|
|
1154
1417
|
},
|
|
1155
1418
|
p(ctx, dirty) {
|
|
1156
1419
|
const grid_changes = {};
|
|
1157
|
-
if (dirty & /*width*/
|
|
1158
|
-
if (dirty & /*height*/
|
|
1159
|
-
if (dirty & /*rows*/
|
|
1160
|
-
if (dirty & /*columns*/
|
|
1161
|
-
if (dirty & /*gap*/
|
|
1162
|
-
if (dirty & /*background*/
|
|
1163
|
-
|
|
1164
|
-
if (dirty & /*$$scope*/
|
|
1420
|
+
if (dirty & /*width*/ 128) grid_changes.width = /*width*/ ctx[7];
|
|
1421
|
+
if (dirty & /*height*/ 256) grid_changes.height = /*height*/ ctx[8];
|
|
1422
|
+
if (dirty & /*rows*/ 512) grid_changes.rows = /*rows*/ ctx[9];
|
|
1423
|
+
if (dirty & /*columns*/ 1024) grid_changes.columns = /*columns*/ ctx[10];
|
|
1424
|
+
if (dirty & /*gap*/ 2048) grid_changes.gap = /*gap*/ ctx[11];
|
|
1425
|
+
if (dirty & /*background*/ 4096) grid_changes.background = /*background*/ ctx[12];
|
|
1426
|
+
|
|
1427
|
+
if (dirty & /*$$scope*/ 131072) {
|
|
1165
1428
|
grid_changes.$$scope = { dirty, ctx };
|
|
1166
1429
|
}
|
|
1167
1430
|
|
|
@@ -1182,25 +1445,25 @@ function create_default_slot_2(ctx) {
|
|
|
1182
1445
|
};
|
|
1183
1446
|
}
|
|
1184
1447
|
|
|
1185
|
-
// (
|
|
1186
|
-
function
|
|
1448
|
+
// (84:0) <StateItem {path}>
|
|
1449
|
+
function create_default_slot(ctx) {
|
|
1187
1450
|
let modal;
|
|
1188
1451
|
let current;
|
|
1189
1452
|
|
|
1190
1453
|
modal = new Modal({
|
|
1191
1454
|
props: {
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
_style: /*_modalStyle*/ ctx[
|
|
1198
|
-
$$slots: { default: [
|
|
1455
|
+
eventName: /*eventName*/ ctx[4],
|
|
1456
|
+
eventValue: /*eventValue*/ ctx[5],
|
|
1457
|
+
closable: /*closable*/ ctx[2],
|
|
1458
|
+
closeButtonColor: /*closeButtonColor*/ ctx[3],
|
|
1459
|
+
_closeStyle: /*_closeStyle*/ ctx[6],
|
|
1460
|
+
_style: /*_modalStyle*/ ctx[1],
|
|
1461
|
+
$$slots: { default: [create_default_slot_1] },
|
|
1199
1462
|
$$scope: { ctx }
|
|
1200
1463
|
}
|
|
1201
1464
|
});
|
|
1202
1465
|
|
|
1203
|
-
modal.$on("close", /*close*/ ctx[
|
|
1466
|
+
modal.$on("close", /*close*/ ctx[13]);
|
|
1204
1467
|
|
|
1205
1468
|
return {
|
|
1206
1469
|
c() {
|
|
@@ -1212,12 +1475,14 @@ function create_default_slot_1(ctx) {
|
|
|
1212
1475
|
},
|
|
1213
1476
|
p(ctx, dirty) {
|
|
1214
1477
|
const modal_changes = {};
|
|
1215
|
-
if (dirty & /*
|
|
1216
|
-
if (dirty & /*
|
|
1217
|
-
if (dirty & /*
|
|
1218
|
-
if (dirty & /*
|
|
1219
|
-
|
|
1220
|
-
if (dirty &
|
|
1478
|
+
if (dirty & /*eventName*/ 16) modal_changes.eventName = /*eventName*/ ctx[4];
|
|
1479
|
+
if (dirty & /*eventValue*/ 32) modal_changes.eventValue = /*eventValue*/ ctx[5];
|
|
1480
|
+
if (dirty & /*closable*/ 4) modal_changes.closable = /*closable*/ ctx[2];
|
|
1481
|
+
if (dirty & /*closeButtonColor*/ 8) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[3];
|
|
1482
|
+
if (dirty & /*_closeStyle*/ 64) modal_changes._closeStyle = /*_closeStyle*/ ctx[6];
|
|
1483
|
+
if (dirty & /*_modalStyle*/ 2) modal_changes._style = /*_modalStyle*/ ctx[1];
|
|
1484
|
+
|
|
1485
|
+
if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 139136) {
|
|
1221
1486
|
modal_changes.$$scope = { dirty, ctx };
|
|
1222
1487
|
}
|
|
1223
1488
|
|
|
@@ -1238,70 +1503,6 @@ function create_default_slot_1(ctx) {
|
|
|
1238
1503
|
};
|
|
1239
1504
|
}
|
|
1240
1505
|
|
|
1241
|
-
// (101:0) <StateItem {path}>
|
|
1242
|
-
function create_default_slot(ctx) {
|
|
1243
|
-
let backgroundoverray;
|
|
1244
|
-
let t;
|
|
1245
|
-
let animation_1;
|
|
1246
|
-
let current;
|
|
1247
|
-
|
|
1248
|
-
backgroundoverray = new BackgroundOverray({
|
|
1249
|
-
props: {
|
|
1250
|
-
backgroundOverray: /*_backgroundOverray*/ ctx[15]
|
|
1251
|
-
}
|
|
1252
|
-
});
|
|
1253
|
-
|
|
1254
|
-
backgroundoverray.$on("click", /*close*/ ctx[12]);
|
|
1255
|
-
|
|
1256
|
-
animation_1 = new Animation({
|
|
1257
|
-
props: {
|
|
1258
|
-
animation: /*animation*/ ctx[1],
|
|
1259
|
-
$$slots: { default: [create_default_slot_1] },
|
|
1260
|
-
$$scope: { ctx }
|
|
1261
|
-
}
|
|
1262
|
-
});
|
|
1263
|
-
|
|
1264
|
-
return {
|
|
1265
|
-
c() {
|
|
1266
|
-
create_component(backgroundoverray.$$.fragment);
|
|
1267
|
-
t = space();
|
|
1268
|
-
create_component(animation_1.$$.fragment);
|
|
1269
|
-
},
|
|
1270
|
-
m(target, anchor) {
|
|
1271
|
-
mount_component(backgroundoverray, target, anchor);
|
|
1272
|
-
insert(target, t, anchor);
|
|
1273
|
-
mount_component(animation_1, target, anchor);
|
|
1274
|
-
current = true;
|
|
1275
|
-
},
|
|
1276
|
-
p(ctx, dirty) {
|
|
1277
|
-
const animation_1_changes = {};
|
|
1278
|
-
if (dirty & /*animation*/ 2) animation_1_changes.animation = /*animation*/ ctx[1];
|
|
1279
|
-
|
|
1280
|
-
if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198396) {
|
|
1281
|
-
animation_1_changes.$$scope = { dirty, ctx };
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
animation_1.$set(animation_1_changes);
|
|
1285
|
-
},
|
|
1286
|
-
i(local) {
|
|
1287
|
-
if (current) return;
|
|
1288
|
-
transition_in(backgroundoverray.$$.fragment, local);
|
|
1289
|
-
transition_in(animation_1.$$.fragment, local);
|
|
1290
|
-
current = true;
|
|
1291
|
-
},
|
|
1292
|
-
o(local) {
|
|
1293
|
-
transition_out(backgroundoverray.$$.fragment, local);
|
|
1294
|
-
transition_out(animation_1.$$.fragment, local);
|
|
1295
|
-
current = false;
|
|
1296
|
-
},
|
|
1297
|
-
d(detaching) {
|
|
1298
|
-
destroy_component(backgroundoverray, detaching);
|
|
1299
|
-
if (detaching) detach(t);
|
|
1300
|
-
destroy_component(animation_1, detaching);
|
|
1301
|
-
}
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
1506
|
function create_fragment$6(ctx) {
|
|
1306
1507
|
let stateitem;
|
|
1307
1508
|
let current;
|
|
@@ -1326,7 +1527,7 @@ function create_fragment$6(ctx) {
|
|
|
1326
1527
|
const stateitem_changes = {};
|
|
1327
1528
|
if (dirty & /*path*/ 1) stateitem_changes.path = /*path*/ ctx[0];
|
|
1328
1529
|
|
|
1329
|
-
if (dirty & /*$$scope,
|
|
1530
|
+
if (dirty & /*$$scope, eventName, eventValue, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 139262) {
|
|
1330
1531
|
stateitem_changes.$$scope = { dirty, ctx };
|
|
1331
1532
|
}
|
|
1332
1533
|
|
|
@@ -1351,11 +1552,9 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
1351
1552
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1352
1553
|
let { path } = $$props;
|
|
1353
1554
|
let { placement = DefaultModalPlacement } = $$props;
|
|
1354
|
-
let { position = 'center' } = $$props;
|
|
1355
1555
|
let { animation = 'none' } = $$props;
|
|
1356
1556
|
let { _modalStyle = '' } = $$props;
|
|
1357
1557
|
let { closable = true } = $$props;
|
|
1358
|
-
let { backgroundOverray = false } = $$props;
|
|
1359
1558
|
let { closeButtonColor = '#000000' } = $$props;
|
|
1360
1559
|
let { eventName = '' } = $$props;
|
|
1361
1560
|
let { eventValue = null } = $$props;
|
|
@@ -1373,44 +1572,35 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
1373
1572
|
const dispatch = createEventDispatcher();
|
|
1374
1573
|
|
|
1375
1574
|
const close = () => {
|
|
1376
|
-
if (eventName) {
|
|
1377
|
-
send_event(eventName, eventValue);
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
1575
|
dispatch('close');
|
|
1381
1576
|
};
|
|
1382
1577
|
|
|
1383
|
-
const _position = placement.position ?? position;
|
|
1384
|
-
const margin = placement.margin;
|
|
1385
|
-
const _backgroundOverray = placement.backgroundOverlay ?? backgroundOverray;
|
|
1386
|
-
|
|
1387
1578
|
$$self.$$set = $$props => {
|
|
1388
1579
|
if ('path' in $$props) $$invalidate(0, path = $$props.path);
|
|
1389
|
-
if ('placement' in $$props) $$invalidate(
|
|
1390
|
-
if ('
|
|
1391
|
-
if ('
|
|
1392
|
-
if ('
|
|
1393
|
-
if ('
|
|
1394
|
-
if ('
|
|
1395
|
-
if ('
|
|
1396
|
-
if ('
|
|
1397
|
-
if ('
|
|
1398
|
-
if ('
|
|
1399
|
-
if ('
|
|
1400
|
-
if ('
|
|
1401
|
-
if ('
|
|
1402
|
-
if ('
|
|
1403
|
-
if ('
|
|
1404
|
-
if ('background' in $$props) $$invalidate(11, background = $$props.background);
|
|
1405
|
-
if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
|
|
1580
|
+
if ('placement' in $$props) $$invalidate(14, placement = $$props.placement);
|
|
1581
|
+
if ('animation' in $$props) $$invalidate(15, animation = $$props.animation);
|
|
1582
|
+
if ('_modalStyle' in $$props) $$invalidate(1, _modalStyle = $$props._modalStyle);
|
|
1583
|
+
if ('closable' in $$props) $$invalidate(2, closable = $$props.closable);
|
|
1584
|
+
if ('closeButtonColor' in $$props) $$invalidate(3, closeButtonColor = $$props.closeButtonColor);
|
|
1585
|
+
if ('eventName' in $$props) $$invalidate(4, eventName = $$props.eventName);
|
|
1586
|
+
if ('eventValue' in $$props) $$invalidate(5, eventValue = $$props.eventValue);
|
|
1587
|
+
if ('_closeStyle' in $$props) $$invalidate(6, _closeStyle = $$props._closeStyle);
|
|
1588
|
+
if ('width' in $$props) $$invalidate(7, width = $$props.width);
|
|
1589
|
+
if ('height' in $$props) $$invalidate(8, height = $$props.height);
|
|
1590
|
+
if ('rows' in $$props) $$invalidate(9, rows = $$props.rows);
|
|
1591
|
+
if ('columns' in $$props) $$invalidate(10, columns = $$props.columns);
|
|
1592
|
+
if ('gap' in $$props) $$invalidate(11, gap = $$props.gap);
|
|
1593
|
+
if ('background' in $$props) $$invalidate(12, background = $$props.background);
|
|
1594
|
+
if ('$$scope' in $$props) $$invalidate(17, $$scope = $$props.$$scope);
|
|
1406
1595
|
};
|
|
1407
1596
|
|
|
1408
1597
|
return [
|
|
1409
1598
|
path,
|
|
1410
|
-
animation,
|
|
1411
1599
|
_modalStyle,
|
|
1412
1600
|
closable,
|
|
1413
1601
|
closeButtonColor,
|
|
1602
|
+
eventName,
|
|
1603
|
+
eventValue,
|
|
1414
1604
|
_closeStyle,
|
|
1415
1605
|
width,
|
|
1416
1606
|
height,
|
|
@@ -1419,14 +1609,8 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
1419
1609
|
gap,
|
|
1420
1610
|
background,
|
|
1421
1611
|
close,
|
|
1422
|
-
_position,
|
|
1423
|
-
margin,
|
|
1424
|
-
_backgroundOverray,
|
|
1425
1612
|
placement,
|
|
1426
|
-
|
|
1427
|
-
backgroundOverray,
|
|
1428
|
-
eventName,
|
|
1429
|
-
eventValue,
|
|
1613
|
+
animation,
|
|
1430
1614
|
slots,
|
|
1431
1615
|
$$scope
|
|
1432
1616
|
];
|
|
@@ -1438,27 +1622,25 @@ class GridModalState extends SvelteComponent {
|
|
|
1438
1622
|
|
|
1439
1623
|
init(this, options, instance$6, create_fragment$6, safe_not_equal, {
|
|
1440
1624
|
path: 0,
|
|
1441
|
-
placement:
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
gap: 10,
|
|
1456
|
-
background: 11
|
|
1625
|
+
placement: 14,
|
|
1626
|
+
animation: 15,
|
|
1627
|
+
_modalStyle: 1,
|
|
1628
|
+
closable: 2,
|
|
1629
|
+
closeButtonColor: 3,
|
|
1630
|
+
eventName: 4,
|
|
1631
|
+
eventValue: 5,
|
|
1632
|
+
_closeStyle: 6,
|
|
1633
|
+
width: 7,
|
|
1634
|
+
height: 8,
|
|
1635
|
+
rows: 9,
|
|
1636
|
+
columns: 10,
|
|
1637
|
+
gap: 11,
|
|
1638
|
+
background: 12
|
|
1457
1639
|
});
|
|
1458
1640
|
}
|
|
1459
1641
|
}
|
|
1460
1642
|
|
|
1461
|
-
/* src/GridItem.svelte generated by Svelte v3.44.1 */
|
|
1643
|
+
/* src/components/GridItem.svelte generated by Svelte v3.44.1 */
|
|
1462
1644
|
|
|
1463
1645
|
function add_css$5(target) {
|
|
1464
1646
|
append_styles(target, "svelte-g0rfgr", ".grid-item.svelte-g0rfgr{word-break:break-all}");
|
|
@@ -1916,38 +2098,36 @@ function create_fragment$1(ctx) {
|
|
|
1916
2098
|
}
|
|
1917
2099
|
|
|
1918
2100
|
function instance$1($$self, $$props, $$invalidate) {
|
|
1919
|
-
let { text = '
|
|
2101
|
+
let { text = 'ボタンラベル' } = $$props;
|
|
1920
2102
|
|
|
1921
2103
|
/**
|
|
1922
2104
|
* {
|
|
1923
|
-
* "title": {"ja": "
|
|
1924
|
-
* "folder": {"ja": "
|
|
2105
|
+
* "title": {"ja": "イベントタイプ", "en": "Event Type"},
|
|
2106
|
+
* "folder": {"ja": "クリックイベント", "en": "Click Event"}
|
|
1925
2107
|
* }
|
|
1926
2108
|
*/
|
|
1927
2109
|
const dispatch = createEventDispatcher();
|
|
1928
2110
|
|
|
1929
2111
|
const click = () => {
|
|
1930
2112
|
if (eventName) {
|
|
1931
|
-
send_event(eventName
|
|
2113
|
+
send_event(eventName);
|
|
1932
2114
|
}
|
|
1933
2115
|
|
|
1934
2116
|
dispatch('click');
|
|
1935
2117
|
};
|
|
1936
2118
|
|
|
1937
2119
|
let { eventName = '' } = $$props;
|
|
1938
|
-
let { eventValue = null } = $$props;
|
|
1939
2120
|
let { _buttonStyle = 'color:#ffffff; font-size:14px; font-weight:bold; justify-content:center; align-items:center; padding:1px 6px 1px 6px;' } = $$props;
|
|
1940
2121
|
let { _style = 'background-color: #000000; border-radius:4px;' } = $$props;
|
|
1941
2122
|
|
|
1942
2123
|
$$self.$$set = $$props => {
|
|
1943
2124
|
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
|
1944
2125
|
if ('eventName' in $$props) $$invalidate(4, eventName = $$props.eventName);
|
|
1945
|
-
if ('eventValue' in $$props) $$invalidate(5, eventValue = $$props.eventValue);
|
|
1946
2126
|
if ('_buttonStyle' in $$props) $$invalidate(1, _buttonStyle = $$props._buttonStyle);
|
|
1947
2127
|
if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
|
|
1948
2128
|
};
|
|
1949
2129
|
|
|
1950
|
-
return [text, _buttonStyle, _style, click, eventName
|
|
2130
|
+
return [text, _buttonStyle, _style, click, eventName];
|
|
1951
2131
|
}
|
|
1952
2132
|
|
|
1953
2133
|
class TextButtonBlock extends SvelteComponent {
|
|
@@ -1963,7 +2143,6 @@ class TextButtonBlock extends SvelteComponent {
|
|
|
1963
2143
|
{
|
|
1964
2144
|
text: 0,
|
|
1965
2145
|
eventName: 4,
|
|
1966
|
-
eventValue: 5,
|
|
1967
2146
|
_buttonStyle: 1,
|
|
1968
2147
|
_style: 2
|
|
1969
2148
|
},
|
|
@@ -2036,36 +2215,35 @@ function create_fragment(ctx) {
|
|
|
2036
2215
|
}
|
|
2037
2216
|
|
|
2038
2217
|
function instance($$self, $$props, $$invalidate) {
|
|
2039
|
-
let { src = '' } = $$props;
|
|
2040
|
-
let { alt = '' } = $$props;
|
|
2041
|
-
let { eventName = '' } = $$props;
|
|
2042
|
-
let { eventValue = null } = $$props;
|
|
2043
|
-
let { _imageStyle = 'object-fit: contain;' } = $$props;
|
|
2044
|
-
let { _style = '' } = $$props;
|
|
2218
|
+
let { src = 'https://admin.karte.io/action-editor2/public/images/no_image_en.svg' } = $$props;
|
|
2219
|
+
let { alt = 'No Image' } = $$props;
|
|
2045
2220
|
|
|
2046
2221
|
/**
|
|
2047
|
-
* {"title": {"ja": "
|
|
2222
|
+
* {"title": {"ja": "イベントタイプ", "en": "Event Type"}, "folder": {"ja": "クリックイベント", "en": "Click Event"}}
|
|
2048
2223
|
*/
|
|
2049
2224
|
const dispatch = createEventDispatcher();
|
|
2050
2225
|
|
|
2051
2226
|
const click = () => {
|
|
2052
2227
|
if (eventName) {
|
|
2053
|
-
send_event(eventName
|
|
2228
|
+
send_event(eventName);
|
|
2054
2229
|
}
|
|
2055
2230
|
|
|
2056
2231
|
dispatch('click');
|
|
2057
2232
|
};
|
|
2058
2233
|
|
|
2234
|
+
let { eventName = '' } = $$props;
|
|
2235
|
+
let { _imageStyle = 'object-fit: contain;' } = $$props;
|
|
2236
|
+
let { _style = '' } = $$props;
|
|
2237
|
+
|
|
2059
2238
|
$$self.$$set = $$props => {
|
|
2060
2239
|
if ('src' in $$props) $$invalidate(0, src = $$props.src);
|
|
2061
2240
|
if ('alt' in $$props) $$invalidate(1, alt = $$props.alt);
|
|
2062
2241
|
if ('eventName' in $$props) $$invalidate(5, eventName = $$props.eventName);
|
|
2063
|
-
if ('eventValue' in $$props) $$invalidate(6, eventValue = $$props.eventValue);
|
|
2064
2242
|
if ('_imageStyle' in $$props) $$invalidate(2, _imageStyle = $$props._imageStyle);
|
|
2065
2243
|
if ('_style' in $$props) $$invalidate(3, _style = $$props._style);
|
|
2066
2244
|
};
|
|
2067
2245
|
|
|
2068
|
-
return [src, alt, _imageStyle, _style, click, eventName
|
|
2246
|
+
return [src, alt, _imageStyle, _style, click, eventName];
|
|
2069
2247
|
}
|
|
2070
2248
|
|
|
2071
2249
|
class ImageBlock extends SvelteComponent {
|
|
@@ -2082,7 +2260,6 @@ class ImageBlock extends SvelteComponent {
|
|
|
2082
2260
|
src: 0,
|
|
2083
2261
|
alt: 1,
|
|
2084
2262
|
eventName: 5,
|
|
2085
|
-
eventValue: 6,
|
|
2086
2263
|
_imageStyle: 2,
|
|
2087
2264
|
_style: 3
|
|
2088
2265
|
},
|
|
@@ -2091,4 +2268,4 @@ class ImageBlock extends SvelteComponent {
|
|
|
2091
2268
|
}
|
|
2092
2269
|
}
|
|
2093
2270
|
|
|
2094
|
-
export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, TextBlock, TextButtonBlock, closeApp, closed, finalize, getMarginStyle, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
|
|
2271
|
+
export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, TextBlock, TextButtonBlock, closeApp, closed, collection, createFog, embed, ensureModalRoot, finalize, getMarginStyle, getPositionStyle, h, handleFocus, handleKeydown, hasSuffix, hideOnScroll, hideOnTime, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, showOnScroll, showOnTime, state, toBr };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaidev/karte-action-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"author": "Plaid Inc.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"node-fetch": "2.6.7",
|
|
44
44
|
"picocolors": "^1.0.0",
|
|
45
45
|
"playwright": "^1.23.4",
|
|
46
|
+
"preact": "10.5.7",
|
|
46
47
|
"rimraf": "^3.0.2",
|
|
47
48
|
"rollup": "^2.75.7",
|
|
48
49
|
"rollup-plugin-http-resolve": "4.0.1-alpha.0",
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
"test:watch": "vitest test",
|
|
75
76
|
"test:ui": "vitest test --ui",
|
|
76
77
|
"test:e2e": "vitest run spec",
|
|
78
|
+
"test:update": "vitest -u",
|
|
77
79
|
"coverage": "vitest run test --coverage"
|
|
78
80
|
},
|
|
79
81
|
"publishConfig": {
|