@plaidev/karte-action-sdk 1.1.268-29111070.d0bdfb56 → 1.1.268-29127137.d0ff6db4
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 +87 -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 +87 -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 +12718 -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 +11910 -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 +87 -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 +87 -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 +5441 -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 +5413 -6459
- package/dist/svelte5/index.front2.es.d.ts +1 -2
- package/dist/svelte5/index.front2.es.js +5654 -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
package/dist/stores.d.ts
ADDED
@@ -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,63 @@
|
|
1
|
+
import type { ActionVariables, ActionOptions, ActionHook } from "./types.js";
|
2
|
+
import type { SvelteComponentTyped } from "svelte";
|
3
|
+
import type { VariableQuery } from "./collection.js";
|
4
|
+
import type { Props as ModalProps } from "./display-logic.js";
|
5
|
+
/**
|
6
|
+
* アクションを作成する
|
7
|
+
*
|
8
|
+
* @param App - Svelte コンポーネントのエントリポイント
|
9
|
+
* @param options - {@link ActionOptions | オプション}
|
10
|
+
*
|
11
|
+
* @returns アクションを破棄する関数
|
12
|
+
*
|
13
|
+
* @public
|
14
|
+
*/
|
15
|
+
export declare function create<
|
16
|
+
Props extends ModalProps,
|
17
|
+
Variables,
|
18
|
+
VariablesQuery extends Array<VariableQuery>
|
19
|
+
>(App: typeof SvelteComponentTyped, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
20
|
+
/**
|
21
|
+
* アクションの破棄する
|
22
|
+
*
|
23
|
+
* @public
|
24
|
+
*/
|
25
|
+
export declare function destroyAction(): void;
|
26
|
+
/**
|
27
|
+
* アクションが作成 (create) される前にフックする関数
|
28
|
+
*
|
29
|
+
* @param fn - 呼び出されるフック関数
|
30
|
+
*
|
31
|
+
* @public
|
32
|
+
*/
|
33
|
+
export declare function onCreate<
|
34
|
+
Props extends ModalProps,
|
35
|
+
Variables
|
36
|
+
>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
37
|
+
/**
|
38
|
+
* アクションが破棄 (destroy) される前にフックする関数
|
39
|
+
*
|
40
|
+
* @param fn - 呼び出されるフック関数
|
41
|
+
*
|
42
|
+
* @public
|
43
|
+
*/
|
44
|
+
export declare function onDestroy<
|
45
|
+
Props extends ModalProps,
|
46
|
+
Variables
|
47
|
+
>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
48
|
+
/**
|
49
|
+
* 非推奨
|
50
|
+
*
|
51
|
+
* @deprecated 非推奨
|
52
|
+
*
|
53
|
+
* @internal
|
54
|
+
*/
|
55
|
+
export declare const showModal: typeof create;
|
56
|
+
/**
|
57
|
+
* 非推奨
|
58
|
+
*
|
59
|
+
* @deprecated 非推奨
|
60
|
+
*
|
61
|
+
* @internal
|
62
|
+
*/
|
63
|
+
export declare function destroy(): void;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { ActionSetting } from "./types.js";
|
2
|
+
/** @internal */
|
3
|
+
export declare const actionId: string;
|
4
|
+
/** @internal */
|
5
|
+
export declare const ACTION_DESTROY_EVENT: string;
|
6
|
+
/** @internal */
|
7
|
+
export declare const ACTION_SHOW_EVENT: string;
|
8
|
+
/** @internal */
|
9
|
+
export declare const ACTION_CLOSE_EVENT: string;
|
10
|
+
/** @internal */
|
11
|
+
export declare const ACTION_CHANGE_STATE_EVENT: string;
|
12
|
+
/** @internal */
|
13
|
+
export declare const send_event: (event_name: string, values?: any) => void;
|
14
|
+
/** @internal */
|
15
|
+
export declare const publish_edge: (topic: string, values?: any) => void;
|
16
|
+
/** @internal */
|
17
|
+
export declare const initialize: (setting?: ActionSetting) => () => void;
|
18
|
+
/** @internal */
|
19
|
+
export declare const finalize: () => void;
|
20
|
+
/**
|
21
|
+
* Dispatch the event to destroy KARTE action
|
22
|
+
*
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
export declare function dispatchDestroyEvent(): void;
|
@@ -0,0 +1,121 @@
|
|
1
|
+
type ActionTableResult = number | string | boolean | Date | null | undefined;
|
2
|
+
type ActionTableQueryParam = string | number | boolean | Date;
|
3
|
+
type ActionTableQueryParams = {
|
4
|
+
[key: string]: ActionTableQueryParam | ActionTableQueryParam[]
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* アクションテーブルの設定情報
|
8
|
+
*
|
9
|
+
* @param api_key - API Key
|
10
|
+
* @param table - テーブル名
|
11
|
+
* @param endpoint - エンドポイント / 指定がない場合はデフォルトのエンドポイントを使用します。検証用途以外での通常利用では指定なしで大丈夫です。
|
12
|
+
*/
|
13
|
+
export type CollectionConfig = {
|
14
|
+
api_key: string
|
15
|
+
table: string
|
16
|
+
collection_endpoint?: string
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* アクションテーブルを管理するメソッドを取得する
|
20
|
+
*
|
21
|
+
* @param config - アクションテーブル設定情報
|
22
|
+
*
|
23
|
+
* @returns メソッドを返します
|
24
|
+
*
|
25
|
+
* @public
|
26
|
+
*/
|
27
|
+
export declare function collection(config: CollectionConfig): {
|
28
|
+
/**
|
29
|
+
* キーを1つ、または複数指定して、対応するアクションテーブルの行を取得する
|
30
|
+
*
|
31
|
+
* @param key - 取得する行のキーを一つ、または複数配列で指定
|
32
|
+
* @param cb - テーブルの行を取得した後に実行するcallback関数
|
33
|
+
*
|
34
|
+
* @public
|
35
|
+
*/
|
36
|
+
get(key: string | Array<string>, cb: (err: Error | null, items?: ActionTableResult | Array<ActionTableResult>) => void): void
|
37
|
+
/**
|
38
|
+
* クエリーを指定して、アクションテーブルから行を取得する
|
39
|
+
* なお、クエリーは事前に管理画面で設定しておく必要があります。
|
40
|
+
*
|
41
|
+
* @param query_name - クエリー名
|
42
|
+
* @param params - クエリーに指定するパラメーター。 `{key: value}` の形式で指定
|
43
|
+
* @param cb - テーブルの行を取得した後に実行するcallback関数
|
44
|
+
*
|
45
|
+
* @public
|
46
|
+
*/
|
47
|
+
getByQuery(query_name: string, params: ActionTableQueryParams, options: {
|
48
|
+
ignore_fields?: string[]
|
49
|
+
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void
|
50
|
+
/** @internal */
|
51
|
+
set(key: string, value: string, cb: (err: Error | null) => void): void
|
52
|
+
};
|
53
|
+
/** @internal */
|
54
|
+
export type VariableQuery = {
|
55
|
+
resolver: string
|
56
|
+
name: string
|
57
|
+
query: any
|
58
|
+
preview_value?: any
|
59
|
+
};
|
60
|
+
/** @internal */
|
61
|
+
export type ActionTableRowRequestConfig = VariableQuery & {
|
62
|
+
resolver: "action-table-row"
|
63
|
+
query: {
|
64
|
+
table_name: string
|
65
|
+
key: string
|
66
|
+
default_value?: ActionTableResult
|
67
|
+
}
|
68
|
+
preview_value?: ActionTableResult
|
69
|
+
};
|
70
|
+
/** @internal */
|
71
|
+
export type ActionTableRowsRequestConfig = VariableQuery & {
|
72
|
+
resolver: "action-table-rows"
|
73
|
+
query: {
|
74
|
+
table_name: string
|
75
|
+
keys: Array<string>
|
76
|
+
default_value?: Array<ActionTableResult>
|
77
|
+
}
|
78
|
+
preview_value?: Array<ActionTableResult>
|
79
|
+
};
|
80
|
+
/** @internal */
|
81
|
+
export type ActionTableQueryRequestConfig = VariableQuery & {
|
82
|
+
resolver: "action-table-query"
|
83
|
+
query: {
|
84
|
+
table_name: string
|
85
|
+
query_name: string
|
86
|
+
params?: {
|
87
|
+
[key: string]: string
|
88
|
+
}
|
89
|
+
default_value?: Array<ActionTableResult>
|
90
|
+
}
|
91
|
+
preview_value?: Array<ActionTableResult>
|
92
|
+
};
|
93
|
+
/** @internal */
|
94
|
+
export type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
95
|
+
/** @internal */
|
96
|
+
export declare const loadActionTableRow: (config: ActionTableRowRequestConfig, data: {
|
97
|
+
[key: string]: any
|
98
|
+
}, api_key: string, collection_endpoint?: string) => Promise<unknown>;
|
99
|
+
/** @internal */
|
100
|
+
export declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, data: {
|
101
|
+
[key: string]: any
|
102
|
+
}, api_key: string, collection_endpoint?: string) => Promise<unknown>;
|
103
|
+
/** @internal */
|
104
|
+
export declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, data: {
|
105
|
+
[key: string]: any
|
106
|
+
}, api_key: string, collection_endpoint?: string) => Promise<unknown>;
|
107
|
+
/** @internal */
|
108
|
+
export declare const loadActionTable: (config: Array<VariableQuery>, data: {
|
109
|
+
[key: string]: any
|
110
|
+
}, api_key: string, collection_endpoint?: string) => Promise<{
|
111
|
+
[key: string]: any
|
112
|
+
}>;
|
113
|
+
/** @internal */
|
114
|
+
export declare function setupActionTable(localVariablesQuery: Array<VariableQuery>, data: {
|
115
|
+
[key: string]: any
|
116
|
+
}, apiKey: string, collection_endpoint: string): Promise<{
|
117
|
+
success: boolean
|
118
|
+
}>;
|
119
|
+
/** @internal */
|
120
|
+
export declare function initActionTable(localVariablesQuery: Array<VariableQuery> | undefined): void;
|
121
|
+
export {};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { onMount as onMountSvelte, onDestroy as onDestorySvelte, beforeUpdate as beforeUpdateSvelte, afterUpdate as afterUpdateSvelte, tick as tickSvelte } from "svelte";
|
2
|
+
/**
|
3
|
+
* エレメントをマウントしたときに実行される関数の登録
|
4
|
+
*
|
5
|
+
* @param fn - マウントしたときに実行される関数
|
6
|
+
*/
|
7
|
+
export declare const onMount: typeof onMountSvelte;
|
8
|
+
/**
|
9
|
+
* エレメントを破棄したときに実行される関数の登録
|
10
|
+
*
|
11
|
+
* @param fn - マウントしたときに実行される関数
|
12
|
+
*/
|
13
|
+
export declare const onDestory: typeof onDestorySvelte;
|
14
|
+
/**
|
15
|
+
* エレメントを更新する前に実行される関数の登録
|
16
|
+
*
|
17
|
+
* @param fn - マウントしたときに実行される関数
|
18
|
+
*/
|
19
|
+
export declare const beforeUpdate: typeof beforeUpdateSvelte;
|
20
|
+
/**
|
21
|
+
* エレメントを更新した後に実行される関数の登録
|
22
|
+
*
|
23
|
+
* @param fn - マウントしたときに実行される関数
|
24
|
+
*/
|
25
|
+
export declare const afterUpdate: typeof afterUpdateSvelte;
|
26
|
+
/**
|
27
|
+
* エレメントのライフサイクルを進める
|
28
|
+
*
|
29
|
+
* @returns Promise<void>
|
30
|
+
*/
|
31
|
+
export declare const tick: typeof tickSvelte;
|
32
|
+
export declare const LAYOUT_COMPONENT_NAMES: string[];
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { BorderProps, ClickableProps, CommonProps } from "../props.js";
|
2
|
+
import type { Properties } from "csstype";
|
3
|
+
export declare const AVATAR_SIZE: {
|
4
|
+
readonly extra_small: "XS(48 x 48)"
|
5
|
+
readonly small: "S(64 x 64)"
|
6
|
+
readonly medium: "M(88 x 88)"
|
7
|
+
readonly large: "L(108 x 108)"
|
8
|
+
readonly extra_large: "XL(128 x 128)"
|
9
|
+
};
|
10
|
+
export declare const AVATAR_SHAPE: {
|
11
|
+
readonly circle: "サークル"
|
12
|
+
readonly square: "スクエア"
|
13
|
+
readonly rounded: "ラウンド"
|
14
|
+
};
|
15
|
+
export type AvatarProps = CommonProps & ClickableProps & BorderProps & {
|
16
|
+
size?: keyof typeof AVATAR_SIZE | number
|
17
|
+
width?: Properties["width"]
|
18
|
+
height?: Properties["height"]
|
19
|
+
shape?: keyof typeof AVATAR_SHAPE
|
20
|
+
image?: string
|
21
|
+
caption?: string
|
22
|
+
alt?: string
|
23
|
+
};
|
24
|
+
export declare const avatarPropsDefault: AvatarProps;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export type BrandKit = {
|
2
|
+
font_family: string
|
3
|
+
color_text_primary: string
|
4
|
+
color_text_secondary: string
|
5
|
+
color_brand: string
|
6
|
+
color_link: string
|
7
|
+
color_danger: string
|
8
|
+
color_success: string
|
9
|
+
color_info: string
|
10
|
+
color_warning: string
|
11
|
+
color_white: string
|
12
|
+
};
|
13
|
+
export declare const getBrandKit: (customBrandKit?: Partial<BrandKit>) => BrandKit;
|
14
|
+
export declare const useBrandKit: () => {
|
15
|
+
brandKit: BrandKit
|
16
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ButtonProps } from "src/components-flex/button/types";
|
2
|
+
import type { PropStyles } from "../shared/types.js";
|
3
|
+
import type { BrandKit } from "../brand-kit.js";
|
4
|
+
import type { BrandableStyles } from "../styles.js";
|
5
|
+
export declare const getButtonThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<ButtonProps>;
|
6
|
+
export declare const BUTTON_SIZE_STYLES: PropStyles<ButtonProps, "size">;
|
7
|
+
export declare const BUTTON_ROUND_STYLES: PropStyles<ButtonProps, "round">;
|
8
|
+
export declare const BUTTON_WRAP_STYLES: PropStyles<ButtonProps, "wrap">;
|