@plaidev/karte-action-sdk 1.1.97 → 1.1.98
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 +364 -58
- package/dist/hydrate/index.es.js +293 -85
- package/dist/index.es.d.ts +364 -58
- package/dist/index.es.js +293 -85
- package/package.json +2 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UIから選択できる関数
|
|
3
|
-
*/
|
|
4
|
-
import { get as get_ } from "svelte/store";
|
|
5
1
|
import { Writable as Writable_ } from "svelte/store";
|
|
2
|
+
import { get as get_ } from "svelte/store";
|
|
6
3
|
import { SvelteComponentDev } from "svelte/internal";
|
|
7
4
|
declare const PropTypes: readonly [
|
|
8
5
|
"BooleanKeyword",
|
|
@@ -200,7 +197,7 @@ type BorderStyle = string;
|
|
|
200
197
|
type BorderWidth = `${number}px`;
|
|
201
198
|
type Style = string;
|
|
202
199
|
type StateName = string;
|
|
203
|
-
type ListSeparatorType = "none" | "border" | "
|
|
200
|
+
type ListSeparatorType = "none" | "border" | "gap";
|
|
204
201
|
interface BaseListSeparator {
|
|
205
202
|
type: ListSeparatorType;
|
|
206
203
|
}
|
|
@@ -213,24 +210,35 @@ interface ListSeparatorBorder extends BaseListSeparator {
|
|
|
213
210
|
borderWidth?: BorderWidth;
|
|
214
211
|
borderColor?: Color;
|
|
215
212
|
}
|
|
216
|
-
interface ListSeparatorStripe extends BaseListSeparator {
|
|
217
|
-
type: "stripe";
|
|
218
|
-
background1?: Color;
|
|
219
|
-
background2?: Color;
|
|
220
|
-
}
|
|
221
213
|
interface ListSeparatorGap extends BaseListSeparator {
|
|
222
214
|
type: "gap";
|
|
223
215
|
gap: Length;
|
|
224
216
|
}
|
|
225
|
-
type ListSeparator = ListSeparatorNone | ListSeparatorBorder |
|
|
217
|
+
type ListSeparator = ListSeparatorNone | ListSeparatorBorder | ListSeparatorGap;
|
|
226
218
|
declare const DefaultListSeparatorNone: Required<ListSeparatorNone>;
|
|
227
219
|
declare const DefaultListSeparatorBorder: Required<ListSeparatorBorder>;
|
|
228
|
-
declare const DefaultListSeparatorStripe: Required<ListSeparatorStripe>;
|
|
229
220
|
declare const DefaultListSeparatorGap: Required<ListSeparatorGap>;
|
|
230
221
|
declare const DefaultListSeparator: Required<ListSeparatorBorder>;
|
|
222
|
+
type ListBackgroundType = "none" | "stripe";
|
|
223
|
+
interface BaseListBackground {
|
|
224
|
+
type: ListBackgroundType;
|
|
225
|
+
}
|
|
226
|
+
interface ListBackgroundNone extends BaseListBackground {
|
|
227
|
+
type: "none";
|
|
228
|
+
}
|
|
229
|
+
interface ListBackgroundStripe extends BaseListBackground {
|
|
230
|
+
type: "stripe";
|
|
231
|
+
background1?: Color;
|
|
232
|
+
background2?: Color;
|
|
233
|
+
}
|
|
234
|
+
type ListBackground = ListBackgroundNone | ListBackgroundStripe;
|
|
235
|
+
declare const DefaultListBackgroundNone: Required<ListBackgroundNone>;
|
|
236
|
+
declare const DefaultListBackgroundStripe: Required<ListBackgroundStripe>;
|
|
237
|
+
declare const DefaultListBackground: Required<ListBackgroundNone>;
|
|
231
238
|
type ListDirection = "vertical" | "horizontal";
|
|
232
239
|
type ListContext = {
|
|
233
240
|
separator: ListSeparator;
|
|
241
|
+
background: ListBackground;
|
|
234
242
|
direction: ListDirection;
|
|
235
243
|
registerItem: (props: {
|
|
236
244
|
onMount: (props: {
|
|
@@ -242,92 +250,235 @@ type ListContext = {
|
|
|
242
250
|
};
|
|
243
251
|
// Wrap svelte tools
|
|
244
252
|
type Store<T> = Writable_<T>;
|
|
253
|
+
/**
|
|
254
|
+
* @deprecated
|
|
255
|
+
*/
|
|
245
256
|
declare const getStoreState: typeof get_;
|
|
257
|
+
type SystemConfig = {
|
|
258
|
+
apiKey?: string;
|
|
259
|
+
campaignId?: string;
|
|
260
|
+
shortenId?: string;
|
|
261
|
+
};
|
|
262
|
+
type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
|
246
263
|
type OPTIONS = {
|
|
247
264
|
send?: (event_name: string, values?: any) => void;
|
|
248
265
|
isPreview?: boolean;
|
|
249
266
|
initialState?: string;
|
|
250
267
|
};
|
|
251
|
-
declare const isPreview: () => boolean;
|
|
252
268
|
type CustomVariables = {
|
|
253
269
|
[key: string]: any;
|
|
254
270
|
};
|
|
255
|
-
|
|
256
|
-
type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
|
257
|
-
type SystemConfig = {
|
|
258
|
-
apiKey?: string;
|
|
259
|
-
campaignId?: string;
|
|
260
|
-
shortenId?: string;
|
|
261
|
-
};
|
|
262
|
-
declare const ALL_ACTION_ID = "KARTE_ALL_ACTION_ID";
|
|
263
|
-
declare const ALL_ACTION_SHORTEN_ID = "KARTE_ALL_ACTION_SHORTEN_ID";
|
|
264
|
-
declare const actionId: string;
|
|
265
|
-
declare const ACTION_SHOW_EVENT: string;
|
|
266
|
-
declare const ACTION_CLOSE_EVENT: string;
|
|
267
|
-
declare const ACTION_DESTROY_EVENT: string;
|
|
268
|
-
declare const ACTION_CHANGE_STATE_EVENT: string;
|
|
271
|
+
declare const functionOptions: Store<OPTIONS>;
|
|
269
272
|
/**
|
|
270
273
|
* Store to read KARTE system config
|
|
271
274
|
*/
|
|
272
275
|
declare const system: Store<SystemConfig>;
|
|
276
|
+
/**
|
|
277
|
+
* {@link getSystem} function to get KARTE system config.
|
|
278
|
+
* @return {SystemConfig} Current karte system config
|
|
279
|
+
*/
|
|
280
|
+
declare function getSystem(): SystemConfig;
|
|
281
|
+
/**
|
|
282
|
+
* {@link setSystem} function to set KARTE system config.
|
|
283
|
+
*/
|
|
284
|
+
declare function setSystem(config: SystemConfig): void;
|
|
273
285
|
/**
|
|
274
286
|
* Store to handle current state ID
|
|
287
|
+
*
|
|
288
|
+
* This is exported becase of compatible interface for App.svelte.
|
|
289
|
+
* Don't use directly.
|
|
275
290
|
*/
|
|
276
291
|
declare const state: Store<string>;
|
|
292
|
+
/**
|
|
293
|
+
* {@link setState} function to set current state ID.
|
|
294
|
+
*/
|
|
295
|
+
declare function setState(stateId: string, force?: boolean): void;
|
|
296
|
+
/**
|
|
297
|
+
* {@link getState} function to get current state ID.
|
|
298
|
+
* @return {string} Current state ID
|
|
299
|
+
*/
|
|
300
|
+
declare function getState(): string;
|
|
277
301
|
/**
|
|
278
302
|
* Store to handle all state IDs
|
|
279
303
|
*/
|
|
280
304
|
declare const states: Store<string[]>;
|
|
305
|
+
/**
|
|
306
|
+
* {@link getStates} function to add new state ID to list of state IDs.
|
|
307
|
+
* @param {string} New state ID
|
|
308
|
+
*/
|
|
309
|
+
declare function addState(stateId: string): void;
|
|
310
|
+
/**
|
|
311
|
+
* {@link getStates} function to get a list of all state IDs.
|
|
312
|
+
* @return {string[]} All state IDs
|
|
313
|
+
*/
|
|
314
|
+
declare function getStates(): string[];
|
|
281
315
|
/**
|
|
282
316
|
* Store to handle visibility of action
|
|
283
317
|
*/
|
|
284
318
|
declare const opened: Store<boolean>;
|
|
319
|
+
/**
|
|
320
|
+
* {@link isOpened} function to check if action is opened.
|
|
321
|
+
* @return {boolean} Flag if action is opend / true: Opend, false: Not opened
|
|
322
|
+
*/
|
|
323
|
+
declare function isOpened(): boolean;
|
|
324
|
+
/**
|
|
325
|
+
* {@link setOpened} function to set if action is opened.
|
|
326
|
+
*/
|
|
327
|
+
declare function setOpened(on: boolean): void;
|
|
285
328
|
/**
|
|
286
329
|
* Store to handle visibility of action
|
|
330
|
+
*
|
|
287
331
|
* @deprecated
|
|
288
332
|
*/
|
|
289
333
|
declare const closed: Store<boolean>; // deprecated
|
|
334
|
+
/**
|
|
335
|
+
* {@link isClosed} function to check if action is clsoed.
|
|
336
|
+
* @deprecated
|
|
337
|
+
* @return {boolean} Flag if action is closed / true: Closed, false: Not closed
|
|
338
|
+
*/
|
|
339
|
+
declare function isClosed(): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* {@link setClosed} function to set if action is closed.
|
|
342
|
+
*
|
|
343
|
+
* @deprecated
|
|
344
|
+
*/
|
|
345
|
+
declare function setClosed(on: boolean): void;
|
|
290
346
|
/**
|
|
291
347
|
* Store to handle max z-index for grid items
|
|
292
348
|
*/
|
|
293
349
|
declare const maximumZindex: Store<number>;
|
|
350
|
+
/**
|
|
351
|
+
* {@link getMaximumZindex} function to get maximum z-index.
|
|
352
|
+
*/
|
|
353
|
+
declare const setMaximumZindex: (zindex?: number) => void;
|
|
294
354
|
/**
|
|
295
355
|
* Store to handle internal event handlers
|
|
356
|
+
*
|
|
357
|
+
* This is used internally.
|
|
296
358
|
*/
|
|
297
359
|
declare const internalHandlers: Store<{
|
|
298
360
|
[key: string]: ActionEventHandler[];
|
|
299
361
|
}>;
|
|
362
|
+
/**
|
|
363
|
+
* {@link getInternalHandlers} function to get internal event handlers.
|
|
364
|
+
* @return {{ [key: string]: ActionEventHandler }} Current internal handlers
|
|
365
|
+
*/
|
|
366
|
+
declare function getInternalHandlers(): {
|
|
367
|
+
[key: string]: ActionEventHandler[];
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* {@link setInternalHandlers} function to set internal event handlers.
|
|
371
|
+
*/
|
|
372
|
+
declare function setInternalHandlers(handlers: {
|
|
373
|
+
[key: string]: ActionEventHandler[];
|
|
374
|
+
}): void;
|
|
375
|
+
/**
|
|
376
|
+
* {@link updateInternalHandlers} function to update internal event handlers.
|
|
377
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers Updated internal event handlers
|
|
378
|
+
* @return {{ [key: string]: ActionEventHandler }} New internal handlers
|
|
379
|
+
*/
|
|
380
|
+
declare function updateInternalHandlers(handlers: {
|
|
381
|
+
[key: string]: ActionEventHandler[];
|
|
382
|
+
}): {
|
|
383
|
+
[key: string]: ActionEventHandler[];
|
|
384
|
+
};
|
|
300
385
|
/**
|
|
301
386
|
* Store to handle custom event handlers
|
|
387
|
+
*
|
|
388
|
+
* This is used internally.
|
|
302
389
|
*/
|
|
303
390
|
declare const customHandlers: Store<{
|
|
304
391
|
[key: string]: ActionEventHandler;
|
|
305
392
|
}>;
|
|
393
|
+
/**
|
|
394
|
+
* {@link getCustomHandlers} function to get custom event handlers.
|
|
395
|
+
* @return {{ [key: string]: ActionEventHandler }} Current custom event handlers
|
|
396
|
+
*/
|
|
397
|
+
declare function getCustomHandlers(): {
|
|
398
|
+
[key: string]: ActionEventHandler;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* {@link setCustomHandlers} function to set custom event handlers.
|
|
402
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers New custom event handlers
|
|
403
|
+
*/
|
|
404
|
+
declare function setCustomHandlers(handlers: {
|
|
405
|
+
[key: string]: ActionEventHandler;
|
|
406
|
+
}): void;
|
|
407
|
+
/**
|
|
408
|
+
* {@link updateCustomHandlers} function to update custom event handlers.
|
|
409
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers Updated custom event handlers
|
|
410
|
+
* @return {{ [key: string]: ActionEventHandler }} New custom event handlers
|
|
411
|
+
*/
|
|
412
|
+
declare function updateCustomHandlers(handlers: {
|
|
413
|
+
[key: string]: ActionEventHandler;
|
|
414
|
+
}): {
|
|
415
|
+
[key: string]: ActionEventHandler;
|
|
416
|
+
};
|
|
306
417
|
/**
|
|
307
418
|
* Store to handle destruction of action
|
|
308
419
|
*/
|
|
309
420
|
declare const destroyed: Store<boolean>;
|
|
310
421
|
/**
|
|
311
|
-
*
|
|
422
|
+
* {@link isDestroyed} function to check if action is destroyed.
|
|
423
|
+
* @return {boolean} Flag if action is destoryed / true: Destroyed, false: Not Destroyed
|
|
424
|
+
*/
|
|
425
|
+
declare function isDestroyed(): boolean;
|
|
426
|
+
/**
|
|
427
|
+
* {@link setDestroyed} function to set if action is destroyed. */
|
|
428
|
+
declare function setDestroyed(on: boolean): void;
|
|
429
|
+
/**
|
|
430
|
+
* Store to handle stopping action
|
|
312
431
|
*/
|
|
313
432
|
declare const stopped: Store<boolean>;
|
|
433
|
+
/**
|
|
434
|
+
* {@link isStopped} function to check if action is stopped.
|
|
435
|
+
* @return {boolean} Flag if action is stopped / true: Stopped, false: Not stopped
|
|
436
|
+
*/
|
|
437
|
+
declare function isStopped(): boolean;
|
|
438
|
+
/**
|
|
439
|
+
* {@link setStopped} function to set if action is stopped.
|
|
440
|
+
*/
|
|
441
|
+
declare function setStopped(on: boolean): void;
|
|
314
442
|
/**
|
|
315
443
|
* Store to handle custom variables
|
|
316
444
|
*/
|
|
317
445
|
declare const customVariables: Store<{
|
|
318
446
|
[key: string]: any;
|
|
319
447
|
}>;
|
|
448
|
+
/**
|
|
449
|
+
* {@link getCustomVariables} function to get custom variables.
|
|
450
|
+
* @return {CustomVariables} Current custom variables
|
|
451
|
+
*/
|
|
452
|
+
declare function getCustomVariables(): CustomVariables;
|
|
453
|
+
/**
|
|
454
|
+
* {@link setCustomVariables} function to set custom variables.
|
|
455
|
+
* @param {CustomVariables} variables New custom variables
|
|
456
|
+
*/
|
|
457
|
+
declare function setCustomVariables(variables: CustomVariables): void;
|
|
458
|
+
/**
|
|
459
|
+
* {@link updateCustomVariables} function to update custom variables.
|
|
460
|
+
* @param {CustomVariables} variables Updated custom variables
|
|
461
|
+
* @return {CustomVariables} New custom variables
|
|
462
|
+
*/
|
|
463
|
+
declare function updateCustomVariables(variables: CustomVariables): CustomVariables;
|
|
464
|
+
type CloseTrigger = "button" | "overlay" | "auto" | "none";
|
|
465
|
+
declare const ALL_ACTION_ID = "KARTE_ALL_ACTION_ID";
|
|
466
|
+
declare const ALL_ACTION_SHORTEN_ID = "KARTE_ALL_ACTION_SHORTEN_ID";
|
|
467
|
+
declare const actionId: string;
|
|
468
|
+
declare const ACTION_SHOW_EVENT: string;
|
|
469
|
+
declare const ACTION_CLOSE_EVENT: string;
|
|
470
|
+
declare const ACTION_DESTROY_EVENT: string;
|
|
471
|
+
declare const ACTION_CHANGE_STATE_EVENT: string;
|
|
320
472
|
/**
|
|
321
473
|
* {@link setAutoStart} function to set auto start flag.
|
|
322
474
|
*
|
|
323
475
|
* @param {boolean} on
|
|
324
476
|
*/
|
|
325
477
|
declare const setAutoStart: (on?: boolean) => void;
|
|
326
|
-
declare const
|
|
478
|
+
declare const handleState: (event: any) => void;
|
|
327
479
|
declare const initialize: (options?: OPTIONS) => () => void;
|
|
328
480
|
declare const finalize: () => void;
|
|
329
481
|
declare const send_event: (event_name: string, values?: any) => void;
|
|
330
|
-
declare const setMiximumZindex: (zindex?: number) => void;
|
|
331
482
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
332
483
|
declare const none: () => () => void;
|
|
333
484
|
declare const moveTo: (to: string) => () => void;
|
|
@@ -408,6 +559,7 @@ declare function loadGlobalStyle(href: string): Promise<any>;
|
|
|
408
559
|
*/
|
|
409
560
|
declare function hashCode(s: string): string;
|
|
410
561
|
declare const NOOP: Function;
|
|
562
|
+
declare const isPreview: () => boolean;
|
|
411
563
|
declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
|
|
412
564
|
declare const setPreviousFocus: () => void;
|
|
413
565
|
declare const handleKeydown: (handlers: {
|
|
@@ -950,7 +1102,7 @@ declare namespace widget {
|
|
|
950
1102
|
type BorderWidth = `${number}px`;
|
|
951
1103
|
type Style = string;
|
|
952
1104
|
type StateName = string;
|
|
953
|
-
type ListSeparatorType = "none" | "border" | "
|
|
1105
|
+
type ListSeparatorType = "none" | "border" | "gap";
|
|
954
1106
|
interface BaseListSeparator {
|
|
955
1107
|
type: ListSeparatorType;
|
|
956
1108
|
}
|
|
@@ -963,24 +1115,35 @@ declare namespace widget {
|
|
|
963
1115
|
borderWidth?: BorderWidth;
|
|
964
1116
|
borderColor?: Color;
|
|
965
1117
|
}
|
|
966
|
-
interface ListSeparatorStripe extends BaseListSeparator {
|
|
967
|
-
type: "stripe";
|
|
968
|
-
background1?: Color;
|
|
969
|
-
background2?: Color;
|
|
970
|
-
}
|
|
971
1118
|
interface ListSeparatorGap extends BaseListSeparator {
|
|
972
1119
|
type: "gap";
|
|
973
1120
|
gap: Length;
|
|
974
1121
|
}
|
|
975
|
-
type ListSeparator = ListSeparatorNone | ListSeparatorBorder |
|
|
1122
|
+
type ListSeparator = ListSeparatorNone | ListSeparatorBorder | ListSeparatorGap;
|
|
976
1123
|
const DefaultListSeparatorNone: Required<ListSeparatorNone>;
|
|
977
1124
|
const DefaultListSeparatorBorder: Required<ListSeparatorBorder>;
|
|
978
|
-
const DefaultListSeparatorStripe: Required<ListSeparatorStripe>;
|
|
979
1125
|
const DefaultListSeparatorGap: Required<ListSeparatorGap>;
|
|
980
1126
|
const DefaultListSeparator: Required<ListSeparatorBorder>;
|
|
1127
|
+
type ListBackgroundType = "none" | "stripe";
|
|
1128
|
+
interface BaseListBackground {
|
|
1129
|
+
type: ListBackgroundType;
|
|
1130
|
+
}
|
|
1131
|
+
interface ListBackgroundNone extends BaseListBackground {
|
|
1132
|
+
type: "none";
|
|
1133
|
+
}
|
|
1134
|
+
interface ListBackgroundStripe extends BaseListBackground {
|
|
1135
|
+
type: "stripe";
|
|
1136
|
+
background1?: Color;
|
|
1137
|
+
background2?: Color;
|
|
1138
|
+
}
|
|
1139
|
+
type ListBackground = ListBackgroundNone | ListBackgroundStripe;
|
|
1140
|
+
const DefaultListBackgroundNone: Required<ListBackgroundNone>;
|
|
1141
|
+
const DefaultListBackgroundStripe: Required<ListBackgroundStripe>;
|
|
1142
|
+
const DefaultListBackground: Required<ListBackgroundNone>;
|
|
981
1143
|
type ListDirection = "vertical" | "horizontal";
|
|
982
1144
|
type ListContext = {
|
|
983
1145
|
separator: ListSeparator;
|
|
1146
|
+
background: ListBackground;
|
|
984
1147
|
direction: ListDirection;
|
|
985
1148
|
registerItem: (props: {
|
|
986
1149
|
onMount: (props: {
|
|
@@ -992,92 +1155,235 @@ declare namespace widget {
|
|
|
992
1155
|
};
|
|
993
1156
|
// Wrap svelte tools
|
|
994
1157
|
type Store<T> = Writable_<T>;
|
|
1158
|
+
/**
|
|
1159
|
+
* @deprecated
|
|
1160
|
+
*/
|
|
995
1161
|
const getStoreState: typeof get_;
|
|
1162
|
+
type SystemConfig = {
|
|
1163
|
+
apiKey?: string;
|
|
1164
|
+
campaignId?: string;
|
|
1165
|
+
shortenId?: string;
|
|
1166
|
+
};
|
|
1167
|
+
type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
|
996
1168
|
type OPTIONS = {
|
|
997
1169
|
send?: (event_name: string, values?: any) => void;
|
|
998
1170
|
isPreview?: boolean;
|
|
999
1171
|
initialState?: string;
|
|
1000
1172
|
};
|
|
1001
|
-
const isPreview: () => boolean;
|
|
1002
1173
|
type CustomVariables = {
|
|
1003
1174
|
[key: string]: any;
|
|
1004
1175
|
};
|
|
1005
|
-
|
|
1006
|
-
type ActionEventHandler = (...args: any[]) => any | Promise<any>;
|
|
1007
|
-
type SystemConfig = {
|
|
1008
|
-
apiKey?: string;
|
|
1009
|
-
campaignId?: string;
|
|
1010
|
-
shortenId?: string;
|
|
1011
|
-
};
|
|
1012
|
-
const ALL_ACTION_ID = "KARTE_ALL_ACTION_ID";
|
|
1013
|
-
const ALL_ACTION_SHORTEN_ID = "KARTE_ALL_ACTION_SHORTEN_ID";
|
|
1014
|
-
const actionId: string;
|
|
1015
|
-
const ACTION_SHOW_EVENT: string;
|
|
1016
|
-
const ACTION_CLOSE_EVENT: string;
|
|
1017
|
-
const ACTION_DESTROY_EVENT: string;
|
|
1018
|
-
const ACTION_CHANGE_STATE_EVENT: string;
|
|
1176
|
+
const functionOptions: Store<OPTIONS>;
|
|
1019
1177
|
/**
|
|
1020
1178
|
* Store to read KARTE system config
|
|
1021
1179
|
*/
|
|
1022
1180
|
const system: Store<SystemConfig>;
|
|
1181
|
+
/**
|
|
1182
|
+
* {@link getSystem} function to get KARTE system config.
|
|
1183
|
+
* @return {SystemConfig} Current karte system config
|
|
1184
|
+
*/
|
|
1185
|
+
function getSystem(): SystemConfig;
|
|
1186
|
+
/**
|
|
1187
|
+
* {@link setSystem} function to set KARTE system config.
|
|
1188
|
+
*/
|
|
1189
|
+
function setSystem(config: SystemConfig): void;
|
|
1023
1190
|
/**
|
|
1024
1191
|
* Store to handle current state ID
|
|
1192
|
+
*
|
|
1193
|
+
* This is exported becase of compatible interface for App.svelte.
|
|
1194
|
+
* Don't use directly.
|
|
1025
1195
|
*/
|
|
1026
1196
|
const state: Store<string>;
|
|
1197
|
+
/**
|
|
1198
|
+
* {@link setState} function to set current state ID.
|
|
1199
|
+
*/
|
|
1200
|
+
function setState(stateId: string, force?: boolean): void;
|
|
1201
|
+
/**
|
|
1202
|
+
* {@link getState} function to get current state ID.
|
|
1203
|
+
* @return {string} Current state ID
|
|
1204
|
+
*/
|
|
1205
|
+
function getState(): string;
|
|
1027
1206
|
/**
|
|
1028
1207
|
* Store to handle all state IDs
|
|
1029
1208
|
*/
|
|
1030
1209
|
const states: Store<string[]>;
|
|
1210
|
+
/**
|
|
1211
|
+
* {@link getStates} function to add new state ID to list of state IDs.
|
|
1212
|
+
* @param {string} New state ID
|
|
1213
|
+
*/
|
|
1214
|
+
function addState(stateId: string): void;
|
|
1215
|
+
/**
|
|
1216
|
+
* {@link getStates} function to get a list of all state IDs.
|
|
1217
|
+
* @return {string[]} All state IDs
|
|
1218
|
+
*/
|
|
1219
|
+
function getStates(): string[];
|
|
1031
1220
|
/**
|
|
1032
1221
|
* Store to handle visibility of action
|
|
1033
1222
|
*/
|
|
1034
1223
|
const opened: Store<boolean>;
|
|
1224
|
+
/**
|
|
1225
|
+
* {@link isOpened} function to check if action is opened.
|
|
1226
|
+
* @return {boolean} Flag if action is opend / true: Opend, false: Not opened
|
|
1227
|
+
*/
|
|
1228
|
+
function isOpened(): boolean;
|
|
1229
|
+
/**
|
|
1230
|
+
* {@link setOpened} function to set if action is opened.
|
|
1231
|
+
*/
|
|
1232
|
+
function setOpened(on: boolean): void;
|
|
1035
1233
|
/**
|
|
1036
1234
|
* Store to handle visibility of action
|
|
1235
|
+
*
|
|
1037
1236
|
* @deprecated
|
|
1038
1237
|
*/
|
|
1039
1238
|
const closed: Store<boolean>; // deprecated
|
|
1239
|
+
/**
|
|
1240
|
+
* {@link isClosed} function to check if action is clsoed.
|
|
1241
|
+
* @deprecated
|
|
1242
|
+
* @return {boolean} Flag if action is closed / true: Closed, false: Not closed
|
|
1243
|
+
*/
|
|
1244
|
+
function isClosed(): boolean;
|
|
1245
|
+
/**
|
|
1246
|
+
* {@link setClosed} function to set if action is closed.
|
|
1247
|
+
*
|
|
1248
|
+
* @deprecated
|
|
1249
|
+
*/
|
|
1250
|
+
function setClosed(on: boolean): void;
|
|
1040
1251
|
/**
|
|
1041
1252
|
* Store to handle max z-index for grid items
|
|
1042
1253
|
*/
|
|
1043
1254
|
const maximumZindex: Store<number>;
|
|
1255
|
+
/**
|
|
1256
|
+
* {@link getMaximumZindex} function to get maximum z-index.
|
|
1257
|
+
*/
|
|
1258
|
+
const setMaximumZindex: (zindex?: number) => void;
|
|
1044
1259
|
/**
|
|
1045
1260
|
* Store to handle internal event handlers
|
|
1261
|
+
*
|
|
1262
|
+
* This is used internally.
|
|
1046
1263
|
*/
|
|
1047
1264
|
const internalHandlers: Store<{
|
|
1048
1265
|
[key: string]: ActionEventHandler[];
|
|
1049
1266
|
}>;
|
|
1267
|
+
/**
|
|
1268
|
+
* {@link getInternalHandlers} function to get internal event handlers.
|
|
1269
|
+
* @return {{ [key: string]: ActionEventHandler }} Current internal handlers
|
|
1270
|
+
*/
|
|
1271
|
+
function getInternalHandlers(): {
|
|
1272
|
+
[key: string]: ActionEventHandler[];
|
|
1273
|
+
};
|
|
1274
|
+
/**
|
|
1275
|
+
* {@link setInternalHandlers} function to set internal event handlers.
|
|
1276
|
+
*/
|
|
1277
|
+
function setInternalHandlers(handlers: {
|
|
1278
|
+
[key: string]: ActionEventHandler[];
|
|
1279
|
+
}): void;
|
|
1280
|
+
/**
|
|
1281
|
+
* {@link updateInternalHandlers} function to update internal event handlers.
|
|
1282
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers Updated internal event handlers
|
|
1283
|
+
* @return {{ [key: string]: ActionEventHandler }} New internal handlers
|
|
1284
|
+
*/
|
|
1285
|
+
function updateInternalHandlers(handlers: {
|
|
1286
|
+
[key: string]: ActionEventHandler[];
|
|
1287
|
+
}): {
|
|
1288
|
+
[key: string]: ActionEventHandler[];
|
|
1289
|
+
};
|
|
1050
1290
|
/**
|
|
1051
1291
|
* Store to handle custom event handlers
|
|
1292
|
+
*
|
|
1293
|
+
* This is used internally.
|
|
1052
1294
|
*/
|
|
1053
1295
|
const customHandlers: Store<{
|
|
1054
1296
|
[key: string]: ActionEventHandler;
|
|
1055
1297
|
}>;
|
|
1298
|
+
/**
|
|
1299
|
+
* {@link getCustomHandlers} function to get custom event handlers.
|
|
1300
|
+
* @return {{ [key: string]: ActionEventHandler }} Current custom event handlers
|
|
1301
|
+
*/
|
|
1302
|
+
function getCustomHandlers(): {
|
|
1303
|
+
[key: string]: ActionEventHandler;
|
|
1304
|
+
};
|
|
1305
|
+
/**
|
|
1306
|
+
* {@link setCustomHandlers} function to set custom event handlers.
|
|
1307
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers New custom event handlers
|
|
1308
|
+
*/
|
|
1309
|
+
function setCustomHandlers(handlers: {
|
|
1310
|
+
[key: string]: ActionEventHandler;
|
|
1311
|
+
}): void;
|
|
1312
|
+
/**
|
|
1313
|
+
* {@link updateCustomHandlers} function to update custom event handlers.
|
|
1314
|
+
* @param {{ [key: string]: ActionEventHandler }} handlers Updated custom event handlers
|
|
1315
|
+
* @return {{ [key: string]: ActionEventHandler }} New custom event handlers
|
|
1316
|
+
*/
|
|
1317
|
+
function updateCustomHandlers(handlers: {
|
|
1318
|
+
[key: string]: ActionEventHandler;
|
|
1319
|
+
}): {
|
|
1320
|
+
[key: string]: ActionEventHandler;
|
|
1321
|
+
};
|
|
1056
1322
|
/**
|
|
1057
1323
|
* Store to handle destruction of action
|
|
1058
1324
|
*/
|
|
1059
1325
|
const destroyed: Store<boolean>;
|
|
1060
1326
|
/**
|
|
1061
|
-
*
|
|
1327
|
+
* {@link isDestroyed} function to check if action is destroyed.
|
|
1328
|
+
* @return {boolean} Flag if action is destoryed / true: Destroyed, false: Not Destroyed
|
|
1329
|
+
*/
|
|
1330
|
+
function isDestroyed(): boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* {@link setDestroyed} function to set if action is destroyed. */
|
|
1333
|
+
function setDestroyed(on: boolean): void;
|
|
1334
|
+
/**
|
|
1335
|
+
* Store to handle stopping action
|
|
1062
1336
|
*/
|
|
1063
1337
|
const stopped: Store<boolean>;
|
|
1338
|
+
/**
|
|
1339
|
+
* {@link isStopped} function to check if action is stopped.
|
|
1340
|
+
* @return {boolean} Flag if action is stopped / true: Stopped, false: Not stopped
|
|
1341
|
+
*/
|
|
1342
|
+
function isStopped(): boolean;
|
|
1343
|
+
/**
|
|
1344
|
+
* {@link setStopped} function to set if action is stopped.
|
|
1345
|
+
*/
|
|
1346
|
+
function setStopped(on: boolean): void;
|
|
1064
1347
|
/**
|
|
1065
1348
|
* Store to handle custom variables
|
|
1066
1349
|
*/
|
|
1067
1350
|
const customVariables: Store<{
|
|
1068
1351
|
[key: string]: any;
|
|
1069
1352
|
}>;
|
|
1353
|
+
/**
|
|
1354
|
+
* {@link getCustomVariables} function to get custom variables.
|
|
1355
|
+
* @return {CustomVariables} Current custom variables
|
|
1356
|
+
*/
|
|
1357
|
+
function getCustomVariables(): CustomVariables;
|
|
1358
|
+
/**
|
|
1359
|
+
* {@link setCustomVariables} function to set custom variables.
|
|
1360
|
+
* @param {CustomVariables} variables New custom variables
|
|
1361
|
+
*/
|
|
1362
|
+
function setCustomVariables(variables: CustomVariables): void;
|
|
1363
|
+
/**
|
|
1364
|
+
* {@link updateCustomVariables} function to update custom variables.
|
|
1365
|
+
* @param {CustomVariables} variables Updated custom variables
|
|
1366
|
+
* @return {CustomVariables} New custom variables
|
|
1367
|
+
*/
|
|
1368
|
+
function updateCustomVariables(variables: CustomVariables): CustomVariables;
|
|
1369
|
+
type CloseTrigger = "button" | "overlay" | "auto" | "none";
|
|
1370
|
+
const ALL_ACTION_ID = "KARTE_ALL_ACTION_ID";
|
|
1371
|
+
const ALL_ACTION_SHORTEN_ID = "KARTE_ALL_ACTION_SHORTEN_ID";
|
|
1372
|
+
const actionId: string;
|
|
1373
|
+
const ACTION_SHOW_EVENT: string;
|
|
1374
|
+
const ACTION_CLOSE_EVENT: string;
|
|
1375
|
+
const ACTION_DESTROY_EVENT: string;
|
|
1376
|
+
const ACTION_CHANGE_STATE_EVENT: string;
|
|
1070
1377
|
/**
|
|
1071
1378
|
* {@link setAutoStart} function to set auto start flag.
|
|
1072
1379
|
*
|
|
1073
1380
|
* @param {boolean} on
|
|
1074
1381
|
*/
|
|
1075
1382
|
const setAutoStart: (on?: boolean) => void;
|
|
1076
|
-
const
|
|
1383
|
+
const handleState: (event: any) => void;
|
|
1077
1384
|
const initialize: (options?: OPTIONS) => () => void;
|
|
1078
1385
|
const finalize: () => void;
|
|
1079
1386
|
const send_event: (event_name: string, values?: any) => void;
|
|
1080
|
-
const setMiximumZindex: (zindex?: number) => void;
|
|
1081
1387
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1082
1388
|
const none: () => () => void;
|
|
1083
1389
|
const moveTo: (to: string) => () => void;
|
|
@@ -1426,7 +1732,7 @@ declare namespace widget {
|
|
|
1426
1732
|
*
|
|
1427
1733
|
* @return {string} ステートID
|
|
1428
1734
|
*/
|
|
1429
|
-
function getState(): string;
|
|
1735
|
+
function getState$0(): string;
|
|
1430
1736
|
/**
|
|
1431
1737
|
* ページ内の変数を設定する
|
|
1432
1738
|
*
|
|
@@ -1487,7 +1793,7 @@ declare namespace widget {
|
|
|
1487
1793
|
*/
|
|
1488
1794
|
export { showAction as show, closeAction as hide };
|
|
1489
1795
|
}
|
|
1490
|
-
export {
|
|
1796
|
+
export { CloseTrigger, ALL_ACTION_ID, ALL_ACTION_SHORTEN_ID, actionId, ACTION_SHOW_EVENT, ACTION_CLOSE_EVENT, ACTION_DESTROY_EVENT, ACTION_CHANGE_STATE_EVENT, setAutoStart, handleState, initialize, finalize, send_event, none, moveTo, linkTo, closeApp, runScript, execOnClickOperation, haveFunction, customAnimation, loadGlobalScript, applyGlobalCss, loadGlobalStyle, hashCode, Store, getStoreState, SystemConfig, ActionEventHandler, OPTIONS, CustomVariables, functionOptions, system, getSystem, setSystem, state, setState, getState, states, addState, getStates, opened, isOpened, setOpened, closed, isClosed, setClosed, maximumZindex, setMaximumZindex, internalHandlers, getInternalHandlers, setInternalHandlers, updateInternalHandlers, customHandlers, getCustomHandlers, setCustomHandlers, updateCustomHandlers, destroyed, isDestroyed, setDestroyed, stopped, isStopped, setStopped, customVariables, getCustomVariables, setCustomVariables, updateCustomVariables, NOOP, isPreview, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, ScrollDirection, OnScrollContext, OnScrollFunction, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, Style, StateName, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirection, ListContext, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ActionProps, ActionOptions, create, dispatchDestroyEvent, destroy, showAction, closeAction, KARTE_ACTION_ROOT, KARTE_ACTION_RID, KARTE_ACTION_SHORTEN_ID, ensureActionRoot, onCreate, onShow, onClose, onDestroy, onChangeState, h, createFog, EmbedLogic, embed, getActionShadowRoot, applyCss, loadStyle, showModal, ModalOptions, KARTE_MODAL_ROOT, ensureModalRoot, show, close, AppOptions, App, createApp, collection, widget };
|
|
1491
1797
|
export { default as State } from './components/State.svelte';
|
|
1492
1798
|
export { default as StateItem } from './components/StateItem.svelte';
|
|
1493
1799
|
export { default as Modal } from './components/Modal.svelte';
|