@plaidev/karte-action-sdk 1.1.135 → 1.1.136-27961539.665abb40

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.
@@ -653,18 +653,6 @@ declare function getEventHandlers(): {
653
653
  */
654
654
  declare function setEventHandlers(handlers: {
655
655
  [key: string]: ActionEventHandler;
656
- }): void;
657
- /**
658
- * イベントハンドラーを更新する
659
- *
660
- * @param handlers - 対象となるイベントハンドラー
661
- *
662
- * @returns 新しいイベントハンドラーを返します。
663
- *
664
- * @public
665
- */
666
- declare function updateEventHandlers(handlers: {
667
- [key: string]: ActionEventHandler;
668
656
  }): {
669
657
  [key: string]: ActionEventHandler;
670
658
  };
@@ -706,17 +694,7 @@ declare function getVariables(): ActionVariables;
706
694
  *
707
695
  * @internal
708
696
  */
709
- declare function setVariables(vars: ActionVariables): void;
710
- /**
711
- * 変数を更新する
712
- *
713
- * @param variables - 更新する変数
714
- *
715
- * @returns 新しい変数を返します。
716
- *
717
- * @internal
718
- */
719
- declare function updateVariables(vars: ActionVariables): ActionVariables;
697
+ declare function setVariables(vars: ActionVariables): ActionVariables;
720
698
  /** @internal */
721
699
  interface FormData {
722
700
  [name: string]: {
@@ -2225,16 +2203,6 @@ declare namespace widget {
2225
2203
  */
2226
2204
  function setInternalHandlers(handlers: {
2227
2205
  [key: string]: ActionEventHandler[];
2228
- }): void;
2229
- /**
2230
- * {@link updateInternalHandlers} function to update internal event handlers.
2231
- *
2232
- * @param handlers - Updated internal event handlers
2233
- *
2234
- * @returns New internal handlers
2235
- */
2236
- function updateInternalHandlers(handlers: {
2237
- [key: string]: ActionEventHandler[];
2238
2206
  }): {
2239
2207
  [key: string]: ActionEventHandler[];
2240
2208
  };
@@ -2298,18 +2266,6 @@ declare namespace widget {
2298
2266
  */
2299
2267
  function setEventHandlers(handlers: {
2300
2268
  [key: string]: ActionEventHandler;
2301
- }): void;
2302
- /**
2303
- * イベントハンドラーを更新する
2304
- *
2305
- * @param handlers - 対象となるイベントハンドラー
2306
- *
2307
- * @returns 新しいイベントハンドラーを返します。
2308
- *
2309
- * @public
2310
- */
2311
- function updateEventHandlers(handlers: {
2312
- [key: string]: ActionEventHandler;
2313
2269
  }): {
2314
2270
  [key: string]: ActionEventHandler;
2315
2271
  };
@@ -2377,17 +2333,7 @@ declare namespace widget {
2377
2333
  *
2378
2334
  * @internal
2379
2335
  */
2380
- function setVariables(vars: ActionVariables): void;
2381
- /**
2382
- * 変数を更新する
2383
- *
2384
- * @param variables - 更新する変数
2385
- *
2386
- * @returns 新しい変数を返します。
2387
- *
2388
- * @internal
2389
- */
2390
- function updateVariables(vars: ActionVariables): ActionVariables;
2336
+ function setVariables(vars: ActionVariables): ActionVariables;
2391
2337
  /** @internal */
2392
2338
  interface FormData {
2393
2339
  [name: string]: {
@@ -3261,7 +3207,7 @@ declare namespace widget {
3261
3207
  */
3262
3208
  export { showAction as show, closeAction as hide };
3263
3209
  }
3264
- export { loadGlobalScript, loadGlobalStyle, applyGlobalCss, initialize, finalize, setAutoStart, getState, setState, getStates, isOpened, getVariables, setVariables, updateVariables, getEventHandlers, setEventHandlers, updateEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, opened, closed, destroyed, stopped, isClosed, setClosed, getStoreState, getCustomVariables, setCustomVariables, updateCustomVariables, getCustomHandlers, setCustomHandlers, updateCustomHandlers, setActionSetting, customHandlers, customVariables, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonStyle, DefaultFormButtonStyle, FormSelectStyle, DefaultFormSelectStyle, create, showAction, closeAction, destroyAction, loadStyle, applyCss, getActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, showModal, ensureModalRoot, show, close, destroy, createApp, createFog, KARTE_MODAL_ROOT, ACTION_HOOK_LABEL, getActionShadowRoot, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget };
3210
+ export { loadGlobalScript, loadGlobalStyle, applyGlobalCss, initialize, finalize, setAutoStart, getState, setState, getStates, isOpened, getVariables, setVariables, getEventHandlers, setEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, opened, closed, destroyed, stopped, isClosed, setClosed, getStoreState, getCustomVariables, setCustomVariables, updateCustomVariables, getCustomHandlers, setCustomHandlers, updateCustomHandlers, setActionSetting, customHandlers, customVariables, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonStyle, DefaultFormButtonStyle, FormSelectStyle, DefaultFormSelectStyle, create, showAction, closeAction, destroyAction, loadStyle, applyCss, getActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, showModal, ensureModalRoot, show, close, destroy, createApp, createFog, KARTE_MODAL_ROOT, ACTION_HOOK_LABEL, getActionShadowRoot, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget };
3265
3211
  export type { CloseTrigger, ActionVariables, ActionEventHandler, SystemConfig, CustomVariables, OnScrollContext, OnScrollFunction, ScrollDirection, LogLevel, Log, Event, ActionProps, ActionOptions, ActionHook, ActionCloseHook, ActionChangeStateHook, SendFunction, ActionHookLog, CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequestConfig, ActionTableQueryRequestConfig, ActionTableRequestConfig };
3266
3212
  export { default as State } from './components/State.svelte';
3267
3213
  export { default as StateItem } from './components/StateItem.svelte';
@@ -315,6 +315,9 @@ const states = writable([]);
315
315
  * @internal
316
316
  */
317
317
  function addState(stateId) {
318
+ if (!get(states)) {
319
+ states.set([]);
320
+ }
318
321
  states.update(current => {
319
322
  current.push(stateId);
320
323
  return current;
@@ -420,13 +423,16 @@ function getInternalHandlers() {
420
423
  return get(internalHandlers);
421
424
  }
422
425
  /**
423
- * {@link updateInternalHandlers} function to update internal event handlers.
426
+ * {@link setInternalHandlers} function to set internal event handlers.
424
427
  *
425
- * @param handlers - Updated internal event handlers
428
+ * @param handlers - New internal event handlers
426
429
  *
427
- * @returns New internal handlers
430
+ * @internal
428
431
  */
429
- function updateInternalHandlers(handlers) {
432
+ function setInternalHandlers(handlers) {
433
+ if (!get(internalHandlers)) {
434
+ internalHandlers.set({});
435
+ }
430
436
  internalHandlers.update(current => {
431
437
  return { ...current, ...handlers };
432
438
  });
@@ -487,18 +493,9 @@ function getEventHandlers() {
487
493
  * @public
488
494
  */
489
495
  function setEventHandlers(handlers) {
490
- eventHandlers.set(handlers);
491
- }
492
- /**
493
- * イベントハンドラーを更新する
494
- *
495
- * @param handlers - 対象となるイベントハンドラー
496
- *
497
- * @returns 新しいイベントハンドラーを返します。
498
- *
499
- * @public
500
- */
501
- function updateEventHandlers(handlers) {
496
+ if (!get(eventHandlers)) {
497
+ eventHandlers.set({});
498
+ }
502
499
  eventHandlers.update(current => {
503
500
  return { ...current, ...handlers };
504
501
  });
@@ -579,18 +576,9 @@ function getVariables() {
579
576
  * @internal
580
577
  */
581
578
  function setVariables(vars) {
582
- variables.set(vars);
583
- }
584
- /**
585
- * 変数を更新する
586
- *
587
- * @param variables - 更新する変数
588
- *
589
- * @returns 新しい変数を返します。
590
- *
591
- * @internal
592
- */
593
- function updateVariables(vars) {
579
+ if (!get(variables)) {
580
+ variables.set({});
581
+ }
594
582
  variables.update(current => {
595
583
  return { ...current, ...vars };
596
584
  });
@@ -1583,7 +1571,7 @@ function onCreate(fn) {
1583
1571
  onCreateHandlers = [];
1584
1572
  }
1585
1573
  onCreateHandlers.push(fn);
1586
- updateInternalHandlers({ onCreateHandlers });
1574
+ setInternalHandlers({ onCreateHandlers });
1587
1575
  }
1588
1576
  /**
1589
1577
  * アクションが表示 (show) された後にフックする関数
@@ -1598,7 +1586,7 @@ function onShow(fn) {
1598
1586
  onShowHandlers = [];
1599
1587
  }
1600
1588
  onShowHandlers.push(fn);
1601
- updateInternalHandlers({ onShowHandlers });
1589
+ setInternalHandlers({ onShowHandlers });
1602
1590
  }
1603
1591
  /**
1604
1592
  * アクションがクローズ (close) される前にフックする関数
@@ -1613,7 +1601,7 @@ function onClose(fn) {
1613
1601
  onCloseHandlers = [];
1614
1602
  }
1615
1603
  onCloseHandlers.push(fn);
1616
- updateInternalHandlers({ onCloseHandlers });
1604
+ setInternalHandlers({ onCloseHandlers });
1617
1605
  }
1618
1606
  /**
1619
1607
  * アクションが破棄 (destroy) される前にフックする関数
@@ -1628,7 +1616,7 @@ function onDestroy(fn) {
1628
1616
  onDestroyHandlers = [];
1629
1617
  }
1630
1618
  onDestroyHandlers.push(fn);
1631
- updateInternalHandlers({ onDestroyHandlers });
1619
+ setInternalHandlers({ onDestroyHandlers });
1632
1620
  }
1633
1621
  /**
1634
1622
  * アクションのステートが変更された (changeState) 後にフックする関数
@@ -1643,7 +1631,7 @@ function onChangeState(fn) {
1643
1631
  onChangeStateHandlers = [];
1644
1632
  }
1645
1633
  onChangeStateHandlers.push(fn);
1646
- updateInternalHandlers({ onChangeStateHandlers });
1634
+ setInternalHandlers({ onChangeStateHandlers });
1647
1635
  }
1648
1636
  /**
1649
1637
  * アクションを作成する
@@ -1693,7 +1681,7 @@ function create(App, options = {
1693
1681
  });
1694
1682
  // ActionTable APIへの非同期リクエスト
1695
1683
  if (options.localVariablesQuery && data.api_key) {
1696
- loadActionTable(options.localVariablesQuery, data.api_key).then(result => updateVariables(result));
1684
+ loadActionTable(options.localVariablesQuery, data.api_key).then(result => setVariables(result));
1697
1685
  }
1698
1686
  const close = (trigger = 'none') => {
1699
1687
  if (!app) {
@@ -8744,4 +8732,4 @@ class ImageBlock extends SvelteComponent {
8744
8732
  }
8745
8733
  }
8746
8734
 
8747
- export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, Box, ClipPaths, Countdown, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexDirections, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slide, SlideItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, applyCss, applyGlobalCss, close, closeAction, closed, collection$1 as collection, create, createApp, createFog, customHandlers, customVariables, destroy, destroyAction, destroyed, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getActionShadowRoot, getCustomHandlers, getCustomVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getStoreState, getSystem, getVariables, hideOnScroll, hideOnTime, initialize, isClosed, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, updateEventHandlers, updateVariables, variables, widget };
8735
+ export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, Box, ClipPaths, Countdown, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexDirections, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slide, SlideItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, applyCss, applyGlobalCss, close, closeAction, closed, collection$1 as collection, create, createApp, createFog, customHandlers, customVariables, destroy, destroyAction, destroyed, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getActionShadowRoot, getCustomHandlers, getCustomVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getStoreState, getSystem, getVariables, hideOnScroll, hideOnTime, initialize, isClosed, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, variables, widget };
@@ -653,18 +653,6 @@ declare function getEventHandlers(): {
653
653
  */
654
654
  declare function setEventHandlers(handlers: {
655
655
  [key: string]: ActionEventHandler;
656
- }): void;
657
- /**
658
- * イベントハンドラーを更新する
659
- *
660
- * @param handlers - 対象となるイベントハンドラー
661
- *
662
- * @returns 新しいイベントハンドラーを返します。
663
- *
664
- * @public
665
- */
666
- declare function updateEventHandlers(handlers: {
667
- [key: string]: ActionEventHandler;
668
656
  }): {
669
657
  [key: string]: ActionEventHandler;
670
658
  };
@@ -706,17 +694,7 @@ declare function getVariables(): ActionVariables;
706
694
  *
707
695
  * @internal
708
696
  */
709
- declare function setVariables(vars: ActionVariables): void;
710
- /**
711
- * 変数を更新する
712
- *
713
- * @param variables - 更新する変数
714
- *
715
- * @returns 新しい変数を返します。
716
- *
717
- * @internal
718
- */
719
- declare function updateVariables(vars: ActionVariables): ActionVariables;
697
+ declare function setVariables(vars: ActionVariables): ActionVariables;
720
698
  /** @internal */
721
699
  interface FormData {
722
700
  [name: string]: {
@@ -2225,16 +2203,6 @@ declare namespace widget {
2225
2203
  */
2226
2204
  function setInternalHandlers(handlers: {
2227
2205
  [key: string]: ActionEventHandler[];
2228
- }): void;
2229
- /**
2230
- * {@link updateInternalHandlers} function to update internal event handlers.
2231
- *
2232
- * @param handlers - Updated internal event handlers
2233
- *
2234
- * @returns New internal handlers
2235
- */
2236
- function updateInternalHandlers(handlers: {
2237
- [key: string]: ActionEventHandler[];
2238
2206
  }): {
2239
2207
  [key: string]: ActionEventHandler[];
2240
2208
  };
@@ -2298,18 +2266,6 @@ declare namespace widget {
2298
2266
  */
2299
2267
  function setEventHandlers(handlers: {
2300
2268
  [key: string]: ActionEventHandler;
2301
- }): void;
2302
- /**
2303
- * イベントハンドラーを更新する
2304
- *
2305
- * @param handlers - 対象となるイベントハンドラー
2306
- *
2307
- * @returns 新しいイベントハンドラーを返します。
2308
- *
2309
- * @public
2310
- */
2311
- function updateEventHandlers(handlers: {
2312
- [key: string]: ActionEventHandler;
2313
2269
  }): {
2314
2270
  [key: string]: ActionEventHandler;
2315
2271
  };
@@ -2377,17 +2333,7 @@ declare namespace widget {
2377
2333
  *
2378
2334
  * @internal
2379
2335
  */
2380
- function setVariables(vars: ActionVariables): void;
2381
- /**
2382
- * 変数を更新する
2383
- *
2384
- * @param variables - 更新する変数
2385
- *
2386
- * @returns 新しい変数を返します。
2387
- *
2388
- * @internal
2389
- */
2390
- function updateVariables(vars: ActionVariables): ActionVariables;
2336
+ function setVariables(vars: ActionVariables): ActionVariables;
2391
2337
  /** @internal */
2392
2338
  interface FormData {
2393
2339
  [name: string]: {
@@ -3261,7 +3207,7 @@ declare namespace widget {
3261
3207
  */
3262
3208
  export { showAction as show, closeAction as hide };
3263
3209
  }
3264
- export { loadGlobalScript, loadGlobalStyle, applyGlobalCss, initialize, finalize, setAutoStart, getState, setState, getStates, isOpened, getVariables, setVariables, updateVariables, getEventHandlers, setEventHandlers, updateEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, opened, closed, destroyed, stopped, isClosed, setClosed, getStoreState, getCustomVariables, setCustomVariables, updateCustomVariables, getCustomHandlers, setCustomHandlers, updateCustomHandlers, setActionSetting, customHandlers, customVariables, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonStyle, DefaultFormButtonStyle, FormSelectStyle, DefaultFormSelectStyle, create, showAction, closeAction, destroyAction, loadStyle, applyCss, getActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, showModal, ensureModalRoot, show, close, destroy, createApp, createFog, KARTE_MODAL_ROOT, ACTION_HOOK_LABEL, getActionShadowRoot, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget };
3210
+ export { loadGlobalScript, loadGlobalStyle, applyGlobalCss, initialize, finalize, setAutoStart, getState, setState, getStates, isOpened, getVariables, setVariables, getEventHandlers, setEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, opened, closed, destroyed, stopped, isClosed, setClosed, getStoreState, getCustomVariables, setCustomVariables, updateCustomVariables, getCustomHandlers, setCustomHandlers, updateCustomHandlers, setActionSetting, customHandlers, customVariables, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonStyle, DefaultFormButtonStyle, FormSelectStyle, DefaultFormSelectStyle, create, showAction, closeAction, destroyAction, loadStyle, applyCss, getActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, showModal, ensureModalRoot, show, close, destroy, createApp, createFog, KARTE_MODAL_ROOT, ACTION_HOOK_LABEL, getActionShadowRoot, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget };
3265
3211
  export type { CloseTrigger, ActionVariables, ActionEventHandler, SystemConfig, CustomVariables, OnScrollContext, OnScrollFunction, ScrollDirection, LogLevel, Log, Event, ActionProps, ActionOptions, ActionHook, ActionCloseHook, ActionChangeStateHook, SendFunction, ActionHookLog, CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequestConfig, ActionTableQueryRequestConfig, ActionTableRequestConfig };
3266
3212
  export { default as State } from './components/State.svelte';
3267
3213
  export { default as StateItem } from './components/StateItem.svelte';
package/dist/index.es.js CHANGED
@@ -317,6 +317,9 @@ const states = writable([]);
317
317
  * @internal
318
318
  */
319
319
  function addState(stateId) {
320
+ if (!get(states)) {
321
+ states.set([]);
322
+ }
320
323
  states.update(current => {
321
324
  current.push(stateId);
322
325
  return current;
@@ -422,13 +425,16 @@ function getInternalHandlers() {
422
425
  return get(internalHandlers);
423
426
  }
424
427
  /**
425
- * {@link updateInternalHandlers} function to update internal event handlers.
428
+ * {@link setInternalHandlers} function to set internal event handlers.
426
429
  *
427
- * @param handlers - Updated internal event handlers
430
+ * @param handlers - New internal event handlers
428
431
  *
429
- * @returns New internal handlers
432
+ * @internal
430
433
  */
431
- function updateInternalHandlers(handlers) {
434
+ function setInternalHandlers(handlers) {
435
+ if (!get(internalHandlers)) {
436
+ internalHandlers.set({});
437
+ }
432
438
  internalHandlers.update(current => {
433
439
  return { ...current, ...handlers };
434
440
  });
@@ -489,18 +495,9 @@ function getEventHandlers() {
489
495
  * @public
490
496
  */
491
497
  function setEventHandlers(handlers) {
492
- eventHandlers.set(handlers);
493
- }
494
- /**
495
- * イベントハンドラーを更新する
496
- *
497
- * @param handlers - 対象となるイベントハンドラー
498
- *
499
- * @returns 新しいイベントハンドラーを返します。
500
- *
501
- * @public
502
- */
503
- function updateEventHandlers(handlers) {
498
+ if (!get(eventHandlers)) {
499
+ eventHandlers.set({});
500
+ }
504
501
  eventHandlers.update(current => {
505
502
  return { ...current, ...handlers };
506
503
  });
@@ -581,18 +578,9 @@ function getVariables() {
581
578
  * @internal
582
579
  */
583
580
  function setVariables(vars) {
584
- variables.set(vars);
585
- }
586
- /**
587
- * 変数を更新する
588
- *
589
- * @param variables - 更新する変数
590
- *
591
- * @returns 新しい変数を返します。
592
- *
593
- * @internal
594
- */
595
- function updateVariables(vars) {
581
+ if (!get(variables)) {
582
+ variables.set({});
583
+ }
596
584
  variables.update(current => {
597
585
  return { ...current, ...vars };
598
586
  });
@@ -1666,7 +1654,7 @@ function onCreate(fn) {
1666
1654
  onCreateHandlers = [];
1667
1655
  }
1668
1656
  onCreateHandlers.push(fn);
1669
- updateInternalHandlers({ onCreateHandlers });
1657
+ setInternalHandlers({ onCreateHandlers });
1670
1658
  }
1671
1659
  /**
1672
1660
  * アクションが表示 (show) された後にフックする関数
@@ -1681,7 +1669,7 @@ function onShow(fn) {
1681
1669
  onShowHandlers = [];
1682
1670
  }
1683
1671
  onShowHandlers.push(fn);
1684
- updateInternalHandlers({ onShowHandlers });
1672
+ setInternalHandlers({ onShowHandlers });
1685
1673
  }
1686
1674
  /**
1687
1675
  * アクションがクローズ (close) される前にフックする関数
@@ -1696,7 +1684,7 @@ function onClose(fn) {
1696
1684
  onCloseHandlers = [];
1697
1685
  }
1698
1686
  onCloseHandlers.push(fn);
1699
- updateInternalHandlers({ onCloseHandlers });
1687
+ setInternalHandlers({ onCloseHandlers });
1700
1688
  }
1701
1689
  /**
1702
1690
  * アクションが破棄 (destroy) される前にフックする関数
@@ -1711,7 +1699,7 @@ function onDestroy(fn) {
1711
1699
  onDestroyHandlers = [];
1712
1700
  }
1713
1701
  onDestroyHandlers.push(fn);
1714
- updateInternalHandlers({ onDestroyHandlers });
1702
+ setInternalHandlers({ onDestroyHandlers });
1715
1703
  }
1716
1704
  /**
1717
1705
  * アクションのステートが変更された (changeState) 後にフックする関数
@@ -1726,7 +1714,7 @@ function onChangeState(fn) {
1726
1714
  onChangeStateHandlers = [];
1727
1715
  }
1728
1716
  onChangeStateHandlers.push(fn);
1729
- updateInternalHandlers({ onChangeStateHandlers });
1717
+ setInternalHandlers({ onChangeStateHandlers });
1730
1718
  }
1731
1719
  /**
1732
1720
  * アクションを作成する
@@ -1776,7 +1764,7 @@ function create(App, options = {
1776
1764
  });
1777
1765
  // ActionTable APIへの非同期リクエスト
1778
1766
  if (options.localVariablesQuery && data.api_key) {
1779
- loadActionTable(options.localVariablesQuery, data.api_key).then(result => updateVariables(result));
1767
+ loadActionTable(options.localVariablesQuery, data.api_key).then(result => setVariables(result));
1780
1768
  }
1781
1769
  const close = (trigger = 'none') => {
1782
1770
  if (!app) {
@@ -8236,4 +8224,4 @@ class ImageBlock extends SvelteComponent {
8236
8224
  }
8237
8225
  }
8238
8226
 
8239
- export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, Box, ClipPaths, Countdown, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexDirections, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slide, SlideItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, applyCss, applyGlobalCss, close, closeAction, closed, collection$1 as collection, create, createApp, createFog, customHandlers, customVariables, destroy, destroyAction, destroyed, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getActionShadowRoot, getCustomHandlers, getCustomVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getStoreState, getSystem, getVariables, hideOnScroll, hideOnTime, initialize, isClosed, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, updateEventHandlers, updateVariables, variables, widget };
8227
+ export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, Box, ClipPaths, Countdown, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexDirections, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, Repeats, Slide, SlideItem, State, StateItem, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, applyCss, applyGlobalCss, close, closeAction, closed, collection$1 as collection, create, createApp, createFog, customHandlers, customVariables, destroy, destroyAction, destroyed, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getActionShadowRoot, getCustomHandlers, getCustomVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getStoreState, getSystem, getVariables, hideOnScroll, hideOnTime, initialize, isClosed, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestroy, onScroll, onShow, onTime, opened, setActionSetting, setAutoStart, setClosed, setCustomHandlers, setCustomVariables, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, variables, widget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.135",
3
+ "version": "1.1.136-27961539.665abb40",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",
@@ -50,8 +50,6 @@
50
50
  "@microsoft/api-documenter": "7.19.28",
51
51
  "@microsoft/api-extractor": "7.33.8",
52
52
  "@plaidev/action-compiler": "workspace:*",
53
- "@plaidev/rollup-plugin-http-resolve": "workspace:*",
54
- "@plaidev/sender-types": "workspace:*",
55
53
  "@rollup/plugin-alias": "^4.0.0",
56
54
  "@rollup/plugin-commonjs": "^23.0.1",
57
55
  "@rollup/plugin-json": "^5.0.0",