import { RulersConfigUnit, ModelMode, FontListMode, ImageSize } from "../ConfigurationTypes"; import { IProductThemeConfig, IDefaultItemsConfig, IGridConfig, IQualityMeterConfig, IQualityLevelsConfig, IRulersConfig, ISnapLinesConfig, ICanvasConfig, IUiConfig, IViolationWarningsSettingsConfig, IRotationConfig, ISnapElementConfiguration } from "../ConfigurationInterfaces"; import { IWidgetsConfig, IWidgetConfigsForSurface, IActionModeParsed, IRangeParamsParsed } from "./WidgetConfigurationInterfacesExtended"; import { IBarcodeData } from "../Barcode"; import { RotationType } from "@aurigma/design-atoms/Services/WorkspaceRotation"; export interface IUiConfigParsed extends IUiConfig { defaultLanguage: string; canvas: ICanvasConfigParsed; grid: IGridConfigParsed; violationWarningsSettings: IViolationWarningsSettingsConfigParsed; alignToSafetyLineName: string; newImageName: string; initialMode: ModelMode.ModelModeType; canvasOnlyMode: boolean; loadUserInfoButtonEnabled: boolean; autoLoadUserInfo: boolean; imageEditorEnabled: boolean; deleteItemConfirmationEnabled: boolean; revertProductConfirmationEnabled: boolean; restoreProductOnReloadEnabled: boolean; defaultAssetSelectWidget: AssetSelectWidgetType; spellCheckEnabled: boolean; variableItemsMaskSymbol: string; fontList: string[] | { systemFonts?: string[]; appFonts?: string[]; }; fontListMode: FontListMode.FontListModeType; defaultItemsConfig: IDefaultItemsConfig; arbitraryResizeForImageItemEnabled: boolean; userInfo: { [key: string]: string | IBarcodeData; }; perSurfaceConfiguration: IPerSurfaceConfiguration; productThemes: { [name: string]: IProductThemeConfig; }; defaultProductTheme: string; widgets: IWidgetsConfig; assetSources: IAssetSources; enableTrace: boolean; } export declare enum AssetSelectWidgetType { AssetManager = "AssetManager", GalleryDialog = "GalleryDialog" } export interface IPerSurfaceConfiguration { [surfaceName: string]: { widgets?: IWidgetConfigsForSurface; }; } export interface IAssetSources { [sourceInstanceName: string]: IAssetSources.IAssetSourceConfig; } export declare namespace IAssetSources { interface IAssetSourceConfig { type: TType; actionMode?: IActionModeParsed; } interface IMemorySourceConfig extends IAssetSourceConfig<"MemorySource"> { rootCategory: IMemorySourceConfig.ICategory; } namespace IMemorySourceConfig { interface ICategory { name?: string; assets: IUrlAsset[]; categories: ICategory[]; } interface IUrlAsset { title: string; preview: string; source: string; } } interface IDepositPhotosConfig extends IAssetSourceConfig<"DepositPhotos"> { apiKey: string; size: ImageSize.ImageSizeType; userId?: string; insertItemConfirmationEnabled?: boolean; } interface IQueryBasedRemoteSourceConfig extends IAssetSourceConfig<"QueryBasedRemoteSource"> { baseUrl: string; productInfo: IProductInfo; baseNameRegexp: string; applier: { itemNamePattern: string; fieldList: string[]; }; endpoints: IEndPoint[]; } interface IProductInfo { imageUrl: string; description: string; additionalFields: [{ id: string; title: string; }]; } interface IEndPoint { url: string; method: string; responseDictionary: { [name: string]: string; }; requestParams: { [name: string]: string; }; title: string | { [lang: string]: string; }; } interface IRemoteSourceConfig extends IAssetSourceConfig<"RemoteSource"> { url: string; folderSortType?: string; fileSortTypes?: IRemoteSourceConfig.ISortType[]; subfolder?: string; rootId?: string; requestParams?: { [name: string]: string; }; rootFolder?: IRemoteSourceConfig.IRootFolderConfig; } namespace IRemoteSourceConfig { interface ISortType { asc: string; desc?: string; title: string | { [lang: string]: string; }; } interface IRootFolderConfig { show: boolean; title: string; } } interface IGallerySourceConfig extends IAssetSourceConfig<"PublicSource" | "PrivateSource"> { rootCategory?: IGallerySourceConfig.ICategory; allowedExtensions: string[]; } namespace IGallerySourceConfig { interface ICategory { name: string; categories?: ICategory[]; } } interface IPrivateSourceConfig extends IGallerySourceConfig { groupingByDateEnabled?: boolean; overwrite?: boolean; autoInsertUploadedFile?: boolean; path?: string; } interface ISocialNetworkSourceConfig extends IAssetSourceConfig<"SocialNetworkSource"> { network: SocialNetwotkSourceType; apiKey: string; } enum SocialNetwotkSourceType { Instagram = "instagram", Facebook = "facebook" } } export interface IGridConfigParsed extends IGridConfig { horizontalColor: string; verticalColor: string; stepX: number; stepY: number; lineWidthPx: number; enabled: boolean; } export interface IViolationWarningsSettingsConfigParsed extends IViolationWarningsSettingsConfig { qualityMeter: IQualityMeterConfigParsed; safetyLineViolationWarningEnabled: boolean; regionViolationWarningEnabled: boolean; textCropViolationWarningEnabled: boolean; shapeViolationsEnabled: boolean; } export interface IQualityMeterConfigParsed extends IQualityMeterConfig { qualityLevels: IQualityLevelsConfigParsed; enabled: boolean; } export interface IQualityLevelsConfigParsed extends IQualityLevelsConfig { warning: number; bad: number; } export interface IRulersConfigParsed extends IRulersConfig { enabled: boolean; unit: RulersConfigUnit.RulersConfigUnitType; customUnitScale: number; origin: { X: number; Y: number; }; } export interface ISnapLinesConfigParsed extends ISnapLinesConfig { enabled?: boolean; color?: string; tolerance?: number; items: ISnapElementConfigurationParsed; printArea: ISnapElementConfigurationParsed; safetyLines: ISnapElementConfigurationParsed; } export interface ISnapElementConfigurationParsed extends ISnapElementConfiguration { tolerance: number; color: string; enabled: boolean; priority: number; initialValue: boolean; } export interface IRotationConfigParsed extends IRotationConfig { type: RotationType; } export interface ICanvasConfigParsed extends ICanvasConfig { containerColor: string; color: string; shadowEnabled: boolean; paddingPct: number; zoomStep: number; pinchZoomEnabled: boolean; maskedPlaceholderUnderscoreEnabled: boolean; canvasItemHoverEnabled: boolean; suppressOutOfRegionManipulation: boolean; violationWarningButtonsEnabled: boolean; qualityChangeContainersEnabled: boolean; floatingItemToolbarEnabled: boolean; autoItemSelectionEnabled: boolean; multipleObjectsUpdateOptimizationEnabled: boolean; zoom: IRangeParamsParsed; rulers: IRulersConfigParsed; snapLines: ISnapLinesConfigParsed; rotation: IRotationConfigParsed; autoPlaceholderEditModeEnabled: boolean; gridVisible: boolean; safetyLinesVisible: boolean; snapLinesVisible: boolean; historySize: number; }