@builttocreate/engine-utils 1.9.0-rc.1.2.1 → 1.9.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.
@@ -138,10 +138,8 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
138
138
  */
139
139
 
140
140
 
141
- if (fieldRowsLookup[activity.document.field] && fieldRowIndexLookup[activity.document.field]) {
142
- nextActivity.document.value = fieldRowsLookup[activity.document.field][activity.document.row];
143
- nextActivity.document.rowIndex = fieldRowIndexLookup[activity.document.field][activity.document.row];
144
- }
141
+ nextActivity.document.value = fieldRowsLookup[activity.document.field][activity.document.row];
142
+ nextActivity.document.rowIndex = fieldRowIndexLookup[activity.document.field][activity.document.row];
145
143
  } else if (docFieldValue && templateField.type === _FieldTypes["default"].inputGroup) {
146
144
  /**
147
145
  * Input Group Step 1: create an easy way to lookup a row with the dropdown cells populated.
@@ -155,9 +153,7 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
155
153
  * whole row because input group display components are treated like regular field and not like table rows.
156
154
  */
157
155
 
158
- if (fieldRowsLookup[activity.document.field] && fieldRowsLookup[activity.document.field][activity.document.row] && fieldRowsLookup[activity.document.field][activity.document.row].cells[activity.document.column]) {
159
- nextActivity.document.value = fieldRowsLookup[activity.document.field][activity.document.row].cells[activity.document.column];
160
- }
156
+ nextActivity.document.value = fieldRowsLookup[activity.document.field][activity.document.row].cells[activity.document.column];
161
157
  } else if (docFieldValue && templateField.type === _FieldTypes["default"].multiSelect) {
162
158
  var parsedDocFieldValue = docFieldValue && typeof docFieldValue === 'string' ? docFieldValue.split(',') : docFieldValue;
163
159
  var _nextDocFieldValue = '';
@@ -165,7 +161,6 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
165
161
  if (parsedDocFieldValue.length > 0) {
166
162
  parsedDocFieldValue.forEach(function (item) {
167
163
  var option = templateField.optionsLookup[item];
168
- if (!option) return;
169
164
  _nextDocFieldValue = _nextDocFieldValue.concat(' ', option.value);
170
165
  });
171
166
  }
@@ -11,7 +11,6 @@ exports["default"] = void 0;
11
11
  * admin - They can do everything
12
12
  * contributor - They can do everything, except modify users or templates
13
13
  * readyOnly - They can see all but can't do anything.
14
- * restricted - They can only see the stuff they authored. They don't have access to any other users stuff.
15
14
  */
16
15
  var roles = {
17
16
  admin: {
@@ -15,8 +15,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
15
15
 
16
16
  var _shortid = _interopRequireDefault(require("shortid"));
17
17
 
18
- var _hotFormulaParser = require("@builttocreate/hot-formula-parser");
19
-
20
18
  var _Table = _interopRequireWildcard(require("./constants/Table"));
21
19
 
22
20
  var _FieldTypes = _interopRequireDefault(require("./constants/FieldTypes"));
@@ -29,7 +27,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
29
27
 
30
28
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
31
29
 
32
- var parser = new _hotFormulaParser.Parser();
30
+ var FormulaParser = require('@builttocreate/hot-formula-parser').Parser;
31
+
32
+ var parser = new FormulaParser();
33
33
 
34
34
  var getTableFieldLookupKey = function getTableFieldLookupKey(fieldId, rowIndex, columnId) {
35
35
  return "".concat(fieldId, "-").concat(rowIndex, "-").concat(columnId);
@@ -768,7 +768,7 @@ exports.getTableRowLookupWithPopulatedDropdownCells = getTableRowLookupWithPopul
768
768
 
769
769
  var getInputGroupRowLookupWithPopulatedDropdownCells = function getInputGroupRowLookupWithPopulatedDropdownCells(columns, rows) {
770
770
  var rowsLookup = {};
771
- var validRows = typeof rows === 'string' ? JSON.parse(rows) : rows;
771
+ var validRows = typeof row === 'string' ? JSON.parse(rows) : rows;
772
772
  validRows.forEach(function (row) {
773
773
  var nextRow = _objectSpread(_objectSpread({}, row), {}, {
774
774
  cells: _objectSpread({}, row.cells)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builttocreate/engine-utils",
3
- "version": "1.9.0-rc.1.2.1",
3
+ "version": "1.9.0",
4
4
  "description": "Utility library for common logic shared across web and mobile",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -53,6 +53,9 @@
53
53
  "moduleNameMapper": {
54
54
  "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
55
55
  "\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
56
- }
56
+ },
57
+ "transformIgnorePatterns": [
58
+ "node_modules/(?!(jest-)?@builttocreate)"
59
+ ]
57
60
  }
58
61
  }