7.0.10 • Published 2 months ago

@aurigma/design-atoms-model v7.0.10

Weekly downloads
162
License
SEE LICENSE IN Li...
Repository
-
Last release
2 months ago

Aurigma Customer's Canvas SDK - Design Atoms Framework

Design Atoms is a part of Customer's Canvas SDK which allows manipulating individual elements of a design edited in the Customer's Canvas web-to-print editor. If you think of Customer's Canvas editor as a browser, you may consider Design Atoms as a DOM API.

For example, you may import a template to Customer's Canvas, then use Design Atoms to iterate all items, find, say, text elements named, say, Name and change its value. Or you can create a brand new design and pass it to Customer's Canvas.

Important! This package won't work alone. Design Atoms consists of a frontend part (this package) and a backend part (search for a package called Aurigma.DesignAtoms in NuGet). To be able to use Design Atoms, you need to connect it to a backend. See below for details.

Getting started

Install Design Atoms frontend library

Just run

npm install @aurigma/design-atoms --save

Then, you may import modules to your project and start using them.

import { Product } from "@aurigma/design-atoms/Model/Product";

let product = new Product([new Surface(100, 100)]);
// ...  

However, to be able to use it in a full force, you need to connect it with a backend.

There are two main ways to get a backend - create your own backend using the Aurigma.DesignAtoms NuGet package or hook it to an existing Customer's Canvas instance.

Creating a custom backend

This way is a good option if you don't need the editor but rather need to manipulate designs through the JavaScript/TypeScript or C# code and render the result in your application. Also, it is a way to go if you want to create a custom editor based on the Viewer control. Another purpose is to handle the output from Customer's Canvas in a separate application.

To do it, you need to create a .NET Web API project, add a reference to Aurigma.DesignAtoms NuGet package and expose the necessary endpoints.

You can download a sample backend implementation from GitHub and use this sample solution as a separate object or merge it with your existing ASP.NET application.

Connecting to Backend

You can use a running instance of either custom backend or Customer's Canvas 7. To connect to your backend, add the following code.

const backendUrl = "http://<yourInstanceUrl>";
const holderId = "#id-of-your-div";
const holder = document.querySelector(holderId) as HTMLDivElement;
const viewer = new Viewer({
    holderElement: holder,
    backendUrl: backendUrl,
    canvasBackground: { color: "white" }
});

What's next?

Refer Customer's Canvas documentation for more details on how to use this package:

7.0.10

2 months ago

7.0.9

2 months ago

7.0.8

5 months ago

7.0.7

5 months ago

6.6.7

5 months ago

7.0.6

5 months ago

7.0.5

6 months ago

6.6.3

10 months ago

6.6.5

8 months ago

6.6.4

10 months ago

6.6.6

7 months ago

7.0.4

7 months ago

7.0.3

7 months ago

7.0.2

7 months ago

7.0.1

9 months ago

7.0.0

10 months ago

6.6.2

10 months ago

6.6.1

12 months ago

6.6.0

1 year ago

6.5.45

1 year ago

6.5.44

1 year ago

6.5.43

1 year ago

6.5.42

1 year ago

6.5.41

1 year ago

6.5.40

1 year ago

6.5.37

2 years ago

6.5.39

1 year ago

6.5.38

1 year ago

6.5.36

2 years ago

6.5.33

2 years ago

6.5.35

2 years ago

6.5.34

2 years ago

6.5.32

2 years ago

6.5.31

2 years ago

6.5.30

2 years ago

6.5.29

2 years ago

6.5.28

2 years ago

6.5.24

2 years ago

6.5.26

2 years ago

6.5.25

2 years ago

6.5.27

2 years ago

6.5.22

2 years ago

6.5.23

2 years ago

6.5.21

2 years ago

6.5.20

2 years ago

6.5.19

3 years ago

6.5.18

3 years ago

5.33.8

3 years ago

6.5.17

3 years ago

6.5.16

3 years ago

6.5.15

3 years ago

6.5.14

3 years ago

6.5.13

3 years ago

6.5.11

3 years ago

5.33.5

3 years ago

6.5.10

3 years ago

6.5.9

3 years ago

5.33.3

3 years ago

6.5.8

3 years ago

5.33.2

3 years ago

6.5.4

3 years ago

6.5.3

3 years ago

6.5.6

3 years ago

6.5.5

3 years ago

6.5.7

3 years ago

6.5.2

3 years ago

6.5.1

3 years ago

6.5.0

3 years ago

6.4.0

3 years ago

6.3.1

3 years ago

6.3.0

3 years ago

6.2.0

3 years ago

6.1.8

3 years ago

6.1.7

3 years ago

5.33.1

3 years ago

6.1.6

3 years ago

6.1.5

3 years ago

5.33.0

3 years ago

6.1.4

3 years ago

6.1.3

3 years ago

5.32.6

3 years ago

6.1.2

3 years ago

5.32.5

3 years ago

6.1.1

3 years ago

5.32.4

3 years ago

6.1.0

3 years ago

5.32.3

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.32.2

3 years ago

5.32.1

4 years ago

5.32.0

4 years ago

5.31.4

4 years ago

5.31.3

4 years ago

5.31.2

4 years ago

5.31.1

4 years ago

5.31.0

4 years ago