@builttocreate/engine-utils 1.8.1-rc.1.3.0 → 1.8.1-rc.1.3.2

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.
@@ -116,9 +116,7 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
116
116
  * Added as a fix for table bug that did not display proper output for formula cells
117
117
  * as rowIndex was messy
118
118
  */
119
- console.log('tableDoc field value', docFieldValue);
120
119
  var nextDocFieldValue = (0, _tableHelper.getRows)(docFieldValue);
121
- console.log('nextDocFiedlValues', nextDocFieldValue);
122
120
 
123
121
  if (!fieldRowsLookup[templateField._id]) {
124
122
  fieldRowsLookup[templateField._id] = (0, _tableHelper.getTableRowLookupWithPopulatedDropdownCells)(templateField.tableColumns, nextDocFieldValue);
@@ -182,28 +182,6 @@ var getImportFieldValues = function getImportFieldValues(template, importSource,
182
182
  * @param {} template
183
183
  * @returns
184
184
  */
185
- // export const getTemplateWithLookups = (template) => {
186
- // const nextTemplate = { ...template };
187
- // nextTemplate.fields = template.fields.map((field) => {
188
- // const nextField = { ...field };
189
- // nextField.optionsLookup = {};
190
- // if (nextField.options) {
191
- // nextField.options.forEach((option) => nextField.optionsLookup[option._id] = option);
192
- // }
193
- // if (nextField.tableColumns) {
194
- // nextField.tableColumnsLookup = {};
195
- // nextField.tableColumns.forEach((column, index) => {
196
- // const nextColumn = { ...column, optionsLookup: {} }
197
- // if (nextColumn.options) {
198
- // nextColumn.options.forEach((option) => nextColumn.optionsLookup[option._id] = option);
199
- // }
200
- // nextField.tableColumns[index] = nextColumn
201
- // });
202
- // }
203
- // return nextField;
204
- // });
205
- // return nextTemplate;
206
- // }
207
185
 
208
186
 
209
187
  exports.getImportFieldValues = getImportFieldValues;
@@ -731,19 +731,15 @@ exports.generateInputGroupFields = generateInputGroupFields;
731
731
  var getTableRowLookupWithPopulatedDropdownCells = function getTableRowLookupWithPopulatedDropdownCells(columns, rows) {
732
732
  var rowsLookup = {};
733
733
  var tableLookup = generateTableLookup(rows, columns);
734
- var validRows = getRows(rows); //Removing deleted columns so column operand doesn't look messy
735
-
736
- var validColumns = columns.filter(function (column) {
737
- return !column.deleted;
738
- });
734
+ var validRows = getRows(rows);
735
+ var validColumns = getColumns(columns);
739
736
  validRows.forEach(function (row, rowIndex) {
740
737
  var nextRow = _objectSpread(_objectSpread({}, row), {}, {
741
738
  cells: _objectSpread({}, row.cells)
742
739
  });
743
740
 
744
741
  validColumns.forEach(function (column, i) {
745
- var columnOperand = getColumnOperand(i);
746
- var cellOperand = getCellOperand(columnOperand, rowIndex + 1);
742
+ var cellOperand = getCellOperand(column.operand, rowIndex + 1);
747
743
  var value = tableLookup[cellOperand];
748
744
 
749
745
  if (value && column.type === _FieldTableColumnTypes["default"].dropdown) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builttocreate/engine-utils",
3
- "version": "1.8.1-rc.1.3.0",
3
+ "version": "1.8.1-rc.1.3.2",
4
4
  "description": "Utility library for common logic shared across web and mobile",
5
5
  "main": "dist/index.js",
6
6
  "files": [