unlayer-types 1.63.0 → 1.70.0

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.
Files changed (2) hide show
  1. package/embed.d.ts +59 -5
  2. package/package.json +1 -1
package/embed.d.ts CHANGED
@@ -33,6 +33,8 @@ declare module "editor/components/editors/types" {
33
33
  }) => void;
34
34
  name: string;
35
35
  data?: object;
36
+ disabled?: boolean;
37
+ isLockedByStyleGuide?: boolean;
36
38
  widgetParams?: WidgetParams;
37
39
  deviceName: Device;
38
40
  displayMode: DisplayMode;
@@ -1367,6 +1369,7 @@ declare module "state/types/types" {
1367
1369
  enabled?: boolean | undefined;
1368
1370
  position?: number | undefined;
1369
1371
  properties?: object | undefined;
1372
+ sections?: object | undefined;
1370
1373
  validator?: Validator;
1371
1374
  }
1372
1375
  export interface ToolsConfig {
@@ -1385,6 +1388,21 @@ declare module "state/types/types" {
1385
1388
  rtl?: boolean;
1386
1389
  default?: boolean;
1387
1390
  };
1391
+ export interface StyleGuideStyle {
1392
+ label: string;
1393
+ values: Record<string, any>;
1394
+ }
1395
+ export interface StyleGuideStyles {
1396
+ [styleGuideId: string]: StyleGuideStyle | undefined;
1397
+ }
1398
+ export interface StyleGuideToolConfig {
1399
+ styles?: StyleGuideStyles;
1400
+ }
1401
+ export interface StyleGuideConfig {
1402
+ tools?: {
1403
+ [toolId: string]: StyleGuideToolConfig | undefined;
1404
+ };
1405
+ }
1388
1406
  }
1389
1407
  declare module "engine/config/features" {
1390
1408
  import { Language } from "state/types/types";
@@ -1443,6 +1461,7 @@ declare module "engine/config/features" {
1443
1461
  enabled: boolean;
1444
1462
  languages?: Language[];
1445
1463
  };
1464
+ styleGuide?: boolean;
1446
1465
  ai?: boolean | {
1447
1466
  smartHeadings?: boolean;
1448
1467
  smartButtons?: boolean;
@@ -1947,10 +1966,10 @@ declare module "editor/design-system/components/Dropdown" {
1947
1966
  renderOptionLabel?: (option: SelectOption) => React.ReactNode;
1948
1967
  }) & ({
1949
1968
  options?: never;
1950
- groupedOptions?: SelectOptionGroup[];
1969
+ groupedOptions?: Array<SelectOptionGroup | undefined>;
1951
1970
  renderOptionGroupHeader?: (optionGroup: SelectOptionGroup) => React.ReactNode;
1952
1971
  } | {
1953
- options?: SelectOption[];
1972
+ options?: Array<SelectOption | undefined>;
1954
1973
  groupedOptions?: never;
1955
1974
  renderOptionGroupHeader?: never;
1956
1975
  });
@@ -2248,6 +2267,7 @@ declare module "editor/components/common/ImageUploadButton" {
2248
2267
  export interface ImageUploadButtonProps {
2249
2268
  buttonProps?: ButtonProps;
2250
2269
  disableProgressIndicator?: boolean;
2270
+ disabled?: boolean;
2251
2271
  maxSize?: number;
2252
2272
  onErrorChange?: (error: Error | null) => void;
2253
2273
  onImageSelect?: (image?: {
@@ -2291,6 +2311,7 @@ declare module "editor/components/common/Dropzone" {
2291
2311
  import { DropzoneOptions } from 'react-dropzone';
2292
2312
  export interface DropzoneProps {
2293
2313
  children?: React.ReactNode;
2314
+ disabled?: boolean;
2294
2315
  isUploading?: boolean;
2295
2316
  maxSize?: number;
2296
2317
  options?: DropzoneOptions;
@@ -2329,6 +2350,7 @@ declare module "editor/components/editors/ImageUploader" {
2329
2350
  import { ImageUploadButtonInstance, ImageUploadButtonProps } from "editor/components/common/ImageUploadButton";
2330
2351
  import { Location } from "state/types/types";
2331
2352
  export interface ImageUploaderProps {
2353
+ disabled?: boolean;
2332
2354
  shouldRender: {
2333
2355
  dropzone?: boolean;
2334
2356
  editImageButton?: boolean;
@@ -2364,7 +2386,39 @@ declare module "editor/components/editors/ImageUploader" {
2364
2386
  imageUploadButtonRef: RefObject<ImageUploadButtonInstance>;
2365
2387
  showError?: boolean;
2366
2388
  }
2367
- export const ImageUploader: ({ shouldRender: _shouldRender, label, optionName, location, maxSize, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, imageUrl, imageWidth, imageHeight, imageSize, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => JSX.Element;
2389
+ export const ImageUploader: ({ disabled, shouldRender: _shouldRender, label, optionName, location, maxSize, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, imageUrl, imageWidth, imageHeight, imageSize, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => JSX.Element;
2390
+ }
2391
+ declare module "editor/components/editors/common/WidgetLabel" {
2392
+ import React from 'react';
2393
+ import { Device, Location } from "state/types/types";
2394
+ export type WidgetLabelProps = {
2395
+ children?: React.ReactNode;
2396
+ className?: string;
2397
+ defaultValue?: any;
2398
+ deviceName?: Device;
2399
+ disabled?: boolean;
2400
+ getValue?: (deviceName?: Device | undefined) => any;
2401
+ infoTooltip?: string;
2402
+ isLockedByStyleGuide?: boolean;
2403
+ location?: Location;
2404
+ name?: string;
2405
+ onReset?: (data: {
2406
+ value: any;
2407
+ deviceName: Device | undefined;
2408
+ }) => void;
2409
+ };
2410
+ export function WidgetLabel(props: WidgetLabelProps): JSX.Element;
2411
+ export function getOptionModificationInfo({ defaultValue, deviceName, getValue, optionName, }: {
2412
+ defaultValue: any;
2413
+ deviceName: Device | null | undefined;
2414
+ getValue: NonNullable<WidgetLabelProps['getValue']>;
2415
+ optionName: string;
2416
+ }): {
2417
+ hasValue: boolean;
2418
+ isOverride: boolean;
2419
+ isSameValue: boolean;
2420
+ showResetButton: boolean;
2421
+ };
2368
2422
  }
2369
2423
  declare module "editor/themes/helpers" {
2370
2424
  import { Theme } from "editor/themes/types";
@@ -2678,7 +2732,7 @@ declare module "embed/helpers" {
2678
2732
  declare module "embed/Editor" {
2679
2733
  import { Frame } from "embed/Frame";
2680
2734
  import { Config, ExportFromApiResult, ExportHtmlOptions, ExportHtmlResult, ExportPlainTextResult, ExportImageFromApiOptions, ExportLiveHtmlOptions, ExportPdfFromApiOptions, ExportPlainTextOptions, ExportZipFromApiOptions, SaveDesignOptions, ExportLiveHtmlResult } from "embed/Config";
2681
- import { AppearanceConfig, Audit, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, Language, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, Tabs, Translations, User, Validator } from "state/types/types";
2735
+ import { AppearanceConfig, Audit, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, Language, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, StyleGuideConfig, Tabs, Translations, User, Validator } from "state/types/types";
2682
2736
  import { BodyValues } from "engine/options/bodies";
2683
2737
  import { Locale, TextDirection } from "engine/config/intl";
2684
2738
  import { DeepPartial } from "editor/components/editors/types";
@@ -2728,7 +2782,7 @@ declare module "embed/Editor" {
2728
2782
  exportZip(callback: (data: ExportFromApiResult) => void, options?: ExportZipFromApiOptions): void;
2729
2783
  setAppearance(appearance: DeepPartial<AppearanceConfig>): void;
2730
2784
  setBodyValues(bodyValues: Partial<BodyValues>, bodyId?: number): void;
2731
- setStyleGuide(styleGuide: object): void;
2785
+ setStyleGuide(styleGuide: StyleGuideConfig): void;
2732
2786
  setDesignTagsConfig(designTagsConfig: DesignTagsConfig): void;
2733
2787
  setMergeTagsConfig(mergeTagsConfig: MergeTagsConfig): void;
2734
2788
  showPreview(payload: {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "unlayer-types",
3
- "version": "1.63.0",
3
+ "version": "1.70.0",
4
4
  "license": "MIT"
5
5
  }