@targetprocess/relations-renderer 1.0.2-us456648-child.4 → 1.0.2-us456648-child2.3

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.
@@ -4,7 +4,7 @@ export declare enum RelationType {
4
4
  Relation = "Relation",
5
5
  Link = "Link",
6
6
  Duplicate = "Duplicate",
7
- Child = "Parent-Child"
7
+ ParentChild = "Parent-Child"
8
8
  }
9
9
  export interface IRelation {
10
10
  typeMarker: string;
package/dist/relations.js CHANGED
@@ -10,7 +10,7 @@ var RelationType;
10
10
  RelationType["Relation"] = "Relation";
11
11
  RelationType["Link"] = "Link";
12
12
  RelationType["Duplicate"] = "Duplicate";
13
- RelationType["Child"] = "Parent-Child";
13
+ RelationType["ParentChild"] = "Parent-Child";
14
14
  })(RelationType = exports.RelationType || (exports.RelationType = {}));
15
15
  exports.relationsConfigs = (_a = {},
16
16
  _a[RelationType.Dependency] = {
@@ -33,8 +33,8 @@ exports.relationsConfigs = (_a = {},
33
33
  type: RelationType.Duplicate,
34
34
  style: { color: '#e79010', violatedColor: '#f00' }
35
35
  },
36
- _a[RelationType.Child] = {
37
- type: RelationType.Child,
36
+ _a[RelationType.ParentChild] = {
37
+ type: RelationType.ParentChild,
38
38
  style: { color: '#32CD32', violatedColor: '#f00' }
39
39
  },
40
40
  _a);
@@ -9,7 +9,6 @@ export declare type RelationsState = {
9
9
  isUiActive: boolean;
10
10
  cards: Card[];
11
11
  relations: IRelation[];
12
- childRelations: IRelation[];
13
12
  arrows: Arrow[];
14
13
  visibleRelationTypes: Set<RelationType>;
15
14
  timelineDrawOffset: number;
@@ -33,27 +33,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  __setModuleDefault(result, mod);
34
34
  return result;
35
35
  };
36
- var __read = (this && this.__read) || function (o, n) {
37
- var m = typeof Symbol === "function" && o[Symbol.iterator];
38
- if (!m) return o;
39
- var i = m.call(o), r, ar = [], e;
40
- try {
41
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
42
- }
43
- catch (error) { e = { error: error }; }
44
- finally {
45
- try {
46
- if (r && !r.done && (m = i["return"])) m.call(i);
47
- }
48
- finally { if (e) throw e.error; }
49
- }
50
- return ar;
51
- };
52
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
53
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
54
- to[j] = from[i];
55
- return to;
56
- };
57
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
58
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
59
38
  };
@@ -80,8 +59,7 @@ var ListRenderingBackend = /** @class */ (function (_super) {
80
59
  return null;
81
60
  }
82
61
  var points = intersection_1.intersectRects(cardPos, targetPos);
83
- var relations = __spreadArray(__spreadArray([], __read(this.context.getState().relations)), __read(this.context.getState().childRelations));
84
- var sortedRelations = _.sortBy(relations, function (r) { return r.masterEntityId; });
62
+ var sortedRelations = _.sortBy(this.context.getState().relations, function (r) { return r.masterEntityId; });
85
63
  var relationIndex = sortedRelations.indexOf(relation);
86
64
  var distanceBetweenArrows = Math.min(50, gridRect.width / sortedRelations.length);
87
65
  var offset = (relationIndex + 1) * distanceBetweenArrows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@targetprocess/relations-renderer",
3
- "version": "1.0.2-us456648-child.4",
3
+ "version": "1.0.2-us456648-child2.3",
4
4
  "description": "Renderer of relation arrows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",