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