@plaidev/karte-action-sdk 1.1.258 → 1.1.260-28971692.91de26ce

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