@plaidev/karte-action-sdk 1.1.102 → 1.1.103-27909115.90a8e84c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hydrate/index.es.d.ts +69 -29
- package/dist/hydrate/index.es.js +803 -151
- package/dist/index.es.d.ts +69 -29
- package/dist/index.es.js +740 -149
- package/dist/templates.js +4 -0
- package/package.json +11 -2
package/dist/index.es.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { writable, get } from 'svelte/store';
|
2
2
|
import { linear, elasticOut, cubicOut } from 'svelte/easing';
|
3
|
-
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, noop, listen, is_function, append, add_render_callback, create_in_transition, svg_element, binding_callbacks, destroy_each, text, set_data, src_url_equal, null_to_empty } from 'svelte/internal';
|
3
|
+
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, noop, listen, is_function, append, add_render_callback, create_in_transition, svg_element, binding_callbacks, destroy_each, text, set_data, src_url_equal, null_to_empty, set_style } from 'svelte/internal';
|
4
4
|
import { createEventDispatcher, onMount, onDestroy as onDestroy$1, setContext, getContext } from 'svelte';
|
5
5
|
|
6
6
|
/**
|
@@ -214,13 +214,16 @@ function setActionSetting(setting) {
|
|
214
214
|
actionSetting.update(current => {
|
215
215
|
return { ...current, ...setting };
|
216
216
|
});
|
217
|
-
|
217
|
+
const current = getActionSetting();
|
218
|
+
setStopped(!current.autoStart);
|
219
|
+
return current;
|
218
220
|
}
|
219
221
|
/**
|
220
222
|
* {@link resetActionSetting} function to reset action setting
|
221
223
|
*/
|
222
224
|
function resetActionSetting() {
|
223
225
|
actionSetting.set({ autoStart: true });
|
226
|
+
setStopped(false);
|
224
227
|
}
|
225
228
|
/**
|
226
229
|
* Store to read KARTE system config
|
@@ -425,7 +428,9 @@ function isStopped() {
|
|
425
428
|
* {@link setStopped} function to set if action is stopped.
|
426
429
|
*/
|
427
430
|
function setStopped(on) {
|
428
|
-
|
431
|
+
{
|
432
|
+
stopped.set(on);
|
433
|
+
}
|
429
434
|
}
|
430
435
|
/**
|
431
436
|
* Store to handle custom variables
|
@@ -470,13 +475,16 @@ const handleState = (event) => {
|
|
470
475
|
}
|
471
476
|
};
|
472
477
|
const initialize = (setting) => {
|
473
|
-
|
478
|
+
const newSetting = setActionSetting(setting);
|
479
|
+
if (newSetting.initialState) {
|
474
480
|
const force = true;
|
475
481
|
setState$1(setting?.initialState, force);
|
476
482
|
}
|
483
|
+
if (newSetting.autoStart) {
|
484
|
+
setStopped(!newSetting.autoStart);
|
485
|
+
}
|
477
486
|
setOpened(true);
|
478
487
|
setClosed(false); // deprecated
|
479
|
-
setActionSetting(setting);
|
480
488
|
return () => finalize();
|
481
489
|
};
|
482
490
|
const finalize = () => {
|
@@ -725,6 +733,12 @@ const DefaultModalPlacement = {
|
|
725
733
|
backgroundOverlay: false,
|
726
734
|
backgroundClick: { operation: 'closeApp', args: ['overlay'] },
|
727
735
|
};
|
736
|
+
const Elasticities = ['none', 'vertical', 'horizontal'];
|
737
|
+
const ElasticityStyle = {
|
738
|
+
none: '',
|
739
|
+
vertical: 'width: 100%',
|
740
|
+
horizontal: 'height: 100%',
|
741
|
+
};
|
728
742
|
const OnClickOperationOptions = [
|
729
743
|
{
|
730
744
|
operation: 'none',
|
@@ -965,6 +979,7 @@ function create(App, options = {
|
|
965
979
|
shortenId: data.shorten_id || null,
|
966
980
|
campaignId: data.campaign_id || null,
|
967
981
|
});
|
982
|
+
setInternalHandlers({});
|
968
983
|
if (options.onCreate) {
|
969
984
|
onCreate(options.onCreate);
|
970
985
|
}
|
@@ -1700,35 +1715,35 @@ function collection(table) {
|
|
1700
1715
|
|
1701
1716
|
var widget = /*#__PURE__*/Object.freeze({
|
1702
1717
|
__proto__: null,
|
1703
|
-
|
1704
|
-
|
1705
|
-
setVal: setVal,
|
1718
|
+
collection: collection,
|
1719
|
+
getState: getState,
|
1706
1720
|
getVal: getVal,
|
1707
|
-
|
1721
|
+
hide: closeAction,
|
1708
1722
|
method: method,
|
1709
1723
|
on: on,
|
1724
|
+
onChangeVal: onChangeVal,
|
1710
1725
|
setState: setState,
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1726
|
+
setVal: setVal,
|
1727
|
+
show: showAction,
|
1728
|
+
storage: storage
|
1714
1729
|
});
|
1715
1730
|
|
1716
1731
|
/* src/components/Normalize.svelte generated by Svelte v3.53.1 */
|
1717
1732
|
|
1718
|
-
function add_css$
|
1733
|
+
function add_css$i(target) {
|
1719
1734
|
append_styles(target, "svelte-tr4qnr", "@import 'https://esm.sh/normalize.css';");
|
1720
1735
|
}
|
1721
1736
|
|
1722
1737
|
class Normalize extends SvelteComponent {
|
1723
1738
|
constructor(options) {
|
1724
1739
|
super();
|
1725
|
-
init(this, options, null, null, safe_not_equal, {}, add_css$
|
1740
|
+
init(this, options, null, null, safe_not_equal, {}, add_css$i);
|
1726
1741
|
}
|
1727
1742
|
}
|
1728
1743
|
|
1729
1744
|
/* src/components/State.svelte generated by Svelte v3.53.1 */
|
1730
1745
|
|
1731
|
-
function create_fragment$
|
1746
|
+
function create_fragment$m(ctx) {
|
1732
1747
|
let normalize;
|
1733
1748
|
let t;
|
1734
1749
|
let current;
|
@@ -1787,7 +1802,7 @@ function create_fragment$i(ctx) {
|
|
1787
1802
|
};
|
1788
1803
|
}
|
1789
1804
|
|
1790
|
-
function instance$
|
1805
|
+
function instance$m($$self, $$props, $$invalidate) {
|
1791
1806
|
let { $$slots: slots = {}, $$scope } = $$props;
|
1792
1807
|
|
1793
1808
|
$$self.$$set = $$props => {
|
@@ -1800,13 +1815,13 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
1800
1815
|
class State extends SvelteComponent {
|
1801
1816
|
constructor(options) {
|
1802
1817
|
super();
|
1803
|
-
init(this, options, instance$
|
1818
|
+
init(this, options, instance$m, create_fragment$m, safe_not_equal, {});
|
1804
1819
|
}
|
1805
1820
|
}
|
1806
1821
|
|
1807
1822
|
/* src/components/StateItem.svelte generated by Svelte v3.53.1 */
|
1808
1823
|
|
1809
|
-
function add_css$
|
1824
|
+
function add_css$h(target) {
|
1810
1825
|
append_styles(target, "svelte-2qb6dm", ".state-item.svelte-2qb6dm{position:absolute;display:none}");
|
1811
1826
|
}
|
1812
1827
|
|
@@ -1873,7 +1888,7 @@ function create_if_block$3(ctx) {
|
|
1873
1888
|
};
|
1874
1889
|
}
|
1875
1890
|
|
1876
|
-
function create_fragment$
|
1891
|
+
function create_fragment$l(ctx) {
|
1877
1892
|
let if_block_anchor;
|
1878
1893
|
let current;
|
1879
1894
|
let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$3(ctx);
|
@@ -1928,7 +1943,7 @@ function create_fragment$h(ctx) {
|
|
1928
1943
|
};
|
1929
1944
|
}
|
1930
1945
|
|
1931
|
-
function instance$
|
1946
|
+
function instance$l($$self, $$props, $$invalidate) {
|
1932
1947
|
let $state;
|
1933
1948
|
component_subscribe($$self, state, $$value => $$invalidate(1, $state = $$value));
|
1934
1949
|
let { $$slots: slots = {}, $$scope } = $$props;
|
@@ -1953,13 +1968,13 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
1953
1968
|
class StateItem extends SvelteComponent {
|
1954
1969
|
constructor(options) {
|
1955
1970
|
super();
|
1956
|
-
init(this, options, instance$
|
1971
|
+
init(this, options, instance$l, create_fragment$l, safe_not_equal, { path: 0 }, add_css$h);
|
1957
1972
|
}
|
1958
1973
|
}
|
1959
1974
|
|
1960
1975
|
/* src/components/BackgroundOverray.svelte generated by Svelte v3.53.1 */
|
1961
1976
|
|
1962
|
-
function add_css$
|
1977
|
+
function add_css$g(target) {
|
1963
1978
|
append_styles(target, "svelte-1d4fta", ".background.svelte-1d4fta{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3);z-index:2147483646}");
|
1964
1979
|
}
|
1965
1980
|
|
@@ -1991,7 +2006,7 @@ function create_if_block$2(ctx) {
|
|
1991
2006
|
};
|
1992
2007
|
}
|
1993
2008
|
|
1994
|
-
function create_fragment$
|
2009
|
+
function create_fragment$k(ctx) {
|
1995
2010
|
let if_block_anchor;
|
1996
2011
|
let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$2(ctx);
|
1997
2012
|
|
@@ -2027,7 +2042,7 @@ function create_fragment$g(ctx) {
|
|
2027
2042
|
};
|
2028
2043
|
}
|
2029
2044
|
|
2030
|
-
function instance$
|
2045
|
+
function instance$k($$self, $$props, $$invalidate) {
|
2031
2046
|
let { backgroundOverray = false } = $$props;
|
2032
2047
|
const dispatch = createEventDispatcher();
|
2033
2048
|
const click_handler = () => dispatch('click');
|
@@ -2042,17 +2057,17 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
2042
2057
|
class BackgroundOverray extends SvelteComponent {
|
2043
2058
|
constructor(options) {
|
2044
2059
|
super();
|
2045
|
-
init(this, options, instance$
|
2060
|
+
init(this, options, instance$k, create_fragment$k, safe_not_equal, { backgroundOverray: 0 }, add_css$g);
|
2046
2061
|
}
|
2047
2062
|
}
|
2048
2063
|
|
2049
2064
|
/* src/components/Modal.svelte generated by Svelte v3.53.1 */
|
2050
2065
|
|
2051
|
-
function add_css$
|
2052
|
-
append_styles(target, "svelte-
|
2066
|
+
function add_css$f(target) {
|
2067
|
+
append_styles(target, "svelte-12dkw0q", ".modal.svelte-12dkw0q{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-12dkw0q{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-12dkw0q:hover{transform:rotate(90deg)}.modal-content.svelte-12dkw0q{display:flex;justify-content:center;align-items:center}");
|
2053
2068
|
}
|
2054
2069
|
|
2055
|
-
// (
|
2070
|
+
// (136:0) {#if visible}
|
2056
2071
|
function create_if_block$1(ctx) {
|
2057
2072
|
let div1;
|
2058
2073
|
let t;
|
@@ -2062,9 +2077,9 @@ function create_if_block$1(ctx) {
|
|
2062
2077
|
let current;
|
2063
2078
|
let mounted;
|
2064
2079
|
let dispose;
|
2065
|
-
let if_block = /*closable*/ ctx[
|
2066
|
-
const default_slot_template = /*#slots*/ ctx[
|
2067
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
2080
|
+
let if_block = /*closable*/ ctx[14] && create_if_block_1(ctx);
|
2081
|
+
const default_slot_template = /*#slots*/ ctx[29].default;
|
2082
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[28], null);
|
2068
2083
|
|
2069
2084
|
return {
|
2070
2085
|
c() {
|
@@ -2073,11 +2088,12 @@ function create_if_block$1(ctx) {
|
|
2073
2088
|
t = space();
|
2074
2089
|
div0 = element("div");
|
2075
2090
|
if (default_slot) default_slot.c();
|
2091
|
+
attr(div0, "class", "modal-content svelte-12dkw0q");
|
2076
2092
|
attr(div0, "style", /*_style*/ ctx[1]);
|
2077
|
-
attr(div1, "class", "modal svelte-
|
2093
|
+
attr(div1, "class", "modal svelte-12dkw0q");
|
2078
2094
|
attr(div1, "role", "dialog");
|
2079
2095
|
attr(div1, "aria-modal", "true");
|
2080
|
-
attr(div1, "style", div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + "");
|
2096
|
+
attr(div1, "style", div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + ElasticityStyle[/*overwriteElasticity*/ ctx[11]] + "");
|
2081
2097
|
},
|
2082
2098
|
m(target, anchor) {
|
2083
2099
|
insert(target, div1, anchor);
|
@@ -2089,12 +2105,12 @@ function create_if_block$1(ctx) {
|
|
2089
2105
|
default_slot.m(div0, null);
|
2090
2106
|
}
|
2091
2107
|
|
2092
|
-
/*div1_binding*/ ctx[
|
2108
|
+
/*div1_binding*/ ctx[30](div1);
|
2093
2109
|
current = true;
|
2094
2110
|
|
2095
2111
|
if (!mounted) {
|
2096
2112
|
dispose = listen(div1, "click", function () {
|
2097
|
-
if (is_function(/*click*/ ctx[
|
2113
|
+
if (is_function(/*click*/ ctx[15])) /*click*/ ctx[15].apply(this, arguments);
|
2098
2114
|
});
|
2099
2115
|
|
2100
2116
|
mounted = true;
|
@@ -2103,7 +2119,7 @@ function create_if_block$1(ctx) {
|
|
2103
2119
|
p(new_ctx, dirty) {
|
2104
2120
|
ctx = new_ctx;
|
2105
2121
|
|
2106
|
-
if (/*closable*/ ctx[
|
2122
|
+
if (/*closable*/ ctx[14]) {
|
2107
2123
|
if (if_block) {
|
2108
2124
|
if_block.p(ctx, dirty);
|
2109
2125
|
} else {
|
@@ -2117,15 +2133,15 @@ function create_if_block$1(ctx) {
|
|
2117
2133
|
}
|
2118
2134
|
|
2119
2135
|
if (default_slot) {
|
2120
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
2136
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 268435456)) {
|
2121
2137
|
update_slot_base(
|
2122
2138
|
default_slot,
|
2123
2139
|
default_slot_template,
|
2124
2140
|
ctx,
|
2125
|
-
/*$$scope*/ ctx[
|
2141
|
+
/*$$scope*/ ctx[28],
|
2126
2142
|
!current
|
2127
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
2128
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
2143
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[28])
|
2144
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[28], dirty, null),
|
2129
2145
|
null
|
2130
2146
|
);
|
2131
2147
|
}
|
@@ -2135,7 +2151,7 @@ function create_if_block$1(ctx) {
|
|
2135
2151
|
attr(div0, "style", /*_style*/ ctx[1]);
|
2136
2152
|
}
|
2137
2153
|
|
2138
|
-
if (!current || dirty & /*pos, marginStyle*/
|
2154
|
+
if (!current || dirty & /*pos, marginStyle, overwriteElasticity*/ 3328 && div1_style_value !== (div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + ElasticityStyle[/*overwriteElasticity*/ ctx[11]] + "")) {
|
2139
2155
|
attr(div1, "style", div1_style_value);
|
2140
2156
|
}
|
2141
2157
|
},
|
@@ -2164,14 +2180,14 @@ function create_if_block$1(ctx) {
|
|
2164
2180
|
if (detaching) detach(div1);
|
2165
2181
|
if (if_block) if_block.d();
|
2166
2182
|
if (default_slot) default_slot.d(detaching);
|
2167
|
-
/*div1_binding*/ ctx[
|
2183
|
+
/*div1_binding*/ ctx[30](null);
|
2168
2184
|
mounted = false;
|
2169
2185
|
dispose();
|
2170
2186
|
}
|
2171
2187
|
};
|
2172
2188
|
}
|
2173
2189
|
|
2174
|
-
// (
|
2190
|
+
// (153:4) {#if closable}
|
2175
2191
|
function create_if_block_1(ctx) {
|
2176
2192
|
let button;
|
2177
2193
|
let svg;
|
@@ -2193,8 +2209,8 @@ function create_if_block_1(ctx) {
|
|
2193
2209
|
attr(svg, "viewBox", "0 0 9 10");
|
2194
2210
|
attr(svg, "fill", "none");
|
2195
2211
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
2196
|
-
attr(button, "class", "close svelte-
|
2197
|
-
attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[
|
2212
|
+
attr(button, "class", "close svelte-12dkw0q");
|
2213
|
+
attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[16] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
|
2198
2214
|
},
|
2199
2215
|
m(target, anchor) {
|
2200
2216
|
insert(target, button, anchor);
|
@@ -2216,7 +2232,7 @@ function create_if_block_1(ctx) {
|
|
2216
2232
|
attr(path, "fill", /*closeButtonColor*/ ctx[2]);
|
2217
2233
|
}
|
2218
2234
|
|
2219
|
-
if (dirty & /*$maximumZindex, _closeStyle*/
|
2235
|
+
if (dirty & /*$maximumZindex, _closeStyle*/ 65544 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[16] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
|
2220
2236
|
attr(button, "style", button_style_value);
|
2221
2237
|
}
|
2222
2238
|
},
|
@@ -2228,7 +2244,7 @@ function create_if_block_1(ctx) {
|
|
2228
2244
|
};
|
2229
2245
|
}
|
2230
2246
|
|
2231
|
-
function create_fragment$
|
2247
|
+
function create_fragment$j(ctx) {
|
2232
2248
|
let backgroundoverray;
|
2233
2249
|
let t;
|
2234
2250
|
let if_block_anchor;
|
@@ -2238,12 +2254,12 @@ function create_fragment$f(ctx) {
|
|
2238
2254
|
|
2239
2255
|
backgroundoverray = new BackgroundOverray({
|
2240
2256
|
props: {
|
2241
|
-
backgroundOverray: /*backgroundOverray*/ ctx[
|
2257
|
+
backgroundOverray: /*backgroundOverray*/ ctx[13]
|
2242
2258
|
}
|
2243
2259
|
});
|
2244
2260
|
|
2245
2261
|
backgroundoverray.$on("click", function () {
|
2246
|
-
if (is_function(/*backgroundClick*/ ctx[
|
2262
|
+
if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
|
2247
2263
|
});
|
2248
2264
|
|
2249
2265
|
let if_block = /*visible*/ ctx[6] && create_if_block$1(ctx);
|
@@ -2273,7 +2289,7 @@ function create_fragment$f(ctx) {
|
|
2273
2289
|
p(new_ctx, [dirty]) {
|
2274
2290
|
ctx = new_ctx;
|
2275
2291
|
const backgroundoverray_changes = {};
|
2276
|
-
if (dirty & /*backgroundOverray*/
|
2292
|
+
if (dirty & /*backgroundOverray*/ 8192) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[13];
|
2277
2293
|
backgroundoverray.$set(backgroundoverray_changes);
|
2278
2294
|
|
2279
2295
|
if (/*visible*/ ctx[6]) {
|
@@ -2321,7 +2337,7 @@ function create_fragment$f(ctx) {
|
|
2321
2337
|
};
|
2322
2338
|
}
|
2323
2339
|
|
2324
|
-
function instance$
|
2340
|
+
function instance$j($$self, $$props, $$invalidate) {
|
2325
2341
|
let click;
|
2326
2342
|
let close;
|
2327
2343
|
let closable;
|
@@ -2330,19 +2346,21 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2330
2346
|
let backgroundClick;
|
2331
2347
|
let overwritePosition;
|
2332
2348
|
let overwriteMargin;
|
2349
|
+
let overwriteElasticity;
|
2333
2350
|
let pos;
|
2334
2351
|
let transform;
|
2335
2352
|
let marginStyle;
|
2336
2353
|
let handle_keydown;
|
2337
2354
|
let visible;
|
2338
2355
|
let $maximumZindex;
|
2339
|
-
component_subscribe($$self, maximumZindex, $$value => $$invalidate(
|
2356
|
+
component_subscribe($$self, maximumZindex, $$value => $$invalidate(16, $maximumZindex = $$value));
|
2340
2357
|
let { $$slots: slots = {}, $$scope } = $$props;
|
2341
2358
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
2342
2359
|
let { clickEventName = '' } = $$props;
|
2343
2360
|
let { clickEventValue = null } = $$props;
|
2344
2361
|
let { placement = DefaultModalPlacement } = $$props;
|
2345
2362
|
let { animation = 'none' } = $$props;
|
2363
|
+
let { elasticity = 'none' } = $$props;
|
2346
2364
|
let { _style = '' } = $$props;
|
2347
2365
|
let { onClose = { operation: 'closeApp', args: [] } } = $$props;
|
2348
2366
|
let { closeButtonColor = '#000000' } = $$props;
|
@@ -2365,23 +2383,24 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2365
2383
|
}
|
2366
2384
|
|
2367
2385
|
$$self.$$set = $$props => {
|
2368
|
-
if ('onClick' in $$props) $$invalidate(
|
2369
|
-
if ('clickEventName' in $$props) $$invalidate(
|
2370
|
-
if ('clickEventValue' in $$props) $$invalidate(
|
2371
|
-
if ('placement' in $$props) $$invalidate(
|
2386
|
+
if ('onClick' in $$props) $$invalidate(17, onClick = $$props.onClick);
|
2387
|
+
if ('clickEventName' in $$props) $$invalidate(18, clickEventName = $$props.clickEventName);
|
2388
|
+
if ('clickEventValue' in $$props) $$invalidate(19, clickEventValue = $$props.clickEventValue);
|
2389
|
+
if ('placement' in $$props) $$invalidate(20, placement = $$props.placement);
|
2372
2390
|
if ('animation' in $$props) $$invalidate(0, animation = $$props.animation);
|
2391
|
+
if ('elasticity' in $$props) $$invalidate(21, elasticity = $$props.elasticity);
|
2373
2392
|
if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
|
2374
|
-
if ('onClose' in $$props) $$invalidate(
|
2393
|
+
if ('onClose' in $$props) $$invalidate(22, onClose = $$props.onClose);
|
2375
2394
|
if ('closeButtonColor' in $$props) $$invalidate(2, closeButtonColor = $$props.closeButtonColor);
|
2376
|
-
if ('closeEventName' in $$props) $$invalidate(
|
2377
|
-
if ('closeEventValue' in $$props) $$invalidate(
|
2395
|
+
if ('closeEventName' in $$props) $$invalidate(23, closeEventName = $$props.closeEventName);
|
2396
|
+
if ('closeEventValue' in $$props) $$invalidate(24, closeEventValue = $$props.closeEventValue);
|
2378
2397
|
if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
|
2379
|
-
if ('$$scope' in $$props) $$invalidate(
|
2398
|
+
if ('$$scope' in $$props) $$invalidate(28, $$scope = $$props.$$scope);
|
2380
2399
|
};
|
2381
2400
|
|
2382
2401
|
$$self.$$.update = () => {
|
2383
|
-
if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/
|
2384
|
-
$$invalidate(
|
2402
|
+
if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/ 917504) {
|
2403
|
+
$$invalidate(15, click = () => {
|
2385
2404
|
if (clickEventName) {
|
2386
2405
|
send_event(clickEventName, clickEventValue);
|
2387
2406
|
}
|
@@ -2390,7 +2409,7 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2390
2409
|
});
|
2391
2410
|
}
|
2392
2411
|
|
2393
|
-
if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/
|
2412
|
+
if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 29360128) {
|
2394
2413
|
$$invalidate(5, close = () => {
|
2395
2414
|
if (closeEventName) {
|
2396
2415
|
send_event(closeEventName, closeEventValue);
|
@@ -2400,24 +2419,24 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2400
2419
|
});
|
2401
2420
|
}
|
2402
2421
|
|
2403
|
-
if ($$self.$$.dirty & /*onClose*/
|
2404
|
-
$$invalidate(
|
2422
|
+
if ($$self.$$.dirty & /*onClose*/ 4194304) {
|
2423
|
+
$$invalidate(14, closable = haveFunction(onClose));
|
2405
2424
|
}
|
2406
2425
|
|
2407
|
-
if ($$self.$$.dirty & /*placement*/
|
2408
|
-
$$invalidate(
|
2426
|
+
if ($$self.$$.dirty & /*placement*/ 1048576) {
|
2427
|
+
$$invalidate(13, backgroundOverray = placement && placement.backgroundOverlay != null
|
2409
2428
|
? placement.backgroundOverlay
|
2410
2429
|
: DefaultModalPlacement.backgroundOverlay);
|
2411
2430
|
}
|
2412
2431
|
|
2413
|
-
if ($$self.$$.dirty & /*placement*/
|
2414
|
-
$$invalidate(
|
2432
|
+
if ($$self.$$.dirty & /*placement*/ 1048576) {
|
2433
|
+
$$invalidate(27, backgroundClickFunction = placement && placement.backgroundClick != null
|
2415
2434
|
? placement.backgroundClick
|
2416
2435
|
: DefaultModalPlacement.backgroundClick);
|
2417
2436
|
}
|
2418
2437
|
|
2419
|
-
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/
|
2420
|
-
$$invalidate(
|
2438
|
+
if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 159383552) {
|
2439
|
+
$$invalidate(12, backgroundClick = () => {
|
2421
2440
|
if (closeEventName) {
|
2422
2441
|
send_event(closeEventName, closeEventValue);
|
2423
2442
|
}
|
@@ -2426,27 +2445,31 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2426
2445
|
});
|
2427
2446
|
}
|
2428
2447
|
|
2429
|
-
if ($$self.$$.dirty & /*placement*/
|
2430
|
-
$$invalidate(
|
2448
|
+
if ($$self.$$.dirty & /*placement*/ 1048576) {
|
2449
|
+
$$invalidate(26, overwritePosition = placement && placement.position != null
|
2431
2450
|
? placement.position
|
2432
2451
|
: DefaultModalPlacement.position);
|
2433
2452
|
}
|
2434
2453
|
|
2435
|
-
if ($$self.$$.dirty & /*placement*/
|
2436
|
-
$$invalidate(
|
2454
|
+
if ($$self.$$.dirty & /*placement*/ 1048576) {
|
2455
|
+
$$invalidate(25, overwriteMargin = placement && placement.margin != null
|
2437
2456
|
? placement.margin
|
2438
2457
|
: DefaultModalPlacement.margin);
|
2439
2458
|
}
|
2440
2459
|
|
2441
|
-
if ($$self.$$.dirty & /*
|
2460
|
+
if ($$self.$$.dirty & /*elasticity*/ 2097152) {
|
2461
|
+
$$invalidate(11, overwriteElasticity = elasticity);
|
2462
|
+
}
|
2463
|
+
|
2464
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
2442
2465
|
$$invalidate(10, pos = getPositionStyle(overwritePosition));
|
2443
2466
|
}
|
2444
2467
|
|
2445
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
2468
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 67108864) {
|
2446
2469
|
$$invalidate(9, transform = getTransform(overwritePosition));
|
2447
2470
|
}
|
2448
2471
|
|
2449
|
-
if ($$self.$$.dirty & /*overwriteMargin*/
|
2472
|
+
if ($$self.$$.dirty & /*overwriteMargin*/ 33554432) {
|
2450
2473
|
$$invalidate(8, marginStyle = getMarginStyle(overwriteMargin));
|
2451
2474
|
}
|
2452
2475
|
|
@@ -2472,6 +2495,7 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2472
2495
|
marginStyle,
|
2473
2496
|
transform,
|
2474
2497
|
pos,
|
2498
|
+
overwriteElasticity,
|
2475
2499
|
backgroundClick,
|
2476
2500
|
backgroundOverray,
|
2477
2501
|
closable,
|
@@ -2481,6 +2505,7 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
2481
2505
|
clickEventName,
|
2482
2506
|
clickEventValue,
|
2483
2507
|
placement,
|
2508
|
+
elasticity,
|
2484
2509
|
onClose,
|
2485
2510
|
closeEventName,
|
2486
2511
|
closeEventValue,
|
@@ -2500,30 +2525,31 @@ class Modal extends SvelteComponent {
|
|
2500
2525
|
init(
|
2501
2526
|
this,
|
2502
2527
|
options,
|
2503
|
-
instance$
|
2504
|
-
create_fragment$
|
2528
|
+
instance$j,
|
2529
|
+
create_fragment$j,
|
2505
2530
|
safe_not_equal,
|
2506
2531
|
{
|
2507
|
-
onClick:
|
2508
|
-
clickEventName:
|
2509
|
-
clickEventValue:
|
2510
|
-
placement:
|
2532
|
+
onClick: 17,
|
2533
|
+
clickEventName: 18,
|
2534
|
+
clickEventValue: 19,
|
2535
|
+
placement: 20,
|
2511
2536
|
animation: 0,
|
2537
|
+
elasticity: 21,
|
2512
2538
|
_style: 1,
|
2513
|
-
onClose:
|
2539
|
+
onClose: 22,
|
2514
2540
|
closeButtonColor: 2,
|
2515
|
-
closeEventName:
|
2516
|
-
closeEventValue:
|
2541
|
+
closeEventName: 23,
|
2542
|
+
closeEventValue: 24,
|
2517
2543
|
_closeStyle: 3
|
2518
2544
|
},
|
2519
|
-
add_css$
|
2545
|
+
add_css$f
|
2520
2546
|
);
|
2521
2547
|
}
|
2522
2548
|
}
|
2523
2549
|
|
2524
2550
|
/* src/components/Grid.svelte generated by Svelte v3.53.1 */
|
2525
2551
|
|
2526
|
-
function create_fragment$
|
2552
|
+
function create_fragment$i(ctx) {
|
2527
2553
|
let div;
|
2528
2554
|
let current;
|
2529
2555
|
const default_slot_template = /*#slots*/ ctx[8].default;
|
@@ -2581,7 +2607,7 @@ function create_fragment$e(ctx) {
|
|
2581
2607
|
};
|
2582
2608
|
}
|
2583
2609
|
|
2584
|
-
function instance$
|
2610
|
+
function instance$i($$self, $$props, $$invalidate) {
|
2585
2611
|
let _style;
|
2586
2612
|
let { $$slots: slots = {}, $$scope } = $$props;
|
2587
2613
|
let { width = '512px' } = $$props;
|
@@ -2626,7 +2652,7 @@ class Grid extends SvelteComponent {
|
|
2626
2652
|
constructor(options) {
|
2627
2653
|
super();
|
2628
2654
|
|
2629
|
-
init(this, options, instance$
|
2655
|
+
init(this, options, instance$i, create_fragment$i, safe_not_equal, {
|
2630
2656
|
width: 1,
|
2631
2657
|
height: 2,
|
2632
2658
|
rows: 3,
|
@@ -2808,7 +2834,7 @@ function create_default_slot(ctx) {
|
|
2808
2834
|
};
|
2809
2835
|
}
|
2810
2836
|
|
2811
|
-
function create_fragment$
|
2837
|
+
function create_fragment$h(ctx) {
|
2812
2838
|
let stateitem;
|
2813
2839
|
let current;
|
2814
2840
|
|
@@ -2853,7 +2879,7 @@ function create_fragment$d(ctx) {
|
|
2853
2879
|
};
|
2854
2880
|
}
|
2855
2881
|
|
2856
|
-
function instance$
|
2882
|
+
function instance$h($$self, $$props, $$invalidate) {
|
2857
2883
|
let { $$slots: slots = {}, $$scope } = $$props;
|
2858
2884
|
let { path } = $$props;
|
2859
2885
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
@@ -2924,7 +2950,7 @@ class GridModalState extends SvelteComponent {
|
|
2924
2950
|
constructor(options) {
|
2925
2951
|
super();
|
2926
2952
|
|
2927
|
-
init(this, options, instance$
|
2953
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, {
|
2928
2954
|
path: 0,
|
2929
2955
|
onClick: 1,
|
2930
2956
|
clickEventName: 2,
|
@@ -2949,11 +2975,11 @@ class GridModalState extends SvelteComponent {
|
|
2949
2975
|
|
2950
2976
|
/* src/components/GridItem.svelte generated by Svelte v3.53.1 */
|
2951
2977
|
|
2952
|
-
function add_css$
|
2978
|
+
function add_css$e(target) {
|
2953
2979
|
append_styles(target, "svelte-n7kdl3", ".grid-item.svelte-n7kdl3{word-break:break-all;position:relative}.grid-item-inner.svelte-n7kdl3{position:absolute;inset:0}");
|
2954
2980
|
}
|
2955
2981
|
|
2956
|
-
function create_fragment$
|
2982
|
+
function create_fragment$g(ctx) {
|
2957
2983
|
let div1;
|
2958
2984
|
let div0;
|
2959
2985
|
let current;
|
@@ -3016,7 +3042,7 @@ function create_fragment$c(ctx) {
|
|
3016
3042
|
};
|
3017
3043
|
}
|
3018
3044
|
|
3019
|
-
function instance$
|
3045
|
+
function instance$g($$self, $$props, $$invalidate) {
|
3020
3046
|
let _style;
|
3021
3047
|
let { $$slots: slots = {}, $$scope } = $$props;
|
3022
3048
|
let { x1 } = $$props;
|
@@ -3069,8 +3095,8 @@ class GridItem extends SvelteComponent {
|
|
3069
3095
|
init(
|
3070
3096
|
this,
|
3071
3097
|
options,
|
3072
|
-
instance$
|
3073
|
-
create_fragment$
|
3098
|
+
instance$g,
|
3099
|
+
create_fragment$g,
|
3074
3100
|
safe_not_equal,
|
3075
3101
|
{
|
3076
3102
|
x1: 2,
|
@@ -3080,18 +3106,18 @@ class GridItem extends SvelteComponent {
|
|
3080
3106
|
z: 6,
|
3081
3107
|
background: 7
|
3082
3108
|
},
|
3083
|
-
add_css$
|
3109
|
+
add_css$e
|
3084
3110
|
);
|
3085
3111
|
}
|
3086
3112
|
}
|
3087
3113
|
|
3088
3114
|
/* src/components/Flex.svelte generated by Svelte v3.53.1 */
|
3089
3115
|
|
3090
|
-
function add_css$
|
3116
|
+
function add_css$d(target) {
|
3091
3117
|
append_styles(target, "svelte-1e71ejc", ".flex.svelte-1e71ejc{display:flex}");
|
3092
3118
|
}
|
3093
3119
|
|
3094
|
-
function create_fragment$
|
3120
|
+
function create_fragment$f(ctx) {
|
3095
3121
|
let div;
|
3096
3122
|
let div_style_value;
|
3097
3123
|
let current;
|
@@ -3156,7 +3182,7 @@ function getFlexContext() {
|
|
3156
3182
|
return getContext(FlexContextKey);
|
3157
3183
|
}
|
3158
3184
|
|
3159
|
-
function instance$
|
3185
|
+
function instance$f($$self, $$props, $$invalidate) {
|
3160
3186
|
let { $$slots: slots = {}, $$scope } = $$props;
|
3161
3187
|
let { direction = 'row' } = $$props;
|
3162
3188
|
let { width = '100%' } = $$props;
|
@@ -3182,8 +3208,8 @@ class Flex extends SvelteComponent {
|
|
3182
3208
|
init(
|
3183
3209
|
this,
|
3184
3210
|
options,
|
3185
|
-
instance$
|
3186
|
-
create_fragment$
|
3211
|
+
instance$f,
|
3212
|
+
create_fragment$f,
|
3187
3213
|
safe_not_equal,
|
3188
3214
|
{
|
3189
3215
|
direction: 0,
|
@@ -3191,18 +3217,18 @@ class Flex extends SvelteComponent {
|
|
3191
3217
|
height: 2,
|
3192
3218
|
_style: 3
|
3193
3219
|
},
|
3194
|
-
add_css$
|
3220
|
+
add_css$d
|
3195
3221
|
);
|
3196
3222
|
}
|
3197
3223
|
}
|
3198
3224
|
|
3199
3225
|
/* src/components/FlexItem.svelte generated by Svelte v3.53.1 */
|
3200
3226
|
|
3201
|
-
function add_css$
|
3227
|
+
function add_css$c(target) {
|
3202
3228
|
append_styles(target, "svelte-1p0bk1x", ".flex-item.svelte-1p0bk1x{max-width:100%;max-height:100%;position:relative;isolation:isolate}");
|
3203
3229
|
}
|
3204
3230
|
|
3205
|
-
function create_fragment$
|
3231
|
+
function create_fragment$e(ctx) {
|
3206
3232
|
let div;
|
3207
3233
|
let current;
|
3208
3234
|
const default_slot_template = /*#slots*/ ctx[4].default;
|
@@ -3260,7 +3286,7 @@ function create_fragment$a(ctx) {
|
|
3260
3286
|
};
|
3261
3287
|
}
|
3262
3288
|
|
3263
|
-
function instance$
|
3289
|
+
function instance$e($$self, $$props, $$invalidate) {
|
3264
3290
|
let { $$slots: slots = {}, $$scope } = $$props;
|
3265
3291
|
let { length } = $$props;
|
3266
3292
|
let { _style = '' } = $$props;
|
@@ -3303,13 +3329,13 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
3303
3329
|
class FlexItem extends SvelteComponent {
|
3304
3330
|
constructor(options) {
|
3305
3331
|
super();
|
3306
|
-
init(this, options, instance$
|
3332
|
+
init(this, options, instance$e, create_fragment$e, safe_not_equal, { length: 1, _style: 2 }, add_css$c);
|
3307
3333
|
}
|
3308
3334
|
}
|
3309
3335
|
|
3310
3336
|
/* src/components/RenderText.svelte generated by Svelte v3.53.1 */
|
3311
3337
|
|
3312
|
-
function get_each_context(ctx, list, i) {
|
3338
|
+
function get_each_context$1(ctx, list, i) {
|
3313
3339
|
const child_ctx = ctx.slice();
|
3314
3340
|
child_ctx[2] = list[i];
|
3315
3341
|
return child_ctx;
|
@@ -3355,7 +3381,7 @@ function create_if_block(ctx) {
|
|
3355
3381
|
}
|
3356
3382
|
|
3357
3383
|
// (9:0) {#each items as item}
|
3358
|
-
function create_each_block(ctx) {
|
3384
|
+
function create_each_block$1(ctx) {
|
3359
3385
|
let show_if;
|
3360
3386
|
let if_block_anchor;
|
3361
3387
|
|
@@ -3398,13 +3424,13 @@ function create_each_block(ctx) {
|
|
3398
3424
|
};
|
3399
3425
|
}
|
3400
3426
|
|
3401
|
-
function create_fragment$
|
3427
|
+
function create_fragment$d(ctx) {
|
3402
3428
|
let each_1_anchor;
|
3403
3429
|
let each_value = /*items*/ ctx[0];
|
3404
3430
|
let each_blocks = [];
|
3405
3431
|
|
3406
3432
|
for (let i = 0; i < each_value.length; i += 1) {
|
3407
|
-
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
3433
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
3408
3434
|
}
|
3409
3435
|
|
3410
3436
|
return {
|
@@ -3428,12 +3454,12 @@ function create_fragment$9(ctx) {
|
|
3428
3454
|
let i;
|
3429
3455
|
|
3430
3456
|
for (i = 0; i < each_value.length; i += 1) {
|
3431
|
-
const child_ctx = get_each_context(ctx, each_value, i);
|
3457
|
+
const child_ctx = get_each_context$1(ctx, each_value, i);
|
3432
3458
|
|
3433
3459
|
if (each_blocks[i]) {
|
3434
3460
|
each_blocks[i].p(child_ctx, dirty);
|
3435
3461
|
} else {
|
3436
|
-
each_blocks[i] = create_each_block(child_ctx);
|
3462
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
3437
3463
|
each_blocks[i].c();
|
3438
3464
|
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
3439
3465
|
}
|
@@ -3457,7 +3483,7 @@ function create_fragment$9(ctx) {
|
|
3457
3483
|
|
3458
3484
|
const regexp = /(\r?\n)/;
|
3459
3485
|
|
3460
|
-
function instance$
|
3486
|
+
function instance$d($$self, $$props, $$invalidate) {
|
3461
3487
|
let items;
|
3462
3488
|
let { text = 'サンプルSample' } = $$props;
|
3463
3489
|
|
@@ -3477,17 +3503,17 @@ function instance$9($$self, $$props, $$invalidate) {
|
|
3477
3503
|
class RenderText extends SvelteComponent {
|
3478
3504
|
constructor(options) {
|
3479
3505
|
super();
|
3480
|
-
init(this, options, instance$
|
3506
|
+
init(this, options, instance$d, create_fragment$d, safe_not_equal, { text: 1 });
|
3481
3507
|
}
|
3482
3508
|
}
|
3483
3509
|
|
3484
3510
|
/* src/components/TextElement.svelte generated by Svelte v3.53.1 */
|
3485
3511
|
|
3486
|
-
function add_css$
|
3512
|
+
function add_css$b(target) {
|
3487
3513
|
append_styles(target, "svelte-ww7ebs", ".text-element.svelte-ww7ebs{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto}.text-element-inner.svelte-ww7ebs{width:100%}");
|
3488
3514
|
}
|
3489
3515
|
|
3490
|
-
function create_fragment$
|
3516
|
+
function create_fragment$c(ctx) {
|
3491
3517
|
let div1;
|
3492
3518
|
let div0;
|
3493
3519
|
let rendertext;
|
@@ -3534,7 +3560,7 @@ function create_fragment$8(ctx) {
|
|
3534
3560
|
};
|
3535
3561
|
}
|
3536
3562
|
|
3537
|
-
function instance$
|
3563
|
+
function instance$c($$self, $$props, $$invalidate) {
|
3538
3564
|
let style;
|
3539
3565
|
let { text = 'サンプルSample' } = $$props;
|
3540
3566
|
let { _textStyle = 'font-size:12px;' } = $$props;
|
@@ -3558,17 +3584,17 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
3558
3584
|
class TextElement extends SvelteComponent {
|
3559
3585
|
constructor(options) {
|
3560
3586
|
super();
|
3561
|
-
init(this, options, instance$
|
3587
|
+
init(this, options, instance$c, create_fragment$c, safe_not_equal, { text: 0, _textStyle: 2, _style: 3 }, add_css$b);
|
3562
3588
|
}
|
3563
3589
|
}
|
3564
3590
|
|
3565
3591
|
/* src/components/TextButtonElement.svelte generated by Svelte v3.53.1 */
|
3566
3592
|
|
3567
|
-
function add_css$
|
3593
|
+
function add_css$a(target) {
|
3568
3594
|
append_styles(target, "svelte-tx5xf5", ".text-button-element.svelte-tx5xf5{width:100%;height:100%}.text-button.svelte-tx5xf5{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s;white-space:pre-wrap;overflow:hidden}.text-button.svelte-tx5xf5:active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button.svelte-tx5xf5:hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
|
3569
3595
|
}
|
3570
3596
|
|
3571
|
-
function create_fragment$
|
3597
|
+
function create_fragment$b(ctx) {
|
3572
3598
|
let div;
|
3573
3599
|
let button;
|
3574
3600
|
let rendertext;
|
@@ -3629,7 +3655,7 @@ function create_fragment$7(ctx) {
|
|
3629
3655
|
};
|
3630
3656
|
}
|
3631
3657
|
|
3632
|
-
function instance$
|
3658
|
+
function instance$b($$self, $$props, $$invalidate) {
|
3633
3659
|
let { text = 'ボタンラベル' } = $$props;
|
3634
3660
|
let { onClick = { operation: 'none', args: [] } } = $$props;
|
3635
3661
|
|
@@ -3663,8 +3689,8 @@ class TextButtonElement extends SvelteComponent {
|
|
3663
3689
|
init(
|
3664
3690
|
this,
|
3665
3691
|
options,
|
3666
|
-
instance$
|
3667
|
-
create_fragment$
|
3692
|
+
instance$b,
|
3693
|
+
create_fragment$b,
|
3668
3694
|
safe_not_equal,
|
3669
3695
|
{
|
3670
3696
|
text: 0,
|
@@ -3673,18 +3699,18 @@ class TextButtonElement extends SvelteComponent {
|
|
3673
3699
|
_buttonStyle: 1,
|
3674
3700
|
_style: 2
|
3675
3701
|
},
|
3676
|
-
add_css$
|
3702
|
+
add_css$a
|
3677
3703
|
);
|
3678
3704
|
}
|
3679
3705
|
}
|
3680
3706
|
|
3681
3707
|
/* src/components/ImageElement.svelte generated by Svelte v3.53.1 */
|
3682
3708
|
|
3683
|
-
function add_css$
|
3709
|
+
function add_css$9(target) {
|
3684
3710
|
append_styles(target, "svelte-t8kpqw", ".image-element.svelte-t8kpqw{display:flex;position:relative;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;white-space:nowrap;box-sizing:border-box;overflow:hidden}.image.svelte-t8kpqw{width:100%;height:100%}.transport.svelte-t8kpqw:hover,.transport.svelte-t8kpqw:focus{opacity:0.75;box-shadow:0 5px 16px rgba(0, 0, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.16)}");
|
3685
3711
|
}
|
3686
3712
|
|
3687
|
-
function create_fragment$
|
3713
|
+
function create_fragment$a(ctx) {
|
3688
3714
|
let div;
|
3689
3715
|
let img;
|
3690
3716
|
let img_src_value;
|
@@ -3746,7 +3772,7 @@ function create_fragment$6(ctx) {
|
|
3746
3772
|
};
|
3747
3773
|
}
|
3748
3774
|
|
3749
|
-
function instance$
|
3775
|
+
function instance$a($$self, $$props, $$invalidate) {
|
3750
3776
|
let { src = 'https://admin.karte.io/action-editor2/public/images/no_image_en.svg' } = $$props;
|
3751
3777
|
let { alt = 'No Image' } = $$props;
|
3752
3778
|
let { transport = false } = $$props;
|
@@ -3784,8 +3810,8 @@ class ImageElement extends SvelteComponent {
|
|
3784
3810
|
init(
|
3785
3811
|
this,
|
3786
3812
|
options,
|
3787
|
-
instance$
|
3788
|
-
create_fragment$
|
3813
|
+
instance$a,
|
3814
|
+
create_fragment$a,
|
3789
3815
|
safe_not_equal,
|
3790
3816
|
{
|
3791
3817
|
src: 0,
|
@@ -3796,18 +3822,18 @@ class ImageElement extends SvelteComponent {
|
|
3796
3822
|
_imageStyle: 3,
|
3797
3823
|
_style: 4
|
3798
3824
|
},
|
3799
|
-
add_css$
|
3825
|
+
add_css$9
|
3800
3826
|
);
|
3801
3827
|
}
|
3802
3828
|
}
|
3803
3829
|
|
3804
3830
|
/* src/components/List.svelte generated by Svelte v3.53.1 */
|
3805
3831
|
|
3806
|
-
function add_css$
|
3832
|
+
function add_css$8(target) {
|
3807
3833
|
append_styles(target, "svelte-dfqtyx", ".list.svelte-dfqtyx{display:flex;width:100%;height:100%;overflow:hidden}");
|
3808
3834
|
}
|
3809
3835
|
|
3810
|
-
function create_fragment$
|
3836
|
+
function create_fragment$9(ctx) {
|
3811
3837
|
let div;
|
3812
3838
|
let current;
|
3813
3839
|
const default_slot_template = /*#slots*/ ctx[6].default;
|
@@ -3867,7 +3893,7 @@ function create_fragment$5(ctx) {
|
|
3867
3893
|
|
3868
3894
|
const LIST_CONTEXT_KEY = Symbol();
|
3869
3895
|
|
3870
|
-
function instance$
|
3896
|
+
function instance$9($$self, $$props, $$invalidate) {
|
3871
3897
|
let style;
|
3872
3898
|
let { $$slots: slots = {}, $$scope } = $$props;
|
3873
3899
|
let { direction = 'vertical' } = $$props;
|
@@ -3934,8 +3960,8 @@ class List extends SvelteComponent {
|
|
3934
3960
|
init(
|
3935
3961
|
this,
|
3936
3962
|
options,
|
3937
|
-
instance$
|
3938
|
-
create_fragment$
|
3963
|
+
instance$9,
|
3964
|
+
create_fragment$9,
|
3939
3965
|
safe_not_equal,
|
3940
3966
|
{
|
3941
3967
|
direction: 1,
|
@@ -3943,18 +3969,18 @@ class List extends SvelteComponent {
|
|
3943
3969
|
background: 3,
|
3944
3970
|
_style: 4
|
3945
3971
|
},
|
3946
|
-
add_css$
|
3972
|
+
add_css$8
|
3947
3973
|
);
|
3948
3974
|
}
|
3949
3975
|
}
|
3950
3976
|
|
3951
3977
|
/* src/components/ListItem.svelte generated by Svelte v3.53.1 */
|
3952
3978
|
|
3953
|
-
function add_css$
|
3979
|
+
function add_css$7(target) {
|
3954
3980
|
append_styles(target, "svelte-h5j4xe", ".list-item.svelte-h5j4xe{flex:auto;box-sizing:border-box;min-width:0;min-height:0;position:relative}.list-item-inner.svelte-h5j4xe{position:absolute;inset:0}");
|
3955
3981
|
}
|
3956
3982
|
|
3957
|
-
function create_fragment$
|
3983
|
+
function create_fragment$8(ctx) {
|
3958
3984
|
let div1;
|
3959
3985
|
let div0;
|
3960
3986
|
let current;
|
@@ -4035,7 +4061,7 @@ function create_fragment$4(ctx) {
|
|
4035
4061
|
};
|
4036
4062
|
}
|
4037
4063
|
|
4038
|
-
function instance$
|
4064
|
+
function instance$8($$self, $$props, $$invalidate) {
|
4039
4065
|
let click;
|
4040
4066
|
let listItemStyle;
|
4041
4067
|
let { $$slots: slots = {}, $$scope } = $$props;
|
@@ -4125,17 +4151,17 @@ function instance$4($$self, $$props, $$invalidate) {
|
|
4125
4151
|
class ListItem extends SvelteComponent {
|
4126
4152
|
constructor(options) {
|
4127
4153
|
super();
|
4128
|
-
init(this, options, instance$
|
4154
|
+
init(this, options, instance$8, create_fragment$8, safe_not_equal, { onClick: 3, clickEventName: 4, _style: 0 }, add_css$7);
|
4129
4155
|
}
|
4130
4156
|
}
|
4131
4157
|
|
4132
4158
|
/* src/components/EmbedElement.svelte generated by Svelte v3.53.1 */
|
4133
4159
|
|
4134
|
-
function add_css$
|
4160
|
+
function add_css$6(target) {
|
4135
4161
|
append_styles(target, "svelte-k86zna", ".embed.svelte-k86zna{position:relative;box-shadow:0 1px rgba(0, 0, 0, 0.06);padding-top:56.25%;overflow:hidden}.embed.svelte-k86zna iframe{position:absolute;top:0;left:0;width:100%;height:100%}");
|
4136
4162
|
}
|
4137
4163
|
|
4138
|
-
function create_fragment$
|
4164
|
+
function create_fragment$7(ctx) {
|
4139
4165
|
let div;
|
4140
4166
|
|
4141
4167
|
return {
|
@@ -4162,7 +4188,7 @@ function create_fragment$3(ctx) {
|
|
4162
4188
|
};
|
4163
4189
|
}
|
4164
4190
|
|
4165
|
-
function instance$
|
4191
|
+
function instance$7($$self, $$props, $$invalidate) {
|
4166
4192
|
let { code } = $$props;
|
4167
4193
|
let { _style = '' } = $$props;
|
4168
4194
|
|
@@ -4177,7 +4203,572 @@ function instance$3($$self, $$props, $$invalidate) {
|
|
4177
4203
|
class EmbedElement extends SvelteComponent {
|
4178
4204
|
constructor(options) {
|
4179
4205
|
super();
|
4180
|
-
init(this, options, instance$
|
4206
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { code: 0, _style: 1 }, add_css$6);
|
4207
|
+
}
|
4208
|
+
}
|
4209
|
+
|
4210
|
+
/* src/components/Form.svelte generated by Svelte v3.53.1 */
|
4211
|
+
|
4212
|
+
function add_css$5(target) {
|
4213
|
+
append_styles(target, "svelte-1il0aow", ".form.svelte-1il0aow{width:100%;height:100%}");
|
4214
|
+
}
|
4215
|
+
|
4216
|
+
function create_fragment$6(ctx) {
|
4217
|
+
let div;
|
4218
|
+
let current;
|
4219
|
+
const default_slot_template = /*#slots*/ ctx[4].default;
|
4220
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
|
4221
|
+
|
4222
|
+
return {
|
4223
|
+
c() {
|
4224
|
+
div = element("div");
|
4225
|
+
if (default_slot) default_slot.c();
|
4226
|
+
attr(div, "class", "form svelte-1il0aow");
|
4227
|
+
},
|
4228
|
+
m(target, anchor) {
|
4229
|
+
insert(target, div, anchor);
|
4230
|
+
|
4231
|
+
if (default_slot) {
|
4232
|
+
default_slot.m(div, null);
|
4233
|
+
}
|
4234
|
+
|
4235
|
+
current = true;
|
4236
|
+
},
|
4237
|
+
p(ctx, [dirty]) {
|
4238
|
+
if (default_slot) {
|
4239
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 8)) {
|
4240
|
+
update_slot_base(
|
4241
|
+
default_slot,
|
4242
|
+
default_slot_template,
|
4243
|
+
ctx,
|
4244
|
+
/*$$scope*/ ctx[3],
|
4245
|
+
!current
|
4246
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
|
4247
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
|
4248
|
+
null
|
4249
|
+
);
|
4250
|
+
}
|
4251
|
+
}
|
4252
|
+
},
|
4253
|
+
i(local) {
|
4254
|
+
if (current) return;
|
4255
|
+
transition_in(default_slot, local);
|
4256
|
+
current = true;
|
4257
|
+
},
|
4258
|
+
o(local) {
|
4259
|
+
transition_out(default_slot, local);
|
4260
|
+
current = false;
|
4261
|
+
},
|
4262
|
+
d(detaching) {
|
4263
|
+
if (detaching) detach(div);
|
4264
|
+
if (default_slot) default_slot.d(detaching);
|
4265
|
+
}
|
4266
|
+
};
|
4267
|
+
}
|
4268
|
+
|
4269
|
+
const FORM_CONTEXT_KEY = Symbol();
|
4270
|
+
|
4271
|
+
function getValue($formData, name) {
|
4272
|
+
return $formData._data[name];
|
4273
|
+
}
|
4274
|
+
|
4275
|
+
function updateValue(data, name, update) {
|
4276
|
+
data.update(prev => {
|
4277
|
+
const { value, isValid } = update(prev._data[name]);
|
4278
|
+
prev._data[name] = value;
|
4279
|
+
prev._isValidMap[name] = isValid;
|
4280
|
+
return { ...prev };
|
4281
|
+
});
|
4282
|
+
}
|
4283
|
+
|
4284
|
+
function checkIfDataAreValid($formData) {
|
4285
|
+
const dataAreValid = Object.entries($formData._data).reduce(
|
4286
|
+
(dataAreValid, [name]) => {
|
4287
|
+
return dataAreValid && ($formData._isValidMap[name] ?? true);
|
4288
|
+
},
|
4289
|
+
true
|
4290
|
+
);
|
4291
|
+
|
4292
|
+
return dataAreValid;
|
4293
|
+
}
|
4294
|
+
|
4295
|
+
const createFormDataAccessor = formId => {
|
4296
|
+
const variableKey = `_form_${formId}`;
|
4297
|
+
|
4298
|
+
const update = updater => {
|
4299
|
+
customVariables.update(prev => {
|
4300
|
+
const updatedFormData = updater(prev[variableKey] ?? {});
|
4301
|
+
return { ...prev, [variableKey]: updatedFormData };
|
4302
|
+
});
|
4303
|
+
};
|
4304
|
+
|
4305
|
+
const subscribe = run => {
|
4306
|
+
return customVariables.subscribe(value => {
|
4307
|
+
const formData = value[variableKey] ?? {};
|
4308
|
+
run(formData);
|
4309
|
+
});
|
4310
|
+
};
|
4311
|
+
|
4312
|
+
const set = value => {
|
4313
|
+
customVariables.update(prev => {
|
4314
|
+
return { ...prev, [variableKey]: value };
|
4315
|
+
});
|
4316
|
+
};
|
4317
|
+
|
4318
|
+
return { update, set, subscribe };
|
4319
|
+
};
|
4320
|
+
|
4321
|
+
function instance$6($$self, $$props, $$invalidate) {
|
4322
|
+
let $formData;
|
4323
|
+
let $formComponentData;
|
4324
|
+
let { $$slots: slots = {}, $$scope } = $$props;
|
4325
|
+
let { formId = 'form0' } = $$props;
|
4326
|
+
const formComponentData = writable({ _data: {}, _isValidMap: {} });
|
4327
|
+
component_subscribe($$self, formComponentData, value => $$invalidate(6, $formComponentData = value));
|
4328
|
+
|
4329
|
+
setContext(FORM_CONTEXT_KEY, {
|
4330
|
+
formComponentData,
|
4331
|
+
submit: ({ stateId }) => {
|
4332
|
+
if (checkIfDataAreValid($formComponentData)) {
|
4333
|
+
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
4334
|
+
console.log('will send', $formData);
|
4335
|
+
setState$1(stateId, true);
|
4336
|
+
}
|
4337
|
+
},
|
4338
|
+
next: ({ stateId }) => {
|
4339
|
+
if (checkIfDataAreValid($formComponentData)) {
|
4340
|
+
formData.update(prev => ({ ...prev, ...$formComponentData._data }));
|
4341
|
+
setState$1(stateId, true);
|
4342
|
+
console.log('formData after next()', $formData);
|
4343
|
+
}
|
4344
|
+
},
|
4345
|
+
prev: ({ stateId }) => {
|
4346
|
+
formData.update(prev => {
|
4347
|
+
Object.keys($formComponentData._data).forEach(name => {
|
4348
|
+
delete prev[name];
|
4349
|
+
});
|
4350
|
+
|
4351
|
+
return { ...prev };
|
4352
|
+
});
|
4353
|
+
|
4354
|
+
setState$1(stateId, true);
|
4355
|
+
console.log('formData after prev()', $formData);
|
4356
|
+
}
|
4357
|
+
});
|
4358
|
+
|
4359
|
+
const formData = createFormDataAccessor(formId);
|
4360
|
+
component_subscribe($$self, formData, value => $$invalidate(5, $formData = value));
|
4361
|
+
|
4362
|
+
$$self.$$set = $$props => {
|
4363
|
+
if ('formId' in $$props) $$invalidate(2, formId = $$props.formId);
|
4364
|
+
if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
|
4365
|
+
};
|
4366
|
+
|
4367
|
+
return [formComponentData, formData, formId, $$scope, slots];
|
4368
|
+
}
|
4369
|
+
|
4370
|
+
class Form extends SvelteComponent {
|
4371
|
+
constructor(options) {
|
4372
|
+
super();
|
4373
|
+
init(this, options, instance$6, create_fragment$6, safe_not_equal, { formId: 2 }, add_css$5);
|
4374
|
+
}
|
4375
|
+
}
|
4376
|
+
|
4377
|
+
/* src/components/FormTextarea.svelte generated by Svelte v3.53.1 */
|
4378
|
+
|
4379
|
+
function add_css$4(target) {
|
4380
|
+
append_styles(target, "svelte-kyay3k", ".textarea-wrapper.svelte-kyay3k{display:flex;align-items:center;width:100%;height:100%}.textarea.svelte-kyay3k{width:100%;resize:none}");
|
4381
|
+
}
|
4382
|
+
|
4383
|
+
function create_fragment$5(ctx) {
|
4384
|
+
let div;
|
4385
|
+
let textarea;
|
4386
|
+
let mounted;
|
4387
|
+
let dispose;
|
4388
|
+
|
4389
|
+
return {
|
4390
|
+
c() {
|
4391
|
+
div = element("div");
|
4392
|
+
textarea = element("textarea");
|
4393
|
+
attr(textarea, "class", "textarea svelte-kyay3k");
|
4394
|
+
textarea.value = /*value*/ ctx[3];
|
4395
|
+
textarea.required = /*required*/ ctx[0];
|
4396
|
+
attr(textarea, "rows", /*rows*/ ctx[1]);
|
4397
|
+
attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
|
4398
|
+
attr(div, "class", "textarea-wrapper svelte-kyay3k");
|
4399
|
+
},
|
4400
|
+
m(target, anchor) {
|
4401
|
+
insert(target, div, anchor);
|
4402
|
+
append(div, textarea);
|
4403
|
+
|
4404
|
+
if (!mounted) {
|
4405
|
+
dispose = listen(textarea, "input", /*handleInput*/ ctx[5]);
|
4406
|
+
mounted = true;
|
4407
|
+
}
|
4408
|
+
},
|
4409
|
+
p(ctx, [dirty]) {
|
4410
|
+
if (dirty & /*value*/ 8) {
|
4411
|
+
textarea.value = /*value*/ ctx[3];
|
4412
|
+
}
|
4413
|
+
|
4414
|
+
if (dirty & /*required*/ 1) {
|
4415
|
+
textarea.required = /*required*/ ctx[0];
|
4416
|
+
}
|
4417
|
+
|
4418
|
+
if (dirty & /*rows*/ 2) {
|
4419
|
+
attr(textarea, "rows", /*rows*/ ctx[1]);
|
4420
|
+
}
|
4421
|
+
|
4422
|
+
if (dirty & /*placeholder*/ 4) {
|
4423
|
+
attr(textarea, "placeholder", /*placeholder*/ ctx[2]);
|
4424
|
+
}
|
4425
|
+
},
|
4426
|
+
i: noop,
|
4427
|
+
o: noop,
|
4428
|
+
d(detaching) {
|
4429
|
+
if (detaching) detach(div);
|
4430
|
+
mounted = false;
|
4431
|
+
dispose();
|
4432
|
+
}
|
4433
|
+
};
|
4434
|
+
}
|
4435
|
+
|
4436
|
+
function instance$5($$self, $$props, $$invalidate) {
|
4437
|
+
let value;
|
4438
|
+
let $formComponentData;
|
4439
|
+
let { name = '' } = $$props;
|
4440
|
+
let { required = true } = $$props;
|
4441
|
+
let { rows = 2 } = $$props;
|
4442
|
+
let { placeholder = '' } = $$props;
|
4443
|
+
const { formComponentData } = getContext(FORM_CONTEXT_KEY);
|
4444
|
+
component_subscribe($$self, formComponentData, value => $$invalidate(7, $formComponentData = value));
|
4445
|
+
|
4446
|
+
function setValue(value) {
|
4447
|
+
updateValue(formComponentData, name, () => ({
|
4448
|
+
value,
|
4449
|
+
isValid: required ? !!value : true
|
4450
|
+
}));
|
4451
|
+
}
|
4452
|
+
|
4453
|
+
function handleInput(event) {
|
4454
|
+
const value = event.target.value;
|
4455
|
+
setValue(value);
|
4456
|
+
}
|
4457
|
+
|
4458
|
+
setValue(value);
|
4459
|
+
|
4460
|
+
$$self.$$set = $$props => {
|
4461
|
+
if ('name' in $$props) $$invalidate(6, name = $$props.name);
|
4462
|
+
if ('required' in $$props) $$invalidate(0, required = $$props.required);
|
4463
|
+
if ('rows' in $$props) $$invalidate(1, rows = $$props.rows);
|
4464
|
+
if ('placeholder' in $$props) $$invalidate(2, placeholder = $$props.placeholder);
|
4465
|
+
};
|
4466
|
+
|
4467
|
+
$$self.$$.update = () => {
|
4468
|
+
if ($$self.$$.dirty & /*$formComponentData, name*/ 192) {
|
4469
|
+
$$invalidate(3, value = getValue($formComponentData, name) ?? '');
|
4470
|
+
}
|
4471
|
+
};
|
4472
|
+
|
4473
|
+
return [
|
4474
|
+
required,
|
4475
|
+
rows,
|
4476
|
+
placeholder,
|
4477
|
+
value,
|
4478
|
+
formComponentData,
|
4479
|
+
handleInput,
|
4480
|
+
name,
|
4481
|
+
$formComponentData
|
4482
|
+
];
|
4483
|
+
}
|
4484
|
+
|
4485
|
+
class FormTextarea extends SvelteComponent {
|
4486
|
+
constructor(options) {
|
4487
|
+
super();
|
4488
|
+
|
4489
|
+
init(
|
4490
|
+
this,
|
4491
|
+
options,
|
4492
|
+
instance$5,
|
4493
|
+
create_fragment$5,
|
4494
|
+
safe_not_equal,
|
4495
|
+
{
|
4496
|
+
name: 6,
|
4497
|
+
required: 0,
|
4498
|
+
rows: 1,
|
4499
|
+
placeholder: 2
|
4500
|
+
},
|
4501
|
+
add_css$4
|
4502
|
+
);
|
4503
|
+
}
|
4504
|
+
}
|
4505
|
+
|
4506
|
+
/* src/components/FormButton.svelte generated by Svelte v3.53.1 */
|
4507
|
+
|
4508
|
+
function create_fragment$4(ctx) {
|
4509
|
+
let input;
|
4510
|
+
let mounted;
|
4511
|
+
let dispose;
|
4512
|
+
|
4513
|
+
return {
|
4514
|
+
c() {
|
4515
|
+
input = element("input");
|
4516
|
+
attr(input, "type", "button");
|
4517
|
+
set_style(input, "width", "100%");
|
4518
|
+
set_style(input, "height", "100%");
|
4519
|
+
input.value = /*text*/ ctx[0];
|
4520
|
+
input.disabled = /*disabled*/ ctx[1];
|
4521
|
+
},
|
4522
|
+
m(target, anchor) {
|
4523
|
+
insert(target, input, anchor);
|
4524
|
+
|
4525
|
+
if (!mounted) {
|
4526
|
+
dispose = listen(input, "click", /*handleClick*/ ctx[3]);
|
4527
|
+
mounted = true;
|
4528
|
+
}
|
4529
|
+
},
|
4530
|
+
p(ctx, [dirty]) {
|
4531
|
+
if (dirty & /*text*/ 1) {
|
4532
|
+
input.value = /*text*/ ctx[0];
|
4533
|
+
}
|
4534
|
+
|
4535
|
+
if (dirty & /*disabled*/ 2) {
|
4536
|
+
input.disabled = /*disabled*/ ctx[1];
|
4537
|
+
}
|
4538
|
+
},
|
4539
|
+
i: noop,
|
4540
|
+
o: noop,
|
4541
|
+
d(detaching) {
|
4542
|
+
if (detaching) detach(input);
|
4543
|
+
mounted = false;
|
4544
|
+
dispose();
|
4545
|
+
}
|
4546
|
+
};
|
4547
|
+
}
|
4548
|
+
|
4549
|
+
function instance$4($$self, $$props, $$invalidate) {
|
4550
|
+
let disabled;
|
4551
|
+
let $formComponentData;
|
4552
|
+
let { text = '' } = $$props;
|
4553
|
+
let { type = { type: 'submit' } } = $$props;
|
4554
|
+
const { formComponentData, submit, next, prev } = getContext(FORM_CONTEXT_KEY);
|
4555
|
+
component_subscribe($$self, formComponentData, value => $$invalidate(5, $formComponentData = value));
|
4556
|
+
|
4557
|
+
function handleClick() {
|
4558
|
+
switch (type.type) {
|
4559
|
+
case 'submit':
|
4560
|
+
{
|
4561
|
+
const stateId = type.stateId;
|
4562
|
+
submit({ stateId });
|
4563
|
+
break;
|
4564
|
+
}
|
4565
|
+
case 'next':
|
4566
|
+
{
|
4567
|
+
const stateId = type.stateId;
|
4568
|
+
next({ stateId });
|
4569
|
+
break;
|
4570
|
+
}
|
4571
|
+
case 'prev':
|
4572
|
+
{
|
4573
|
+
const stateId = type.stateId;
|
4574
|
+
prev({ stateId });
|
4575
|
+
break;
|
4576
|
+
}
|
4577
|
+
}
|
4578
|
+
}
|
4579
|
+
|
4580
|
+
$$self.$$set = $$props => {
|
4581
|
+
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
4582
|
+
if ('type' in $$props) $$invalidate(4, type = $$props.type);
|
4583
|
+
};
|
4584
|
+
|
4585
|
+
$$self.$$.update = () => {
|
4586
|
+
if ($$self.$$.dirty & /*type, $formComponentData*/ 48) {
|
4587
|
+
$$invalidate(1, disabled = (() => {
|
4588
|
+
if (type.type === 'prev') return false;
|
4589
|
+
|
4590
|
+
const dataAreValid = Object.entries($formComponentData._data).reduce(
|
4591
|
+
(dataAreValid, [name]) => {
|
4592
|
+
return dataAreValid && ($formComponentData._isValidMap[name] ?? true);
|
4593
|
+
},
|
4594
|
+
true
|
4595
|
+
);
|
4596
|
+
|
4597
|
+
return !dataAreValid;
|
4598
|
+
})());
|
4599
|
+
}
|
4600
|
+
};
|
4601
|
+
|
4602
|
+
return [text, disabled, formComponentData, handleClick, type, $formComponentData];
|
4603
|
+
}
|
4604
|
+
|
4605
|
+
class FormButton extends SvelteComponent {
|
4606
|
+
constructor(options) {
|
4607
|
+
super();
|
4608
|
+
init(this, options, instance$4, create_fragment$4, safe_not_equal, { text: 0, type: 4 });
|
4609
|
+
}
|
4610
|
+
}
|
4611
|
+
|
4612
|
+
/* src/components/FormRadioButtons.svelte generated by Svelte v3.53.1 */
|
4613
|
+
|
4614
|
+
function add_css$3(target) {
|
4615
|
+
append_styles(target, "svelte-1ajmbw1", ".radio-buttons.svelte-1ajmbw1{display:flex;justify-content:center;flex-direction:column;width:100%;height:100%}");
|
4616
|
+
}
|
4617
|
+
|
4618
|
+
function get_each_context(ctx, list, i) {
|
4619
|
+
const child_ctx = ctx.slice();
|
4620
|
+
child_ctx[5] = list[i];
|
4621
|
+
child_ctx[7] = i;
|
4622
|
+
return child_ctx;
|
4623
|
+
}
|
4624
|
+
|
4625
|
+
// (16:2) {#each _options as option, i}
|
4626
|
+
function create_each_block(ctx) {
|
4627
|
+
let label;
|
4628
|
+
let input;
|
4629
|
+
let input_value_value;
|
4630
|
+
let t0;
|
4631
|
+
let t1_value = /*option*/ ctx[5] + "";
|
4632
|
+
let t1;
|
4633
|
+
let t2;
|
4634
|
+
let mounted;
|
4635
|
+
let dispose;
|
4636
|
+
|
4637
|
+
return {
|
4638
|
+
c() {
|
4639
|
+
label = element("label");
|
4640
|
+
input = element("input");
|
4641
|
+
t0 = space();
|
4642
|
+
t1 = text(t1_value);
|
4643
|
+
t2 = space();
|
4644
|
+
attr(input, "type", "radio");
|
4645
|
+
attr(input, "name", /*name*/ ctx[0]);
|
4646
|
+
input.value = input_value_value = /*option*/ ctx[5];
|
4647
|
+
},
|
4648
|
+
m(target, anchor) {
|
4649
|
+
insert(target, label, anchor);
|
4650
|
+
append(label, input);
|
4651
|
+
append(label, t0);
|
4652
|
+
append(label, t1);
|
4653
|
+
append(label, t2);
|
4654
|
+
|
4655
|
+
if (!mounted) {
|
4656
|
+
dispose = listen(input, "change", /*handleChange*/ ctx[2](/*i*/ ctx[7]));
|
4657
|
+
mounted = true;
|
4658
|
+
}
|
4659
|
+
},
|
4660
|
+
p(new_ctx, dirty) {
|
4661
|
+
ctx = new_ctx;
|
4662
|
+
|
4663
|
+
if (dirty & /*name*/ 1) {
|
4664
|
+
attr(input, "name", /*name*/ ctx[0]);
|
4665
|
+
}
|
4666
|
+
|
4667
|
+
if (dirty & /*_options*/ 2 && input_value_value !== (input_value_value = /*option*/ ctx[5])) {
|
4668
|
+
input.value = input_value_value;
|
4669
|
+
}
|
4670
|
+
|
4671
|
+
if (dirty & /*_options*/ 2 && t1_value !== (t1_value = /*option*/ ctx[5] + "")) set_data(t1, t1_value);
|
4672
|
+
},
|
4673
|
+
d(detaching) {
|
4674
|
+
if (detaching) detach(label);
|
4675
|
+
mounted = false;
|
4676
|
+
dispose();
|
4677
|
+
}
|
4678
|
+
};
|
4679
|
+
}
|
4680
|
+
|
4681
|
+
function create_fragment$3(ctx) {
|
4682
|
+
let div;
|
4683
|
+
let each_value = /*_options*/ ctx[1];
|
4684
|
+
let each_blocks = [];
|
4685
|
+
|
4686
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
4687
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
4688
|
+
}
|
4689
|
+
|
4690
|
+
return {
|
4691
|
+
c() {
|
4692
|
+
div = element("div");
|
4693
|
+
|
4694
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
4695
|
+
each_blocks[i].c();
|
4696
|
+
}
|
4697
|
+
|
4698
|
+
attr(div, "class", "radio-buttons svelte-1ajmbw1");
|
4699
|
+
},
|
4700
|
+
m(target, anchor) {
|
4701
|
+
insert(target, div, anchor);
|
4702
|
+
|
4703
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
4704
|
+
each_blocks[i].m(div, null);
|
4705
|
+
}
|
4706
|
+
},
|
4707
|
+
p(ctx, [dirty]) {
|
4708
|
+
if (dirty & /*_options, name, handleChange*/ 7) {
|
4709
|
+
each_value = /*_options*/ ctx[1];
|
4710
|
+
let i;
|
4711
|
+
|
4712
|
+
for (i = 0; i < each_value.length; i += 1) {
|
4713
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
4714
|
+
|
4715
|
+
if (each_blocks[i]) {
|
4716
|
+
each_blocks[i].p(child_ctx, dirty);
|
4717
|
+
} else {
|
4718
|
+
each_blocks[i] = create_each_block(child_ctx);
|
4719
|
+
each_blocks[i].c();
|
4720
|
+
each_blocks[i].m(div, null);
|
4721
|
+
}
|
4722
|
+
}
|
4723
|
+
|
4724
|
+
for (; i < each_blocks.length; i += 1) {
|
4725
|
+
each_blocks[i].d(1);
|
4726
|
+
}
|
4727
|
+
|
4728
|
+
each_blocks.length = each_value.length;
|
4729
|
+
}
|
4730
|
+
},
|
4731
|
+
i: noop,
|
4732
|
+
o: noop,
|
4733
|
+
d(detaching) {
|
4734
|
+
if (detaching) detach(div);
|
4735
|
+
destroy_each(each_blocks, detaching);
|
4736
|
+
}
|
4737
|
+
};
|
4738
|
+
}
|
4739
|
+
|
4740
|
+
function instance$3($$self, $$props, $$invalidate) {
|
4741
|
+
let _options;
|
4742
|
+
let { name = '' } = $$props;
|
4743
|
+
let { options = '人参,レタス,キャベツ' } = $$props;
|
4744
|
+
const { formComponentData } = getContext(FORM_CONTEXT_KEY);
|
4745
|
+
|
4746
|
+
const handleChange = index => event => {
|
4747
|
+
if (event.target.checked) {
|
4748
|
+
updateValue(formComponentData, name, () => ({ value: _options[index], isValid: true }));
|
4749
|
+
}
|
4750
|
+
};
|
4751
|
+
|
4752
|
+
updateValue(formComponentData, name, () => ({ value: '', isValid: false }));
|
4753
|
+
|
4754
|
+
$$self.$$set = $$props => {
|
4755
|
+
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
4756
|
+
if ('options' in $$props) $$invalidate(3, options = $$props.options);
|
4757
|
+
};
|
4758
|
+
|
4759
|
+
$$self.$$.update = () => {
|
4760
|
+
if ($$self.$$.dirty & /*options*/ 8) {
|
4761
|
+
$$invalidate(1, _options = options.split(','));
|
4762
|
+
}
|
4763
|
+
};
|
4764
|
+
|
4765
|
+
return [name, _options, handleChange, options];
|
4766
|
+
}
|
4767
|
+
|
4768
|
+
class FormRadioButtons extends SvelteComponent {
|
4769
|
+
constructor(options) {
|
4770
|
+
super();
|
4771
|
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, { name: 0, options: 3 }, add_css$3);
|
4181
4772
|
}
|
4182
4773
|
}
|
4183
4774
|
|
@@ -4501,4 +5092,4 @@ class ImageBlock extends SvelteComponent {
|
|
4501
5092
|
}
|
4502
5093
|
}
|
4503
5094
|
|
4504
|
-
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, EmbedElement, Flex, FlexItem, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_ACTION_RID, KARTE_ACTION_ROOT, KARTE_ACTION_SHORTEN_ID, KARTE_MODAL_ROOT, LengthUnits, List, ListItem, MediaQueries, Modal, ModalPositions, NOOP, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextElement, actionId, actionSetting, addState, applyCss, applyGlobalCss, close, closeAction, closeApp, closed, collection$1 as collection, create, createApp, createFog, customAnimation, customHandlers, customVariables, destroy, destroyed, dispatchDestroyEvent, embed, ensureActionRoot, ensureModalRoot, execOnClickOperation, finalize, getActionSetting, getActionShadowRoot, getCustomHandlers, getCustomVariables, getInternalHandlers, getMarginStyle, getPositionStyle, getState$1 as getState, getStates, getStoreState, getSystem, getTransform, h, handleFocus, handleKeydown, handleState, hasSuffix, hashCode, haveFunction, hideOnScroll, hideOnTime, initialize, internalHandlers, isClosed, isDestroyed, isOpened, isPreview, isStopped, linkTo, loadGlobalScript, loadGlobalStyle, loadStyle, maximumZindex, moveTo, none, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, randStr, resetActionSetting, runScript, send_event, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setDestroyed, setInternalHandlers, setMaximumZindex, setOpened, setPreviousFocus, setState$1 as setState, setStopped, setSystem, show, showAction, showModal, showOnScroll, showOnTime, state, states, stopped, system, toBr, updateCustomHandlers, updateCustomVariables, updateInternalHandlers, widget };
|
5095
|
+
export { ACTION_CHANGE_STATE_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_SHOW_EVENT, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, Alignments, AnimationStyles, BackgroundSizes, Cursors, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, Form, FormButton, FormRadioButtons, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_ACTION_RID, KARTE_ACTION_ROOT, KARTE_ACTION_SHORTEN_ID, KARTE_MODAL_ROOT, LengthUnits, List, ListItem, MediaQueries, Modal, ModalPositions, NOOP, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextElement, actionId, actionSetting, addState, applyCss, applyGlobalCss, close, closeAction, closeApp, closed, collection$1 as collection, create, createApp, createFog, customAnimation, customHandlers, customVariables, destroy, destroyed, dispatchDestroyEvent, embed, ensureActionRoot, ensureModalRoot, execOnClickOperation, finalize, getActionSetting, getActionShadowRoot, getCustomHandlers, getCustomVariables, getInternalHandlers, getMarginStyle, getPositionStyle, getState$1 as getState, getStates, getStoreState, getSystem, getTransform, h, handleFocus, handleKeydown, handleState, hasSuffix, hashCode, haveFunction, hideOnScroll, hideOnTime, initialize, internalHandlers, isClosed, isDestroyed, isOpened, isPreview, isStopped, linkTo, loadGlobalScript, loadGlobalStyle, loadStyle, maximumZindex, moveTo, none, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, randStr, resetActionSetting, runScript, send_event, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setDestroyed, setInternalHandlers, setMaximumZindex, setOpened, setPreviousFocus, setState$1 as setState, setStopped, setSystem, show, showAction, showModal, showOnScroll, showOnTime, state, states, stopped, system, toBr, updateCustomHandlers, updateCustomVariables, updateInternalHandlers, widget };
|