@contrail/documents 1.0.104 → 1.0.105
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.
- package/README.md +1 -1
- package/lib/components/components.d.ts +269 -269
- package/lib/components/components.js +92 -92
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +17 -17
- package/lib/document-action.d.ts +7 -7
- package/lib/document-action.js +10 -10
- package/lib/document-element-component-size-handler.d.ts +4 -4
- package/lib/document-element-component-size-handler.js +55 -55
- package/lib/document-element-factory.d.ts +12 -12
- package/lib/document-element-factory.js +77 -77
- package/lib/document-element-property-binding-handler.d.ts +6 -6
- package/lib/document-element-property-binding-handler.js +71 -71
- package/lib/index.d.ts +8 -8
- package/lib/index.js +24 -24
- package/lib/types/common.d.ts +84 -82
- package/lib/types/common.js +8 -8
- package/lib/types/data-object.d.ts +6 -6
- package/lib/types/data-object.js +2 -2
- package/lib/types/document-change.d.ts +17 -17
- package/lib/types/document-change.js +12 -12
- package/lib/types/document-element-event.d.ts +24 -24
- package/lib/types/document-element-event.js +2 -2
- package/lib/types/document-element-holder.d.ts +8 -8
- package/lib/types/document-element-holder.js +2 -2
- package/lib/types/document-element.d.ts +44 -44
- package/lib/types/document-element.js +2 -2
- package/lib/types/document-navigation-event.d.ts +5 -5
- package/lib/types/document-navigation-event.js +2 -2
- package/lib/types/document.d.ts +24 -24
- package/lib/types/document.js +2 -2
- package/lib/types/element-transformation.d.ts +18 -18
- package/lib/types/element-transformation.js +2 -2
- package/lib/types/index.d.ts +9 -9
- package/lib/types/index.js +25 -25
- package/lib/util/dynamic-text/dynamic-text-util.d.ts +14 -14
- package/lib/util/dynamic-text/dynamic-text-util.js +58 -58
- package/lib/util/measure-text/measure-text.d.ts +5 -5
- package/lib/util/measure-text/measure-text.js +53 -53
- package/lib/util/measure-text/widths-map.d.ts +1651 -1651
- package/lib/util/measure-text/widths-map.js +1654 -1654
- package/package.json +46 -46
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DocumentElementPropertyBindingHandler = void 0;
|
|
4
|
-
const util_1 = require("@contrail/util");
|
|
5
|
-
class DocumentElementPropertyBindingHandler {
|
|
6
|
-
static bindPropertiesToElements(elements, model) {
|
|
7
|
-
elements.map((el) => {
|
|
8
|
-
this.bindPropertiesToElement(el, model);
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
static bindPropertiesToElement(element, model) {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
13
|
-
const localModel = Object.assign({}, model);
|
|
14
|
-
if (!element.propertyBindings) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
if (element.modelBindings) {
|
|
18
|
-
}
|
|
19
|
-
for (const propertyKey of Object.keys(element.propertyBindings)) {
|
|
20
|
-
const modelIndex = element.propertyBindings[propertyKey];
|
|
21
|
-
let propertyValue = util_1.ObjectUtil.getByPath(localModel, modelIndex);
|
|
22
|
-
if (propertyValue === null || propertyValue === undefined) {
|
|
23
|
-
propertyValue = '';
|
|
24
|
-
}
|
|
25
|
-
util_1.ObjectUtil.setByPath(element, propertyKey, propertyValue);
|
|
26
|
-
}
|
|
27
|
-
const isImage = ['image', 'svg'].includes(element.type);
|
|
28
|
-
if (((_b = (_a = element.propertyBindings) === null || _a === void 0 ? void 0 : _a.url) === null || _b === void 0 ? void 0 : _b.indexOf('viewable')) !== -1 && isImage) {
|
|
29
|
-
element.alternateUrls = {};
|
|
30
|
-
let highResUrl = ((_c = model === null || model === void 0 ? void 0 : model.viewable) === null || _c === void 0 ? void 0 : _c.largeViewableDownloadUrl) || ((_d = model === null || model === void 0 ? void 0 : model.viewable) === null || _d === void 0 ? void 0 : _d.largeViewableUrl);
|
|
31
|
-
let originalFile;
|
|
32
|
-
let viewableObject;
|
|
33
|
-
const content = (_e = model === null || model === void 0 ? void 0 : model.viewable) === null || _e === void 0 ? void 0 : _e.content;
|
|
34
|
-
if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
|
|
35
|
-
const primaryContent = content.find((c) => { var _a; return (c === null || c === void 0 ? void 0 : c.id) === ((_a = model === null || model === void 0 ? void 0 : model.viewable) === null || _a === void 0 ? void 0 : _a.primaryViewableId); });
|
|
36
|
-
viewableObject = primaryContent;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
viewableObject = model === null || model === void 0 ? void 0 : model.viewable;
|
|
40
|
-
}
|
|
41
|
-
const contentType = viewableObject === null || viewableObject === void 0 ? void 0 : viewableObject.contentType;
|
|
42
|
-
const primaryFileUrl = viewableObject === null || viewableObject === void 0 ? void 0 : viewableObject.primaryFileUrl;
|
|
43
|
-
if (contentType === 'image/svg+xml') {
|
|
44
|
-
highResUrl = primaryFileUrl;
|
|
45
|
-
}
|
|
46
|
-
if (this.isContentTypeWebViewable(contentType)) {
|
|
47
|
-
originalFile = primaryFileUrl;
|
|
48
|
-
}
|
|
49
|
-
if (highResUrl) {
|
|
50
|
-
element.alternateUrls.highResolution = highResUrl;
|
|
51
|
-
}
|
|
52
|
-
if (originalFile) {
|
|
53
|
-
element.alternateUrls.originalFile = originalFile;
|
|
54
|
-
}
|
|
55
|
-
let lowResUrl = ((_f = model === null || model === void 0 ? void 0 : model.viewable) === null || _f === void 0 ? void 0 : _f.smallViewableDownloadUrl) || ((_g = model === null || model === void 0 ? void 0 : model.viewable) === null || _g === void 0 ? void 0 : _g.smallViewableUrl);
|
|
56
|
-
if (lowResUrl) {
|
|
57
|
-
element.alternateUrls.lowResolution = lowResUrl;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (element.elements) {
|
|
61
|
-
this.bindPropertiesToElements(element.elements, localModel);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
static isContentTypeWebViewable(contentType) {
|
|
65
|
-
if (!contentType) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
return (contentType === null || contentType === void 0 ? void 0 : contentType.indexOf('image')) > -1 && (contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase().indexOf('tiff')) < 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.DocumentElementPropertyBindingHandler = DocumentElementPropertyBindingHandler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentElementPropertyBindingHandler = void 0;
|
|
4
|
+
const util_1 = require("@contrail/util");
|
|
5
|
+
class DocumentElementPropertyBindingHandler {
|
|
6
|
+
static bindPropertiesToElements(elements, model) {
|
|
7
|
+
elements.map((el) => {
|
|
8
|
+
this.bindPropertiesToElement(el, model);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
static bindPropertiesToElement(element, model) {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
13
|
+
const localModel = Object.assign({}, model);
|
|
14
|
+
if (!element.propertyBindings) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (element.modelBindings) {
|
|
18
|
+
}
|
|
19
|
+
for (const propertyKey of Object.keys(element.propertyBindings)) {
|
|
20
|
+
const modelIndex = element.propertyBindings[propertyKey];
|
|
21
|
+
let propertyValue = util_1.ObjectUtil.getByPath(localModel, modelIndex);
|
|
22
|
+
if (propertyValue === null || propertyValue === undefined) {
|
|
23
|
+
propertyValue = '';
|
|
24
|
+
}
|
|
25
|
+
util_1.ObjectUtil.setByPath(element, propertyKey, propertyValue);
|
|
26
|
+
}
|
|
27
|
+
const isImage = ['image', 'svg'].includes(element.type);
|
|
28
|
+
if (((_b = (_a = element.propertyBindings) === null || _a === void 0 ? void 0 : _a.url) === null || _b === void 0 ? void 0 : _b.indexOf('viewable')) !== -1 && isImage) {
|
|
29
|
+
element.alternateUrls = {};
|
|
30
|
+
let highResUrl = ((_c = model === null || model === void 0 ? void 0 : model.viewable) === null || _c === void 0 ? void 0 : _c.largeViewableDownloadUrl) || ((_d = model === null || model === void 0 ? void 0 : model.viewable) === null || _d === void 0 ? void 0 : _d.largeViewableUrl);
|
|
31
|
+
let originalFile;
|
|
32
|
+
let viewableObject;
|
|
33
|
+
const content = (_e = model === null || model === void 0 ? void 0 : model.viewable) === null || _e === void 0 ? void 0 : _e.content;
|
|
34
|
+
if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
|
|
35
|
+
const primaryContent = content.find((c) => { var _a; return (c === null || c === void 0 ? void 0 : c.id) === ((_a = model === null || model === void 0 ? void 0 : model.viewable) === null || _a === void 0 ? void 0 : _a.primaryViewableId); });
|
|
36
|
+
viewableObject = primaryContent;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
viewableObject = model === null || model === void 0 ? void 0 : model.viewable;
|
|
40
|
+
}
|
|
41
|
+
const contentType = viewableObject === null || viewableObject === void 0 ? void 0 : viewableObject.contentType;
|
|
42
|
+
const primaryFileUrl = viewableObject === null || viewableObject === void 0 ? void 0 : viewableObject.primaryFileUrl;
|
|
43
|
+
if (contentType === 'image/svg+xml') {
|
|
44
|
+
highResUrl = primaryFileUrl;
|
|
45
|
+
}
|
|
46
|
+
if (this.isContentTypeWebViewable(contentType)) {
|
|
47
|
+
originalFile = primaryFileUrl;
|
|
48
|
+
}
|
|
49
|
+
if (highResUrl) {
|
|
50
|
+
element.alternateUrls.highResolution = highResUrl;
|
|
51
|
+
}
|
|
52
|
+
if (originalFile) {
|
|
53
|
+
element.alternateUrls.originalFile = originalFile;
|
|
54
|
+
}
|
|
55
|
+
let lowResUrl = ((_f = model === null || model === void 0 ? void 0 : model.viewable) === null || _f === void 0 ? void 0 : _f.smallViewableDownloadUrl) || ((_g = model === null || model === void 0 ? void 0 : model.viewable) === null || _g === void 0 ? void 0 : _g.smallViewableUrl);
|
|
56
|
+
if (lowResUrl) {
|
|
57
|
+
element.alternateUrls.lowResolution = lowResUrl;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (element.elements) {
|
|
61
|
+
this.bindPropertiesToElements(element.elements, localModel);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static isContentTypeWebViewable(contentType) {
|
|
65
|
+
if (!contentType) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return (contentType === null || contentType === void 0 ? void 0 : contentType.indexOf('image')) > -1 && (contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase().indexOf('tiff')) < 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.DocumentElementPropertyBindingHandler = DocumentElementPropertyBindingHandler;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './document-element-factory';
|
|
4
|
-
export * from './document-element-property-binding-handler';
|
|
5
|
-
export * from './document-element-component-size-handler';
|
|
6
|
-
export * from './document-action';
|
|
7
|
-
export * from './util/measure-text/measure-text';
|
|
8
|
-
export * from './util/dynamic-text/dynamic-text-util';
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './document-element-factory';
|
|
4
|
+
export * from './document-element-property-binding-handler';
|
|
5
|
+
export * from './document-element-component-size-handler';
|
|
6
|
+
export * from './document-action';
|
|
7
|
+
export * from './util/measure-text/measure-text';
|
|
8
|
+
export * from './util/dynamic-text/dynamic-text-util';
|
package/lib/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./components"), exports);
|
|
19
|
-
__exportStar(require("./document-element-factory"), exports);
|
|
20
|
-
__exportStar(require("./document-element-property-binding-handler"), exports);
|
|
21
|
-
__exportStar(require("./document-element-component-size-handler"), exports);
|
|
22
|
-
__exportStar(require("./document-action"), exports);
|
|
23
|
-
__exportStar(require("./util/measure-text/measure-text"), exports);
|
|
24
|
-
__exportStar(require("./util/dynamic-text/dynamic-text-util"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./components"), exports);
|
|
19
|
+
__exportStar(require("./document-element-factory"), exports);
|
|
20
|
+
__exportStar(require("./document-element-property-binding-handler"), exports);
|
|
21
|
+
__exportStar(require("./document-element-component-size-handler"), exports);
|
|
22
|
+
__exportStar(require("./document-action"), exports);
|
|
23
|
+
__exportStar(require("./util/measure-text/measure-text"), exports);
|
|
24
|
+
__exportStar(require("./util/dynamic-text/dynamic-text-util"), exports);
|
package/lib/types/common.d.ts
CHANGED
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
export interface TextStyleDefinition {
|
|
2
|
-
valign?: string;
|
|
3
|
-
align?: string;
|
|
4
|
-
decoration?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface FontStyleDefinition {
|
|
7
|
-
family?: string;
|
|
8
|
-
size?: number;
|
|
9
|
-
sizeMode?: 'auto' | 'custom';
|
|
10
|
-
weight?: string;
|
|
11
|
-
style?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
export interface TextStyleDefinition {
|
|
2
|
+
valign?: string;
|
|
3
|
+
align?: string;
|
|
4
|
+
decoration?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FontStyleDefinition {
|
|
7
|
+
family?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
sizeMode?: 'auto' | 'custom';
|
|
10
|
+
weight?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
strikethrough?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface BorderStyleDefinition {
|
|
16
|
+
style?: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
radius?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface BackgroundStyleDefinition {
|
|
22
|
+
color?: string;
|
|
23
|
+
size?: BackgroundSizeType;
|
|
24
|
+
}
|
|
25
|
+
export declare enum BackgroundSizeType {
|
|
26
|
+
CONTAIN = "CONTAIN",
|
|
27
|
+
COVER = "COVER"
|
|
28
|
+
}
|
|
29
|
+
export interface StyleDefinition {
|
|
30
|
+
background?: BackgroundStyleDefinition;
|
|
31
|
+
text?: TextStyleDefinition;
|
|
32
|
+
font?: FontStyleDefinition;
|
|
33
|
+
border?: BorderStyleDefinition;
|
|
34
|
+
color?: string;
|
|
35
|
+
backgroundColor?: string;
|
|
36
|
+
opacity?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface SizeDefinition {
|
|
39
|
+
width?: number;
|
|
40
|
+
height?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ViewBox {
|
|
43
|
+
width?: number;
|
|
44
|
+
height?: number;
|
|
45
|
+
x?: number;
|
|
46
|
+
y?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ViewShape {
|
|
49
|
+
type?: string;
|
|
50
|
+
width?: number;
|
|
51
|
+
height?: number;
|
|
52
|
+
x?: number;
|
|
53
|
+
y?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface PositionDefinition {
|
|
56
|
+
x?: number;
|
|
57
|
+
y?: number;
|
|
58
|
+
z?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface RotationDefinition {
|
|
61
|
+
angle?: number;
|
|
62
|
+
}
|
|
63
|
+
export interface LineDefinition {
|
|
64
|
+
x1?: number;
|
|
65
|
+
x2?: number;
|
|
66
|
+
y1?: number;
|
|
67
|
+
y2?: number;
|
|
68
|
+
markerStart?: string;
|
|
69
|
+
markerEnd?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface CropDefinition {
|
|
72
|
+
x1?: number;
|
|
73
|
+
x2?: number;
|
|
74
|
+
y1?: number;
|
|
75
|
+
y2?: number;
|
|
76
|
+
width?: number;
|
|
77
|
+
height?: number;
|
|
78
|
+
x1Percent?: number;
|
|
79
|
+
x2Percent?: number;
|
|
80
|
+
y1Percent?: number;
|
|
81
|
+
y2Percent?: number;
|
|
82
|
+
widthPercent?: number;
|
|
83
|
+
heightPercent?: number;
|
|
84
|
+
}
|
package/lib/types/common.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BackgroundSizeType = void 0;
|
|
4
|
-
var BackgroundSizeType;
|
|
5
|
-
(function (BackgroundSizeType) {
|
|
6
|
-
BackgroundSizeType["CONTAIN"] = "CONTAIN";
|
|
7
|
-
BackgroundSizeType["COVER"] = "COVER";
|
|
8
|
-
})(BackgroundSizeType = exports.BackgroundSizeType || (exports.BackgroundSizeType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BackgroundSizeType = void 0;
|
|
4
|
+
var BackgroundSizeType;
|
|
5
|
+
(function (BackgroundSizeType) {
|
|
6
|
+
BackgroundSizeType["CONTAIN"] = "CONTAIN";
|
|
7
|
+
BackgroundSizeType["COVER"] = "COVER";
|
|
8
|
+
})(BackgroundSizeType = exports.BackgroundSizeType || (exports.BackgroundSizeType = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface DataObject {
|
|
2
|
-
entityRef?: string;
|
|
3
|
-
entity?: any;
|
|
4
|
-
viewDefinitionRef?: string;
|
|
5
|
-
viewDefinition?: any;
|
|
6
|
-
}
|
|
1
|
+
export interface DataObject {
|
|
2
|
+
entityRef?: string;
|
|
3
|
+
entity?: any;
|
|
4
|
+
viewDefinitionRef?: string;
|
|
5
|
+
viewDefinition?: any;
|
|
6
|
+
}
|
package/lib/types/data-object.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { DocumentElement } from './document-element';
|
|
2
|
-
export declare enum DocumentChangeType {
|
|
3
|
-
ADD_ELEMENT = "ADD_ELEMENT",
|
|
4
|
-
DELETE_ELEMENT = "DELETE_ELEMENT",
|
|
5
|
-
MODIFY_ELEMENT = "MODIFY_ELEMENT",
|
|
6
|
-
REORDER_ELEMENT = "REORDER_ELEMENT",
|
|
7
|
-
REGENERATE_LINEBOARD = "REGENERATE_LINEBOARD",
|
|
8
|
-
REBIND_MODEL = "REBIND_MODEL"
|
|
9
|
-
}
|
|
10
|
-
export interface DocumentChange {
|
|
11
|
-
changeType: DocumentChangeType;
|
|
12
|
-
documentId?: string;
|
|
13
|
-
elementData?: DocumentElement;
|
|
14
|
-
elementId?: string;
|
|
15
|
-
documentGenerationConfig?: any;
|
|
16
|
-
backingAssortmentItemData?: any;
|
|
17
|
-
}
|
|
1
|
+
import { DocumentElement } from './document-element';
|
|
2
|
+
export declare enum DocumentChangeType {
|
|
3
|
+
ADD_ELEMENT = "ADD_ELEMENT",
|
|
4
|
+
DELETE_ELEMENT = "DELETE_ELEMENT",
|
|
5
|
+
MODIFY_ELEMENT = "MODIFY_ELEMENT",
|
|
6
|
+
REORDER_ELEMENT = "REORDER_ELEMENT",
|
|
7
|
+
REGENERATE_LINEBOARD = "REGENERATE_LINEBOARD",
|
|
8
|
+
REBIND_MODEL = "REBIND_MODEL"
|
|
9
|
+
}
|
|
10
|
+
export interface DocumentChange {
|
|
11
|
+
changeType: DocumentChangeType;
|
|
12
|
+
documentId?: string;
|
|
13
|
+
elementData?: DocumentElement;
|
|
14
|
+
elementId?: string;
|
|
15
|
+
documentGenerationConfig?: any;
|
|
16
|
+
backingAssortmentItemData?: any;
|
|
17
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DocumentChangeType = void 0;
|
|
4
|
-
var DocumentChangeType;
|
|
5
|
-
(function (DocumentChangeType) {
|
|
6
|
-
DocumentChangeType["ADD_ELEMENT"] = "ADD_ELEMENT";
|
|
7
|
-
DocumentChangeType["DELETE_ELEMENT"] = "DELETE_ELEMENT";
|
|
8
|
-
DocumentChangeType["MODIFY_ELEMENT"] = "MODIFY_ELEMENT";
|
|
9
|
-
DocumentChangeType["REORDER_ELEMENT"] = "REORDER_ELEMENT";
|
|
10
|
-
DocumentChangeType["REGENERATE_LINEBOARD"] = "REGENERATE_LINEBOARD";
|
|
11
|
-
DocumentChangeType["REBIND_MODEL"] = "REBIND_MODEL";
|
|
12
|
-
})(DocumentChangeType = exports.DocumentChangeType || (exports.DocumentChangeType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentChangeType = void 0;
|
|
4
|
+
var DocumentChangeType;
|
|
5
|
+
(function (DocumentChangeType) {
|
|
6
|
+
DocumentChangeType["ADD_ELEMENT"] = "ADD_ELEMENT";
|
|
7
|
+
DocumentChangeType["DELETE_ELEMENT"] = "DELETE_ELEMENT";
|
|
8
|
+
DocumentChangeType["MODIFY_ELEMENT"] = "MODIFY_ELEMENT";
|
|
9
|
+
DocumentChangeType["REORDER_ELEMENT"] = "REORDER_ELEMENT";
|
|
10
|
+
DocumentChangeType["REGENERATE_LINEBOARD"] = "REGENERATE_LINEBOARD";
|
|
11
|
+
DocumentChangeType["REBIND_MODEL"] = "REBIND_MODEL";
|
|
12
|
+
})(DocumentChangeType = exports.DocumentChangeType || (exports.DocumentChangeType = {}));
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { PositionDefinition, SizeDefinition } from './common';
|
|
2
|
-
import { DocumentElement } from './document-element';
|
|
3
|
-
export interface DocumentElementEvent {
|
|
4
|
-
element: DocumentElement;
|
|
5
|
-
selectedElements?: Array<DocumentElement>;
|
|
6
|
-
renderedElementPosition?: PositionDefinition;
|
|
7
|
-
renderedElementSize?: SizeDefinition;
|
|
8
|
-
eventType?: string;
|
|
9
|
-
sourceMouseEvent?: MouseEvent;
|
|
10
|
-
relativeMousePosition?: PositionDefinition;
|
|
11
|
-
data?: any;
|
|
12
|
-
}
|
|
13
|
-
export interface DocumentTextElementEvent {
|
|
14
|
-
element: DocumentElement;
|
|
15
|
-
textFormat: any;
|
|
16
|
-
}
|
|
17
|
-
export interface DocumentSVGElementEvent {
|
|
18
|
-
element: DocumentElement;
|
|
19
|
-
svgRootElement?: SVGElement;
|
|
20
|
-
selectedComponents?: SVGElement[];
|
|
21
|
-
eventType?: string;
|
|
22
|
-
svgHtmlString?: string;
|
|
23
|
-
closeContentOptions?: boolean;
|
|
24
|
-
}
|
|
1
|
+
import { PositionDefinition, SizeDefinition } from './common';
|
|
2
|
+
import { DocumentElement } from './document-element';
|
|
3
|
+
export interface DocumentElementEvent {
|
|
4
|
+
element: DocumentElement;
|
|
5
|
+
selectedElements?: Array<DocumentElement>;
|
|
6
|
+
renderedElementPosition?: PositionDefinition;
|
|
7
|
+
renderedElementSize?: SizeDefinition;
|
|
8
|
+
eventType?: string;
|
|
9
|
+
sourceMouseEvent?: MouseEvent;
|
|
10
|
+
relativeMousePosition?: PositionDefinition;
|
|
11
|
+
data?: any;
|
|
12
|
+
}
|
|
13
|
+
export interface DocumentTextElementEvent {
|
|
14
|
+
element: DocumentElement;
|
|
15
|
+
textFormat: any;
|
|
16
|
+
}
|
|
17
|
+
export interface DocumentSVGElementEvent {
|
|
18
|
+
element: DocumentElement;
|
|
19
|
+
svgRootElement?: SVGElement;
|
|
20
|
+
selectedComponents?: SVGElement[];
|
|
21
|
+
eventType?: string;
|
|
22
|
+
svgHtmlString?: string;
|
|
23
|
+
closeContentOptions?: boolean;
|
|
24
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DocumentElement } from './document-element';
|
|
2
|
-
interface AddElement {
|
|
3
|
-
(elements: Array<DocumentElement>): Promise<any>;
|
|
4
|
-
}
|
|
5
|
-
export interface DocumentElementHolder {
|
|
6
|
-
addElements: AddElement;
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
1
|
+
import { DocumentElement } from './document-element';
|
|
2
|
+
interface AddElement {
|
|
3
|
+
(elements: Array<DocumentElement>): Promise<any>;
|
|
4
|
+
}
|
|
5
|
+
export interface DocumentElementHolder {
|
|
6
|
+
addElements: AddElement;
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { CropDefinition, LineDefinition, PositionDefinition, RotationDefinition } from './common';
|
|
2
|
-
import { Document } from './document';
|
|
3
|
-
import { ScaleTransformation } from './element-transformation';
|
|
4
|
-
export interface AlternateUrls {
|
|
5
|
-
highResolution?: string;
|
|
6
|
-
lowResolution?: string;
|
|
7
|
-
originalFile?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface DocumentElement extends Document {
|
|
10
|
-
id?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
position?: PositionDefinition;
|
|
13
|
-
rotate?: RotationDefinition;
|
|
14
|
-
scale?: ScaleTransformation;
|
|
15
|
-
text?: string;
|
|
16
|
-
url?: string;
|
|
17
|
-
alternateUrls?: AlternateUrls;
|
|
18
|
-
propertyBindings?: any;
|
|
19
|
-
lineDefinition?: LineDefinition;
|
|
20
|
-
label?: string;
|
|
21
|
-
annotations?: any;
|
|
22
|
-
isLocked?: boolean;
|
|
23
|
-
cropDefinition?: CropDefinition;
|
|
24
|
-
embedInfo?: any;
|
|
25
|
-
isHidden?: boolean;
|
|
26
|
-
elementIds?: Array<string>;
|
|
27
|
-
isTextTool?: boolean;
|
|
28
|
-
documentGenerationConfigId?: string;
|
|
29
|
-
entityData?: any;
|
|
30
|
-
points?: Array<[number, number]>;
|
|
31
|
-
rowIds?: Array<string>;
|
|
32
|
-
columnIds?: Array<string>;
|
|
33
|
-
columnId?: string;
|
|
34
|
-
rowId?: string;
|
|
35
|
-
tableId?: string;
|
|
36
|
-
propertyBindingsMetaData?: {
|
|
37
|
-
displayFunction: string;
|
|
38
|
-
propertyType: string;
|
|
39
|
-
typeId?: string;
|
|
40
|
-
numberFormat?: any;
|
|
41
|
-
dateFormat?: any;
|
|
42
|
-
displayLabel?: boolean;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
1
|
+
import { CropDefinition, LineDefinition, PositionDefinition, RotationDefinition } from './common';
|
|
2
|
+
import { Document } from './document';
|
|
3
|
+
import { ScaleTransformation } from './element-transformation';
|
|
4
|
+
export interface AlternateUrls {
|
|
5
|
+
highResolution?: string;
|
|
6
|
+
lowResolution?: string;
|
|
7
|
+
originalFile?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DocumentElement extends Document {
|
|
10
|
+
id?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
position?: PositionDefinition;
|
|
13
|
+
rotate?: RotationDefinition;
|
|
14
|
+
scale?: ScaleTransformation;
|
|
15
|
+
text?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
alternateUrls?: AlternateUrls;
|
|
18
|
+
propertyBindings?: any;
|
|
19
|
+
lineDefinition?: LineDefinition;
|
|
20
|
+
label?: string;
|
|
21
|
+
annotations?: any;
|
|
22
|
+
isLocked?: boolean;
|
|
23
|
+
cropDefinition?: CropDefinition;
|
|
24
|
+
embedInfo?: any;
|
|
25
|
+
isHidden?: boolean;
|
|
26
|
+
elementIds?: Array<string>;
|
|
27
|
+
isTextTool?: boolean;
|
|
28
|
+
documentGenerationConfigId?: string;
|
|
29
|
+
entityData?: any;
|
|
30
|
+
points?: Array<[number, number]>;
|
|
31
|
+
rowIds?: Array<string>;
|
|
32
|
+
columnIds?: Array<string>;
|
|
33
|
+
columnId?: string;
|
|
34
|
+
rowId?: string;
|
|
35
|
+
tableId?: string;
|
|
36
|
+
propertyBindingsMetaData?: {
|
|
37
|
+
displayFunction: string;
|
|
38
|
+
propertyType: string;
|
|
39
|
+
typeId?: string;
|
|
40
|
+
numberFormat?: any;
|
|
41
|
+
dateFormat?: any;
|
|
42
|
+
displayLabel?: boolean;
|
|
43
|
+
};
|
|
44
|
+
}
|