@plaidev/karte-action-sdk 1.1.101 → 1.1.102-27901644.c5acc0e8

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.
@@ -260,15 +260,33 @@ type SystemConfig = {
260
260
  shortenId?: string;
261
261
  };
262
262
  type ActionEventHandler = (...args: any[]) => any | Promise<any>;
263
- type OPTIONS = {
263
+ type ActionSetting = {
264
264
  send?: (event_name: string, values?: any) => void;
265
- isPreview?: boolean;
266
265
  initialState?: string;
266
+ autoStart?: boolean;
267
267
  };
268
268
  type CustomVariables = {
269
269
  [key: string]: any;
270
270
  };
271
- declare const functionOptions: Store<OPTIONS>;
271
+ /**
272
+ * Store to handle action setting
273
+ */
274
+ declare const actionSetting: Store<ActionSetting>;
275
+ /**
276
+ * {@link getActionSetting} function to get action setting.
277
+ * @return {ActionSetting} Current action setting
278
+ */
279
+ declare function getActionSetting(): ActionSetting;
280
+ /**
281
+ * {@link setActionSetting} function to "update" action setting
282
+ * @param {ActonSetting} Updated action setting
283
+ * @return {ActionSetting} New action setting
284
+ */
285
+ declare function setActionSetting(setting: ActionSetting): ActionSetting;
286
+ /**
287
+ * {@link resetActionSetting} function to reset action setting
288
+ */
289
+ declare function resetActionSetting(): void;
272
290
  /**
273
291
  * Store to read KARTE system config
274
292
  */
@@ -469,14 +487,8 @@ declare const ACTION_SHOW_EVENT: string;
469
487
  declare const ACTION_CLOSE_EVENT: string;
470
488
  declare const ACTION_DESTROY_EVENT: string;
471
489
  declare const ACTION_CHANGE_STATE_EVENT: string;
472
- /**
473
- * {@link setAutoStart} function to set auto start flag.
474
- *
475
- * @param {boolean} on
476
- */
477
- declare const setAutoStart: (on?: boolean) => void;
478
490
  declare const handleState: (event: any) => void;
479
- declare const initialize: (options?: OPTIONS) => () => void;
491
+ declare const initialize: (setting?: ActionSetting) => () => void;
480
492
  declare const finalize: () => void;
481
493
  declare const send_event: (event_name: string, values?: any) => void;
482
494
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -558,6 +570,15 @@ declare function loadGlobalStyle(href: string): Promise<any>;
558
570
  * @see https://stackoverflow.com/a/22429679
559
571
  */
560
572
  declare function hashCode(s: string): string;
573
+ /**
574
+ * {@link setAutoStart} function to set auto start flag.
575
+ *
576
+ * NOTE: Use setActionConfig({ autoStart: false }).
577
+ *
578
+ * @deprecated
579
+ * @param {boolean} on
580
+ */
581
+ declare const setAutoStart: (on?: boolean) => void;
561
582
  declare const NOOP: Function;
562
583
  declare const isPreview: () => boolean;
563
584
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
@@ -1171,15 +1192,33 @@ declare namespace widget {
1171
1192
  shortenId?: string;
1172
1193
  };
1173
1194
  type ActionEventHandler = (...args: any[]) => any | Promise<any>;
1174
- type OPTIONS = {
1195
+ type ActionSetting = {
1175
1196
  send?: (event_name: string, values?: any) => void;
1176
- isPreview?: boolean;
1177
1197
  initialState?: string;
1198
+ autoStart?: boolean;
1178
1199
  };
1179
1200
  type CustomVariables = {
1180
1201
  [key: string]: any;
1181
1202
  };
1182
- const functionOptions: Store<OPTIONS>;
1203
+ /**
1204
+ * Store to handle action setting
1205
+ */
1206
+ const actionSetting: Store<ActionSetting>;
1207
+ /**
1208
+ * {@link getActionSetting} function to get action setting.
1209
+ * @return {ActionSetting} Current action setting
1210
+ */
1211
+ function getActionSetting(): ActionSetting;
1212
+ /**
1213
+ * {@link setActionSetting} function to "update" action setting
1214
+ * @param {ActonSetting} Updated action setting
1215
+ * @return {ActionSetting} New action setting
1216
+ */
1217
+ function setActionSetting(setting: ActionSetting): ActionSetting;
1218
+ /**
1219
+ * {@link resetActionSetting} function to reset action setting
1220
+ */
1221
+ function resetActionSetting(): void;
1183
1222
  /**
1184
1223
  * Store to read KARTE system config
1185
1224
  */
@@ -1380,14 +1419,8 @@ declare namespace widget {
1380
1419
  const ACTION_CLOSE_EVENT: string;
1381
1420
  const ACTION_DESTROY_EVENT: string;
1382
1421
  const ACTION_CHANGE_STATE_EVENT: string;
1383
- /**
1384
- * {@link setAutoStart} function to set auto start flag.
1385
- *
1386
- * @param {boolean} on
1387
- */
1388
- const setAutoStart: (on?: boolean) => void;
1389
1422
  const handleState: (event: any) => void;
1390
- const initialize: (options?: OPTIONS) => () => void;
1423
+ const initialize: (setting?: ActionSetting) => () => void;
1391
1424
  const finalize: () => void;
1392
1425
  const send_event: (event_name: string, values?: any) => void;
1393
1426
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -1469,6 +1502,15 @@ declare namespace widget {
1469
1502
  * @see https://stackoverflow.com/a/22429679
1470
1503
  */
1471
1504
  function hashCode(s: string): string;
1505
+ /**
1506
+ * {@link setAutoStart} function to set auto start flag.
1507
+ *
1508
+ * NOTE: Use setActionConfig({ autoStart: false }).
1509
+ *
1510
+ * @deprecated
1511
+ * @param {boolean} on
1512
+ */
1513
+ const setAutoStart: (on?: boolean) => void;
1472
1514
  // types of props to reference for internaly
1473
1515
  interface _Props {
1474
1516
  show_and_condition?: boolean;
@@ -1805,7 +1847,7 @@ declare namespace widget {
1805
1847
  */
1806
1848
  export { showAction as show, closeAction as hide };
1807
1849
  }
1808
- export { CloseTrigger, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, actionId, ACTION_SHOW_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_CHANGE_STATE_EVENT, setAutoStart, handleState, initialize, finalize, send_event, none, moveTo, linkTo, closeApp, runScript, execOnClickOperation, haveFunction, customAnimation, loadGlobalScript, applyGlobalCss, loadGlobalStyle, hashCode, Store, getStoreState, SystemConfig, ActionEventHandler, OPTIONS, CustomVariables, functionOptions, system, getSystem, setSystem, state, setState, getState, states, addState, getStates, opened, isOpened, setOpened, closed, isClosed, setClosed, maximumZindex, setMaximumZindex, internalHandlers, getInternalHandlers, setInternalHandlers, updateInternalHandlers, customHandlers, getCustomHandlers, setCustomHandlers, updateCustomHandlers, destroyed, isDestroyed, setDestroyed, stopped, isStopped, setStopped, customVariables, getCustomVariables, setCustomVariables, updateCustomVariables, NOOP, isPreview, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, ScrollDirection, OnScrollContext, OnScrollFunction, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, Style, StateName, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirection, ListContext, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ActionProps, ActionOptions, create, dispatchDestroyEvent, destroy, showAction, closeAction, KARTE_ACTION_ROOT, KARTE_ACTION_RID, KARTE_ACTION_SHORTEN_ID, ensureActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, h, createFog, EmbedLogic, embed, getActionShadowRoot, applyCss, loadStyle, showModal, ModalOptions, KARTE_MODAL_ROOT, ensureModalRoot, show, close, AppOptions, App, createApp, collection, widget };
1850
+ export { CloseTrigger, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, actionId, ACTION_SHOW_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_CHANGE_STATE_EVENT, handleState, initialize, finalize, send_event, none, moveTo, linkTo, closeApp, runScript, execOnClickOperation, haveFunction, customAnimation, loadGlobalScript, applyGlobalCss, loadGlobalStyle, hashCode, setAutoStart, Store, getStoreState, SystemConfig, ActionEventHandler, ActionSetting, CustomVariables, actionSetting, getActionSetting, setActionSetting, resetActionSetting, system, getSystem, setSystem, state, setState, getState, states, addState, getStates, opened, isOpened, setOpened, closed, isClosed, setClosed, maximumZindex, setMaximumZindex, internalHandlers, getInternalHandlers, setInternalHandlers, updateInternalHandlers, customHandlers, getCustomHandlers, setCustomHandlers, updateCustomHandlers, destroyed, isDestroyed, setDestroyed, stopped, isStopped, setStopped, customVariables, getCustomVariables, setCustomVariables, updateCustomVariables, NOOP, isPreview, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, ScrollDirection, OnScrollContext, OnScrollFunction, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, Style, StateName, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirection, ListContext, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ActionProps, ActionOptions, create, dispatchDestroyEvent, destroy, showAction, closeAction, KARTE_ACTION_ROOT, KARTE_ACTION_RID, KARTE_ACTION_SHORTEN_ID, ensureActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, h, createFog, EmbedLogic, embed, getActionShadowRoot, applyCss, loadStyle, showModal, ModalOptions, KARTE_MODAL_ROOT, ensureModalRoot, show, close, AppOptions, App, createApp, collection, widget };
1809
1851
  export { default as State } from './components/State.svelte';
1810
1852
  export { default as StateItem } from './components/StateItem.svelte';
1811
1853
  export { default as Modal } from './components/Modal.svelte';
@@ -194,7 +194,34 @@ function randStr(digit = 8) {
194
194
  * @deprecated
195
195
  */
196
196
  const getStoreState = get;
197
- const functionOptions = writable({});
197
+ /**
198
+ * Store to handle action setting
199
+ */
200
+ const actionSetting = writable({ autoStart: true });
201
+ /**
202
+ * {@link getActionSetting} function to get action setting.
203
+ * @return {ActionSetting} Current action setting
204
+ */
205
+ function getActionSetting() {
206
+ return get(actionSetting);
207
+ }
208
+ /**
209
+ * {@link setActionSetting} function to "update" action setting
210
+ * @param {ActonSetting} Updated action setting
211
+ * @return {ActionSetting} New action setting
212
+ */
213
+ function setActionSetting(setting) {
214
+ actionSetting.update(current => {
215
+ return { ...current, ...setting };
216
+ });
217
+ return getActionSetting();
218
+ }
219
+ /**
220
+ * {@link resetActionSetting} function to reset action setting
221
+ */
222
+ function resetActionSetting() {
223
+ actionSetting.set({ autoStart: true });
224
+ }
198
225
  /**
199
226
  * Store to read KARTE system config
200
227
  */
@@ -437,35 +464,27 @@ const ACTION_SHOW_EVENT = `KARTE-ACTION-SHOW-${actionId}`;
437
464
  const ACTION_CLOSE_EVENT = `KARTE-ACTION-CLOSE-${actionId}`;
438
465
  const ACTION_DESTROY_EVENT = `KARTE-ACTION-DESTROY-${actionId}`;
439
466
  const ACTION_CHANGE_STATE_EVENT = `KARTE-ACTION-CHANGE-STATE-${actionId}`;
440
- /**
441
- * {@link setAutoStart} function to set auto start flag.
442
- *
443
- * @param {boolean} on
444
- */
445
- const setAutoStart = (on = true) => {
446
- setStopped(!on);
447
- };
448
467
  const handleState = (event) => {
449
468
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
450
469
  setState$1(event.detail.to, event.detail.force);
451
470
  }
452
471
  };
453
- const initialize = (options) => {
454
- if (options?.initialState) {
472
+ const initialize = (setting) => {
473
+ if (setting?.initialState) {
455
474
  const force = true;
456
- setState$1(options?.initialState, force);
475
+ setState$1(setting?.initialState, force);
457
476
  }
458
477
  setOpened(true);
459
478
  setClosed(false); // deprecated
460
- functionOptions.set(options ?? {});
479
+ setActionSetting(setting);
461
480
  return () => finalize();
462
481
  };
463
482
  const finalize = () => {
464
- functionOptions.set({});
483
+ resetActionSetting();
465
484
  };
466
485
  const send_event = (event_name, values) => {
467
- const options = get(functionOptions);
468
- options?.send?.(event_name, values);
486
+ const setting = getActionSetting();
487
+ setting?.send?.(event_name, values);
469
488
  };
470
489
  // eslint-disable-next-line @typescript-eslint/no-empty-function
471
490
  const none = () => () => { };
@@ -584,6 +603,17 @@ function hashCode(s) {
584
603
  });
585
604
  return ('0000000' + (hash >>> 0).toString(16)).substr(-8);
586
605
  }
606
+ /**
607
+ * {@link setAutoStart} function to set auto start flag.
608
+ *
609
+ * NOTE: Use setActionConfig({ autoStart: false }).
610
+ *
611
+ * @deprecated
612
+ * @param {boolean} on
613
+ */
614
+ const setAutoStart = (on = true) => {
615
+ setStopped(!on);
616
+ };
587
617
 
588
618
  const PropTypes = [
589
619
  'BooleanKeyword',
@@ -881,7 +911,6 @@ function create(App, options = {
881
911
  hydrate: true,
882
912
  props: {
883
913
  send: options.send,
884
- close,
885
914
  data,
886
915
  onShow: (props) => {
887
916
  const { onShowHandlers } = getInternalHandlers();
@@ -1943,10 +1972,11 @@ function add_css$c(target) {
1943
1972
 
1944
1973
  // (131:0) {#if visible}
1945
1974
  function create_if_block$1(ctx) {
1946
- let div;
1975
+ let div1;
1947
1976
  let t;
1948
- let div_style_value;
1949
- let div_intro;
1977
+ let div0;
1978
+ let div1_style_value;
1979
+ let div1_intro;
1950
1980
  let current;
1951
1981
  let mounted;
1952
1982
  let dispose;
@@ -1956,47 +1986,53 @@ function create_if_block$1(ctx) {
1956
1986
 
1957
1987
  return {
1958
1988
  c() {
1959
- div = element("div");
1989
+ div1 = element("div");
1960
1990
  if (if_block) if_block.c();
1961
1991
  t = space();
1992
+ div0 = element("div");
1962
1993
  if (default_slot) default_slot.c();
1963
1994
  this.h();
1964
1995
  },
1965
1996
  l(nodes) {
1966
- div = claim_element(nodes, "DIV", {
1997
+ div1 = claim_element(nodes, "DIV", {
1967
1998
  class: true,
1968
1999
  role: true,
1969
2000
  "aria-modal": true,
1970
2001
  style: true
1971
2002
  });
1972
2003
 
1973
- var div_nodes = children(div);
1974
- if (if_block) if_block.l(div_nodes);
1975
- t = claim_space(div_nodes);
1976
- if (default_slot) default_slot.l(div_nodes);
1977
- div_nodes.forEach(detach);
2004
+ var div1_nodes = children(div1);
2005
+ if (if_block) if_block.l(div1_nodes);
2006
+ t = claim_space(div1_nodes);
2007
+ div0 = claim_element(div1_nodes, "DIV", { style: true });
2008
+ var div0_nodes = children(div0);
2009
+ if (default_slot) default_slot.l(div0_nodes);
2010
+ div0_nodes.forEach(detach);
2011
+ div1_nodes.forEach(detach);
1978
2012
  this.h();
1979
2013
  },
1980
2014
  h() {
1981
- attr(div, "class", "modal svelte-1bxl6mz");
1982
- attr(div, "role", "dialog");
1983
- attr(div, "aria-modal", "true");
1984
- attr(div, "style", div_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + /*_style*/ ctx[1] + "");
2015
+ attr(div0, "style", /*_style*/ ctx[1]);
2016
+ attr(div1, "class", "modal svelte-1bxl6mz");
2017
+ attr(div1, "role", "dialog");
2018
+ attr(div1, "aria-modal", "true");
2019
+ attr(div1, "style", div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + "");
1985
2020
  },
1986
2021
  m(target, anchor) {
1987
- insert_hydration(target, div, anchor);
1988
- if (if_block) if_block.m(div, null);
1989
- append_hydration(div, t);
2022
+ insert_hydration(target, div1, anchor);
2023
+ if (if_block) if_block.m(div1, null);
2024
+ append_hydration(div1, t);
2025
+ append_hydration(div1, div0);
1990
2026
 
1991
2027
  if (default_slot) {
1992
- default_slot.m(div, null);
2028
+ default_slot.m(div0, null);
1993
2029
  }
1994
2030
 
1995
- /*div_binding*/ ctx[28](div);
2031
+ /*div1_binding*/ ctx[28](div1);
1996
2032
  current = true;
1997
2033
 
1998
2034
  if (!mounted) {
1999
- dispose = listen(div, "click", function () {
2035
+ dispose = listen(div1, "click", function () {
2000
2036
  if (is_function(/*click*/ ctx[14])) /*click*/ ctx[14].apply(this, arguments);
2001
2037
  });
2002
2038
 
@@ -2012,7 +2048,7 @@ function create_if_block$1(ctx) {
2012
2048
  } else {
2013
2049
  if_block = create_if_block_1(ctx);
2014
2050
  if_block.c();
2015
- if_block.m(div, t);
2051
+ if_block.m(div1, t);
2016
2052
  }
2017
2053
  } else if (if_block) {
2018
2054
  if_block.d(1);
@@ -2034,22 +2070,26 @@ function create_if_block$1(ctx) {
2034
2070
  }
2035
2071
  }
2036
2072
 
2037
- if (!current || dirty & /*pos, marginStyle, _style*/ 1282 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + /*_style*/ ctx[1] + "")) {
2038
- attr(div, "style", div_style_value);
2073
+ if (!current || dirty & /*_style*/ 2) {
2074
+ attr(div0, "style", /*_style*/ ctx[1]);
2075
+ }
2076
+
2077
+ if (!current || dirty & /*pos, marginStyle*/ 1280 && div1_style_value !== (div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + "")) {
2078
+ attr(div1, "style", div1_style_value);
2039
2079
  }
2040
2080
  },
2041
2081
  i(local) {
2042
2082
  if (current) return;
2043
2083
  transition_in(default_slot, local);
2044
2084
 
2045
- if (!div_intro) {
2085
+ if (!div1_intro) {
2046
2086
  add_render_callback(() => {
2047
- div_intro = create_in_transition(div, customAnimation, {
2087
+ div1_intro = create_in_transition(div1, customAnimation, {
2048
2088
  transform: /*transform*/ ctx[9],
2049
2089
  animationStyle: /*animation*/ ctx[0]
2050
2090
  });
2051
2091
 
2052
- div_intro.start();
2092
+ div1_intro.start();
2053
2093
  });
2054
2094
  }
2055
2095
 
@@ -2060,17 +2100,17 @@ function create_if_block$1(ctx) {
2060
2100
  current = false;
2061
2101
  },
2062
2102
  d(detaching) {
2063
- if (detaching) detach(div);
2103
+ if (detaching) detach(div1);
2064
2104
  if (if_block) if_block.d();
2065
2105
  if (default_slot) default_slot.d(detaching);
2066
- /*div_binding*/ ctx[28](null);
2106
+ /*div1_binding*/ ctx[28](null);
2067
2107
  mounted = false;
2068
2108
  dispose();
2069
2109
  }
2070
2110
  };
2071
2111
  }
2072
2112
 
2073
- // (148:4) {#if closable}
2113
+ // (147:4) {#if closable}
2074
2114
  function create_if_block_1(ctx) {
2075
2115
  let button;
2076
2116
  let svg;
@@ -2290,7 +2330,7 @@ function instance$f($$self, $$props, $$invalidate) {
2290
2330
 
2291
2331
  onDestroy$1(() => setPreviousFocus());
2292
2332
 
2293
- function div_binding($$value) {
2333
+ function div1_binding($$value) {
2294
2334
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
2295
2335
  modal = $$value;
2296
2336
  $$invalidate(4, modal);
@@ -2425,7 +2465,7 @@ function instance$f($$self, $$props, $$invalidate) {
2425
2465
  backgroundClickFunction,
2426
2466
  $$scope,
2427
2467
  slots,
2428
- div_binding
2468
+ div1_binding
2429
2469
  ];
2430
2470
  }
2431
2471
 
@@ -4638,4 +4678,4 @@ class ImageBlock extends SvelteComponent {
4638
4678
  }
4639
4679
  }
4640
4680
 
4641
- 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, 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, functionOptions, 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, runScript, send_event, 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 };
4681
+ 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 };
@@ -260,15 +260,33 @@ type SystemConfig = {
260
260
  shortenId?: string;
261
261
  };
262
262
  type ActionEventHandler = (...args: any[]) => any | Promise<any>;
263
- type OPTIONS = {
263
+ type ActionSetting = {
264
264
  send?: (event_name: string, values?: any) => void;
265
- isPreview?: boolean;
266
265
  initialState?: string;
266
+ autoStart?: boolean;
267
267
  };
268
268
  type CustomVariables = {
269
269
  [key: string]: any;
270
270
  };
271
- declare const functionOptions: Store<OPTIONS>;
271
+ /**
272
+ * Store to handle action setting
273
+ */
274
+ declare const actionSetting: Store<ActionSetting>;
275
+ /**
276
+ * {@link getActionSetting} function to get action setting.
277
+ * @return {ActionSetting} Current action setting
278
+ */
279
+ declare function getActionSetting(): ActionSetting;
280
+ /**
281
+ * {@link setActionSetting} function to "update" action setting
282
+ * @param {ActonSetting} Updated action setting
283
+ * @return {ActionSetting} New action setting
284
+ */
285
+ declare function setActionSetting(setting: ActionSetting): ActionSetting;
286
+ /**
287
+ * {@link resetActionSetting} function to reset action setting
288
+ */
289
+ declare function resetActionSetting(): void;
272
290
  /**
273
291
  * Store to read KARTE system config
274
292
  */
@@ -469,14 +487,8 @@ declare const ACTION_SHOW_EVENT: string;
469
487
  declare const ACTION_CLOSE_EVENT: string;
470
488
  declare const ACTION_DESTROY_EVENT: string;
471
489
  declare const ACTION_CHANGE_STATE_EVENT: string;
472
- /**
473
- * {@link setAutoStart} function to set auto start flag.
474
- *
475
- * @param {boolean} on
476
- */
477
- declare const setAutoStart: (on?: boolean) => void;
478
490
  declare const handleState: (event: any) => void;
479
- declare const initialize: (options?: OPTIONS) => () => void;
491
+ declare const initialize: (setting?: ActionSetting) => () => void;
480
492
  declare const finalize: () => void;
481
493
  declare const send_event: (event_name: string, values?: any) => void;
482
494
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -558,6 +570,15 @@ declare function loadGlobalStyle(href: string): Promise<any>;
558
570
  * @see https://stackoverflow.com/a/22429679
559
571
  */
560
572
  declare function hashCode(s: string): string;
573
+ /**
574
+ * {@link setAutoStart} function to set auto start flag.
575
+ *
576
+ * NOTE: Use setActionConfig({ autoStart: false }).
577
+ *
578
+ * @deprecated
579
+ * @param {boolean} on
580
+ */
581
+ declare const setAutoStart: (on?: boolean) => void;
561
582
  declare const NOOP: Function;
562
583
  declare const isPreview: () => boolean;
563
584
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
@@ -1171,15 +1192,33 @@ declare namespace widget {
1171
1192
  shortenId?: string;
1172
1193
  };
1173
1194
  type ActionEventHandler = (...args: any[]) => any | Promise<any>;
1174
- type OPTIONS = {
1195
+ type ActionSetting = {
1175
1196
  send?: (event_name: string, values?: any) => void;
1176
- isPreview?: boolean;
1177
1197
  initialState?: string;
1198
+ autoStart?: boolean;
1178
1199
  };
1179
1200
  type CustomVariables = {
1180
1201
  [key: string]: any;
1181
1202
  };
1182
- const functionOptions: Store<OPTIONS>;
1203
+ /**
1204
+ * Store to handle action setting
1205
+ */
1206
+ const actionSetting: Store<ActionSetting>;
1207
+ /**
1208
+ * {@link getActionSetting} function to get action setting.
1209
+ * @return {ActionSetting} Current action setting
1210
+ */
1211
+ function getActionSetting(): ActionSetting;
1212
+ /**
1213
+ * {@link setActionSetting} function to "update" action setting
1214
+ * @param {ActonSetting} Updated action setting
1215
+ * @return {ActionSetting} New action setting
1216
+ */
1217
+ function setActionSetting(setting: ActionSetting): ActionSetting;
1218
+ /**
1219
+ * {@link resetActionSetting} function to reset action setting
1220
+ */
1221
+ function resetActionSetting(): void;
1183
1222
  /**
1184
1223
  * Store to read KARTE system config
1185
1224
  */
@@ -1380,14 +1419,8 @@ declare namespace widget {
1380
1419
  const ACTION_CLOSE_EVENT: string;
1381
1420
  const ACTION_DESTROY_EVENT: string;
1382
1421
  const ACTION_CHANGE_STATE_EVENT: string;
1383
- /**
1384
- * {@link setAutoStart} function to set auto start flag.
1385
- *
1386
- * @param {boolean} on
1387
- */
1388
- const setAutoStart: (on?: boolean) => void;
1389
1422
  const handleState: (event: any) => void;
1390
- const initialize: (options?: OPTIONS) => () => void;
1423
+ const initialize: (setting?: ActionSetting) => () => void;
1391
1424
  const finalize: () => void;
1392
1425
  const send_event: (event_name: string, values?: any) => void;
1393
1426
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -1469,6 +1502,15 @@ declare namespace widget {
1469
1502
  * @see https://stackoverflow.com/a/22429679
1470
1503
  */
1471
1504
  function hashCode(s: string): string;
1505
+ /**
1506
+ * {@link setAutoStart} function to set auto start flag.
1507
+ *
1508
+ * NOTE: Use setActionConfig({ autoStart: false }).
1509
+ *
1510
+ * @deprecated
1511
+ * @param {boolean} on
1512
+ */
1513
+ const setAutoStart: (on?: boolean) => void;
1472
1514
  // types of props to reference for internaly
1473
1515
  interface _Props {
1474
1516
  show_and_condition?: boolean;
@@ -1805,7 +1847,7 @@ declare namespace widget {
1805
1847
  */
1806
1848
  export { showAction as show, closeAction as hide };
1807
1849
  }
1808
- export { CloseTrigger, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, actionId, ACTION_SHOW_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_CHANGE_STATE_EVENT, setAutoStart, handleState, initialize, finalize, send_event, none, moveTo, linkTo, closeApp, runScript, execOnClickOperation, haveFunction, customAnimation, loadGlobalScript, applyGlobalCss, loadGlobalStyle, hashCode, Store, getStoreState, SystemConfig, ActionEventHandler, OPTIONS, CustomVariables, functionOptions, system, getSystem, setSystem, state, setState, getState, states, addState, getStates, opened, isOpened, setOpened, closed, isClosed, setClosed, maximumZindex, setMaximumZindex, internalHandlers, getInternalHandlers, setInternalHandlers, updateInternalHandlers, customHandlers, getCustomHandlers, setCustomHandlers, updateCustomHandlers, destroyed, isDestroyed, setDestroyed, stopped, isStopped, setStopped, customVariables, getCustomVariables, setCustomVariables, updateCustomVariables, NOOP, isPreview, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, ScrollDirection, OnScrollContext, OnScrollFunction, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, Style, StateName, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirection, ListContext, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ActionProps, ActionOptions, create, dispatchDestroyEvent, destroy, showAction, closeAction, KARTE_ACTION_ROOT, KARTE_ACTION_RID, KARTE_ACTION_SHORTEN_ID, ensureActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, h, createFog, EmbedLogic, embed, getActionShadowRoot, applyCss, loadStyle, showModal, ModalOptions, KARTE_MODAL_ROOT, ensureModalRoot, show, close, AppOptions, App, createApp, collection, widget };
1850
+ export { CloseTrigger, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, actionId, ACTION_SHOW_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_CHANGE_STATE_EVENT, handleState, initialize, finalize, send_event, none, moveTo, linkTo, closeApp, runScript, execOnClickOperation, haveFunction, customAnimation, loadGlobalScript, applyGlobalCss, loadGlobalStyle, hashCode, setAutoStart, Store, getStoreState, SystemConfig, ActionEventHandler, ActionSetting, CustomVariables, actionSetting, getActionSetting, setActionSetting, resetActionSetting, system, getSystem, setSystem, state, setState, getState, states, addState, getStates, opened, isOpened, setOpened, closed, isClosed, setClosed, maximumZindex, setMaximumZindex, internalHandlers, getInternalHandlers, setInternalHandlers, updateInternalHandlers, customHandlers, getCustomHandlers, setCustomHandlers, updateCustomHandlers, destroyed, isDestroyed, setDestroyed, stopped, isStopped, setStopped, customVariables, getCustomVariables, setCustomVariables, updateCustomVariables, NOOP, isPreview, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, ScrollDirection, OnScrollContext, OnScrollFunction, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, Style, StateName, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirection, ListContext, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ActionProps, ActionOptions, create, dispatchDestroyEvent, destroy, showAction, closeAction, KARTE_ACTION_ROOT, KARTE_ACTION_RID, KARTE_ACTION_SHORTEN_ID, ensureActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, h, createFog, EmbedLogic, embed, getActionShadowRoot, applyCss, loadStyle, showModal, ModalOptions, KARTE_MODAL_ROOT, ensureModalRoot, show, close, AppOptions, App, createApp, collection, widget };
1809
1851
  export { default as State } from './components/State.svelte';
1810
1852
  export { default as StateItem } from './components/StateItem.svelte';
1811
1853
  export { default as Modal } from './components/Modal.svelte';
package/dist/index.es.js CHANGED
@@ -194,7 +194,34 @@ function randStr(digit = 8) {
194
194
  * @deprecated
195
195
  */
196
196
  const getStoreState = get;
197
- const functionOptions = writable({});
197
+ /**
198
+ * Store to handle action setting
199
+ */
200
+ const actionSetting = writable({ autoStart: true });
201
+ /**
202
+ * {@link getActionSetting} function to get action setting.
203
+ * @return {ActionSetting} Current action setting
204
+ */
205
+ function getActionSetting() {
206
+ return get(actionSetting);
207
+ }
208
+ /**
209
+ * {@link setActionSetting} function to "update" action setting
210
+ * @param {ActonSetting} Updated action setting
211
+ * @return {ActionSetting} New action setting
212
+ */
213
+ function setActionSetting(setting) {
214
+ actionSetting.update(current => {
215
+ return { ...current, ...setting };
216
+ });
217
+ return getActionSetting();
218
+ }
219
+ /**
220
+ * {@link resetActionSetting} function to reset action setting
221
+ */
222
+ function resetActionSetting() {
223
+ actionSetting.set({ autoStart: true });
224
+ }
198
225
  /**
199
226
  * Store to read KARTE system config
200
227
  */
@@ -437,35 +464,27 @@ const ACTION_SHOW_EVENT = `KARTE-ACTION-SHOW-${actionId}`;
437
464
  const ACTION_CLOSE_EVENT = `KARTE-ACTION-CLOSE-${actionId}`;
438
465
  const ACTION_DESTROY_EVENT = `KARTE-ACTION-DESTROY-${actionId}`;
439
466
  const ACTION_CHANGE_STATE_EVENT = `KARTE-ACTION-CHANGE-STATE-${actionId}`;
440
- /**
441
- * {@link setAutoStart} function to set auto start flag.
442
- *
443
- * @param {boolean} on
444
- */
445
- const setAutoStart = (on = true) => {
446
- setStopped(!on);
447
- };
448
467
  const handleState = (event) => {
449
468
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
450
469
  setState$1(event.detail.to, event.detail.force);
451
470
  }
452
471
  };
453
- const initialize = (options) => {
454
- if (options?.initialState) {
472
+ const initialize = (setting) => {
473
+ if (setting?.initialState) {
455
474
  const force = true;
456
- setState$1(options?.initialState, force);
475
+ setState$1(setting?.initialState, force);
457
476
  }
458
477
  setOpened(true);
459
478
  setClosed(false); // deprecated
460
- functionOptions.set(options ?? {});
479
+ setActionSetting(setting);
461
480
  return () => finalize();
462
481
  };
463
482
  const finalize = () => {
464
- functionOptions.set({});
483
+ resetActionSetting();
465
484
  };
466
485
  const send_event = (event_name, values) => {
467
- const options = get(functionOptions);
468
- options?.send?.(event_name, values);
486
+ const setting = getActionSetting();
487
+ setting?.send?.(event_name, values);
469
488
  };
470
489
  // eslint-disable-next-line @typescript-eslint/no-empty-function
471
490
  const none = () => () => { };
@@ -636,6 +655,17 @@ function hashCode(s) {
636
655
  });
637
656
  return ('0000000' + (hash >>> 0).toString(16)).substr(-8);
638
657
  }
658
+ /**
659
+ * {@link setAutoStart} function to set auto start flag.
660
+ *
661
+ * NOTE: Use setActionConfig({ autoStart: false }).
662
+ *
663
+ * @deprecated
664
+ * @param {boolean} on
665
+ */
666
+ const setAutoStart = (on = true) => {
667
+ setStopped(!on);
668
+ };
639
669
 
640
670
  const PropTypes = [
641
671
  'BooleanKeyword',
@@ -983,7 +1013,6 @@ function create(App, options = {
983
1013
  hydrate: false,
984
1014
  props: {
985
1015
  send: options.send,
986
- close,
987
1016
  data,
988
1017
  onShow: (props) => {
989
1018
  const { onShowHandlers } = getInternalHandlers();
@@ -2025,10 +2054,11 @@ function add_css$c(target) {
2025
2054
 
2026
2055
  // (131:0) {#if visible}
2027
2056
  function create_if_block$1(ctx) {
2028
- let div;
2057
+ let div1;
2029
2058
  let t;
2030
- let div_style_value;
2031
- let div_intro;
2059
+ let div0;
2060
+ let div1_style_value;
2061
+ let div1_intro;
2032
2062
  let current;
2033
2063
  let mounted;
2034
2064
  let dispose;
@@ -2038,29 +2068,32 @@ function create_if_block$1(ctx) {
2038
2068
 
2039
2069
  return {
2040
2070
  c() {
2041
- div = element("div");
2071
+ div1 = element("div");
2042
2072
  if (if_block) if_block.c();
2043
2073
  t = space();
2074
+ div0 = element("div");
2044
2075
  if (default_slot) default_slot.c();
2045
- attr(div, "class", "modal svelte-1bxl6mz");
2046
- attr(div, "role", "dialog");
2047
- attr(div, "aria-modal", "true");
2048
- attr(div, "style", div_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + /*_style*/ ctx[1] + "");
2076
+ attr(div0, "style", /*_style*/ ctx[1]);
2077
+ attr(div1, "class", "modal svelte-1bxl6mz");
2078
+ attr(div1, "role", "dialog");
2079
+ attr(div1, "aria-modal", "true");
2080
+ attr(div1, "style", div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + "");
2049
2081
  },
2050
2082
  m(target, anchor) {
2051
- insert(target, div, anchor);
2052
- if (if_block) if_block.m(div, null);
2053
- append(div, t);
2083
+ insert(target, div1, anchor);
2084
+ if (if_block) if_block.m(div1, null);
2085
+ append(div1, t);
2086
+ append(div1, div0);
2054
2087
 
2055
2088
  if (default_slot) {
2056
- default_slot.m(div, null);
2089
+ default_slot.m(div0, null);
2057
2090
  }
2058
2091
 
2059
- /*div_binding*/ ctx[28](div);
2092
+ /*div1_binding*/ ctx[28](div1);
2060
2093
  current = true;
2061
2094
 
2062
2095
  if (!mounted) {
2063
- dispose = listen(div, "click", function () {
2096
+ dispose = listen(div1, "click", function () {
2064
2097
  if (is_function(/*click*/ ctx[14])) /*click*/ ctx[14].apply(this, arguments);
2065
2098
  });
2066
2099
 
@@ -2076,7 +2109,7 @@ function create_if_block$1(ctx) {
2076
2109
  } else {
2077
2110
  if_block = create_if_block_1(ctx);
2078
2111
  if_block.c();
2079
- if_block.m(div, t);
2112
+ if_block.m(div1, t);
2080
2113
  }
2081
2114
  } else if (if_block) {
2082
2115
  if_block.d(1);
@@ -2098,22 +2131,26 @@ function create_if_block$1(ctx) {
2098
2131
  }
2099
2132
  }
2100
2133
 
2101
- if (!current || dirty & /*pos, marginStyle, _style*/ 1282 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + " " + /*_style*/ ctx[1] + "")) {
2102
- attr(div, "style", div_style_value);
2134
+ if (!current || dirty & /*_style*/ 2) {
2135
+ attr(div0, "style", /*_style*/ ctx[1]);
2136
+ }
2137
+
2138
+ if (!current || dirty & /*pos, marginStyle*/ 1280 && div1_style_value !== (div1_style_value = "" + /*pos*/ ctx[10] + " " + /*marginStyle*/ ctx[8] + "")) {
2139
+ attr(div1, "style", div1_style_value);
2103
2140
  }
2104
2141
  },
2105
2142
  i(local) {
2106
2143
  if (current) return;
2107
2144
  transition_in(default_slot, local);
2108
2145
 
2109
- if (!div_intro) {
2146
+ if (!div1_intro) {
2110
2147
  add_render_callback(() => {
2111
- div_intro = create_in_transition(div, customAnimation, {
2148
+ div1_intro = create_in_transition(div1, customAnimation, {
2112
2149
  transform: /*transform*/ ctx[9],
2113
2150
  animationStyle: /*animation*/ ctx[0]
2114
2151
  });
2115
2152
 
2116
- div_intro.start();
2153
+ div1_intro.start();
2117
2154
  });
2118
2155
  }
2119
2156
 
@@ -2124,17 +2161,17 @@ function create_if_block$1(ctx) {
2124
2161
  current = false;
2125
2162
  },
2126
2163
  d(detaching) {
2127
- if (detaching) detach(div);
2164
+ if (detaching) detach(div1);
2128
2165
  if (if_block) if_block.d();
2129
2166
  if (default_slot) default_slot.d(detaching);
2130
- /*div_binding*/ ctx[28](null);
2167
+ /*div1_binding*/ ctx[28](null);
2131
2168
  mounted = false;
2132
2169
  dispose();
2133
2170
  }
2134
2171
  };
2135
2172
  }
2136
2173
 
2137
- // (148:4) {#if closable}
2174
+ // (147:4) {#if closable}
2138
2175
  function create_if_block_1(ctx) {
2139
2176
  let button;
2140
2177
  let svg;
@@ -2320,7 +2357,7 @@ function instance$f($$self, $$props, $$invalidate) {
2320
2357
 
2321
2358
  onDestroy$1(() => setPreviousFocus());
2322
2359
 
2323
- function div_binding($$value) {
2360
+ function div1_binding($$value) {
2324
2361
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
2325
2362
  modal = $$value;
2326
2363
  $$invalidate(4, modal);
@@ -2452,7 +2489,7 @@ function instance$f($$self, $$props, $$invalidate) {
2452
2489
  backgroundClickFunction,
2453
2490
  $$scope,
2454
2491
  slots,
2455
- div_binding
2492
+ div1_binding
2456
2493
  ];
2457
2494
  }
2458
2495
 
@@ -4464,4 +4501,4 @@ class ImageBlock extends SvelteComponent {
4464
4501
  }
4465
4502
  }
4466
4503
 
4467
- 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, 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, functionOptions, 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, runScript, send_event, 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 };
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 };
package/dist/templates.js CHANGED
@@ -36,7 +36,6 @@ export let send: (event_name: string, values?: any) => void;
36
36
  let data_: Data;
37
37
  export { data_ as data };
38
38
  let data = writable<Data & CustomVariables>({ ...data_ });
39
- export let close: () => void;
40
39
  export let onShow: (props: ActionProps<Props, Variables>) => void = _props => {};
41
40
  export let onChangeState: (props: ActionProps<Props, Variables>, stateId: string) => void = (_props, _state) => {};
42
41
  ${script}
@@ -44,12 +43,6 @@ onMount(() => {
44
43
  onShow({ send, data: $data });
45
44
  });
46
45
 
47
- // $: {
48
- // if (!$opened) {
49
- // close();
50
- // }
51
- // }
52
-
53
46
  $: {
54
47
  if ($state) {
55
48
  onChangeState({ send, data: $data }, $state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.101",
3
+ "version": "1.1.102-27901644.c5acc0e8",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",