@formio/appserver 2.0.0-dev.12 → 2.0.0-dev.13

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.
@@ -43,7 +43,7 @@ exports.Prepper = {
43
43
  const { type, form, submission } = scope;
44
44
  try {
45
45
  debug(`Preparing data for ${form.name}...`);
46
- yield scope.utils.eachComponentData(form.components, submission.data, (component, compData, compRow, compPath) => __awaiter(this, void 0, void 0, function* () {
46
+ yield scope.utils.eachComponentDataAsync(form.components, submission.data, (component, compData, compRow, compPath) => __awaiter(this, void 0, void 0, function* () {
47
47
  if (exports.Prepper.preppers.hasOwnProperty(type)) {
48
48
  for (let i = 0; i < exports.Prepper.preppers[type].length; i++) {
49
49
  yield exports.Prepper.preppers[type][i](Object.assign(Object.assign({}, scope), { component, row: compRow, data, value: (0, get_1.default)(compData, compPath), path: core_1.Utils.getComponentAbsolutePath(component) }));
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.referenceSave = exports.referenceLoad = void 0;
16
16
  const lodash_1 = require("lodash");
17
17
  const protect_1 = __importDefault(require("./protect"));
18
+ const core_1 = require("@formio/core");
18
19
  const getResource = (scope) => {
19
20
  var _a, _b, _c, _d, _e;
20
21
  const { component } = scope;
@@ -44,7 +45,7 @@ const referenceLoad = (scope) => __awaiter(void 0, void 0, void 0, function* ()
44
45
  // Make sure to protect this submission like any other submission output.
45
46
  const context = Object.assign(Object.assign({}, scope), { data: {} });
46
47
  yield scope.utils.eachComponentDataAsync(resource.clientForm.components, submission.data, (comp, compData, compRow, compPath) => __awaiter(void 0, void 0, void 0, function* () {
47
- yield (0, protect_1.default)(Object.assign(Object.assign({}, context), { component: comp, row: compRow, data: compData, value: (0, lodash_1.get)(compRow, comp.key), path: compPath }));
48
+ yield (0, protect_1.default)(Object.assign(Object.assign({}, context), { component: comp, row: compRow, data: context.data, value: (0, lodash_1.get)(compData, compPath), path: core_1.Utils.getComponentAbsolutePath(comp) }));
48
49
  }));
49
50
  submission.data = context.data;
50
51
  (0, lodash_1.set)(data, path, submission);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/appserver",
3
- "version": "2.0.0-dev.12",
3
+ "version": "2.0.0-dev.13",
4
4
  "description": "A highly performant and extensible Application Server for Form.io Multi-Tenant Deployments.",
5
5
  "main": "server.js",
6
6
  "scripts": {