Interface Editor.IUserChanges
A structure containing all changes the user made to the product when personalizing it.
Package: @aurigma/design-editor-iframe
Examples
// Completing product customization.
let renderingResult = await editor.finishProductDesign()
// If an error occurred while completing product customization.
.catch(error => console.error("Completing product customization failed with exception: ", error));
// When product customization has been completed successfully, get the promise properties.
let stateId = renderingResult.stateId;
let userId = renderingResult.userId;
let userChanges = renderingResult.userChanges;
console.log("Text user changes: ", userChanges.texts);
Properties
inStringPlaceholders
An array of texts entered by the user in text placeholders. For each text placeholder, which was changed by the user, the corresponding object contains its name and new value.
Declaration
inStringPlaceholders: {
name: string;
usersValue: string;
}[];
Property Value
| Type | Description |
|---|---|
| { name: string; usersValue: string; }[] | An array of texts entered by the user in text placeholders. For each text placeholder, which was changed by the user, the corresponding object contains its name and new value. |
mockups
An object containing array of mockups that the user set up. For each mockup, which was applied to a surface, the corresponding object contains the surface and mockup names.
Declaration
mockups: {
[surfaceName: string]: string;
};
Property Value
| Type | Description |
|---|---|
| { [surfaceName: string]: string; } | An object containing array of mockups that the user set up. For each mockup, which was applied to a surface, the corresponding object contains the surface and mockup names. |
surfaces
An object containing user changes on a per-surface basis. Each surface, where the user changes text elements, has texts and inStringPlaceholders arrays with the element name and new value.
Declaration
surfaces: ISurfacesChanges;
Property Value
| Type | Description |
|---|---|
| ISurfacesChanges | An object containing user changes on a per-surface basis. Each surface, where the user changes text elements, has |
texts
An array of texts entered by the user in text elements. For each text element, which was changed by the user, the corresponding object contains its name and new value.
Declaration
texts: {
name: string;
usersValue: string;
isNewItem: boolean;
isRemovedItem?: boolean;
}[];
Property Value
| Type | Description |
|---|---|
| { name: string; usersValue: string; isNewItem: boolean; isRemovedItem?: boolean; }[] | An array of texts entered by the user in text elements. For each text element, which was changed by the user, the corresponding object contains its name and new value. |