@plaidev/karte-action-sdk 1.1.227 → 1.1.229-28646430.813d5148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hydrate/index.es.d.ts +7 -0
- package/dist/hydrate/index.es.js +3282 -356
- package/dist/index.es.d.ts +7 -0
- package/dist/index.es.js +2853 -359
- package/dist/templates.cjs.js +6 -0
- package/dist/templates.js +6 -0
- package/package.json +1 -1
- package/dist/karte-action-sdk.d.ts +0 -2671
- package/dist/tsdoc-metadata.json +0 -11
- package/meta/karte-action-sdk.api.json +0 -6318
@@ -1,2671 +0,0 @@
|
|
1
|
-
import { afterUpdate as afterUpdate_2 } from 'svelte';
|
2
|
-
import { beforeUpdate as beforeUpdate_2 } from 'svelte';
|
3
|
-
import { default as Box } from './components/Box.svelte';
|
4
|
-
import { default as CodeElement } from './components/CodeElement.svelte';
|
5
|
-
import { default as Countdown } from './components/Countdown.svelte';
|
6
|
-
import { default as EmbedElement } from './components/EmbedElement.svelte';
|
7
|
-
import { default as Flex } from './components/Flex.svelte';
|
8
|
-
import { default as FlexItem } from './components/FlexItem.svelte';
|
9
|
-
import { default as FormCheckBoxes } from './components/FormCheckBoxes.svelte';
|
10
|
-
import { default as FormIdentifyChoices } from './components/FormIdentifyChoices.svelte';
|
11
|
-
import { default as FormIdentifyInput } from './components/FormIdentifyInput.svelte';
|
12
|
-
import { default as FormRadioButtons } from './components/FormRadioButtons.svelte';
|
13
|
-
import { default as FormRatingButtonsFace } from './components/FormRatingButtonsFace.svelte';
|
14
|
-
import { default as FormRatingButtonsNumber } from './components/FormRatingButtonsNumber.svelte';
|
15
|
-
import { default as FormSelect } from './components/FormSelect.svelte';
|
16
|
-
import { default as FormTextarea } from './components/FormTextarea.svelte';
|
17
|
-
import { default as Grid } from './components/Grid.svelte';
|
18
|
-
import { default as GridItem } from './components/GridItem.svelte';
|
19
|
-
import { default as GridModalState } from './components/GridModalState.svelte';
|
20
|
-
import { default as IconElement } from './components/IconElement.svelte';
|
21
|
-
import { default as ImageBlock } from './components/ImageBlock.svelte';
|
22
|
-
import { default as ImageElement } from './components/ImageElement.svelte';
|
23
|
-
import { default as List } from './components/List.svelte';
|
24
|
-
import { default as ListItem } from './components/ListItem.svelte';
|
25
|
-
import { default as Modal } from './components/Modal.svelte';
|
26
|
-
import { default as MovieVimeoElement } from './components/MovieVimeoElement.svelte';
|
27
|
-
import { default as MovieYouTubeElement } from './components/MovieYouTubeElement.svelte';
|
28
|
-
import { onDestroy as onDestroy_2 } from 'svelte';
|
29
|
-
import { onMount as onMount_2 } from 'svelte';
|
30
|
-
import { default as Slide } from './components/Slide.svelte';
|
31
|
-
import { default as SlideItem } from './components/SlideItem.svelte';
|
32
|
-
import { default as State } from './components/State.svelte';
|
33
|
-
import { default as StateItem } from './components/StateItem.svelte';
|
34
|
-
import { SvelteComponentDev } from 'svelte/internal';
|
35
|
-
import { default as TextBlock } from './components/TextBlock.svelte';
|
36
|
-
import { default as TextButtonBlock } from './components/TextButtonBlock.svelte';
|
37
|
-
import { default as TextButtonElement } from './components/TextButtonElement.svelte';
|
38
|
-
import { default as TextElement } from './components/TextElement.svelte';
|
39
|
-
import { tick as tick_2 } from 'svelte';
|
40
|
-
import { Writable } from 'svelte/store';
|
41
|
-
|
42
|
-
/** @internal */
|
43
|
-
export declare const ACTION_HOOK_LABEL = "__ACTION_HOOK__";
|
44
|
-
|
45
|
-
/**
|
46
|
-
* アクションのライフサイクル changeState で呼び出されるフック関数
|
47
|
-
*
|
48
|
-
* @param props - アクションのプロパティ
|
49
|
-
* @param newState - アクションの新しいステート
|
50
|
-
*
|
51
|
-
* @public
|
52
|
-
*/
|
53
|
-
export declare type ActionChangeStateHook<Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
|
54
|
-
|
55
|
-
/**
|
56
|
-
* アクションのライフサイクル close で呼び出されるフックする関数
|
57
|
-
*
|
58
|
-
* @param props - アクションのプロパティ
|
59
|
-
* @param trigger - Close トリガー
|
60
|
-
*
|
61
|
-
* @public
|
62
|
-
*/
|
63
|
-
export declare type ActionCloseHook<Props extends ModalProps$1, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
|
64
|
-
|
65
|
-
/**
|
66
|
-
* アクションの汎用的なタイプを定義する
|
67
|
-
*
|
68
|
-
* モーダル(ポップアップ)やアクションテーブルなど機能別のタイプは含めない。
|
69
|
-
*/
|
70
|
-
/**
|
71
|
-
* アクションのイベントハンドラ
|
72
|
-
*
|
73
|
-
* @public
|
74
|
-
*/
|
75
|
-
export declare type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
76
|
-
|
77
|
-
/**
|
78
|
-
* アクションのライフサイクルで呼び出されるフック
|
79
|
-
*
|
80
|
-
* @param props - アクションのプロパティ
|
81
|
-
*
|
82
|
-
* @public
|
83
|
-
*/
|
84
|
-
export declare type ActionHook<Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
|
85
|
-
|
86
|
-
/** @internal */
|
87
|
-
export declare type ActionHookLog = {
|
88
|
-
name: string;
|
89
|
-
values?: any;
|
90
|
-
};
|
91
|
-
|
92
|
-
/**
|
93
|
-
* {@link create} 向けのオプション
|
94
|
-
*
|
95
|
-
* @public
|
96
|
-
*/
|
97
|
-
export declare interface ActionOptions<Props, Variables, VariablesQuery> {
|
98
|
-
/**
|
99
|
-
* アクション内でイベントを発火する関数
|
100
|
-
*
|
101
|
-
* @defaultValue `() => {}`
|
102
|
-
*/
|
103
|
-
send?: SendFunction;
|
104
|
-
/**
|
105
|
-
* アクション内でタグのQueueにリクエストを発行する関数
|
106
|
-
*
|
107
|
-
* @defaultValue `() => {}`
|
108
|
-
*/
|
109
|
-
publish?: PublishFunction;
|
110
|
-
/**
|
111
|
-
* アクションで使用されるプロパティ
|
112
|
-
*
|
113
|
-
* @defaultValue `{}`
|
114
|
-
*/
|
115
|
-
props?: Props;
|
116
|
-
/**
|
117
|
-
* アクションで使用される解析時に取得される変数
|
118
|
-
*
|
119
|
-
* @defaultValue `{}`
|
120
|
-
*/
|
121
|
-
variables?: Variables;
|
122
|
-
/**
|
123
|
-
* アクションで使用されるアクション実行時に取得される変数
|
124
|
-
*
|
125
|
-
* @defaultValue `[]`
|
126
|
-
*/
|
127
|
-
localVariablesQuery?: VariablesQuery;
|
128
|
-
/**
|
129
|
-
* アクションが作成されているときにフックされる {@link onCreate}
|
130
|
-
*
|
131
|
-
* @defaultValue `() => {}`
|
132
|
-
*/
|
133
|
-
onCreate?: ActionHook<Props, Variables & ActionVariables>;
|
134
|
-
/**
|
135
|
-
* KARTEテンプレートの情報
|
136
|
-
*
|
137
|
-
* @defaultValue `{}`
|
138
|
-
*/
|
139
|
-
karteTemplate?: {
|
140
|
-
[key: string]: any;
|
141
|
-
};
|
142
|
-
/**
|
143
|
-
* アクション実行時のコンテキスト
|
144
|
-
*/
|
145
|
-
context: ActionRunnerContext;
|
146
|
-
}
|
147
|
-
|
148
|
-
/**
|
149
|
-
* アクションのプロパティ
|
150
|
-
*
|
151
|
-
* @public
|
152
|
-
*/
|
153
|
-
export declare interface ActionProps<Props, Variables> {
|
154
|
-
/**
|
155
|
-
* アクションでイベントがトリガーされたときに受信するための関数
|
156
|
-
*/
|
157
|
-
send: SendFunction;
|
158
|
-
/**
|
159
|
-
* アクション内でタグのQueueにリクエストを発行する関数
|
160
|
-
*/
|
161
|
-
publish: PublishFunction;
|
162
|
-
/**
|
163
|
-
* アクションで使用されるデータ
|
164
|
-
*/
|
165
|
-
data: Props & Variables & ActionVariables;
|
166
|
-
/**
|
167
|
-
* アクションが表示されたときにフックされる {@link onShow}
|
168
|
-
*/
|
169
|
-
onShow?: ActionHook<Props, Variables & ActionVariables>;
|
170
|
-
/**
|
171
|
-
* アクションのステートが変更されたときにフックされる {@link onChangeState}
|
172
|
-
*/
|
173
|
-
onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
|
174
|
-
}
|
175
|
-
|
176
|
-
/**
|
177
|
-
* アクション実行時のコンテキスト
|
178
|
-
*/
|
179
|
-
declare type ActionRunnerContext = {
|
180
|
-
api_key: string;
|
181
|
-
target?: "web" | "native";
|
182
|
-
};
|
183
|
-
|
184
|
-
/**
|
185
|
-
* アクション設定
|
186
|
-
*
|
187
|
-
* @public
|
188
|
-
*/
|
189
|
-
declare type ActionSetting = {
|
190
|
-
send?: SendFunction;
|
191
|
-
publish?: PublishFunction;
|
192
|
-
initialState?: string;
|
193
|
-
};
|
194
|
-
|
195
|
-
declare type ActionTableQueryParam = string | number | boolean | Date;
|
196
|
-
|
197
|
-
declare type ActionTableQueryParams = {
|
198
|
-
[key: string]: ActionTableQueryParam | ActionTableQueryParam[];
|
199
|
-
};
|
200
|
-
|
201
|
-
/** @internal */
|
202
|
-
export declare type ActionTableQueryRequestConfig = VariableQuery & {
|
203
|
-
resolver: "action-table-query";
|
204
|
-
query: {
|
205
|
-
table_name: string;
|
206
|
-
query_name: string;
|
207
|
-
params?: {
|
208
|
-
[key: string]: string;
|
209
|
-
};
|
210
|
-
default_value?: Array<ActionTableResult>;
|
211
|
-
};
|
212
|
-
preview_value?: Array<ActionTableResult>;
|
213
|
-
};
|
214
|
-
|
215
|
-
/** @internal */
|
216
|
-
export declare type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
217
|
-
|
218
|
-
declare type ActionTableResult = number | string | boolean | Date | null | undefined;
|
219
|
-
|
220
|
-
/** @internal */
|
221
|
-
export declare type ActionTableRowRequestConfig = VariableQuery & {
|
222
|
-
resolver: "action-table-row";
|
223
|
-
query: {
|
224
|
-
table_name: string;
|
225
|
-
key: string;
|
226
|
-
default_value?: ActionTableResult;
|
227
|
-
};
|
228
|
-
preview_value?: ActionTableResult;
|
229
|
-
};
|
230
|
-
|
231
|
-
/** @internal */
|
232
|
-
export declare type ActionTableRowsRequestConfig = VariableQuery & {
|
233
|
-
resolver: "action-table-rows";
|
234
|
-
query: {
|
235
|
-
table_name: string;
|
236
|
-
keys: Array<string>;
|
237
|
-
default_value?: Array<ActionTableResult>;
|
238
|
-
};
|
239
|
-
preview_value?: Array<ActionTableResult>;
|
240
|
-
};
|
241
|
-
|
242
|
-
/**
|
243
|
-
* アクションの変数
|
244
|
-
*
|
245
|
-
* @public
|
246
|
-
*/
|
247
|
-
export declare type ActionVariables = {
|
248
|
-
[key: string]: any;
|
249
|
-
};
|
250
|
-
|
251
|
-
/**
|
252
|
-
* 選択式のアンケート回答を追加する
|
253
|
-
*
|
254
|
-
* @param questionId - 質問ID
|
255
|
-
* @param choices - 回答内容
|
256
|
-
*
|
257
|
-
* @public
|
258
|
-
*/
|
259
|
-
export declare function addChoiceAnswer(questionId: string, choices: string[], validation?: {
|
260
|
-
isValid: boolean;
|
261
|
-
statePath: string;
|
262
|
-
}): void;
|
263
|
-
|
264
|
-
/**
|
265
|
-
* 自由記述式のアンケート回答を追加する
|
266
|
-
*
|
267
|
-
* @param questionId - 質問ID
|
268
|
-
* @param freeAnswer - 回答内容
|
269
|
-
*
|
270
|
-
* @public
|
271
|
-
*/
|
272
|
-
export declare function addFreeAnswer(questionId: string, freeAnswer: string, validation?: {
|
273
|
-
isValid: boolean;
|
274
|
-
statePath: string;
|
275
|
-
}): void;
|
276
|
-
|
277
|
-
/**
|
278
|
-
* エレメントを更新した後に実行される関数の登録
|
279
|
-
*
|
280
|
-
* @param fn - マウントしたときに実行される関数
|
281
|
-
*/
|
282
|
-
export declare const afterUpdate: typeof afterUpdate_2;
|
283
|
-
|
284
|
-
/** @internal */
|
285
|
-
export declare type Alignment = (typeof Alignments)[number];
|
286
|
-
|
287
|
-
/** @internal */
|
288
|
-
export declare const Alignments: readonly [
|
289
|
-
"flex-start",
|
290
|
-
"center",
|
291
|
-
"flex-end"
|
292
|
-
];
|
293
|
-
|
294
|
-
/** @internal */
|
295
|
-
export declare type AnimationStyle = (typeof AnimationStyles)[number];
|
296
|
-
|
297
|
-
/** @internal */
|
298
|
-
export declare const AnimationStyles: readonly [
|
299
|
-
"none",
|
300
|
-
"fade",
|
301
|
-
"bounce",
|
302
|
-
"slide-down",
|
303
|
-
"slide-up",
|
304
|
-
"slide-left",
|
305
|
-
"slide-right"
|
306
|
-
];
|
307
|
-
|
308
|
-
declare type AnswerValue = {
|
309
|
-
choices: string[];
|
310
|
-
} | {
|
311
|
-
free_answer: string;
|
312
|
-
};
|
313
|
-
|
314
|
-
/**
|
315
|
-
* 非推奨
|
316
|
-
*
|
317
|
-
* @deprecated 非推奨
|
318
|
-
*
|
319
|
-
* @internal
|
320
|
-
*/
|
321
|
-
declare interface App {
|
322
|
-
/**
|
323
|
-
* The method to destroy an app instance.
|
324
|
-
*/
|
325
|
-
close: () => void;
|
326
|
-
/**
|
327
|
-
* The method to show an app instance.
|
328
|
-
*/
|
329
|
-
show: () => void;
|
330
|
-
}
|
331
|
-
|
332
|
-
/**
|
333
|
-
* アクションに CSS を適用する
|
334
|
-
*
|
335
|
-
* @param css - 適用する CSS
|
336
|
-
*
|
337
|
-
* @returns 適用された style 要素を返す Promise
|
338
|
-
*
|
339
|
-
* @public
|
340
|
-
*/
|
341
|
-
export declare function applyCss(css: string): Promise<HTMLStyleElement>;
|
342
|
-
|
343
|
-
/**
|
344
|
-
* グローバル CSS をページに適用する
|
345
|
-
*
|
346
|
-
* @param css - CSS
|
347
|
-
*
|
348
|
-
* @public
|
349
|
-
*/
|
350
|
-
export declare function applyGlobalCss(css: string): Promise<any>;
|
351
|
-
|
352
|
-
/**
|
353
|
-
* 非推奨
|
354
|
-
*
|
355
|
-
* @deprecated 非推奨
|
356
|
-
*
|
357
|
-
* @internal
|
358
|
-
*/
|
359
|
-
declare type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
|
360
|
-
|
361
|
-
/** @internal */
|
362
|
-
export declare type BackgroundSize = (typeof BackgroundSizes)[number];
|
363
|
-
|
364
|
-
/** @internal */
|
365
|
-
export declare const BackgroundSizes: readonly [
|
366
|
-
"auto",
|
367
|
-
"cover",
|
368
|
-
"contain"
|
369
|
-
];
|
370
|
-
|
371
|
-
declare interface BaseListBackground {
|
372
|
-
type: ListBackgroundType;
|
373
|
-
}
|
374
|
-
|
375
|
-
declare interface BaseListSeparator {
|
376
|
-
type: ListSeparatorType;
|
377
|
-
}
|
378
|
-
|
379
|
-
declare type BaseOperationOptions = ReadonlyArray<{
|
380
|
-
operation: string;
|
381
|
-
args: ReadonlyArray<{
|
382
|
-
name: string;
|
383
|
-
type: OperationArgumentType;
|
384
|
-
default: any;
|
385
|
-
}>;
|
386
|
-
}>;
|
387
|
-
|
388
|
-
declare type BaseSlideButton = {
|
389
|
-
type: SlideButtonType;
|
390
|
-
};
|
391
|
-
|
392
|
-
/**
|
393
|
-
* エレメントを更新する前に実行される関数の登録
|
394
|
-
*
|
395
|
-
* @param fn - マウントしたときに実行される関数
|
396
|
-
*/
|
397
|
-
export declare const beforeUpdate: typeof beforeUpdate_2;
|
398
|
-
|
399
|
-
/** @internal */
|
400
|
-
export declare type Border = string;
|
401
|
-
|
402
|
-
/** @internal */
|
403
|
-
export declare type BorderStyle = string;
|
404
|
-
|
405
|
-
/** @internal */
|
406
|
-
export declare type BorderWidth = `${number}px`;
|
407
|
-
|
408
|
-
export { Box }
|
409
|
-
|
410
|
-
/** @internal */
|
411
|
-
export declare type BoxShadow = string;
|
412
|
-
|
413
|
-
/** @internal */
|
414
|
-
export declare type ClipPath = (typeof ClipPaths)[number];
|
415
|
-
|
416
|
-
/** @internal */
|
417
|
-
export declare const ClipPaths: readonly [
|
418
|
-
"none",
|
419
|
-
"circle(closest-side)"
|
420
|
-
];
|
421
|
-
|
422
|
-
/**
|
423
|
-
* 非推奨
|
424
|
-
*
|
425
|
-
* @deprecated 非推奨
|
426
|
-
*
|
427
|
-
* @internal
|
428
|
-
*/
|
429
|
-
declare const close_2: typeof closeAction;
|
430
|
-
export { close_2 as close }
|
431
|
-
|
432
|
-
/**
|
433
|
-
* アクションを閉じる
|
434
|
-
*
|
435
|
-
* @param trigger - 閉じた時のトリガー。デフォルト `'none'`
|
436
|
-
*
|
437
|
-
* @public
|
438
|
-
*/
|
439
|
-
export declare function closeAction(trigger?: CloseTrigger): void;
|
440
|
-
|
441
|
-
/**
|
442
|
-
* 閉じるアクショントリガー
|
443
|
-
*
|
444
|
-
* @public
|
445
|
-
*/
|
446
|
-
export declare type CloseTrigger = "button" | "overlay" | "auto" | "none";
|
447
|
-
|
448
|
-
/** @internal */
|
449
|
-
export declare type Code = string;
|
450
|
-
|
451
|
-
export { CodeElement }
|
452
|
-
|
453
|
-
/**
|
454
|
-
* @typedef {Object} CollectionReturnFunctions@typedef {Object} CollectionReturnFunctions
|
455
|
-
* @property {function(key, cb: (err, items) => void): void} get - キーを1つ、または複数指定して、対応するアクションテーブルの行を取得する。
|
456
|
-
* @property {function(queryName, params, options, cb: (err, items) => void): void} getByQuery - クエリーを指定して、アクションテーブルから行を取得する。なお、クエリーは事前に管理画面で設定しておく必要があります。
|
457
|
-
*/
|
458
|
-
/**
|
459
|
-
* アクションテーブルを管理するメソッドを取得する
|
460
|
-
*
|
461
|
-
* @param config - アクションテーブル設定情報
|
462
|
-
*
|
463
|
-
* @returns {CollectionReturnFunctions} アクションテーブル行を取得するメソッド
|
464
|
-
*
|
465
|
-
* @public
|
466
|
-
*/
|
467
|
-
export declare function collection(config: CollectionConfig): {
|
468
|
-
get(key: string | Array<string>, cb: (err: Error | null, items?: ActionTableResult | Array<ActionTableResult>) => void): void;
|
469
|
-
getByQuery(query_name: string, params: ActionTableQueryParams, options: {
|
470
|
-
ignore_fields?: string[];
|
471
|
-
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
472
|
-
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
473
|
-
};
|
474
|
-
|
475
|
-
/**
|
476
|
-
* アクションテーブルの設定情報
|
477
|
-
*
|
478
|
-
* @param api_key - API Key
|
479
|
-
* @param table - テーブル名
|
480
|
-
* @param endpoint - エンドポイント / 指定がない場合はデフォルトのエンドポイントを使用します。検証用途以外での通常利用では指定なしで大丈夫です。
|
481
|
-
*/
|
482
|
-
export declare type CollectionConfig = {
|
483
|
-
api_key: string;
|
484
|
-
table: string;
|
485
|
-
endpoint?: string;
|
486
|
-
};
|
487
|
-
|
488
|
-
/** @internal */
|
489
|
-
export declare type Color = `#${string}` | `rgba(${string})`;
|
490
|
-
|
491
|
-
declare type ConvertOperationOption<Option extends BaseOperationOptions[number]> = Option extends any ? {
|
492
|
-
operation: Option["operation"];
|
493
|
-
args: ConvertOperationOptionArguments<Option["args"]>;
|
494
|
-
} : never;
|
495
|
-
|
496
|
-
declare type ConvertOperationOptionArguments<Arguments extends BaseOperationOptions[number]["args"]> = {
|
497
|
-
-readonly [Index in keyof Arguments]: Arguments[Index] extends BaseOperationOptions[number]["args"][number] ? OperationArgumentTypes[Arguments[Index]["type"]] : never;
|
498
|
-
};
|
499
|
-
|
500
|
-
declare type ConvertOperationOptions<O extends BaseOperationOptions> = ConvertOperationOption<O[number]>;
|
501
|
-
|
502
|
-
export { Countdown }
|
503
|
-
|
504
|
-
/**
|
505
|
-
* アクションを作成する
|
506
|
-
*
|
507
|
-
* @param App - Svelte コンポーネントのエントリポイント
|
508
|
-
* @param options - {@link ActionOptions | オプション}
|
509
|
-
*
|
510
|
-
* @returns アクションを破棄する関数
|
511
|
-
*
|
512
|
-
* @public
|
513
|
-
*/
|
514
|
-
export declare function create<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
515
|
-
|
516
|
-
/**
|
517
|
-
* 非推奨
|
518
|
-
*
|
519
|
-
* @deprecated 非推奨
|
520
|
-
*
|
521
|
-
* @internal
|
522
|
-
*/
|
523
|
-
export declare function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables, VariablesQuery>): App;
|
524
|
-
|
525
|
-
/**
|
526
|
-
* 非推奨
|
527
|
-
*
|
528
|
-
* @deprecated 非推奨
|
529
|
-
*
|
530
|
-
* @internal
|
531
|
-
*/
|
532
|
-
export declare function createFog({ color, opacity, zIndex, onclick }: {
|
533
|
-
color?: string;
|
534
|
-
opacity?: string;
|
535
|
-
zIndex?: number;
|
536
|
-
onclick: () => void;
|
537
|
-
}): {
|
538
|
-
fog: HTMLDivElement;
|
539
|
-
close: () => void;
|
540
|
-
};
|
541
|
-
|
542
|
-
/** @internal */
|
543
|
-
export declare type Cursor = (typeof Cursors)[number];
|
544
|
-
|
545
|
-
/** @internal */
|
546
|
-
export declare const Cursors: readonly [
|
547
|
-
"default",
|
548
|
-
"pointer"
|
549
|
-
];
|
550
|
-
|
551
|
-
/** @internal */
|
552
|
-
export declare type DateTime = string;
|
553
|
-
|
554
|
-
/** @internal */
|
555
|
-
export declare const DefaultEdgePosition: EdgePosition;
|
556
|
-
|
557
|
-
/** @internal */
|
558
|
-
export declare const DefaultElasticity: Elasticity;
|
559
|
-
|
560
|
-
/** @internal */
|
561
|
-
export declare const DefaultFormButtonColor: {
|
562
|
-
readonly main: "#2aab9f";
|
563
|
-
readonly sub: "#fff";
|
564
|
-
};
|
565
|
-
|
566
|
-
/** @internal */
|
567
|
-
export declare const DefaultFormIdentifyBooleanField: FormIdentifyBooleanField;
|
568
|
-
|
569
|
-
/** @internal */
|
570
|
-
export declare const DefaultFormIdentifyTextField: FormIdentifyTextField;
|
571
|
-
|
572
|
-
/** @internal */
|
573
|
-
export declare const DefaultListBackground: Required<ListBackgroundNone>;
|
574
|
-
|
575
|
-
/** @internal */
|
576
|
-
export declare const DefaultListBackgroundNone: Required<ListBackgroundNone>;
|
577
|
-
|
578
|
-
/** @internal */
|
579
|
-
export declare const DefaultListBackgroundStripe: Required<ListBackgroundStripe>;
|
580
|
-
|
581
|
-
/** @internal */
|
582
|
-
export declare const DefaultListSeparator: Required<ListSeparatorBorder>;
|
583
|
-
|
584
|
-
/** @internal */
|
585
|
-
export declare const DefaultListSeparatorBorder: Required<ListSeparatorBorder>;
|
586
|
-
|
587
|
-
/** @internal */
|
588
|
-
export declare const DefaultListSeparatorGap: Required<ListSeparatorGap>;
|
589
|
-
|
590
|
-
/** @internal */
|
591
|
-
export declare const DefaultListSeparatorNone: Required<ListSeparatorNone>;
|
592
|
-
|
593
|
-
/** @internal */
|
594
|
-
export declare const DefaultModalBreakPoint: ModalBreakPoint;
|
595
|
-
|
596
|
-
/** @internal */
|
597
|
-
export declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
|
598
|
-
|
599
|
-
/** @internal */
|
600
|
-
export declare const DefaultSlideButton: {
|
601
|
-
readonly type: "icon";
|
602
|
-
readonly icon: "chevron-left";
|
603
|
-
readonly color: "#999";
|
604
|
-
readonly fill: "#999";
|
605
|
-
readonly size: "20px";
|
606
|
-
};
|
607
|
-
|
608
|
-
/** @internal */
|
609
|
-
export declare const DefaultSlideNavigationButton: {
|
610
|
-
readonly type: "circle";
|
611
|
-
readonly size: "8px";
|
612
|
-
readonly color: "#ddd";
|
613
|
-
readonly colorActive: "#666";
|
614
|
-
};
|
615
|
-
|
616
|
-
/**
|
617
|
-
* 非推奨
|
618
|
-
*
|
619
|
-
* @deprecated 非推奨
|
620
|
-
*
|
621
|
-
* @internal
|
622
|
-
*/
|
623
|
-
export declare function destroy(): void;
|
624
|
-
|
625
|
-
/**
|
626
|
-
* アクションの破棄する
|
627
|
-
*
|
628
|
-
* @public
|
629
|
-
*/
|
630
|
-
export declare function destroyAction(): void;
|
631
|
-
|
632
|
-
/** @internal */
|
633
|
-
export declare type Direction = (typeof Directions)[number];
|
634
|
-
|
635
|
-
/** @internal */
|
636
|
-
export declare const Directions: readonly [
|
637
|
-
"row",
|
638
|
-
"column"
|
639
|
-
];
|
640
|
-
|
641
|
-
/** @internal */
|
642
|
-
export declare interface EdgePosition {
|
643
|
-
edgeDistance: Length;
|
644
|
-
edgeDirectionOffset: Length;
|
645
|
-
}
|
646
|
-
|
647
|
-
/** @internal */
|
648
|
-
export declare const Elasticities: readonly [
|
649
|
-
"none",
|
650
|
-
"vertical",
|
651
|
-
"horizontal"
|
652
|
-
];
|
653
|
-
|
654
|
-
/** @internal */
|
655
|
-
export declare type Elasticity = (typeof Elasticities)[number];
|
656
|
-
|
657
|
-
/** @internal */
|
658
|
-
export declare const ElasticityStyle: {
|
659
|
-
none: string;
|
660
|
-
vertical: string;
|
661
|
-
horizontal: string;
|
662
|
-
};
|
663
|
-
|
664
|
-
export { EmbedElement }
|
665
|
-
|
666
|
-
/** @internal */
|
667
|
-
declare function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
|
668
|
-
|
669
|
-
/**
|
670
|
-
* 非推奨
|
671
|
-
*
|
672
|
-
* @deprecated 非推奨
|
673
|
-
*
|
674
|
-
* @internal
|
675
|
-
*/
|
676
|
-
export declare const ensureModalRoot: typeof ensureActionRoot;
|
677
|
-
|
678
|
-
/** @internal */
|
679
|
-
declare type Event_2 = {
|
680
|
-
name: string;
|
681
|
-
values?: any;
|
682
|
-
date?: Date;
|
683
|
-
};
|
684
|
-
export { Event_2 as Event }
|
685
|
-
|
686
|
-
/**
|
687
|
-
* Store to handle event handlers
|
688
|
-
*
|
689
|
-
* This is used internally.
|
690
|
-
*
|
691
|
-
* @internal
|
692
|
-
*/
|
693
|
-
export declare const eventHandlers: Store<{
|
694
|
-
[key: string]: ActionEventHandler;
|
695
|
-
}>;
|
696
|
-
|
697
|
-
/** @internal */
|
698
|
-
export declare const finalize: () => void;
|
699
|
-
|
700
|
-
export { Flex }
|
701
|
-
|
702
|
-
/** @internal */
|
703
|
-
export declare type FlexDirection = (typeof FlexDirections)[number];
|
704
|
-
|
705
|
-
/** @internal */
|
706
|
-
export declare const FlexDirections: readonly [
|
707
|
-
"row",
|
708
|
-
"column"
|
709
|
-
];
|
710
|
-
|
711
|
-
export { FlexItem }
|
712
|
-
|
713
|
-
export declare type Font = (typeof Fonts)[number];
|
714
|
-
|
715
|
-
/** @internal */
|
716
|
-
export declare const Fonts: readonly [
|
717
|
-
"sans-serif, serif, monospace, system-ui",
|
718
|
-
"Noto Sans JP",
|
719
|
-
"M PLUS Rounded 1c",
|
720
|
-
"M PLUS 1p",
|
721
|
-
"Kosugi Maru",
|
722
|
-
"Kosugi",
|
723
|
-
"BIZ UDPGothic",
|
724
|
-
"Noto Serif JP",
|
725
|
-
"BIZ UDPMincho",
|
726
|
-
"Roboto",
|
727
|
-
"Open Sans",
|
728
|
-
"Montserrat",
|
729
|
-
"Lato",
|
730
|
-
"Poppins",
|
731
|
-
"Raleway",
|
732
|
-
"Nunito",
|
733
|
-
"Playfair Display",
|
734
|
-
"Merriweather",
|
735
|
-
"Lora",
|
736
|
-
"Libre Baskerville",
|
737
|
-
"EB Garamond"
|
738
|
-
];
|
739
|
-
|
740
|
-
/** @internal */
|
741
|
-
export declare type FontWeight = string;
|
742
|
-
|
743
|
-
/** @internal */
|
744
|
-
export declare interface FormButtonColor {
|
745
|
-
main: Color;
|
746
|
-
sub: Color;
|
747
|
-
}
|
748
|
-
|
749
|
-
export { FormCheckBoxes }
|
750
|
-
|
751
|
-
/**
|
752
|
-
* Store for form data
|
753
|
-
*
|
754
|
-
* @internal
|
755
|
-
*/
|
756
|
-
export declare const formData: Writable<FormData_2>;
|
757
|
-
|
758
|
-
/** @internal */
|
759
|
-
declare interface FormData_2 {
|
760
|
-
[name: string]: {
|
761
|
-
value: any;
|
762
|
-
statePath: string;
|
763
|
-
isValid: boolean;
|
764
|
-
};
|
765
|
-
}
|
766
|
-
|
767
|
-
/** @internal */
|
768
|
-
export declare type FormIdentifyBooleanField = (typeof FormIdentifyBooleanFields)[number];
|
769
|
-
|
770
|
-
/** @internal */
|
771
|
-
export declare const FormIdentifyBooleanFields: readonly [
|
772
|
-
"subscription",
|
773
|
-
"phone_subscribe"
|
774
|
-
];
|
775
|
-
|
776
|
-
export { FormIdentifyChoices }
|
777
|
-
|
778
|
-
export { FormIdentifyInput }
|
779
|
-
|
780
|
-
/** @internal */
|
781
|
-
export declare type FormIdentifyTextField = (typeof FormIdentifyTextFields)[number];
|
782
|
-
|
783
|
-
/** @internal */
|
784
|
-
export declare const FormIdentifyTextFieldPlaceholders: {
|
785
|
-
[K in FormIdentifyTextField]: string;
|
786
|
-
};
|
787
|
-
|
788
|
-
export declare const FormIdentifyTextFields: readonly [
|
789
|
-
"email",
|
790
|
-
"phone",
|
791
|
-
"first_name",
|
792
|
-
"last_name",
|
793
|
-
"address"
|
794
|
-
];
|
795
|
-
|
796
|
-
/** @internal */
|
797
|
-
export declare const FormIdentifyTextFieldValidations: {
|
798
|
-
[K in FormIdentifyTextField]: RegExpProp;
|
799
|
-
};
|
800
|
-
|
801
|
-
/** @internal */
|
802
|
-
export declare type FormInputName = string;
|
803
|
-
|
804
|
-
export { FormRadioButtons }
|
805
|
-
|
806
|
-
export { FormRatingButtonsFace }
|
807
|
-
|
808
|
-
export { FormRatingButtonsNumber }
|
809
|
-
|
810
|
-
export { FormSelect }
|
811
|
-
|
812
|
-
export { FormTextarea }
|
813
|
-
|
814
|
-
/**
|
815
|
-
* アクションのルートの DOM 要素を取得する
|
816
|
-
*
|
817
|
-
* @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
|
818
|
-
*
|
819
|
-
* @public
|
820
|
-
*/
|
821
|
-
export declare function getActionRoot(): ShadowRoot | null;
|
822
|
-
|
823
|
-
/**
|
824
|
-
* 回答済の回答内容を取得する
|
825
|
-
*
|
826
|
-
* @param questionId - 質問ID
|
827
|
-
*
|
828
|
-
* @returns 回答データ
|
829
|
-
*
|
830
|
-
* @public
|
831
|
-
*/
|
832
|
-
export declare function getAnsweredQuestion(questionId: string): AnswerValue | undefined;
|
833
|
-
|
834
|
-
/**
|
835
|
-
* 回答済の回答IDのリストを取得
|
836
|
-
*
|
837
|
-
* @returns 回答済の質問の質問IDの配列
|
838
|
-
*
|
839
|
-
* @public
|
840
|
-
*/
|
841
|
-
export declare function getAnsweredQuestionIds(): string[];
|
842
|
-
|
843
|
-
export declare function getCssVariables(data: {
|
844
|
-
[key: string]: string | number;
|
845
|
-
}): string;
|
846
|
-
|
847
|
-
/**
|
848
|
-
* イベントハンドラーの一覧を取得する
|
849
|
-
*
|
850
|
-
* @returns 現在のイベントハンドラー
|
851
|
-
*
|
852
|
-
* @public
|
853
|
-
*/
|
854
|
-
export declare function getEventHandlers(): {
|
855
|
-
[key: string]: ActionEventHandler;
|
856
|
-
};
|
857
|
-
|
858
|
-
/** @internal */
|
859
|
-
export declare function getEvents(): Event_2[];
|
860
|
-
|
861
|
-
/** @internal */
|
862
|
-
export declare function getLogs(): Log[];
|
863
|
-
|
864
|
-
/**
|
865
|
-
* 現在のステートを取得する
|
866
|
-
*
|
867
|
-
* @remarks
|
868
|
-
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
869
|
-
*
|
870
|
-
* @returns 現在のステートID
|
871
|
-
*
|
872
|
-
* @public
|
873
|
-
*/
|
874
|
-
export declare function getState(): string;
|
875
|
-
|
876
|
-
/**
|
877
|
-
* ステートID一覧を取得する
|
878
|
-
*
|
879
|
-
* @remarks
|
880
|
-
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
881
|
-
*
|
882
|
-
* @returns すべてのステートID
|
883
|
-
*
|
884
|
-
* @public
|
885
|
-
*/
|
886
|
-
export declare function getStates(): string[];
|
887
|
-
|
888
|
-
/**
|
889
|
-
* KARTE の設定を取得する
|
890
|
-
*
|
891
|
-
* @remarks
|
892
|
-
* アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
|
893
|
-
* 取得できる設定は、APIキー、接客ID、アクションショートIDなどです。
|
894
|
-
*
|
895
|
-
* @returns 現在の KARTE システムの設定を返します
|
896
|
-
*
|
897
|
-
* @public
|
898
|
-
*/
|
899
|
-
export declare function getSystem(): SystemConfig;
|
900
|
-
|
901
|
-
/**
|
902
|
-
* 変数の一覧を取得する
|
903
|
-
*
|
904
|
-
* @returns 現在の変数の一覧
|
905
|
-
*/
|
906
|
-
export declare function getVariables(): ActionVariables;
|
907
|
-
|
908
|
-
export { Grid }
|
909
|
-
|
910
|
-
export { GridItem }
|
911
|
-
|
912
|
-
export { GridModalState }
|
913
|
-
|
914
|
-
/**
|
915
|
-
* スクロールに応じてアクションを非表示にするトリガー関数
|
916
|
-
*
|
917
|
-
* @remarks
|
918
|
-
* スクロール率が `hide_on_scroll_rate` に達したときに `hide` 関数を呼び出します。
|
919
|
-
* `show_on_scroll_reenter` が `true` で、かつ `hide_on_scroll_rate` またはその値以下の場合、アクションに対して `show` 関数が呼び出されます。
|
920
|
-
*
|
921
|
-
* @param props - アクションのプロパティ。プロパティには `hide_on_scroll`、`hide_on_scroll_rate` そして `show_on_scroll_reenter` が必要です。
|
922
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
923
|
-
* @param show - アクションを再び表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
924
|
-
*
|
925
|
-
* @returns
|
926
|
-
* スクロールが開始された場合は、クリーンアップする関数を返します。そうでない場合は `null` を返します。
|
927
|
-
*
|
928
|
-
* @internal
|
929
|
-
*/
|
930
|
-
export 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;
|
931
|
-
|
932
|
-
/**
|
933
|
-
* 時間に応じてアクションを非表示にするトリガー関数
|
934
|
-
*
|
935
|
-
* @remarks
|
936
|
-
* 時間のカウントが `hide_on_time_count` に達したときに `hide` 関数を呼び出します。
|
937
|
-
*
|
938
|
-
* @param props - アクションのプロパティ。プロパティには `hide_on_time` そして `hide_on_time_count` が必要です。
|
939
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
940
|
-
*
|
941
|
-
* @returns
|
942
|
-
* タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
|
943
|
-
*
|
944
|
-
* @internal
|
945
|
-
*/
|
946
|
-
export declare function hideOnTime<ModalProps extends Pick<Props, "hide_on_time" | "hide_on_time_count">>(props: ModalProps, hide?: Function): (() => void) | null;
|
947
|
-
|
948
|
-
/** @internal */
|
949
|
-
export declare type Icon = string;
|
950
|
-
|
951
|
-
export { IconElement }
|
952
|
-
|
953
|
-
/** @internal */
|
954
|
-
declare type Image_2 = string;
|
955
|
-
export { Image_2 as Image }
|
956
|
-
|
957
|
-
export { ImageBlock }
|
958
|
-
|
959
|
-
export { ImageElement }
|
960
|
-
|
961
|
-
/** @internal */
|
962
|
-
export declare const initialize: (setting?: ActionSetting) => () => void;
|
963
|
-
|
964
|
-
/**
|
965
|
-
* アクションの表示・非表示の状態を取得する
|
966
|
-
*
|
967
|
-
* @returns アクションが表示されているときは `true`、非表示のときは `false` を返します。
|
968
|
-
*
|
969
|
-
* @public
|
970
|
-
*/
|
971
|
-
export declare function isOpened(): boolean;
|
972
|
-
|
973
|
-
/** @internal */
|
974
|
-
export declare const Justifies: readonly [
|
975
|
-
"flex-start",
|
976
|
-
"center",
|
977
|
-
"flex-end"
|
978
|
-
];
|
979
|
-
|
980
|
-
/** @internal */
|
981
|
-
export declare type Justify = (typeof Justifies)[number];
|
982
|
-
|
983
|
-
/**
|
984
|
-
* 非推奨
|
985
|
-
*
|
986
|
-
* @deprecated 非推奨
|
987
|
-
*
|
988
|
-
* @internal
|
989
|
-
*/
|
990
|
-
export declare const KARTE_MODAL_ROOT = "karte-modal-root";
|
991
|
-
|
992
|
-
export declare const LAYOUT_COMPONENT_NAMES: string[];
|
993
|
-
|
994
|
-
/** @internal */
|
995
|
-
export declare type Length = `${number}${LengthUnit}` | "auto";
|
996
|
-
|
997
|
-
/** @internal */
|
998
|
-
export declare type LengthUnit = (typeof LengthUnits)[number];
|
999
|
-
|
1000
|
-
/** @internal */
|
1001
|
-
export declare const LengthUnits: readonly [
|
1002
|
-
"px",
|
1003
|
-
"em",
|
1004
|
-
"rem",
|
1005
|
-
"vw",
|
1006
|
-
"fr",
|
1007
|
-
"%"
|
1008
|
-
];
|
1009
|
-
|
1010
|
-
export { List }
|
1011
|
-
|
1012
|
-
/**
|
1013
|
-
* @internal
|
1014
|
-
*/
|
1015
|
-
export declare type ListBackground = ListBackgroundNone | ListBackgroundStripe;
|
1016
|
-
|
1017
|
-
/** @internal */
|
1018
|
-
export declare interface ListBackgroundNone extends BaseListBackground {
|
1019
|
-
type: "none";
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
/** @internal */
|
1023
|
-
export declare interface ListBackgroundStripe extends BaseListBackground {
|
1024
|
-
type: "stripe";
|
1025
|
-
background1?: Color;
|
1026
|
-
background2?: Color;
|
1027
|
-
}
|
1028
|
-
|
1029
|
-
declare type ListBackgroundType = (typeof ListBackgroundTypes)[number];
|
1030
|
-
|
1031
|
-
/** @internal */
|
1032
|
-
export declare const ListBackgroundTypes: readonly [
|
1033
|
-
"none",
|
1034
|
-
"stripe"
|
1035
|
-
];
|
1036
|
-
|
1037
|
-
/** @internal */
|
1038
|
-
export declare type ListContext = {
|
1039
|
-
separator: ListSeparator;
|
1040
|
-
background: ListBackground;
|
1041
|
-
direction: ListDirection;
|
1042
|
-
registerItem: (props: {
|
1043
|
-
onMount: (props: {
|
1044
|
-
index: number;
|
1045
|
-
length: number;
|
1046
|
-
}) => void;
|
1047
|
-
}) => string;
|
1048
|
-
unregisterItem: (id: string) => void;
|
1049
|
-
};
|
1050
|
-
|
1051
|
-
/** @internal */
|
1052
|
-
export declare type ListDirection = (typeof ListDirections)[number];
|
1053
|
-
|
1054
|
-
/** @internal */
|
1055
|
-
export declare const ListDirections: readonly [
|
1056
|
-
"vertical",
|
1057
|
-
"horizontal"
|
1058
|
-
];
|
1059
|
-
|
1060
|
-
/**
|
1061
|
-
* メッセージを実行ログに表示する
|
1062
|
-
*
|
1063
|
-
* @internal
|
1064
|
-
*/
|
1065
|
-
export declare function listenLogger(): () => void;
|
1066
|
-
|
1067
|
-
export { ListItem }
|
1068
|
-
|
1069
|
-
/** @internal */
|
1070
|
-
export declare type ListSeparator = ListSeparatorNone | ListSeparatorBorder | ListSeparatorGap;
|
1071
|
-
|
1072
|
-
/** @internal */
|
1073
|
-
export declare interface ListSeparatorBorder extends BaseListSeparator {
|
1074
|
-
type: "border";
|
1075
|
-
borderStyle: BorderStyle;
|
1076
|
-
borderWidth?: BorderWidth;
|
1077
|
-
borderColor?: Color;
|
1078
|
-
}
|
1079
|
-
|
1080
|
-
/** @internal */
|
1081
|
-
export declare interface ListSeparatorGap extends BaseListSeparator {
|
1082
|
-
type: "gap";
|
1083
|
-
gap: Length;
|
1084
|
-
}
|
1085
|
-
|
1086
|
-
/** @internal */
|
1087
|
-
export declare interface ListSeparatorNone extends BaseListSeparator {
|
1088
|
-
type: "none";
|
1089
|
-
}
|
1090
|
-
|
1091
|
-
declare type ListSeparatorType = (typeof ListSeparatorTypes)[number];
|
1092
|
-
|
1093
|
-
/** @internal */
|
1094
|
-
export declare const ListSeparatorTypes: readonly [
|
1095
|
-
"none",
|
1096
|
-
"border",
|
1097
|
-
"gap"
|
1098
|
-
];
|
1099
|
-
|
1100
|
-
/** @internal */
|
1101
|
-
export declare const loadActionTable: (config: Array<VariableQuery>, data: {
|
1102
|
-
[key: string]: any;
|
1103
|
-
}, api_key: string, endpoint?: string) => Promise<{
|
1104
|
-
[key: string]: any;
|
1105
|
-
}>;
|
1106
|
-
|
1107
|
-
/** @internal */
|
1108
|
-
export declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, data: {
|
1109
|
-
[key: string]: any;
|
1110
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
1111
|
-
|
1112
|
-
/** @internal */
|
1113
|
-
export declare const loadActionTableRow: (config: ActionTableRowRequestConfig, data: {
|
1114
|
-
[key: string]: any;
|
1115
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
1116
|
-
|
1117
|
-
/** @internal */
|
1118
|
-
export declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, data: {
|
1119
|
-
[key: string]: any;
|
1120
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
1121
|
-
|
1122
|
-
/**
|
1123
|
-
* ES Modules に対応していない JavaScript をページに読み込む
|
1124
|
-
*
|
1125
|
-
* @param src - JavaScript ファイルのリンク URL
|
1126
|
-
*
|
1127
|
-
* @public
|
1128
|
-
*/
|
1129
|
-
export declare function loadGlobalScript(src: string): Promise<any>;
|
1130
|
-
|
1131
|
-
/**
|
1132
|
-
* style ファイルをページに読み込む
|
1133
|
-
*
|
1134
|
-
* @param href - style ファイルのリンク URL
|
1135
|
-
*
|
1136
|
-
* @public
|
1137
|
-
*/
|
1138
|
-
export declare function loadGlobalStyle(href: string): Promise<any>;
|
1139
|
-
|
1140
|
-
/**
|
1141
|
-
* アクションにグローバルなスタイルを読み込む
|
1142
|
-
*
|
1143
|
-
* @param href - style ファイルのリンク URL
|
1144
|
-
*
|
1145
|
-
* @public
|
1146
|
-
*/
|
1147
|
-
export declare function loadStyle(href: string): Promise<void>;
|
1148
|
-
|
1149
|
-
/** @internal */
|
1150
|
-
export declare type Log = {
|
1151
|
-
level: LogLevel;
|
1152
|
-
messages: any;
|
1153
|
-
date?: Date;
|
1154
|
-
};
|
1155
|
-
|
1156
|
-
/**
|
1157
|
-
* ログを送信する関数群
|
1158
|
-
*
|
1159
|
-
* @internal
|
1160
|
-
*/
|
1161
|
-
export declare const logger: {
|
1162
|
-
info: (...messages: any[]) => void;
|
1163
|
-
log: (...messages: any[]) => void;
|
1164
|
-
error: (...messages: any[]) => void;
|
1165
|
-
warn: (...messages: any[]) => void;
|
1166
|
-
system: (...messages: any[]) => void;
|
1167
|
-
event: (name: string, values?: any) => void;
|
1168
|
-
clear: () => void;
|
1169
|
-
clearEvents: () => void;
|
1170
|
-
};
|
1171
|
-
|
1172
|
-
/**
|
1173
|
-
* アクションのログの記録の管理
|
1174
|
-
*/
|
1175
|
-
/** @internal */
|
1176
|
-
export declare type LogLevel = "info" | "error" | "warn" | "system";
|
1177
|
-
|
1178
|
-
/** @internal */
|
1179
|
-
export declare type LongText = string;
|
1180
|
-
|
1181
|
-
/** @internal */
|
1182
|
-
export declare const MediaQueries: {
|
1183
|
-
[key: string]: string;
|
1184
|
-
};
|
1185
|
-
|
1186
|
-
/** @internal */
|
1187
|
-
export declare type MediaQuery = string;
|
1188
|
-
|
1189
|
-
export { Modal }
|
1190
|
-
|
1191
|
-
/** @internal */
|
1192
|
-
export declare type ModalBreakPoint = {
|
1193
|
-
PC: ModalStyle;
|
1194
|
-
SP: ModalStyle;
|
1195
|
-
};
|
1196
|
-
|
1197
|
-
/** @internal */
|
1198
|
-
export declare type ModalMargin = {
|
1199
|
-
left?: string;
|
1200
|
-
right?: string;
|
1201
|
-
top?: string;
|
1202
|
-
bottom?: string;
|
1203
|
-
};
|
1204
|
-
|
1205
|
-
/** @internal */
|
1206
|
-
export declare type ModalPlacement<M = ModalMargin> = {
|
1207
|
-
position?: ModalPosition;
|
1208
|
-
margin?: M;
|
1209
|
-
backgroundOverlay?: boolean;
|
1210
|
-
backgroundClick?: OnClickOperation;
|
1211
|
-
};
|
1212
|
-
|
1213
|
-
/** @internal */
|
1214
|
-
export declare type ModalPosition = (typeof ModalPositions)[number];
|
1215
|
-
|
1216
|
-
/** @internal */
|
1217
|
-
export declare const ModalPositions: readonly [
|
1218
|
-
"top-left",
|
1219
|
-
"top-center",
|
1220
|
-
"top-right",
|
1221
|
-
"center-left",
|
1222
|
-
"center",
|
1223
|
-
"center-right",
|
1224
|
-
"bottom-left",
|
1225
|
-
"bottom-center",
|
1226
|
-
"bottom-right",
|
1227
|
-
"none"
|
1228
|
-
];
|
1229
|
-
|
1230
|
-
declare type ModalProps$1 = Props;
|
1231
|
-
|
1232
|
-
declare type ModalProps = Props;
|
1233
|
-
|
1234
|
-
/** @internal */
|
1235
|
-
export declare type ModalStyle = {
|
1236
|
-
placement?: ModalPlacement;
|
1237
|
-
elasticity?: Elasticity;
|
1238
|
-
};
|
1239
|
-
|
1240
|
-
export { MovieVimeoElement }
|
1241
|
-
|
1242
|
-
export { MovieYouTubeElement }
|
1243
|
-
|
1244
|
-
/** @internal */
|
1245
|
-
export declare type ObjectFit = (typeof ObjectFits)[number];
|
1246
|
-
|
1247
|
-
/** @internal */
|
1248
|
-
export declare const ObjectFits: readonly [
|
1249
|
-
"cover",
|
1250
|
-
"fill",
|
1251
|
-
"contain"
|
1252
|
-
];
|
1253
|
-
|
1254
|
-
/**
|
1255
|
-
* アクションのステートが変更された (changeState) 後にフックする関数
|
1256
|
-
*
|
1257
|
-
* @param fn - 呼び出されるフック関数
|
1258
|
-
*
|
1259
|
-
* @public
|
1260
|
-
*/
|
1261
|
-
export declare function onChangeState<Props extends ModalProps$1, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
|
1262
|
-
|
1263
|
-
/** @internal */
|
1264
|
-
export declare type OnClickOperation = ConvertOperationOptions<typeof OnClickOperationOptions>;
|
1265
|
-
|
1266
|
-
/** @internal */
|
1267
|
-
export declare const OnClickOperationOptions: readonly [
|
1268
|
-
{
|
1269
|
-
readonly operation: "none";
|
1270
|
-
readonly args: readonly [
|
1271
|
-
];
|
1272
|
-
},
|
1273
|
-
{
|
1274
|
-
readonly operation: "linkTo";
|
1275
|
-
readonly args: readonly [
|
1276
|
-
{
|
1277
|
-
readonly name: "url";
|
1278
|
-
readonly type: "Url";
|
1279
|
-
readonly default: "https://example.com";
|
1280
|
-
},
|
1281
|
-
{
|
1282
|
-
readonly name: "open_new_tab";
|
1283
|
-
readonly type: "BooleanKeyword";
|
1284
|
-
readonly default: true;
|
1285
|
-
},
|
1286
|
-
{
|
1287
|
-
readonly name: "decode";
|
1288
|
-
readonly type: "BooleanKeyword";
|
1289
|
-
readonly default: false;
|
1290
|
-
}
|
1291
|
-
];
|
1292
|
-
},
|
1293
|
-
{
|
1294
|
-
readonly operation: "moveTo";
|
1295
|
-
readonly args: readonly [
|
1296
|
-
{
|
1297
|
-
readonly name: "state";
|
1298
|
-
readonly type: "TransitState";
|
1299
|
-
readonly default: "/";
|
1300
|
-
}
|
1301
|
-
];
|
1302
|
-
},
|
1303
|
-
{
|
1304
|
-
readonly operation: "closeApp";
|
1305
|
-
readonly args: readonly [
|
1306
|
-
{
|
1307
|
-
readonly name: "trigger";
|
1308
|
-
readonly type: "Trigger";
|
1309
|
-
readonly default: "button";
|
1310
|
-
}
|
1311
|
-
];
|
1312
|
-
},
|
1313
|
-
{
|
1314
|
-
readonly operation: "runScript";
|
1315
|
-
readonly args: readonly [
|
1316
|
-
{
|
1317
|
-
readonly name: "handler";
|
1318
|
-
readonly type: "Handler";
|
1319
|
-
readonly default: "";
|
1320
|
-
}
|
1321
|
-
];
|
1322
|
-
},
|
1323
|
-
{
|
1324
|
-
readonly operation: "submitForm";
|
1325
|
-
readonly args: readonly [
|
1326
|
-
{
|
1327
|
-
readonly name: "state";
|
1328
|
-
readonly type: "TransitState";
|
1329
|
-
readonly default: "/";
|
1330
|
-
}
|
1331
|
-
];
|
1332
|
-
},
|
1333
|
-
{
|
1334
|
-
readonly operation: "bootChat";
|
1335
|
-
readonly args: readonly [
|
1336
|
-
{
|
1337
|
-
readonly name: "hide_launcher";
|
1338
|
-
readonly type: "BooleanKeyword";
|
1339
|
-
readonly default: false;
|
1340
|
-
},
|
1341
|
-
{
|
1342
|
-
readonly name: "placement_pc";
|
1343
|
-
readonly type: "StringKeyword";
|
1344
|
-
readonly default: "left";
|
1345
|
-
},
|
1346
|
-
{
|
1347
|
-
readonly name: "placement_mobile";
|
1348
|
-
readonly type: "StringKeyword";
|
1349
|
-
readonly default: "left";
|
1350
|
-
},
|
1351
|
-
{
|
1352
|
-
readonly name: "horizontal_spacing_pc";
|
1353
|
-
readonly type: "NumberKeyword";
|
1354
|
-
readonly default: 20;
|
1355
|
-
},
|
1356
|
-
{
|
1357
|
-
readonly name: "horizontal_spacing_mobile";
|
1358
|
-
readonly type: "NumberKeyword";
|
1359
|
-
readonly default: 20;
|
1360
|
-
},
|
1361
|
-
{
|
1362
|
-
readonly name: "vertical_spacing_pc";
|
1363
|
-
readonly type: "NumberKeyword";
|
1364
|
-
readonly default: 20;
|
1365
|
-
},
|
1366
|
-
{
|
1367
|
-
readonly name: "vertical_spacing_mobile";
|
1368
|
-
readonly type: "NumberKeyword";
|
1369
|
-
readonly default: 20;
|
1370
|
-
},
|
1371
|
-
{
|
1372
|
-
readonly name: "theme_color";
|
1373
|
-
readonly type: "Color";
|
1374
|
-
readonly default: "#2aab9f";
|
1375
|
-
},
|
1376
|
-
{
|
1377
|
-
readonly name: "header_title";
|
1378
|
-
readonly type: "StringKeyword";
|
1379
|
-
readonly default: "KARTE\u30B5\u30DD\u30FC\u30C8\u30C1\u30FC\u30E0";
|
1380
|
-
},
|
1381
|
-
{
|
1382
|
-
readonly name: "header_description";
|
1383
|
-
readonly type: "StringKeyword";
|
1384
|
-
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";
|
1385
|
-
},
|
1386
|
-
{
|
1387
|
-
readonly name: "launcher_image";
|
1388
|
-
readonly type: "StringKeyword";
|
1389
|
-
readonly default: "";
|
1390
|
-
}
|
1391
|
-
];
|
1392
|
-
}
|
1393
|
-
];
|
1394
|
-
|
1395
|
-
/**
|
1396
|
-
* アクションがクローズ (close) される前にフックする関数
|
1397
|
-
*
|
1398
|
-
* @param fn - 呼び出されるフック関数
|
1399
|
-
*
|
1400
|
-
* @public
|
1401
|
-
*/
|
1402
|
-
export declare function onClose<Props extends ModalProps$1, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
|
1403
|
-
|
1404
|
-
/**
|
1405
|
-
* アクションが作成 (create) される前にフックする関数
|
1406
|
-
*
|
1407
|
-
* @param fn - 呼び出されるフック関数
|
1408
|
-
*
|
1409
|
-
* @public
|
1410
|
-
*/
|
1411
|
-
export declare function onCreate<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
1412
|
-
|
1413
|
-
/**
|
1414
|
-
* エレメントを破棄したときに実行される関数の登録
|
1415
|
-
*
|
1416
|
-
* @param fn - マウントしたときに実行される関数
|
1417
|
-
*/
|
1418
|
-
export declare const onDestory: typeof onDestroy_2;
|
1419
|
-
|
1420
|
-
/**
|
1421
|
-
* アクションが破棄 (destroy) される前にフックする関数
|
1422
|
-
*
|
1423
|
-
* @param fn - 呼び出されるフック関数
|
1424
|
-
*
|
1425
|
-
* @public
|
1426
|
-
*/
|
1427
|
-
export declare function onDestroy<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
1428
|
-
|
1429
|
-
/**
|
1430
|
-
* エレメントをマウントしたときに実行される関数の登録
|
1431
|
-
*
|
1432
|
-
* @param fn - マウントしたときに実行される関数
|
1433
|
-
*/
|
1434
|
-
export declare const onMount: typeof onMount_2;
|
1435
|
-
|
1436
|
-
/**
|
1437
|
-
* スクロール率が達したときに呼び出すコールバックを登録します
|
1438
|
-
*
|
1439
|
-
* @param rate - スクロール率。この値は viewport でのスクロールのパーセンテージ
|
1440
|
-
* @param fn - スクロール率が達したときに呼び出されるコールバック関数
|
1441
|
-
*
|
1442
|
-
* @returns スクロール率によって呼び出されるコールバックを停止する関数を返します
|
1443
|
-
*
|
1444
|
-
* @public
|
1445
|
-
*/
|
1446
|
-
export declare function onScroll(rate: number | number[], fn: OnScrollFunction): () => void;
|
1447
|
-
|
1448
|
-
/**
|
1449
|
-
* {@link onScroll} のスクロールコンテキスト情報
|
1450
|
-
*
|
1451
|
-
* @remarks
|
1452
|
-
* このコンテキスト情報は、{@link OnScrollFunction} が呼び出されたタイミングの情報が格納されています
|
1453
|
-
*
|
1454
|
-
* @see {@link onScroll}
|
1455
|
-
*
|
1456
|
-
* @public
|
1457
|
-
*/
|
1458
|
-
export declare interface OnScrollContext {
|
1459
|
-
/**
|
1460
|
-
* {@link onScroll} によって指定されたスクロール率
|
1461
|
-
*/
|
1462
|
-
rate: number;
|
1463
|
-
/**
|
1464
|
-
* ページのスクロール率
|
1465
|
-
*/
|
1466
|
-
scrollRate: number;
|
1467
|
-
/**
|
1468
|
-
* 前のスクロール率
|
1469
|
-
*/
|
1470
|
-
previousRate: number;
|
1471
|
-
/**
|
1472
|
-
* 現在のスクロール率と前のスクロール率との差分値
|
1473
|
-
*/
|
1474
|
-
deltaRate: number;
|
1475
|
-
/**
|
1476
|
-
* スクロール方向
|
1477
|
-
*/
|
1478
|
-
direction: ScrollDirection;
|
1479
|
-
}
|
1480
|
-
|
1481
|
-
/**
|
1482
|
-
* {@link onScroll} によって呼び出されるコールバック関数
|
1483
|
-
*
|
1484
|
-
* @see {@link onScroll}
|
1485
|
-
*
|
1486
|
-
* @public
|
1487
|
-
*/
|
1488
|
-
export declare type OnScrollFunction = (ctx: OnScrollContext) => boolean;
|
1489
|
-
|
1490
|
-
/**
|
1491
|
-
* アクションが表示 (show) された後にフックする関数
|
1492
|
-
*
|
1493
|
-
* @param fn - 呼び出されるフック関数
|
1494
|
-
*
|
1495
|
-
* @public
|
1496
|
-
*/
|
1497
|
-
export declare function onShow<Props extends ModalProps$1, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
1498
|
-
|
1499
|
-
/**
|
1500
|
-
* 指定した時間の経過後に呼び出すコールバックを登録します
|
1501
|
-
*
|
1502
|
-
* @param time - コールバックを呼び出すまでの時間。単位はミリセカンド(ms)
|
1503
|
-
* @param fn - 指定した時間が経過後に呼び出されるコールバック関数
|
1504
|
-
*
|
1505
|
-
* @returns コールバックを呼び出すためのタイマーを停止する関数を返します
|
1506
|
-
*
|
1507
|
-
* @public
|
1508
|
-
*/
|
1509
|
-
export declare function onTime(time: number, fn: Function): () => void;
|
1510
|
-
|
1511
|
-
/** @internal */
|
1512
|
-
export declare type Operation = ConvertOperationOptions<ReadonlyArray<any>>;
|
1513
|
-
|
1514
|
-
/** @internal */
|
1515
|
-
export declare type OperationArgumentType = keyof OperationArgumentTypes;
|
1516
|
-
|
1517
|
-
declare type OperationArgumentTypes = {
|
1518
|
-
StringKeyword: string;
|
1519
|
-
BooleanKeyword: boolean;
|
1520
|
-
NumberKeyword: number;
|
1521
|
-
TransitState: string;
|
1522
|
-
Url: string;
|
1523
|
-
Color: string;
|
1524
|
-
Handler: string;
|
1525
|
-
Trigger: string;
|
1526
|
-
};
|
1527
|
-
|
1528
|
-
/** @internal */
|
1529
|
-
export declare type Overflow = (typeof Overflows)[number];
|
1530
|
-
|
1531
|
-
/** @internal */
|
1532
|
-
export declare const Overflows: readonly [
|
1533
|
-
"hidden",
|
1534
|
-
"auto",
|
1535
|
-
"visible"
|
1536
|
-
];
|
1537
|
-
|
1538
|
-
/**
|
1539
|
-
* モーダル(ポップアップ)のプロパティ
|
1540
|
-
*
|
1541
|
-
* @internal
|
1542
|
-
*/
|
1543
|
-
declare interface Props {
|
1544
|
-
/**
|
1545
|
-
* 全ての条件を満たしたら表示するかどうか
|
1546
|
-
*/
|
1547
|
-
show_and_condition?: boolean;
|
1548
|
-
/**
|
1549
|
-
* スクロール率による表示を有効化するかどうか
|
1550
|
-
*/
|
1551
|
-
show_on_scroll?: boolean;
|
1552
|
-
/**
|
1553
|
-
* 表示するスクロール率
|
1554
|
-
*/
|
1555
|
-
show_on_scroll_rate?: number;
|
1556
|
-
/**
|
1557
|
-
* 条件を満たした時に再表示するかどうか
|
1558
|
-
*/
|
1559
|
-
show_on_scroll_reenter?: boolean;
|
1560
|
-
/**
|
1561
|
-
* 時間による表示を有効化するかどうか
|
1562
|
-
*/
|
1563
|
-
show_on_time?: boolean;
|
1564
|
-
/**
|
1565
|
-
* 表示する秒数
|
1566
|
-
*/
|
1567
|
-
show_on_time_count?: number;
|
1568
|
-
/**
|
1569
|
-
* 全ての条件を満たしたら非表示するかどうか
|
1570
|
-
*/
|
1571
|
-
hide_and_condition?: boolean;
|
1572
|
-
/**
|
1573
|
-
* スクロール率で非表示を有効化するかどうか
|
1574
|
-
*/
|
1575
|
-
hide_on_scroll?: boolean;
|
1576
|
-
/**
|
1577
|
-
* 非表示にするスクロール率
|
1578
|
-
*/
|
1579
|
-
hide_on_scroll_rate?: number;
|
1580
|
-
/**
|
1581
|
-
* 条件を満たした時に表示するかどうか
|
1582
|
-
*/
|
1583
|
-
hide_on_scroll_releave?: boolean;
|
1584
|
-
/**
|
1585
|
-
* 時間による非表示を有効化するかどうか
|
1586
|
-
*/
|
1587
|
-
hide_on_time?: boolean;
|
1588
|
-
/**
|
1589
|
-
* 非表示にする秒数
|
1590
|
-
*/
|
1591
|
-
hide_on_time_count?: number;
|
1592
|
-
}
|
1593
|
-
|
1594
|
-
/** @internal */
|
1595
|
-
export declare type PropType = (typeof PropTypes)[number];
|
1596
|
-
|
1597
|
-
/** @internal */
|
1598
|
-
export declare const PropTypes: readonly [
|
1599
|
-
"BooleanKeyword",
|
1600
|
-
"NumberKeyword",
|
1601
|
-
"StringKeyword",
|
1602
|
-
"Function",
|
1603
|
-
"Enum",
|
1604
|
-
"Code",
|
1605
|
-
"Direction",
|
1606
|
-
"Url",
|
1607
|
-
"Image",
|
1608
|
-
"AnimationStyle",
|
1609
|
-
"LongText",
|
1610
|
-
"Length",
|
1611
|
-
"Color",
|
1612
|
-
"Alignment",
|
1613
|
-
"State",
|
1614
|
-
"TransitState",
|
1615
|
-
"Style",
|
1616
|
-
"ModalPlacement",
|
1617
|
-
"OnClick"
|
1618
|
-
];
|
1619
|
-
|
1620
|
-
/**
|
1621
|
-
* アクションの publish 関数
|
1622
|
-
*
|
1623
|
-
* @public
|
1624
|
-
*/
|
1625
|
-
export declare type PublishFunction = (topic: string, values?: any) => void;
|
1626
|
-
|
1627
|
-
/** @internal */
|
1628
|
-
export declare type RegExpProp = {
|
1629
|
-
pattern: string;
|
1630
|
-
flags: string;
|
1631
|
-
};
|
1632
|
-
|
1633
|
-
/**
|
1634
|
-
* 回答済の回答を削除
|
1635
|
-
*
|
1636
|
-
* @param questionId - 質問ID
|
1637
|
-
*
|
1638
|
-
* @public
|
1639
|
-
*/
|
1640
|
-
export declare function removeAnswer(questionId: string): void;
|
1641
|
-
|
1642
|
-
/** @internal */
|
1643
|
-
export declare type Repeat = (typeof Repeats)[number];
|
1644
|
-
|
1645
|
-
/** @internal */
|
1646
|
-
export declare const Repeats: readonly [
|
1647
|
-
"repeat",
|
1648
|
-
"space",
|
1649
|
-
"round",
|
1650
|
-
"no-repeat"
|
1651
|
-
];
|
1652
|
-
|
1653
|
-
/**
|
1654
|
-
* イベントハンドラーをリセットする
|
1655
|
-
*
|
1656
|
-
*/
|
1657
|
-
export declare function resetEventHandlers(): void;
|
1658
|
-
|
1659
|
-
/**
|
1660
|
-
* 変数をリセットする
|
1661
|
-
*/
|
1662
|
-
export declare function resetVariables(): void;
|
1663
|
-
|
1664
|
-
/**
|
1665
|
-
* スクロール方向
|
1666
|
-
*
|
1667
|
-
* @public
|
1668
|
-
*
|
1669
|
-
* @see {@link onScroll}
|
1670
|
-
*/
|
1671
|
-
export declare type ScrollDirection = "up" | "down";
|
1672
|
-
|
1673
|
-
/**
|
1674
|
-
* `sendAnswers`のエイリアス
|
1675
|
-
*
|
1676
|
-
* @public
|
1677
|
-
*/
|
1678
|
-
export declare function sendAnswer(): boolean;
|
1679
|
-
|
1680
|
-
/**
|
1681
|
-
* 回答済の回答をまとめてイベントとして送信する
|
1682
|
-
*
|
1683
|
-
* @returns イベント送信の成功/失敗
|
1684
|
-
*
|
1685
|
-
* @public
|
1686
|
-
*/
|
1687
|
-
export declare function sendAnswers(): boolean;
|
1688
|
-
|
1689
|
-
/**
|
1690
|
-
* アクションの send 関数
|
1691
|
-
*
|
1692
|
-
* @public
|
1693
|
-
*/
|
1694
|
-
export declare type SendFunction = (event_name: string, values?: any) => void;
|
1695
|
-
|
1696
|
-
/**
|
1697
|
-
* イベントハンドラーを登録する
|
1698
|
-
*
|
1699
|
-
* @remarks
|
1700
|
-
* 登録したイベントハンドラーは、ビジュアルエディタでアクション本体とのテキストボタンのクリック時の動作で利用できます。
|
1701
|
-
*
|
1702
|
-
* @param handlers - 登録するイベントハンドラー
|
1703
|
-
*
|
1704
|
-
* @public
|
1705
|
-
*/
|
1706
|
-
export declare function setEventHandlers(handlers: {
|
1707
|
-
[key: string]: ActionEventHandler;
|
1708
|
-
}): {
|
1709
|
-
[key: string]: ActionEventHandler;
|
1710
|
-
};
|
1711
|
-
|
1712
|
-
/**
|
1713
|
-
* アクション設定を更新する
|
1714
|
-
*
|
1715
|
-
* @param setting - 更新するアクション設定
|
1716
|
-
*
|
1717
|
-
* @returns 新しいアクション設定
|
1718
|
-
*
|
1719
|
-
* @public
|
1720
|
-
*/
|
1721
|
-
export declare function setSetting(setting: ActionSetting): ActionSetting;
|
1722
|
-
|
1723
|
-
/**
|
1724
|
-
* 現在のステートを設定する
|
1725
|
-
*
|
1726
|
-
* @param stateId - 表示するステートID
|
1727
|
-
* @param options - オプション。`options.disableInPreview`でプレビュー時のステート遷移を無効化できます。
|
1728
|
-
*
|
1729
|
-
* @public
|
1730
|
-
*/
|
1731
|
-
export declare function setState(stateId: string, options?: {
|
1732
|
-
disableInPreview: boolean;
|
1733
|
-
}): void;
|
1734
|
-
|
1735
|
-
/**
|
1736
|
-
* 変数を設定する
|
1737
|
-
*
|
1738
|
-
* @remarks
|
1739
|
-
* 設定した変数は、ビジュアルエディタのテキストフォームなどで利用できます。
|
1740
|
-
*
|
1741
|
-
* @param vars - 変数
|
1742
|
-
*/
|
1743
|
-
export declare function setVariables(vars: ActionVariables): ActionVariables;
|
1744
|
-
|
1745
|
-
/**
|
1746
|
-
* 非推奨
|
1747
|
-
*
|
1748
|
-
* @deprecated 非推奨
|
1749
|
-
*
|
1750
|
-
* @internal
|
1751
|
-
*/
|
1752
|
-
export declare const show: typeof showAction;
|
1753
|
-
|
1754
|
-
/**
|
1755
|
-
* アクションを表示する
|
1756
|
-
*
|
1757
|
-
* @public
|
1758
|
-
*/
|
1759
|
-
export declare function showAction(): void;
|
1760
|
-
|
1761
|
-
/**
|
1762
|
-
* 非推奨
|
1763
|
-
*
|
1764
|
-
* @deprecated 非推奨
|
1765
|
-
*
|
1766
|
-
* @internal
|
1767
|
-
*/
|
1768
|
-
export declare const showModal: typeof create;
|
1769
|
-
|
1770
|
-
/**
|
1771
|
-
* スクロールに応じてアクションを表示するトリガー関数
|
1772
|
-
*
|
1773
|
-
* @remarks
|
1774
|
-
* スクロール率が `show_on_scroll_rate` に達したときに `show` 関数を呼び出します。
|
1775
|
-
* `hide_on_scroll_releave` が `true` で、かつ `show_on_scroll_rate` 以下の場合は、アクションに対して `hide` 関数が呼び出されます。
|
1776
|
-
*
|
1777
|
-
* @param props - アクションのプロパティ。プロパティには `show_on_scroll`、`show_on_scroll_rate` そして `hide_on_scroll_releave` が必要です。
|
1778
|
-
* @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
1779
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
1780
|
-
*
|
1781
|
-
* @returns
|
1782
|
-
* スクロールが開始されている場合は、クリーンアップ関数を返します。そうでない場合は `null` を返します
|
1783
|
-
*
|
1784
|
-
* @internal
|
1785
|
-
*/
|
1786
|
-
export declare function showOnScroll<ModalProps extends Pick<Props, "show_on_scroll" | "show_on_scroll_rate" | "hide_on_scroll_releave">>(props: ModalProps, show?: Function, hide?: Function): (() => void) | null;
|
1787
|
-
|
1788
|
-
/**
|
1789
|
-
* 時間に応じてアクションを表示するトリガー関数
|
1790
|
-
*
|
1791
|
-
* @param props - アクションのプロパティ。プロパティには `show_on_time` そして `show_on_time_count` が必要です。
|
1792
|
-
* @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
1793
|
-
*
|
1794
|
-
* @remarks
|
1795
|
-
* 時間のカウントが `show_on_time_count` に達したときに `show` 関数を呼び出します。
|
1796
|
-
*
|
1797
|
-
* @returns
|
1798
|
-
* タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
|
1799
|
-
*
|
1800
|
-
* @internal
|
1801
|
-
*/
|
1802
|
-
export declare function showOnTime<ModalProps extends Pick<Props, "show_on_time" | "show_on_time_count">>(props: ModalProps, show?: Function): (() => void) | null;
|
1803
|
-
|
1804
|
-
/**
|
1805
|
-
* 表示アクショントリガー
|
1806
|
-
*
|
1807
|
-
* @internal */
|
1808
|
-
export declare type ShowTrigger = "custom" | "auto" | "none";
|
1809
|
-
|
1810
|
-
export { Slide }
|
1811
|
-
|
1812
|
-
/** @internal */
|
1813
|
-
export declare type SlideButton = SlideButtonIcon | SlideButtonText;
|
1814
|
-
|
1815
|
-
/** @internal */
|
1816
|
-
export declare interface SlideButtonIcon extends BaseSlideButton {
|
1817
|
-
type: "icon";
|
1818
|
-
icon: string;
|
1819
|
-
size: Length;
|
1820
|
-
color: Color;
|
1821
|
-
fill: Color;
|
1822
|
-
}
|
1823
|
-
|
1824
|
-
/** @internal */
|
1825
|
-
export declare type SlideButtonPosition = "top" | "middle" | "bottom";
|
1826
|
-
|
1827
|
-
/** @internal */
|
1828
|
-
export declare interface SlideButtonText extends BaseSlideButton {
|
1829
|
-
type: "text";
|
1830
|
-
text: string;
|
1831
|
-
}
|
1832
|
-
|
1833
|
-
declare type SlideButtonType = "icon" | "text";
|
1834
|
-
|
1835
|
-
export { SlideItem }
|
1836
|
-
|
1837
|
-
/** @internal */
|
1838
|
-
export declare interface SlideNavigationButton {
|
1839
|
-
type: "circle";
|
1840
|
-
size: Length;
|
1841
|
-
color: Color;
|
1842
|
-
colorActive: Color;
|
1843
|
-
}
|
1844
|
-
|
1845
|
-
export { State }
|
1846
|
-
|
1847
|
-
/**
|
1848
|
-
* Store to handle current state ID
|
1849
|
-
*
|
1850
|
-
* This is exported becase of compatible interface for App.svelte.
|
1851
|
-
* Don't use directly.
|
1852
|
-
*
|
1853
|
-
* @internal
|
1854
|
-
*/
|
1855
|
-
export declare const state: Store<string>;
|
1856
|
-
|
1857
|
-
export { StateItem }
|
1858
|
-
|
1859
|
-
/** @internal */
|
1860
|
-
declare type Store<T> = Writable<T>;
|
1861
|
-
|
1862
|
-
/** @internal */
|
1863
|
-
export declare type Style = string;
|
1864
|
-
|
1865
|
-
/** @internal */
|
1866
|
-
export declare const SYSTEM_FONT = "sans-serif, serif, monospace, system-ui";
|
1867
|
-
|
1868
|
-
/**
|
1869
|
-
* KARTE のシステム設定情報
|
1870
|
-
*
|
1871
|
-
* @public
|
1872
|
-
*/
|
1873
|
-
export declare type SystemConfig = {
|
1874
|
-
/**
|
1875
|
-
* API キー
|
1876
|
-
*/
|
1877
|
-
apiKey?: string;
|
1878
|
-
/**
|
1879
|
-
* 接客ID
|
1880
|
-
*/
|
1881
|
-
campaignId?: string;
|
1882
|
-
shortenId?: string;
|
1883
|
-
};
|
1884
|
-
|
1885
|
-
export { TextBlock }
|
1886
|
-
|
1887
|
-
export { TextButtonBlock }
|
1888
|
-
|
1889
|
-
export { TextButtonElement }
|
1890
|
-
|
1891
|
-
/** @internal */
|
1892
|
-
export declare type TextDirection = (typeof TextDirections)[number];
|
1893
|
-
|
1894
|
-
/** @internal */
|
1895
|
-
export declare const TextDirections: readonly [
|
1896
|
-
"horizontal",
|
1897
|
-
"vertical"
|
1898
|
-
];
|
1899
|
-
|
1900
|
-
export { TextElement }
|
1901
|
-
|
1902
|
-
/**
|
1903
|
-
* エレメントのライフサイクルを進める
|
1904
|
-
*
|
1905
|
-
* @returns Promise<void>
|
1906
|
-
*/
|
1907
|
-
export declare const tick: typeof tick_2;
|
1908
|
-
|
1909
|
-
/** @internal */
|
1910
|
-
export declare type TransitState = string;
|
1911
|
-
|
1912
|
-
/** @internal */
|
1913
|
-
export declare type Url = string;
|
1914
|
-
|
1915
|
-
/** @internal */
|
1916
|
-
declare type VariableQuery = {
|
1917
|
-
resolver: string;
|
1918
|
-
name: string;
|
1919
|
-
query: any;
|
1920
|
-
preview_value?: any;
|
1921
|
-
};
|
1922
|
-
|
1923
|
-
/**
|
1924
|
-
* Store to handle variables
|
1925
|
-
*
|
1926
|
-
* @internal
|
1927
|
-
*/
|
1928
|
-
export declare const variables: Store<{
|
1929
|
-
[key: string]: any;
|
1930
|
-
}>;
|
1931
|
-
|
1932
|
-
export declare namespace widget {
|
1933
|
-
/**
|
1934
|
-
* アクションの汎用的なタイプを定義する
|
1935
|
-
*
|
1936
|
-
* モーダル(ポップアップ)やアクションテーブルなど機能別のタイプは含めない。
|
1937
|
-
*/
|
1938
|
-
/**
|
1939
|
-
* アクションのイベントハンドラ
|
1940
|
-
*
|
1941
|
-
* @public
|
1942
|
-
*/
|
1943
|
-
export type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
1944
|
-
/**
|
1945
|
-
* アクションの変数
|
1946
|
-
*
|
1947
|
-
* @public
|
1948
|
-
*/
|
1949
|
-
export type ActionVariables = {
|
1950
|
-
[key: string]: any;
|
1951
|
-
};
|
1952
|
-
/**
|
1953
|
-
* アクションの send 関数
|
1954
|
-
*
|
1955
|
-
* @public
|
1956
|
-
*/
|
1957
|
-
export type SendFunction = (event_name: string, values?: any) => void;
|
1958
|
-
/**
|
1959
|
-
* アクションの publish 関数
|
1960
|
-
*
|
1961
|
-
* @public
|
1962
|
-
*/
|
1963
|
-
export type PublishFunction = (topic: string, values?: any) => void;
|
1964
|
-
/**
|
1965
|
-
* アクション設定
|
1966
|
-
*
|
1967
|
-
* @public
|
1968
|
-
*/
|
1969
|
-
export type ActionSetting = {
|
1970
|
-
send?: SendFunction;
|
1971
|
-
publish?: PublishFunction;
|
1972
|
-
initialState?: string;
|
1973
|
-
};
|
1974
|
-
/**
|
1975
|
-
* アクションのライフサイクル changeState で呼び出されるフック関数
|
1976
|
-
*
|
1977
|
-
* @param props - アクションのプロパティ
|
1978
|
-
* @param newState - アクションの新しいステート
|
1979
|
-
*
|
1980
|
-
* @public
|
1981
|
-
*/
|
1982
|
-
export type ActionChangeStateHook<Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
|
1983
|
-
/**
|
1984
|
-
* アクションのプロパティ
|
1985
|
-
*
|
1986
|
-
* @public
|
1987
|
-
*/
|
1988
|
-
export interface ActionProps<Props, Variables> {
|
1989
|
-
/**
|
1990
|
-
* アクションでイベントがトリガーされたときに受信するための関数
|
1991
|
-
*/
|
1992
|
-
send: SendFunction;
|
1993
|
-
/**
|
1994
|
-
* アクション内でタグのQueueにリクエストを発行する関数
|
1995
|
-
*/
|
1996
|
-
publish: PublishFunction;
|
1997
|
-
/**
|
1998
|
-
* アクションで使用されるデータ
|
1999
|
-
*/
|
2000
|
-
data: Props & Variables & ActionVariables;
|
2001
|
-
/**
|
2002
|
-
* アクションが表示されたときにフックされる {@link onShow}
|
2003
|
-
*/
|
2004
|
-
onShow?: ActionHook<Props, Variables & ActionVariables>;
|
2005
|
-
/**
|
2006
|
-
* アクションのステートが変更されたときにフックされる {@link onChangeState}
|
2007
|
-
*/
|
2008
|
-
onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
|
2009
|
-
}
|
2010
|
-
/**
|
2011
|
-
* アクションのライフサイクルで呼び出されるフック
|
2012
|
-
*
|
2013
|
-
* @param props - アクションのプロパティ
|
2014
|
-
*
|
2015
|
-
* @public
|
2016
|
-
*/
|
2017
|
-
export type ActionHook<Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
|
2018
|
-
/**
|
2019
|
-
* {@link create} 向けのオプション
|
2020
|
-
*
|
2021
|
-
* @public
|
2022
|
-
*/
|
2023
|
-
export interface ActionOptions<Props, Variables, VariablesQuery> {
|
2024
|
-
/**
|
2025
|
-
* アクション内でイベントを発火する関数
|
2026
|
-
*
|
2027
|
-
* @defaultValue `() => {}`
|
2028
|
-
*/
|
2029
|
-
send?: SendFunction;
|
2030
|
-
/**
|
2031
|
-
* アクション内でタグのQueueにリクエストを発行する関数
|
2032
|
-
*
|
2033
|
-
* @defaultValue `() => {}`
|
2034
|
-
*/
|
2035
|
-
publish?: PublishFunction;
|
2036
|
-
/**
|
2037
|
-
* アクションで使用されるプロパティ
|
2038
|
-
*
|
2039
|
-
* @defaultValue `{}`
|
2040
|
-
*/
|
2041
|
-
props?: Props;
|
2042
|
-
/**
|
2043
|
-
* アクションで使用される解析時に取得される変数
|
2044
|
-
*
|
2045
|
-
* @defaultValue `{}`
|
2046
|
-
*/
|
2047
|
-
variables?: Variables;
|
2048
|
-
/**
|
2049
|
-
* アクションで使用されるアクション実行時に取得される変数
|
2050
|
-
*
|
2051
|
-
* @defaultValue `[]`
|
2052
|
-
*/
|
2053
|
-
localVariablesQuery?: VariablesQuery;
|
2054
|
-
/**
|
2055
|
-
* アクションが作成されているときにフックされる {@link onCreate}
|
2056
|
-
*
|
2057
|
-
* @defaultValue `() => {}`
|
2058
|
-
*/
|
2059
|
-
onCreate?: ActionHook<Props, Variables & ActionVariables>;
|
2060
|
-
/**
|
2061
|
-
* KARTEテンプレートの情報
|
2062
|
-
*
|
2063
|
-
* @defaultValue `{}`
|
2064
|
-
*/
|
2065
|
-
karteTemplate?: {
|
2066
|
-
[key: string]: any;
|
2067
|
-
};
|
2068
|
-
/**
|
2069
|
-
* アクション実行時のコンテキスト
|
2070
|
-
*/
|
2071
|
-
context: ActionRunnerContext;
|
2072
|
-
}
|
2073
|
-
/**
|
2074
|
-
* KARTE のシステム設定情報
|
2075
|
-
*
|
2076
|
-
* @public
|
2077
|
-
*/
|
2078
|
-
export type SystemConfig = {
|
2079
|
-
/**
|
2080
|
-
* API キー
|
2081
|
-
*/
|
2082
|
-
apiKey?: string;
|
2083
|
-
/**
|
2084
|
-
* 接客ID
|
2085
|
-
*/
|
2086
|
-
campaignId?: string;
|
2087
|
-
shortenId?: string;
|
2088
|
-
};
|
2089
|
-
/** @internal */
|
2090
|
-
export type ActionHookLog = {
|
2091
|
-
name: string;
|
2092
|
-
values?: any;
|
2093
|
-
};
|
2094
|
-
/**
|
2095
|
-
* アクション実行時のコンテキスト
|
2096
|
-
*/
|
2097
|
-
export type ActionRunnerContext = {
|
2098
|
-
api_key: string;
|
2099
|
-
target?: "web" | "native";
|
2100
|
-
};
|
2101
|
-
export type ActionTableResult = number | string | boolean | Date | null | undefined;
|
2102
|
-
export type ActionTableQueryParam = string | number | boolean | Date;
|
2103
|
-
export type ActionTableQueryParams = {
|
2104
|
-
[key: string]: ActionTableQueryParam | ActionTableQueryParam[];
|
2105
|
-
};
|
2106
|
-
/**
|
2107
|
-
* アクションテーブルの設定情報
|
2108
|
-
*
|
2109
|
-
* @param api_key - API Key
|
2110
|
-
* @param table - テーブル名
|
2111
|
-
* @param endpoint - エンドポイント / 指定がない場合はデフォルトのエンドポイントを使用します。検証用途以外での通常利用では指定なしで大丈夫です。
|
2112
|
-
*/
|
2113
|
-
export type CollectionConfig = {
|
2114
|
-
api_key: string;
|
2115
|
-
table: string;
|
2116
|
-
endpoint?: string;
|
2117
|
-
};
|
2118
|
-
/**
|
2119
|
-
* @typedef {Object} CollectionReturnFunctions@typedef {Object} CollectionReturnFunctions
|
2120
|
-
* @property {function(key, cb: (err, items) => void): void} get - キーを1つ、または複数指定して、対応するアクションテーブルの行を取得する。
|
2121
|
-
* @property {function(queryName, params, options, cb: (err, items) => void): void} getByQuery - クエリーを指定して、アクションテーブルから行を取得する。なお、クエリーは事前に管理画面で設定しておく必要があります。
|
2122
|
-
*/
|
2123
|
-
/**
|
2124
|
-
* アクションテーブルを管理するメソッドを取得する
|
2125
|
-
*
|
2126
|
-
* @param config - アクションテーブル設定情報
|
2127
|
-
*
|
2128
|
-
* @returns {CollectionReturnFunctions} アクションテーブル行を取得するメソッド
|
2129
|
-
*
|
2130
|
-
* @public
|
2131
|
-
*/
|
2132
|
-
export function collection(config: CollectionConfig): {
|
2133
|
-
get(key: string | Array<string>, cb: (err: Error | null, items?: ActionTableResult | Array<ActionTableResult>) => void): void;
|
2134
|
-
getByQuery(query_name: string, params: ActionTableQueryParams, options: {
|
2135
|
-
ignore_fields?: string[];
|
2136
|
-
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
2137
|
-
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
2138
|
-
};
|
2139
|
-
/** @internal */
|
2140
|
-
export type VariableQuery = {
|
2141
|
-
resolver: string;
|
2142
|
-
name: string;
|
2143
|
-
query: any;
|
2144
|
-
preview_value?: any;
|
2145
|
-
};
|
2146
|
-
/** @internal */
|
2147
|
-
export type ActionTableRowRequestConfig = VariableQuery & {
|
2148
|
-
resolver: "action-table-row";
|
2149
|
-
query: {
|
2150
|
-
table_name: string;
|
2151
|
-
key: string;
|
2152
|
-
default_value?: ActionTableResult;
|
2153
|
-
};
|
2154
|
-
preview_value?: ActionTableResult;
|
2155
|
-
};
|
2156
|
-
/** @internal */
|
2157
|
-
export type ActionTableRowsRequestConfig = VariableQuery & {
|
2158
|
-
resolver: "action-table-rows";
|
2159
|
-
query: {
|
2160
|
-
table_name: string;
|
2161
|
-
keys: Array<string>;
|
2162
|
-
default_value?: Array<ActionTableResult>;
|
2163
|
-
};
|
2164
|
-
preview_value?: Array<ActionTableResult>;
|
2165
|
-
};
|
2166
|
-
/** @internal */
|
2167
|
-
export type ActionTableQueryRequestConfig = VariableQuery & {
|
2168
|
-
resolver: "action-table-query";
|
2169
|
-
query: {
|
2170
|
-
table_name: string;
|
2171
|
-
query_name: string;
|
2172
|
-
params?: {
|
2173
|
-
[key: string]: string;
|
2174
|
-
};
|
2175
|
-
default_value?: Array<ActionTableResult>;
|
2176
|
-
};
|
2177
|
-
preview_value?: Array<ActionTableResult>;
|
2178
|
-
};
|
2179
|
-
/** @internal */
|
2180
|
-
export type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
2181
|
-
/** @internal */
|
2182
|
-
const loadActionTableRow: (config: ActionTableRowRequestConfig, data: {
|
2183
|
-
[key: string]: any;
|
2184
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
2185
|
-
/** @internal */
|
2186
|
-
const loadActionTableRows: (config: ActionTableRowsRequestConfig, data: {
|
2187
|
-
[key: string]: any;
|
2188
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
2189
|
-
/** @internal */
|
2190
|
-
const loadActionTableQuery: (config: ActionTableQueryRequestConfig, data: {
|
2191
|
-
[key: string]: any;
|
2192
|
-
}, api_key: string, endpoint?: string) => Promise<unknown>;
|
2193
|
-
/** @internal */
|
2194
|
-
const loadActionTable: (config: Array<VariableQuery>, data: {
|
2195
|
-
[key: string]: any;
|
2196
|
-
}, api_key: string, endpoint?: string) => Promise<{
|
2197
|
-
[key: string]: any;
|
2198
|
-
}>;
|
2199
|
-
/** @internal */
|
2200
|
-
export function setupActionTable(localVariablesQuery: Array<VariableQuery>, data: {
|
2201
|
-
[key: string]: any;
|
2202
|
-
}, apiKey: string): Promise<{
|
2203
|
-
success: boolean;
|
2204
|
-
}>;
|
2205
|
-
/** @internal */
|
2206
|
-
export function initActionTable(localVariablesQuery: Array<VariableQuery> | undefined): void;
|
2207
|
-
/**
|
2208
|
-
* モーダル(ポップアップ)のプロパティ
|
2209
|
-
*
|
2210
|
-
* @internal
|
2211
|
-
*/
|
2212
|
-
export interface Props {
|
2213
|
-
/**
|
2214
|
-
* 全ての条件を満たしたら表示するかどうか
|
2215
|
-
*/
|
2216
|
-
show_and_condition?: boolean;
|
2217
|
-
/**
|
2218
|
-
* スクロール率による表示を有効化するかどうか
|
2219
|
-
*/
|
2220
|
-
show_on_scroll?: boolean;
|
2221
|
-
/**
|
2222
|
-
* 表示するスクロール率
|
2223
|
-
*/
|
2224
|
-
show_on_scroll_rate?: number;
|
2225
|
-
/**
|
2226
|
-
* 条件を満たした時に再表示するかどうか
|
2227
|
-
*/
|
2228
|
-
show_on_scroll_reenter?: boolean;
|
2229
|
-
/**
|
2230
|
-
* 時間による表示を有効化するかどうか
|
2231
|
-
*/
|
2232
|
-
show_on_time?: boolean;
|
2233
|
-
/**
|
2234
|
-
* 表示する秒数
|
2235
|
-
*/
|
2236
|
-
show_on_time_count?: number;
|
2237
|
-
/**
|
2238
|
-
* 全ての条件を満たしたら非表示するかどうか
|
2239
|
-
*/
|
2240
|
-
hide_and_condition?: boolean;
|
2241
|
-
/**
|
2242
|
-
* スクロール率で非表示を有効化するかどうか
|
2243
|
-
*/
|
2244
|
-
hide_on_scroll?: boolean;
|
2245
|
-
/**
|
2246
|
-
* 非表示にするスクロール率
|
2247
|
-
*/
|
2248
|
-
hide_on_scroll_rate?: number;
|
2249
|
-
/**
|
2250
|
-
* 条件を満たした時に表示するかどうか
|
2251
|
-
*/
|
2252
|
-
hide_on_scroll_releave?: boolean;
|
2253
|
-
/**
|
2254
|
-
* 時間による非表示を有効化するかどうか
|
2255
|
-
*/
|
2256
|
-
hide_on_time?: boolean;
|
2257
|
-
/**
|
2258
|
-
* 非表示にする秒数
|
2259
|
-
*/
|
2260
|
-
hide_on_time_count?: number;
|
2261
|
-
}
|
2262
|
-
/**
|
2263
|
-
* スクロールに応じてアクションを非表示にするトリガー関数
|
2264
|
-
*
|
2265
|
-
* @remarks
|
2266
|
-
* スクロール率が `hide_on_scroll_rate` に達したときに `hide` 関数を呼び出します。
|
2267
|
-
* `show_on_scroll_reenter` が `true` で、かつ `hide_on_scroll_rate` またはその値以下の場合、アクションに対して `show` 関数が呼び出されます。
|
2268
|
-
*
|
2269
|
-
* @param props - アクションのプロパティ。プロパティには `hide_on_scroll`、`hide_on_scroll_rate` そして `show_on_scroll_reenter` が必要です。
|
2270
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2271
|
-
* @param show - アクションを再び表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2272
|
-
*
|
2273
|
-
* @returns
|
2274
|
-
* スクロールが開始された場合は、クリーンアップする関数を返します。そうでない場合は `null` を返します。
|
2275
|
-
*
|
2276
|
-
* @internal
|
2277
|
-
*/
|
2278
|
-
export 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;
|
2279
|
-
/**
|
2280
|
-
* 時間に応じてアクションを非表示にするトリガー関数
|
2281
|
-
*
|
2282
|
-
* @remarks
|
2283
|
-
* 時間のカウントが `hide_on_time_count` に達したときに `hide` 関数を呼び出します。
|
2284
|
-
*
|
2285
|
-
* @param props - アクションのプロパティ。プロパティには `hide_on_time` そして `hide_on_time_count` が必要です。
|
2286
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2287
|
-
*
|
2288
|
-
* @returns
|
2289
|
-
* タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
|
2290
|
-
*
|
2291
|
-
* @internal
|
2292
|
-
*/
|
2293
|
-
export function hideOnTime<ModalProps extends Pick<Props, "hide_on_time" | "hide_on_time_count">>(props: ModalProps, hide?: Function): (() => void) | null;
|
2294
|
-
/**
|
2295
|
-
* スクロールに応じてアクションを表示するトリガー関数
|
2296
|
-
*
|
2297
|
-
* @remarks
|
2298
|
-
* スクロール率が `show_on_scroll_rate` に達したときに `show` 関数を呼び出します。
|
2299
|
-
* `hide_on_scroll_releave` が `true` で、かつ `show_on_scroll_rate` 以下の場合は、アクションに対して `hide` 関数が呼び出されます。
|
2300
|
-
*
|
2301
|
-
* @param props - アクションのプロパティ。プロパティには `show_on_scroll`、`show_on_scroll_rate` そして `hide_on_scroll_releave` が必要です。
|
2302
|
-
* @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2303
|
-
* @param hide - アクションを非表示にするロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2304
|
-
*
|
2305
|
-
* @returns
|
2306
|
-
* スクロールが開始されている場合は、クリーンアップ関数を返します。そうでない場合は `null` を返します
|
2307
|
-
*
|
2308
|
-
* @internal
|
2309
|
-
*/
|
2310
|
-
export function showOnScroll<ModalProps extends Pick<Props, "show_on_scroll" | "show_on_scroll_rate" | "hide_on_scroll_releave">>(props: ModalProps, show?: Function, hide?: Function): (() => void) | null;
|
2311
|
-
/**
|
2312
|
-
* 時間に応じてアクションを表示するトリガー関数
|
2313
|
-
*
|
2314
|
-
* @param props - アクションのプロパティ。プロパティには `show_on_time` そして `show_on_time_count` が必要です。
|
2315
|
-
* @param show - アクションを表示するロジックが実装された関数。指定ない場合は noop 関数が使用されます。
|
2316
|
-
*
|
2317
|
-
* @remarks
|
2318
|
-
* 時間のカウントが `show_on_time_count` に達したときに `show` 関数を呼び出します。
|
2319
|
-
*
|
2320
|
-
* @returns
|
2321
|
-
* タイマーが開始された場合、タイマーをクリーンアップする関数を返します。それ以外は `null` を返します。
|
2322
|
-
*
|
2323
|
-
* @internal
|
2324
|
-
*/
|
2325
|
-
export function showOnTime<ModalProps extends Pick<Props, "show_on_time" | "show_on_time_count">>(props: ModalProps, show?: Function): (() => void) | null;
|
2326
|
-
/** @internal */
|
2327
|
-
export function and(fn: Function, ...conditionFns: Function[]): () => void;
|
2328
|
-
/** @internal */
|
2329
|
-
export function or(fn: Function, ...conditionFns: Function[]): () => void;
|
2330
|
-
export type ModalProps = Props;
|
2331
|
-
/**
|
2332
|
-
* 表示アクショントリガー
|
2333
|
-
*
|
2334
|
-
* @internal */
|
2335
|
-
export type ShowTrigger = "custom" | "auto" | "none";
|
2336
|
-
/**
|
2337
|
-
* 閉じるアクショントリガー
|
2338
|
-
*
|
2339
|
-
* @public
|
2340
|
-
*/
|
2341
|
-
export type CloseTrigger = "button" | "overlay" | "auto" | "none";
|
2342
|
-
/** @internal */
|
2343
|
-
const handleState: (event: any) => void;
|
2344
|
-
/**
|
2345
|
-
* アクションが表示 (show) された後にフックする関数
|
2346
|
-
*
|
2347
|
-
* @param fn - 呼び出されるフック関数
|
2348
|
-
*
|
2349
|
-
* @public
|
2350
|
-
*/
|
2351
|
-
export function onShow<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
|
2352
|
-
/**
|
2353
|
-
* アクションのライフサイクル close で呼び出されるフックする関数
|
2354
|
-
*
|
2355
|
-
* @param props - アクションのプロパティ
|
2356
|
-
* @param trigger - Close トリガー
|
2357
|
-
*
|
2358
|
-
* @public
|
2359
|
-
*/
|
2360
|
-
export type ActionCloseHook<Props extends ModalProps, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
|
2361
|
-
/**
|
2362
|
-
* アクションがクローズ (close) される前にフックする関数
|
2363
|
-
*
|
2364
|
-
* @param fn - 呼び出されるフック関数
|
2365
|
-
*
|
2366
|
-
* @public
|
2367
|
-
*/
|
2368
|
-
export function onClose<Props extends ModalProps, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
|
2369
|
-
/**
|
2370
|
-
* アクションのステートが変更された (changeState) 後にフックする関数
|
2371
|
-
*
|
2372
|
-
* @param fn - 呼び出されるフック関数
|
2373
|
-
*
|
2374
|
-
* @public
|
2375
|
-
*/
|
2376
|
-
export function onChangeState<Props extends ModalProps, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
|
2377
|
-
/**
|
2378
|
-
* アクションを表示する
|
2379
|
-
*
|
2380
|
-
* @public
|
2381
|
-
*/
|
2382
|
-
export function showAction(): void;
|
2383
|
-
/**
|
2384
|
-
* アクションを閉じる
|
2385
|
-
*
|
2386
|
-
* @param trigger - 閉じた時のトリガー。デフォルト `'none'`
|
2387
|
-
*
|
2388
|
-
* @public
|
2389
|
-
*/
|
2390
|
-
export function closeAction(trigger?: CloseTrigger): void;
|
2391
|
-
/**
|
2392
|
-
* アクションに CSS を適用する
|
2393
|
-
*
|
2394
|
-
* @param css - 適用する CSS
|
2395
|
-
*
|
2396
|
-
* @returns 適用された style 要素を返す Promise
|
2397
|
-
*
|
2398
|
-
* @public
|
2399
|
-
*/
|
2400
|
-
export function applyCss(css: string): Promise<HTMLStyleElement>;
|
2401
|
-
/**
|
2402
|
-
* アクションにグローバルなスタイルを読み込む
|
2403
|
-
*
|
2404
|
-
* @param href - style ファイルのリンク URL
|
2405
|
-
*
|
2406
|
-
* @public
|
2407
|
-
*/
|
2408
|
-
export function loadStyle(href: string): Promise<void>;
|
2409
|
-
// @internal
|
2410
|
-
export function getCssVariables(data: {
|
2411
|
-
[key: string]: string | number;
|
2412
|
-
}): string;
|
2413
|
-
/**
|
2414
|
-
* アクションのルートの DOM 要素を取得する
|
2415
|
-
*
|
2416
|
-
* @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
|
2417
|
-
*
|
2418
|
-
* @public
|
2419
|
-
*/
|
2420
|
-
export function getActionRoot(): ShadowRoot | null;
|
2421
|
-
/** @internal */
|
2422
|
-
export function createModal<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
2423
|
-
/** @internal */
|
2424
|
-
export function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
|
2425
|
-
// -------- The following codes are deprecated --------
|
2426
|
-
/**
|
2427
|
-
* 非推奨
|
2428
|
-
*
|
2429
|
-
* @deprecated 非推奨
|
2430
|
-
*
|
2431
|
-
* @internal
|
2432
|
-
*/
|
2433
|
-
export function getActionShadowRoot(): ShadowRoot | null;
|
2434
|
-
/**
|
2435
|
-
* 非推奨
|
2436
|
-
*
|
2437
|
-
* @deprecated 非推奨
|
2438
|
-
*
|
2439
|
-
* @internal
|
2440
|
-
*/
|
2441
|
-
const show: typeof showAction;
|
2442
|
-
/**
|
2443
|
-
* 非推奨
|
2444
|
-
*
|
2445
|
-
* @deprecated 非推奨
|
2446
|
-
*
|
2447
|
-
* @internal
|
2448
|
-
*/
|
2449
|
-
const close: typeof closeAction;
|
2450
|
-
/**
|
2451
|
-
* 非推奨
|
2452
|
-
*
|
2453
|
-
* @deprecated 非推奨
|
2454
|
-
*
|
2455
|
-
* @internal
|
2456
|
-
*/
|
2457
|
-
export interface App {
|
2458
|
-
/**
|
2459
|
-
* The method to destroy an app instance.
|
2460
|
-
*/
|
2461
|
-
close: () => void;
|
2462
|
-
/**
|
2463
|
-
* The method to show an app instance.
|
2464
|
-
*/
|
2465
|
-
show: () => void;
|
2466
|
-
}
|
2467
|
-
/**
|
2468
|
-
* 非推奨
|
2469
|
-
*
|
2470
|
-
* @deprecated 非推奨
|
2471
|
-
*
|
2472
|
-
* @internal
|
2473
|
-
*/
|
2474
|
-
export type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
|
2475
|
-
/**
|
2476
|
-
* 非推奨
|
2477
|
-
*
|
2478
|
-
* @deprecated 非推奨
|
2479
|
-
*
|
2480
|
-
* @internal
|
2481
|
-
*/
|
2482
|
-
export type ModalOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
|
2483
|
-
/**
|
2484
|
-
* 非推奨
|
2485
|
-
*
|
2486
|
-
* @deprecated 非推奨
|
2487
|
-
*
|
2488
|
-
* @internal
|
2489
|
-
*/
|
2490
|
-
const ensureModalRoot: typeof ensureActionRoot;
|
2491
|
-
/**
|
2492
|
-
* 非推奨
|
2493
|
-
*
|
2494
|
-
* @deprecated 非推奨
|
2495
|
-
*
|
2496
|
-
* @internal
|
2497
|
-
*/
|
2498
|
-
export function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables, VariablesQuery>): App;
|
2499
|
-
/**
|
2500
|
-
* 非推奨
|
2501
|
-
*
|
2502
|
-
* @deprecated 非推奨
|
2503
|
-
*
|
2504
|
-
* @internal
|
2505
|
-
*/
|
2506
|
-
export function createFog({ color, opacity, zIndex, onclick }: {
|
2507
|
-
color?: string;
|
2508
|
-
opacity?: string;
|
2509
|
-
zIndex?: number;
|
2510
|
-
onclick: () => void;
|
2511
|
-
}): {
|
2512
|
-
fog: HTMLDivElement;
|
2513
|
-
close: () => void;
|
2514
|
-
};
|
2515
|
-
// @ts-ignore
|
2516
|
-
export type ChangeValCallback = ({ newVal, oldVal, key }: {
|
2517
|
-
newVal: any;
|
2518
|
-
oldVal: any;
|
2519
|
-
key: any;
|
2520
|
-
}) => void;
|
2521
|
-
export type EventCallback = (event: any) => void;
|
2522
|
-
export type WidgetEventName = "hide" | "clickBackdrop" | "destroyed";
|
2523
|
-
/**
|
2524
|
-
* 変数を設定する
|
2525
|
-
*
|
2526
|
-
* @param name - 変数名
|
2527
|
-
* @param value - 変数値
|
2528
|
-
*
|
2529
|
-
* @public
|
2530
|
-
*/
|
2531
|
-
export function setVal(name: string, value: any): void;
|
2532
|
-
/**
|
2533
|
-
* 変数を取得する
|
2534
|
-
*
|
2535
|
-
* @param name - 変数名
|
2536
|
-
*
|
2537
|
-
* @returns 変数値
|
2538
|
-
*
|
2539
|
-
* @public
|
2540
|
-
*/
|
2541
|
-
export function getVal(name: string): any;
|
2542
|
-
/**
|
2543
|
-
* 変数が変更されたときに実行されるコールバック関数を設定する
|
2544
|
-
*
|
2545
|
-
* @param name - 変数名
|
2546
|
-
* @param callback - コールバック関数
|
2547
|
-
*
|
2548
|
-
* @public
|
2549
|
-
*/
|
2550
|
-
export function onChangeVal(name: string, callback: ChangeValCallback): void;
|
2551
|
-
/**
|
2552
|
-
* WEBのイベントが発生したときに実行されるコールバック関数を設定する
|
2553
|
-
*
|
2554
|
-
* @param name - WEBのイベント名
|
2555
|
-
* @param callback - コールバック関数
|
2556
|
-
*
|
2557
|
-
* @public
|
2558
|
-
*/
|
2559
|
-
export function method(name: string, callback: EventCallback): void;
|
2560
|
-
/**
|
2561
|
-
* Widgetのイベントが発生したときに実行されるコールバック関数を設定する
|
2562
|
-
*
|
2563
|
-
* @param name - Widgetのイベント名
|
2564
|
-
* @param callback - コールバック関数
|
2565
|
-
*
|
2566
|
-
* @public
|
2567
|
-
*/
|
2568
|
-
export function on(name: WidgetEventName, callback: EventCallback): void;
|
2569
|
-
/**
|
2570
|
-
* 現在のステートを設定する
|
2571
|
-
*
|
2572
|
-
* @param stateId - ステートID
|
2573
|
-
*
|
2574
|
-
* @public
|
2575
|
-
*/
|
2576
|
-
export function setState(stateId: string): void;
|
2577
|
-
/**
|
2578
|
-
* 現在のステートを取得する
|
2579
|
-
*
|
2580
|
-
* @returns ステートID
|
2581
|
-
*
|
2582
|
-
* @public
|
2583
|
-
*/
|
2584
|
-
export function getState(): string;
|
2585
|
-
/**
|
2586
|
-
* ページ内の変数を設定する
|
2587
|
-
*
|
2588
|
-
* @param key - 変数のキー
|
2589
|
-
* @param value - 変数値
|
2590
|
-
*
|
2591
|
-
* @public
|
2592
|
-
*/
|
2593
|
-
export function setMemoryStore(key: string, value: any): void;
|
2594
|
-
/**
|
2595
|
-
* ページ内の変数を取定する
|
2596
|
-
*
|
2597
|
-
* @param key - 変数のキー
|
2598
|
-
*
|
2599
|
-
* @returns 変数
|
2600
|
-
*
|
2601
|
-
* @public
|
2602
|
-
*/
|
2603
|
-
export function getMemoryStore(key: string): any;
|
2604
|
-
/**
|
2605
|
-
* ページをまたぐ変数を設定する
|
2606
|
-
*
|
2607
|
-
* @param key - 変数のキー
|
2608
|
-
* @param value - 変数値
|
2609
|
-
*
|
2610
|
-
* @public
|
2611
|
-
*/
|
2612
|
-
export function setLocalStore(key: string, value: any, options?: {
|
2613
|
-
expire: number | boolean;
|
2614
|
-
}): void;
|
2615
|
-
/**
|
2616
|
-
* ページをまたぐ変数を取得設定する
|
2617
|
-
*
|
2618
|
-
* @param key - 変数のキー
|
2619
|
-
*
|
2620
|
-
* @returns 変数
|
2621
|
-
*
|
2622
|
-
* @public
|
2623
|
-
*/
|
2624
|
-
export function getLocalStore(key: string): any | undefined;
|
2625
|
-
const storage: {
|
2626
|
-
memory: {
|
2627
|
-
store: typeof setMemoryStore;
|
2628
|
-
restore: typeof getMemoryStore;
|
2629
|
-
};
|
2630
|
-
local: {
|
2631
|
-
store: typeof setLocalStore;
|
2632
|
-
restore: typeof getLocalStore;
|
2633
|
-
};
|
2634
|
-
};
|
2635
|
-
/**
|
2636
|
-
* アクションテーブルを操作するオブジェクト
|
2637
|
-
*
|
2638
|
-
* @param table - アクションテーブル名
|
2639
|
-
*
|
2640
|
-
* @public
|
2641
|
-
*/
|
2642
|
-
export function collection$0(table: string): {
|
2643
|
-
get(key: string | string[], cb: (err: Error, items?: (string | number | boolean | Date) | (string | number | boolean | Date)[]) => void): void;
|
2644
|
-
getByQuery(query_name: string, params: {
|
2645
|
-
[key: string]: (string | number | boolean | Date) | (string | number | boolean | Date)[];
|
2646
|
-
}, options: {
|
2647
|
-
ignore_fields?: string[];
|
2648
|
-
}, cb: (err: Error, items?: (string | number | boolean | Date)[]) => void): void;
|
2649
|
-
set(key: string, value: string, cb: (err: Error) => void): void;
|
2650
|
-
};
|
2651
|
-
/**
|
2652
|
-
* アクションを表示する
|
2653
|
-
*
|
2654
|
-
* @remarks
|
2655
|
-
* この関数は {@link showAction} のエイリアスです
|
2656
|
-
*
|
2657
|
-
* @public
|
2658
|
-
*/
|
2659
|
-
{ showAction as show, closeAction as hide };
|
2660
|
-
}
|
2661
|
-
|
2662
|
-
/** @internal */
|
2663
|
-
export declare type WritingMode = (typeof WritingModes)[number];
|
2664
|
-
|
2665
|
-
/** @internal */
|
2666
|
-
export declare const WritingModes: readonly [
|
2667
|
-
"horizontal-tb",
|
2668
|
-
"vertical-lr"
|
2669
|
-
];
|
2670
|
-
|
2671
|
-
export { }
|