@yoobic/yobi 7.7.52 → 7.7.53
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/cjs/{index-fae672a0.js → index-223b7476.js} +18 -4
- package/dist/cjs/yoo-form-choice_4.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator-block-expandable.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator-block-simple_4.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator-card_2.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator-field-selector_8.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator-translate-dialog.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-creator.cjs.entry.js +1 -1
- package/dist/collection/components/form-creator/helpers/index.js +18 -4
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-6f353a53.entry.js → p-059ac2e2.entry.js} +1 -1
- package/dist/design-system/{p-7485d885.entry.js → p-0b17133e.entry.js} +1 -1
- package/dist/design-system/{p-06b4258e.entry.js → p-15ed5241.entry.js} +1 -1
- package/dist/design-system/p-177ba92d.js +1 -0
- package/dist/design-system/{p-cfa86a46.entry.js → p-398c55f5.entry.js} +1 -1
- package/dist/design-system/{p-f769b7dd.entry.js → p-504a56f3.entry.js} +1 -1
- package/dist/design-system/{p-10ff3d47.entry.js → p-6cc37343.entry.js} +1 -1
- package/dist/design-system/{p-6ef0d506.entry.js → p-804057dd.entry.js} +1 -1
- package/dist/esm/{index-86fbd926.js → index-074056b8.js} +18 -4
- package/dist/esm/yoo-form-choice_4.entry.js +1 -1
- package/dist/esm/yoo-form-creator-block-expandable.entry.js +1 -1
- package/dist/esm/yoo-form-creator-block-simple_4.entry.js +1 -1
- package/dist/esm/yoo-form-creator-card_2.entry.js +1 -1
- package/dist/esm/yoo-form-creator-field-selector_8.entry.js +1 -1
- package/dist/esm/yoo-form-creator-translate-dialog.entry.js +1 -1
- package/dist/esm/yoo-form-creator.entry.js +1 -1
- package/dist/types/components/form-creator/helpers/index.d.ts +2 -1
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/workflow/workflow.interface.d.ts +4 -1
- package/package.json +1 -1
- package/dist/design-system/p-63958baf.js +0 -1
|
@@ -415,7 +415,7 @@ function getParentFieldConditions({ fieldConditions, slides, condition, field, c
|
|
|
415
415
|
const { slideIndex, itemIndex } = formCreatorHelpers.findField(slides, fieldName);
|
|
416
416
|
if (slides[slideIndex].items[itemIndex]) {
|
|
417
417
|
const parentCondition = { condition, fields: [field] };
|
|
418
|
-
if (isSequentialConditionalField({ slides, parentFieldSlideIndex: slideIndex, parentFieldItemIndex: itemIndex, childSlideIndex, childItemIndex })) {
|
|
418
|
+
if (isSequentialConditionalField({ slides, parentFieldSlideIndex: slideIndex, parentFieldItemIndex: itemIndex, childSlideIndex, childItemIndex, conditionId: condition._id })) {
|
|
419
419
|
field.sequentialConditionalField = { conditionId: condition._id, parentFieldName: fieldName, parentCustomFieldName: slides[slideIndex].items[itemIndex].customName };
|
|
420
420
|
}
|
|
421
421
|
else {
|
|
@@ -437,7 +437,8 @@ function getParentFieldConditions({ fieldConditions, slides, condition, field, c
|
|
|
437
437
|
}
|
|
438
438
|
return fieldConditions;
|
|
439
439
|
}
|
|
440
|
-
function isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex }) {
|
|
440
|
+
function isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex, conditionId }) {
|
|
441
|
+
var _a;
|
|
441
442
|
// the conditional field must be on the same slide as the parent field
|
|
442
443
|
if (parentFieldSlideIndex === childSlideIndex && childItemIndex > 0) {
|
|
443
444
|
const previousFieldIndex = childItemIndex - 1;
|
|
@@ -448,8 +449,21 @@ function isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFie
|
|
|
448
449
|
// otherwise, check that every field between this one and the parent is sequential
|
|
449
450
|
const items = slides[childSlideIndex].items;
|
|
450
451
|
const previousField = items[previousFieldIndex];
|
|
451
|
-
if
|
|
452
|
-
|
|
452
|
+
// Check if the field has a different condition which is associated to the previous field
|
|
453
|
+
let hasAlternateConditionalRelationshipWithParent = false;
|
|
454
|
+
if (items === null || items === void 0 ? void 0 : items.length) {
|
|
455
|
+
const conditions = (_a = items[childItemIndex]) === null || _a === void 0 ? void 0 : _a.condition;
|
|
456
|
+
if ((conditions === null || conditions === void 0 ? void 0 : conditions.length) > 1) {
|
|
457
|
+
conditions.forEach((condition) => {
|
|
458
|
+
var _a;
|
|
459
|
+
if (condition._id !== conditionId && ((_a = condition === null || condition === void 0 ? void 0 : condition.field) === null || _a === void 0 ? void 0 : _a.name) === previousField.name) {
|
|
460
|
+
hasAlternateConditionalRelationshipWithParent = true;
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if ((previousField === null || previousField === void 0 ? void 0 : previousField.sequentialConditionalField) && !hasAlternateConditionalRelationshipWithParent) {
|
|
466
|
+
return isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex: previousFieldIndex, conditionId });
|
|
453
467
|
}
|
|
454
468
|
}
|
|
455
469
|
return false;
|
|
@@ -14,7 +14,7 @@ const shuffle = require('./shuffle-8d86ba89.js');
|
|
|
14
14
|
const findIndex = require('./findIndex-cb2c4f23.js');
|
|
15
15
|
const isString = require('./isString-ecd0cbf4.js');
|
|
16
16
|
const index$2 = require('./index-7d3c7ee7.js');
|
|
17
|
-
const index$1 = require('./index-
|
|
17
|
+
const index$1 = require('./index-223b7476.js');
|
|
18
18
|
const boostHelpers = require('./boost-helpers-0fe0ab90.js');
|
|
19
19
|
const isNumber = require('./isNumber-4c1ace60.js');
|
|
20
20
|
require('./isUndefined-8f9cfd10.js');
|
|
@@ -7,7 +7,7 @@ const inputBar_interface = require('./input-bar.interface-b96b7107.js');
|
|
|
7
7
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
8
8
|
const formCreatorHelpers = require('./form-creator-helpers-886c1eaa.js');
|
|
9
9
|
const index$2 = require('./index-77d54324.js');
|
|
10
|
-
const index$1 = require('./index-
|
|
10
|
+
const index$1 = require('./index-223b7476.js');
|
|
11
11
|
require('./isNumber-4c1ace60.js');
|
|
12
12
|
require('./isEqual-35c41499.js');
|
|
13
13
|
require('./_baseIsEqual-ea3c1968.js');
|
|
@@ -9,7 +9,7 @@ require('./ResizeObserver.es-a563c836.js');
|
|
|
9
9
|
const commonHelpers = require('./common-helpers-312e97a3.js');
|
|
10
10
|
const index$1 = require('./index-f0c2575c.js');
|
|
11
11
|
const sortable_esm = require('./sortable.esm-71f9713d.js');
|
|
12
|
-
const index$2 = require('./index-
|
|
12
|
+
const index$2 = require('./index-223b7476.js');
|
|
13
13
|
const entitiesHelpers$1 = require('./entities-helpers-f08c39e2.js');
|
|
14
14
|
const entitiesHelpers = require('./entities-helpers-5d6d0dc7.js');
|
|
15
15
|
require('./isUndefined-8f9cfd10.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
const index$2 = require('./index-f0c2575c.js');
|
|
9
|
-
const index$1 = require('./index-
|
|
9
|
+
const index$1 = require('./index-223b7476.js');
|
|
10
10
|
require('./index-dccbc1a7.js');
|
|
11
11
|
require('./document-2c1b83f3.js');
|
|
12
12
|
require('./validate-f2c2f205.js');
|
|
@@ -13,7 +13,7 @@ const device_interface = require('./device.interface-44ea5b01.js');
|
|
|
13
13
|
const cardVideo_interface = require('./card-video.interface-284b7b92.js');
|
|
14
14
|
const sortable_esm = require('./sortable.esm-71f9713d.js');
|
|
15
15
|
const formCreatorHelpers = require('./form-creator-helpers-886c1eaa.js');
|
|
16
|
-
const index$2 = require('./index-
|
|
16
|
+
const index$2 = require('./index-223b7476.js');
|
|
17
17
|
const isEqual = require('./isEqual-35c41499.js');
|
|
18
18
|
const remove = require('./remove-41707d5a.js');
|
|
19
19
|
const index$3 = require('./index-f0c2575c.js');
|
|
@@ -7,7 +7,7 @@ const inputBar_interface = require('./input-bar.interface-b96b7107.js');
|
|
|
7
7
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
8
8
|
const formCreatorHelpers = require('./form-creator-helpers-886c1eaa.js');
|
|
9
9
|
const stringHelpers = require('./string-helpers-4852718a.js');
|
|
10
|
-
const index$1 = require('./index-
|
|
10
|
+
const index$1 = require('./index-223b7476.js');
|
|
11
11
|
const cloneDeep = require('./cloneDeep-e00dc6ae.js');
|
|
12
12
|
const isEmpty = require('./isEmpty-1723db8b.js');
|
|
13
13
|
const isString = require('./isString-ecd0cbf4.js');
|
|
@@ -12,7 +12,7 @@ require('./ResizeObserver.es-a563c836.js');
|
|
|
12
12
|
const commonHelpers = require('./common-helpers-312e97a3.js');
|
|
13
13
|
const sortable_esm = require('./sortable.esm-71f9713d.js');
|
|
14
14
|
const index$2 = require('./index-77d54324.js');
|
|
15
|
-
const index$1 = require('./index-
|
|
15
|
+
const index$1 = require('./index-223b7476.js');
|
|
16
16
|
const cloneDeep = require('./cloneDeep-e00dc6ae.js');
|
|
17
17
|
const orderBy = require('./orderBy-18003c1b.js');
|
|
18
18
|
require('./document-2c1b83f3.js');
|
|
@@ -409,7 +409,7 @@ function getParentFieldConditions({ fieldConditions, slides, condition, field, c
|
|
|
409
409
|
const { slideIndex, itemIndex } = findField(slides, fieldName);
|
|
410
410
|
if (slides[slideIndex].items[itemIndex]) {
|
|
411
411
|
const parentCondition = { condition, fields: [field] };
|
|
412
|
-
if (isSequentialConditionalField({ slides, parentFieldSlideIndex: slideIndex, parentFieldItemIndex: itemIndex, childSlideIndex, childItemIndex })) {
|
|
412
|
+
if (isSequentialConditionalField({ slides, parentFieldSlideIndex: slideIndex, parentFieldItemIndex: itemIndex, childSlideIndex, childItemIndex, conditionId: condition._id })) {
|
|
413
413
|
field.sequentialConditionalField = { conditionId: condition._id, parentFieldName: fieldName, parentCustomFieldName: slides[slideIndex].items[itemIndex].customName };
|
|
414
414
|
}
|
|
415
415
|
else {
|
|
@@ -431,7 +431,8 @@ function getParentFieldConditions({ fieldConditions, slides, condition, field, c
|
|
|
431
431
|
}
|
|
432
432
|
return fieldConditions;
|
|
433
433
|
}
|
|
434
|
-
export function isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex }) {
|
|
434
|
+
export function isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex, conditionId }) {
|
|
435
|
+
var _a;
|
|
435
436
|
// the conditional field must be on the same slide as the parent field
|
|
436
437
|
if (parentFieldSlideIndex === childSlideIndex && childItemIndex > 0) {
|
|
437
438
|
const previousFieldIndex = childItemIndex - 1;
|
|
@@ -442,8 +443,21 @@ export function isSequentialConditionalField({ slides, parentFieldSlideIndex, pa
|
|
|
442
443
|
// otherwise, check that every field between this one and the parent is sequential
|
|
443
444
|
const items = slides[childSlideIndex].items;
|
|
444
445
|
const previousField = items[previousFieldIndex];
|
|
445
|
-
if
|
|
446
|
-
|
|
446
|
+
// Check if the field has a different condition which is associated to the previous field
|
|
447
|
+
let hasAlternateConditionalRelationshipWithParent = false;
|
|
448
|
+
if (items === null || items === void 0 ? void 0 : items.length) {
|
|
449
|
+
const conditions = (_a = items[childItemIndex]) === null || _a === void 0 ? void 0 : _a.condition;
|
|
450
|
+
if ((conditions === null || conditions === void 0 ? void 0 : conditions.length) > 1) {
|
|
451
|
+
conditions.forEach((condition) => {
|
|
452
|
+
var _a;
|
|
453
|
+
if (condition._id !== conditionId && ((_a = condition === null || condition === void 0 ? void 0 : condition.field) === null || _a === void 0 ? void 0 : _a.name) === previousField.name) {
|
|
454
|
+
hasAlternateConditionalRelationshipWithParent = true;
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if ((previousField === null || previousField === void 0 ? void 0 : previousField.sequentialConditionalField) && !hasAlternateConditionalRelationshipWithParent) {
|
|
460
|
+
return isSequentialConditionalField({ slides, parentFieldSlideIndex, parentFieldItemIndex, childSlideIndex, childItemIndex: previousFieldIndex, conditionId });
|
|
447
461
|
}
|
|
448
462
|
}
|
|
449
463
|
return false;
|