@plaidev/karte-action-sdk 1.1.242 → 1.1.243-28729600.27e5cdcd

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.
@@ -6,8 +6,8 @@ import { beforeUpdate as beforeUpdateSvelte } from "svelte";
6
6
  import { afterUpdate as afterUpdateSvelte } from "svelte";
7
7
  import { tick as tickSvelte } from "svelte";
8
8
  import { Properties } from "csstype";
9
- import IconArrowDown from "./variants/IconArrowDown.svelte";
10
9
  import { Properties as Properties$0 } from "preact/src/jsx-csstype";
10
+ import IconArrowDown from "./variants/IconArrowDown.svelte";
11
11
  /** @internal */
12
12
  declare const ACTION_HOOK_LABEL = "__ACTION_HOOK__";
13
13
  // -------- The following codes are deprecated --------
@@ -2343,35 +2343,20 @@ declare const afterUpdate: typeof afterUpdateSvelte;
2343
2343
  declare const tick: typeof tickSvelte;
2344
2344
  // @internal
2345
2345
  declare const LAYOUT_COMPONENT_NAMES: string[];
2346
- type ComponentBaseProps = {
2347
- layerId: string;
2348
- style: Properties;
2349
- };
2350
- declare const COMPONENT_PARAMETER_TYPES: {
2351
- readonly TEXT: "text";
2352
- readonly MULTILINE_TEXT: "multiline_text";
2353
- readonly SELECT: "select";
2354
- readonly RADIO: "radio";
2355
- readonly CHECKBOX: "checkbox";
2356
- readonly BOOLEAN: "boolean";
2357
- readonly IMAGE: "image";
2358
- readonly NUMBER: "number";
2359
- readonly WIDTH: "width";
2360
- readonly ASPECT: "aspect";
2361
- readonly COLOR: "color";
2362
- readonly ICON: "icon";
2363
- };
2364
- type ComponentParameterType = (typeof COMPONENT_PARAMETER_TYPES)[keyof typeof COMPONENT_PARAMETER_TYPES];
2365
- type ComponentParameterOption = {
2366
- label: string;
2367
- value: string | number;
2368
- };
2369
- type ComponentParameter<P extends object = object> = {
2370
- id: string;
2371
- name: string;
2372
- type: ComponentParameterType;
2373
- options?: ComponentParameterOption[];
2374
- isEnabled?: (p: P) => boolean;
2346
+ type PropStyles<Props extends Record<string, any>, K extends keyof Props> = Record<NonNullable<Props[K]>, Properties>;
2347
+ declare const SHADOW_VARIANT: {
2348
+ readonly extra_small: "XSmall";
2349
+ readonly small: "Small";
2350
+ readonly medium: "Medium";
2351
+ readonly large: "Large";
2352
+ };
2353
+ declare const ROUND_VARIANT: {
2354
+ readonly extra_small: "XSmall (2px)";
2355
+ readonly small: "Small (4px)";
2356
+ readonly medium: "Medium (8px)";
2357
+ readonly large: "Large (16px)";
2358
+ readonly extra_large: "Large (24px)";
2359
+ readonly fulled: "Full (100%)";
2375
2360
  };
2376
2361
  type PositionPlaceProps = {
2377
2362
  top?: Properties["top"];
@@ -2397,19 +2382,19 @@ type PaddingProps = {
2397
2382
  paddingRight?: Properties["paddingRight"];
2398
2383
  };
2399
2384
  type RadiusProps = {
2400
- borderTopLeftRadius: Properties["borderTopLeftRadius"];
2401
- borderTopRightRadius: Properties["borderTopRightRadius"];
2402
- borderBottomLeftRadius: Properties["borderBottomLeftRadius"];
2403
- borderBottomRightRadius: Properties["borderBottomRightRadius"];
2385
+ borderTopLeftRadius?: Properties["borderTopLeftRadius"];
2386
+ borderTopRightRadius?: Properties["borderTopRightRadius"];
2387
+ borderBottomLeftRadius?: Properties["borderBottomLeftRadius"];
2388
+ borderBottomRightRadius?: Properties["borderBottomRightRadius"];
2404
2389
  };
2405
2390
  type BackgroundColorProps = {
2406
- backgroundColor: Properties["backgroundColor"];
2391
+ backgroundColor?: Properties["backgroundColor"];
2407
2392
  };
2408
2393
  type BackgroundImageProps = {
2409
- backgroundImageUrl: string;
2394
+ backgroundImageUrl?: string;
2410
2395
  };
2411
2396
  type ShadowProps = {
2412
- shadow: Properties["boxShadow"];
2397
+ shadow?: Properties["boxShadow"];
2413
2398
  };
2414
2399
  declare const AVATAR_SIZE: {
2415
2400
  readonly extra_small: "XS\uFF0848 x 48\uFF09";
@@ -2428,6 +2413,9 @@ type AvatarProps = CommonProps & {
2428
2413
  image?: string;
2429
2414
  caption?: string;
2430
2415
  alt?: string;
2416
+ onClick?: OnClickOperation;
2417
+ eventName?: string;
2418
+ eventValue?: object;
2431
2419
  bordered?: boolean;
2432
2420
  };
2433
2421
  declare const BUTTON_SIZE: {
@@ -2456,8 +2444,11 @@ declare const BUTTON_ICON_ANGLE: {
2456
2444
  readonly row: "\u5DE6\u5074";
2457
2445
  readonly "row-reverse": "\u53F3\u5074";
2458
2446
  };
2459
- type ButtonProps = CommonProps & {
2447
+ type ButtonProps = CommonProps & BorderProps & {
2460
2448
  label?: string;
2449
+ onClick?: OnClickOperation;
2450
+ eventName?: string;
2451
+ eventValue?: object;
2461
2452
  size?: keyof typeof BUTTON_SIZE;
2462
2453
  theme?: keyof typeof BUTTON_THEME;
2463
2454
  round?: keyof typeof BUTTON_ROUND;
@@ -2473,6 +2464,11 @@ type ButtonProps = CommonProps & {
2473
2464
  color?: Properties["color"];
2474
2465
  backgroundColor?: Properties["backgroundColor"];
2475
2466
  };
2467
+ declare const buttonPropsDefault: ButtonProps;
2468
+ declare const BUTTON_SIZE_STYLES: PropStyles<ButtonProps, "size">;
2469
+ declare const BUTTON_THEME_STYLES: PropStyles<ButtonProps, "theme">;
2470
+ declare const BUTTON_ROUND_STYLES: PropStyles<ButtonProps, "round">;
2471
+ declare const BUTTON_WRAP_STYLES: PropStyles<ButtonProps, "wrap">;
2476
2472
  declare const BUTTON_VARIANTS: {
2477
2473
  size: {
2478
2474
  extra_small: Properties<0 | (string & {}), string & {}>;
@@ -2552,7 +2548,7 @@ declare const CLOSE_BUTTON_LABEL_PLACEMENT: {
2552
2548
  right: string;
2553
2549
  left: string;
2554
2550
  };
2555
- type CloseButtonProps = CommonProps & {
2551
+ type CloseButtonProps = CommonProps & BorderProps & {
2556
2552
  size?: number;
2557
2553
  placement?: keyof typeof CLOSE_BUTTON_PLACEMENT;
2558
2554
  round?: keyof typeof CLOSE_BUTTON_ROUND;
@@ -2627,21 +2623,24 @@ declare const ICON_VARIANTS: {
2627
2623
  readonly users: typeof IconArrowDown;
2628
2624
  readonly x_mark: typeof IconArrowDown;
2629
2625
  };
2630
- type IconVariant = (typeof ICON_VARIANTS)[keyof typeof ICON_VARIANTS];
2631
- // @ts-ignore
2632
- declare const ICON_PARAMS: ComponentParameter[];
2633
2626
  type IconProps = CommonProps & {
2634
2627
  variant: string;
2635
2628
  size?: keyof typeof ICON_SIZE;
2636
- color: string;
2629
+ color?: Properties$0["color"];
2637
2630
  width?: Properties$0["width"];
2638
2631
  height?: Properties$0["height"];
2632
+ onClick?: OnClickOperation;
2633
+ eventName?: string;
2634
+ eventValue?: object;
2639
2635
  };
2640
2636
  type ImageProps = CommonProps & {
2641
2637
  image?: string;
2642
2638
  width?: Properties["width"];
2643
2639
  aspect?: string;
2644
2640
  alt?: string;
2641
+ onClick?: OnClickOperation;
2642
+ eventName?: string;
2643
+ eventValue?: object;
2645
2644
  };
2646
2645
  declare const LAYOUT_DISPLAY_TYPE: readonly [
2647
2646
  "inline-flex",
@@ -2671,6 +2670,9 @@ declare const LAYOUT_JUSTIFY: readonly [
2671
2670
  ];
2672
2671
  type LayoutFlexJustify = (typeof LAYOUT_JUSTIFY)[number];
2673
2672
  type LayerLayoutProps = CommonProps & BorderProps & RadiusProps & ShadowProps & BackgroundColorProps & BackgroundImageProps & PaddingProps & {
2673
+ onClick?: OnClickOperation;
2674
+ eventName?: string;
2675
+ eventValue?: object;
2674
2676
  display?: LayoutDisplayType;
2675
2677
  direction?: LayoutFlexDirection;
2676
2678
  align?: LayoutFlexAlign;
@@ -2678,16 +2680,8 @@ type LayerLayoutProps = CommonProps & BorderProps & RadiusProps & ShadowProps &
2678
2680
  rowGap?: Properties["rowGap"];
2679
2681
  columnGap?: Properties["columnGap"];
2680
2682
  width?: Properties["width"];
2683
+ overflowY?: Properties["overflowY"];
2681
2684
  };
2682
- declare const LAYER_TEXT_ALIGN_VALUES: readonly [
2683
- "center",
2684
- "left",
2685
- "right"
2686
- ];
2687
- declare const LAYER_TEXT_FONT_WEIGHT_VALUES: readonly [
2688
- "bold",
2689
- "normal"
2690
- ];
2691
2685
  declare const LAYER_TEXT_SIZE: {
2692
2686
  readonly extra_small: "ExtraSmall";
2693
2687
  readonly small: "Small";
@@ -2765,7 +2759,9 @@ declare const TEXT_VARIANTS: {
2765
2759
  };
2766
2760
  };
2767
2761
  };
2768
- 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, DefaultElasticity, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, RegExpProp, 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, ModalStyle, ModalBreakPoint, DefaultModalBreakPoint, FormIdentifyTextFields, FormIdentifyTextField, FormIdentifyTextFieldValidations, FormIdentifyTextFieldPlaceholders, DefaultFormIdentifyTextField, FormIdentifyBooleanFields, FormIdentifyBooleanField, DefaultFormIdentifyBooleanField, showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers, widget, onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES, ComponentBaseProps, COMPONENT_PARAMETER_TYPES, ComponentParameterType, ComponentParameterOption, ComponentParameter, PositionProps, CommonProps, BorderProps, PaddingProps, RadiusProps, BackgroundColorProps, BackgroundImageProps, ShadowProps, AVATAR_SIZE, AVATAR_SHAPE, AvatarProps, BUTTON_SIZE, BUTTON_THEME, BUTTON_ROUND, BUTTON_LINK_TARGET, BUTTON_ICON_ANGLE, ButtonProps, BUTTON_VARIANTS, TEXT_BUTTON_SIZE, TEXT_BUTTON_COLOR, TEXT_BUTTON_ROUND, TEXT_BUTTON_LINK_TARGET, TEXT_BUTTON_ICON_ANGLE, TextButtonProps, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, CLOSE_BUTTON_LABEL_PLACEMENT, CloseButtonProps, ICON_SIZE, ICON_VARIANTS, IconVariant, ICON_PARAMS, IconProps, ImageProps, LAYOUT_DISPLAY_TYPE, LayoutDisplayType, LAYOUT_DIRECTION, LayoutFlexDirection, LAYOUT_ALIGN, LayoutFlexAlign, LAYOUT_JUSTIFY, LayoutFlexJustify, LayerLayoutProps, LAYER_TEXT_ALIGN_VALUES, LAYER_TEXT_FONT_WEIGHT_VALUES, LAYER_TEXT_SIZE, LayerTextProps, TEXT_VARIANTS };
2762
+ declare const SHADOW_STYLES: Record<keyof typeof SHADOW_VARIANT, Properties>;
2763
+ declare const ROUND_STYLES: Record<keyof typeof ROUND_VARIANT, Pick<Properties, "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius">>;
2764
+ 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, DefaultElasticity, TextDirections, TextDirection, OperationArgumentType, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, RegExpProp, 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, ModalStyle, ModalBreakPoint, DefaultModalBreakPoint, FormIdentifyTextFields, FormIdentifyTextField, FormIdentifyTextFieldValidations, FormIdentifyTextFieldPlaceholders, DefaultFormIdentifyTextField, FormIdentifyBooleanFields, FormIdentifyBooleanField, DefaultFormIdentifyBooleanField, showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog, collection, loadActionTableRow, loadActionTableRows, loadActionTableQuery, loadActionTable, addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers, widget, onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES, PropStyles, SHADOW_VARIANT, ROUND_VARIANT, PositionProps, CommonProps, BorderProps, PaddingProps, RadiusProps, BackgroundColorProps, BackgroundImageProps, ShadowProps, AVATAR_SIZE, AVATAR_SHAPE, AvatarProps, BUTTON_SIZE, BUTTON_THEME, BUTTON_ROUND, BUTTON_LINK_TARGET, BUTTON_ICON_ANGLE, ButtonProps, buttonPropsDefault, BUTTON_SIZE_STYLES, BUTTON_THEME_STYLES, BUTTON_ROUND_STYLES, BUTTON_WRAP_STYLES, BUTTON_VARIANTS, TEXT_BUTTON_SIZE, TEXT_BUTTON_COLOR, TEXT_BUTTON_ROUND, TEXT_BUTTON_LINK_TARGET, TEXT_BUTTON_ICON_ANGLE, TextButtonProps, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, CLOSE_BUTTON_LABEL_PLACEMENT, CloseButtonProps, ICON_SIZE, ICON_VARIANTS, IconProps, ImageProps, LAYOUT_DISPLAY_TYPE, LayoutDisplayType, LAYOUT_DIRECTION, LayoutFlexDirection, LAYOUT_ALIGN, LayoutFlexAlign, LAYOUT_JUSTIFY, LayoutFlexJustify, LayerLayoutProps, LAYER_TEXT_SIZE, LayerTextProps, TEXT_VARIANTS, SHADOW_STYLES, ROUND_STYLES };
2769
2765
  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 };
2770
2766
  export { default as State } from './components/State.svelte';
2771
2767
  export { default as StateItem } from './components/StateItem.svelte';