@plaidev/karte-action-sdk 1.0.26 → 1.0.27
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 +20 -9
- package/dist/index.es.js +129 -128
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -140,13 +140,6 @@ declare const ModalPositionTranslations: {
|
|
|
140
140
|
en: string;
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
-
type ModalMarginSides = "left" | "right" | "top" | "bottom";
|
|
144
|
-
type ModalMargin<T extends ModalMarginSides = ModalMarginSides> = {
|
|
145
|
-
side: T;
|
|
146
|
-
length: string;
|
|
147
|
-
};
|
|
148
|
-
type ModalMarginX = ModalMargin<"left" | "right">;
|
|
149
|
-
type ModalMarginY = ModalMargin<"top" | "bottom">;
|
|
150
143
|
declare const ModalMarginTranslations: {
|
|
151
144
|
left: {
|
|
152
145
|
ja: string;
|
|
@@ -165,6 +158,18 @@ declare const ModalMarginTranslations: {
|
|
|
165
158
|
en: string;
|
|
166
159
|
};
|
|
167
160
|
};
|
|
161
|
+
type ModalMargin = {
|
|
162
|
+
left: string;
|
|
163
|
+
right: string;
|
|
164
|
+
top: string;
|
|
165
|
+
bottom: string;
|
|
166
|
+
};
|
|
167
|
+
type ModalPlacement = {
|
|
168
|
+
position: ModalPosition;
|
|
169
|
+
margin: ModalMargin;
|
|
170
|
+
backgroundOverlay: boolean;
|
|
171
|
+
};
|
|
172
|
+
declare const DefaultModalPlacement: ModalPlacement;
|
|
168
173
|
type LongText = string;
|
|
169
174
|
type Url = string;
|
|
170
175
|
type Image = string;
|
|
@@ -204,6 +209,12 @@ declare const Repeats: readonly [
|
|
|
204
209
|
"no-repeat"
|
|
205
210
|
];
|
|
206
211
|
type Repeat = typeof Repeats[number];
|
|
212
|
+
declare const BackgroundSizes: readonly [
|
|
213
|
+
"cover",
|
|
214
|
+
"contain",
|
|
215
|
+
"auto"
|
|
216
|
+
];
|
|
217
|
+
type BackgroundSize = typeof BackgroundSizes[number];
|
|
207
218
|
type Style = string;
|
|
208
219
|
type StateName = string;
|
|
209
220
|
declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
|
|
@@ -212,14 +223,14 @@ declare const handleKeydown: (handlers: {
|
|
|
212
223
|
[eventName: string]: (e: any) => void;
|
|
213
224
|
}) => (e: any) => void;
|
|
214
225
|
declare const getPositionStyle: (position: ModalPosition) => string;
|
|
215
|
-
declare const getMarginStyle: (
|
|
226
|
+
declare const getMarginStyle: (margin: ModalMargin) => string;
|
|
216
227
|
declare function onScroll(fn: Function, rate: number): () => void;
|
|
217
228
|
declare function onTime(fn: Function, time: number): () => void;
|
|
218
229
|
declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
|
|
219
230
|
declare function toBr(text: string): string;
|
|
220
231
|
declare function randStr(digit?: number): string;
|
|
221
232
|
declare const _default: "dummy";
|
|
222
|
-
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,
|
|
233
|
+
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 };
|
|
223
234
|
export { default as State } from './State.svelte';
|
|
224
235
|
export { default as GridModalState } from './GridModalState.svelte';
|
|
225
236
|
export { default as GridItem } from './GridItem.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, element, attr, listen,
|
|
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, svg_element, binding_callbacks, src_url_equal } from 'svelte/internal';
|
|
3
3
|
import { createEventDispatcher, onDestroy, onMount, setContext, getContext } from 'svelte';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -66,16 +66,7 @@ const getPositionStyle = (position) => {
|
|
|
66
66
|
}, '')
|
|
67
67
|
.trimStart();
|
|
68
68
|
};
|
|
69
|
-
const getMarginStyle = (
|
|
70
|
-
const margin = {
|
|
71
|
-
left: '0',
|
|
72
|
-
right: '0',
|
|
73
|
-
top: '0',
|
|
74
|
-
bottom: '0',
|
|
75
|
-
};
|
|
76
|
-
modalMargins.forEach(modalMargin => {
|
|
77
|
-
margin[modalMargin.side] = modalMargin.length;
|
|
78
|
-
});
|
|
69
|
+
const getMarginStyle = (margin) => {
|
|
79
70
|
return `margin: ${margin.top} ${margin.right} ${margin.bottom} ${margin.left};`;
|
|
80
71
|
};
|
|
81
72
|
function onScroll(fn, rate) {
|
|
@@ -286,27 +277,38 @@ const ModalPositionTranslations = {
|
|
|
286
277
|
};
|
|
287
278
|
const ModalMarginTranslations = {
|
|
288
279
|
left: {
|
|
289
|
-
ja: '
|
|
280
|
+
ja: '左側からの距離',
|
|
290
281
|
en: 'Left',
|
|
291
282
|
},
|
|
292
283
|
right: {
|
|
293
|
-
ja: '
|
|
284
|
+
ja: '右側からの距離',
|
|
294
285
|
en: 'Right',
|
|
295
286
|
},
|
|
296
287
|
top: {
|
|
297
|
-
ja: '
|
|
288
|
+
ja: '上側からの距離',
|
|
298
289
|
en: 'Top',
|
|
299
290
|
},
|
|
300
291
|
bottom: {
|
|
301
|
-
ja: '
|
|
292
|
+
ja: '下側からの距離',
|
|
302
293
|
en: 'Bottom',
|
|
303
294
|
},
|
|
304
295
|
};
|
|
296
|
+
const DefaultModalPlacement = {
|
|
297
|
+
position: 'center',
|
|
298
|
+
margin: {
|
|
299
|
+
left: '0px',
|
|
300
|
+
right: '0px',
|
|
301
|
+
top: '0px',
|
|
302
|
+
bottom: '0px',
|
|
303
|
+
},
|
|
304
|
+
backgroundOverlay: true,
|
|
305
|
+
};
|
|
305
306
|
const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
|
|
306
307
|
const Justifies = ['flex-start', 'center', 'flex-end'];
|
|
307
308
|
const Alignments = ['flex-start', 'center', 'flex-end'];
|
|
308
309
|
const ObjectFits = ['fill', 'contain', 'cover'];
|
|
309
310
|
const Repeats = ['repeat', 'space', 'round', 'no-repeat'];
|
|
311
|
+
const BackgroundSizes = ['cover', 'contain', 'auto'];
|
|
310
312
|
|
|
311
313
|
/* src/components/Normalize.svelte generated by Svelte v3.44.1 */
|
|
312
314
|
|
|
@@ -698,7 +700,7 @@ function add_css$6(target) {
|
|
|
698
700
|
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)}");
|
|
699
701
|
}
|
|
700
702
|
|
|
701
|
-
// (
|
|
703
|
+
// (78:2) {#if closable}
|
|
702
704
|
function create_if_block(ctx) {
|
|
703
705
|
let button;
|
|
704
706
|
let svg;
|
|
@@ -758,8 +760,8 @@ function create_fragment$8(ctx) {
|
|
|
758
760
|
let mounted;
|
|
759
761
|
let dispose;
|
|
760
762
|
let if_block = /*closable*/ ctx[0] && create_if_block(ctx);
|
|
761
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
762
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
763
|
+
const default_slot_template = /*#slots*/ ctx[15].default;
|
|
764
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
|
|
763
765
|
|
|
764
766
|
return {
|
|
765
767
|
c() {
|
|
@@ -770,7 +772,7 @@ function create_fragment$8(ctx) {
|
|
|
770
772
|
attr(div, "class", "modal svelte-1bxl6mz");
|
|
771
773
|
attr(div, "role", "dialog");
|
|
772
774
|
attr(div, "aria-modal", "true");
|
|
773
|
-
attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*
|
|
775
|
+
attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
|
|
774
776
|
},
|
|
775
777
|
m(target, anchor) {
|
|
776
778
|
insert(target, div, anchor);
|
|
@@ -781,7 +783,7 @@ function create_fragment$8(ctx) {
|
|
|
781
783
|
default_slot.m(div, null);
|
|
782
784
|
}
|
|
783
785
|
|
|
784
|
-
/*div_binding*/ ctx[
|
|
786
|
+
/*div_binding*/ ctx[16](div);
|
|
785
787
|
current = true;
|
|
786
788
|
|
|
787
789
|
if (!mounted) {
|
|
@@ -804,21 +806,21 @@ function create_fragment$8(ctx) {
|
|
|
804
806
|
}
|
|
805
807
|
|
|
806
808
|
if (default_slot) {
|
|
807
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
809
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 16384)) {
|
|
808
810
|
update_slot_base(
|
|
809
811
|
default_slot,
|
|
810
812
|
default_slot_template,
|
|
811
813
|
ctx,
|
|
812
|
-
/*$$scope*/ ctx[
|
|
814
|
+
/*$$scope*/ ctx[14],
|
|
813
815
|
!current
|
|
814
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
815
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
816
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[14])
|
|
817
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[14], dirty, null),
|
|
816
818
|
null
|
|
817
819
|
);
|
|
818
820
|
}
|
|
819
821
|
}
|
|
820
822
|
|
|
821
|
-
if (!current || dirty & /*pos,
|
|
823
|
+
if (!current || dirty & /*pos, marginStyle, _style*/ 100 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
|
|
822
824
|
attr(div, "style", div_style_value);
|
|
823
825
|
}
|
|
824
826
|
},
|
|
@@ -835,7 +837,7 @@ function create_fragment$8(ctx) {
|
|
|
835
837
|
if (detaching) detach(div);
|
|
836
838
|
if (if_block) if_block.d();
|
|
837
839
|
if (default_slot) default_slot.d(detaching);
|
|
838
|
-
/*div_binding*/ ctx[
|
|
840
|
+
/*div_binding*/ ctx[16](null);
|
|
839
841
|
mounted = false;
|
|
840
842
|
dispose();
|
|
841
843
|
}
|
|
@@ -844,7 +846,7 @@ function create_fragment$8(ctx) {
|
|
|
844
846
|
|
|
845
847
|
function instance$8($$self, $$props, $$invalidate) {
|
|
846
848
|
let pos;
|
|
847
|
-
let
|
|
849
|
+
let marginStyle;
|
|
848
850
|
let $maximumZindex;
|
|
849
851
|
component_subscribe($$self, maximumZindex, $$value => $$invalidate(7, $maximumZindex = $$value));
|
|
850
852
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
@@ -854,8 +856,14 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
854
856
|
let { eventValue = null } = $$props;
|
|
855
857
|
let { position = 'center' } = $$props;
|
|
856
858
|
const overwritePosition = isPreview() ? 'center' : position;
|
|
857
|
-
|
|
858
|
-
let {
|
|
859
|
+
|
|
860
|
+
let { margin = {
|
|
861
|
+
left: '0px',
|
|
862
|
+
right: '0px',
|
|
863
|
+
top: '0px',
|
|
864
|
+
bottom: '0px'
|
|
865
|
+
} } = $$props;
|
|
866
|
+
|
|
859
867
|
let { _style = '' } = $$props;
|
|
860
868
|
let { _closeStyle = '' } = $$props;
|
|
861
869
|
|
|
@@ -889,16 +897,15 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
889
897
|
if ('eventName' in $$props) $$invalidate(10, eventName = $$props.eventName);
|
|
890
898
|
if ('eventValue' in $$props) $$invalidate(11, eventValue = $$props.eventValue);
|
|
891
899
|
if ('position' in $$props) $$invalidate(12, position = $$props.position);
|
|
892
|
-
if ('
|
|
893
|
-
if ('modalMarginY' in $$props) $$invalidate(14, modalMarginY = $$props.modalMarginY);
|
|
900
|
+
if ('margin' in $$props) $$invalidate(13, margin = $$props.margin);
|
|
894
901
|
if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
|
|
895
902
|
if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
|
|
896
|
-
if ('$$scope' in $$props) $$invalidate(
|
|
903
|
+
if ('$$scope' in $$props) $$invalidate(14, $$scope = $$props.$$scope);
|
|
897
904
|
};
|
|
898
905
|
|
|
899
906
|
$$self.$$.update = () => {
|
|
900
|
-
if ($$self.$$.dirty & /*
|
|
901
|
-
$$invalidate(5,
|
|
907
|
+
if ($$self.$$.dirty & /*margin*/ 8192) {
|
|
908
|
+
$$invalidate(5, marginStyle = getMarginStyle(margin));
|
|
902
909
|
}
|
|
903
910
|
};
|
|
904
911
|
|
|
@@ -910,7 +917,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
910
917
|
_style,
|
|
911
918
|
_closeStyle,
|
|
912
919
|
modal,
|
|
913
|
-
|
|
920
|
+
marginStyle,
|
|
914
921
|
pos,
|
|
915
922
|
$maximumZindex,
|
|
916
923
|
close,
|
|
@@ -918,8 +925,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
918
925
|
eventName,
|
|
919
926
|
eventValue,
|
|
920
927
|
position,
|
|
921
|
-
|
|
922
|
-
modalMarginY,
|
|
928
|
+
margin,
|
|
923
929
|
$$scope,
|
|
924
930
|
slots,
|
|
925
931
|
div_binding
|
|
@@ -942,8 +948,7 @@ class Modal extends SvelteComponent {
|
|
|
942
948
|
eventName: 10,
|
|
943
949
|
eventValue: 11,
|
|
944
950
|
position: 12,
|
|
945
|
-
|
|
946
|
-
modalMarginY: 14,
|
|
951
|
+
margin: 13,
|
|
947
952
|
_style: 2,
|
|
948
953
|
_closeStyle: 3
|
|
949
954
|
},
|
|
@@ -1072,8 +1077,8 @@ class Grid extends SvelteComponent {
|
|
|
1072
1077
|
|
|
1073
1078
|
function create_default_slot_3(ctx) {
|
|
1074
1079
|
let current;
|
|
1075
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
1076
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
1080
|
+
const default_slot_template = /*#slots*/ ctx[21].default;
|
|
1081
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
|
|
1077
1082
|
|
|
1078
1083
|
return {
|
|
1079
1084
|
c() {
|
|
@@ -1088,15 +1093,15 @@ function create_default_slot_3(ctx) {
|
|
|
1088
1093
|
},
|
|
1089
1094
|
p(ctx, dirty) {
|
|
1090
1095
|
if (default_slot) {
|
|
1091
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
1096
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
|
|
1092
1097
|
update_slot_base(
|
|
1093
1098
|
default_slot,
|
|
1094
1099
|
default_slot_template,
|
|
1095
1100
|
ctx,
|
|
1096
|
-
/*$$scope*/ ctx[
|
|
1101
|
+
/*$$scope*/ ctx[22],
|
|
1097
1102
|
!current
|
|
1098
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
1099
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
1103
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
|
|
1104
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
|
|
1100
1105
|
null
|
|
1101
1106
|
);
|
|
1102
1107
|
}
|
|
@@ -1117,19 +1122,19 @@ function create_default_slot_3(ctx) {
|
|
|
1117
1122
|
};
|
|
1118
1123
|
}
|
|
1119
1124
|
|
|
1120
|
-
// (104:4) <Modal {closable} {closeButtonColor} {_closeStyle}
|
|
1125
|
+
// (104:4) <Modal {closable} {closeButtonColor} {_closeStyle} position={_position} {margin} _style={_modalStyle} on:close={close} >
|
|
1121
1126
|
function create_default_slot_2(ctx) {
|
|
1122
1127
|
let grid;
|
|
1123
1128
|
let current;
|
|
1124
1129
|
|
|
1125
1130
|
grid = new Grid({
|
|
1126
1131
|
props: {
|
|
1127
|
-
width: /*width*/ ctx[
|
|
1128
|
-
height: /*height*/ ctx[
|
|
1129
|
-
rows: /*rows*/ ctx[
|
|
1130
|
-
columns: /*columns*/ ctx[
|
|
1131
|
-
gap: /*gap*/ ctx[
|
|
1132
|
-
background: /*background*/ ctx[
|
|
1132
|
+
width: /*width*/ ctx[6],
|
|
1133
|
+
height: /*height*/ ctx[7],
|
|
1134
|
+
rows: /*rows*/ ctx[8],
|
|
1135
|
+
columns: /*columns*/ ctx[9],
|
|
1136
|
+
gap: /*gap*/ ctx[10],
|
|
1137
|
+
background: /*background*/ ctx[11],
|
|
1133
1138
|
$$slots: { default: [create_default_slot_3] },
|
|
1134
1139
|
$$scope: { ctx }
|
|
1135
1140
|
}
|
|
@@ -1145,14 +1150,14 @@ function create_default_slot_2(ctx) {
|
|
|
1145
1150
|
},
|
|
1146
1151
|
p(ctx, dirty) {
|
|
1147
1152
|
const grid_changes = {};
|
|
1148
|
-
if (dirty & /*width*/
|
|
1149
|
-
if (dirty & /*height*/
|
|
1150
|
-
if (dirty & /*rows*/
|
|
1151
|
-
if (dirty & /*columns*/
|
|
1152
|
-
if (dirty & /*gap*/
|
|
1153
|
-
if (dirty & /*background*/
|
|
1154
|
-
|
|
1155
|
-
if (dirty & /*$$scope*/
|
|
1153
|
+
if (dirty & /*width*/ 64) grid_changes.width = /*width*/ ctx[6];
|
|
1154
|
+
if (dirty & /*height*/ 128) grid_changes.height = /*height*/ ctx[7];
|
|
1155
|
+
if (dirty & /*rows*/ 256) grid_changes.rows = /*rows*/ ctx[8];
|
|
1156
|
+
if (dirty & /*columns*/ 512) grid_changes.columns = /*columns*/ ctx[9];
|
|
1157
|
+
if (dirty & /*gap*/ 1024) grid_changes.gap = /*gap*/ ctx[10];
|
|
1158
|
+
if (dirty & /*background*/ 2048) grid_changes.background = /*background*/ ctx[11];
|
|
1159
|
+
|
|
1160
|
+
if (dirty & /*$$scope*/ 4194304) {
|
|
1156
1161
|
grid_changes.$$scope = { dirty, ctx };
|
|
1157
1162
|
}
|
|
1158
1163
|
|
|
@@ -1180,19 +1185,18 @@ function create_default_slot_1(ctx) {
|
|
|
1180
1185
|
|
|
1181
1186
|
modal = new Modal({
|
|
1182
1187
|
props: {
|
|
1183
|
-
closable: /*closable*/ ctx[
|
|
1184
|
-
closeButtonColor: /*closeButtonColor*/ ctx[
|
|
1185
|
-
_closeStyle: /*_closeStyle*/ ctx[
|
|
1186
|
-
position: /*
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
_style: /*_modalStyle*/ ctx[5],
|
|
1188
|
+
closable: /*closable*/ ctx[3],
|
|
1189
|
+
closeButtonColor: /*closeButtonColor*/ ctx[4],
|
|
1190
|
+
_closeStyle: /*_closeStyle*/ ctx[5],
|
|
1191
|
+
position: /*_position*/ ctx[13],
|
|
1192
|
+
margin: /*margin*/ ctx[14],
|
|
1193
|
+
_style: /*_modalStyle*/ ctx[2],
|
|
1190
1194
|
$$slots: { default: [create_default_slot_2] },
|
|
1191
1195
|
$$scope: { ctx }
|
|
1192
1196
|
}
|
|
1193
1197
|
});
|
|
1194
1198
|
|
|
1195
|
-
modal.$on("close", /*close*/ ctx[
|
|
1199
|
+
modal.$on("close", /*close*/ ctx[12]);
|
|
1196
1200
|
|
|
1197
1201
|
return {
|
|
1198
1202
|
c() {
|
|
@@ -1204,15 +1208,12 @@ function create_default_slot_1(ctx) {
|
|
|
1204
1208
|
},
|
|
1205
1209
|
p(ctx, dirty) {
|
|
1206
1210
|
const modal_changes = {};
|
|
1207
|
-
if (dirty & /*closable*/
|
|
1208
|
-
if (dirty & /*closeButtonColor*/
|
|
1209
|
-
if (dirty & /*_closeStyle*/
|
|
1210
|
-
if (dirty & /*
|
|
1211
|
-
|
|
1212
|
-
if (dirty &
|
|
1213
|
-
if (dirty & /*_modalStyle*/ 32) modal_changes._style = /*_modalStyle*/ ctx[5];
|
|
1214
|
-
|
|
1215
|
-
if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 1113088) {
|
|
1211
|
+
if (dirty & /*closable*/ 8) modal_changes.closable = /*closable*/ ctx[3];
|
|
1212
|
+
if (dirty & /*closeButtonColor*/ 16) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[4];
|
|
1213
|
+
if (dirty & /*_closeStyle*/ 32) modal_changes._closeStyle = /*_closeStyle*/ ctx[5];
|
|
1214
|
+
if (dirty & /*_modalStyle*/ 4) modal_changes._style = /*_modalStyle*/ ctx[2];
|
|
1215
|
+
|
|
1216
|
+
if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 4198336) {
|
|
1216
1217
|
modal_changes.$$scope = { dirty, ctx };
|
|
1217
1218
|
}
|
|
1218
1219
|
|
|
@@ -1242,15 +1243,15 @@ function create_default_slot(ctx) {
|
|
|
1242
1243
|
|
|
1243
1244
|
backgroundoverray = new BackgroundOverray({
|
|
1244
1245
|
props: {
|
|
1245
|
-
backgroundOverray: /*
|
|
1246
|
+
backgroundOverray: /*_backgroundOverray*/ ctx[15]
|
|
1246
1247
|
}
|
|
1247
1248
|
});
|
|
1248
1249
|
|
|
1249
|
-
backgroundoverray.$on("click", /*close*/ ctx[
|
|
1250
|
+
backgroundoverray.$on("click", /*close*/ ctx[12]);
|
|
1250
1251
|
|
|
1251
1252
|
animation_1 = new Animation({
|
|
1252
1253
|
props: {
|
|
1253
|
-
animation: /*animation*/ ctx[
|
|
1254
|
+
animation: /*animation*/ ctx[1],
|
|
1254
1255
|
$$slots: { default: [create_default_slot_1] },
|
|
1255
1256
|
$$scope: { ctx }
|
|
1256
1257
|
}
|
|
@@ -1269,13 +1270,10 @@ function create_default_slot(ctx) {
|
|
|
1269
1270
|
current = true;
|
|
1270
1271
|
},
|
|
1271
1272
|
p(ctx, dirty) {
|
|
1272
|
-
const backgroundoverray_changes = {};
|
|
1273
|
-
if (dirty & /*backgroundOverray*/ 128) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[7];
|
|
1274
|
-
backgroundoverray.$set(backgroundoverray_changes);
|
|
1275
1273
|
const animation_1_changes = {};
|
|
1276
|
-
if (dirty & /*animation*/
|
|
1274
|
+
if (dirty & /*animation*/ 2) animation_1_changes.animation = /*animation*/ ctx[1];
|
|
1277
1275
|
|
|
1278
|
-
if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle,
|
|
1276
|
+
if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198396) {
|
|
1279
1277
|
animation_1_changes.$$scope = { dirty, ctx };
|
|
1280
1278
|
}
|
|
1281
1279
|
|
|
@@ -1324,7 +1322,7 @@ function create_fragment$6(ctx) {
|
|
|
1324
1322
|
const stateitem_changes = {};
|
|
1325
1323
|
if (dirty & /*path*/ 1) stateitem_changes.path = /*path*/ ctx[0];
|
|
1326
1324
|
|
|
1327
|
-
if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle,
|
|
1325
|
+
if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198398) {
|
|
1328
1326
|
stateitem_changes.$$scope = { dirty, ctx };
|
|
1329
1327
|
}
|
|
1330
1328
|
|
|
@@ -1348,9 +1346,8 @@ function create_fragment$6(ctx) {
|
|
|
1348
1346
|
function instance$6($$self, $$props, $$invalidate) {
|
|
1349
1347
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1350
1348
|
let { path } = $$props;
|
|
1349
|
+
let { placement = DefaultModalPlacement } = $$props;
|
|
1351
1350
|
let { position = 'center' } = $$props;
|
|
1352
|
-
let { modalMarginX = { side: 'left', length: '0' } } = $$props;
|
|
1353
|
-
let { modalMarginY = { side: 'top', length: '0' } } = $$props;
|
|
1354
1351
|
let { animation = 'none' } = $$props;
|
|
1355
1352
|
let { _modalStyle = '' } = $$props;
|
|
1356
1353
|
let { closable = true } = $$props;
|
|
@@ -1379,37 +1376,36 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
1379
1376
|
dispatch('close');
|
|
1380
1377
|
};
|
|
1381
1378
|
|
|
1379
|
+
const _position = placement.position ?? position;
|
|
1380
|
+
const margin = placement.margin;
|
|
1381
|
+
const _backgroundOverray = placement.backgroundOverlay ?? backgroundOverray;
|
|
1382
|
+
|
|
1382
1383
|
$$self.$$set = $$props => {
|
|
1383
1384
|
if ('path' in $$props) $$invalidate(0, path = $$props.path);
|
|
1384
|
-
if ('
|
|
1385
|
-
if ('
|
|
1386
|
-
if ('
|
|
1387
|
-
if ('
|
|
1388
|
-
if ('
|
|
1389
|
-
if ('
|
|
1390
|
-
if ('
|
|
1391
|
-
if ('
|
|
1392
|
-
if ('
|
|
1393
|
-
if ('
|
|
1394
|
-
if ('
|
|
1395
|
-
if ('
|
|
1396
|
-
if ('
|
|
1397
|
-
if ('
|
|
1398
|
-
if ('
|
|
1399
|
-
if ('
|
|
1400
|
-
if ('
|
|
1401
|
-
if ('$$scope' in $$props) $$invalidate(20, $$scope = $$props.$$scope);
|
|
1385
|
+
if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
|
|
1386
|
+
if ('position' in $$props) $$invalidate(17, position = $$props.position);
|
|
1387
|
+
if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
|
|
1388
|
+
if ('_modalStyle' in $$props) $$invalidate(2, _modalStyle = $$props._modalStyle);
|
|
1389
|
+
if ('closable' in $$props) $$invalidate(3, closable = $$props.closable);
|
|
1390
|
+
if ('backgroundOverray' in $$props) $$invalidate(18, backgroundOverray = $$props.backgroundOverray);
|
|
1391
|
+
if ('closeButtonColor' in $$props) $$invalidate(4, closeButtonColor = $$props.closeButtonColor);
|
|
1392
|
+
if ('eventName' in $$props) $$invalidate(19, eventName = $$props.eventName);
|
|
1393
|
+
if ('eventValue' in $$props) $$invalidate(20, eventValue = $$props.eventValue);
|
|
1394
|
+
if ('_closeStyle' in $$props) $$invalidate(5, _closeStyle = $$props._closeStyle);
|
|
1395
|
+
if ('width' in $$props) $$invalidate(6, width = $$props.width);
|
|
1396
|
+
if ('height' in $$props) $$invalidate(7, height = $$props.height);
|
|
1397
|
+
if ('rows' in $$props) $$invalidate(8, rows = $$props.rows);
|
|
1398
|
+
if ('columns' in $$props) $$invalidate(9, columns = $$props.columns);
|
|
1399
|
+
if ('gap' in $$props) $$invalidate(10, gap = $$props.gap);
|
|
1400
|
+
if ('background' in $$props) $$invalidate(11, background = $$props.background);
|
|
1401
|
+
if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
|
|
1402
1402
|
};
|
|
1403
1403
|
|
|
1404
1404
|
return [
|
|
1405
1405
|
path,
|
|
1406
|
-
position,
|
|
1407
|
-
modalMarginX,
|
|
1408
|
-
modalMarginY,
|
|
1409
1406
|
animation,
|
|
1410
1407
|
_modalStyle,
|
|
1411
1408
|
closable,
|
|
1412
|
-
backgroundOverray,
|
|
1413
1409
|
closeButtonColor,
|
|
1414
1410
|
_closeStyle,
|
|
1415
1411
|
width,
|
|
@@ -1419,6 +1415,12 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
1419
1415
|
gap,
|
|
1420
1416
|
background,
|
|
1421
1417
|
close,
|
|
1418
|
+
_position,
|
|
1419
|
+
margin,
|
|
1420
|
+
_backgroundOverray,
|
|
1421
|
+
placement,
|
|
1422
|
+
position,
|
|
1423
|
+
backgroundOverray,
|
|
1422
1424
|
eventName,
|
|
1423
1425
|
eventValue,
|
|
1424
1426
|
slots,
|
|
@@ -1432,23 +1434,22 @@ class GridModalState extends SvelteComponent {
|
|
|
1432
1434
|
|
|
1433
1435
|
init(this, options, instance$6, create_fragment$6, safe_not_equal, {
|
|
1434
1436
|
path: 0,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
background: 15
|
|
1437
|
+
placement: 16,
|
|
1438
|
+
position: 17,
|
|
1439
|
+
animation: 1,
|
|
1440
|
+
_modalStyle: 2,
|
|
1441
|
+
closable: 3,
|
|
1442
|
+
backgroundOverray: 18,
|
|
1443
|
+
closeButtonColor: 4,
|
|
1444
|
+
eventName: 19,
|
|
1445
|
+
eventValue: 20,
|
|
1446
|
+
_closeStyle: 5,
|
|
1447
|
+
width: 6,
|
|
1448
|
+
height: 7,
|
|
1449
|
+
rows: 8,
|
|
1450
|
+
columns: 9,
|
|
1451
|
+
gap: 10,
|
|
1452
|
+
background: 11
|
|
1452
1453
|
});
|
|
1453
1454
|
}
|
|
1454
1455
|
}
|
|
@@ -2086,4 +2087,4 @@ class ImageBlock extends SvelteComponent {
|
|
|
2086
2087
|
}
|
|
2087
2088
|
}
|
|
2088
2089
|
|
|
2089
|
-
export { Alignments, AnimationStyleTranslations, AnimationStyles, 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 };
|
|
2090
|
+
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 };
|