@contrail/documents 1.3.0 → 1.3.2-alpha.0

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.
@@ -12,5 +12,5 @@ export declare class DocumentElementPropertyBindingHandler {
12
12
  static bindPropertiesToElement(element: DocumentElement, model: DocumentElementModel): void;
13
13
  static isContentTypeWebViewable(contentType: string): boolean;
14
14
  static adjustPropertyElements(element: DocumentElement, elements: DocumentElement[], model: any): void;
15
- static setBackgroundColorBindings(element: DocumentElement): void;
15
+ static clearOrSetColorBindingsOnStyleChange(element: DocumentElement, changes: DocumentElement): void;
16
16
  }
@@ -106,20 +106,20 @@ class DocumentElementPropertyBindingHandler {
106
106
  }
107
107
  }
108
108
  }
109
- static setBackgroundColorBindings(element) {
109
+ static clearOrSetColorBindingsOnStyleChange(element, changes) {
110
110
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
111
- if (((_a = element === null || element === void 0 ? void 0 : element.style) === null || _a === void 0 ? void 0 : _a.backgroundColor) && ((_b = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _b === void 0 ? void 0 : _b['style.backgroundColor'])) {
111
+ if (((_a = changes === null || changes === void 0 ? void 0 : changes.style) === null || _a === void 0 ? void 0 : _a.backgroundColor) && ((_b = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _b === void 0 ? void 0 : _b['style.backgroundColor'])) {
112
112
  delete element.propertyBindings['style.backgroundColor'];
113
113
  (_c = element.propertyBindings) === null || _c === void 0 ? true : delete _c['style.color'];
114
114
  }
115
- else if (((_d = element === null || element === void 0 ? void 0 : element.style) === null || _d === void 0 ? void 0 : _d.backgroundColor) === '' && ((_e = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _e === void 0 ? void 0 : _e.text)) {
115
+ else if (((_d = changes === null || changes === void 0 ? void 0 : changes.style) === null || _d === void 0 ? void 0 : _d.backgroundColor) === '' && ((_e = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _e === void 0 ? void 0 : _e.text)) {
116
116
  element.propertyBindings['style.backgroundColor'] = `${element.propertyBindings.text}.hexCode`;
117
117
  element.propertyBindings['style.color'] = `${element.propertyBindings.text}.textColorHexCode`;
118
118
  }
119
- if (((_f = element === null || element === void 0 ? void 0 : element.style) === null || _f === void 0 ? void 0 : _f.color) && ((_g = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _g === void 0 ? void 0 : _g['style.color'])) {
119
+ if (((_f = changes === null || changes === void 0 ? void 0 : changes.style) === null || _f === void 0 ? void 0 : _f.color) && ((_g = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _g === void 0 ? void 0 : _g['style.color'])) {
120
120
  delete element.propertyBindings['style.color'];
121
121
  }
122
- else if (((_h = element === null || element === void 0 ? void 0 : element.style) === null || _h === void 0 ? void 0 : _h.color) === '' && ((_j = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _j === void 0 ? void 0 : _j.text)) {
122
+ else if (((_h = changes === null || changes === void 0 ? void 0 : changes.style) === null || _h === void 0 ? void 0 : _h.color) === '' && ((_j = element === null || element === void 0 ? void 0 : element.propertyBindings) === null || _j === void 0 ? void 0 : _j.text)) {
123
123
  element.propertyBindings['style.color'] = `${element.propertyBindings.text}.textColorHexCode`;
124
124
  }
125
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.3.0",
3
+ "version": "1.3.2-alpha.0",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -38,10 +38,10 @@
38
38
  "testEnvironment": "node"
39
39
  },
40
40
  "dependencies": {
41
- "@contrail/actions": "^1.0.14",
42
- "@contrail/document-table": "^1.0.2",
43
- "@contrail/types": "^3.0.95",
44
- "@contrail/document-util": "^1.0.7",
41
+ "@contrail/actions": "^1.0.17-alpha.2",
42
+ "@contrail/document-table": "^1.0.5-alpha.1",
43
+ "@contrail/types": "^3.1.2-alpha.1",
44
+ "@contrail/document-util": "^1.0.8-alpha.1",
45
45
  "reflect-metadata": "^0.1.13"
46
46
  }
47
47
  }