@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.
- package/dist/joyDocHelper.js +2 -0
- package/dist/tableHelper.js +8 -2
- package/package.json +1 -1
package/dist/joyDocHelper.js
CHANGED
|
@@ -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
|
}
|
package/dist/tableHelper.js
CHANGED
|
@@ -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];
|
|
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
|
|
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
|
//
|