@plaidev/karte-action-sdk 1.1.129 → 1.1.130-27958202.2eba0943
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hydrate/index.es.d.ts +331 -109
- package/dist/hydrate/index.es.js +193 -65
- package/dist/index.es.d.ts +331 -109
- package/dist/index.es.js +193 -65
- package/dist/templates.cjs.js +6 -13
- package/dist/templates.js +6 -13
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
@@ -205,13 +205,13 @@ const getStoreState = get;
|
|
205
205
|
*/
|
206
206
|
const actionSetting = writable({ autoStart: true });
|
207
207
|
/**
|
208
|
-
* {@link
|
208
|
+
* {@link getSetting} function to get action setting.
|
209
209
|
*
|
210
210
|
* @returns Current action setting
|
211
211
|
*
|
212
212
|
* @internal
|
213
213
|
*/
|
214
|
-
function
|
214
|
+
function getSetting() {
|
215
215
|
return get(actionSetting);
|
216
216
|
}
|
217
217
|
/**
|
@@ -226,23 +226,14 @@ function getActionSetting() {
|
|
226
226
|
*
|
227
227
|
* @public
|
228
228
|
*/
|
229
|
-
function
|
229
|
+
function setSetting(setting) {
|
230
230
|
actionSetting.update(current => {
|
231
231
|
return { ...current, ...setting };
|
232
232
|
});
|
233
|
-
const current =
|
233
|
+
const current = getSetting();
|
234
234
|
setStopped(!current.autoStart);
|
235
235
|
return current;
|
236
236
|
}
|
237
|
-
/**
|
238
|
-
* {@link resetActionSetting} function to reset action setting
|
239
|
-
*
|
240
|
-
* @internal
|
241
|
-
*/
|
242
|
-
function resetActionSetting() {
|
243
|
-
actionSetting.set({ autoStart: true });
|
244
|
-
setStopped();
|
245
|
-
}
|
246
237
|
/**
|
247
238
|
* Store to read KARTE system config
|
248
239
|
*
|
@@ -464,50 +455,50 @@ function setWidgetHandlers(handlers) {
|
|
464
455
|
widgetHandlers.set(handlers);
|
465
456
|
}
|
466
457
|
/**
|
467
|
-
* Store to handle
|
458
|
+
* Store to handle event handlers
|
468
459
|
*
|
469
460
|
* This is used internally.
|
470
461
|
*
|
471
462
|
* @internal
|
472
463
|
*/
|
473
|
-
const
|
464
|
+
const eventHandlers = writable({});
|
474
465
|
/**
|
475
|
-
*
|
466
|
+
* イベントハンドラーの一覧を取得する
|
476
467
|
*
|
477
|
-
* @returns
|
468
|
+
* @returns 現在のイベントハンドラー
|
478
469
|
*
|
479
470
|
* @public
|
480
471
|
*/
|
481
|
-
function
|
482
|
-
return get(
|
472
|
+
function getEventHandlers() {
|
473
|
+
return get(eventHandlers);
|
483
474
|
}
|
484
475
|
/**
|
485
|
-
*
|
476
|
+
* イベントハンドラーを登録する
|
486
477
|
*
|
487
478
|
* @remarks
|
488
|
-
*
|
479
|
+
* 登録したイベントハンドラーは、ビジュアルエディタでアクション本体とのテキストボタンのクリック時の動作で利用できます。
|
489
480
|
*
|
490
|
-
* @param handlers -
|
481
|
+
* @param handlers - 登録するイベントハンドラー
|
491
482
|
*
|
492
483
|
* @public
|
493
484
|
*/
|
494
|
-
function
|
495
|
-
|
485
|
+
function setEventHandlers(handlers) {
|
486
|
+
eventHandlers.set(handlers);
|
496
487
|
}
|
497
488
|
/**
|
498
|
-
*
|
489
|
+
* イベントハンドラーを更新する
|
499
490
|
*
|
500
|
-
* @param handlers -
|
491
|
+
* @param handlers - 対象となるイベントハンドラー
|
501
492
|
*
|
502
|
-
* @returns
|
493
|
+
* @returns 新しいイベントハンドラーを返します。
|
503
494
|
*
|
504
495
|
* @public
|
505
496
|
*/
|
506
|
-
function
|
507
|
-
|
497
|
+
function updateEventHandlers(handlers) {
|
498
|
+
eventHandlers.update(current => {
|
508
499
|
return { ...current, ...handlers };
|
509
500
|
});
|
510
|
-
return
|
501
|
+
return getEventHandlers();
|
511
502
|
}
|
512
503
|
/**
|
513
504
|
* Store to handle destruction of action
|
@@ -558,42 +549,130 @@ function setStopped(on) {
|
|
558
549
|
}
|
559
550
|
}
|
560
551
|
/**
|
561
|
-
* Store to handle
|
552
|
+
* Store to handle variables
|
562
553
|
*
|
563
554
|
* @internal
|
564
555
|
*/
|
565
|
-
const
|
556
|
+
const variables = writable({});
|
566
557
|
/**
|
567
|
-
*
|
558
|
+
* 変数の一覧を取得する
|
568
559
|
*
|
569
|
-
* @returns
|
560
|
+
* @returns 現在の変数の一覧
|
570
561
|
*
|
571
|
-
* @
|
562
|
+
* @internal
|
572
563
|
*/
|
573
|
-
function
|
574
|
-
return get(
|
564
|
+
function getVariables() {
|
565
|
+
return get(variables);
|
575
566
|
}
|
576
567
|
/**
|
577
|
-
*
|
568
|
+
* 変数を設定する
|
578
569
|
*
|
579
570
|
* @remarks
|
580
571
|
* 設定した変数は、ビジュアルエディタのテキストフォームなどで利用できます。
|
581
572
|
*
|
582
|
-
* @param
|
573
|
+
* @param vars - 変数
|
583
574
|
*
|
584
|
-
* @
|
575
|
+
* @internal
|
576
|
+
*/
|
577
|
+
function setVariables(vars) {
|
578
|
+
variables.set(vars);
|
579
|
+
}
|
580
|
+
/**
|
581
|
+
* 変数を更新する
|
582
|
+
*
|
583
|
+
* @param variables - 更新する変数
|
584
|
+
*
|
585
|
+
* @returns 新しい変数を返します。
|
586
|
+
*
|
587
|
+
* @internal
|
588
|
+
*/
|
589
|
+
function updateVariables(vars) {
|
590
|
+
variables.update(current => {
|
591
|
+
return { ...current, ...vars };
|
592
|
+
});
|
593
|
+
return getVariables();
|
594
|
+
}
|
595
|
+
/**
|
596
|
+
* Store for form data
|
597
|
+
*
|
598
|
+
* @internal
|
599
|
+
*/
|
600
|
+
const formData = writable({});
|
601
|
+
/**
|
602
|
+
* 非推奨
|
603
|
+
*
|
604
|
+
* @deprecated 非推奨
|
605
|
+
*
|
606
|
+
* @internal
|
607
|
+
*/
|
608
|
+
const customHandlers = writable({});
|
609
|
+
/**
|
610
|
+
* 非推奨
|
611
|
+
*
|
612
|
+
* @deprecated 非推奨
|
613
|
+
*
|
614
|
+
* @internal
|
615
|
+
*/
|
616
|
+
function getCustomHandlers() {
|
617
|
+
return get(customHandlers);
|
618
|
+
}
|
619
|
+
/**
|
620
|
+
* 非推奨
|
621
|
+
*
|
622
|
+
* @deprecated 非推奨
|
623
|
+
*
|
624
|
+
* @internal
|
625
|
+
*/
|
626
|
+
function setCustomHandlers(handlers) {
|
627
|
+
customHandlers.set(handlers);
|
628
|
+
}
|
629
|
+
/**
|
630
|
+
* 非推奨
|
631
|
+
*
|
632
|
+
* @deprecated 非推奨
|
633
|
+
*
|
634
|
+
* @internal
|
635
|
+
*/
|
636
|
+
function updateCustomHandlers(handlers) {
|
637
|
+
customHandlers.update(current => {
|
638
|
+
return { ...current, ...handlers };
|
639
|
+
});
|
640
|
+
return getCustomHandlers();
|
641
|
+
}
|
642
|
+
/**
|
643
|
+
* 非推奨
|
644
|
+
*
|
645
|
+
* @deprecated 非推奨
|
646
|
+
*
|
647
|
+
* @internal
|
648
|
+
*/
|
649
|
+
const customVariables = writable({});
|
650
|
+
/**
|
651
|
+
* 非推奨
|
652
|
+
*
|
653
|
+
* @deprecated 非推奨
|
654
|
+
*
|
655
|
+
* @internal
|
656
|
+
*/
|
657
|
+
function getCustomVariables() {
|
658
|
+
return get(customVariables);
|
659
|
+
}
|
660
|
+
/**
|
661
|
+
* 非推奨
|
662
|
+
*
|
663
|
+
* @deprecated 非推奨
|
664
|
+
*
|
665
|
+
* @internal
|
585
666
|
*/
|
586
667
|
function setCustomVariables(variables) {
|
587
668
|
customVariables.set(variables);
|
588
669
|
}
|
589
670
|
/**
|
590
|
-
*
|
671
|
+
* 非推奨
|
591
672
|
*
|
592
|
-
* @
|
593
|
-
*
|
594
|
-
* @returns 新しいカスタム変数を返します。
|
673
|
+
* @deprecated 非推奨
|
595
674
|
*
|
596
|
-
* @
|
675
|
+
* @internal
|
597
676
|
*/
|
598
677
|
function updateCustomVariables(variables) {
|
599
678
|
customVariables.update(current => {
|
@@ -602,11 +681,41 @@ function updateCustomVariables(variables) {
|
|
602
681
|
return getCustomVariables();
|
603
682
|
}
|
604
683
|
/**
|
605
|
-
*
|
684
|
+
* 非推奨
|
685
|
+
*
|
686
|
+
* @deprecated 非推奨
|
606
687
|
*
|
607
688
|
* @internal
|
608
689
|
*/
|
609
|
-
|
690
|
+
function getActionSetting() {
|
691
|
+
return get(actionSetting);
|
692
|
+
}
|
693
|
+
/**
|
694
|
+
* 非推奨
|
695
|
+
*
|
696
|
+
* @deprecated 非推奨
|
697
|
+
*
|
698
|
+
* @internal
|
699
|
+
*/
|
700
|
+
function setActionSetting(setting) {
|
701
|
+
actionSetting.update(current => {
|
702
|
+
return { ...current, ...setting };
|
703
|
+
});
|
704
|
+
const current = getActionSetting();
|
705
|
+
setStopped(!current.autoStart);
|
706
|
+
return current;
|
707
|
+
}
|
708
|
+
/**
|
709
|
+
* 非推奨
|
710
|
+
*
|
711
|
+
* @deprecated 非推奨
|
712
|
+
*
|
713
|
+
* @internal
|
714
|
+
*/
|
715
|
+
function resetActionSetting() {
|
716
|
+
actionSetting.set({ autoStart: true });
|
717
|
+
setStopped();
|
718
|
+
}
|
610
719
|
|
611
720
|
function isEmpty(value) {
|
612
721
|
if (Array.isArray(value)) {
|
@@ -1727,7 +1836,7 @@ function dispatchDestroyEvent() {
|
|
1727
1836
|
*
|
1728
1837
|
* @public
|
1729
1838
|
*/
|
1730
|
-
function
|
1839
|
+
function destroyAction() {
|
1731
1840
|
setDestroyed(true);
|
1732
1841
|
dispatchDestroyEvent();
|
1733
1842
|
}
|
@@ -1798,7 +1907,7 @@ const h = (type, props, ...children) => {
|
|
1798
1907
|
return el;
|
1799
1908
|
};
|
1800
1909
|
/**
|
1801
|
-
*
|
1910
|
+
* 非推奨
|
1802
1911
|
*
|
1803
1912
|
* @deprecated 非推奨
|
1804
1913
|
*
|
@@ -1830,14 +1939,13 @@ function createFog({ color = '#000', opacity = '50%', zIndex = 999, onclick, })
|
|
1830
1939
|
return { fog, close };
|
1831
1940
|
}
|
1832
1941
|
/**
|
1833
|
-
*
|
1942
|
+
* アクションのルートの DOM 要素を取得する
|
1834
1943
|
*
|
1835
|
-
* @returns
|
1836
|
-
* アクションが Shadow Root を持つ場合は Shadow Root の Element 返します。ない場合は `null` を返します
|
1944
|
+
* @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
|
1837
1945
|
*
|
1838
1946
|
* @public
|
1839
1947
|
*/
|
1840
|
-
function
|
1948
|
+
function getActionRoot() {
|
1841
1949
|
const root = document.querySelector(`.${KARTE_ACTION_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`);
|
1842
1950
|
if (!root?.shadowRoot) {
|
1843
1951
|
return null;
|
@@ -1927,7 +2035,7 @@ async function loadStyle(href) {
|
|
1927
2035
|
}
|
1928
2036
|
// -------- The following codes are deprecated --------
|
1929
2037
|
/**
|
1930
|
-
*
|
2038
|
+
* 非推奨
|
1931
2039
|
*
|
1932
2040
|
* @deprecated 非推奨
|
1933
2041
|
*
|
@@ -1935,7 +2043,7 @@ async function loadStyle(href) {
|
|
1935
2043
|
*/
|
1936
2044
|
const showModal = create;
|
1937
2045
|
/**
|
1938
|
-
*
|
2046
|
+
* 非推奨
|
1939
2047
|
*
|
1940
2048
|
* @deprecated 非推奨
|
1941
2049
|
*
|
@@ -1943,7 +2051,7 @@ const showModal = create;
|
|
1943
2051
|
*/
|
1944
2052
|
const KARTE_MODAL_ROOT = 'karte-modal-root';
|
1945
2053
|
/**
|
1946
|
-
*
|
2054
|
+
* 非推奨
|
1947
2055
|
*
|
1948
2056
|
* @deprecated 非推奨
|
1949
2057
|
*
|
@@ -1951,7 +2059,7 @@ const KARTE_MODAL_ROOT = 'karte-modal-root';
|
|
1951
2059
|
*/
|
1952
2060
|
const ensureModalRoot = ensureActionRoot;
|
1953
2061
|
/**
|
1954
|
-
*
|
2062
|
+
* 非推奨
|
1955
2063
|
*
|
1956
2064
|
* @deprecated 非推奨
|
1957
2065
|
*
|
@@ -1959,7 +2067,7 @@ const ensureModalRoot = ensureActionRoot;
|
|
1959
2067
|
*/
|
1960
2068
|
const show = showAction;
|
1961
2069
|
/**
|
1962
|
-
*
|
2070
|
+
* 非推奨
|
1963
2071
|
*
|
1964
2072
|
* @deprecated 非推奨
|
1965
2073
|
*
|
@@ -1967,12 +2075,7 @@ const show = showAction;
|
|
1967
2075
|
*/
|
1968
2076
|
const close = closeAction;
|
1969
2077
|
/**
|
1970
|
-
*
|
1971
|
-
*
|
1972
|
-
* @param App - An entry point of svelte component.
|
1973
|
-
* @param options - An {@link AppOptions | options}
|
1974
|
-
*
|
1975
|
-
* @returns A function to close the modal
|
2078
|
+
* 非推奨
|
1976
2079
|
*
|
1977
2080
|
* @deprecated 非推奨
|
1978
2081
|
*
|
@@ -2018,6 +2121,31 @@ function createApp(App, options = {
|
|
2018
2121
|
},
|
2019
2122
|
};
|
2020
2123
|
}
|
2124
|
+
/**
|
2125
|
+
* 非推奨
|
2126
|
+
*
|
2127
|
+
* @deprecated 非推奨
|
2128
|
+
*
|
2129
|
+
* @internal
|
2130
|
+
*/
|
2131
|
+
function getActionShadowRoot() {
|
2132
|
+
const root = document.querySelector(`.${KARTE_ACTION_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`);
|
2133
|
+
if (!root?.shadowRoot) {
|
2134
|
+
return null;
|
2135
|
+
}
|
2136
|
+
return root.shadowRoot;
|
2137
|
+
}
|
2138
|
+
/**
|
2139
|
+
* 非推奨
|
2140
|
+
*
|
2141
|
+
* @deprecated 非推奨
|
2142
|
+
*
|
2143
|
+
* @internal
|
2144
|
+
*/
|
2145
|
+
function destroy() {
|
2146
|
+
setDestroyed(true);
|
2147
|
+
dispatchDestroyEvent();
|
2148
|
+
}
|
2021
2149
|
|
2022
2150
|
/**
|
2023
2151
|
* Widget API 互換のインターフェース
|
@@ -8502,4 +8630,4 @@ class ImageBlock extends SvelteComponent {
|
|
8502
8630
|
}
|
8503
8631
|
}
|
8504
8632
|
|
8505
|
-
export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormRatingButtonType, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonTypes, FormRatingButtons, 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, destroyed, ensureModalRoot, finalize, formData, getActionShadowRoot, getCustomHandlers, getCustomVariables, getEvents, getLogs, getState$1 as getState, getStates, getStoreState, getSystem, 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, setState$1 as setState, show, showAction, showModal, showOnScroll, showOnTime, state, stopped, updateCustomHandlers, updateCustomVariables, widget };
|
8633
|
+
export { ACTION_HOOK_LABEL, Alignments, AnimationStyles, BackgroundSizes, ClipPaths, Cursors, DefaultEdgePosition, DefaultFormButtonStyle, DefaultFormRatingButtonType, DefaultFormSelectStyle, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, FlexItem, FormCheckBoxes, FormRadioButtons, FormRatingButtonTypes, FormRatingButtons, 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 };
|