@plaidev/karte-action-sdk 1.1.268-29111070.d0bdfb56 → 1.1.268-29127338.e0debfc5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.d.ts +63 -0
- package/dist/actionEvent.d.ts +25 -0
- package/dist/collection.d.ts +121 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components-flex/avatar/styles.d.ts +3 -0
- package/dist/components-flex/avatar/types.d.ts +24 -0
- package/dist/components-flex/brand-kit.d.ts +16 -0
- package/dist/components-flex/button/styles.d.ts +8 -0
- package/dist/components-flex/button/types.d.ts +57 -0
- package/dist/components-flex/button-outlined/styles.d.ts +8 -0
- package/dist/components-flex/button-outlined/types.d.ts +20 -0
- package/dist/components-flex/button-text/styles.d.ts +6 -0
- package/dist/components-flex/button-text/types.d.ts +33 -0
- package/dist/components-flex/clip-copy/types.d.ts +6 -0
- package/dist/components-flex/close-button/types.d.ts +32 -0
- package/dist/components-flex/code/types.d.ts +6 -0
- package/dist/components-flex/count-down/types.d.ts +17 -0
- package/dist/components-flex/icon/styles.d.ts +3 -0
- package/dist/components-flex/icon/types.d.ts +18 -0
- package/dist/components-flex/image/styles.d.ts +3 -0
- package/dist/components-flex/image/types.d.ts +26 -0
- package/dist/components-flex/layout/types.d.ts +20 -0
- package/dist/components-flex/list/types.d.ts +30 -0
- package/dist/components-flex/modal/types.d.ts +5 -0
- package/dist/components-flex/multi-column/types.d.ts +31 -0
- package/dist/components-flex/props.d.ts +91 -0
- package/dist/components-flex/schemas.d.ts +36 -0
- package/dist/components-flex/shared/styles.d.ts +3 -0
- package/dist/components-flex/shared/types.d.ts +13 -0
- package/dist/components-flex/slider/types.d.ts +10 -0
- package/dist/components-flex/styles.d.ts +9 -0
- package/dist/components-flex/text/constants.d.ts +4 -0
- package/dist/components-flex/text/styles.d.ts +7 -0
- package/dist/components-flex/text/types.d.ts +37 -0
- package/dist/components-flex/text-link/styles.d.ts +6 -0
- package/dist/components-flex/text-link/types.d.ts +31 -0
- package/dist/components-flex/utils/color.d.ts +7 -0
- package/dist/components-flex/utils/obj-to-style.d.ts +2 -0
- package/dist/components-flex/utils/parser.d.ts +5 -0
- package/dist/components-flex/utils/prop-to-style.d.ts +11 -0
- package/dist/components-flex/variants.d.ts +42 -0
- package/dist/components-flex/youtube/types.d.ts +16 -0
- package/dist/constants.d.ts +27 -0
- package/dist/display-logic.d.ts +125 -0
- package/dist/enhancedStopPropagation.d.ts +6 -0
- package/dist/form.d.ts +100 -0
- package/dist/functions.d.ts +71 -0
- package/dist/hooks/useClickable.d.ts +7 -0
- package/dist/hooks/useInjectCustomizeCss.d.ts +2 -0
- package/dist/hooks/useText.d.ts +5 -0
- package/dist/hydrate/action.d.ts +63 -0
- package/dist/hydrate/actionEvent.d.ts +25 -0
- package/dist/hydrate/collection.d.ts +121 -0
- package/dist/hydrate/components/index.d.ts +32 -0
- package/dist/hydrate/components-flex/avatar/styles.d.ts +3 -0
- package/dist/hydrate/components-flex/avatar/types.d.ts +24 -0
- package/dist/hydrate/components-flex/brand-kit.d.ts +16 -0
- package/dist/hydrate/components-flex/button/styles.d.ts +8 -0
- package/dist/hydrate/components-flex/button/types.d.ts +57 -0
- package/dist/hydrate/components-flex/button-outlined/styles.d.ts +8 -0
- package/dist/hydrate/components-flex/button-outlined/types.d.ts +20 -0
- package/dist/hydrate/components-flex/button-text/styles.d.ts +6 -0
- package/dist/hydrate/components-flex/button-text/types.d.ts +33 -0
- package/dist/hydrate/components-flex/clip-copy/types.d.ts +6 -0
- package/dist/hydrate/components-flex/close-button/types.d.ts +32 -0
- package/dist/hydrate/components-flex/code/types.d.ts +6 -0
- package/dist/hydrate/components-flex/count-down/types.d.ts +17 -0
- package/dist/hydrate/components-flex/icon/styles.d.ts +3 -0
- package/dist/hydrate/components-flex/icon/types.d.ts +18 -0
- package/dist/hydrate/components-flex/image/styles.d.ts +3 -0
- package/dist/hydrate/components-flex/image/types.d.ts +26 -0
- package/dist/hydrate/components-flex/layout/types.d.ts +20 -0
- package/dist/hydrate/components-flex/list/types.d.ts +30 -0
- package/dist/hydrate/components-flex/modal/types.d.ts +5 -0
- package/dist/hydrate/components-flex/multi-column/types.d.ts +31 -0
- package/dist/hydrate/components-flex/props.d.ts +91 -0
- package/dist/hydrate/components-flex/schemas.d.ts +36 -0
- package/dist/hydrate/components-flex/shared/styles.d.ts +3 -0
- package/dist/hydrate/components-flex/shared/types.d.ts +13 -0
- package/dist/hydrate/components-flex/slider/types.d.ts +10 -0
- package/dist/hydrate/components-flex/styles.d.ts +9 -0
- package/dist/hydrate/components-flex/text/constants.d.ts +4 -0
- package/dist/hydrate/components-flex/text/styles.d.ts +7 -0
- package/dist/hydrate/components-flex/text/types.d.ts +37 -0
- package/dist/hydrate/components-flex/text-link/styles.d.ts +6 -0
- package/dist/hydrate/components-flex/text-link/types.d.ts +31 -0
- package/dist/hydrate/components-flex/utils/color.d.ts +7 -0
- package/dist/hydrate/components-flex/utils/obj-to-style.d.ts +2 -0
- package/dist/hydrate/components-flex/utils/parser.d.ts +5 -0
- package/dist/hydrate/components-flex/utils/prop-to-style.d.ts +11 -0
- package/dist/hydrate/components-flex/variants.d.ts +42 -0
- package/dist/hydrate/components-flex/youtube/types.d.ts +16 -0
- package/dist/hydrate/constants.d.ts +27 -0
- package/dist/hydrate/display-logic.d.ts +125 -0
- package/dist/hydrate/enhancedStopPropagation.d.ts +6 -0
- package/dist/hydrate/form.d.ts +100 -0
- package/dist/hydrate/functions.d.ts +71 -0
- package/dist/hydrate/hooks/useClickable.d.ts +7 -0
- package/dist/hydrate/hooks/useInjectCustomizeCss.d.ts +2 -0
- package/dist/hydrate/hooks/useText.d.ts +5 -0
- package/dist/hydrate/index.d.ts +111 -0
- package/dist/hydrate/index.es.js +12721 -12529
- package/dist/hydrate/index.svelte5.d.ts +79 -0
- package/dist/hydrate/logger.d.ts +48 -0
- package/dist/hydrate/modal.d.ts +214 -0
- package/dist/hydrate/modal.svelte5.d.ts +214 -0
- package/dist/hydrate/prop.d.ts +431 -0
- package/dist/hydrate/script.d.ts +33 -0
- package/dist/hydrate/stores.d.ts +376 -0
- package/dist/hydrate/types.d.ts +183 -0
- package/dist/hydrate/utils.d.ts +171 -0
- package/dist/hydrate/widget.d.ts +148 -0
- package/dist/icons.d.ts +27 -28
- package/dist/icons.js +225 -159
- package/dist/index.es.d.ts +111 -2988
- package/dist/index.es.js +11913 -12372
- package/dist/logger.d.ts +48 -0
- package/dist/modal.d.ts +214 -0
- package/dist/modal.svelte5.d.ts +214 -0
- package/dist/prop.d.ts +431 -0
- package/dist/script.d.ts +33 -0
- package/dist/stores.d.ts +376 -0
- package/dist/svelte5/action.d.ts +63 -0
- package/dist/svelte5/actionEvent.d.ts +25 -0
- package/dist/svelte5/collection.d.ts +121 -0
- package/dist/svelte5/components/index.d.ts +32 -0
- package/dist/svelte5/components-flex/avatar/styles.d.ts +3 -0
- package/dist/svelte5/components-flex/avatar/types.d.ts +24 -0
- package/dist/svelte5/components-flex/brand-kit.d.ts +16 -0
- package/dist/svelte5/components-flex/button/styles.d.ts +8 -0
- package/dist/svelte5/components-flex/button/types.d.ts +57 -0
- package/dist/svelte5/components-flex/button-outlined/styles.d.ts +8 -0
- package/dist/svelte5/components-flex/button-outlined/types.d.ts +20 -0
- package/dist/svelte5/components-flex/button-text/styles.d.ts +6 -0
- package/dist/svelte5/components-flex/button-text/types.d.ts +33 -0
- package/dist/svelte5/components-flex/clip-copy/types.d.ts +6 -0
- package/dist/svelte5/components-flex/close-button/types.d.ts +32 -0
- package/dist/svelte5/components-flex/code/types.d.ts +6 -0
- package/dist/svelte5/components-flex/count-down/types.d.ts +17 -0
- package/dist/svelte5/components-flex/icon/styles.d.ts +3 -0
- package/dist/svelte5/components-flex/icon/types.d.ts +18 -0
- package/dist/svelte5/components-flex/image/styles.d.ts +3 -0
- package/dist/svelte5/components-flex/image/types.d.ts +26 -0
- package/dist/svelte5/components-flex/layout/types.d.ts +20 -0
- package/dist/svelte5/components-flex/list/types.d.ts +30 -0
- package/dist/svelte5/components-flex/modal/types.d.ts +5 -0
- package/dist/svelte5/components-flex/multi-column/types.d.ts +31 -0
- package/dist/svelte5/components-flex/props.d.ts +91 -0
- package/dist/svelte5/components-flex/schemas.d.ts +36 -0
- package/dist/svelte5/components-flex/shared/styles.d.ts +3 -0
- package/dist/svelte5/components-flex/shared/types.d.ts +13 -0
- package/dist/svelte5/components-flex/slider/types.d.ts +10 -0
- package/dist/svelte5/components-flex/styles.d.ts +9 -0
- package/dist/svelte5/components-flex/text/constants.d.ts +4 -0
- package/dist/svelte5/components-flex/text/styles.d.ts +7 -0
- package/dist/svelte5/components-flex/text/types.d.ts +37 -0
- package/dist/svelte5/components-flex/text-link/styles.d.ts +6 -0
- package/dist/svelte5/components-flex/text-link/types.d.ts +31 -0
- package/dist/svelte5/components-flex/utils/color.d.ts +7 -0
- package/dist/svelte5/components-flex/utils/obj-to-style.d.ts +2 -0
- package/dist/svelte5/components-flex/utils/parser.d.ts +5 -0
- package/dist/svelte5/components-flex/utils/prop-to-style.d.ts +11 -0
- package/dist/svelte5/components-flex/variants.d.ts +42 -0
- package/dist/svelte5/components-flex/youtube/types.d.ts +16 -0
- package/dist/svelte5/constants.d.ts +27 -0
- package/dist/svelte5/display-logic.d.ts +125 -0
- package/dist/svelte5/form.d.ts +100 -0
- package/dist/svelte5/functions.d.ts +71 -0
- package/dist/svelte5/hooks/useClickable.d.ts +7 -0
- package/dist/svelte5/hooks/useInjectCustomizeCss.d.ts +2 -0
- package/dist/svelte5/hooks/useText.d.ts +5 -0
- package/dist/svelte5/hydrate/action.d.ts +63 -0
- package/dist/svelte5/hydrate/actionEvent.d.ts +25 -0
- package/dist/svelte5/hydrate/collection.d.ts +121 -0
- package/dist/svelte5/hydrate/components/index.d.ts +32 -0
- package/dist/svelte5/hydrate/components-flex/avatar/styles.d.ts +3 -0
- package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +24 -0
- package/dist/svelte5/hydrate/components-flex/brand-kit.d.ts +16 -0
- package/dist/svelte5/hydrate/components-flex/button/styles.d.ts +8 -0
- package/dist/svelte5/hydrate/components-flex/button/types.d.ts +57 -0
- package/dist/svelte5/hydrate/components-flex/button-outlined/styles.d.ts +8 -0
- package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +20 -0
- package/dist/svelte5/hydrate/components-flex/button-text/styles.d.ts +6 -0
- package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +33 -0
- package/dist/svelte5/hydrate/components-flex/clip-copy/types.d.ts +6 -0
- package/dist/svelte5/hydrate/components-flex/close-button/types.d.ts +32 -0
- package/dist/svelte5/hydrate/components-flex/code/types.d.ts +6 -0
- package/dist/svelte5/hydrate/components-flex/count-down/types.d.ts +17 -0
- package/dist/svelte5/hydrate/components-flex/icon/styles.d.ts +3 -0
- package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +18 -0
- package/dist/svelte5/hydrate/components-flex/image/styles.d.ts +3 -0
- package/dist/svelte5/hydrate/components-flex/image/types.d.ts +26 -0
- package/dist/svelte5/hydrate/components-flex/layout/types.d.ts +20 -0
- package/dist/svelte5/hydrate/components-flex/list/types.d.ts +30 -0
- package/dist/svelte5/hydrate/components-flex/modal/types.d.ts +5 -0
- package/dist/svelte5/hydrate/components-flex/multi-column/types.d.ts +31 -0
- package/dist/svelte5/hydrate/components-flex/props.d.ts +91 -0
- package/dist/svelte5/hydrate/components-flex/schemas.d.ts +36 -0
- package/dist/svelte5/hydrate/components-flex/shared/styles.d.ts +3 -0
- package/dist/svelte5/hydrate/components-flex/shared/types.d.ts +13 -0
- package/dist/svelte5/hydrate/components-flex/slider/types.d.ts +10 -0
- package/dist/svelte5/hydrate/components-flex/styles.d.ts +9 -0
- package/dist/svelte5/hydrate/components-flex/text/constants.d.ts +4 -0
- package/dist/svelte5/hydrate/components-flex/text/styles.d.ts +7 -0
- package/dist/svelte5/hydrate/components-flex/text/types.d.ts +37 -0
- package/dist/svelte5/hydrate/components-flex/text-link/styles.d.ts +6 -0
- package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +31 -0
- package/dist/svelte5/hydrate/components-flex/utils/color.d.ts +7 -0
- package/dist/svelte5/hydrate/components-flex/utils/obj-to-style.d.ts +2 -0
- package/dist/svelte5/hydrate/components-flex/utils/parser.d.ts +5 -0
- package/dist/svelte5/hydrate/components-flex/utils/prop-to-style.d.ts +11 -0
- package/dist/svelte5/hydrate/components-flex/variants.d.ts +42 -0
- package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +16 -0
- package/dist/svelte5/hydrate/constants.d.ts +27 -0
- package/dist/svelte5/hydrate/display-logic.d.ts +125 -0
- package/dist/svelte5/hydrate/form.d.ts +100 -0
- package/dist/svelte5/hydrate/functions.d.ts +71 -0
- package/dist/svelte5/hydrate/hooks/useClickable.d.ts +7 -0
- package/dist/svelte5/hydrate/hooks/useInjectCustomizeCss.d.ts +2 -0
- package/dist/svelte5/hydrate/hooks/useText.d.ts +5 -0
- package/dist/svelte5/hydrate/index.es.d.ts +79 -2956
- package/dist/svelte5/hydrate/index.es.js +5444 -6490
- package/dist/svelte5/hydrate/logger.d.ts +48 -0
- package/dist/svelte5/hydrate/modal.d.ts +214 -0
- package/dist/svelte5/hydrate/modal.svelte5.d.ts +214 -0
- package/dist/svelte5/hydrate/prop.d.ts +431 -0
- package/dist/svelte5/hydrate/script.d.ts +33 -0
- package/dist/svelte5/hydrate/stores.d.ts +376 -0
- package/dist/svelte5/hydrate/types.d.ts +183 -0
- package/dist/svelte5/hydrate/utils.d.ts +171 -0
- package/dist/svelte5/hydrate/widget.d.ts +148 -0
- package/dist/svelte5/index.es.d.ts +79 -2956
- package/dist/svelte5/index.es.js +5416 -6459
- package/dist/svelte5/index.front2.es.d.ts +1 -2
- package/dist/svelte5/index.front2.es.js +5657 -6715
- package/dist/svelte5/index.svelte5.d.ts +79 -0
- package/dist/svelte5/logger.d.ts +48 -0
- package/dist/svelte5/modal.d.ts +214 -0
- package/dist/svelte5/modal.svelte5.d.ts +214 -0
- package/dist/svelte5/prop.d.ts +431 -0
- package/dist/svelte5/script.d.ts +33 -0
- package/dist/svelte5/stores.d.ts +376 -0
- package/dist/svelte5/types.d.ts +183 -0
- package/dist/svelte5/utils.d.ts +171 -0
- package/dist/svelte5/widget.d.ts +148 -0
- package/dist/templates.cjs.js +38 -47
- package/dist/templates.d.ts +27 -28
- package/dist/templates.js +37 -46
- package/dist/types.d.ts +183 -0
- package/dist/utils.d.ts +171 -0
- package/dist/widget.d.ts +148 -0
- package/package.json +9 -18
- package/dist/hydrate/index.es.d.ts +0 -2988
- package/dist/templates.cjs.d.ts +0 -34
@@ -0,0 +1,376 @@
|
|
1
|
+
import { get as get_ } from "svelte/store";
|
2
|
+
import type { Writable as Writable_ } from "svelte/store";
|
3
|
+
import type { ActionSetting, ActionEventHandler, ActionVariables, SystemConfig, ActionRunnerContext } from "./types.js";
|
4
|
+
/** @internal */
|
5
|
+
export type Store<T> = Writable_<T>;
|
6
|
+
/**
|
7
|
+
* get store state value
|
8
|
+
*
|
9
|
+
* @deprecated 非推奨
|
10
|
+
*
|
11
|
+
* @internal
|
12
|
+
*/
|
13
|
+
export declare const getStoreState: typeof get_;
|
14
|
+
/**
|
15
|
+
* Store to handle action setting
|
16
|
+
*
|
17
|
+
* @internal
|
18
|
+
*/
|
19
|
+
export declare const actionSetting: Store<ActionSetting>;
|
20
|
+
/**
|
21
|
+
* {@link getSetting} function to get action setting.
|
22
|
+
*
|
23
|
+
* @returns Current action setting
|
24
|
+
*
|
25
|
+
* @internal
|
26
|
+
*/
|
27
|
+
export declare function getSetting(): ActionSetting;
|
28
|
+
/**
|
29
|
+
* アクション設定を更新する
|
30
|
+
*
|
31
|
+
* @param setting - 更新するアクション設定
|
32
|
+
*
|
33
|
+
* @returns 新しいアクション設定
|
34
|
+
*
|
35
|
+
* @public
|
36
|
+
*/
|
37
|
+
export declare function setSetting(setting: ActionSetting): ActionSetting;
|
38
|
+
/**
|
39
|
+
* {@link resetSetting} function to reset action setting
|
40
|
+
*
|
41
|
+
* @internal
|
42
|
+
*/
|
43
|
+
export declare function resetSetting(): void;
|
44
|
+
/**
|
45
|
+
* Store to read KARTE system config
|
46
|
+
*
|
47
|
+
* @internal
|
48
|
+
*/
|
49
|
+
export declare const system: Store<SystemConfig>;
|
50
|
+
/**
|
51
|
+
* KARTE の設定を取得する
|
52
|
+
*
|
53
|
+
* @remarks
|
54
|
+
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
55
|
+
* 取得できる設定は、APIキー、接客ID、アクションショートIDなどです。
|
56
|
+
*
|
57
|
+
* @returns 現在の KARTE システムの設定を返します
|
58
|
+
*
|
59
|
+
* @public
|
60
|
+
*/
|
61
|
+
export declare function getSystem(): SystemConfig;
|
62
|
+
/**
|
63
|
+
* {@link setSystem} function to set KARTE system config.
|
64
|
+
*
|
65
|
+
* @internal
|
66
|
+
*/
|
67
|
+
export declare function setSystem(config: SystemConfig): void;
|
68
|
+
/**
|
69
|
+
* アクション実行時のコンテキストを保存するストア
|
70
|
+
*
|
71
|
+
* @internal
|
72
|
+
*/
|
73
|
+
export declare const actionRunnerContext: Store<ActionRunnerContext | null>;
|
74
|
+
/**
|
75
|
+
* アクション実行時のコンテキストを取得する
|
76
|
+
*
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
export declare function getActionRunnerContext(): ActionRunnerContext | null;
|
80
|
+
/**
|
81
|
+
* アクション実行時のコンテキストを保存する
|
82
|
+
*
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
export declare function setActionRunnerContext(value: ActionRunnerContext | null): void;
|
86
|
+
/**
|
87
|
+
* Store to handle current state ID
|
88
|
+
*
|
89
|
+
* This is exported becase of compatible interface for App.svelte.
|
90
|
+
* Don't use directly.
|
91
|
+
*
|
92
|
+
* @internal
|
93
|
+
*/
|
94
|
+
export declare const state: Store<string>;
|
95
|
+
/**
|
96
|
+
* 現在のステートを設定する
|
97
|
+
*
|
98
|
+
* @param stateId - 表示するステートID
|
99
|
+
* @param options - オプション。`options.disableInPreview`でプレビュー時のステート遷移を無効化できます。
|
100
|
+
*
|
101
|
+
* @public
|
102
|
+
*/
|
103
|
+
export declare function setState(stateId: string, options?: {
|
104
|
+
disableInPreview: boolean
|
105
|
+
}): void;
|
106
|
+
/**
|
107
|
+
* 現在のステートを取得する
|
108
|
+
*
|
109
|
+
* @remarks
|
110
|
+
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
111
|
+
*
|
112
|
+
* @returns 現在のステートID
|
113
|
+
*
|
114
|
+
* @public
|
115
|
+
*/
|
116
|
+
export declare function getState(): string;
|
117
|
+
/**
|
118
|
+
* Store to handle all state IDs
|
119
|
+
*
|
120
|
+
* @internal
|
121
|
+
*/
|
122
|
+
export declare const states: Store<string[]>;
|
123
|
+
/**
|
124
|
+
* {@link getStates} function to add new state ID to list of state IDs.
|
125
|
+
*
|
126
|
+
* @param stateId - New state ID
|
127
|
+
*
|
128
|
+
* @internal
|
129
|
+
*/
|
130
|
+
export declare function addState(stateId: string): void;
|
131
|
+
/**
|
132
|
+
* ステートID一覧を取得する
|
133
|
+
*
|
134
|
+
* @remarks
|
135
|
+
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
136
|
+
*
|
137
|
+
* @returns すべてのステートID
|
138
|
+
*
|
139
|
+
* @public
|
140
|
+
*/
|
141
|
+
export declare function getStates(): string[];
|
142
|
+
/**
|
143
|
+
* Store to handle visibility of action
|
144
|
+
*
|
145
|
+
* @internal
|
146
|
+
*/
|
147
|
+
export declare const opened: Store<boolean>;
|
148
|
+
/**
|
149
|
+
* アクションの表示・非表示の状態を取得する
|
150
|
+
*
|
151
|
+
* @returns アクションが表示されているときは `true`、非表示のときは `false` を返します。
|
152
|
+
*
|
153
|
+
* @public
|
154
|
+
*/
|
155
|
+
export declare function isOpened(): boolean;
|
156
|
+
/**
|
157
|
+
* {@link setOpened} function to set if action is opened.
|
158
|
+
*
|
159
|
+
* @internal
|
160
|
+
*/
|
161
|
+
export declare function setOpened(on: boolean): void;
|
162
|
+
/**
|
163
|
+
* Store to handle visibility of action
|
164
|
+
*
|
165
|
+
* @deprecated 非推奨
|
166
|
+
*
|
167
|
+
* @internal
|
168
|
+
*/
|
169
|
+
export declare const closed: Store<boolean>;
|
170
|
+
/**
|
171
|
+
* {@link isClosed} function to check if action is clsoed.
|
172
|
+
*
|
173
|
+
* @returns Flag if action is closed / true: Closed, false: Not closed
|
174
|
+
*
|
175
|
+
* @deprecated 非推奨
|
176
|
+
*
|
177
|
+
* @internal
|
178
|
+
*/
|
179
|
+
export declare function isClosed(): boolean;
|
180
|
+
/**
|
181
|
+
* {@link setClosed} function to set if action is closed.
|
182
|
+
*
|
183
|
+
* @deprecated 非推奨
|
184
|
+
*
|
185
|
+
* @internal
|
186
|
+
*/
|
187
|
+
export declare function setClosed(on: boolean): void;
|
188
|
+
/**
|
189
|
+
* Store to handle max z-index for grid items
|
190
|
+
*
|
191
|
+
* @internal
|
192
|
+
*/
|
193
|
+
export declare const maximumZindex: Store<number>;
|
194
|
+
/**
|
195
|
+
* Set maximum z-index.
|
196
|
+
*
|
197
|
+
* @internal
|
198
|
+
*/
|
199
|
+
export declare const setMaximumZindex: (zindex?: number) => void;
|
200
|
+
/**
|
201
|
+
* Store to handle font-family of CSS
|
202
|
+
*
|
203
|
+
* @internal
|
204
|
+
*/
|
205
|
+
export declare const fonts: Store<string[]>;
|
206
|
+
/**
|
207
|
+
* Add font-family
|
208
|
+
*
|
209
|
+
* @internal
|
210
|
+
*/
|
211
|
+
export declare const addFont: (font: string) => void;
|
212
|
+
/**
|
213
|
+
* Store to handle internal event handlers
|
214
|
+
*
|
215
|
+
* @internal
|
216
|
+
*/
|
217
|
+
export declare const internalHandlers: Store<{
|
218
|
+
[key: string]: ActionEventHandler[]
|
219
|
+
}>;
|
220
|
+
/**
|
221
|
+
* {@link getInternalHandlers} function to get internal event handlers.
|
222
|
+
*
|
223
|
+
* @returns Current internal handlers
|
224
|
+
*
|
225
|
+
* @internal
|
226
|
+
*/
|
227
|
+
export declare function getInternalHandlers(): {
|
228
|
+
[key: string]: ActionEventHandler[]
|
229
|
+
};
|
230
|
+
/**
|
231
|
+
* {@link setInternalHandlers} function to set internal event handlers.
|
232
|
+
*
|
233
|
+
* @param handlers - New internal event handlers
|
234
|
+
*
|
235
|
+
* @internal
|
236
|
+
*/
|
237
|
+
export declare function setInternalHandlers(handlers: {
|
238
|
+
[key: string]: ActionEventHandler[]
|
239
|
+
}): {
|
240
|
+
[key: string]: ActionEventHandler[]
|
241
|
+
};
|
242
|
+
/**
|
243
|
+
* Store to handle internal event handlers for widget API
|
244
|
+
*
|
245
|
+
* @internal
|
246
|
+
*/
|
247
|
+
export declare const widgetHandlers: Store<{
|
248
|
+
[key: string]: ActionEventHandler[]
|
249
|
+
}>;
|
250
|
+
/**
|
251
|
+
* {@link getWidgetHandlers} function to get internal event handlers for widget API.
|
252
|
+
*
|
253
|
+
* @param handlers - New internal widget event handlers
|
254
|
+
*
|
255
|
+
* @returns Current internal widget handlers
|
256
|
+
*
|
257
|
+
* @internal
|
258
|
+
*/
|
259
|
+
export declare function getWidgetHandlers(): {
|
260
|
+
[key: string]: ActionEventHandler[]
|
261
|
+
};
|
262
|
+
/**
|
263
|
+
* {@link setWidgetHandlers} function to set internal event handlers.
|
264
|
+
*
|
265
|
+
* @internal
|
266
|
+
*/
|
267
|
+
export declare function setWidgetHandlers(handlers: {
|
268
|
+
[key: string]: ActionEventHandler[]
|
269
|
+
}): void;
|
270
|
+
/**
|
271
|
+
* Store to handle event handlers
|
272
|
+
*
|
273
|
+
* This is used internally.
|
274
|
+
*
|
275
|
+
* @internal
|
276
|
+
*/
|
277
|
+
export declare const eventHandlers: Store<{
|
278
|
+
[key: string]: ActionEventHandler
|
279
|
+
}>;
|
280
|
+
/**
|
281
|
+
* イベントハンドラーの一覧を取得する
|
282
|
+
*
|
283
|
+
* @returns 現在のイベントハンドラー
|
284
|
+
*
|
285
|
+
* @public
|
286
|
+
*/
|
287
|
+
export declare function getEventHandlers(): {
|
288
|
+
[key: string]: ActionEventHandler
|
289
|
+
};
|
290
|
+
/**
|
291
|
+
* イベントハンドラーを登録する
|
292
|
+
*
|
293
|
+
* @remarks
|
294
|
+
* 登録したイベントハンドラーは、ビジュアルエディタでアクション本体とのテキストボタンのクリック時の動作で利用できます。
|
295
|
+
*
|
296
|
+
* @param handlers - 登録するイベントハンドラー
|
297
|
+
*
|
298
|
+
* @public
|
299
|
+
*/
|
300
|
+
export declare function setEventHandlers(handlers: {
|
301
|
+
[key: string]: ActionEventHandler
|
302
|
+
}): {
|
303
|
+
[key: string]: ActionEventHandler
|
304
|
+
};
|
305
|
+
/**
|
306
|
+
* イベントハンドラーをリセットする
|
307
|
+
*
|
308
|
+
*/
|
309
|
+
export declare function resetEventHandlers(): void;
|
310
|
+
/**
|
311
|
+
* Store to handle destruction of action
|
312
|
+
*
|
313
|
+
* @internal
|
314
|
+
*/
|
315
|
+
export declare const destroyed: Store<boolean>;
|
316
|
+
/**
|
317
|
+
* {@link isDestroyed} function to check if action is destroyed.
|
318
|
+
*
|
319
|
+
* @returns Flag if action is destoryed / true: Destroyed, false: Not Destroyed
|
320
|
+
*
|
321
|
+
* @internal
|
322
|
+
*/
|
323
|
+
export declare function isDestroyed(): boolean;
|
324
|
+
/**
|
325
|
+
* {@link setDestroyed} function to set if action is destroyed.
|
326
|
+
*
|
327
|
+
* @internal
|
328
|
+
*/
|
329
|
+
export declare function setDestroyed(on: boolean): void;
|
330
|
+
/**
|
331
|
+
* Store to handle variables
|
332
|
+
*
|
333
|
+
* @internal
|
334
|
+
*/
|
335
|
+
export declare const variables: Store<{
|
336
|
+
[key: string]: any
|
337
|
+
}>;
|
338
|
+
/**
|
339
|
+
* 変数の一覧を取得する
|
340
|
+
*
|
341
|
+
* @returns 現在の変数の一覧
|
342
|
+
*/
|
343
|
+
export declare function getVariables(): ActionVariables;
|
344
|
+
/**
|
345
|
+
* 変数を設定する
|
346
|
+
*
|
347
|
+
* @remarks
|
348
|
+
* 設定した変数は、ビジュアルエディタのテキストフォームなどで利用できます。
|
349
|
+
*
|
350
|
+
* @param vars - 変数
|
351
|
+
*/
|
352
|
+
export declare function setVariables(vars: ActionVariables): ActionVariables;
|
353
|
+
/**
|
354
|
+
* 変数をリセットする
|
355
|
+
*/
|
356
|
+
export declare function resetVariables(): void;
|
357
|
+
/** @internal */
|
358
|
+
export interface FormData {
|
359
|
+
[name: string]: {
|
360
|
+
value: any
|
361
|
+
statePath: string
|
362
|
+
isValid: boolean
|
363
|
+
};
|
364
|
+
}
|
365
|
+
/**
|
366
|
+
* Store for form data
|
367
|
+
*
|
368
|
+
* @internal
|
369
|
+
*/
|
370
|
+
export declare const formData: Writable_<FormData>;
|
371
|
+
/**
|
372
|
+
* Store for identify form data
|
373
|
+
*
|
374
|
+
* @internal
|
375
|
+
*/
|
376
|
+
export declare const identifyFormData: Writable_<FormData>;
|
@@ -0,0 +1,183 @@
|
|
1
|
+
/**
|
2
|
+
* アクションの汎用的なタイプを定義する
|
3
|
+
*
|
4
|
+
* モーダル(ポップアップ)やアクションテーブルなど機能別のタイプは含めない。
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* アクションのイベントハンドラ
|
8
|
+
*
|
9
|
+
* @public
|
10
|
+
*/
|
11
|
+
export type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
12
|
+
/**
|
13
|
+
* アクションの変数
|
14
|
+
*
|
15
|
+
* @public
|
16
|
+
*/
|
17
|
+
export type ActionVariables = {
|
18
|
+
[key: string]: any
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* アクションの send 関数
|
22
|
+
*
|
23
|
+
* @public
|
24
|
+
*/
|
25
|
+
export type SendFunction = (event_name: string, values?: any) => void;
|
26
|
+
/**
|
27
|
+
* アクションの publish 関数
|
28
|
+
*
|
29
|
+
* @public
|
30
|
+
*/
|
31
|
+
export type PublishFunction = (topic: string, values?: any) => void;
|
32
|
+
/**
|
33
|
+
* アクション設定
|
34
|
+
*
|
35
|
+
* @public
|
36
|
+
*/
|
37
|
+
export type ActionSetting = {
|
38
|
+
send?: SendFunction
|
39
|
+
publish?: PublishFunction
|
40
|
+
initialState?: string
|
41
|
+
};
|
42
|
+
/**
|
43
|
+
* アクションのライフサイクル changeState で呼び出されるフック関数
|
44
|
+
*
|
45
|
+
* @param props - アクションのプロパティ
|
46
|
+
* @param newState - アクションの新しいステート
|
47
|
+
*
|
48
|
+
* @public
|
49
|
+
*/
|
50
|
+
export type ActionChangeStateHook<
|
51
|
+
Props,
|
52
|
+
Variables
|
53
|
+
> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
|
54
|
+
/**
|
55
|
+
* アクションのプロパティ
|
56
|
+
*
|
57
|
+
* @public
|
58
|
+
*/
|
59
|
+
export interface ActionProps<
|
60
|
+
Props,
|
61
|
+
Variables
|
62
|
+
> {
|
63
|
+
/**
|
64
|
+
* アクションでイベントがトリガーされたときに受信するための関数
|
65
|
+
*/
|
66
|
+
send: SendFunction;
|
67
|
+
/**
|
68
|
+
* アクション内でタグのQueueにリクエストを発行する関数
|
69
|
+
*/
|
70
|
+
publish: PublishFunction;
|
71
|
+
/**
|
72
|
+
* アクションで使用されるデータ
|
73
|
+
*/
|
74
|
+
data: Props & Variables & ActionVariables;
|
75
|
+
/**
|
76
|
+
* アクションが表示されたときにフックされる {@link onShow}
|
77
|
+
*/
|
78
|
+
onShow?: ActionHook<Props, Variables & ActionVariables>;
|
79
|
+
/**
|
80
|
+
* アクションのステートが変更されたときにフックされる {@link onChangeState}
|
81
|
+
*/
|
82
|
+
onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
|
83
|
+
}
|
84
|
+
/**
|
85
|
+
* アクションのライフサイクルで呼び出されるフック
|
86
|
+
*
|
87
|
+
* @param props - アクションのプロパティ
|
88
|
+
*
|
89
|
+
* @public
|
90
|
+
*/
|
91
|
+
export type ActionHook<
|
92
|
+
Props,
|
93
|
+
Variables
|
94
|
+
> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
|
95
|
+
/**
|
96
|
+
* {@link create} 向けのオプション
|
97
|
+
*
|
98
|
+
* @public
|
99
|
+
*/
|
100
|
+
export interface ActionOptions<
|
101
|
+
Props,
|
102
|
+
Variables,
|
103
|
+
VariablesQuery
|
104
|
+
> {
|
105
|
+
/**
|
106
|
+
* アクション内でイベントを発火する関数
|
107
|
+
*
|
108
|
+
* @defaultValue `() => {}`
|
109
|
+
*/
|
110
|
+
send?: SendFunction;
|
111
|
+
/**
|
112
|
+
* アクション内でタグのQueueにリクエストを発行する関数
|
113
|
+
*
|
114
|
+
* @defaultValue `() => {}`
|
115
|
+
*/
|
116
|
+
publish?: PublishFunction;
|
117
|
+
/**
|
118
|
+
* アクションで使用されるプロパティ
|
119
|
+
*
|
120
|
+
* @defaultValue `{}`
|
121
|
+
*/
|
122
|
+
props?: Props;
|
123
|
+
/**
|
124
|
+
* アクションで使用される解析時に取得される変数
|
125
|
+
*
|
126
|
+
* @defaultValue `{}`
|
127
|
+
*/
|
128
|
+
variables?: Variables;
|
129
|
+
/**
|
130
|
+
* アクションで使用されるアクション実行時に取得される変数
|
131
|
+
*
|
132
|
+
* @defaultValue `[]`
|
133
|
+
*/
|
134
|
+
localVariablesQuery?: VariablesQuery;
|
135
|
+
/**
|
136
|
+
* アクションが作成されているときにフックされる {@link onCreate}
|
137
|
+
*
|
138
|
+
* @defaultValue `() => {}`
|
139
|
+
*/
|
140
|
+
onCreate?: ActionHook<Props, Variables & ActionVariables>;
|
141
|
+
/**
|
142
|
+
* KARTEテンプレートの情報
|
143
|
+
*
|
144
|
+
* @defaultValue `{}`
|
145
|
+
*/
|
146
|
+
karteTemplate?: {
|
147
|
+
[key: string]: any
|
148
|
+
};
|
149
|
+
/**
|
150
|
+
* アクション実行時のコンテキスト
|
151
|
+
*/
|
152
|
+
context: ActionRunnerContext;
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* KARTE のシステム設定情報
|
156
|
+
*
|
157
|
+
* @public
|
158
|
+
*/
|
159
|
+
export type SystemConfig = {
|
160
|
+
/**
|
161
|
+
* API キー
|
162
|
+
*/
|
163
|
+
apiKey?: string
|
164
|
+
collection_endpoint?: string
|
165
|
+
/**
|
166
|
+
* 接客ID
|
167
|
+
*/
|
168
|
+
campaignId?: string
|
169
|
+
shortenId?: string
|
170
|
+
};
|
171
|
+
/** @internal */
|
172
|
+
export type ActionHookLog = {
|
173
|
+
name: string
|
174
|
+
values?: any
|
175
|
+
};
|
176
|
+
/**
|
177
|
+
* アクション実行時のコンテキスト
|
178
|
+
*/
|
179
|
+
export type ActionRunnerContext = {
|
180
|
+
api_key: string
|
181
|
+
collection_endpoint?: string
|
182
|
+
target?: "web" | "native"
|
183
|
+
};
|
@@ -0,0 +1,171 @@
|
|
1
|
+
import type { ModalMargin, ModalPosition } from "./prop.js";
|
2
|
+
/** @internal */
|
3
|
+
export declare const NOOP: Function;
|
4
|
+
/** @internal */
|
5
|
+
export declare const isPreview: () => boolean;
|
6
|
+
export declare const isCanvasPreview: () => boolean;
|
7
|
+
export declare const isOnSite: () => boolean;
|
8
|
+
export declare const isInFrame: () => boolean;
|
9
|
+
/** @internal */
|
10
|
+
export declare const setPreviousFocus: () => void;
|
11
|
+
/** @internal */
|
12
|
+
export declare const handleKeydown: (handlers: {
|
13
|
+
[eventName: string]: (e: any) => void
|
14
|
+
}) => (e: any) => void;
|
15
|
+
declare const TRANSFORM: {
|
16
|
+
readonly "top-center": {
|
17
|
+
readonly x: 50
|
18
|
+
readonly y: 0
|
19
|
+
}
|
20
|
+
readonly "top-left": {
|
21
|
+
readonly x: 0
|
22
|
+
readonly y: 0
|
23
|
+
}
|
24
|
+
readonly "top-right": {
|
25
|
+
readonly x: 0
|
26
|
+
readonly y: 0
|
27
|
+
}
|
28
|
+
readonly "center-left": {
|
29
|
+
readonly x: 0
|
30
|
+
readonly y: -50
|
31
|
+
}
|
32
|
+
readonly center: {
|
33
|
+
readonly x: -50
|
34
|
+
readonly y: -50
|
35
|
+
}
|
36
|
+
readonly "center-right": {
|
37
|
+
readonly x: 0
|
38
|
+
readonly y: -50
|
39
|
+
}
|
40
|
+
readonly "bottom-left": {
|
41
|
+
readonly x: 0
|
42
|
+
readonly y: 0
|
43
|
+
}
|
44
|
+
readonly "bottom-center": {
|
45
|
+
readonly x: -50
|
46
|
+
readonly y: 0
|
47
|
+
}
|
48
|
+
readonly "bottom-right": {
|
49
|
+
readonly x: 0
|
50
|
+
readonly y: 0
|
51
|
+
}
|
52
|
+
readonly none: {
|
53
|
+
readonly x: 0
|
54
|
+
readonly y: 0
|
55
|
+
}
|
56
|
+
};
|
57
|
+
/** @internal */
|
58
|
+
export declare const getPositionStyle: (position: ModalPosition) => string;
|
59
|
+
/** @internal */
|
60
|
+
export declare const getTransform: (position: ModalPosition) => (typeof TRANSFORM)[ModalPosition];
|
61
|
+
/** @internal */
|
62
|
+
export declare const getMarginStyle: (margin: ModalMargin) => string;
|
63
|
+
/** @internal */
|
64
|
+
export declare const parseStyle: (style: string) => Record<string, string>;
|
65
|
+
/** @internal */
|
66
|
+
export declare const stringifyStyleObj: (styleObj: Record<string, string>) => string;
|
67
|
+
/** @internal */
|
68
|
+
export declare const formatObjectKey: ({ obj, prefix, suffix }: {
|
69
|
+
obj: {
|
70
|
+
[key: string]: any
|
71
|
+
}
|
72
|
+
prefix?: string
|
73
|
+
suffix?: string
|
74
|
+
}) => {
|
75
|
+
[key: string]: any
|
76
|
+
};
|
77
|
+
/**
|
78
|
+
* スクロール方向
|
79
|
+
*
|
80
|
+
* @public
|
81
|
+
*
|
82
|
+
* @see {@link onScroll}
|
83
|
+
*/
|
84
|
+
export type ScrollDirection = "up" | "down";
|
85
|
+
/**
|
86
|
+
* {@link onScroll} のスクロールコンテキスト情報
|
87
|
+
*
|
88
|
+
* @remarks
|
89
|
+
* このコンテキスト情報は、{@link OnScrollFunction} が呼び出されたタイミングの情報が格納されています
|
90
|
+
*
|
91
|
+
* @see {@link onScroll}
|
92
|
+
*
|
93
|
+
* @public
|
94
|
+
*/
|
95
|
+
export interface OnScrollContext {
|
96
|
+
/**
|
97
|
+
* {@link onScroll} によって指定されたスクロール率
|
98
|
+
*/
|
99
|
+
rate: number;
|
100
|
+
/**
|
101
|
+
* ページのスクロール率
|
102
|
+
*/
|
103
|
+
scrollRate: number;
|
104
|
+
/**
|
105
|
+
* 前のスクロール率
|
106
|
+
*/
|
107
|
+
previousRate: number;
|
108
|
+
/**
|
109
|
+
* 現在のスクロール率と前のスクロール率との差分値
|
110
|
+
*/
|
111
|
+
deltaRate: number;
|
112
|
+
/**
|
113
|
+
* スクロール方向
|
114
|
+
*/
|
115
|
+
direction: ScrollDirection;
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* {@link onScroll} によって呼び出されるコールバック関数
|
119
|
+
*
|
120
|
+
* @see {@link onScroll}
|
121
|
+
*
|
122
|
+
* @public
|
123
|
+
*/
|
124
|
+
export type OnScrollFunction = (ctx: OnScrollContext) => boolean;
|
125
|
+
/**
|
126
|
+
* スクロール率が達したときに呼び出すコールバックを登録します
|
127
|
+
*
|
128
|
+
* @param rate - スクロール率。この値は viewport でのスクロールのパーセンテージ
|
129
|
+
* @param fn - スクロール率が達したときに呼び出されるコールバック関数
|
130
|
+
*
|
131
|
+
* @returns スクロール率によって呼び出されるコールバックを停止する関数を返します
|
132
|
+
*
|
133
|
+
* @public
|
134
|
+
*/
|
135
|
+
export declare function onScroll(rate: number | number[], fn: OnScrollFunction): () => void;
|
136
|
+
/**
|
137
|
+
* 指定した時間の経過後に呼び出すコールバックを登録します
|
138
|
+
*
|
139
|
+
* @param time - コールバックを呼び出すまでの時間。単位はミリセカンド(ms)
|
140
|
+
* @param fn - 指定した時間が経過後に呼び出されるコールバック関数
|
141
|
+
*
|
142
|
+
* @returns コールバックを呼び出すためのタイマーを停止する関数を返します
|
143
|
+
*
|
144
|
+
* @public
|
145
|
+
*/
|
146
|
+
export declare function onTime(time: number, fn: Function): () => void;
|
147
|
+
/** @internal */
|
148
|
+
export declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
|
149
|
+
/** @internal */
|
150
|
+
export declare function toBr(text: string): string;
|
151
|
+
/** @internal */
|
152
|
+
export declare function randStr(digit?: number): string;
|
153
|
+
/**
|
154
|
+
* Goolge Fonts用のURLを生成
|
155
|
+
*
|
156
|
+
* @param fonts - フォント名の配列
|
157
|
+
* @param texts - 使用するテキストの配列
|
158
|
+
*
|
159
|
+
* @remarks
|
160
|
+
* textsを指定した場合フォントサイズが削減される
|
161
|
+
*
|
162
|
+
* @internal
|
163
|
+
*/
|
164
|
+
export declare function makeGoogleFontUrl(fonts: string[], texts?: string[]): string;
|
165
|
+
/**
|
166
|
+
* HTML要素を生成
|
167
|
+
*
|
168
|
+
* @internal
|
169
|
+
*/
|
170
|
+
export declare const h: (type: string, props: any, ...children: Array<any>) => HTMLElement;
|
171
|
+
export {};
|