@contrail/documents 1.3.4 → 1.3.6

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.
@@ -24,11 +24,11 @@ class DocumentElementPropertyBindingHandler {
24
24
  const isNestedPropertyAccess = pathParts.length > 2;
25
25
  let propertyValue = util_1.ObjectUtil.getByPath(localModel, modelIndex);
26
26
  if ((propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.name) && !isNestedPropertyAccess) {
27
- const isItemObjectReference = pathParts[0] === 'item';
27
+ const isItemObjectReference = (propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.entityType) === 'item';
28
28
  const isItemOptionProperty = pathParts[1] === 'itemOption';
29
- const isOptionReference = ((_a = propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.roles) === null || _a === void 0 ? void 0 : _a.indexOf('option')) !== -1;
30
- if (isItemObjectReference && !isItemOptionProperty && isOptionReference) {
31
- propertyValue = `${propertyValue.name} - ${propertyValue.optionName || propertyValue.name}`;
29
+ const isOptionReference = (_a = propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.roles) === null || _a === void 0 ? void 0 : _a.includes('option');
30
+ if (isItemObjectReference && !isItemOptionProperty && isOptionReference && propertyValue.optionName) {
31
+ propertyValue = `${propertyValue.name} - ${propertyValue.optionName}`;
32
32
  }
33
33
  else {
34
34
  propertyValue = propertyValue.name;
@@ -60,6 +60,11 @@ export interface PositionDefinition {
60
60
  export interface RotationDefinition {
61
61
  angle?: number;
62
62
  }
63
+ export declare enum LineType {
64
+ STRAIGHT = 0,
65
+ SQUARE = 1,
66
+ CURVE = 2
67
+ }
63
68
  export interface LineDefinition {
64
69
  x1?: number;
65
70
  x2?: number;
@@ -67,6 +72,7 @@ export interface LineDefinition {
67
72
  y2?: number;
68
73
  markerStart?: string;
69
74
  markerEnd?: string;
75
+ lineType?: LineType;
70
76
  }
71
77
  export interface CropDefinition {
72
78
  x1?: number;
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BackgroundSizeType = void 0;
3
+ exports.LineType = exports.BackgroundSizeType = void 0;
4
4
  var BackgroundSizeType;
5
5
  (function (BackgroundSizeType) {
6
6
  BackgroundSizeType["CONTAIN"] = "CONTAIN";
7
7
  BackgroundSizeType["COVER"] = "COVER";
8
8
  })(BackgroundSizeType = exports.BackgroundSizeType || (exports.BackgroundSizeType = {}));
9
+ var LineType;
10
+ (function (LineType) {
11
+ LineType[LineType["STRAIGHT"] = 0] = "STRAIGHT";
12
+ LineType[LineType["SQUARE"] = 1] = "SQUARE";
13
+ LineType[LineType["CURVE"] = 2] = "CURVE";
14
+ })(LineType = exports.LineType || (exports.LineType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",