UNPKG

@aurigma/design-editor-iframe

Version:

Using this module you can embed Design Editor (a part of Customer's Canvas) to your page through the IFrame API.

260 lines 14.9 kB
import * as Iframe from './IframeApi'; import * as ConfigTypes from './Configuration/ConfigurationTypes'; import * as EditorApi from './Editor'; import * as EditorLoaderApi from './EditorLoader'; import * as ExceptionApi from './Exception'; import * as FullWindowHandlerApi from './FullWindowHandler'; import * as RuntimeConfigurationApi from './RuntimeConfiguration'; import * as ObjectModelApi from './ObjectModel/ObjectModel'; import * as ConvertApi from './ObjectModel/Convert'; import * as ClientApi from './PostMessage/Client'; import * as RpcTypes from './PostMessage/RpcTypes'; import * as Items from '@aurigma/design-atoms-model/Product/Items'; import * as CCProduct from '@aurigma/design-atoms-model/Product'; import * as CCMath from '@aurigma/design-atoms-model/Math'; import * as CCVersion from "./Version"; import * as Color from '@aurigma/design-atoms/Serialization/Color'; import * as waitElementVisible from "./waitElementVisible"; import * as UtilsAjax from '@aurigma/design-atoms/Utils/Ajax'; import { Json as UtilsJson } from "@aurigma/design-atoms/Utils/Json"; import * as UtilsDeferred from "@aurigma/design-atoms/Utils/Deferred"; import * as UtilsType from "@aurigma/design-atoms/Utils/Type"; import * as UtilsUserAgent from "@aurigma/design-atoms/Utils/UserAgent"; import * as CCMargin from "@aurigma/design-atoms-model/Math/Margin"; import * as DAInterfaces from '@aurigma/design-atoms-interfaces'; export var CustomersCanvas; (function (CustomersCanvas) { CustomersCanvas.VERSION = CCVersion.VERSION; })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { IframeApi.editorUrl = Iframe.editorUrl; IframeApi.loadEditor = Iframe.loadEditor; IframeApi.preload = Iframe.preload; IframeApi.loadEditorByQueryString = Iframe.loadEditorByQueryString; IframeApi._createPreConfiguredEditor = Iframe._createPreConfiguredEditor; IframeApi._waitElementVisible = waitElementVisible.waitElementVisible; IframeApi.QueryString = Iframe.QueryString; IframeApi.StateId = Iframe.StateId; // deprecated IframeApi.Editor = EditorApi.Editor; IframeApi.EditorLoader = EditorLoaderApi.EditorLoader; IframeApi.ServerException = ExceptionApi.ServerException; IframeApi.FullWindowHandler = FullWindowHandlerApi.FullWindowHandler; IframeApi.RuntimeConfiguration = RuntimeConfigurationApi; })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { var Configuration; (function (Configuration) { Configuration.BarcodeType = ConfigTypes.BarcodeType; Configuration.ColorSpace = ConfigTypes.ColorSpace; Configuration.FinishButtonMode = ConfigTypes.FinishButtonMode; Configuration.FontListMode = ConfigTypes.FontListMode; Configuration.GallerySource = ConfigTypes.GallerySource; Configuration.InStringPlaceholderMode = ConfigTypes.InStringPlaceholderMode; Configuration.ImageSize = ConfigTypes.ImageSize; Configuration.ModelMode = ConfigTypes.ModelMode; Configuration.ObjectInspectorPosition = ConfigTypes.ObjectInspectorPosition; Configuration.PsdActionMode = ConfigTypes.PsdActionMode; Configuration.SvgActionMode = ConfigTypes.SvgActionMode; Configuration.TextAlignment = ConfigTypes.TextAlignment; })(Configuration = IframeApi.Configuration || (IframeApi.Configuration = {})); })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { var Exception; (function (Exception) { Exception.create = ExceptionApi.create; Exception.isIframeApiException = ExceptionApi.isIframeApiException; })(Exception = IframeApi.Exception || (IframeApi.Exception = {})); })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { var ObjectModel; (function (ObjectModel) { ObjectModel.Container = ObjectModelApi.Container; ObjectModel.ChannelContainerType = ObjectModelApi.ChannelContainerType; ObjectModel.CropMarkTextAlignment = ObjectModelApi.CropMarkTextAlignment; ObjectModel.Item = ObjectModelApi.Item; ObjectModel.ModelComponent = ObjectModelApi.ModelComponent; ObjectModel.PrintArea = ObjectModelApi.PrintArea; ObjectModel.Product = ObjectModelApi.Product; ObjectModel.Surface = ObjectModelApi.Surface; ObjectModel.SurfaceMockup = ObjectModelApi.SurfaceMockup; ObjectModel.PdfBox = ObjectModelApi.PdfBox; })(ObjectModel = IframeApi.ObjectModel || (IframeApi.ObjectModel = {})); })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { var ObjectModel; (function (ObjectModel) { var Convert; (function (Convert) { Convert.fromMockupsData = ConvertApi.fromMockupsData; Convert.fromPrintAreas = ConvertApi.fromPrintAreas; Convert.fromSurface = ConvertApi.fromSurface; Convert.fromSurfaces = ConvertApi.fromSurfaces; Convert.isEmptyMockup = ConvertApi.isEmptyMockup; Convert.normalizeMockupTemplate = ConvertApi.normalizeMockupTemplate; Convert.prepareForServer = ConvertApi.prepareForServer; })(Convert = ObjectModel.Convert || (ObjectModel.Convert = {})); })(ObjectModel = IframeApi.ObjectModel || (IframeApi.ObjectModel = {})); })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var IframeApi; (function (IframeApi) { var PostMessage; (function (PostMessage) { PostMessage.Client = ClientApi.Client; PostMessage.Events = RpcTypes.Events; PostMessage.MessageType = RpcTypes.MessageType; })(PostMessage = IframeApi.PostMessage || (IframeApi.PostMessage = {})); })(IframeApi = CustomersCanvas.IframeApi || (CustomersCanvas.IframeApi = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var Utils; (function (Utils) { Utils.Json = UtilsJson; Utils.Deferred = UtilsDeferred.Deferred; Utils.UserAgent = UtilsUserAgent.UserAgent; })(Utils = CustomersCanvas.Utils || (CustomersCanvas.Utils = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var Utils; (function (Utils) { var Ajax; (function (Ajax) { Ajax.getJson = UtilsAjax.getJson; Ajax.postJson = UtilsAjax.postJson; Ajax.request = UtilsAjax.request; Ajax.StatusCode = UtilsAjax.StatusCode; Ajax.RequestType = UtilsAjax.RequestType; Ajax.ContentType = UtilsAjax.ContentType; Ajax.Exception = UtilsAjax.Exception; })(Ajax = Utils.Ajax || (Utils.Ajax = {})); })(Utils = CustomersCanvas.Utils || (CustomersCanvas.Utils = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var Utils; (function (Utils) { var Type; (function (Type) { Type.isStringArray = UtilsType.isStringArray; Type.isObject = UtilsType.isObject; })(Type = Utils.Type || (Utils.Type = {})); })(Utils = CustomersCanvas.Utils || (CustomersCanvas.Utils = {})); })(CustomersCanvas || (CustomersCanvas = {})); (function (CustomersCanvas) { var DesignAtoms; (function (DesignAtoms) { var ObjectModel; (function (ObjectModel) { ObjectModel.AutoScaledTextItem = Items.AutoScaledTextItem; ObjectModel.BarcodeData = Items.BarcodeData; ObjectModel.BarcodeFormat = Items.BarcodeFormat; ObjectModel.BarcodeItem = Items.BarcodeItem; ObjectModel.BarcodePermissions = Items.BarcodePermissions; ObjectModel.BarcodeSubType = Items.BarcodeSubType; ObjectModel.BaseItem = Items.BaseItem; ObjectModel.BaseTextItem = Items.BaseTextItem; ObjectModel.BoundedTextItem = Items.BoundedTextItem; ObjectModel.ContentItem = Items.ContentItem; ObjectModel.ContentPermissions = Items.ContentPermissions; ObjectModel.CurvedTextItem = Items.CurvedTextItem; ObjectModel.DashedLineItem = Items.DashedLineItem; ObjectModel.EllipseItem = Items.EllipseItem; // can't export type // export import EncodingOptions = Items.EncodingOptions; ObjectModel.FitMode = Items.FitMode; ObjectModel.FrontendPermissions = Items.FrontendPermissions; ObjectModel.HorizontalContentAlignment = Items.HorizontalContentAlignment; ObjectModel.ImageItem = Items.ImageItem; ObjectModel.ImageMetaData = Items.ImageMetaData; ObjectModel.ImagePermissions = Items.ImagePermissions; // can't export type // export import IResizeGripsPermissions = Items.IResizeGripsPermissions; ObjectModel.Item = Items.Item; ObjectModel.ItemPermissions = Items.ItemPermissions; ObjectModel.ItemToolbarPermissions = Items.ItemToolbarPermissions; // can't export type ObjectModel.LineItem = Items.LineItem; ObjectModel.LinePermissions = Items.LinePermissions; ObjectModel.ManipulationPermissions = Items.ManipulationPermissions; ObjectModel.OverflowStrategy = Items.OverflowStrategy; ObjectModel.ParagraphSettings = Items.ParagraphSettings; ObjectModel.PathBoundedTextItem = Items.PathBoundedTextItem; ObjectModel.PathBoundedTextPermissions = Items.PathBoundedTextPermissions; ObjectModel.PlaceholderItem = Items.PlaceholderItem; ObjectModel.PlaceholderPermissions = Items.PlaceholderPermissions; ObjectModel.PlainTextItem = Items.PlainTextItem; ObjectModel.PolylineItem = Items.PolylineItem; ObjectModel.RectangleItem = Items.RectangleItem; ObjectModel.ResizeGripsPermissions = Items.ResizeGripsPermissions; ObjectModel.ResizeMode = Items.ResizeMode; ObjectModel.ShapeItem = Items.ShapeItem; ObjectModel.ShapePermissions = Items.ShapePermissions; ObjectModel.ShrinkMode = Items.ShrinkMode; ObjectModel.SmartItem = Items.SmartItem; ObjectModel.TextAlignment = Items.TextAlignment; ObjectModel.TextPermissions = Items.TextPermissions; ObjectModel.TextVerticalAlignment = Items.TextVerticalAlignment; ObjectModel.ThemeBinding = Items.ThemeBinding; ObjectModel.VerticalContentAlignment = Items.VerticalContentAlignment; ObjectModel.VisualizationPermissions = Items.VisualizationPermissions; ObjectModel.Container = CCProduct.Container; ObjectModel.CropMark = CCProduct.CropMark; ObjectModel.CropMarkText = CCProduct.CropMarkText; ObjectModel.CropMarkTextAlignment = CCProduct.CropMarkTextAlignment; ObjectModel.MockupContainer = CCProduct.MockupContainer; ObjectModel.ModelComponent = CCProduct.ModelComponent; ObjectModel.PrintArea = CCProduct.PrintArea; ObjectModel.Product = CCProduct.Product; ObjectModel.RenderingType = CCProduct.RenderingType; ObjectModel.SafetyLine = CCProduct.SafetyLine; ObjectModel.SpotColorContainer = CCProduct.SpotColorContainer; ObjectModel.ColorLessContainer = CCProduct.ColorLessContainer; ObjectModel.LimitedColorContainer = CCProduct.LimitedColorContainer; ObjectModel.FullColorContainer = CCProduct.FullColorContainer; ObjectModel.Surface = CCProduct.Surface; ObjectModel.SurfaceContainer = CCProduct.SurfaceContainer; ObjectModel.SurfaceMockup = CCProduct.SurfaceMockup; ObjectModel.TextureContainer = CCProduct.TextureContainer; ObjectModel.Uuid = CCProduct.Uuid; ObjectModel.Watermark = CCProduct.Watermark; ObjectModel.Matrix = CCMath.Matrix; ObjectModel.Path = CCMath.Path; ObjectModel.PathSegment = CCMath.PathSegment; ObjectModel.PointF = CCMath.PointF; ObjectModel.RectangleF = CCMath.RectangleF; ObjectModel.RotatedRectangleF = CCMath.RotatedRectangleF; ObjectModel.SizeF = CCMath.SizeF; ObjectModel.Margin = CCMargin.Margin; ObjectModel.ResizeRectangleType = DAInterfaces.ResizeRectangleType; ObjectModel.InStringPlaceholder = Items.InStringPlaceholder; ObjectModel.ColorParser = Color.ColorParser; ObjectModel.NamedColorConverter = Color.NamedColorConverter; ObjectModel.RgbColorParser = Color.RgbColorParser; ObjectModel.CmykColorParser = Color.CmykColorParser; ObjectModel.LabColorParser = Color.LabColorParser; ObjectModel.SpotColorParser = Color.SpotColorParser; function createColorParser() { return new ObjectModel.ColorParser(new ObjectModel.NamedColorConverter(), new ObjectModel.RgbColorParser(), new ObjectModel.CmykColorParser(), new ObjectModel.LabColorParser(), new ObjectModel.SpotColorParser()); } ObjectModel.createColorParser = createColorParser; ObjectModel.ColorContainerVisualization = CCProduct.ColorContainerVisualization; ObjectModel.PrintingTechniqueConstraints = CCProduct.PrintingTechniqueConstraints; })(ObjectModel = DesignAtoms.ObjectModel || (DesignAtoms.ObjectModel = {})); })(DesignAtoms = CustomersCanvas.DesignAtoms || (CustomersCanvas.DesignAtoms = {})); })(CustomersCanvas || (CustomersCanvas = {})); window['CustomersCanvas'] = CustomersCanvas; //# sourceMappingURL=LegacyIframeApi.js.map