@formio/js 5.0.0-dev.5829.56191dc → 5.0.0-dev.5832.c5dc6f0
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.
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const Component_1 = __importDefault(require("./_classes/component/Component"));
|
|
7
7
|
const utils_1 = __importDefault(require("./_classes/component/editForm/utils"));
|
|
8
8
|
const Component_form_1 = __importDefault(require("./_classes/component/Component.form"));
|
|
9
|
+
const utils_2 = require("../utils/utils");
|
|
9
10
|
const lodash_1 = __importDefault(require("lodash"));
|
|
10
11
|
class Components {
|
|
11
12
|
static set EditFormUtils(value) {
|
|
@@ -56,7 +57,8 @@ class Components {
|
|
|
56
57
|
static getComponentPath(component) {
|
|
57
58
|
var _a;
|
|
58
59
|
let path = '';
|
|
59
|
-
|
|
60
|
+
const componentKey = (0, utils_2.getComponentKey)(component.component);
|
|
61
|
+
if (componentKey) {
|
|
60
62
|
let thisPath = ((_a = component.options) === null || _a === void 0 ? void 0 : _a.parent) || component;
|
|
61
63
|
while (thisPath && !thisPath.allowData && thisPath.parent) {
|
|
62
64
|
thisPath = thisPath.parent;
|
|
@@ -68,7 +70,7 @@ class Components {
|
|
|
68
70
|
const rowIndex = component.row;
|
|
69
71
|
const rowIndexPath = rowIndex && !['container'].includes(thisPath.component.type) ? `[${Number.parseInt(rowIndex)}]` : '';
|
|
70
72
|
path = `${thisPath.path}${rowIndexPath}.`;
|
|
71
|
-
path +=
|
|
73
|
+
path += componentKey;
|
|
72
74
|
return lodash_1.default.trim(path, '.');
|
|
73
75
|
}
|
|
74
76
|
return path;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Component from './_classes/component/Component';
|
|
2
2
|
import EditFormUtils from './_classes/component/editForm/utils';
|
|
3
3
|
import BaseEditForm from './_classes/component/Component.form';
|
|
4
|
+
import { getComponentKey } from '../utils/utils';
|
|
4
5
|
import _ from 'lodash';
|
|
5
6
|
export default class Components {
|
|
6
7
|
static _editFormUtils = EditFormUtils;
|
|
@@ -52,7 +53,8 @@ export default class Components {
|
|
|
52
53
|
*/
|
|
53
54
|
static getComponentPath(component) {
|
|
54
55
|
let path = '';
|
|
55
|
-
|
|
56
|
+
const componentKey = getComponentKey(component.component);
|
|
57
|
+
if (componentKey) {
|
|
56
58
|
let thisPath = component.options?.parent || component;
|
|
57
59
|
while (thisPath && !thisPath.allowData && thisPath.parent) {
|
|
58
60
|
thisPath = thisPath.parent;
|
|
@@ -64,7 +66,7 @@ export default class Components {
|
|
|
64
66
|
const rowIndex = component.row;
|
|
65
67
|
const rowIndexPath = rowIndex && !['container'].includes(thisPath.component.type) ? `[${Number.parseInt(rowIndex)}]` : '';
|
|
66
68
|
path = `${thisPath.path}${rowIndexPath}.`;
|
|
67
|
-
path +=
|
|
69
|
+
path += componentKey;
|
|
68
70
|
return _.trim(path, '.');
|
|
69
71
|
}
|
|
70
72
|
return path;
|