@builttocreate/engine-utils 2.3.0 → 2.3.1-rc.1.0.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.
@@ -133,6 +133,7 @@ var getCleanedJoyDoc = function getCleanedJoyDoc(doc) {
133
133
  */
134
134
 
135
135
  nextFile.pages = getCleanedJoyDocPages(nextFile.pages);
136
+ nextFile.pageOrder = cleanPageOrder(getPageOrder(nextFile.pageOrder, nextFile.pages), nextFile.pages);
136
137
  /**
137
138
  * Step 1.4: Replace view page ids and field ids if they are not valid
138
139
  */
@@ -142,6 +143,7 @@ var getCleanedJoyDoc = function getCleanedJoyDoc(doc) {
142
143
  var nextView = _objectSpread({}, view);
143
144
 
144
145
  nextView.pages = getCleanedJoyDocPages(nextView.pages);
146
+ nextView.pageOrder = cleanPageOrder(getPageOrder(nextView.pageOrder, nextView.pages), nextView.pages);
145
147
  return nextView;
146
148
  });
147
149
  }
@@ -723,9 +723,15 @@ var getFormulaResult = function getFormulaResult(sourceOperand, formula, tableLo
723
723
  exports.getFormulaResult = getFormulaResult;
724
724
 
725
725
  var resolveOperandValue = function resolveOperandValue(sourceOperand, targetOperand, tableLookup) {
726
- var targetValue = tableLookup[targetOperand] && typeof tableLookup[targetOperand] === 'string' ? tableLookup[targetOperand].trim() : tableLookup[targetOperand]; // 1. If tableLookup doesn't have a value then return undefined
726
+ var targetValue = tableLookup[targetOperand] && typeof tableLookup[targetOperand] === 'string' ? tableLookup[targetOperand].trim() : tableLookup[targetOperand];
727
+ /**
728
+ * 1. If tableLookup doesn't have a value (or) if the targetValue
729
+ * appears to have an image cell (with a placeholder or a set of images) then return undefined
730
+ */
727
731
 
728
- if (!targetValue) return 0; // 2. If tableLookup is already a number return the number value
732
+ if (!targetValue || targetValue && targetValue.length === 0 //Image cells with placeholder
733
+ || targetValue && targetValue[0] && targetValue[0].url // Image cells with images
734
+ ) return 0; // 2. If tableLookup is already a number return the number value
729
735
 
730
736
  if (typeof targetValue === 'number') return targetValue; // 3. If targetCell has circular reference return invalid.
731
737
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builttocreate/engine-utils",
3
- "version": "2.3.0",
3
+ "version": "2.3.1-rc.1.0.0",
4
4
  "description": "Utility library for common logic shared across web and mobile",
5
5
  "main": "dist/index.js",
6
6
  "files": [