@plaidev/karte-action-sdk 1.1.179-28041859.8b5339d0 → 1.1.180-28042066.2d66783f

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.
@@ -143,6 +143,14 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
143
143
  * @defaultValue `() => {}`
144
144
  */
145
145
  onCreate?: ActionHook<Props, Variables & ActionVariables>;
146
+ /**
147
+ * KARTEテンプレートの情報
148
+ *
149
+ * @defaultValue `{}`
150
+ */
151
+ karteTemplate?: {
152
+ [key: string]: any;
153
+ };
146
154
  }
147
155
  /**
148
156
  * KARTE のシステム設定情報
@@ -160,6 +168,11 @@ type SystemConfig = {
160
168
  campaignId?: string;
161
169
  shortenId?: string;
162
170
  };
171
+ /** @internal */
172
+ type ActionHookLog = {
173
+ name: string;
174
+ values?: any;
175
+ };
163
176
  type ActionTableResult = number | string | boolean | Date | null | undefined;
164
177
  type ActionTableQueryParam = string | number | boolean | Date;
165
178
  type ActionTableQueryParams = {
@@ -181,8 +194,7 @@ type CollectionConfig = {
181
194
  table: string;
182
195
  /**
183
196
  * エンドポイント
184
- */
185
- endpoint?: string;
197
+ */ endpoint?: string;
186
198
  };
187
199
  /**
188
200
  * アクションテーブルを管理するメソッドを取得する
@@ -246,6 +258,7 @@ declare const loadActionTableRow: (config: ActionTableRowRequestConfig, api_key:
246
258
  declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
247
259
  /** @internal */
248
260
  declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
261
+ /** @internal */
249
262
  declare const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
250
263
  [key: string]: any;
251
264
  }>;
@@ -369,15 +382,6 @@ declare function showOnScroll<ModalProps extends Pick<Props, "show_on_scroll" |
369
382
  */
370
383
  declare function showOnTime<ModalProps extends Pick<Props, "show_on_time" | "show_on_time_count">>(props: ModalProps, show?: Function): (() => void) | null;
371
384
  type ModalProps = Props;
372
- /** @internal */
373
- type ActionHookLog = {
374
- name: string;
375
- values?: any;
376
- };
377
- /** @internal */
378
- declare const initialize: (setting?: ActionSetting) => () => void;
379
- /** @internal */
380
- declare const finalize: () => void;
381
385
  /**
382
386
  * アクションを作成する
383
387
  *
@@ -389,8 +393,6 @@ declare const finalize: () => void;
389
393
  * @public
390
394
  */
391
395
  declare function create<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
392
- /** @internal */
393
- declare function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
394
396
  /**
395
397
  * アクションの破棄する
396
398
  *
@@ -414,31 +416,6 @@ declare function onCreate<Props extends ModalProps, Variables>(fn: ActionHook<Pr
414
416
  */
415
417
  declare function onDestroy<Props extends ModalProps, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
416
418
  // -------- The following codes are deprecated --------
417
- /**
418
- * 非推奨
419
- *
420
- * @deprecated 非推奨
421
- *
422
- * @internal
423
- */
424
- type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
425
- /**
426
- * 非推奨
427
- *
428
- * @deprecated 非推奨
429
- *
430
- * @internal
431
- */
432
- interface App {
433
- /**
434
- * The method to destroy an app instance.
435
- */
436
- close: () => void;
437
- /**
438
- * The method to show an app instance.
439
- */
440
- show: () => void;
441
- }
442
419
  /**
443
420
  * 非推奨
444
421
  *
@@ -447,22 +424,6 @@ interface App {
447
424
  * @internal
448
425
  */
449
426
  declare const showModal: typeof create;
450
- /**
451
- * 非推奨
452
- *
453
- * @deprecated 非推奨
454
- *
455
- * @internal
456
- */
457
- declare const ensureModalRoot: typeof ensureActionRoot;
458
- /**
459
- * 非推奨
460
- *
461
- * @deprecated 非推奨
462
- *
463
- * @internal
464
- */
465
- declare function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables, VariablesQuery>): App;
466
427
  /**
467
428
  * 非推奨
468
429
  *
@@ -471,22 +432,10 @@ declare function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteC
471
432
  * @internal
472
433
  */
473
434
  declare function destroy(): void;
474
- /**
475
- * 非推奨
476
- *
477
- * @deprecated 非推奨
478
- *
479
- * @internal
480
- */
481
- declare function createFog({ color, opacity, zIndex, onclick }: {
482
- color?: string;
483
- opacity?: string;
484
- zIndex?: number;
485
- onclick: () => void;
486
- }): {
487
- fog: HTMLDivElement;
488
- close: () => void;
489
- };
435
+ /** @internal */
436
+ declare const initialize: (setting?: ActionSetting) => () => void;
437
+ /** @internal */
438
+ declare const finalize: () => void;
490
439
  /**
491
440
  * ES Modules に対応していない JavaScript をページに読み込む
492
441
  *
@@ -1266,7 +1215,7 @@ declare const logger: {
1266
1215
  * @internal
1267
1216
  */
1268
1217
  declare function listenLogger(): () => void;
1269
- type ModalProps$0 = Props;
1218
+ type ModalProps$1 = Props;
1270
1219
  /**
1271
1220
  * 表示アクショントリガー
1272
1221
  *
@@ -1285,7 +1234,7 @@ type CloseTrigger = "button" | "overlay" | "auto" | "none";
1285
1234
  *
1286
1235
  * @public
1287
1236
  */
1288
- declare function onShow<Props extends ModalProps$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1237
+ declare function onShow<Props extends ModalProps$1, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1289
1238
  /**
1290
1239
  * アクションのライフサイクル close で呼び出されるフックする関数
1291
1240
  *
@@ -1294,7 +1243,7 @@ declare function onShow<Props extends ModalProps$0, Variables>(fn: ActionHook<Pr
1294
1243
  *
1295
1244
  * @public
1296
1245
  */
1297
- type ActionCloseHook<Props extends ModalProps$0, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1246
+ type ActionCloseHook<Props extends ModalProps$1, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1298
1247
  /**
1299
1248
  * アクションがクローズ (close) される前にフックする関数
1300
1249
  *
@@ -1302,7 +1251,7 @@ type ActionCloseHook<Props extends ModalProps$0, Variables> = (props: Parameters
1302
1251
  *
1303
1252
  * @public
1304
1253
  */
1305
- declare function onClose<Props extends ModalProps$0, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
1254
+ declare function onClose<Props extends ModalProps$1, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
1306
1255
  /**
1307
1256
  * アクションのステートが変更された (changeState) 後にフックする関数
1308
1257
  *
@@ -1310,7 +1259,7 @@ declare function onClose<Props extends ModalProps$0, Variables>(fn: ActionCloseH
1310
1259
  *
1311
1260
  * @public
1312
1261
  */
1313
- declare function onChangeState<Props extends ModalProps$0, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
1262
+ declare function onChangeState<Props extends ModalProps$1, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
1314
1263
  /**
1315
1264
  * アクションを表示する
1316
1265
  *
@@ -1344,7 +1293,7 @@ declare function applyCss(css: string): Promise<HTMLStyleElement>;
1344
1293
  */
1345
1294
  declare function loadStyle(href: string): Promise<void>;
1346
1295
  // @internal
1347
- declare function getCssVariables<Props extends ModalProps$0, Variables>(data: Writable<Props & Variables & ActionVariables & VariableQuery>): string;
1296
+ declare function getCssVariables<Props extends ModalProps$1, Variables>(data: Writable<Props & Variables & ActionVariables & VariableQuery>): string;
1348
1297
  /**
1349
1298
  * アクションのルートの DOM 要素を取得する
1350
1299
  *
@@ -1353,7 +1302,8 @@ declare function getCssVariables<Props extends ModalProps$0, Variables>(data: Wr
1353
1302
  * @public
1354
1303
  */
1355
1304
  declare function getActionRoot(): ShadowRoot | null;
1356
- // -------- The following codes are deprecated --------
1305
+ /** @internal */
1306
+ declare function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
1357
1307
  /**
1358
1308
  * 非推奨
1359
1309
  *
@@ -1370,6 +1320,63 @@ declare const show: typeof showAction;
1370
1320
  * @internal
1371
1321
  */
1372
1322
  declare const close: typeof closeAction;
1323
+ /**
1324
+ * 非推奨
1325
+ *
1326
+ * @deprecated 非推奨
1327
+ *
1328
+ * @internal
1329
+ */
1330
+ interface App {
1331
+ /**
1332
+ * The method to destroy an app instance.
1333
+ */
1334
+ close: () => void;
1335
+ /**
1336
+ * The method to show an app instance.
1337
+ */
1338
+ show: () => void;
1339
+ }
1340
+ /**
1341
+ * 非推奨
1342
+ *
1343
+ * @deprecated 非推奨
1344
+ *
1345
+ * @internal
1346
+ */
1347
+ type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
1348
+ /**
1349
+ * 非推奨
1350
+ *
1351
+ * @deprecated 非推奨
1352
+ *
1353
+ * @internal
1354
+ */
1355
+ declare const ensureModalRoot: typeof ensureActionRoot;
1356
+ /**
1357
+ * 非推奨
1358
+ *
1359
+ * @deprecated 非推奨
1360
+ *
1361
+ * @internal
1362
+ */
1363
+ declare function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables, VariablesQuery>): App;
1364
+ /**
1365
+ * 非推奨
1366
+ *
1367
+ * @deprecated 非推奨
1368
+ *
1369
+ * @internal
1370
+ */
1371
+ declare function createFog({ color, opacity, zIndex, onclick }: {
1372
+ color?: string;
1373
+ opacity?: string;
1374
+ zIndex?: number;
1375
+ onclick: () => void;
1376
+ }): {
1377
+ fog: HTMLDivElement;
1378
+ close: () => void;
1379
+ };
1373
1380
  declare namespace widget {
1374
1381
  /**
1375
1382
  * アクションの汎用的なタイプを定義する
@@ -1497,6 +1504,14 @@ declare namespace widget {
1497
1504
  * @defaultValue `() => {}`
1498
1505
  */
1499
1506
  onCreate?: ActionHook<Props, Variables & ActionVariables>;
1507
+ /**
1508
+ * KARTEテンプレートの情報
1509
+ *
1510
+ * @defaultValue `{}`
1511
+ */
1512
+ karteTemplate?: {
1513
+ [key: string]: any;
1514
+ };
1500
1515
  }
1501
1516
  /**
1502
1517
  * KARTE のシステム設定情報
@@ -1514,6 +1529,11 @@ declare namespace widget {
1514
1529
  campaignId?: string;
1515
1530
  shortenId?: string;
1516
1531
  };
1532
+ /** @internal */
1533
+ type ActionHookLog = {
1534
+ name: string;
1535
+ values?: any;
1536
+ };
1517
1537
  type ActionTableResult = number | string | boolean | Date | null | undefined;
1518
1538
  type ActionTableQueryParam = string | number | boolean | Date;
1519
1539
  type ActionTableQueryParams = {
@@ -1535,8 +1555,7 @@ declare namespace widget {
1535
1555
  table: string;
1536
1556
  /**
1537
1557
  * エンドポイント
1538
- */
1539
- endpoint?: string;
1558
+ */ endpoint?: string;
1540
1559
  };
1541
1560
  /**
1542
1561
  * アクションテーブルを管理するメソッドを取得する
@@ -1600,9 +1619,14 @@ declare namespace widget {
1600
1619
  const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
1601
1620
  /** @internal */
1602
1621
  const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
1622
+ /** @internal */
1603
1623
  const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
1604
1624
  [key: string]: any;
1605
1625
  }>;
1626
+ /** @internal */
1627
+ function setupActionTable(localVariablesQuery: any, apiKey: string): Promise<{
1628
+ success: boolean;
1629
+ }>;
1606
1630
  /**
1607
1631
  * モーダル(ポップアップ)のプロパティ
1608
1632
  *
@@ -1738,6 +1762,8 @@ declare namespace widget {
1738
1762
  * @public
1739
1763
  */
1740
1764
  type CloseTrigger = "button" | "overlay" | "auto" | "none";
1765
+ /** @internal */
1766
+ const handleState: (event: any) => void;
1741
1767
  /**
1742
1768
  * アクションが表示 (show) された後にフックする関数
1743
1769
  *
@@ -1813,6 +1839,10 @@ declare namespace widget {
1813
1839
  * @public
1814
1840
  */
1815
1841
  function getActionRoot(): ShadowRoot | null;
1842
+ /** @internal */
1843
+ function createModal<Props extends ModalProps, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
1844
+ /** @internal */
1845
+ function ensureActionRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
1816
1846
  // -------- The following codes are deprecated --------
1817
1847
  /**
1818
1848
  * 非推奨
@@ -1822,7 +1852,6 @@ declare namespace widget {
1822
1852
  * @internal
1823
1853
  */
1824
1854
  function getActionShadowRoot(): ShadowRoot | null;
1825
- // -------- The following codes are deprecated --------
1826
1855
  /**
1827
1856
  * 非推奨
1828
1857
  *
@@ -1839,6 +1868,71 @@ declare namespace widget {
1839
1868
  * @internal
1840
1869
  */
1841
1870
  const close: typeof closeAction;
1871
+ /**
1872
+ * 非推奨
1873
+ *
1874
+ * @deprecated 非推奨
1875
+ *
1876
+ * @internal
1877
+ */
1878
+ interface App {
1879
+ /**
1880
+ * The method to destroy an app instance.
1881
+ */
1882
+ close: () => void;
1883
+ /**
1884
+ * The method to show an app instance.
1885
+ */
1886
+ show: () => void;
1887
+ }
1888
+ /**
1889
+ * 非推奨
1890
+ *
1891
+ * @deprecated 非推奨
1892
+ *
1893
+ * @internal
1894
+ */
1895
+ type AppOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
1896
+ /**
1897
+ * 非推奨
1898
+ *
1899
+ * @deprecated 非推奨
1900
+ *
1901
+ * @internal
1902
+ */
1903
+ type ModalOptions<Props, Variables, VariablesQuery> = ActionOptions<Props, Variables, VariablesQuery>;
1904
+ /**
1905
+ * 非推奨
1906
+ *
1907
+ * @deprecated 非推奨
1908
+ *
1909
+ * @internal
1910
+ */
1911
+ const ensureModalRoot: typeof ensureActionRoot;
1912
+ /**
1913
+ * 非推奨
1914
+ *
1915
+ * @deprecated 非推奨
1916
+ *
1917
+ * @internal
1918
+ */
1919
+ function createApp<Props, Variables, VariablesQuery>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables, VariablesQuery>): App;
1920
+ /**
1921
+ * 非推奨
1922
+ *
1923
+ * @deprecated 非推奨
1924
+ *
1925
+ * @internal
1926
+ */
1927
+ function createFog({ color, opacity, zIndex, onclick }: {
1928
+ color?: string;
1929
+ opacity?: string;
1930
+ zIndex?: number;
1931
+ onclick: () => void;
1932
+ }): {
1933
+ fog: HTMLDivElement;
1934
+ close: () => void;
1935
+ };
1842
1936
  // @ts-ignore
1843
1937
  type ChangeValCallback = ({ newVal, oldVal, key }: {
1844
1938
  newVal: any;
@@ -2017,8 +2111,8 @@ declare const afterUpdate: typeof afterUpdateSvelte;
2017
2111
  declare const tick: typeof tickSvelte;
2018
2112
  // @internal
2019
2113
  declare const LAYOUT_COMPONENT_NAMES: string[];
2020
- export { ACTION_HOOK_LABEL, KARTE_MODAL_ROOT, create, onCreate, destroyAction, onDestroy, initialize, finalize, showModal, ensureModalRoot, destroy, createApp, createFog, loadGlobalScript, loadGlobalStyle, applyGlobalCss, getState, setState, getStates, isOpened, getVariables, setVariables, resetVariables, getEventHandlers, setEventHandlers, resetEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, SYSTEM_FONT, Fonts, Font, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, Icon, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonColor, DefaultFormButtonColor, showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget, onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES };
2021
- export type { ActionHookLog, SystemConfig, ActionVariables, ActionEventHandler, ActionProps, ActionOptions, ActionHook, ActionChangeStateHook, SendFunction, PublishFunction, OnScrollContext, OnScrollFunction, ScrollDirection, LogLevel, Log, Event, ActionCloseHook, ShowTrigger, CloseTrigger, CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequestConfig, ActionTableQueryRequestConfig, ActionTableRequestConfig };
2114
+ export { ACTION_HOOK_LABEL, KARTE_MODAL_ROOT, create, destroyAction, onCreate, onDestroy, showModal, destroy, initialize, finalize, loadGlobalScript, loadGlobalStyle, applyGlobalCss, getState, setState, getStates, isOpened, getVariables, setVariables, resetVariables, getEventHandlers, setEventHandlers, resetEventHandlers, getSystem, setSetting, eventHandlers, variables, formData, state, onScroll, onTime, getLogs, getEvents, logger, listenLogger, hideOnScroll, hideOnTime, showOnScroll, showOnTime, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, ModalPositions, ModalPosition, ModalMargin, ModalPlacement, DefaultModalPlacement, Elasticities, Elasticity, ElasticityStyle, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, FontWeight, SYSTEM_FONT, Fonts, Font, Justifies, Justify, Alignments, Alignment, FlexDirections, FlexDirection, ObjectFits, ObjectFit, ClipPaths, ClipPath, Repeats, Repeat, BackgroundSizes, BackgroundSize, Cursors, Cursor, Overflows, Overflow, Border, BorderStyle, BorderWidth, BoxShadow, Style, TransitState, WritingModes, WritingMode, DateTime, Icon, ListSeparatorTypes, EdgePosition, DefaultEdgePosition, ListSeparatorNone, ListSeparatorBorder, ListSeparatorGap, ListSeparator, DefaultListSeparatorNone, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparator, ListBackgroundTypes, ListBackgroundNone, ListBackgroundStripe, ListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListBackground, ListDirections, ListDirection, ListContext, SlideButtonIcon, SlideButtonText, SlideButton, DefaultSlideButton, SlideButtonPosition, SlideNavigationButton, DefaultSlideNavigationButton, FormInputName, FormButtonColor, DefaultFormButtonColor, showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, widget, onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES };
2115
+ export type { SystemConfig, ActionVariables, ActionEventHandler, ActionProps, ActionOptions, ActionHook, ActionHookLog, ActionChangeStateHook, SendFunction, PublishFunction, OnScrollContext, OnScrollFunction, ScrollDirection, LogLevel, Log, Event, ActionCloseHook, ShowTrigger, CloseTrigger, CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequestConfig, ActionTableQueryRequestConfig, ActionTableRequestConfig };
2022
2116
  export { default as State } from './components/State.svelte';
2023
2117
  export { default as StateItem } from './components/StateItem.svelte';
2024
2118
  export { default as Modal } from './components/Modal.svelte';