@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.
- package/dist/activityHelper.js +0 -2
- package/dist/fieldHelper.js +0 -22
- package/dist/tableHelper.js +3 -7
- package/package.json +1 -1
package/dist/activityHelper.js
CHANGED
|
@@ -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);
|
package/dist/fieldHelper.js
CHANGED
|
@@ -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;
|
package/dist/tableHelper.js
CHANGED
|
@@ -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);
|
|
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
|
|
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) {
|