@plaidev/karte-action-sdk 1.1.268 → 1.1.269-29151822.663827f4

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.
Files changed (254) hide show
  1. package/dist/action.d.ts +63 -0
  2. package/dist/actionEvent.d.ts +25 -0
  3. package/dist/collection.d.ts +121 -0
  4. package/dist/components/index.d.ts +32 -0
  5. package/dist/components-flex/avatar/styles.d.ts +3 -0
  6. package/dist/components-flex/avatar/types.d.ts +24 -0
  7. package/dist/components-flex/brand-kit.d.ts +16 -0
  8. package/dist/components-flex/button/styles.d.ts +8 -0
  9. package/dist/components-flex/button/types.d.ts +57 -0
  10. package/dist/components-flex/button-outlined/styles.d.ts +8 -0
  11. package/dist/components-flex/button-outlined/types.d.ts +20 -0
  12. package/dist/components-flex/button-text/styles.d.ts +6 -0
  13. package/dist/components-flex/button-text/types.d.ts +33 -0
  14. package/dist/components-flex/clip-copy/types.d.ts +6 -0
  15. package/dist/components-flex/close-button/types.d.ts +32 -0
  16. package/dist/components-flex/code/types.d.ts +6 -0
  17. package/dist/components-flex/count-down/types.d.ts +17 -0
  18. package/dist/components-flex/icon/styles.d.ts +3 -0
  19. package/dist/components-flex/icon/types.d.ts +18 -0
  20. package/dist/components-flex/image/styles.d.ts +3 -0
  21. package/dist/components-flex/image/types.d.ts +26 -0
  22. package/dist/components-flex/layout/types.d.ts +21 -0
  23. package/dist/components-flex/list/types.d.ts +27 -0
  24. package/dist/components-flex/modal/types.d.ts +5 -0
  25. package/dist/components-flex/multi-column/types.d.ts +28 -0
  26. package/dist/components-flex/props.d.ts +107 -0
  27. package/dist/components-flex/schemas.d.ts +36 -0
  28. package/dist/components-flex/shared/styles.d.ts +3 -0
  29. package/dist/components-flex/shared/types.d.ts +13 -0
  30. package/dist/components-flex/slider/types.d.ts +10 -0
  31. package/dist/components-flex/styles.d.ts +9 -0
  32. package/dist/components-flex/text/constants.d.ts +4 -0
  33. package/dist/components-flex/text/styles.d.ts +7 -0
  34. package/dist/components-flex/text/types.d.ts +39 -0
  35. package/dist/components-flex/text-link/styles.d.ts +6 -0
  36. package/dist/components-flex/text-link/types.d.ts +31 -0
  37. package/dist/components-flex/utils/color.d.ts +7 -0
  38. package/dist/components-flex/utils/obj-to-style.d.ts +2 -0
  39. package/dist/components-flex/utils/parser.d.ts +5 -0
  40. package/dist/components-flex/utils/prop-to-style.d.ts +11 -0
  41. package/dist/components-flex/variants.d.ts +48 -0
  42. package/dist/components-flex/youtube/types.d.ts +16 -0
  43. package/dist/constants.d.ts +27 -0
  44. package/dist/display-logic.d.ts +125 -0
  45. package/dist/enhancedStopPropagation.d.ts +6 -0
  46. package/dist/form.d.ts +100 -0
  47. package/dist/functions.d.ts +71 -0
  48. package/dist/hooks/useClickable.d.ts +7 -0
  49. package/dist/hooks/useInjectCustomizeCss.d.ts +2 -0
  50. package/dist/hooks/useText.d.ts +5 -0
  51. package/dist/hydrate/action.d.ts +63 -0
  52. package/dist/hydrate/actionEvent.d.ts +25 -0
  53. package/dist/hydrate/collection.d.ts +121 -0
  54. package/dist/hydrate/components/index.d.ts +32 -0
  55. package/dist/hydrate/components-flex/avatar/styles.d.ts +3 -0
  56. package/dist/hydrate/components-flex/avatar/types.d.ts +24 -0
  57. package/dist/hydrate/components-flex/brand-kit.d.ts +16 -0
  58. package/dist/hydrate/components-flex/button/styles.d.ts +8 -0
  59. package/dist/hydrate/components-flex/button/types.d.ts +57 -0
  60. package/dist/hydrate/components-flex/button-outlined/styles.d.ts +8 -0
  61. package/dist/hydrate/components-flex/button-outlined/types.d.ts +20 -0
  62. package/dist/hydrate/components-flex/button-text/styles.d.ts +6 -0
  63. package/dist/hydrate/components-flex/button-text/types.d.ts +33 -0
  64. package/dist/hydrate/components-flex/clip-copy/types.d.ts +6 -0
  65. package/dist/hydrate/components-flex/close-button/types.d.ts +32 -0
  66. package/dist/hydrate/components-flex/code/types.d.ts +6 -0
  67. package/dist/hydrate/components-flex/count-down/types.d.ts +17 -0
  68. package/dist/hydrate/components-flex/icon/styles.d.ts +3 -0
  69. package/dist/hydrate/components-flex/icon/types.d.ts +18 -0
  70. package/dist/hydrate/components-flex/image/styles.d.ts +3 -0
  71. package/dist/hydrate/components-flex/image/types.d.ts +26 -0
  72. package/dist/hydrate/components-flex/layout/types.d.ts +21 -0
  73. package/dist/hydrate/components-flex/list/types.d.ts +27 -0
  74. package/dist/hydrate/components-flex/modal/types.d.ts +5 -0
  75. package/dist/hydrate/components-flex/multi-column/types.d.ts +28 -0
  76. package/dist/hydrate/components-flex/props.d.ts +107 -0
  77. package/dist/hydrate/components-flex/schemas.d.ts +36 -0
  78. package/dist/hydrate/components-flex/shared/styles.d.ts +3 -0
  79. package/dist/hydrate/components-flex/shared/types.d.ts +13 -0
  80. package/dist/hydrate/components-flex/slider/types.d.ts +10 -0
  81. package/dist/hydrate/components-flex/styles.d.ts +9 -0
  82. package/dist/hydrate/components-flex/text/constants.d.ts +4 -0
  83. package/dist/hydrate/components-flex/text/styles.d.ts +7 -0
  84. package/dist/hydrate/components-flex/text/types.d.ts +39 -0
  85. package/dist/hydrate/components-flex/text-link/styles.d.ts +6 -0
  86. package/dist/hydrate/components-flex/text-link/types.d.ts +31 -0
  87. package/dist/hydrate/components-flex/utils/color.d.ts +7 -0
  88. package/dist/hydrate/components-flex/utils/obj-to-style.d.ts +2 -0
  89. package/dist/hydrate/components-flex/utils/parser.d.ts +5 -0
  90. package/dist/hydrate/components-flex/utils/prop-to-style.d.ts +11 -0
  91. package/dist/hydrate/components-flex/variants.d.ts +48 -0
  92. package/dist/hydrate/components-flex/youtube/types.d.ts +16 -0
  93. package/dist/hydrate/constants.d.ts +27 -0
  94. package/dist/hydrate/display-logic.d.ts +125 -0
  95. package/dist/hydrate/enhancedStopPropagation.d.ts +6 -0
  96. package/dist/hydrate/form.d.ts +100 -0
  97. package/dist/hydrate/functions.d.ts +71 -0
  98. package/dist/hydrate/hooks/useClickable.d.ts +7 -0
  99. package/dist/hydrate/hooks/useInjectCustomizeCss.d.ts +2 -0
  100. package/dist/hydrate/hooks/useText.d.ts +5 -0
  101. package/dist/hydrate/index.d.ts +111 -0
  102. package/dist/hydrate/index.es.js +12300 -12726
  103. package/dist/hydrate/index.svelte5.d.ts +79 -0
  104. package/dist/hydrate/logger.d.ts +48 -0
  105. package/dist/hydrate/modal.d.ts +214 -0
  106. package/dist/hydrate/modal.svelte5.d.ts +214 -0
  107. package/dist/hydrate/prop.d.ts +439 -0
  108. package/dist/hydrate/script.d.ts +33 -0
  109. package/dist/hydrate/stores.d.ts +376 -0
  110. package/dist/hydrate/types.d.ts +183 -0
  111. package/dist/hydrate/utils.d.ts +171 -0
  112. package/dist/hydrate/widget.d.ts +148 -0
  113. package/dist/icons.d.ts +27 -28
  114. package/dist/icons.js +225 -159
  115. package/dist/index.es.d.ts +111 -2988
  116. package/dist/index.es.js +11687 -12582
  117. package/dist/logger.d.ts +48 -0
  118. package/dist/modal.d.ts +214 -0
  119. package/dist/modal.svelte5.d.ts +214 -0
  120. package/dist/prop.d.ts +439 -0
  121. package/dist/script.d.ts +33 -0
  122. package/dist/stores.d.ts +376 -0
  123. package/dist/svelte5/action.d.ts +63 -0
  124. package/dist/svelte5/actionEvent.d.ts +25 -0
  125. package/dist/svelte5/collection.d.ts +121 -0
  126. package/dist/svelte5/components/index.d.ts +32 -0
  127. package/dist/svelte5/components-flex/avatar/styles.d.ts +3 -0
  128. package/dist/svelte5/components-flex/avatar/types.d.ts +24 -0
  129. package/dist/svelte5/components-flex/brand-kit.d.ts +16 -0
  130. package/dist/svelte5/components-flex/button/styles.d.ts +8 -0
  131. package/dist/svelte5/components-flex/button/types.d.ts +57 -0
  132. package/dist/svelte5/components-flex/button-outlined/styles.d.ts +8 -0
  133. package/dist/svelte5/components-flex/button-outlined/types.d.ts +20 -0
  134. package/dist/svelte5/components-flex/button-text/styles.d.ts +6 -0
  135. package/dist/svelte5/components-flex/button-text/types.d.ts +33 -0
  136. package/dist/svelte5/components-flex/clip-copy/types.d.ts +6 -0
  137. package/dist/svelte5/components-flex/close-button/types.d.ts +32 -0
  138. package/dist/svelte5/components-flex/code/types.d.ts +6 -0
  139. package/dist/svelte5/components-flex/count-down/types.d.ts +17 -0
  140. package/dist/svelte5/components-flex/icon/styles.d.ts +3 -0
  141. package/dist/svelte5/components-flex/icon/types.d.ts +18 -0
  142. package/dist/svelte5/components-flex/image/styles.d.ts +3 -0
  143. package/dist/svelte5/components-flex/image/types.d.ts +26 -0
  144. package/dist/svelte5/components-flex/layout/types.d.ts +21 -0
  145. package/dist/svelte5/components-flex/list/types.d.ts +27 -0
  146. package/dist/svelte5/components-flex/modal/types.d.ts +5 -0
  147. package/dist/svelte5/components-flex/multi-column/types.d.ts +28 -0
  148. package/dist/svelte5/components-flex/props.d.ts +107 -0
  149. package/dist/svelte5/components-flex/schemas.d.ts +36 -0
  150. package/dist/svelte5/components-flex/shared/styles.d.ts +3 -0
  151. package/dist/svelte5/components-flex/shared/types.d.ts +13 -0
  152. package/dist/svelte5/components-flex/slider/types.d.ts +10 -0
  153. package/dist/svelte5/components-flex/styles.d.ts +9 -0
  154. package/dist/svelte5/components-flex/text/constants.d.ts +4 -0
  155. package/dist/svelte5/components-flex/text/styles.d.ts +7 -0
  156. package/dist/svelte5/components-flex/text/types.d.ts +39 -0
  157. package/dist/svelte5/components-flex/text-link/styles.d.ts +6 -0
  158. package/dist/svelte5/components-flex/text-link/types.d.ts +31 -0
  159. package/dist/svelte5/components-flex/utils/color.d.ts +7 -0
  160. package/dist/svelte5/components-flex/utils/obj-to-style.d.ts +2 -0
  161. package/dist/svelte5/components-flex/utils/parser.d.ts +5 -0
  162. package/dist/svelte5/components-flex/utils/prop-to-style.d.ts +11 -0
  163. package/dist/svelte5/components-flex/variants.d.ts +48 -0
  164. package/dist/svelte5/components-flex/youtube/types.d.ts +16 -0
  165. package/dist/svelte5/constants.d.ts +27 -0
  166. package/dist/svelte5/display-logic.d.ts +125 -0
  167. package/dist/svelte5/form.d.ts +100 -0
  168. package/dist/svelte5/functions.d.ts +71 -0
  169. package/dist/svelte5/hooks/useClickable.d.ts +7 -0
  170. package/dist/svelte5/hooks/useInjectCustomizeCss.d.ts +2 -0
  171. package/dist/svelte5/hooks/useText.d.ts +5 -0
  172. package/dist/svelte5/hydrate/action.d.ts +63 -0
  173. package/dist/svelte5/hydrate/actionEvent.d.ts +25 -0
  174. package/dist/svelte5/hydrate/collection.d.ts +121 -0
  175. package/dist/svelte5/hydrate/components/index.d.ts +32 -0
  176. package/dist/svelte5/hydrate/components-flex/avatar/styles.d.ts +3 -0
  177. package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +24 -0
  178. package/dist/svelte5/hydrate/components-flex/brand-kit.d.ts +16 -0
  179. package/dist/svelte5/hydrate/components-flex/button/styles.d.ts +8 -0
  180. package/dist/svelte5/hydrate/components-flex/button/types.d.ts +57 -0
  181. package/dist/svelte5/hydrate/components-flex/button-outlined/styles.d.ts +8 -0
  182. package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +20 -0
  183. package/dist/svelte5/hydrate/components-flex/button-text/styles.d.ts +6 -0
  184. package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +33 -0
  185. package/dist/svelte5/hydrate/components-flex/clip-copy/types.d.ts +6 -0
  186. package/dist/svelte5/hydrate/components-flex/close-button/types.d.ts +32 -0
  187. package/dist/svelte5/hydrate/components-flex/code/types.d.ts +6 -0
  188. package/dist/svelte5/hydrate/components-flex/count-down/types.d.ts +17 -0
  189. package/dist/svelte5/hydrate/components-flex/icon/styles.d.ts +3 -0
  190. package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +18 -0
  191. package/dist/svelte5/hydrate/components-flex/image/styles.d.ts +3 -0
  192. package/dist/svelte5/hydrate/components-flex/image/types.d.ts +26 -0
  193. package/dist/svelte5/hydrate/components-flex/layout/types.d.ts +21 -0
  194. package/dist/svelte5/hydrate/components-flex/list/types.d.ts +27 -0
  195. package/dist/svelte5/hydrate/components-flex/modal/types.d.ts +5 -0
  196. package/dist/svelte5/hydrate/components-flex/multi-column/types.d.ts +28 -0
  197. package/dist/svelte5/hydrate/components-flex/props.d.ts +107 -0
  198. package/dist/svelte5/hydrate/components-flex/schemas.d.ts +36 -0
  199. package/dist/svelte5/hydrate/components-flex/shared/styles.d.ts +3 -0
  200. package/dist/svelte5/hydrate/components-flex/shared/types.d.ts +13 -0
  201. package/dist/svelte5/hydrate/components-flex/slider/types.d.ts +10 -0
  202. package/dist/svelte5/hydrate/components-flex/styles.d.ts +9 -0
  203. package/dist/svelte5/hydrate/components-flex/text/constants.d.ts +4 -0
  204. package/dist/svelte5/hydrate/components-flex/text/styles.d.ts +7 -0
  205. package/dist/svelte5/hydrate/components-flex/text/types.d.ts +39 -0
  206. package/dist/svelte5/hydrate/components-flex/text-link/styles.d.ts +6 -0
  207. package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +31 -0
  208. package/dist/svelte5/hydrate/components-flex/utils/color.d.ts +7 -0
  209. package/dist/svelte5/hydrate/components-flex/utils/obj-to-style.d.ts +2 -0
  210. package/dist/svelte5/hydrate/components-flex/utils/parser.d.ts +5 -0
  211. package/dist/svelte5/hydrate/components-flex/utils/prop-to-style.d.ts +11 -0
  212. package/dist/svelte5/hydrate/components-flex/variants.d.ts +48 -0
  213. package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +16 -0
  214. package/dist/svelte5/hydrate/constants.d.ts +27 -0
  215. package/dist/svelte5/hydrate/display-logic.d.ts +125 -0
  216. package/dist/svelte5/hydrate/form.d.ts +100 -0
  217. package/dist/svelte5/hydrate/functions.d.ts +71 -0
  218. package/dist/svelte5/hydrate/hooks/useClickable.d.ts +7 -0
  219. package/dist/svelte5/hydrate/hooks/useInjectCustomizeCss.d.ts +2 -0
  220. package/dist/svelte5/hydrate/hooks/useText.d.ts +5 -0
  221. package/dist/svelte5/hydrate/index.es.d.ts +79 -2956
  222. package/dist/svelte5/hydrate/index.es.js +5695 -6473
  223. package/dist/svelte5/hydrate/logger.d.ts +48 -0
  224. package/dist/svelte5/hydrate/modal.d.ts +214 -0
  225. package/dist/svelte5/hydrate/modal.svelte5.d.ts +214 -0
  226. package/dist/svelte5/hydrate/prop.d.ts +439 -0
  227. package/dist/svelte5/hydrate/script.d.ts +33 -0
  228. package/dist/svelte5/hydrate/stores.d.ts +376 -0
  229. package/dist/svelte5/hydrate/types.d.ts +183 -0
  230. package/dist/svelte5/hydrate/utils.d.ts +171 -0
  231. package/dist/svelte5/hydrate/widget.d.ts +148 -0
  232. package/dist/svelte5/index.es.d.ts +79 -2956
  233. package/dist/svelte5/index.es.js +5661 -6511
  234. package/dist/svelte5/index.front2.es.d.ts +1 -2
  235. package/dist/svelte5/index.front2.es.js +5920 -6781
  236. package/dist/svelte5/index.svelte5.d.ts +79 -0
  237. package/dist/svelte5/logger.d.ts +48 -0
  238. package/dist/svelte5/modal.d.ts +214 -0
  239. package/dist/svelte5/modal.svelte5.d.ts +214 -0
  240. package/dist/svelte5/prop.d.ts +439 -0
  241. package/dist/svelte5/script.d.ts +33 -0
  242. package/dist/svelte5/stores.d.ts +376 -0
  243. package/dist/svelte5/types.d.ts +183 -0
  244. package/dist/svelte5/utils.d.ts +171 -0
  245. package/dist/svelte5/widget.d.ts +148 -0
  246. package/dist/templates.cjs.js +38 -47
  247. package/dist/templates.d.ts +27 -28
  248. package/dist/templates.js +37 -46
  249. package/dist/types.d.ts +183 -0
  250. package/dist/utils.d.ts +171 -0
  251. package/dist/widget.d.ts +148 -0
  252. package/package.json +16 -27
  253. package/dist/hydrate/index.es.d.ts +0 -2988
  254. package/dist/templates.cjs.d.ts +0 -34
@@ -1,2988 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- import { onMount as onMountSvelte } from "svelte";
3
- import { onDestroy as onDestorySvelte } from "svelte";
4
- import { beforeUpdate as beforeUpdateSvelte } from "svelte";
5
- import { afterUpdate as afterUpdateSvelte } from "svelte";
6
- import { tick as tickSvelte } from "svelte";
7
- import { Writable as Writable_ } from "svelte/store";
8
- import { Properties } from "csstype";
9
- import { Properties as Properties$0 } from "preact/src/jsx-csstype";
10
- /** @internal */
11
- declare const ACTION_HOOK_LABEL = "__ACTION_HOOK__";
12
- // -------- The following codes are deprecated --------
13
- /**
14
- * 非推奨
15
- *
16
- * @deprecated 非推奨
17
- *
18
- * @internal
19
- */
20
- declare const KARTE_MODAL_ROOT = "karte-modal-root";
21
- /**
22
- * アクションの汎用的なタイプを定義する
23
- *
24
- * モーダル(ポップアップ)やアクションテーブルなど機能別のタイプは含めない。
25
- */
26
- /**
27
- * アクションのイベントハンドラ
28
- *
29
- * @public
30
- */
31
- type ActionEventHandler = (...args: any[]) => any | Promise<any>;
32
- /**
33
- * アクションの変数
34
- *
35
- * @public
36
- */
37
- type ActionVariables = {
38
- [key: string]: any;
39
- };
40
- /**
41
- * アクションの send 関数
42
- *
43
- * @public
44
- */
45
- type SendFunction = (event_name: string, values?: any) => void;
46
- /**
47
- * アクションの publish 関数
48
- *
49
- * @public
50
- */
51
- type PublishFunction = (topic: string, values?: any) => void;
52
- /**
53
- * アクション設定
54
- *
55
- * @public
56
- */
57
- type ActionSetting = {
58
- send?: SendFunction;
59
- publish?: PublishFunction;
60
- initialState?: string;
61
- };
62
- /**
63
- * アクションのライフサイクル changeState で呼び出されるフック関数
64
- *
65
- * @param props - アクションのプロパティ
66
- * @param newState - アクションの新しいステート
67
- *
68
- * @public
69
- */
70
- type ActionChangeStateHook<Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
71
- /**
72
- * アクションのプロパティ
73
- *
74
- * @public
75
- */
76
- interface ActionProps<Props, Variables> {
77
- /**
78
- * アクションでイベントがトリガーされたときに受信するための関数
79
- */
80
- send: SendFunction;
81
- /**
82
- * アクション内でタグのQueueにリクエストを発行する関数
83
- */
84
- publish: PublishFunction;
85
- /**
86
- * アクションで使用されるデータ
87
- */
88
- data: Props & Variables & ActionVariables;
89
- /**
90
- * アクションが表示されたときにフックされる {@link onShow}
91
- */
92
- onShow?: ActionHook<Props, Variables & ActionVariables>;
93
- /**
94
- * アクションのステートが変更されたときにフックされる {@link onChangeState}
95
- */
96
- onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
97
- }
98
- /**
99
- * アクションのライフサイクルで呼び出されるフック
100
- *
101
- * @param props - アクションのプロパティ
102
- *
103
- * @public
104
- */
105
- type ActionHook<Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
106
- /**
107
- * {@link create} 向けのオプション
108
- *
109
- * @public
110
- */
111
- interface ActionOptions<Props, Variables, VariablesQuery> {
112
- /**
113
- * アクション内でイベントを発火する関数
114
- *
115
- * @defaultValue `() => {}`
116
- */
117
- send?: SendFunction;
118
- /**
119
- * アクション内でタグのQueueにリクエストを発行する関数
120
- *
121
- * @defaultValue `() => {}`
122
- */
123
- publish?: PublishFunction;
124
- /**
125
- * アクションで使用されるプロパティ
126
- *
127
- * @defaultValue `{}`
128
- */
129
- props?: Props;
130
- /**
131
- * アクションで使用される解析時に取得される変数
132
- *
133
- * @defaultValue `{}`
134
- */
135
- variables?: VariablesQuery;
136
- /**
137
- * アクションで使用されるアクション実行時に取得される変数
138
- *
139
- * @defaultValue `[]`
140
- */
141
- localVariablesQuery?: VariablesQuery;
142
- /**
143
- * アクションが作成されているときにフックされる {@link onCreate}
144
- *
145
- * @defaultValue `() => {}`
146
- */
147
- onCreate?: ActionHook<Props, VariablesQuery & ActionVariables>;
148
- /**
149
- * KARTEテンプレートの情報
150
- *
151
- * @defaultValue `{}`
152
- */
153
- karteTemplate?: {
154
- [key: string]: any;
155
- };
156
- /**
157
- * アクション実行時のコンテキスト
158
- */
159
- context: ActionRunnerContext;
160
- }
161
- /**
162
- * KARTE のシステム設定情報
163
- *
164
- * @public
165
- */
166
- type SystemConfig = {
167
- /**
168
- * API キー
169
- */
170
- apiKey?: string;
171
- collection_endpoint?: string;
172
- /**
173
- * 接客ID
174
- */
175
- campaignId?: string;
176
- shortenId?: string;
177
- };
178
- /** @internal */
179
- type ActionHookLog = {
180
- name: string;
181
- values?: any;
182
- };
183
- /**
184
- * アクション実行時のコンテキスト
185
- */
186
- type ActionRunnerContext = {
187
- api_key: string;
188
- // TODO: edgejsのリリース状況によっては入ってこない可能性があるためoptionalにしているが、リリース完了後にrequiredに変更する
189
- collection_endpoint?: string;
190
- target?: "web" | "native";
191
- };
192
- type ActionTableResult = number | string | boolean | Date | null | undefined;
193
- type ActionTableQueryParam = string | number | boolean | Date;
194
- type ActionTableQueryParams = {
195
- [key: string]: ActionTableQueryParam | ActionTableQueryParam[];
196
- };
197
- /**
198
- * アクションテーブルの設定情報
199
- *
200
- * @param api_key - API Key
201
- * @param table - テーブル名
202
- * @param endpoint - エンドポイント / 指定がない場合はデフォルトのエンドポイントを使用します。検証用途以外での通常利用では指定なしで大丈夫です。
203
- */
204
- type CollectionConfig = {
205
- api_key: string;
206
- table: string;
207
- collection_endpoint?: string;
208
- };
209
- /**
210
- * アクションテーブルを管理するメソッドを取得する
211
- *
212
- * @param config - アクションテーブル設定情報
213
- *
214
- * @returns メソッドを返します
215
- *
216
- * @public
217
- */
218
- declare function collection(config: CollectionConfig): {
219
- get(key: string | Array<string>, cb: (err: Error | null, items?: ActionTableResult | Array<ActionTableResult>) => void): void;
220
- getByQuery(query_name: string, params: ActionTableQueryParams, options: {
221
- ignore_fields?: string[];
222
- } | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
223
- set(key: string, value: string, cb: (err: Error | null) => void): void;
224
- };
225
- /** @internal */
226
- type VariableQuery = {
227
- resolver: string;
228
- name: string;
229
- query: any;
230
- preview_value?: any;
231
- };
232
- /** @internal */
233
- type ActionTableRowRequestConfig = VariableQuery & {
234
- resolver: "action-table-row";
235
- query: {
236
- table_name: string;
237
- key: string;
238
- default_value?: ActionTableResult;
239
- };
240
- preview_value?: ActionTableResult;
241
- };
242
- /** @internal */
243
- type ActionTableRowsRequestConfig = VariableQuery & {
244
- resolver: "action-table-rows";
245
- query: {
246
- table_name: string;
247
- keys: Array<string>;
248
- default_value?: Array<ActionTableResult>;
249
- };
250
- preview_value?: Array<ActionTableResult>;
251
- };
252
- /** @internal */
253
- type ActionTableQueryRequestConfig = VariableQuery & {
254
- resolver: "action-table-query";
255
- query: {
256
- table_name: string;
257
- query_name: string;
258
- params?: {
259
- [key: string]: string;
260
- };
261
- default_value?: Array<ActionTableResult>;
262
- };
263
- preview_value?: Array<ActionTableResult>;
264
- };
265
- /** @internal */
266
- type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
267
- /** @internal */
268
- declare const loadActionTableRow: (config: ActionTableRowRequestConfig, data: {
269
- [key: string]: any;
270
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
271
- /** @internal */
272
- declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, data: {
273
- [key: string]: any;
274
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
275
- /** @internal */
276
- declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, data: {
277
- [key: string]: any;
278
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
279
- /** @internal */
280
- declare const loadActionTable: (config: Array<VariableQuery>, data: {
281
- [key: string]: any;
282
- }, api_key: string, collection_endpoint?: string) => Promise<{
283
- [key: string]: any;
284
- }>;
285
- /**
286
- * モーダル(ポップアップ)のプロパティ
287
- *
288
- * @internal
289
- */
290
- interface Props {
291
- /**
292
- * 全ての条件を満たしたら表示するかどうか
293
- */
294
- show_and_condition?: boolean;
295
- /**
296
- * スクロール率による表示を有効化するかどうか
297
- */
298
- show_on_scroll?: boolean;
299
- /**
300
- * 表示するスクロール率
301
- */
302
- show_on_scroll_rate?: number;
303
- /**
304
- * 条件を満たした時に再表示するかどうか
305
- */
306
- show_on_scroll_reenter?: boolean;
307
- /**
308
- * 時間による表示を有効化するかどうか
309
- */
310
- show_on_time?: boolean;
311
- /**
312
- * 表示する秒数
313
- */
314
- show_on_time_count?: number;
315
- /**
316
- * 全ての条件を満たしたら非表示するかどうか
317
- */
318
- hide_and_condition?: boolean;
319
- /**
320
- * スクロール率で非表示を有効化するかどうか
321
- */
322
- hide_on_scroll?: boolean;
323
- /**
324
- * 非表示にするスクロール率
325
- */
326
- hide_on_scroll_rate?: number;
327
- /**
328
- * 条件を満たした時に表示するかどうか
329
- */
330
- hide_on_scroll_releave?: boolean;
331
- /**
332
- * 時間による非表示を有効化するかどうか
333
- */
334
- hide_on_time?: boolean;
335
- /**
336
- * 非表示にする秒数
337
- */
338
- hide_on_time_count?: number;
339
- }
340
- /**
341
- * スクロールに応じてアクションを非表示にするトリガー関数
342
- *
343
- * @remarks
344
- * スクロール率が `hide_on_scroll_rate` に達したときに `hide` 関数を呼び出します。
345
- * `show_on_scroll_reenter` が `true` で、かつ `hide_on_scroll_rate` またはその値以下の場合、アクションに対して `show` 関数が呼び出されます。
346
- *
347
- * @param props - アクションのプロパティ。プロパティには `hide_on_scroll`、`hide_on_scroll_rate` そして `show_on_scroll_reenter` が必要です。
348
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
349
- * @param show - アクションを再び表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
350
- *
351
- * @returns
352
- * スクロールが開始された場合は、クリーンアップする関数を返します。そうでない場合は `null` を返します。
353
- *
354
- * @internal
355
- */
356
- declare function hideOnScroll<ModalProps extends Pick<Props, "hide_on_scroll" | "hide_on_scroll_rate" | "show_on_scroll_reenter">>(props: ModalProps, hide?: Function, show?: Function): (() => void) | null;
357
- /**
358
- * 時間に応じてアクションを非表示にするトリガー関数
359
- *
360
- * @remarks
361
- * 時間のカウントが `hide_on_time_count` に達したときに `hide` 関数を呼び出します。
362
- *
363
- * @param props - アクションのプロパティ。プロパティには `hide_on_time` そして `hide_on_time_count` が必要です。
364
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
365
- *
366
- * @returns
367
- * タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
368
- *
369
- * @internal
370
- */
371
- declare function hideOnTime<ModalProps extends Pick<Props, "hide_on_time" | "hide_on_time_count">>(props: ModalProps, hide?: Function): (() => void) | null;
372
- /**
373
- * スクロールに応じてアクションを表示するトリガー関数
374
- *
375
- * @remarks
376
- * スクロール率が `show_on_scroll_rate` に達したときに `show` 関数を呼び出します。
377
- * `hide_on_scroll_releave` が `true` で、かつ `show_on_scroll_rate` 以下の場合は、アクションに対して `hide` 関数が呼び出されます。
378
- *
379
- * @param props - アクションのプロパティ。プロパティには `show_on_scroll`、`show_on_scroll_rate`、'hide_on_scroll_releave' そして `show_on_scroll_reenter` が必要です。
380
- * @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
381
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
382
- *
383
- * @returns
384
- * スクロールが開始されている場合は、クリーンアップ関数を返します。そうでない場合は `null` を返します
385
- *
386
- * @internal
387
- */
388
- declare function showOnScroll<ModalProps extends Pick<Props, "show_on_scroll" | "show_on_scroll_rate" | "hide_on_scroll_releave" | "show_on_scroll_reenter">>(props: ModalProps, show?: Function, hide?: Function): (() => void) | null;
389
- /**
390
- * 時間に応じてアクションを表示するトリガー関数
391
- *
392
- * @param props - アクションのプロパティ。プロパティには `show_on_time` そして `show_on_time_count` が必要です。
393
- * @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
394
- *
395
- * @remarks
396
- * 時間のカウントが `show_on_time_count` に達したときに `show` 関数を呼び出します。
397
- *
398
- * @returns
399
- * タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
400
- *
401
- * @internal
402
- */
403
- declare function showOnTime<ModalProps extends Pick<Props, "show_on_time" | "show_on_time_count">>(props: ModalProps, show?: Function): (() => void) | null;
404
- declare function checkAndDo(checkFn: Function, fn: Function, ...conditionFns: Function[]): () => void | null;
405
- type ModalProps = Props;
406
- /**
407
- * アクションを作成する
408
- *
409
- * @param App - Svelte コンポーネントのエントリポイント
410
- * @param options - {@link ActionOptions | オプション}
411
- *
412
- * @returns アクションを破棄する関数
413
- *
414
- * @public
415
- */
416
- declare function create<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentTyped, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
417
- /**
418
- * アクションの破棄する
419
- *
420
- * @public
421
- */
422
- declare function destroyAction(): void;
423
- /**
424
- * アクションが作成 (create) される前にフックする関数
425
- *
426
- * @param fn - 呼び出されるフック関数
427
- *
428
- * @public
429
- */
430
- declare function onCreate<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
431
- /**
432
- * アクションが破棄 (destroy) される前にフックする関数
433
- *
434
- * @param fn - 呼び出されるフック関数
435
- *
436
- * @public
437
- */
438
- declare function onDestroy<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
439
- // -------- The following codes are deprecated --------
440
- /**
441
- * 非推奨
442
- *
443
- * @deprecated 非推奨
444
- *
445
- * @internal
446
- */
447
- declare const showModal: typeof create;
448
- /**
449
- * 非推奨
450
- *
451
- * @deprecated 非推奨
452
- *
453
- * @internal
454
- */
455
- declare function destroy(): void;
456
- /** @internal */
457
- declare const initialize: (setting?: ActionSetting) => () => void;
458
- /** @internal */
459
- declare const finalize: () => void;
460
- /**
461
- * ES Modules に対応していない JavaScript をページに読み込む
462
- *
463
- * @param src - JavaScript ファイルのリンク URL
464
- *
465
- * @public
466
- */
467
- declare function loadGlobalScript(src: string): Promise<any>;
468
- /**
469
- * グローバル CSS をページに適用する
470
- *
471
- * @param css - CSS
472
- *
473
- * @public
474
- */
475
- declare function applyGlobalCss(css: string): Promise<any>;
476
- /**
477
- * style ファイルをページに読み込む
478
- *
479
- * @param href - style ファイルのリンク URL
480
- *
481
- * @public
482
- */
483
- declare function loadGlobalStyle(href: string): Promise<any>;
484
- /** @internal */
485
- type Store<T> = Writable_<T>; // Wrap svelte tools
486
- /**
487
- * アクション設定を更新する
488
- *
489
- * @param setting - 更新するアクション設定
490
- *
491
- * @returns 新しいアクション設定
492
- *
493
- * @public
494
- */
495
- declare function setSetting(setting: ActionSetting): ActionSetting;
496
- /**
497
- * KARTE の設定を取得する
498
- *
499
- * @remarks
500
- * アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
501
- * 取得できる設定は、APIキー、接客ID、アクションショートIDなどです。
502
- *
503
- * @returns 現在の KARTE システムの設定を返します
504
- *
505
- * @public
506
- */
507
- declare function getSystem(): SystemConfig;
508
- /**
509
- * Store to handle current state ID
510
- *
511
- * This is exported becase of compatible interface for App.svelte.
512
- * Don't use directly.
513
- *
514
- * @internal
515
- */
516
- declare const state: Store<string>;
517
- /**
518
- * 現在のステートを設定する
519
- *
520
- * @param stateId - 表示するステートID
521
- * @param options - オプション。`options.disableInPreview`でプレビュー時のステート遷移を無効化できます。
522
- *
523
- * @public
524
- */
525
- declare function setState(stateId: string, options?: {
526
- disableInPreview: boolean;
527
- }): void;
528
- /**
529
- * 現在のステートを取得する
530
- *
531
- * @remarks
532
- * アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
533
- *
534
- * @returns 現在のステートID
535
- *
536
- * @public
537
- */
538
- declare function getState(): string;
539
- /**
540
- * ステートID一覧を取得する
541
- *
542
- * @remarks
543
- * アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
544
- *
545
- * @returns すべてのステートID
546
- *
547
- * @public
548
- */
549
- declare function getStates(): string[];
550
- /**
551
- * アクションの表示・非表示の状態を取得する
552
- *
553
- * @returns アクションが表示されているときは `true`、非表示のときは `false` を返します。
554
- *
555
- * @public
556
- */
557
- declare function isOpened(): boolean;
558
- /**
559
- * Store to handle event handlers
560
- *
561
- * This is used internally.
562
- *
563
- * @internal
564
- */
565
- declare const eventHandlers: Store<{
566
- [key: string]: ActionEventHandler;
567
- }>;
568
- /**
569
- * イベントハンドラーの一覧を取得する
570
- *
571
- * @returns 現在のイベントハンドラー
572
- *
573
- * @public
574
- */
575
- declare function getEventHandlers(): {
576
- [key: string]: ActionEventHandler;
577
- };
578
- /**
579
- * イベントハンドラーを登録する
580
- *
581
- * @remarks
582
- * 登録したイベントハンドラーは、ビジュアルエディタでアクション本体とのテキストボタンのクリック時の動作で利用できます。
583
- *
584
- * @param handlers - 登録するイベントハンドラー
585
- *
586
- * @public
587
- */
588
- declare function setEventHandlers(handlers: {
589
- [key: string]: ActionEventHandler;
590
- }): {
591
- [key: string]: ActionEventHandler;
592
- };
593
- /**
594
- * イベントハンドラーをリセットする
595
- *
596
- */
597
- declare function resetEventHandlers(): void;
598
- /**
599
- * Store to handle variables
600
- *
601
- * @internal
602
- */
603
- declare const variables: Store<{
604
- [key: string]: any;
605
- }>;
606
- /**
607
- * 変数の一覧を取得する
608
- *
609
- * @returns 現在の変数の一覧
610
- */
611
- declare function getVariables(): ActionVariables;
612
- /**
613
- * 変数を設定する
614
- *
615
- * @remarks
616
- * 設定した変数は、ビジュアルエディタのテキストフォームなどで利用できます。
617
- *
618
- * @param vars - 変数
619
- */
620
- declare function setVariables(vars: ActionVariables): ActionVariables;
621
- /**
622
- * 変数をリセットする
623
- */
624
- declare function resetVariables(): void;
625
- /** @internal */
626
- interface FormData {
627
- [name: string]: {
628
- value: any;
629
- statePath: string;
630
- isValid: boolean;
631
- };
632
- }
633
- /**
634
- * Store for form data
635
- *
636
- * @internal
637
- */
638
- declare const formData: Writable_<FormData>;
639
- /**
640
- * ポップアップ(モーダル)のコンポーネントで利用するPropの定義
641
- */
642
- /** @internal */
643
- declare const PropTypes: readonly [
644
- "BooleanKeyword",
645
- "NumberKeyword",
646
- "StringKeyword",
647
- "Function",
648
- "Enum",
649
- "Code",
650
- "Direction",
651
- "Url",
652
- "Image",
653
- "AnimationStyle",
654
- "LongText",
655
- "Length",
656
- "Color",
657
- "Alignment",
658
- "State",
659
- "TransitState",
660
- "Style",
661
- "ModalPlacement",
662
- "OnClick"
663
- ];
664
- /** @internal */
665
- type PropType = (typeof PropTypes)[number];
666
- /** @internal */
667
- type Code = string;
668
- /** @internal */
669
- declare const MediaQueries: {
670
- [key: string]: string;
671
- };
672
- /** @internal */
673
- type MediaQuery = string;
674
- /** @internal */
675
- declare const Directions: readonly [
676
- "row",
677
- "column"
678
- ];
679
- /** @internal */
680
- type Direction = (typeof Directions)[number];
681
- /** @internal */
682
- declare const AnimationStyles: readonly [
683
- "none",
684
- "fade",
685
- "bounce",
686
- "slide-down",
687
- "slide-up",
688
- "slide-left",
689
- "slide-right"
690
- ];
691
- /** @internal */
692
- type AnimationStyle = (typeof AnimationStyles)[number];
693
- /** @internal */
694
- declare const ModalPositions: readonly [
695
- "top-left",
696
- "top-center",
697
- "top-right",
698
- "center-left",
699
- "center",
700
- "center-right",
701
- "bottom-left",
702
- "bottom-center",
703
- "bottom-right",
704
- "none"
705
- ];
706
- /** @internal */
707
- type ModalPosition = (typeof ModalPositions)[number];
708
- /** @internal */
709
- type ModalMargin = {
710
- left?: string;
711
- right?: string;
712
- top?: string;
713
- bottom?: string;
714
- };
715
- /** @internal */
716
- type ModalPlacement<M = ModalMargin> = {
717
- position?: ModalPosition;
718
- margin?: M;
719
- backgroundOverlay?: boolean;
720
- backgroundClick?: OnClickOperation;
721
- };
722
- /** @internal */
723
- declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
724
- /** @internal */
725
- declare const Elasticities: readonly [
726
- "none",
727
- "vertical",
728
- "horizontal"
729
- ];
730
- /** @internal */
731
- type Elasticity = (typeof Elasticities)[number];
732
- /** @internal */
733
- declare const ElasticityStyle: {
734
- none: string;
735
- vertical: string;
736
- horizontal: string;
737
- };
738
- /** @internal */
739
- declare const DefaultElasticity: Elasticity;
740
- /** @internal */
741
- declare const TextDirections: readonly [
742
- "horizontal",
743
- "vertical"
744
- ];
745
- /** @internal */
746
- type TextDirection = (typeof TextDirections)[number];
747
- type OperationArgumentTypes = {
748
- StringKeyword: string;
749
- BooleanKeyword: boolean;
750
- NumberKeyword: number;
751
- TransitState: string;
752
- Url: string;
753
- Color: string;
754
- Handler: string;
755
- Trigger: string;
756
- };
757
- /** @internal */
758
- type OperationArgumentType = keyof OperationArgumentTypes;
759
- type BaseOperationOptions = ReadonlyArray<{
760
- operation: string;
761
- args: ReadonlyArray<{
762
- name: string;
763
- type: OperationArgumentType;
764
- default: any;
765
- }>;
766
- }>;
767
- type ConvertOperationOptions<O extends BaseOperationOptions> = ConvertOperationOption<O[number]>;
768
- type ConvertOperationOption<Option extends BaseOperationOptions[number]> = Option extends any ? {
769
- operation: Option["operation"];
770
- args: ConvertOperationOptionArguments<Option["args"]>;
771
- } : never;
772
- type ConvertOperationOptionArguments<Arguments extends BaseOperationOptions[number]["args"]> = {
773
- -readonly [Index in keyof Arguments]: Arguments[Index] extends BaseOperationOptions[number]["args"][number] ? OperationArgumentTypes[Arguments[Index]["type"]] : never;
774
- };
775
- /** @internal */
776
- type Operation = ConvertOperationOptions<ReadonlyArray<any>>;
777
- /** @internal */
778
- declare const OnClickOperationOptions: readonly [
779
- {
780
- readonly operation: "none";
781
- readonly args: readonly [
782
- ];
783
- },
784
- {
785
- readonly operation: "linkTo";
786
- readonly args: readonly [
787
- {
788
- readonly name: "url";
789
- readonly type: "Url";
790
- readonly default: "https://example.com";
791
- },
792
- {
793
- readonly name: "open_new_tab";
794
- readonly type: "BooleanKeyword";
795
- readonly default: true;
796
- },
797
- {
798
- readonly name: "decode";
799
- readonly type: "BooleanKeyword";
800
- readonly default: false;
801
- }
802
- ];
803
- },
804
- {
805
- readonly operation: "moveTo";
806
- readonly args: readonly [
807
- {
808
- readonly name: "state";
809
- readonly type: "TransitState";
810
- readonly default: "/";
811
- }
812
- ];
813
- },
814
- {
815
- readonly operation: "closeApp";
816
- readonly args: readonly [
817
- {
818
- readonly name: "trigger";
819
- readonly type: "Trigger";
820
- readonly default: "button";
821
- }
822
- ];
823
- },
824
- {
825
- readonly operation: "runScript";
826
- readonly args: readonly [
827
- {
828
- readonly name: "handler";
829
- readonly type: "Handler";
830
- readonly default: "";
831
- }
832
- ];
833
- },
834
- {
835
- readonly operation: "submitForm";
836
- readonly args: readonly [
837
- {
838
- readonly name: "state";
839
- readonly type: "TransitState";
840
- readonly default: "/";
841
- }
842
- ];
843
- },
844
- {
845
- readonly operation: "bootChat";
846
- readonly args: readonly [
847
- {
848
- readonly name: "hide_launcher";
849
- readonly type: "BooleanKeyword";
850
- readonly default: false;
851
- },
852
- {
853
- readonly name: "placement_pc";
854
- readonly type: "StringKeyword";
855
- readonly default: "left";
856
- },
857
- {
858
- readonly name: "placement_mobile";
859
- readonly type: "StringKeyword";
860
- readonly default: "left";
861
- },
862
- {
863
- readonly name: "horizontal_spacing_pc";
864
- readonly type: "NumberKeyword";
865
- readonly default: 20;
866
- },
867
- {
868
- readonly name: "horizontal_spacing_mobile";
869
- readonly type: "NumberKeyword";
870
- readonly default: 20;
871
- },
872
- {
873
- readonly name: "vertical_spacing_pc";
874
- readonly type: "NumberKeyword";
875
- readonly default: 20;
876
- },
877
- {
878
- readonly name: "vertical_spacing_mobile";
879
- readonly type: "NumberKeyword";
880
- readonly default: 20;
881
- },
882
- {
883
- readonly name: "theme_color";
884
- readonly type: "Color";
885
- readonly default: "#2aab9f";
886
- },
887
- {
888
- readonly name: "header_title";
889
- readonly type: "StringKeyword";
890
- readonly default: "KARTE\u30B5\u30DD\u30FC\u30C8\u30C1\u30FC\u30E0";
891
- },
892
- {
893
- readonly name: "header_description";
894
- readonly type: "StringKeyword";
895
- readonly default: "\u3054\u8CEA\u554F\u304C\u3042\u308C\u3070\u304A\u5C0B\u306D\u304F\u3060\u3055\u3044\u3002\nKARTE\u30B5\u30DD\u30FC\u30C8\u62C5\u5F53\u8005\u306B\u3064\u306A\u304C\u308A\u307E\u3059\u3002\u30B5\u30DD\u30FC\u30C8\u53D7\u4ED8\u6642\u9593\u306F\u5E73\u65E510:30-17:30\u3067\u3059\u3002";
896
- },
897
- {
898
- readonly name: "launcher_image";
899
- readonly type: "StringKeyword";
900
- readonly default: "";
901
- }
902
- ];
903
- }
904
- ];
905
- /** @internal */
906
- type OnClickOperation = ConvertOperationOptions<typeof OnClickOperationOptions>;
907
- /** @internal */
908
- type LongText = string;
909
- /** @internal */
910
- type Url = string;
911
- /** @internal */
912
- type RegExpProp = {
913
- pattern: string;
914
- flags: string;
915
- };
916
- /** @internal */
917
- type Image = string;
918
- /** @internal */
919
- declare const LengthUnits: readonly [
920
- "px",
921
- "em",
922
- "rem",
923
- "vw",
924
- "fr",
925
- "%"
926
- ];
927
- /** @internal */
928
- type LengthUnit = (typeof LengthUnits)[number];
929
- /** @internal */
930
- type Length = `${number}${LengthUnit}` | "auto";
931
- /** @internal */
932
- type Color = `#${string}` | `rgba(${string})`;
933
- /** @internal */
934
- type FontWeight = string;
935
- /** @internal */
936
- declare const SYSTEM_FONT = "sans-serif, serif, monospace, system-ui";
937
- /** @internal */
938
- declare const Fonts: string[];
939
- type Font = (typeof Fonts)[number];
940
- /** @internal */
941
- declare const Justifies: readonly [
942
- "flex-start",
943
- "center",
944
- "flex-end"
945
- ];
946
- /** @internal */
947
- type Justify = (typeof Justifies)[number];
948
- /** @internal */
949
- declare const Alignments: readonly [
950
- "flex-start",
951
- "center",
952
- "flex-end"
953
- ];
954
- /** @internal */
955
- type Alignment = (typeof Alignments)[number];
956
- /** @internal */
957
- declare const FlexDirections: readonly [
958
- "row",
959
- "column"
960
- ];
961
- /** @internal */
962
- type FlexDirection = (typeof FlexDirections)[number];
963
- /** @internal */
964
- declare const ObjectFits: readonly [
965
- "cover",
966
- "fill",
967
- "contain"
968
- ];
969
- /** @internal */
970
- type ObjectFit = (typeof ObjectFits)[number];
971
- /** @internal */
972
- declare const ClipPaths: readonly [
973
- "none",
974
- "circle(closest-side)"
975
- ];
976
- /** @internal */
977
- type ClipPath = (typeof ClipPaths)[number];
978
- /** @internal */
979
- declare const Repeats: readonly [
980
- "repeat",
981
- "space",
982
- "round",
983
- "no-repeat"
984
- ];
985
- /** @internal */
986
- type Repeat = (typeof Repeats)[number];
987
- /** @internal */
988
- declare const BackgroundSizes: readonly [
989
- "auto",
990
- "cover",
991
- "contain"
992
- ];
993
- /** @internal */
994
- type BackgroundSize = (typeof BackgroundSizes)[number];
995
- /** @internal */
996
- declare const Cursors: readonly [
997
- "default",
998
- "pointer"
999
- ];
1000
- /** @internal */
1001
- type Cursor = (typeof Cursors)[number];
1002
- /** @internal */
1003
- declare const Overflows: readonly [
1004
- "hidden",
1005
- "auto",
1006
- "visible"
1007
- ];
1008
- /** @internal */
1009
- type Overflow = (typeof Overflows)[number];
1010
- /** @internal */
1011
- type Border = string;
1012
- /** @internal */
1013
- type BorderStyle = string;
1014
- /** @internal */
1015
- type BorderWidth = `${number}px`;
1016
- /** @internal */
1017
- type BoxShadow = string;
1018
- /** @internal */
1019
- type Style = string;
1020
- /** @internal */
1021
- type TransitState = string;
1022
- /** @internal */
1023
- declare const WritingModes: readonly [
1024
- "horizontal-tb",
1025
- "vertical-lr"
1026
- ];
1027
- /** @internal */
1028
- type WritingMode = (typeof WritingModes)[number];
1029
- /** @internal */
1030
- type DateTime = string;
1031
- /** @internal */
1032
- type Icon = string;
1033
- /** @internal */
1034
- declare const ListSeparatorTypes: readonly [
1035
- "none",
1036
- "border",
1037
- "gap"
1038
- ];
1039
- /** @internal */
1040
- interface EdgePosition {
1041
- edgeDistance: Length;
1042
- edgeDirectionOffset: Length;
1043
- }
1044
- /** @internal */
1045
- declare const DefaultEdgePosition: EdgePosition;
1046
- type ListSeparatorType = (typeof ListSeparatorTypes)[number];
1047
- interface BaseListSeparator {
1048
- type: ListSeparatorType;
1049
- }
1050
- /** @internal */
1051
- interface ListSeparatorNone extends BaseListSeparator {
1052
- type: "none";
1053
- }
1054
- /** @internal */
1055
- interface ListSeparatorBorder extends BaseListSeparator {
1056
- type: "border";
1057
- borderStyle: BorderStyle;
1058
- borderWidth?: BorderWidth;
1059
- borderColor?: Color;
1060
- }
1061
- /** @internal */
1062
- interface ListSeparatorGap extends BaseListSeparator {
1063
- type: "gap";
1064
- gap: Length;
1065
- }
1066
- /** @internal */
1067
- type ListSeparator = ListSeparatorNone | ListSeparatorBorder | ListSeparatorGap;
1068
- /** @internal */
1069
- declare const DefaultListSeparatorNone: Required<ListSeparatorNone>;
1070
- /** @internal */
1071
- declare const DefaultListSeparatorBorder: Required<ListSeparatorBorder>;
1072
- /** @internal */
1073
- declare const DefaultListSeparatorGap: Required<ListSeparatorGap>;
1074
- /** @internal */
1075
- declare const DefaultListSeparator: Required<ListSeparatorBorder>;
1076
- /** @internal */
1077
- declare const ListBackgroundTypes: readonly [
1078
- "none",
1079
- "stripe"
1080
- ];
1081
- type ListBackgroundType = (typeof ListBackgroundTypes)[number];
1082
- interface BaseListBackground {
1083
- type: ListBackgroundType;
1084
- }
1085
- /** @internal */
1086
- interface ListBackgroundNone extends BaseListBackground {
1087
- type: "none";
1088
- }
1089
- /** @internal */
1090
- interface ListBackgroundStripe extends BaseListBackground {
1091
- type: "stripe";
1092
- background1?: Color;
1093
- background2?: Color;
1094
- }
1095
- /**
1096
- * @internal
1097
- */
1098
- type ListBackground = ListBackgroundNone | ListBackgroundStripe;
1099
- /** @internal */
1100
- declare const DefaultListBackgroundNone: Required<ListBackgroundNone>;
1101
- /** @internal */
1102
- declare const DefaultListBackgroundStripe: Required<ListBackgroundStripe>;
1103
- /** @internal */
1104
- declare const DefaultListBackground: Required<ListBackgroundNone>;
1105
- /** @internal */
1106
- declare const ListDirections: readonly [
1107
- "vertical",
1108
- "horizontal"
1109
- ];
1110
- /** @internal */
1111
- type ListDirection = (typeof ListDirections)[number];
1112
- /** @internal */
1113
- type ListContext = {
1114
- separator: ListSeparator;
1115
- background: ListBackground;
1116
- direction: ListDirection;
1117
- registerItem: (props: {
1118
- onMount: (props: {
1119
- index: number;
1120
- length: number;
1121
- }) => void;
1122
- }) => string;
1123
- unregisterItem: (id: string) => void;
1124
- };
1125
- type SlideButtonType = "icon" | "text";
1126
- type BaseSlideButton = {
1127
- type: SlideButtonType;
1128
- };
1129
- /** @internal */
1130
- interface SlideButtonIcon extends BaseSlideButton {
1131
- type: "icon";
1132
- icon: string;
1133
- size: Length;
1134
- color: Color;
1135
- fill: Color;
1136
- }
1137
- /** @internal */
1138
- interface SlideButtonText extends BaseSlideButton {
1139
- type: "text";
1140
- text: string;
1141
- }
1142
- /** @internal */
1143
- type SlideButton = SlideButtonIcon | SlideButtonText;
1144
- /** @internal */
1145
- declare const DefaultSlideButton: {
1146
- readonly type: "icon";
1147
- readonly icon: "chevron-left";
1148
- readonly color: "#999";
1149
- readonly fill: "#999";
1150
- readonly size: "20px";
1151
- };
1152
- /** @internal */
1153
- type SlideButtonPosition = "top" | "middle" | "bottom";
1154
- /** @internal */
1155
- interface SlideNavigationButton {
1156
- type: "circle";
1157
- size: Length;
1158
- color: Color;
1159
- colorActive: Color;
1160
- }
1161
- /** @internal */
1162
- declare const DefaultSlideNavigationButton: {
1163
- readonly type: "circle";
1164
- readonly size: "8px";
1165
- readonly color: "#ddd";
1166
- readonly colorActive: "#666";
1167
- };
1168
- /** @internal */
1169
- type FormInputName = string;
1170
- /** @internal */
1171
- interface FormButtonColor {
1172
- main: Color;
1173
- sub: Color;
1174
- }
1175
- /** @internal */
1176
- declare const DefaultFormButtonColor: {
1177
- readonly main: "#2aab9f";
1178
- readonly sub: "#fff";
1179
- };
1180
- /** @internal */
1181
- type ModalStyle = {
1182
- placement?: ModalPlacement;
1183
- elasticity?: Elasticity;
1184
- };
1185
- /** @internal */
1186
- type ModalBreakPoint = {
1187
- PC: ModalStyle;
1188
- SP: ModalStyle;
1189
- };
1190
- /** @internal */
1191
- declare const DefaultModalBreakPoint: ModalBreakPoint;
1192
- declare const FormIdentifyTextFields: readonly [
1193
- "email",
1194
- "phone",
1195
- "first_name",
1196
- "last_name",
1197
- "address"
1198
- ];
1199
- /** @internal */
1200
- type FormIdentifyTextField = (typeof FormIdentifyTextFields)[number];
1201
- /** @internal */
1202
- declare const FormIdentifyTextFieldValidations: {
1203
- [K in FormIdentifyTextField]: RegExpProp;
1204
- };
1205
- /** @internal */
1206
- declare const FormIdentifyTextFieldPlaceholders: {
1207
- [K in FormIdentifyTextField]: string;
1208
- };
1209
- /** @internal */
1210
- declare const DefaultFormIdentifyTextField: FormIdentifyTextField;
1211
- /** @internal */
1212
- declare const FormIdentifyBooleanFields: readonly [
1213
- "subscription",
1214
- "phone_subscribe"
1215
- ];
1216
- /** @internal */
1217
- type FormIdentifyBooleanField = (typeof FormIdentifyBooleanFields)[number];
1218
- /** @internal */
1219
- declare const DefaultFormIdentifyBooleanField: FormIdentifyBooleanField;
1220
- /**
1221
- * スクロール方向
1222
- *
1223
- * @public
1224
- *
1225
- * @see {@link onScroll}
1226
- */
1227
- type ScrollDirection = "up" | "down";
1228
- /**
1229
- * {@link onScroll} のスクロールコンテキスト情報
1230
- *
1231
- * @remarks
1232
- * このコンテキスト情報は、{@link OnScrollFunction} が呼び出されたタイミングの情報が格納されています
1233
- *
1234
- * @see {@link onScroll}
1235
- *
1236
- * @public
1237
- */
1238
- interface OnScrollContext {
1239
- /**
1240
- * {@link onScroll} によって指定されたスクロール率
1241
- */
1242
- rate: number;
1243
- /**
1244
- * ページのスクロール率
1245
- */
1246
- scrollRate: number;
1247
- /**
1248
- * 前のスクロール率
1249
- */
1250
- previousRate: number;
1251
- /**
1252
- * 現在のスクロール率と前のスクロール率との差分値
1253
- */
1254
- deltaRate: number;
1255
- /**
1256
- * スクロール方向
1257
- */
1258
- direction: ScrollDirection;
1259
- }
1260
- /**
1261
- * {@link onScroll} によって呼び出されるコールバック関数
1262
- *
1263
- * @see {@link onScroll}
1264
- *
1265
- * @public
1266
- */
1267
- type OnScrollFunction = (ctx: OnScrollContext) => boolean;
1268
- /**
1269
- * スクロール率が達したときに呼び出すコールバックを登録します
1270
- *
1271
- * @param rate - スクロール率。この値は viewport でのスクロールのパーセンテージ
1272
- * @param fn - スクロール率が達したときに呼び出されるコールバック関数
1273
- *
1274
- * @returns スクロール率によって呼び出されるコールバックを停止する関数を返します
1275
- *
1276
- * @public
1277
- */
1278
- declare function onScroll(rate: number | number[], fn: OnScrollFunction): () => void;
1279
- /**
1280
- * 指定した時間の経過後に呼び出すコールバックを登録します
1281
- *
1282
- * @param time - コールバックを呼び出すまでの時間。単位はミリセカンド(ms)
1283
- * @param fn - 指定した時間が経過後に呼び出されるコールバック関数
1284
- *
1285
- * @returns コールバックを呼び出すためのタイマーを停止する関数を返します
1286
- *
1287
- * @public
1288
- */
1289
- declare function onTime(time: number, fn: Function): () => void;
1290
- /**
1291
- * アクションのログの記録の管理
1292
- */
1293
- /** @internal */
1294
- type LogLevel = "info" | "error" | "warn" | "system";
1295
- /** @internal */
1296
- type Log = {
1297
- level: LogLevel;
1298
- messages: any;
1299
- date?: Date;
1300
- };
1301
- /** @internal */
1302
- type Event = {
1303
- name: string;
1304
- values?: any;
1305
- date?: Date;
1306
- };
1307
- /** @internal */
1308
- declare function getLogs(): Log[];
1309
- /** @internal */
1310
- declare function getEvents(): Event[];
1311
- /**
1312
- * ログを送信する関数群
1313
- *
1314
- * @internal
1315
- */
1316
- declare const logger: {
1317
- info: (...messages: any[]) => void;
1318
- log: (...messages: any[]) => void;
1319
- error: (...messages: any[]) => void;
1320
- warn: (...messages: any[]) => void;
1321
- system: (...messages: any[]) => void;
1322
- event: (name: string, values?: any) => void;
1323
- clear: () => void;
1324
- clearEvents: () => void;
1325
- };
1326
- /**
1327
- * メッセージを実行ログに表示する
1328
- *
1329
- * @internal
1330
- */
1331
- declare function listenLogger(): () => void;
1332
- type ModalProps$1 = Props;
1333
- /**
1334
- * 表示アクショントリガー
1335
- *
1336
- * @internal */
1337
- type ShowTrigger = "custom" | "auto" | "none";
1338
- /**
1339
- * 閉じるアクショントリガー
1340
- *
1341
- * @public
1342
- */
1343
- type CloseTrigger = "button" | "overlay" | "auto" | "none";
1344
- /**
1345
- * アクションが表示 (show) された後にフックする関数
1346
- *
1347
- * @param fn - 呼び出されるフック関数
1348
- *
1349
- * @public
1350
- */
1351
- declare function onShow<Props extends ModalProps$1, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1352
- /**
1353
- * アクションのライフサイクル close で呼び出されるフックする関数
1354
- *
1355
- * @param props - アクションのプロパティ
1356
- * @param trigger - Close トリガー
1357
- *
1358
- * @public
1359
- */
1360
- type ActionCloseHook<Props extends ModalProps$1, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1361
- /**
1362
- * アクションがクローズ (close) される前にフックする関数
1363
- *
1364
- * @param fn - 呼び出されるフック関数
1365
- *
1366
- * @public
1367
- */
1368
- declare function onClose<Props extends ModalProps$1, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
1369
- /**
1370
- * アクションのステートが変更された (changeState) 後にフックする関数
1371
- *
1372
- * @param fn - 呼び出されるフック関数
1373
- *
1374
- * @public
1375
- */
1376
- declare function onChangeState<Props extends ModalProps$1, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
1377
- /**
1378
- * アクションを表示する
1379
- *
1380
- * @public
1381
- */
1382
- declare function showAction(): void;
1383
- /**
1384
- * アクションを閉じる
1385
- *
1386
- * @param trigger - 閉じた時のトリガー。デフォルト `'none'`
1387
- *
1388
- * @public
1389
- */
1390
- declare function closeAction(trigger?: CloseTrigger): void;
1391
- /**
1392
- * アクションに CSS を適用する
1393
- *
1394
- * @param css - 適用する CSS
1395
- *
1396
- * @returns 適用された style 要素を返す Promise
1397
- *
1398
- * @public
1399
- */
1400
- declare function applyCss(css: string): Promise<HTMLStyleElement>;
1401
- /**
1402
- * アクションにグローバルなスタイルを読み込む
1403
- *
1404
- * @param href - style ファイルのリンク URL
1405
- *
1406
- * @public
1407
- */
1408
- declare function loadStyle(href: string): Promise<void>;
1409
- // @internal
1410
- declare function getCssVariables(data: {
1411
- [key: string]: string | number;
1412
- }): string;
1413
- /**
1414
- * アクションのルートの DOM 要素を取得する
1415
- *
1416
- * @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
1417
- *
1418
- * @public
1419
- */
1420
- declare function getActionRoot(): ShadowRoot | null;
1421
- /** @internal */
1422
- declare function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
1423
- /**
1424
- * 非推奨
1425
- *
1426
- * @deprecated 非推奨
1427
- *
1428
- * @internal
1429
- */
1430
- declare const show: typeof showAction;
1431
- /**
1432
- * 非推奨
1433
- *
1434
- * @deprecated 非推奨
1435
- *
1436
- * @internal
1437
- */
1438
- declare const close: typeof closeAction;
1439
- /**
1440
- * 非推奨
1441
- *
1442
- * @deprecated 非推奨
1443
- *
1444
- * @internal
1445
- */
1446
- interface App {
1447
- /**
1448
- * The method to destroy an app instance.
1449
- */
1450
- close: () => void;
1451
- /**
1452
- * The method to show an app instance.
1453
- */
1454
- show: () => void;
1455
- }
1456
- /**
1457
- * 非推奨
1458
- *
1459
- * @deprecated 非推奨
1460
- *
1461
- * @internal
1462
- */
1463
- type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, VariablesQuery, VariablesQuery>;
1464
- /**
1465
- * 非推奨
1466
- *
1467
- * @deprecated 非推奨
1468
- *
1469
- * @internal
1470
- */
1471
- declare const ensureModalRoot: typeof ensureActionRoot;
1472
- /**
1473
- * 非推奨
1474
- *
1475
- * @deprecated 非推奨
1476
- *
1477
- * @internal
1478
- */
1479
- declare function createApp<Props, Variables, VariablesQuery>(App: SvelteComponentTyped, options?: AppOptions<Props, VariablesQuery, VariablesQuery>): App;
1480
- /**
1481
- * 非推奨
1482
- *
1483
- * @deprecated 非推奨
1484
- *
1485
- * @internal
1486
- */
1487
- declare function createFog({ color, opacity, zIndex, onclick }: {
1488
- color?: string;
1489
- opacity?: string;
1490
- zIndex?: number;
1491
- onclick: () => void;
1492
- }): {
1493
- fog: HTMLElement | null;
1494
- close: () => void;
1495
- };
1496
- type AnswerValue = {
1497
- choices: string[];
1498
- } | {
1499
- free_answer: string;
1500
- };
1501
- /**
1502
- * 選択式のアンケート回答を追加する
1503
- *
1504
- * @param questionId - 質問ID
1505
- * @param choices - 回答内容
1506
- *
1507
- * @public
1508
- */
1509
- declare function addChoiceAnswer(questionId: string, choices: string[], validation?: {
1510
- isValid: boolean;
1511
- statePath: string;
1512
- }): void;
1513
- /**
1514
- * 自由記述式のアンケート回答を追加する
1515
- *
1516
- * @param questionId - 質問ID
1517
- * @param freeAnswer - 回答内容
1518
- *
1519
- * @public
1520
- */
1521
- declare function addFreeAnswer(questionId: string, freeAnswer: string, validation?: {
1522
- isValid: boolean;
1523
- statePath: string;
1524
- }): void;
1525
- /**
1526
- * 回答済の回答を削除
1527
- *
1528
- * @param questionId - 質問ID
1529
- *
1530
- * @public
1531
- */
1532
- declare function removeAnswer(questionId: string): void;
1533
- /**
1534
- * 回答済の回答内容を取得する
1535
- *
1536
- * @param questionId - 質問ID
1537
- *
1538
- * @returns 回答データ
1539
- *
1540
- * @public
1541
- */
1542
- declare function getAnsweredQuestion(questionId: string): AnswerValue | undefined;
1543
- /**
1544
- * 回答済の回答IDのリストを取得
1545
- *
1546
- * @returns 回答済の質問の質問IDの配列
1547
- *
1548
- * @public
1549
- */
1550
- declare function getAnsweredQuestionIds(): string[];
1551
- /**
1552
- * `sendAnswers`のエイリアス
1553
- *
1554
- * @public
1555
- */
1556
- declare function sendAnswer(): boolean;
1557
- /**
1558
- * 回答済の回答をまとめてイベントとして送信する
1559
- *
1560
- * @returns イベント送信の成功/失敗
1561
- *
1562
- * @public
1563
- */
1564
- declare function sendAnswers(): boolean;
1565
- declare namespace widget {
1566
- /**
1567
- * アクションの汎用的なタイプを定義する
1568
- *
1569
- * モーダル(ポップアップ)やアクションテーブルなど機能別のタイプは含めない。
1570
- */
1571
- /**
1572
- * アクションのイベントハンドラ
1573
- *
1574
- * @public
1575
- */
1576
- type ActionEventHandler = (...args: any[]) => any | Promise<any>;
1577
- /**
1578
- * アクションの変数
1579
- *
1580
- * @public
1581
- */
1582
- type ActionVariables = {
1583
- [key: string]: any;
1584
- };
1585
- /**
1586
- * アクションの send 関数
1587
- *
1588
- * @public
1589
- */
1590
- type SendFunction = (event_name: string, values?: any) => void;
1591
- /**
1592
- * アクションの publish 関数
1593
- *
1594
- * @public
1595
- */
1596
- type PublishFunction = (topic: string, values?: any) => void;
1597
- /**
1598
- * アクション設定
1599
- *
1600
- * @public
1601
- */
1602
- type ActionSetting = {
1603
- send?: SendFunction;
1604
- publish?: PublishFunction;
1605
- initialState?: string;
1606
- };
1607
- /**
1608
- * アクションのライフサイクル changeState で呼び出されるフック関数
1609
- *
1610
- * @param props - アクションのプロパティ
1611
- * @param newState - アクションの新しいステート
1612
- *
1613
- * @public
1614
- */
1615
- type ActionChangeStateHook<Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
1616
- /**
1617
- * アクションのプロパティ
1618
- *
1619
- * @public
1620
- */
1621
- interface ActionProps<Props, Variables> {
1622
- /**
1623
- * アクションでイベントがトリガーされたときに受信するための関数
1624
- */
1625
- send: SendFunction;
1626
- /**
1627
- * アクション内でタグのQueueにリクエストを発行する関数
1628
- */
1629
- publish: PublishFunction;
1630
- /**
1631
- * アクションで使用されるデータ
1632
- */
1633
- data: Props & Variables & ActionVariables;
1634
- /**
1635
- * アクションが表示されたときにフックされる {@link onShow}
1636
- */
1637
- onShow?: ActionHook<Props, Variables & ActionVariables>;
1638
- /**
1639
- * アクションのステートが変更されたときにフックされる {@link onChangeState}
1640
- */
1641
- onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
1642
- }
1643
- /**
1644
- * アクションのライフサイクルで呼び出されるフック
1645
- *
1646
- * @param props - アクションのプロパティ
1647
- *
1648
- * @public
1649
- */
1650
- type ActionHook<Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
1651
- /**
1652
- * {@link create} 向けのオプション
1653
- *
1654
- * @public
1655
- */
1656
- interface ActionOptions<Props, Variables, VariablesQuery> {
1657
- /**
1658
- * アクション内でイベントを発火する関数
1659
- *
1660
- * @defaultValue `() => {}`
1661
- */
1662
- send?: SendFunction;
1663
- /**
1664
- * アクション内でタグのQueueにリクエストを発行する関数
1665
- *
1666
- * @defaultValue `() => {}`
1667
- */
1668
- publish?: PublishFunction;
1669
- /**
1670
- * アクションで使用されるプロパティ
1671
- *
1672
- * @defaultValue `{}`
1673
- */
1674
- props?: Props;
1675
- /**
1676
- * アクションで使用される解析時に取得される変数
1677
- *
1678
- * @defaultValue `{}`
1679
- */
1680
- variables?: VariablesQuery;
1681
- /**
1682
- * アクションで使用されるアクション実行時に取得される変数
1683
- *
1684
- * @defaultValue `[]`
1685
- */
1686
- localVariablesQuery?: VariablesQuery;
1687
- /**
1688
- * アクションが作成されているときにフックされる {@link onCreate}
1689
- *
1690
- * @defaultValue `() => {}`
1691
- */
1692
- onCreate?: ActionHook<Props, VariablesQuery & ActionVariables>;
1693
- /**
1694
- * KARTEテンプレートの情報
1695
- *
1696
- * @defaultValue `{}`
1697
- */
1698
- karteTemplate?: {
1699
- [key: string]: any;
1700
- };
1701
- /**
1702
- * アクション実行時のコンテキスト
1703
- */
1704
- context: ActionRunnerContext;
1705
- }
1706
- /**
1707
- * KARTE のシステム設定情報
1708
- *
1709
- * @public
1710
- */
1711
- type SystemConfig = {
1712
- /**
1713
- * API キー
1714
- */
1715
- apiKey?: string;
1716
- collection_endpoint?: string;
1717
- /**
1718
- * 接客ID
1719
- */
1720
- campaignId?: string;
1721
- shortenId?: string;
1722
- };
1723
- /** @internal */
1724
- type ActionHookLog = {
1725
- name: string;
1726
- values?: any;
1727
- };
1728
- /**
1729
- * アクション実行時のコンテキスト
1730
- */
1731
- type ActionRunnerContext = {
1732
- api_key: string;
1733
- // TODO: edgejsのリリース状況によっては入ってこない可能性があるためoptionalにしているが、リリース完了後にrequiredに変更する
1734
- collection_endpoint?: string;
1735
- target?: "web" | "native";
1736
- };
1737
- type ActionTableResult = number | string | boolean | Date | null | undefined;
1738
- type ActionTableQueryParam = string | number | boolean | Date;
1739
- type ActionTableQueryParams = {
1740
- [key: string]: ActionTableQueryParam | ActionTableQueryParam[];
1741
- };
1742
- /**
1743
- * アクションテーブルの設定情報
1744
- *
1745
- * @param api_key - API Key
1746
- * @param table - テーブル名
1747
- * @param endpoint - エンドポイント / 指定がない場合はデフォルトのエンドポイントを使用します。検証用途以外での通常利用では指定なしで大丈夫です。
1748
- */
1749
- type CollectionConfig = {
1750
- api_key: string;
1751
- table: string;
1752
- collection_endpoint?: string;
1753
- };
1754
- /**
1755
- * アクションテーブルを管理するメソッドを取得する
1756
- *
1757
- * @param config - アクションテーブル設定情報
1758
- *
1759
- * @returns メソッドを返します
1760
- *
1761
- * @public
1762
- */
1763
- function collection(config: CollectionConfig): {
1764
- get(key: string | Array<string>, cb: (err: Error | null, items?: ActionTableResult | Array<ActionTableResult>) => void): void;
1765
- getByQuery(query_name: string, params: ActionTableQueryParams, options: {
1766
- ignore_fields?: string[];
1767
- } | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
1768
- set(key: string, value: string, cb: (err: Error | null) => void): void;
1769
- };
1770
- /** @internal */
1771
- type VariableQuery = {
1772
- resolver: string;
1773
- name: string;
1774
- query: any;
1775
- preview_value?: any;
1776
- };
1777
- /** @internal */
1778
- type ActionTableRowRequestConfig = VariableQuery & {
1779
- resolver: "action-table-row";
1780
- query: {
1781
- table_name: string;
1782
- key: string;
1783
- default_value?: ActionTableResult;
1784
- };
1785
- preview_value?: ActionTableResult;
1786
- };
1787
- /** @internal */
1788
- type ActionTableRowsRequestConfig = VariableQuery & {
1789
- resolver: "action-table-rows";
1790
- query: {
1791
- table_name: string;
1792
- keys: Array<string>;
1793
- default_value?: Array<ActionTableResult>;
1794
- };
1795
- preview_value?: Array<ActionTableResult>;
1796
- };
1797
- /** @internal */
1798
- type ActionTableQueryRequestConfig = VariableQuery & {
1799
- resolver: "action-table-query";
1800
- query: {
1801
- table_name: string;
1802
- query_name: string;
1803
- params?: {
1804
- [key: string]: string;
1805
- };
1806
- default_value?: Array<ActionTableResult>;
1807
- };
1808
- preview_value?: Array<ActionTableResult>;
1809
- };
1810
- /** @internal */
1811
- type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
1812
- /** @internal */
1813
- const loadActionTableRow: (config: ActionTableRowRequestConfig, data: {
1814
- [key: string]: any;
1815
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
1816
- /** @internal */
1817
- const loadActionTableRows: (config: ActionTableRowsRequestConfig, data: {
1818
- [key: string]: any;
1819
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
1820
- /** @internal */
1821
- const loadActionTableQuery: (config: ActionTableQueryRequestConfig, data: {
1822
- [key: string]: any;
1823
- }, api_key: string, collection_endpoint?: string) => Promise<unknown>;
1824
- /** @internal */
1825
- const loadActionTable: (config: Array<VariableQuery>, data: {
1826
- [key: string]: any;
1827
- }, api_key: string, collection_endpoint?: string) => Promise<{
1828
- [key: string]: any;
1829
- }>;
1830
- /** @internal */
1831
- function setupActionTable(localVariablesQuery: Array<VariableQuery>, data: {
1832
- [key: string]: any;
1833
- }, apiKey: string, collection_endpoint: string): Promise<{
1834
- success: boolean;
1835
- }>;
1836
- /** @internal */
1837
- function initActionTable(localVariablesQuery: Array<VariableQuery> | undefined): void;
1838
- /**
1839
- * モーダル(ポップアップ)のプロパティ
1840
- *
1841
- * @internal
1842
- */
1843
- interface Props {
1844
- /**
1845
- * 全ての条件を満たしたら表示するかどうか
1846
- */
1847
- show_and_condition?: boolean;
1848
- /**
1849
- * スクロール率による表示を有効化するかどうか
1850
- */
1851
- show_on_scroll?: boolean;
1852
- /**
1853
- * 表示するスクロール率
1854
- */
1855
- show_on_scroll_rate?: number;
1856
- /**
1857
- * 条件を満たした時に再表示するかどうか
1858
- */
1859
- show_on_scroll_reenter?: boolean;
1860
- /**
1861
- * 時間による表示を有効化するかどうか
1862
- */
1863
- show_on_time?: boolean;
1864
- /**
1865
- * 表示する秒数
1866
- */
1867
- show_on_time_count?: number;
1868
- /**
1869
- * 全ての条件を満たしたら非表示するかどうか
1870
- */
1871
- hide_and_condition?: boolean;
1872
- /**
1873
- * スクロール率で非表示を有効化するかどうか
1874
- */
1875
- hide_on_scroll?: boolean;
1876
- /**
1877
- * 非表示にするスクロール率
1878
- */
1879
- hide_on_scroll_rate?: number;
1880
- /**
1881
- * 条件を満たした時に表示するかどうか
1882
- */
1883
- hide_on_scroll_releave?: boolean;
1884
- /**
1885
- * 時間による非表示を有効化するかどうか
1886
- */
1887
- hide_on_time?: boolean;
1888
- /**
1889
- * 非表示にする秒数
1890
- */
1891
- hide_on_time_count?: number;
1892
- }
1893
- /**
1894
- * スクロールに応じてアクションを非表示にするトリガー関数
1895
- *
1896
- * @remarks
1897
- * スクロール率が `hide_on_scroll_rate` に達したときに `hide` 関数を呼び出します。
1898
- * `show_on_scroll_reenter` が `true` で、かつ `hide_on_scroll_rate` またはその値以下の場合、アクションに対して `show` 関数が呼び出されます。
1899
- *
1900
- * @param props - アクションのプロパティ。プロパティには `hide_on_scroll`、`hide_on_scroll_rate` そして `show_on_scroll_reenter` が必要です。
1901
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1902
- * @param show - アクションを再び表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1903
- *
1904
- * @returns
1905
- * スクロールが開始された場合は、クリーンアップする関数を返します。そうでない場合は `null` を返します。
1906
- *
1907
- * @internal
1908
- */
1909
- function hideOnScroll<ModalProps extends Pick<Props, "hide_on_scroll" | "hide_on_scroll_rate" | "show_on_scroll_reenter">>(props: ModalProps, hide?: Function, show?: Function): (() => void) | null;
1910
- /**
1911
- * 時間に応じてアクションを非表示にするトリガー関数
1912
- *
1913
- * @remarks
1914
- * 時間のカウントが `hide_on_time_count` に達したときに `hide` 関数を呼び出します。
1915
- *
1916
- * @param props - アクションのプロパティ。プロパティには `hide_on_time` そして `hide_on_time_count` が必要です。
1917
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1918
- *
1919
- * @returns
1920
- * タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
1921
- *
1922
- * @internal
1923
- */
1924
- function hideOnTime<ModalProps extends Pick<Props, "hide_on_time" | "hide_on_time_count">>(props: ModalProps, hide?: Function): (() => void) | null;
1925
- /**
1926
- * スクロールに応じてアクションを表示するトリガー関数
1927
- *
1928
- * @remarks
1929
- * スクロール率が `show_on_scroll_rate` に達したときに `show` 関数を呼び出します。
1930
- * `hide_on_scroll_releave` が `true` で、かつ `show_on_scroll_rate` 以下の場合は、アクションに対して `hide` 関数が呼び出されます。
1931
- *
1932
- * @param props - アクションのプロパティ。プロパティには `show_on_scroll`、`show_on_scroll_rate`、'hide_on_scroll_releave' そして `show_on_scroll_reenter` が必要です。
1933
- * @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1934
- * @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1935
- *
1936
- * @returns
1937
- * スクロールが開始されている場合は、クリーンアップ関数を返します。そうでない場合は `null` を返します
1938
- *
1939
- * @internal
1940
- */
1941
- function showOnScroll<ModalProps extends Pick<Props, "show_on_scroll" | "show_on_scroll_rate" | "hide_on_scroll_releave" | "show_on_scroll_reenter">>(props: ModalProps, show?: Function, hide?: Function): (() => void) | null;
1942
- /**
1943
- * 時間に応じてアクションを表示するトリガー関数
1944
- *
1945
- * @param props - アクションのプロパティ。プロパティには `show_on_time` そして `show_on_time_count` が必要です。
1946
- * @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
1947
- *
1948
- * @remarks
1949
- * 時間のカウントが `show_on_time_count` に達したときに `show` 関数を呼び出します。
1950
- *
1951
- * @returns
1952
- * タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
1953
- *
1954
- * @internal
1955
- */
1956
- function showOnTime<ModalProps extends Pick<Props, "show_on_time" | "show_on_time_count">>(props: ModalProps, show?: Function): (() => void) | null;
1957
- /** @internal */
1958
- function and(fn: Function, ...conditionFns: Function[]): ReturnType<typeof checkAndDo>;
1959
- /** @internal */
1960
- function or(fn: Function, ...conditionFns: Function[]): ReturnType<typeof checkAndDo>;
1961
- function checkAndDo(checkFn: Function, fn: Function, ...conditionFns: Function[]): () => void | null;
1962
- type ModalProps = Props;
1963
- /**
1964
- * 表示アクショントリガー
1965
- *
1966
- * @internal */
1967
- type ShowTrigger = "custom" | "auto" | "none";
1968
- /**
1969
- * 閉じるアクショントリガー
1970
- *
1971
- * @public
1972
- */
1973
- type CloseTrigger = "button" | "overlay" | "auto" | "none";
1974
- /** @internal */
1975
- const handleState: (event: any) => void;
1976
- /**
1977
- * アクションが表示 (show) された後にフックする関数
1978
- *
1979
- * @param fn - 呼び出されるフック関数
1980
- *
1981
- * @public
1982
- */
1983
- function onShow<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1984
- /**
1985
- * アクションのライフサイクル close で呼び出されるフックする関数
1986
- *
1987
- * @param props - アクションのプロパティ
1988
- * @param trigger - Close トリガー
1989
- *
1990
- * @public
1991
- */
1992
- type ActionCloseHook<Props extends ModalProps, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1993
- /**
1994
- * アクションがクローズ (close) される前にフックする関数
1995
- *
1996
- * @param fn - 呼び出されるフック関数
1997
- *
1998
- * @public
1999
- */
2000
- function onClose<Props extends ModalProps, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
2001
- /**
2002
- * アクションのステートが変更された (changeState) 後にフックする関数
2003
- *
2004
- * @param fn - 呼び出されるフック関数
2005
- *
2006
- * @public
2007
- */
2008
- function onChangeState<Props extends ModalProps, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
2009
- /**
2010
- * アクションを表示する
2011
- *
2012
- * @public
2013
- */
2014
- function showAction(): void;
2015
- /**
2016
- * アクションを閉じる
2017
- *
2018
- * @param trigger - 閉じた時のトリガー。デフォルト `'none'`
2019
- *
2020
- * @public
2021
- */
2022
- function closeAction(trigger?: CloseTrigger): void;
2023
- /**
2024
- * アクションに CSS を適用する
2025
- *
2026
- * @param css - 適用する CSS
2027
- *
2028
- * @returns 適用された style 要素を返す Promise
2029
- *
2030
- * @public
2031
- */
2032
- function applyCss(css: string): Promise<HTMLStyleElement>;
2033
- /**
2034
- * アクションにグローバルなスタイルを読み込む
2035
- *
2036
- * @param href - style ファイルのリンク URL
2037
- *
2038
- * @public
2039
- */
2040
- function loadStyle(href: string): Promise<void>;
2041
- // @internal
2042
- function getCssVariables(data: {
2043
- [key: string]: string | number;
2044
- }): string;
2045
- /**
2046
- * アクションのルートの DOM 要素を取得する
2047
- *
2048
- * @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
2049
- *
2050
- * @public
2051
- */
2052
- function getActionRoot(): ShadowRoot | null;
2053
- /** @internal */
2054
- function createModal<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentTyped, options?: ActionOptions<Props, VariablesQuery & ActionVariables, VariablesQuery>): () => void;
2055
- /** @internal */
2056
- function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
2057
- // -------- The following codes are deprecated --------
2058
- /**
2059
- * 非推奨
2060
- *
2061
- * @deprecated 非推奨
2062
- *
2063
- * @internal
2064
- */
2065
- function getActionShadowRoot(): ShadowRoot | null;
2066
- /**
2067
- * 非推奨
2068
- *
2069
- * @deprecated 非推奨
2070
- *
2071
- * @internal
2072
- */
2073
- const show: typeof showAction;
2074
- /**
2075
- * 非推奨
2076
- *
2077
- * @deprecated 非推奨
2078
- *
2079
- * @internal
2080
- */
2081
- const close: typeof closeAction;
2082
- /**
2083
- * 非推奨
2084
- *
2085
- * @deprecated 非推奨
2086
- *
2087
- * @internal
2088
- */
2089
- interface App {
2090
- /**
2091
- * The method to destroy an app instance.
2092
- */
2093
- close: () => void;
2094
- /**
2095
- * The method to show an app instance.
2096
- */
2097
- show: () => void;
2098
- }
2099
- /**
2100
- * 非推奨
2101
- *
2102
- * @deprecated 非推奨
2103
- *
2104
- * @internal
2105
- */
2106
- type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, VariablesQuery, VariablesQuery>;
2107
- /**
2108
- * 非推奨
2109
- *
2110
- * @deprecated 非推奨
2111
- *
2112
- * @internal
2113
- */
2114
- type ModalOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, VariablesQuery, VariablesQuery>;
2115
- /**
2116
- * 非推奨
2117
- *
2118
- * @deprecated 非推奨
2119
- *
2120
- * @internal
2121
- */
2122
- const ensureModalRoot: typeof ensureActionRoot;
2123
- /**
2124
- * 非推奨
2125
- *
2126
- * @deprecated 非推奨
2127
- *
2128
- * @internal
2129
- */
2130
- function createApp<Props, Variables, VariablesQuery>(App: SvelteComponentTyped, options?: AppOptions<Props, VariablesQuery, VariablesQuery>): App;
2131
- /**
2132
- * 非推奨
2133
- *
2134
- * @deprecated 非推奨
2135
- *
2136
- * @internal
2137
- */
2138
- function createFog({ color, opacity, zIndex, onclick }: {
2139
- color?: string;
2140
- opacity?: string;
2141
- zIndex?: number;
2142
- onclick: () => void;
2143
- }): {
2144
- fog: HTMLElement | null;
2145
- close: () => void;
2146
- };
2147
- const newCollection: typeof collection;
2148
- type ChangeValCallbackArg = {
2149
- newVal: any;
2150
- oldVal: any;
2151
- key: string;
2152
- };
2153
- type ChangeValCallback = (arg: ChangeValCallbackArg) => void;
2154
- type EventCallback = (event: any) => void;
2155
- type WidgetEventName = "hide" | "clickBackdrop" | "destroyed";
2156
- /**
2157
- * 変数を設定する
2158
- *
2159
- * @param name - 変数名
2160
- * @param value - 変数値
2161
- *
2162
- * @public
2163
- */
2164
- function setVal(name: string, value: any): void;
2165
- /**
2166
- * 変数を取得する
2167
- *
2168
- * @param name - 変数名
2169
- *
2170
- * @returns 変数値
2171
- *
2172
- * @public
2173
- */
2174
- function getVal(name: string): any;
2175
- /**
2176
- * 変数が変更されたときに実行されるコールバック関数を設定する
2177
- *
2178
- * @param name - 変数名
2179
- * @param callback - コールバック関数
2180
- *
2181
- * @public
2182
- */
2183
- function onChangeVal(name: string, callback: ChangeValCallback): void;
2184
- /**
2185
- * WEBのイベントが発生したときに実行されるコールバック関数を設定する
2186
- *
2187
- * @param name - WEBのイベント名
2188
- * @param callback - コールバック関数
2189
- *
2190
- * @public
2191
- */
2192
- function method(name: string, callback: EventCallback): void;
2193
- /**
2194
- * Widgetのイベントが発生したときに実行されるコールバック関数を設定する
2195
- *
2196
- * @param name - Widgetのイベント名
2197
- * @param callback - コールバック関数
2198
- *
2199
- * @public
2200
- */
2201
- function on(name: WidgetEventName, callback: EventCallback): void;
2202
- /**
2203
- * 現在のステートを設定する
2204
- *
2205
- * @param stateId - ステートID
2206
- *
2207
- * @public
2208
- */
2209
- function setState(stateId: string): void;
2210
- /**
2211
- * 現在のステートを取得する
2212
- *
2213
- * @returns ステートID
2214
- *
2215
- * @public
2216
- */
2217
- function getState(): string;
2218
- /**
2219
- * ページ内の変数を設定する
2220
- *
2221
- * @param key - 変数のキー
2222
- * @param value - 変数値
2223
- *
2224
- * @public
2225
- */
2226
- function setMemoryStore(key: string, value: any): void;
2227
- /**
2228
- * ページ内の変数を取定する
2229
- *
2230
- * @param key - 変数のキー
2231
- *
2232
- * @returns 変数
2233
- *
2234
- * @public
2235
- */
2236
- function getMemoryStore(key: string): any;
2237
- /**
2238
- * ページをまたぐ変数を設定する
2239
- *
2240
- * @param key - 変数のキー
2241
- * @param value - 変数値
2242
- *
2243
- * @public
2244
- */
2245
- function setLocalStore(key: string, value: any, options?: {
2246
- expire: number | boolean;
2247
- }): void;
2248
- /**
2249
- * ページをまたぐ変数を取得設定する
2250
- *
2251
- * @param key - 変数のキー
2252
- *
2253
- * @returns 変数
2254
- *
2255
- * @public
2256
- */
2257
- function getLocalStore(key: string): any | undefined;
2258
- const storage: {
2259
- memory: {
2260
- store: typeof setMemoryStore;
2261
- restore: typeof getMemoryStore;
2262
- };
2263
- local: {
2264
- store: typeof setLocalStore;
2265
- restore: typeof getLocalStore;
2266
- };
2267
- };
2268
- /**
2269
- * アクションテーブルを操作するオブジェクト
2270
- *
2271
- * @param table - アクションテーブル名
2272
- *
2273
- * @public
2274
- */
2275
- function collection$0(table: string): ReturnType<typeof newCollection>;
2276
- /**
2277
- * アクションを表示する
2278
- *
2279
- * @remarks
2280
- * この関数は {@link showAction} のエイリアスです
2281
- *
2282
- * @public
2283
- */
2284
- export { showAction as show, closeAction as hide };
2285
- }
2286
- /**
2287
- * エレメントをマウントしたときに実行される関数の登録
2288
- *
2289
- * @param fn - マウントしたときに実行される関数
2290
- */
2291
- declare const onMount: typeof onMountSvelte;
2292
- /**
2293
- * エレメントを破棄したときに実行される関数の登録
2294
- *
2295
- * @param fn - マウントしたときに実行される関数
2296
- */
2297
- declare const onDestory: typeof onDestorySvelte;
2298
- /**
2299
- * エレメントを更新する前に実行される関数の登録
2300
- *
2301
- * @param fn - マウントしたときに実行される関数
2302
- */
2303
- declare const beforeUpdate: typeof beforeUpdateSvelte;
2304
- /**
2305
- * エレメントを更新した後に実行される関数の登録
2306
- *
2307
- * @param fn - マウントしたときに実行される関数
2308
- */
2309
- declare const afterUpdate: typeof afterUpdateSvelte;
2310
- /**
2311
- * エレメントのライフサイクルを進める
2312
- *
2313
- * @returns Promise<void>
2314
- */
2315
- declare const tick: typeof tickSvelte;
2316
- // @internal
2317
- declare const LAYOUT_COMPONENT_NAMES: string[];
2318
- type PropStyles<Props extends Record<string, any>, K extends keyof Props> = Record<NonNullable<Props[K]>, Props | Properties>;
2319
- declare const ROUND_VARIANT: {
2320
- readonly extra_small: "XSmall (2px)";
2321
- readonly small: "Small (4px)";
2322
- readonly medium: "Medium (8px)";
2323
- readonly large: "Large (16px)";
2324
- readonly extra_large: "Large (24px)";
2325
- readonly fulled: "Full (100%)";
2326
- };
2327
- declare const BUTTON_SIZE: {
2328
- readonly extra_small: "\u30A8\u30AF\u30B9\u30C8\u30E9 \u30B9\u30E2\u30FC\u30EB";
2329
- readonly small: "\u30B9\u30E2\u30FC\u30EB";
2330
- readonly medium: "\u30DF\u30C7\u30A3\u30A2\u30E0";
2331
- readonly large: "\u30E9\u30FC\u30B8";
2332
- readonly extra_large: "\u30A8\u30AF\u30B9\u30C8\u30E9 \u30E9\u30FC\u30B8";
2333
- };
2334
- declare const BUTTON_THEME: {
2335
- readonly default: "\u30CE\u30FC\u30DE\u30EB / \u30D6\u30E9\u30F3\u30C9";
2336
- readonly general: "\u30CE\u30FC\u30DE\u30EB / \u30B8\u30A7\u30CD\u30E9\u30EB";
2337
- readonly danger: "\u30CE\u30FC\u30DE\u30EB / \u30A2\u30E9\u30FC\u30C8";
2338
- readonly white: "\u30CE\u30FC\u30DE\u30EB / \u30DB\u30EF\u30A4\u30C8";
2339
- readonly default_outline: "\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3 / \u30D6\u30E9\u30F3\u30C9";
2340
- readonly general_outline: "\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3 / \u30B8\u30A7\u30CD\u30E9\u30EB";
2341
- readonly danger_outline: "\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3 / \u30A2\u30E9\u30FC\u30C8";
2342
- readonly default_text: "\u30C6\u30AD\u30B9\u30C8 / \u30D6\u30E9\u30F3\u30C9";
2343
- readonly general_text: "\u30C6\u30AD\u30B9\u30C8 / \u30B8\u30A7\u30CD\u30E9\u30EB";
2344
- readonly danger_text: "\u30C6\u30AD\u30B9\u30C8 / \u30A2\u30E9\u30FC\u30C8";
2345
- };
2346
- declare const BUTTON_VARIANT: {
2347
- readonly normal: "\u30CE\u30FC\u30DE\u30EB";
2348
- readonly outline: "\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3";
2349
- readonly text: "\u30C6\u30AD\u30B9\u30C8";
2350
- };
2351
- declare const BUTTON_ROUND: {
2352
- readonly default: "\u30C7\u30D5\u30A9\u30EB\u30C8";
2353
- readonly none: "\u306A\u3057";
2354
- readonly fulled: "\u5186\u5F62";
2355
- };
2356
- declare const BUTTON_LINK_TARGET: {
2357
- readonly _self: "\u753B\u9762\u5185\u9077\u79FB";
2358
- readonly _blank: "\u5225\u30BF\u30D6\u3067\u958B\u304F";
2359
- };
2360
- declare const BUTTON_ICON_ANGLE: {
2361
- readonly row: "\u5DE6\u5074";
2362
- readonly "row-reverse": "\u53F3\u5074";
2363
- };
2364
- type ButtonProps = CommonProps & ClickableProps & ShadowProps & LinkProps & WithIconProps & RadiusProps & BorderProps & {
2365
- label?: string;
2366
- // size
2367
- size?: keyof typeof BUTTON_SIZE | string;
2368
- height?: Properties["height"];
2369
- paddingLeft?: Properties["paddingLeft"];
2370
- paddingRight?: Properties["paddingRight"];
2371
- fontSize?: Properties["fontSize"];
2372
- // theme
2373
- theme?: keyof typeof BUTTON_THEME | string;
2374
- variant?: keyof typeof BUTTON_VARIANT | string;
2375
- color?: Properties["color"];
2376
- backgroundColor?: Properties["backgroundColor"];
2377
- borderColor?: Properties["borderColor"];
2378
- // others
2379
- fontWeight?: Properties["fontWeight"];
2380
- round?: keyof typeof BUTTON_ROUND;
2381
- width?: Properties["width"];
2382
- wrap?: "wrap" | "nowrap";
2383
- };
2384
- declare const buttonPropsDefault: ButtonProps;
2385
- type BrandKit = {
2386
- font_family: string;
2387
- color_text_primary: string;
2388
- color_text_secondary: string;
2389
- color_brand: string;
2390
- color_link: string;
2391
- color_danger: string;
2392
- color_success: string;
2393
- color_info: string;
2394
- color_warning: string;
2395
- color_white: string;
2396
- };
2397
- declare const getBrandKit: (customBrandKit?: Partial<BrandKit>) => BrandKit;
2398
- declare const useBrandKit: () => {
2399
- brandKit: BrandKit;
2400
- };
2401
- type VariantStyles<Props extends object = object> = Props & {
2402
- hover?: Props;
2403
- active?: Props;
2404
- };
2405
- type VariantDefinition<Props extends object = object, Meta extends object = object> = {
2406
- name: string;
2407
- description?: string;
2408
- getProps: (brandKit?: BrandKit) => VariantStyles<Props>;
2409
- meta?: Meta;
2410
- };
2411
- type VariantDefinitionGroup<Props extends object = object, Meta extends object = object> = Record<string, VariantDefinition<Props, Meta>>;
2412
- type ToVariantArrayReturn<T> = T[keyof T] & {
2413
- code: keyof T;
2414
- };
2415
- declare const toVariantArray: <T extends VariantDefinitionGroup>(group: T) => ToVariantArrayReturn<T>[];
2416
- // ================================
2417
- // Aspect
2418
- // ================================
2419
- declare const ASPECT_VARIANT: VariantDefinitionGroup<Omit<AspectProps, "aspectVariant">>;
2420
- type AspectVariantCode = keyof typeof ASPECT_VARIANT;
2421
- declare const ASPECT_VARIANTS: ReturnType<typeof toVariantArray>;
2422
- // ================================
2423
- // FontFamily
2424
- // ================================
2425
- type FontVariantMeta = {
2426
- lang: "ja" | "en";
2427
- type: "kaku" | "maru" | "min";
2428
- };
2429
- declare const FONT_FAMILY_VARIANT: VariantDefinitionGroup<Omit<FontFamilyProps, "fontFamilyVariant">, FontVariantMeta>;
2430
- type FontFamilyVariantCode = keyof typeof FONT_FAMILY_VARIANT;
2431
- declare const FONT_FAMILY_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<FontFamilyProps, "fontFamilyVariant">, FontVariantMeta>>[];
2432
- type FontFamilyVariantGroup = {
2433
- label: string;
2434
- variants: ReturnType<typeof toVariantArray>;
2435
- };
2436
- declare const FONT_FAMILY_VARIANT_GROUPS: FontFamilyVariantGroup[];
2437
- // ================================
2438
- // Shadow
2439
- // ================================
2440
- declare const SHADOW_VARIANT: VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">>;
2441
- type ShadowVariantCode = keyof typeof SHADOW_VARIANT;
2442
- declare const SHADOW_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">, object>>[];
2443
- type PositionPlaceProps = {
2444
- top?: Properties["top"];
2445
- left?: Properties["left"];
2446
- right?: Properties["right"];
2447
- bottom?: Properties["bottom"];
2448
- transform?: Properties["transform"];
2449
- };
2450
- type PositionProps = PositionPlaceProps & {
2451
- position?: Properties["position"];
2452
- };
2453
- type MetaProps = {
2454
- displayName?: string;
2455
- };
2456
- type CustomizeCssProps = {
2457
- isCustomizeCss?: boolean;
2458
- customizeCss?: string;
2459
- };
2460
- type BrandStyleProps = {
2461
- customBrandKit?: Partial<BrandKit>;
2462
- };
2463
- type ActionTableProps = {
2464
- actionTableKey?: string;
2465
- };
2466
- type CommonProps = MetaProps & PositionProps & CustomizeCssProps & BrandStyleProps;
2467
- type ClickableProps = {
2468
- onClick?: OnClickOperation;
2469
- eventName?: string;
2470
- eventValue?: object;
2471
- element?: string;
2472
- };
2473
- type OverflowProps = {
2474
- overflow?: Properties["overflow"];
2475
- };
2476
- type BorderProps = {
2477
- borderTopWidth?: Properties["borderTopWidth"];
2478
- borderLeftWidth?: Properties["borderLeftWidth"];
2479
- borderRightWidth?: Properties["borderRightWidth"];
2480
- borderBottomWidth?: Properties["borderBottomWidth"];
2481
- borderColor?: Properties["borderColor"];
2482
- };
2483
- type PaddingProps = {
2484
- paddingTop?: Properties["paddingTop"];
2485
- paddingLeft?: Properties["paddingLeft"];
2486
- paddingBottom?: Properties["paddingBottom"];
2487
- paddingRight?: Properties["paddingRight"];
2488
- };
2489
- type RadiusProps = {
2490
- borderTopLeftRadius?: Properties["borderTopLeftRadius"];
2491
- borderTopRightRadius?: Properties["borderTopRightRadius"];
2492
- borderBottomLeftRadius?: Properties["borderBottomLeftRadius"];
2493
- borderBottomRightRadius?: Properties["borderBottomRightRadius"];
2494
- };
2495
- type BackgroundColorProps = {
2496
- backgroundColor?: Properties["backgroundColor"];
2497
- };
2498
- type BackgroundImageProps = {
2499
- backgroundImageUrl?: string;
2500
- };
2501
- type ShadowProps = {
2502
- shadow?: Properties["boxShadow"];
2503
- shadowVariant?: ShadowVariantCode;
2504
- };
2505
- type WithIconProps = {
2506
- isIcon?: boolean;
2507
- iconVariant?: string;
2508
- iconColor?: Properties["color"];
2509
- iconAngle?: keyof typeof BUTTON_ICON_ANGLE;
2510
- };
2511
- type LinkProps = {
2512
- isLink?: boolean;
2513
- linkUrl?: string;
2514
- linkTarget?: keyof typeof BUTTON_LINK_TARGET;
2515
- };
2516
- type AspectProps = {
2517
- aspectVariant?: AspectVariantCode | string;
2518
- aspect?: Properties["aspectRatio"];
2519
- };
2520
- type FontFamilyProps = {
2521
- fontFamilyVariant?: FontFamilyVariantCode;
2522
- fontFamily?: Properties["fontFamily"];
2523
- };
2524
- declare const AVATAR_SIZE: {
2525
- readonly extra_small: "XS\uFF0848 x 48\uFF09";
2526
- readonly small: "S\uFF0864 x 64\uFF09";
2527
- readonly medium: "M\uFF0888 x 88\uFF09";
2528
- readonly large: "L\uFF08108 x 108\uFF09";
2529
- readonly extra_large: "XL\uFF08128 x 128\uFF09";
2530
- };
2531
- declare const AVATAR_SHAPE: {
2532
- readonly circle: "\u30B5\u30FC\u30AF\u30EB";
2533
- readonly square: "\u30B9\u30AF\u30A8\u30A2";
2534
- readonly rounded: "\u30E9\u30A6\u30F3\u30C9";
2535
- };
2536
- type AvatarProps = CommonProps & ClickableProps & BorderProps & {
2537
- // size
2538
- size?: keyof typeof AVATAR_SIZE | number;
2539
- width?: Properties["width"];
2540
- height?: Properties["height"];
2541
- shape?: keyof typeof AVATAR_SHAPE;
2542
- image?: string;
2543
- caption?: string;
2544
- alt?: string;
2545
- };
2546
- declare const avatarPropsDefault: AvatarProps;
2547
- declare const AVATAR_SIZE_STYLES: PropStyles<AvatarProps, "size">;
2548
- type BrandableStyles<T extends object = object> = Record<string, Partial<T & Properties>>;
2549
- declare const getButtonThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<ButtonProps>;
2550
- declare const BUTTON_SIZE_STYLES: PropStyles<ButtonProps, "size">;
2551
- declare const BUTTON_ROUND_STYLES: PropStyles<ButtonProps, "round">;
2552
- declare const BUTTON_WRAP_STYLES: PropStyles<ButtonProps, "wrap">;
2553
- type ButtonOutlinedProps = CommonProps & ClickableProps & ShadowProps & WithIconProps & LinkProps & BorderProps & {
2554
- label?: string;
2555
- // size
2556
- size?: keyof typeof BUTTON_SIZE;
2557
- height?: Properties["height"];
2558
- paddingLeft?: Properties["paddingLeft"];
2559
- paddingRight?: Properties["paddingRight"];
2560
- fontSize?: Properties["fontSize"];
2561
- // theme
2562
- theme?: keyof typeof BUTTON_THEME;
2563
- color?: Properties["color"];
2564
- backgroundColor?: Properties["backgroundColor"];
2565
- borderColor?: Properties["backgroundColor"];
2566
- // others
2567
- width?: Properties["width"];
2568
- round?: keyof typeof BUTTON_ROUND;
2569
- fontWeight?: Properties["fontWeight"];
2570
- wrap?: "wrap" | "nowrap";
2571
- };
2572
- declare const buttonOutlinedPropsDefault: ButtonOutlinedProps;
2573
- declare const BUTTON_OUTLINED_SIZE_STYLES: PropStyles<ButtonOutlinedProps, "size">;
2574
- declare const getButtonOutlinedThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<ButtonOutlinedProps>;
2575
- declare const BUTTON_OUTLINED_ROUND_STYLES: PropStyles<ButtonOutlinedProps, "round">;
2576
- declare const BUTTON_OUTLINED_WRAP_STYLES: PropStyles<ButtonOutlinedProps, "wrap">;
2577
- declare const BUTTON_TEXT_SIZE: {
2578
- readonly small: "Small";
2579
- readonly medium: "Medium";
2580
- readonly large: "Large";
2581
- };
2582
- declare const BUTTON_TEXT_THEME: {
2583
- readonly default: "Default";
2584
- readonly link: "Link";
2585
- readonly general: "General";
2586
- readonly success: "Success";
2587
- readonly warning: "Warning";
2588
- readonly danger: "Danger";
2589
- readonly info: "Info";
2590
- readonly white: "White";
2591
- };
2592
- type ButtonTextProps = CommonProps & ClickableProps & LinkProps & WithIconProps & {
2593
- label?: string;
2594
- // size
2595
- size?: keyof typeof BUTTON_TEXT_SIZE;
2596
- height?: Properties["height"];
2597
- paddingLeft?: Properties["paddingLeft"];
2598
- paddingRight?: Properties["paddingRight"];
2599
- fontSize?: Properties["fontSize"];
2600
- // theme
2601
- theme?: keyof typeof BUTTON_TEXT_THEME;
2602
- color?: Properties["color"];
2603
- backgroundColor?: Properties["backgroundColor"];
2604
- // others
2605
- fontWeight?: Properties["fontWeight"];
2606
- width?: Properties["width"];
2607
- round?: keyof typeof BUTTON_ROUND;
2608
- wrap?: "wrap" | "nowrap";
2609
- };
2610
- declare const BUTTON_TEXT_SIZE_STYLES: PropStyles<ButtonTextProps, "size">;
2611
- declare const getButtonTextThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<ButtonTextProps>;
2612
- declare const CLOSE_BUTTON_PLACEMENT: {
2613
- readonly topRight: "topRight";
2614
- readonly topLeft: "topLeft";
2615
- readonly bottomRight: "bottomRight";
2616
- readonly bottomLeft: "bottomLeft";
2617
- };
2618
- declare const CLOSE_BUTTON_ROUND: {
2619
- readonly default: "\u30C7\u30D5\u30A9\u30EB\u30C8";
2620
- readonly none: "\u306A\u3057";
2621
- readonly fulled: "\u5186\u5F62";
2622
- };
2623
- declare const CLOSE_BUTTON_LABEL_PLACEMENT: {
2624
- readonly right: "right";
2625
- readonly left: "left";
2626
- };
2627
- type CloseButtonProps = CommonProps & ClickableProps & BorderProps & {
2628
- size?: number;
2629
- placement?: keyof typeof CLOSE_BUTTON_PLACEMENT;
2630
- round?: keyof typeof CLOSE_BUTTON_ROUND;
2631
- bordered?: boolean;
2632
- color?: Properties["color"];
2633
- backgroundColor?: Properties["backgroundColor"];
2634
- label?: string;
2635
- labelColor?: Properties["color"];
2636
- labelPlacement?: keyof typeof CLOSE_BUTTON_LABEL_PLACEMENT;
2637
- top?: Properties["top"];
2638
- right?: Properties["right"];
2639
- left?: Properties["left"];
2640
- bottom?: Properties["bottom"];
2641
- };
2642
- declare const ICON_SIZE: {
2643
- [key: string]: {
2644
- label: string;
2645
- value: string;
2646
- };
2647
- };
2648
- declare const ICON_VARIANTS: {
2649
- [key: string]: any;
2650
- };
2651
- type IconProps = CommonProps & ClickableProps & {
2652
- variant: string;
2653
- size?: keyof typeof ICON_SIZE;
2654
- color?: Properties$0["color"];
2655
- width?: Properties$0["width"];
2656
- height?: Properties$0["height"];
2657
- };
2658
- declare const ICON_SIZE_STYLES: PropStyles<IconProps, "size">;
2659
- declare const IMAGE_ROUND_SHAPE: {
2660
- readonly circle: "\u30E9\u30A6\u30F3\u30C9 / \u30DF\u30C7\u30A3\u30A2\u30E0";
2661
- readonly rounded: "\u30E9\u30A6\u30F3\u30C9 / \u30B9\u30E2\u30FC\u30EB";
2662
- readonly square: "\u30B9\u30AF\u30A8\u30A2";
2663
- };
2664
- declare const IMAGE_ASPECT_VARIANTS: {
2665
- "1/1": string;
2666
- "2/1": string;
2667
- "3/2": string;
2668
- "4/3": string;
2669
- "16/9": string;
2670
- "16/5": string;
2671
- "1/2": string;
2672
- "2/3": string;
2673
- "3/4": string;
2674
- "9/16": string;
2675
- };
2676
- type ImageProps = CommonProps & ClickableProps & AspectProps & RadiusProps & BorderProps & {
2677
- image?: string;
2678
- width?: Properties["width"];
2679
- height?: Properties["height"];
2680
- alt?: string;
2681
- shape?: keyof typeof IMAGE_ROUND_SHAPE;
2682
- };
2683
- declare const IMAGE_ROUND_STYLES: PropStyles<ImageProps, "shape">;
2684
- declare const LAYOUT_DISPLAY_TYPE: readonly [
2685
- "inline-flex",
2686
- "flex",
2687
- "block"
2688
- ];
2689
- type LayoutDisplayType = (typeof LAYOUT_DISPLAY_TYPE)[number];
2690
- declare const LAYOUT_DIRECTION: readonly [
2691
- "column",
2692
- "column-reverse",
2693
- "row",
2694
- "row-reverse"
2695
- ];
2696
- type LayoutFlexDirection = (typeof LAYOUT_DIRECTION)[number];
2697
- declare const LAYOUT_ALIGN: readonly [
2698
- "flex-start",
2699
- "center",
2700
- "flex-end",
2701
- "stretch"
2702
- ];
2703
- type LayoutFlexAlign = (typeof LAYOUT_ALIGN)[number];
2704
- declare const LAYOUT_JUSTIFY: readonly [
2705
- "flex-start",
2706
- "center",
2707
- "flex-end",
2708
- "space-between"
2709
- ];
2710
- type LayoutFlexJustify = (typeof LAYOUT_JUSTIFY)[number];
2711
- type LayerLayoutProps = CommonProps & ClickableProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & BackgroundColorProps & BackgroundImageProps & PaddingProps & {
2712
- display?: LayoutDisplayType;
2713
- direction?: LayoutFlexDirection;
2714
- align?: LayoutFlexAlign;
2715
- justify?: LayoutFlexJustify;
2716
- gap?: Properties["gap"];
2717
- rowGap?: Properties["rowGap"];
2718
- columnGap?: Properties["columnGap"];
2719
- width?: Properties["width"];
2720
- };
2721
- type SliderProps = CommonProps & {
2722
- gap: number;
2723
- itemWidthPercentage: number;
2724
- auto?: boolean;
2725
- loop?: boolean;
2726
- hideIndicator?: boolean;
2727
- interval?: number;
2728
- };
2729
- type SliderItemProps = CommonProps & ClickableProps;
2730
- declare const LAYER_TEXT_SIZE: {
2731
- readonly small: "\u672C\u6587 / \u30B9\u30E2\u30FC\u30EB";
2732
- readonly medium: "\u672C\u6587 / \u30DF\u30C7\u30A3\u30A2\u30E0";
2733
- readonly large: "\u672C\u6587 / \u30E9\u30FC\u30B8";
2734
- readonly heading_extra_small: "\u898B\u51FA\u3057 / \u30B9\u30E2\u30FC\u30EB";
2735
- readonly heading_small: "\u898B\u51FA\u3057 / \u30DF\u30C7\u30A3\u30A2\u30E0";
2736
- readonly heading_medium: "\u898B\u51FA\u3057 / \u30E9\u30FC\u30B8";
2737
- readonly heading_large: "\u898B\u51FA\u3057 / \u30A8\u30AF\u30B9\u30C8\u30E9\u30E9\u30FC\u30B8";
2738
- };
2739
- declare const TEXT_THEME: {
2740
- readonly default: "\u30C7\u30D5\u30A9\u30EB\u30C8";
2741
- readonly gray: "\u30B0\u30EC\u30FC";
2742
- readonly brand: "\u30D6\u30E9\u30F3\u30C9";
2743
- readonly success: "\u30B5\u30AF\u30BB\u30B9";
2744
- readonly warning: "\u30EF\u30FC\u30CB\u30F3\u30B0";
2745
- readonly danger: "\u30A2\u30E9\u30FC\u30C8";
2746
- readonly info: "\u30A4\u30F3\u30D5\u30A9";
2747
- readonly white: "\u30DB\u30EF\u30A4\u30C8";
2748
- };
2749
- declare const TEXT_STYLE: {
2750
- readonly normal: "normal";
2751
- readonly italic: "italic";
2752
- };
2753
- type LayerTextProps = CommonProps & BorderProps & RadiusProps & BackgroundColorProps & WithIconProps & LinkProps & ClickableProps & CustomizeCssProps & FontFamilyProps & PaddingProps & {
2754
- content: string;
2755
- theme?: keyof typeof TEXT_THEME;
2756
- size?: keyof typeof LAYER_TEXT_SIZE;
2757
- align?: Properties["textAlign"];
2758
- fontStyle?: Properties["fontStyle"];
2759
- fontSize?: Properties["fontSize"];
2760
- fontWeight?: Properties["fontWeight"];
2761
- lineHeight?: number;
2762
- color?: Properties["color"];
2763
- width?: Properties["width"];
2764
- };
2765
- type TextThemeProps = {
2766
- color: string;
2767
- };
2768
- declare const getTextThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<TextThemeProps>;
2769
- declare const TEXT_VARIANTS: {
2770
- size: Record<NonNullable<LayerTextProps["size"]>, any>;
2771
- };
2772
- declare const TEXT_LINK_SIZE: {
2773
- readonly small: "Small";
2774
- readonly medium: "Medium";
2775
- readonly large: "Large";
2776
- };
2777
- declare const TEXT_LINK_THEME: {
2778
- readonly default: "\u30C7\u30D5\u30A9\u30EB\u30C8";
2779
- readonly link: "Link";
2780
- readonly brand: "Brand";
2781
- readonly alert: "Danger";
2782
- readonly gray: "Gray";
2783
- readonly white: "White";
2784
- };
2785
- declare const TEXT_LINK_UNDERLINE: {
2786
- readonly hover_on: "\u30DB\u30D0\u30FC\u3067\u8868\u793A";
2787
- readonly hover_off: "\u30DB\u30D0\u30FC\u3067\u975E\u8868\u793A";
2788
- readonly on: "\u5E38\u306B\u8868\u793A";
2789
- readonly off: "\u5E38\u306B\u975E\u8868\u793A";
2790
- };
2791
- type TextLinkProps = CommonProps & ClickableProps & LinkProps & FontFamilyProps & WithIconProps & {
2792
- label: string;
2793
- // size
2794
- size?: keyof typeof TEXT_LINK_SIZE;
2795
- lineHeight?: number;
2796
- fontSize?: Properties["fontSize"];
2797
- // theme
2798
- theme?: keyof typeof TEXT_LINK_THEME;
2799
- color?: Properties["color"];
2800
- // others
2801
- underline?: keyof typeof TEXT_LINK_UNDERLINE;
2802
- fontWeight?: Properties["fontWeight"];
2803
- };
2804
- declare const TEXT_LINK_SIZE_STYLES: PropStyles<TextLinkProps, "size">;
2805
- declare const getTextLinkThemeStyles: (customBrandKit?: Partial<BrandKit>) => BrandableStyles<TextLinkProps>;
2806
- type FrameModalProps = CommonProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & BackgroundColorProps & BackgroundImageProps & {
2807
- width?: Properties["width"];
2808
- };
2809
- type ListProps = CommonProps & ActionTableProps & {
2810
- gap?: Properties["gap"];
2811
- borderWidth?: Properties["borderTopWidth"];
2812
- borderStyle?: Properties["borderTopStyle"];
2813
- borderColor?: Properties["borderTopColor"];
2814
- width?: Properties["width"];
2815
- itemPaddingTop?: Properties["paddingTop"];
2816
- itemPaddingLeft?: Properties["paddingLeft"];
2817
- itemPaddingRight?: Properties["paddingRight"];
2818
- itemPaddingBottom?: Properties["paddingBottom"];
2819
- itemHeight?: Properties["height"];
2820
- itemGap?: Properties["gap"];
2821
- };
2822
- type ListItemProps = CommonProps & ClickableProps & {
2823
- gap?: number;
2824
- };
2825
- declare const LIST_ITEM_CONTEXT_KEY = "ListItemContext";
2826
- type ListItemContext = {
2827
- paddingTop?: Properties["paddingTop"];
2828
- paddingLeft?: Properties["paddingLeft"];
2829
- paddingRight?: Properties["paddingRight"];
2830
- paddingBottom?: Properties["paddingBottom"];
2831
- height?: Properties["paddingTop"];
2832
- borderTopWidth?: Properties["borderTopWidth"];
2833
- borderTopStyle?: Properties["borderTopStyle"];
2834
- borderTopColor?: Properties["borderTopColor"];
2835
- gap?: Properties["gap"];
2836
- };
2837
- type MultiColumnProps = CommonProps & {
2838
- gap?: Properties["columnGap"];
2839
- borderWidth?: Properties["borderTopWidth"];
2840
- borderStyle?: Properties["borderTopStyle"];
2841
- borderColor?: Properties["borderTopColor"];
2842
- width?: Properties["width"];
2843
- itemPaddingTop?: Properties["paddingTop"];
2844
- itemPaddingLeft?: Properties["paddingLeft"];
2845
- itemPaddingRight?: Properties["paddingRight"];
2846
- itemPaddingBottom?: Properties["paddingBottom"];
2847
- itemHeight?: Properties["height"];
2848
- itemGap?: Properties["gap"];
2849
- };
2850
- type MultiColumnItemProps = CommonProps & ClickableProps & {
2851
- gap?: number;
2852
- };
2853
- declare const MULTI_COLUMN_ITEM_CONTEXT_KEY = "MultiColumnItemContext";
2854
- type MultiColumnItemContext = {
2855
- paddingTop?: Properties["paddingTop"];
2856
- paddingLeft?: Properties["paddingLeft"];
2857
- paddingRight?: Properties["paddingRight"];
2858
- paddingBottom?: Properties["paddingBottom"];
2859
- height?: Properties["paddingTop"];
2860
- borderLeftWidth?: Properties["borderTopWidth"];
2861
- borderLeftStyle?: Properties["borderTopStyle"];
2862
- borderLeftColor?: Properties["borderTopColor"];
2863
- gap?: Properties["gap"];
2864
- innerGap?: Properties["gap"];
2865
- };
2866
- type YoutubeProps = CommonProps & BorderProps & {
2867
- videoId?: string;
2868
- loop?: boolean;
2869
- autoplay?: boolean;
2870
- mute?: boolean;
2871
- controls?: boolean;
2872
- showInfo?: boolean;
2873
- showSubtitle?: boolean;
2874
- showFullScreen?: boolean;
2875
- showRelatedMovies?: boolean;
2876
- // styles
2877
- shape?: keyof typeof IMAGE_ROUND_SHAPE;
2878
- width?: Properties["width"];
2879
- };
2880
- type CountDownProps = CommonProps & {
2881
- timeLimit?: string;
2882
- onEnd?: OnClickOperation;
2883
- };
2884
- type CountDownValueType = "day" | "hour" | "minute" | "second";
2885
- type CountDownValueProps = LayerTextProps & {
2886
- type: CountDownValueType;
2887
- };
2888
- type CountDownValues = {
2889
- day: string;
2890
- hour: string;
2891
- min: string;
2892
- sec: string;
2893
- };
2894
- type ClipboardProps = CommonProps & {
2895
- content?: string;
2896
- copiedEventName?: string;
2897
- noneTooltip?: boolean;
2898
- };
2899
- type CodeProps = CommonProps & {
2900
- rawHtml?: string;
2901
- rawCss?: string;
2902
- rawScript?: string;
2903
- };
2904
- declare const ROUND_STYLES: Record<keyof typeof ROUND_VARIANT, Pick<Properties, "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius">>;
2905
- type FlexComponentSchemaPropType = "string" | "url" | "number" | "boolean" | "color" | "date_string";
2906
- type FlexComponentSchemaProp<Props extends Record<string, any>, Key extends keyof Props> = {
2907
- key: Key;
2908
- type: FlexComponentSchemaPropType;
2909
- suggestions: Props[Key][];
2910
- default?: Props[Key];
2911
- priority?: number;
2912
- };
2913
- type FlexComponentSchema<Props extends Record<string, any> = object> = {
2914
- props: FlexComponentSchemaProp<Props, keyof Props>[];
2915
- };
2916
- declare const createProp: <Props extends Record<string, any>, K extends keyof Props>(key: K, type: FlexComponentSchemaPropType, suggestions?: Props[K][], priority?: number, defaultValue?: Props[K]) => FlexComponentSchemaProp<Props, K>;
2917
- declare const flexComponentSchemes: {
2918
- readonly FlexAvatar: FlexComponentSchema<AvatarProps>;
2919
- readonly FlexButton: FlexComponentSchema<ButtonProps>;
2920
- readonly FlexClipCopy: FlexComponentSchema<ClipboardProps>;
2921
- readonly FlexCloseButton: FlexComponentSchema<CloseButtonProps>;
2922
- readonly FlexCountDown: FlexComponentSchema<CountDownProps>;
2923
- readonly FlexIcon: FlexComponentSchema<IconProps>;
2924
- readonly FlexImage: FlexComponentSchema<ImageProps>;
2925
- readonly FlexLayout: FlexComponentSchema<LayerLayoutProps>;
2926
- readonly FlexList: FlexComponentSchema<ListProps>;
2927
- readonly FlexListItem: FlexComponentSchema<ListItemProps>;
2928
- readonly FlexText: FlexComponentSchema<LayerTextProps>;
2929
- };
2930
- export { ACTION_HOOK_LABEL, KARTE_MODAL_ROOT, create, destroyAction, onCreate, onDestroy, showModal, destroy, initialize, finalize, loadGlobalScript, loadGlobalStyle, applyGlobalCss, getState, setState, getStates, isOpened, getVariables, setVariables, resetVariables, getEventHandlers, setEventHandlers, resetEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, 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, DefaultElasticity, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, RegExpProp, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, SYSTEM_FONT, Fonts, Font, 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, Icon, 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, FormButtonColor, DefaultFormButtonColor, ModalStyle, ModalBreakPoint, DefaultModalBreakPoint, FormIdentifyTextFields, FormIdentifyTextField, FormIdentifyTextFieldValidations, FormIdentifyTextFieldPlaceholders, DefaultFormIdentifyTextField, FormIdentifyBooleanFields, FormIdentifyBooleanField, DefaultFormIdentifyBooleanField, showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers, widget, onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES, PropStyles, ROUND_VARIANT, PositionProps, MetaProps, CustomizeCssProps, BrandStyleProps, ActionTableProps, CommonProps, ClickableProps, OverflowProps, BorderProps, PaddingProps, RadiusProps, BackgroundColorProps, BackgroundImageProps, ShadowProps, WithIconProps, LinkProps, AspectProps, FontFamilyProps, AVATAR_SIZE, AVATAR_SHAPE, AvatarProps, avatarPropsDefault, AVATAR_SIZE_STYLES, BUTTON_SIZE, BUTTON_THEME, BUTTON_VARIANT, BUTTON_ROUND, BUTTON_LINK_TARGET, BUTTON_ICON_ANGLE, ButtonProps, buttonPropsDefault, getButtonThemeStyles, BUTTON_SIZE_STYLES, BUTTON_ROUND_STYLES, BUTTON_WRAP_STYLES, ButtonOutlinedProps, buttonOutlinedPropsDefault, BUTTON_OUTLINED_SIZE_STYLES, getButtonOutlinedThemeStyles, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_THEME, ButtonTextProps, BUTTON_TEXT_SIZE_STYLES, getButtonTextThemeStyles, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, CLOSE_BUTTON_LABEL_PLACEMENT, CloseButtonProps, ICON_SIZE, ICON_VARIANTS, IconProps, ICON_SIZE_STYLES, IMAGE_ROUND_SHAPE, IMAGE_ASPECT_VARIANTS, ImageProps, IMAGE_ROUND_STYLES, LAYOUT_DISPLAY_TYPE, LayoutDisplayType, LAYOUT_DIRECTION, LayoutFlexDirection, LAYOUT_ALIGN, LayoutFlexAlign, LAYOUT_JUSTIFY, LayoutFlexJustify, LayerLayoutProps, SliderProps, SliderItemProps, LAYER_TEXT_SIZE, TEXT_THEME, TEXT_STYLE, LayerTextProps, getTextThemeStyles, TEXT_VARIANTS, TEXT_LINK_SIZE, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TextLinkProps, TEXT_LINK_SIZE_STYLES, getTextLinkThemeStyles, FrameModalProps, ListProps, ListItemProps, LIST_ITEM_CONTEXT_KEY, ListItemContext, MultiColumnProps, MultiColumnItemProps, MULTI_COLUMN_ITEM_CONTEXT_KEY, MultiColumnItemContext, YoutubeProps, CountDownProps, CountDownValueType, CountDownValueProps, CountDownValues, ClipboardProps, CodeProps, BrandKit, getBrandKit, useBrandKit, ROUND_STYLES, VariantStyles, VariantDefinition, VariantDefinitionGroup, ASPECT_VARIANT, AspectVariantCode, ASPECT_VARIANTS, FontVariantMeta, FONT_FAMILY_VARIANT, FontFamilyVariantCode, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, SHADOW_VARIANT, ShadowVariantCode, SHADOW_VARIANTS, createProp, flexComponentSchemes };
2931
- export type { SystemConfig, ActionVariables, ActionEventHandler, ActionProps, ActionOptions, ActionHook, ActionHookLog, ActionChangeStateHook, SendFunction, PublishFunction, OnScrollContext, OnScrollFunction, ScrollDirection, LogLevel, Log, Event, ActionCloseHook, ShowTrigger, CloseTrigger, CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequestConfig, ActionTableQueryRequestConfig, ActionTableRequestConfig };
2932
- export { default as State } from './components/State.svelte';
2933
- export { default as StateItem } from './components/StateItem.svelte';
2934
- export { default as Modal } from './components/Modal.svelte';
2935
- export { default as Grid } from './components/Grid.svelte';
2936
- export { default as GridItem } from './components/GridItem.svelte';
2937
- export { default as TextElement } from './components/TextElement.svelte';
2938
- export { default as TextButtonElement } from './components/TextButtonElement.svelte';
2939
- export { default as ImageElement } from './components/ImageElement.svelte';
2940
- export { default as List } from './components/List.svelte';
2941
- export { default as ListItem } from './components/ListItem.svelte';
2942
- export { default as EmbedElement } from './components/EmbedElement.svelte';
2943
- export { default as MovieYouTubeElement } from './components/MovieYouTubeElement.svelte';
2944
- export { default as MovieVimeoElement } from './components/MovieVimeoElement.svelte';
2945
- export { default as FormTextarea } from './components/FormTextarea.svelte';
2946
- export { default as FormRadioButtons } from './components/FormRadioButtons.svelte';
2947
- export { default as FormSelect } from './components/FormSelect.svelte';
2948
- export { default as FormCheckBoxes } from './components/FormCheckBoxes.svelte';
2949
- export { default as FormRatingButtonsNumber } from './components/FormRatingButtonsNumber.svelte';
2950
- export { default as FormRatingButtonsFace } from './components/FormRatingButtonsFace.svelte';
2951
- export { default as FormIdentifyInput } from './components/FormIdentifyInput.svelte';
2952
- export { default as FormIdentifyChoices } from './components/FormIdentifyChoices.svelte';
2953
- export { default as Slide } from './components/Slide.svelte';
2954
- export { default as SlideItem } from './components/SlideItem.svelte';
2955
- export { default as Countdown } from './components/Countdown.svelte';
2956
- export { default as Box } from './components/Box.svelte';
2957
- export { default as IconElement } from './components/IconElement.svelte';
2958
- export { default as CodeElement } from './components/CodeElement.svelte';
2959
- export { default as Flex } from './components/Flex.svelte';
2960
- export { default as FlexItem } from './components/FlexItem.svelte';
2961
- export { default as GridModalState } from './components/GridModalState.svelte';
2962
- export { default as TextBlock } from './components/TextBlock.svelte';
2963
- export { default as TextButtonBlock } from './components/TextButtonBlock.svelte';
2964
- export { default as ImageBlock } from './components/ImageBlock.svelte';
2965
- export { default as FlexAvatar } from './components-flex/avatar/Avatar.svelte';
2966
- export { default as FlexButton } from './components-flex/button/Button.svelte';
2967
- export { default as FlexButtonOutlined } from './components-flex/button-outlined/ButtonOutlined.svelte';
2968
- export { default as FlexButtonText } from './components-flex/button-text/ButtonText.svelte';
2969
- export { default as FlexCloseButton } from './components-flex/close-button/CloseButton.svelte';
2970
- export { default as FlexIcon } from './components-flex/icon/Icon.svelte';
2971
- export { default as FlexImage } from './components-flex/image/Image.svelte';
2972
- export { default as FlexLayout } from './components-flex/layout/Layout.svelte';
2973
- export { default as FlexSlider } from './components-flex/slider/Slider.svelte';
2974
- export { default as FlexSliderItem } from './components-flex/slider/SliderItem.svelte';
2975
- export { default as FlexText } from './components-flex/text/Text.svelte';
2976
- export { default as FlexRichText } from './components-flex/rich-text/RichText.svelte';
2977
- export { default as FlexTextLink } from './components-flex/text-link/TextLink.svelte';
2978
- export { default as FlexModal } from './components-flex/modal/Modal.svelte';
2979
- export { default as FlexCode } from './components-flex/code/Code.svelte';
2980
- export { default as FlexList } from './components-flex/list/List.svelte';
2981
- export { default as FlexListItem } from './components-flex/list/ListItem.svelte';
2982
- export { default as FlexMultiColumn } from './components-flex/multi-column/MultiColumn.svelte';
2983
- export { default as FlexMultiColumnItem } from './components-flex/multi-column/MultiColumnItem.svelte';
2984
- export { default as FlexYoutube } from './components-flex/youtube/Youtube.svelte';
2985
- export { default as FlexCountDown } from './components-flex/count-down/CountDown.svelte';
2986
- export { default as FlexCountDownValue } from './components-flex/count-down/CountDownValue.svelte';
2987
- export { default as FlexClipCopy } from './components-flex/clip-copy/ClipCopy.svelte';
2988
- export { default as ThumbnailPreview } from './components-flex/ThumbnailPreview.svelte';