@formio/js 5.2.1-dev.6238.3d462f7 → 5.2.1-dev.6243.b3a30c7
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/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/WebformBuilder.js +5 -3
- package/lib/cjs/formio.form.js +1 -0
- package/lib/mjs/WebformBuilder.js +5 -3
- package/lib/mjs/formio.form.js +1 -0
- package/package.json +1 -1
@@ -528,8 +528,8 @@ class WebformBuilder extends Component_1.default {
|
|
528
528
|
}
|
529
529
|
return elem;
|
530
530
|
};
|
531
|
-
const hideShow = (group,
|
532
|
-
if (show) {
|
531
|
+
const hideShow = (group, forceShow, toggle = false) => {
|
532
|
+
if (forceShow || (toggle && !Array.from(group.classList).includes('show'))) {
|
533
533
|
group.classList.add(['show']);
|
534
534
|
group.style.display = 'inherit';
|
535
535
|
}
|
@@ -551,7 +551,9 @@ class WebformBuilder extends Component_1.default {
|
|
551
551
|
const openByDefault = getAttribute(group, 'default') === 'true';
|
552
552
|
const groupId = group.getAttribute('id').slice('group-'.length);
|
553
553
|
const groupParent = getAttribute(group, 'parent').slice('#builder-sidebar-'.length);
|
554
|
-
|
554
|
+
if (((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index)) {
|
555
|
+
hideShow(group, ((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index));
|
556
|
+
}
|
555
557
|
});
|
556
558
|
}, true);
|
557
559
|
});
|
package/lib/cjs/formio.form.js
CHANGED
@@ -48,6 +48,7 @@ Formio_1.Formio.Widgets = widgets_1.default;
|
|
48
48
|
Formio_1.Formio.Evaluator = utils_2.Evaluator;
|
49
49
|
Formio_1.Formio.AllComponents = components_1.default;
|
50
50
|
Formio_1.Formio.Licenses = licenses_1.default;
|
51
|
+
Formio_1.Formio.DefaultEvaluator = utils_2.DefaultEvaluator;
|
51
52
|
// This is strange, but is needed for "premium" components to import correctly.
|
52
53
|
Formio_1.Formio.Formio = Formio_1.Formio;
|
53
54
|
Formio_1.Formio.Components.setComponents(components_1.default);
|
@@ -514,8 +514,8 @@ export default class WebformBuilder extends Component {
|
|
514
514
|
}
|
515
515
|
return elem;
|
516
516
|
};
|
517
|
-
const hideShow = (group,
|
518
|
-
if (show) {
|
517
|
+
const hideShow = (group, forceShow, toggle = false) => {
|
518
|
+
if (forceShow || (toggle && !Array.from(group.classList).includes('show'))) {
|
519
519
|
group.classList.add(['show']);
|
520
520
|
group.style.display = 'inherit';
|
521
521
|
}
|
@@ -537,7 +537,9 @@ export default class WebformBuilder extends Component {
|
|
537
537
|
const openByDefault = getAttribute(group, 'default') === 'true';
|
538
538
|
const groupId = group.getAttribute('id').slice('group-'.length);
|
539
539
|
const groupParent = getAttribute(group, 'parent').slice('#builder-sidebar-'.length);
|
540
|
-
|
540
|
+
if (((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index)) {
|
541
|
+
hideShow(group, ((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index));
|
542
|
+
}
|
541
543
|
});
|
542
544
|
}, true);
|
543
545
|
});
|
package/lib/mjs/formio.form.js
CHANGED
@@ -30,6 +30,7 @@ Formio.Widgets = Widgets;
|
|
30
30
|
Formio.Evaluator = Evaluator;
|
31
31
|
Formio.AllComponents = AllComponents;
|
32
32
|
Formio.Licenses = Licenses;
|
33
|
+
Formio.DefaultEvaluator = DefaultEvaluator;
|
33
34
|
// This is strange, but is needed for "premium" components to import correctly.
|
34
35
|
Formio.Formio = Formio;
|
35
36
|
Formio.Components.setComponents(AllComponents);
|