[BUGFIX] EvaluteDisplayCondition should throw proper error message
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / Unit / Form / FormDataProvider / EvaluateDisplayConditionsTest.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 use Prophecy\Prophecy\ObjectProphecy;
19 use TYPO3\CMS\Backend\Form\FormDataProvider\EvaluateDisplayConditions;
20 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
21 use TYPO3\CMS\Core\Utility\ArrayUtility;
22
23 /**
24 * Test case
25 */
26 class EvaluateDisplayConditionsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
27 {
28 /**
29 * @test
30 */
31 public function addDataThrowsExceptionIfMultipleConditionsAreNotCombinedWithAndOrOr()
32 {
33 $input = [
34 'databaseRow' => [],
35 'processedTca' => [
36 'columns' => [
37 'field_1' => [
38 'displayCond' => [
39 'FOO' => [
40 'condition1',
41 'condition2',
42 ],
43 ],
44 ],
45 ],
46 ],
47 ];
48 $this->expectException(\RuntimeException::class);
49 $this->expectExceptionCode(1481380393);
50 (new EvaluateDisplayConditions())->addData($input);
51 }
52
53 /**
54 * @test
55 */
56 public function addDataThrowsExceptionIAConditionHasNoStringAsKey()
57 {
58 $input = [
59 'databaseRow' => [],
60 'processedTca' => [
61 'columns' => [
62 'field_1' => [
63 'displayCond' => [
64 ['condition1'],
65 ],
66 ],
67 ],
68 ],
69 ];
70 $this->expectException(\RuntimeException::class);
71 $this->expectExceptionCode(1481380393);
72 (new EvaluateDisplayConditions())->addData($input);
73 }
74
75 /**
76 * @test
77 */
78 public function addDataThrowsExceptionWithMultipleConditionsCombinedWithAndHavingOnlyOneSubCondition()
79 {
80 $input = [
81 'databaseRow' => [],
82 'processedTca' => [
83 'columns' => [
84 'field_1' => [
85 'displayCond' => [
86 'AND' => [
87 'condition1',
88 ],
89 ],
90 ],
91 ],
92 ],
93 ];
94 $this->expectException(\RuntimeException::class);
95 $this->expectExceptionCode(1481464101);
96 (new EvaluateDisplayConditions())->addData($input);
97 }
98
99 /**
100 * @test
101 */
102 public function addDataThrowsExceptionIfConditionIsNotStringOrArray()
103 {
104 $input = [
105 'databaseRow' => [],
106 'processedTca' => [
107 'columns' => [
108 'field_1' => [
109 'displayCond' => false,
110 ],
111 ],
112 ],
113 ];
114 $this->expectException(\RuntimeException::class);
115 $this->expectExceptionCode(1481381058);
116 (new EvaluateDisplayConditions())->addData($input);
117 }
118
119 /**
120 * @test
121 */
122 public function addDataThrowsExceptionIfConditionTypeIsUnknown()
123 {
124 $input = [
125 'databaseRow' => [],
126 'processedTca' => [
127 'columns' => [
128 'field_1' => [
129 'displayCond' => 'foo',
130 ],
131 ],
132 ],
133 ];
134 $this->expectException(\RuntimeException::class);
135 $this->expectExceptionCode(1481381950);
136 (new EvaluateDisplayConditions())->addData($input);
137 }
138
139 /**
140 * @test
141 */
142 public function addDataThrowsExceptionIfFieldConditionHasNoFieldName()
143 {
144 $input = [
145 'databaseRow' => [],
146 'processedTca' => [
147 'columns' => [
148 'field_1' => [
149 'displayCond' => 'FIELD',
150 ],
151 ],
152 ],
153 ];
154 $this->expectException(\RuntimeException::class);
155 $this->expectExceptionCode(1481385695);
156 (new EvaluateDisplayConditions())->addData($input);
157 }
158
159 /**
160 * @test
161 */
162 public function addDataThrowsExceptionIfFieldConditionHasNoOperator()
163 {
164 $input = [
165 'databaseRow' => [],
166 'processedTca' => [
167 'columns' => [
168 'field_1' => [
169 'displayCond' => 'FIELD:fieldName',
170 ],
171 ],
172 ],
173 ];
174 $this->expectException(\RuntimeException::class);
175 $this->expectExceptionCode(1481386239);
176 (new EvaluateDisplayConditions())->addData($input);
177 }
178
179 /**
180 * @test
181 */
182 public function addDataThrowsExceptionIfFieldConditionHasInvalidOperator()
183 {
184 $input = [
185 'databaseRow' => [],
186 'processedTca' => [
187 'columns' => [
188 'field_1' => [
189 'displayCond' => 'FIELD:fieldName:foo',
190 ],
191 ],
192 ],
193 ];
194 $this->expectException(\RuntimeException::class);
195 $this->expectExceptionCode(1481386239);
196 (new EvaluateDisplayConditions())->addData($input);
197 }
198
199 /**
200 * @test
201 */
202 public function addDataThrowsExceptionIfFieldConditionHasNoOperand()
203 {
204 $input = [
205 'databaseRow' => [],
206 'processedTca' => [
207 'columns' => [
208 'field_1' => [
209 'displayCond' => 'FIELD:fieldName:REQ',
210 ],
211 ],
212 ],
213 ];
214 $this->expectException(\RuntimeException::class);
215 $this->expectExceptionCode(1481401543);
216 (new EvaluateDisplayConditions())->addData($input);
217 }
218
219 /**
220 * @test
221 */
222 public function addDataThrowsExceptionIfFieldConditionReqHasInvalidOperand()
223 {
224 $input = [
225 'databaseRow' => [],
226 'processedTca' => [
227 'columns' => [
228 'field_1' => [
229 'displayCond' => 'FIELD:fieldName:REQ:foo',
230 ],
231 ],
232 ],
233 ];
234 $this->expectException(\RuntimeException::class);
235 $this->expectExceptionCode(1481401892);
236 (new EvaluateDisplayConditions())->addData($input);
237 }
238
239 /**
240 * @test
241 */
242 public function addDataThrowsExceptionIfFieldConditionNumberComparisonHasInvalidOperand()
243 {
244 $input = [
245 'databaseRow' => [],
246 'processedTca' => [
247 'columns' => [
248 'field_1' => [
249 'displayCond' => 'FIELD:fieldName:>=:foo',
250 ],
251 ],
252 ],
253 ];
254 $this->expectException(\RuntimeException::class);
255 $this->expectExceptionCode(1481456806);
256 (new EvaluateDisplayConditions())->addData($input);
257 }
258
259 /**
260 * @test
261 */
262 public function addDataThrowsExceptionIfFieldConditionRangeComparisonHasInvalidOperand()
263 {
264 $input = [
265 'databaseRow' => [],
266 'processedTca' => [
267 'columns' => [
268 'field_1' => [
269 'displayCond' => 'FIELD:fieldName:-:23-',
270 ],
271 ],
272 ],
273 ];
274 $this->expectException(\RuntimeException::class);
275 $this->expectExceptionCode(1481457277);
276 (new EvaluateDisplayConditions())->addData($input);
277 }
278
279 /**
280 * @test
281 */
282 public function addDataThrowsExceptionIfFieldConditionRangeComparisonHasInvalidMaxOperand()
283 {
284 $input = [
285 'databaseRow' => [],
286 'processedTca' => [
287 'columns' => [
288 'field_1' => [
289 'displayCond' => 'FIELD:fieldName:-:23-foo',
290 ],
291 ],
292 ],
293 ];
294 $this->expectException(\RuntimeException::class);
295 $this->expectExceptionCode(1481457277);
296 (new EvaluateDisplayConditions())->addData($input);
297 }
298
299 /**
300 * @test
301 */
302 public function addDataThrowsExceptionIfRecordConditionHasNoNewKeyword()
303 {
304 $input = [
305 'databaseRow' => [],
306 'processedTca' => [
307 'columns' => [
308 'field_1' => [
309 'displayCond' => 'REC',
310 ],
311 ],
312 ],
313 ];
314 $this->expectException(\RuntimeException::class);
315 $this->expectExceptionCode(1481384784);
316 (new EvaluateDisplayConditions())->addData($input);
317 }
318
319 /**
320 * @test
321 */
322 public function addDataThrowsExceptionIfRecordConditionHasInvalidNewKeyword()
323 {
324 $input = [
325 'databaseRow' => [],
326 'processedTca' => [
327 'columns' => [
328 'field_1' => [
329 'displayCond' => 'REC:foo',
330 ],
331 ],
332 ],
333 ];
334 $this->expectException(\RuntimeException::class);
335 $this->expectExceptionCode(1481384784);
336 (new EvaluateDisplayConditions())->addData($input);
337 }
338
339 /**
340 * @test
341 */
342 public function addDataThrowsExceptionIfRecordConditionHasNoOperand()
343 {
344 $input = [
345 'databaseRow' => [],
346 'processedTca' => [
347 'columns' => [
348 'field_1' => [
349 'displayCond' => 'REC:NEW',
350 ],
351 ],
352 ],
353 ];
354 $this->expectException(\RuntimeException::class);
355 $this->expectExceptionCode(1481384947);
356 (new EvaluateDisplayConditions())->addData($input);
357 }
358
359 /**
360 * @test
361 */
362 public function addDataThrowsExceptionIfRecordConditionHasInvalidOperand()
363 {
364 $input = [
365 'databaseRow' => [],
366 'processedTca' => [
367 'columns' => [
368 'field_1' => [
369 'displayCond' => 'REC:NEW:foo',
370 ],
371 ],
372 ],
373 ];
374 $this->expectException(\RuntimeException::class);
375 $this->expectExceptionCode(1481385173);
376 (new EvaluateDisplayConditions())->addData($input);
377 }
378
379 /**
380 * @test
381 */
382 public function addDataThrowsExceptionIfRecordConditionHasNoUidInDatabaseRow()
383 {
384 $input = [
385 'databaseRow' => [],
386 'processedTca' => [
387 'columns' => [
388 'field_1' => [
389 'displayCond' => 'REC:NEW:false',
390 ],
391 ],
392 ],
393 ];
394 $this->expectException(\RuntimeException::class);
395 $this->expectExceptionCode(1481467208);
396 (new EvaluateDisplayConditions())->addData($input);
397 }
398
399 /**
400 * @test
401 */
402 public function addDataThrowsExceptionIfVersionConditionHasNoIsKeyword()
403 {
404 $input = [
405 'databaseRow' => [],
406 'processedTca' => [
407 'columns' => [
408 'field_1' => [
409 'displayCond' => 'VERSION',
410 ],
411 ],
412 ],
413 ];
414 $this->expectException(\RuntimeException::class);
415 $this->expectExceptionCode(1481383660);
416 (new EvaluateDisplayConditions())->addData($input);
417 }
418
419 /**
420 * @test
421 */
422 public function addDataThrowsExceptionIfVersionConditionHasInvalidIsKeyword()
423 {
424 $input = [
425 'databaseRow' => [],
426 'processedTca' => [
427 'columns' => [
428 'field_1' => [
429 'displayCond' => 'VERSION:foo',
430 ],
431 ],
432 ],
433 ];
434 $this->expectException(\RuntimeException::class);
435 $this->expectExceptionCode(1481383660);
436 (new EvaluateDisplayConditions())->addData($input);
437 }
438
439 /**
440 * @test
441 */
442 public function addDataThrowsExceptionIfVersionConditionHasNoOperand()
443 {
444 $input = [
445 'databaseRow' => [],
446 'processedTca' => [
447 'columns' => [
448 'field_1' => [
449 'displayCond' => 'VERSION:IS',
450 ],
451 ],
452 ],
453 ];
454 $this->expectException(\RuntimeException::class);
455 $this->expectExceptionCode(1481383888);
456 (new EvaluateDisplayConditions())->addData($input);
457 }
458
459 /**
460 * @test
461 */
462 public function addDataThrowsExceptionIfVersionConditionHasInvalidOperand()
463 {
464 $input = [
465 'databaseRow' => [],
466 'processedTca' => [
467 'columns' => [
468 'field_1' => [
469 'displayCond' => 'VERSION:IS:foo',
470 ],
471 ],
472 ],
473 ];
474 $this->expectException(\RuntimeException::class);
475 $this->expectExceptionCode(1481384123);
476 (new EvaluateDisplayConditions())->addData($input);
477 }
478
479 /**
480 * @test
481 */
482 public function addDataThrowsExceptionIfVersionConditionHasNoUidInDatabaseRow()
483 {
484 $input = [
485 'databaseRow' => [],
486 'processedTca' => [
487 'columns' => [
488 'field_1' => [
489 'displayCond' => 'VERSION:IS:false',
490 ],
491 ],
492 ],
493 ];
494 $this->expectException(\RuntimeException::class);
495 $this->expectExceptionCode(1481469854);
496 (new EvaluateDisplayConditions())->addData($input);
497 }
498
499 /**
500 * @test
501 */
502 public function addDataThrowsExceptionIfUserConditionHasNoUserfuncSpecified()
503 {
504 $input = [
505 'databaseRow' => [],
506 'processedTca' => [
507 'columns' => [
508 'field_1' => [
509 'displayCond' => 'USER',
510 ],
511 ],
512 ],
513 ];
514 $this->expectException(\RuntimeException::class);
515 $this->expectExceptionCode(1481382954);
516 (new EvaluateDisplayConditions())->addData($input);
517 }
518
519 /**
520 * @test
521 */
522 public function addDataEvaluatesUserCondition()
523 {
524 $input = [
525 'databaseRow' => [],
526 'processedTca' => [
527 'columns' => [
528 'field_1' => [
529 'displayCond' => 'USER:' . self::class . '->addDataEvaluatesUserConditionCallback:more:arguments',
530 ],
531 ],
532 ],
533 ];
534 $this->expectException(\RuntimeException::class);
535 $this->expectExceptionCode(1488130499);
536 (new EvaluateDisplayConditions())->addData($input);
537 }
538
539 /**
540 * Callback method of addDataEvaluatesUserCondition. A USER condition
541 * Throws an exception if data is correct!
542 *
543 * @throws \RuntimeException if data is ok
544 */
545 public function addDataEvaluatesUserConditionCallback(array $parameter)
546 {
547 $expected = [
548 'record' => [],
549 'flexformValueKey' => 'vDEF',
550 'conditionParameters' => [
551 0 => 'more',
552 1 => 'arguments',
553 ]
554 ];
555 if ($expected === $parameter) {
556 throw new \RuntimeException('testing', 1488130499);
557 }
558 }
559
560 /**
561 * @test
562 */
563 public function addDataThrowsExceptionIfFlexSheetNameAndFieldNameCombinationsOverlap()
564 {
565 $input = [
566 'databaseRow' => [],
567 'processedTca' => [
568 'columns' => [
569 'field_1' => [
570 'config' => [
571 'type' => 'flex',
572 'ds' => [
573 'sheets' => [
574 'sheet' => [
575 'ROOT' => [
576 'el' => [
577 'name.field' => [],
578 ],
579 ],
580 ],
581 'sheet.name' => [
582 'ROOT' => [
583 'el' => [
584 'field' => [],
585 ],
586 ],
587 ],
588 ],
589 ],
590 ],
591 ],
592 ],
593 ],
594 ];
595 $this->expectException(\RuntimeException::class);
596 $this->expectExceptionCode(1481483061);
597 (new EvaluateDisplayConditions())->addData($input);
598 }
599
600 /**
601 * @test
602 */
603 public function addDataThrowsExceptionIfFlexSheetConditionReferencesFieldFromSameSheet()
604 {
605 $input = [
606 'databaseRow' => [],
607 'processedTca' => [
608 'columns' => [
609 'field_1' => [
610 'config' => [
611 'type' => 'flex',
612 'ds' => [
613 'sheets' => [
614 'aSheet' => [
615 'ROOT' => [
616 'displayCond' => 'FIELD:aSheet.aField:=:foo',
617 'el' => [
618 'aField' => [],
619 ],
620 ],
621 ],
622 ],
623 ],
624 ],
625 ],
626 ],
627 ],
628 ];
629 $this->expectException(\RuntimeException::class);
630 $this->expectExceptionCode(1481485705);
631 (new EvaluateDisplayConditions())->addData($input);
632 }
633
634 /**
635 * @test
636 */
637 public function addDataTrowsExceptionIfFlexFieldSheetConditionReferencesNotExistingFieldValue()
638 {
639 $input = [
640 'databaseRow' => [],
641 'processedTca' => [
642 'columns' => [
643 'field_1' => [
644 'config' => [
645 'type' => 'flex',
646 'ds' => [
647 'sheets' => [
648 'sheet_1' => [],
649 'sheet_2' => [
650 'ROOT' => [
651 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
652 ],
653 ],
654 ],
655 ],
656 ],
657 ],
658 ],
659 ],
660 ];
661 $this->expectException(\RuntimeException::class);
662 $this->expectExceptionCode(1481488492);
663 (new EvaluateDisplayConditions())->addData($input);
664 }
665
666 /**
667 * @test
668 */
669 public function addDataThrowsExceptionIfFlexFieldFieldConditionReferencesNotExistingFieldValue()
670 {
671 $input = [
672 'databaseRow' => [],
673 'processedTca' => [
674 'columns' => [
675 'field_1' => [
676 'config' => [
677 'type' => 'flex',
678 'ds' => [
679 'sheets' => [
680 'sheet_1' => [
681 'ROOT' => [
682 'el' => [
683 'flexField_1' => [],
684 'flexField_2' => [
685 'displayCond' => 'FIELD:flexField_1:!=:foo',
686 ],
687 ],
688 ],
689 ],
690 ],
691 ],
692 ],
693 ],
694 ],
695 ],
696 ];
697 $this->expectException(\RuntimeException::class);
698 $this->expectExceptionCode(1481492953);
699 (new EvaluateDisplayConditions())->addData($input);
700 }
701
702 /**
703 * @test
704 */
705 public function addDataThrowsExceptionIfFlexFieldReferencingFlexFieldIsNotFoundInFieldValue()
706 {
707 $input = [
708 'databaseRow' => [],
709 'processedTca' => [
710 'columns' => [
711 'field_1' => [
712 'config' => [
713 'type' => 'flex',
714 'ds' => [
715 'sheets' => [
716 'sheet_1' => [
717 'ROOT' => [
718 'el' => [
719 'flexField_1' => [
720 'displayCond' => 'FIELD:foo.flexField_1:!=:foo',
721 ],
722 ],
723 ],
724 ],
725 ],
726 ],
727 ],
728 ],
729 ],
730 ],
731 ];
732 $this->expectException(\RuntimeException::class);
733 $this->expectExceptionCode(1481496170);
734 (new EvaluateDisplayConditions())->addData($input);
735 }
736
737 /**
738 * @test
739 */
740 public function addDataThrowsExceptionIfFlexSectionContainerFoundNoReferencedFieldValue()
741 {
742 $input = [
743 'databaseRow' => [
744 'field_1' => [
745 'data' => [
746 'sheet_1' => [
747 'lDEF' => [
748 'section_1' => [
749 'el' => [
750 '1' => [
751 'container_1' => [],
752 ],
753 ],
754 ],
755 ],
756 ],
757 ],
758 ],
759 ],
760 'processedTca' => [
761 'columns' => [
762 'field_1' => [
763 'config' => [
764 'type' => 'flex',
765 'ds' => [
766 'sheets' => [
767 'sheet_1' => [
768 'ROOT' => [
769 'el' => [
770 'section_1' => [
771 'type' => 'array',
772 'section' => 1,
773 'children' => [
774 '1' => [
775 'el' => [
776 'containerField_1' => [
777 'displayCond' => 'FIELD:flexField_1:!=:foo',
778 ],
779 ],
780 ],
781 ],
782 ],
783 ],
784 ],
785 ],
786 ],
787 ],
788 ],
789 ],
790 ],
791 ]
792 ];
793 $this->expectException(\RuntimeException::class);
794 $this->expectExceptionCode(1481634649);
795 (new EvaluateDisplayConditions())->addData($input);
796 }
797
798 /**
799 * Test scenarios for "a display condition references the value of another field"
800 *
801 * @return array
802 */
803 public function addDataRemovesTcaReferencingOtherFieldsInDisplayConditionDataProvider()
804 {
805 return [
806
807 // tca field to tca field value tests
808 'remove tca field by tca field value' => [
809 // path that should be removed from 'processedTca' by condition
810 'columns/field_2',
811 // 'databaseRow'
812 [
813 'field_1' => 'foo',
814 ],
815 // 'processedTca'
816 [
817 'columns' => [
818 'field_2' => [
819 'displayCond' => 'FIELD:field_1:!=:foo',
820 ],
821 ],
822 ],
823 ],
824
825 // flex field to tca field value tests
826 'remove flex form field by tca field value' => [
827 'columns/field_2/config/ds/sheets/sheet_1/ROOT/el/flexField_1',
828 [
829 'field_1' => 'foo',
830 ],
831 [
832 'columns' => [
833 'field_2' => [
834 'config' => [
835 'type' => 'flex',
836 'ds' => [
837 'sheets' => [
838 'sheet_1' => [
839 'ROOT' => [
840 'el' => [
841 'flexField_1' => [
842 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
843 ],
844 ],
845 ],
846 ],
847 ],
848 ],
849 ],
850 ],
851 ],
852 ],
853 ],
854
855 // flex field to flex field value on same sheet tests
856 'remove flex form field by flex field value on same flex sheet' => [
857 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
858 [
859 'field_1' => [
860 'data' => [
861 'sheet_1' => [
862 'lDEF' => [
863 'flexField_1' => [
864 'vDEF' => [
865 0 => 'foo',
866 ],
867 ],
868 ],
869 ],
870 ],
871 ],
872 ],
873 [
874 'columns' => [
875 'field_1' => [
876 'config' => [
877 'type' => 'flex',
878 'ds' => [
879 'sheets' => [
880 'sheet_1' => [
881 'ROOT' => [
882 'el' => [
883 'flexField_1' => [],
884 'flexField_2' => [
885 'displayCond' => 'FIELD:flexField_1:!=:foo',
886 ],
887 ],
888 ],
889 ],
890 ],
891 ],
892 ],
893 ],
894 ],
895 ],
896 ],
897
898 'remove flex form field by flex field value on same flex sheet with dot in flex sheet name' => [
899 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
900 [
901 'field_1' => [
902 'data' => [
903 'sheet.1' => [
904 'lDEF' => [
905 'flexField_1' => [
906 'vDEF' => [
907 0 => 'foo',
908 ],
909 ],
910 ],
911 ],
912 ],
913 ],
914 ],
915 [
916 'columns' => [
917 'field_1' => [
918 'config' => [
919 'type' => 'flex',
920 'ds' => [
921 'sheets' => [
922 'sheet.1' => [
923 'ROOT' => [
924 'el' => [
925 'flexField_1' => [],
926 'flexField_2' => [
927 'displayCond' => 'FIELD:flexField_1:!=:foo',
928 ],
929 ],
930 ],
931 ],
932 ],
933 ],
934 ],
935 ],
936 ],
937 ],
938 ],
939
940 'remove flex form field by flex field value on same flex sheet with dot in flex field name' => [
941 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
942 [
943 'field_1' => [
944 'data' => [
945 'sheet_1' => [
946 'lDEF' => [
947 'flexField.1' => [
948 'vDEF' => [
949 0 => 'foo',
950 ],
951 ],
952 ],
953 ],
954 ],
955 ],
956 ],
957 [
958 'columns' => [
959 'field_1' => [
960 'config' => [
961 'type' => 'flex',
962 'ds' => [
963 'sheets' => [
964 'sheet_1' => [
965 'ROOT' => [
966 'el' => [
967 'flexField.1' => [],
968 'flexField_2' => [
969 'displayCond' => 'FIELD:flexField.1:!=:foo',
970 ],
971 ],
972 ],
973 ],
974 ],
975 ],
976 ],
977 ],
978 ],
979 ],
980 ],
981
982 'remove flex form field by flex field value on same flex sheet with dot in flex sheet name and dot in flex field name' => [
983 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
984 [
985 'field_1' => [
986 'data' => [
987 'sheet.1' => [
988 'lDEF' => [
989 'flexField.1' => [
990 'vDEF' => [
991 0 => 'foo',
992 ],
993 ],
994 ],
995 ],
996 ],
997 ],
998 ],
999 [
1000 'columns' => [
1001 'field_1' => [
1002 'config' => [
1003 'type' => 'flex',
1004 'ds' => [
1005 'sheets' => [
1006 'sheet.1' => [
1007 'ROOT' => [
1008 'el' => [
1009 'flexField.1' => [],
1010 'flexField_2' => [
1011 'displayCond' => 'FIELD:flexField.1:!=:foo',
1012 ],
1013 ],
1014 ],
1015 ],
1016 ],
1017 ],
1018 ],
1019 ],
1020 ],
1021 ],
1022 ],
1023
1024 'remove flex form field by flex field value on same flex sheet with specified flex sheet name' => [
1025 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
1026 [
1027 'field_1' => [
1028 'data' => [
1029 'sheet_1' => [
1030 'lDEF' => [
1031 'flexField_1' => [
1032 'vDEF' => [
1033 0 => 'foo',
1034 ],
1035 ],
1036 ],
1037 ],
1038 ],
1039 ],
1040 ],
1041 [
1042 'columns' => [
1043 'field_1' => [
1044 'config' => [
1045 'type' => 'flex',
1046 'ds' => [
1047 'sheets' => [
1048 'sheet_1' => [
1049 'ROOT' => [
1050 'el' => [
1051 'flexField_1' => [],
1052 'flexField_2' => [
1053 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1054 ],
1055 ],
1056 ],
1057 ],
1058 ],
1059 ],
1060 ],
1061 ],
1062 ],
1063 ],
1064 ],
1065
1066 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name' => [
1067 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
1068 [
1069 'field_1' => [
1070 'data' => [
1071 'sheet.1' => [
1072 'lDEF' => [
1073 'flexField_1' => [
1074 'vDEF' => [
1075 0 => 'foo',
1076 ],
1077 ],
1078 ],
1079 ],
1080 ],
1081 ],
1082 ],
1083 [
1084 'columns' => [
1085 'field_1' => [
1086 'config' => [
1087 'type' => 'flex',
1088 'ds' => [
1089 'sheets' => [
1090 'sheet.1' => [
1091 'ROOT' => [
1092 'el' => [
1093 'flexField_1' => [],
1094 'flexField_2' => [
1095 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1096 ],
1097 ],
1098 ],
1099 ],
1100 ],
1101 ],
1102 ],
1103 ],
1104 ],
1105 ],
1106 ],
1107
1108 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex field name' => [
1109 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
1110 [
1111 'field_1' => [
1112 'data' => [
1113 'sheet_1' => [
1114 'lDEF' => [
1115 'flexField.1' => [
1116 'vDEF' => [
1117 0 => 'foo',
1118 ],
1119 ],
1120 ],
1121 ],
1122 ],
1123 ],
1124 ],
1125 [
1126 'columns' => [
1127 'field_1' => [
1128 'config' => [
1129 'type' => 'flex',
1130 'ds' => [
1131 'sheets' => [
1132 'sheet_1' => [
1133 'ROOT' => [
1134 'el' => [
1135 'flexField.1' => [],
1136 'flexField_2' => [
1137 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1138 ],
1139 ],
1140 ],
1141 ],
1142 ],
1143 ],
1144 ],
1145 ],
1146 ],
1147 ],
1148 ],
1149
1150 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name and dot in flex field name' => [
1151 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
1152 [
1153 'field_1' => [
1154 'data' => [
1155 'sheet.1' => [
1156 'lDEF' => [
1157 'flexField.1' => [
1158 'vDEF' => [
1159 0 => 'foo',
1160 ],
1161 ],
1162 ],
1163 ],
1164 ],
1165 ],
1166 ],
1167 [
1168 'columns' => [
1169 'field_1' => [
1170 'config' => [
1171 'type' => 'flex',
1172 'ds' => [
1173 'sheets' => [
1174 'sheet.1' => [
1175 'ROOT' => [
1176 'el' => [
1177 'flexField.1' => [],
1178 'flexField_2' => [
1179 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1180 ],
1181 ],
1182 ],
1183 ],
1184 ],
1185 ],
1186 ],
1187 ],
1188 ],
1189 ],
1190 ],
1191
1192 // flex field to flex field value on other sheet tests
1193 'remove flex form field by flex field value on other flex sheet' => [
1194 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1195 [
1196 'field_1' => [
1197 'data' => [
1198 'sheet_1' => [
1199 'lDEF' => [
1200 'flexField_1' => [
1201 'vDEF' => [
1202 0 => 'foo',
1203 ],
1204 ],
1205 ],
1206 ],
1207 ],
1208 ],
1209 ],
1210 [
1211 'columns' => [
1212 'field_1' => [
1213 'config' => [
1214 'type' => 'flex',
1215 'ds' => [
1216 'sheets' => [
1217 'sheet_1' => [
1218 'ROOT' => [
1219 'el' => [
1220 'flexField_1' => [],
1221 ]
1222 ]
1223 ],
1224 'sheet_2' => [
1225 'ROOT' => [
1226 'el' => [
1227 'flexField_1' => [
1228 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1229 ],
1230 ],
1231 ],
1232 ],
1233 ],
1234 ],
1235 ],
1236 ],
1237 ],
1238 ],
1239 ],
1240
1241 'remove flex form field by flex field value on other flex sheet with dot in flex sheet name' => [
1242 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1243 [
1244 'field_1' => [
1245 'data' => [
1246 'sheet.1' => [
1247 'lDEF' => [
1248 'flexField_1' => [
1249 'vDEF' => [
1250 0 => 'foo',
1251 ],
1252 ],
1253 ],
1254 ],
1255 ],
1256 ],
1257 ],
1258 [
1259 'columns' => [
1260 'field_1' => [
1261 'config' => [
1262 'type' => 'flex',
1263 'ds' => [
1264 'sheets' => [
1265 'sheet.1' => [
1266 'ROOT' => [
1267 'el' => [
1268 'flexField_1' => [],
1269 ]
1270 ]
1271 ],
1272 'sheet_2' => [
1273 'ROOT' => [
1274 'el' => [
1275 'flexField_1' => [
1276 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1277 ],
1278 ],
1279 ],
1280 ],
1281 ],
1282 ],
1283 ],
1284 ],
1285 ],
1286 ],
1287 ],
1288
1289 'remove flex form field by flex field value on other flex sheet with dot in flex field name' => [
1290 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1291 [
1292 'field_1' => [
1293 'data' => [
1294 'sheet_1' => [
1295 'lDEF' => [
1296 'flexField.1' => [
1297 'vDEF' => [
1298 0 => 'foo',
1299 ],
1300 ],
1301 ],
1302 ],
1303 ],
1304 ],
1305 ],
1306 [
1307 'columns' => [
1308 'field_1' => [
1309 'config' => [
1310 'type' => 'flex',
1311 'ds' => [
1312 'sheets' => [
1313 'sheet_1' => [
1314 'ROOT' => [
1315 'el' => [
1316 'flexField.1' => [],
1317 ]
1318 ]
1319 ],
1320 'sheet_2' => [
1321 'ROOT' => [
1322 'el' => [
1323 'flexField_1' => [
1324 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1325 ],
1326 ],
1327 ],
1328 ],
1329 ],
1330 ],
1331 ],
1332 ],
1333 ],
1334 ],
1335 ],
1336
1337 'remove flex form field by flex field value on other flex sheet with dot in flex sheet name and dot in flex field name' => [
1338 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1339 [
1340 'field_1' => [
1341 'data' => [
1342 'sheet.1' => [
1343 'lDEF' => [
1344 'flexField.1' => [
1345 'vDEF' => [
1346 0 => 'foo',
1347 ],
1348 ],
1349 ],
1350 ],
1351 ],
1352 ],
1353 ],
1354 [
1355 'columns' => [
1356 'field_1' => [
1357 'config' => [
1358 'type' => 'flex',
1359 'ds' => [
1360 'sheets' => [
1361 'sheet.1' => [
1362 'ROOT' => [
1363 'el' => [
1364 'flexField.1' => [],
1365 ]
1366 ]
1367 ],
1368 'sheet_2' => [
1369 'ROOT' => [
1370 'el' => [
1371 'flexField_1' => [
1372 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1373 ],
1374 ],
1375 ],
1376 ],
1377 ],
1378 ],
1379 ],
1380 ],
1381 ],
1382 ],
1383 ],
1384
1385 // flex sheet to tca field value tests
1386 'remove flex form sheet by tca field value' => [
1387 'columns/field_2/config/ds/sheets/sheet_1',
1388 [
1389 'field_1' => 'foo',
1390 ],
1391 [
1392 'columns' => [
1393 'field_2' => [
1394 'config' => [
1395 'type' => 'flex',
1396 'ds' => [
1397 'sheets' => [
1398 'sheet_1' => [
1399 'ROOT' => [
1400 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
1401 ],
1402 ],
1403 ],
1404 ],
1405 ],
1406 ],
1407 ],
1408 ],
1409 ],
1410
1411 // flex sheet to flex field value tests
1412 'remove flex form sheet by flex field value on different flex sheet' => [
1413 'columns/field_1/config/ds/sheets/sheet_2',
1414 [
1415 'field_1' => [
1416 'data' => [
1417 'sheet_1' => [
1418 'lDEF' => [
1419 'flexField_1' => [
1420 'vDEF' => [
1421 0 => 'foo',
1422 ],
1423 ],
1424 ],
1425 ],
1426 ],
1427 ],
1428 ],
1429 [
1430 'columns' => [
1431 'field_1' => [
1432 'config' => [
1433 'type' => 'flex',
1434 'ds' => [
1435 'sheets' => [
1436 'sheet_1' => [
1437 'ROOT' => [
1438 'el' => [
1439 'flexField_1' => [],
1440 ],
1441 ],
1442 ],
1443 'sheet_2' => [
1444 'ROOT' => [
1445 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1446 ],
1447 ],
1448 ],
1449 ],
1450 ],
1451 ],
1452 ],
1453 ],
1454 ],
1455
1456 'remove flex form sheet by flex field value on different flex sheet with dot in flex sheet name' => [
1457 'columns/field_1/config/ds/sheets/sheet.2',
1458 [
1459 'field_1' => [
1460 'data' => [
1461 'sheet.1' => [
1462 'lDEF' => [
1463 'flexField_1' => [
1464 'vDEF' => [
1465 0 => 'foo',
1466 ],
1467 ],
1468 ],
1469 ],
1470 ],
1471 ],
1472 ],
1473 [
1474 'columns' => [
1475 'field_1' => [
1476 'config' => [
1477 'type' => 'flex',
1478 'ds' => [
1479 'sheets' => [
1480 'sheet.1' => [
1481 'ROOT' => [
1482 'el' => [
1483 'flexField_1' => [],
1484 ],
1485 ],
1486 ],
1487 'sheet.2' => [
1488 'ROOT' => [
1489 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1490 ],
1491 ],
1492 ],
1493 ],
1494 ],
1495 ],
1496 ],
1497 ],
1498 ],
1499
1500 'remove flex form sheet by flex field value on different flex sheet with dot in flex field name' => [
1501 'columns/field_1/config/ds/sheets/sheet_2',
1502 [
1503 'field_1' => [
1504 'data' => [
1505 'sheet_1' => [
1506 'lDEF' => [
1507 'flexField.1' => [
1508 'vDEF' => [
1509 0 => 'foo',
1510 ],
1511 ],
1512 ],
1513 ],
1514 ],
1515 ],
1516 ],
1517 [
1518 'columns' => [
1519 'field_1' => [
1520 'config' => [
1521 'type' => 'flex',
1522 'ds' => [
1523 'sheets' => [
1524 'sheet_1' => [
1525 'ROOT' => [
1526 'el' => [
1527 'flexField.1' => [],
1528 ],
1529 ],
1530 ],
1531 'sheet_2' => [
1532 'ROOT' => [
1533 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1534 ],
1535 ],
1536 ],
1537 ],
1538 ],
1539 ],
1540 ],
1541 ],
1542 ],
1543
1544 'remove flex form sheet by flex field value on different flex sheet with dot in flex sheet name and dot in flex field name' => [
1545 'columns/field_1/config/ds/sheets/sheet.2',
1546 [
1547 'field_1' => [
1548 'data' => [
1549 'sheet.1' => [
1550 'lDEF' => [
1551 'flexField.1' => [
1552 'vDEF' => [
1553 0 => 'foo',
1554 ],
1555 ],
1556 ],
1557 ],
1558 ],
1559 ],
1560 ],
1561 [
1562 'columns' => [
1563 'field_1' => [
1564 'config' => [
1565 'type' => 'flex',
1566 'ds' => [
1567 'sheets' => [
1568 'sheet.1' => [
1569 'ROOT' => [
1570 'el' => [
1571 'flexField.1' => [],
1572 ],
1573 ],
1574 ],
1575 'sheet.2' => [
1576 'ROOT' => [
1577 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1578 ],
1579 ],
1580 ],
1581 ],
1582 ],
1583 ],
1584 ],
1585 ],
1586 ],
1587
1588 // flex section container field to tca value tests
1589 'remove flex section container field by tca field value' => [
1590 'columns/field_2/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1591 [
1592 'field_1' => 'foo',
1593 'field_2' => [
1594 'data' => [
1595 'sheet_1' => [
1596 'lDEF' => [
1597 'section_1' => [
1598 'el' => [
1599 '1' => [],
1600 ],
1601 ],
1602 ],
1603 ],
1604 ],
1605 ],
1606 ],
1607 [
1608 'columns' => [
1609 'field_2' => [
1610 'config' => [
1611 'type' => 'flex',
1612 'ds' => [
1613 'sheets' => [
1614 'sheet_1' => [
1615 'ROOT' => [
1616 'el' => [
1617 'section_1' => [
1618 'type' => 'array',
1619 'section' => 1,
1620 'children' => [
1621 '1' => [
1622 'el' => [
1623 'containerField_1' => [
1624 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
1625 ],
1626 ],
1627 ],
1628 ],
1629 ],
1630 ],
1631 ],
1632 ],
1633 ],
1634 ],
1635 ],
1636 ],
1637 ],
1638 ],
1639 ],
1640
1641 // flex section container field to flex field value of same sheet
1642 'remove flex section container field by flex field value on same flex sheet' => [
1643 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1644 [
1645 'field_1' => [
1646 'data' => [
1647 'sheet_1' => [
1648 'lDEF' => [
1649 'flexField_1' => [
1650 'vDEF' => [
1651 0 => 'foo',
1652 ],
1653 ],
1654 'section_1' => [
1655 'el' => [
1656 '1' => [],
1657 ],
1658 ],
1659 ],
1660 ],
1661 ],
1662 ],
1663 ],
1664 [
1665 'columns' => [
1666 'field_1' => [
1667 'config' => [
1668 'type' => 'flex',
1669 'ds' => [
1670 'sheets' => [
1671 'sheet_1' => [
1672 'ROOT' => [
1673 'el' => [
1674 'flexField_1' => [],
1675 'section_1' => [
1676 'type' => 'array',
1677 'section' => 1,
1678 'children' => [
1679 '1' => [
1680 'el' => [
1681 'containerField_1' => [
1682 'displayCond' => 'FIELD:flexField_1:!=:foo',
1683 ],
1684 ],
1685 ],
1686 ],
1687 ],
1688 ],
1689 ],
1690 ],
1691 ],
1692 ],
1693 ],
1694 ],
1695 ],
1696 ],
1697 ],
1698
1699 'remove flex section container field by flex field value on same flex sheet with dot in flex sheet name' => [
1700 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1701 [
1702 'field_1' => [
1703 'data' => [
1704 'sheet.1' => [
1705 'lDEF' => [
1706 'flexField_1' => [
1707 'vDEF' => [
1708 0 => 'foo',
1709 ],
1710 ],
1711 'section_1' => [
1712 'el' => [
1713 '1' => [],
1714 ],
1715 ],
1716 ],
1717 ],
1718 ],
1719 ],
1720 ],
1721 [
1722 'columns' => [
1723 'field_1' => [
1724 'config' => [
1725 'type' => 'flex',
1726 'ds' => [
1727 'sheets' => [
1728 'sheet.1' => [
1729 'ROOT' => [
1730 'el' => [
1731 'flexField_1' => [],
1732 'section_1' => [
1733 'type' => 'array',
1734 'section' => 1,
1735 'children' => [
1736 '1' => [
1737 'el' => [
1738 'containerField_1' => [
1739 'displayCond' => 'FIELD:flexField_1:!=:foo',
1740 ],
1741 ],
1742 ],
1743 ],
1744 ],
1745 ],
1746 ],
1747 ],
1748 ],
1749 ],
1750 ],
1751 ],
1752 ],
1753 ],
1754 ],
1755
1756 'remove flex section container field by flex field value on same flex sheet with dot in flex field name' => [
1757 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1758 [
1759 'field_1' => [
1760 'data' => [
1761 'sheet_1' => [
1762 'lDEF' => [
1763 'flexField.1' => [
1764 'vDEF' => [
1765 0 => 'foo',
1766 ],
1767 ],
1768 'section_1' => [
1769 'el' => [
1770 '1' => [],
1771 ],
1772 ],
1773 ],
1774 ],
1775 ],
1776 ],
1777 ],
1778 [
1779 'columns' => [
1780 'field_1' => [
1781 'config' => [
1782 'type' => 'flex',
1783 'ds' => [
1784 'sheets' => [
1785 'sheet_1' => [
1786 'ROOT' => [
1787 'el' => [
1788 'flexField.1' => [],
1789 'section_1' => [
1790 'type' => 'array',
1791 'section' => 1,
1792 'children' => [
1793 '1' => [
1794 'el' => [
1795 'containerField_1' => [
1796 'displayCond' => 'FIELD:flexField.1:!=:foo',
1797 ],
1798 ],
1799 ],
1800 ],
1801 ],
1802 ],
1803 ],
1804 ],
1805 ],
1806 ],
1807 ],
1808 ],
1809 ],
1810 ],
1811 ],
1812
1813 'remove flex section container field by flex field value on same flex sheet with dot in flex sheet name and dot in flex field name' => [
1814 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1815 [
1816 'field_1' => [
1817 'data' => [
1818 'sheet.1' => [
1819 'lDEF' => [
1820 'flexField.1' => [
1821 'vDEF' => [
1822 0 => 'foo',
1823 ],
1824 ],
1825 'section_1' => [
1826 'el' => [
1827 '1' => [],
1828 ],
1829 ],
1830 ],
1831 ],
1832 ],
1833 ],
1834 ],
1835 [
1836 'columns' => [
1837 'field_1' => [
1838 'config' => [
1839 'type' => 'flex',
1840 'ds' => [
1841 'sheets' => [
1842 'sheet.1' => [
1843 'ROOT' => [
1844 'el' => [
1845 'flexField.1' => [],
1846 'section_1' => [
1847 'type' => 'array',
1848 'section' => 1,
1849 'children' => [
1850 '1' => [
1851 'el' => [
1852 'containerField_1' => [
1853 'displayCond' => 'FIELD:flexField.1:!=:foo',
1854 ],
1855 ],
1856 ],
1857 ],
1858 ],
1859 ],
1860 ],
1861 ],
1862 ],
1863 ],
1864 ],
1865 ],
1866 ],
1867 ],
1868 ],
1869
1870 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name' => [
1871 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1872 [
1873 'field_1' => [
1874 'data' => [
1875 'sheet_1' => [
1876 'lDEF' => [
1877 'flexField_1' => [
1878 'vDEF' => [
1879 0 => 'foo',
1880 ],
1881 ],
1882 'section_1' => [
1883 'el' => [
1884 '1' => [],
1885 ],
1886 ],
1887 ],
1888 ],
1889 ],
1890 ],
1891 ],
1892 [
1893 'columns' => [
1894 'field_1' => [
1895 'config' => [
1896 'type' => 'flex',
1897 'ds' => [
1898 'sheets' => [
1899 'sheet_1' => [
1900 'ROOT' => [
1901 'el' => [
1902 'flexField_1' => [],
1903 'section_1' => [
1904 'type' => 'array',
1905 'section' => 1,
1906 'children' => [
1907 '1' => [
1908 'el' => [
1909 'containerField_1' => [
1910 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1911 ],
1912 ],
1913 ],
1914 ],
1915 ],
1916 ],
1917 ],
1918 ],
1919 ],
1920 ],
1921 ],
1922 ],
1923 ],
1924 ],
1925 ],
1926
1927 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name' => [
1928 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1929 [
1930 'field_1' => [
1931 'data' => [
1932 'sheet.1' => [
1933 'lDEF' => [
1934 'flexField_1' => [
1935 'vDEF' => [
1936 0 => 'foo',
1937 ],
1938 ],
1939 'section_1' => [
1940 'el' => [
1941 '1' => [],
1942 ],
1943 ],
1944 ],
1945 ],
1946 ],
1947 ],
1948 ],
1949 [
1950 'columns' => [
1951 'field_1' => [
1952 'config' => [
1953 'type' => 'flex',
1954 'ds' => [
1955 'sheets' => [
1956 'sheet.1' => [
1957 'ROOT' => [
1958 'el' => [
1959 'flexField_1' => [],
1960 'section_1' => [
1961 'type' => 'array',
1962 'section' => 1,
1963 'children' => [
1964 '1' => [
1965 'el' => [
1966 'containerField_1' => [
1967 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1968 ],
1969 ],
1970 ],
1971 ],
1972 ],
1973 ],
1974 ],
1975 ],
1976 ],
1977 ],
1978 ],
1979 ],
1980 ],
1981 ],
1982 ],
1983
1984 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex field name' => [
1985 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1986 [
1987 'field_1' => [
1988 'data' => [
1989 'sheet_1' => [
1990 'lDEF' => [
1991 'flexField.1' => [
1992 'vDEF' => [
1993 0 => 'foo',
1994 ],
1995 ],
1996 'section_1' => [
1997 'el' => [
1998 '1' => [],
1999 ],
2000 ],
2001 ],
2002 ],
2003 ],
2004 ],
2005 ],
2006 [
2007 'columns' => [
2008 'field_1' => [
2009 'config' => [
2010 'type' => 'flex',
2011 'ds' => [
2012 'sheets' => [
2013 'sheet_1' => [
2014 'ROOT' => [
2015 'el' => [
2016 'flexField.1' => [],
2017 'section_1' => [
2018 'type' => 'array',
2019 'section' => 1,
2020 'children' => [
2021 '1' => [
2022 'el' => [
2023 'containerField_1' => [
2024 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
2025 ],
2026 ],
2027 ],
2028 ],
2029 ],
2030 ],
2031 ],
2032 ],
2033 ],
2034 ],
2035 ],
2036 ],
2037 ],
2038 ],
2039 ],
2040
2041 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name and dot in flex field name' => [
2042 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
2043 [
2044 'field_1' => [
2045 'data' => [
2046 'sheet.1' => [
2047 'lDEF' => [
2048 'flexField.1' => [
2049 'vDEF' => [
2050 0 => 'foo',
2051 ],
2052 ],
2053 'section_1' => [
2054 'el' => [
2055 '1' => [],
2056 ],
2057 ],
2058 ],
2059 ],
2060 ],
2061 ],
2062 ],
2063 [
2064 'columns' => [
2065 'field_1' => [
2066 'config' => [
2067 'type' => 'flex',
2068 'ds' => [
2069 'sheets' => [
2070 'sheet.1' => [
2071 'ROOT' => [
2072 'el' => [
2073 'flexField.1' => [],
2074 'section_1' => [
2075 'type' => 'array',
2076 'section' => 1,
2077 'children' => [
2078 '1' => [
2079 'el' => [
2080 'containerField_1' => [
2081 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
2082 ],
2083 ],
2084 ],
2085 ],
2086 ],
2087 ],
2088 ],
2089 ],
2090 ],
2091 ],
2092 ],
2093 ],
2094 ],
2095 ],
2096 ],
2097
2098 // flex section container field to flex field value of other sheet
2099 'remove flex section container field by flex field value on other flex sheet' => [
2100 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2101 [
2102 'field_1' => [
2103 'data' => [
2104 'sheet_1' => [
2105 'lDEF' => [
2106 'flexField_1' => [
2107 'vDEF' => [
2108 0 => 'foo',
2109 ],
2110 ],
2111 ],
2112 ],
2113 'sheet_2' => [
2114 'lDEF' => [
2115 'section_1' => [
2116 'el' => [
2117 '1' => [],
2118 ],
2119 ],
2120 ],
2121 ],
2122 ],
2123 ],
2124 ],
2125 [
2126 'columns' => [
2127 'field_1' => [
2128 'config' => [
2129 'type' => 'flex',
2130 'ds' => [
2131 'sheets' => [
2132 'sheet_1' => [
2133 'ROOT' => [
2134 'el' => [
2135 'flexField_1' => [],
2136 ],
2137 ],
2138 ],
2139 'sheet_2' => [
2140 'ROOT' => [
2141 'el' => [
2142 'section_1' => [
2143 'type' => 'array',
2144 'section' => 1,
2145 'children' => [
2146 '1' => [
2147 'el' => [
2148 'containerField_1' => [
2149 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
2150 ],
2151 ],
2152 ],
2153 ],
2154 ],
2155 ],
2156 ],
2157 ],
2158 ],
2159 ],
2160 ],
2161 ],
2162 ],
2163 ],
2164 ],
2165
2166 'remove flex section container field by flex field value on other flex sheet with dot in flex sheet name' => [
2167 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2168 [
2169 'field_1' => [
2170 'data' => [
2171 'sheet.1' => [
2172 'lDEF' => [
2173 'flexField_1' => [
2174 'vDEF' => [
2175 0 => 'foo',
2176 ],
2177 ],
2178 ],
2179 ],
2180 'sheet_2' => [
2181 'lDEF' => [
2182 'section_1' => [
2183 'el' => [
2184 '1' => [],
2185 ],
2186 ],
2187 ],
2188 ],
2189 ],
2190 ],
2191 ],
2192 [
2193 'columns' => [
2194 'field_1' => [
2195 'config' => [
2196 'type' => 'flex',
2197 'ds' => [
2198 'sheets' => [
2199 'sheet.1' => [
2200 'ROOT' => [
2201 'el' => [
2202 'flexField_1' => [],
2203 ],
2204 ],
2205 ],
2206 'sheet_2' => [
2207 'ROOT' => [
2208 'el' => [
2209 'section_1' => [
2210 'type' => 'array',
2211 'section' => 1,
2212 'children' => [
2213 '1' => [
2214 'el' => [
2215 'containerField_1' => [
2216 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
2217 ],
2218 ],
2219 ],
2220 ],
2221 ],
2222 ],
2223 ],
2224 ],
2225 ],
2226 ],
2227 ],
2228 ],
2229 ],
2230 ],
2231 ],
2232
2233 'remove flex section container field by flex field value on other flex sheet with dot in flex field name' => [
2234 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2235 [
2236 'field_1' => [
2237 'data' => [
2238 'sheet_1' => [
2239 'lDEF' => [
2240 'flexField.1' => [
2241 'vDEF' => [
2242 0 => 'foo',
2243 ],
2244 ],
2245 ],
2246 ],
2247 'sheet_2' => [
2248 'lDEF' => [
2249 'section_1' => [
2250 'el' => [
2251 '1' => [],
2252 ],
2253 ],
2254 ],
2255 ],
2256 ],
2257 ],
2258 ],
2259 [
2260 'columns' => [
2261 'field_1' => [
2262 'config' => [
2263 'type' => 'flex',
2264 'ds' => [
2265 'sheets' => [
2266 'sheet_1' => [
2267 'ROOT' => [
2268 'el' => [
2269 'flexField.1' => [],
2270 ],
2271 ],
2272 ],
2273 'sheet_2' => [
2274 'ROOT' => [
2275 'el' => [
2276 'section_1' => [
2277 'type' => 'array',
2278 'section' => 1,
2279 'children' => [
2280 '1' => [
2281 'el' => [
2282 'containerField_1' => [
2283 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
2284 ],
2285 ],
2286 ],
2287 ],
2288 ],
2289 ],
2290 ],
2291 ],
2292 ],
2293 ],
2294 ],
2295 ],
2296 ],
2297 ],
2298 ],
2299
2300 'remove flex section container field by flex field value on other flex sheet with dot in flex sheet name and dot in flex field name' => [
2301 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2302 [
2303 'field_1' => [
2304 'data' => [
2305 'sheet.1' => [
2306 'lDEF' => [
2307 'flexField.1' => [
2308 'vDEF' => [
2309 0 => 'foo',
2310 ],
2311 ],
2312 ],
2313 ],
2314 'sheet_2' => [
2315 'lDEF' => [
2316 'section_1' => [
2317 'el' => [
2318 '1' => [],
2319 ],
2320 ],
2321 ],
2322 ],
2323 ],
2324 ],
2325 ],
2326 [
2327 'columns' => [
2328 'field_1' => [
2329 'config' => [
2330 'type' => 'flex',
2331 'ds' => [
2332 'sheets' => [
2333 'sheet.1' => [
2334 'ROOT' => [
2335 'el' => [
2336 'flexField.1' => [],
2337 ],
2338 ],
2339 ],
2340 'sheet_2' => [
2341 'ROOT' => [
2342 'el' => [
2343 'section_1' => [
2344 'type' => 'array',
2345 'section' => 1,
2346 'children' => [
2347 '1' => [
2348 'el' => [
2349 'containerField_1' => [
2350 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
2351 ],
2352 ],
2353 ],
2354 ],
2355 ],
2356 ],
2357 ],
2358 ],
2359 ],
2360 ],
2361 ],
2362 ],
2363 ],
2364 ],
2365 ],
2366
2367 // flex section container field to flex field value of same container
2368 'remove flex section container field by flex container field value of same container' => [
2369 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2370 [
2371 'field_1' => [
2372 'data' => [
2373 'sheet_1' => [
2374 'lDEF' => [
2375 'section_1' => [
2376 'el' => [
2377 '1' => [
2378 'container_1' => [
2379 'el' => [
2380 'containerField_1' => [
2381 'vDEF' => 'foo',
2382 ],
2383 ],
2384 ],
2385 ],
2386 ],
2387 ],
2388 ],
2389 ],
2390 ],
2391 ],
2392 ],
2393 [
2394 'columns' => [
2395 'field_1' => [
2396 'config' => [
2397 'type' => 'flex',
2398 'ds' => [
2399 'sheets' => [
2400 'sheet_1' => [
2401 'ROOT' => [
2402 'el' => [
2403 'section_1' => [
2404 'type' => 'array',
2405 'section' => 1,
2406 'children' => [
2407 '1' => [
2408 'el' => [
2409 'containerField_1' => [],
2410 'containerField_2' => [
2411 'displayCond' => 'FIELD:containerField_1:!=:foo',
2412 ],
2413 ],
2414 ],
2415 ],
2416 ],
2417 ],
2418 ],
2419 ],
2420 ],
2421 ],
2422 ],
2423 ],
2424 ],
2425 ],
2426 ],
2427
2428 'remove flex section container field by flex container field value of same container with dot in flex sheet name' => [
2429 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2430 [
2431 'field_1' => [
2432 'data' => [
2433 'sheet.1' => [
2434 'lDEF' => [
2435 'section_1' => [
2436 'el' => [
2437 '1' => [
2438 'container_1' => [
2439 'el' => [
2440 'containerField_1' => [
2441 'vDEF' => 'foo',
2442 ],
2443 ],
2444 ],
2445 ],
2446 ],
2447 ],
2448 ],
2449 ],
2450 ],
2451 ],
2452 ],
2453 [
2454 'columns' => [
2455 'field_1' => [
2456 'config' => [
2457 'type' => 'flex',
2458 'ds' => [
2459 'sheets' => [
2460 'sheet.1' => [
2461 'ROOT' => [
2462 'el' => [
2463 'section_1' => [
2464 'type' => 'array',
2465 'section' => 1,
2466 'children' => [
2467 '1' => [
2468 'el' => [
2469 'containerField_1' => [],
2470 'containerField_2' => [
2471 'displayCond' => 'FIELD:containerField_1:!=:foo',
2472 ],
2473 ],
2474 ],
2475 ],
2476 ],
2477 ],
2478 ],
2479 ],
2480 ],
2481 ],
2482 ],
2483 ],
2484 ],
2485 ],
2486 ],
2487
2488 'remove flex section container field by flex container field value of same container with dot in container flex field name' => [
2489 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2490 [
2491 'field_1' => [
2492 'data' => [
2493 'sheet_1' => [
2494 'lDEF' => [
2495 'section_1' => [
2496 'el' => [
2497 '1' => [
2498 'container_1' => [
2499 'el' => [
2500 'containerField.1' => [
2501 'vDEF' => 'foo',
2502 ],
2503 ],
2504 ],
2505 ],
2506 ],
2507 ],
2508 ],
2509 ],
2510 ],
2511 ],
2512 ],
2513 [
2514 'columns' => [
2515 'field_1' => [
2516 'config' => [
2517 'type' => 'flex',
2518 'ds' => [
2519 'sheets' => [
2520 'sheet_1' => [
2521 'ROOT' => [
2522 'el' => [
2523 'section_1' => [
2524 'type' => 'array',
2525 'section' => 1,
2526 'children' => [
2527 '1' => [
2528 'el' => [
2529 'containerField.1' => [],
2530 'containerField_2' => [
2531 'displayCond' => 'FIELD:containerField.1:!=:foo',
2532 ],
2533 ],
2534 ],
2535 ],
2536 ],
2537 ],
2538 ],
2539 ],
2540 ],
2541 ],
2542 ],
2543 ],
2544 ],
2545 ],
2546 ],
2547
2548 'remove flex section container field by flex container field value of same container with dot in flex sheet name and dot in container flex field name' => [
2549 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2550 [
2551 'field_1' => [
2552 'data' => [
2553 'sheet.1' => [
2554 'lDEF' => [
2555 'section_1' => [
2556 'el' => [
2557 '1' => [
2558 'container_1' => [
2559 'el' => [
2560 'containerField.1' => [
2561 'vDEF' => 'foo',
2562 ],
2563 ],
2564 ],
2565 ],
2566 ],
2567 ],
2568 ],
2569 ],
2570 ],
2571 ],
2572 ],
2573 [
2574 'columns' => [
2575 'field_1' => [
2576 'config' => [
2577 'type' => 'flex',
2578 'ds' => [
2579 'sheets' => [
2580 'sheet.1' => [
2581 'ROOT' => [
2582 'el' => [
2583 'section_1' => [
2584 'type' => 'array',
2585 'section' => 1,
2586 'children' => [
2587 '1' => [
2588 'el' => [
2589 'containerField.1' => [],
2590 'containerField_2' => [
2591 'displayCond' => 'FIELD:containerField.1:!=:foo',
2592 ],
2593 ],
2594 ],
2595 ],
2596 ],
2597 ],
2598 ],
2599 ],
2600 ],
2601 ],
2602 ],
2603 ],
2604 ],
2605 ],
2606 ],
2607
2608 'remove flex section container field by flex container field value of same container with specified flex sheet name' => [
2609 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2610 [
2611 'field_1' => [
2612 'data' => [
2613 'sheet_1' => [
2614 'lDEF' => [
2615 'section_1' => [
2616 'el' => [
2617 '1' => [
2618 'container_1' => [
2619 'el' => [
2620 'containerField_1' => [
2621 'vDEF' => 'foo',
2622 ],
2623 ],
2624 ],
2625 ],
2626 ],
2627 ],
2628 ],
2629 ],
2630 ],
2631 ],
2632 ],
2633 [
2634 'columns' => [
2635 'field_1' => [
2636 'config' => [
2637 'type' => 'flex',
2638 'ds' => [
2639 'sheets' => [
2640 'sheet_1' => [
2641 'ROOT' => [
2642 'el' => [
2643 'section_1' => [
2644 'type' => 'array',
2645 'section' => 1,
2646 'children' => [
2647 '1' => [
2648 'el' => [
2649 'containerField_1' => [],
2650 'containerField_2' => [
2651 'displayCond' => 'FIELD:sheet_1.containerField_1:!=:foo',
2652 ],
2653 ],
2654 ],
2655 ],
2656 ],
2657 ],
2658 ],
2659 ],
2660 ],
2661 ],
2662 ],
2663 ],
2664 ],
2665 ],
2666 ],
2667
2668 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in flex sheet name' => [
2669 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2670 [
2671 'field_1' => [
2672 'data' => [
2673 'sheet.1' => [
2674 'lDEF' => [
2675 'section_1' => [
2676 'el' => [
2677 '1' => [
2678 'container_1' => [
2679 'el' => [
2680 'containerField_1' => [
2681 'vDEF' => 'foo',
2682 ],
2683 ],
2684 ],
2685 ],
2686 ],
2687 ],
2688 ],
2689 ],
2690 ],
2691 ],
2692 ],
2693 [
2694 'columns' => [
2695 'field_1' => [
2696 'config' => [
2697 'type' => 'flex',
2698 'ds' => [
2699 'sheets' => [
2700 'sheet.1' => [
2701 'ROOT' => [
2702 'el' => [
2703 'section_1' => [
2704 'type' => 'array',
2705 'section' => 1,
2706 'children' => [
2707 '1' => [
2708 'el' => [
2709 'containerField_1' => [],
2710 'containerField_2' => [
2711 'displayCond' => 'FIELD:sheet.1.containerField_1:!=:foo',
2712 ],
2713 ],
2714 ],
2715 ],
2716 ],
2717 ],
2718 ],
2719 ],
2720 ],
2721 ],
2722 ],
2723 ],
2724 ],
2725 ],
2726 ],
2727
2728 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in container flex field name' => [
2729 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2730 [
2731 'field_1' => [
2732 'data' => [
2733 'sheet_1' => [
2734 'lDEF' => [
2735 'section_1' => [
2736 'el' => [
2737 '1' => [
2738 'container_1' => [
2739 'el' => [
2740 'containerField.1' => [
2741 'vDEF' => 'foo',
2742 ],
2743 ],
2744 ],
2745 ],
2746 ],
2747 ],
2748 ],
2749 ],
2750 ],
2751 ],
2752 ],
2753 [
2754 'columns' => [
2755 'field_1' => [
2756 'config' => [
2757 'type' => 'flex',
2758 'ds' => [
2759 'sheets' => [
2760 'sheet_1' => [
2761 'ROOT' => [
2762 'el' => [
2763 'section_1' => [
2764 'type' => 'array',
2765 'section' => 1,
2766 'children' => [
2767 '1' => [
2768 'el' => [
2769 'containerField.1' => [],
2770 'containerField_2' => [
2771 'displayCond' => 'FIELD:sheet_1.containerField.1:!=:foo',
2772 ],
2773 ],
2774 ],
2775 ],
2776 ],
2777 ],
2778 ],
2779 ],
2780 ],
2781 ],
2782 ],
2783 ],
2784 ],
2785 ],
2786 ],
2787
2788 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in flex sheet name and dot in container flex field name' => [
2789 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2790 [
2791 'field_1' => [
2792 'data' => [
2793 'sheet.1' => [
2794 'lDEF' => [
2795 'section_1' => [
2796 'el' => [
2797 '1' => [
2798 'container_1' => [
2799 'el' => [
2800 'containerField.1' => [
2801 'vDEF' => 'foo',
2802 ],
2803 ],
2804 ],
2805 ],
2806 ],
2807 ],
2808 ],
2809 ],
2810 ],
2811 ],
2812 ],
2813 [
2814 'columns' => [
2815 'field_1' => [
2816 'config' => [
2817 'type' => 'flex',
2818 'ds' => [
2819 'sheets' => [
2820 'sheet.1' => [
2821 'ROOT' => [
2822 'el' => [
2823 'section_1' => [
2824 'type' => 'array',
2825 'section' => 1,
2826 'children' => [
2827 '1' => [
2828 'el' => [
2829 'containerField.1' => [],
2830 'containerField_2' => [
2831 'displayCond' => 'FIELD:sheet.1.containerField.1:!=:foo',
2832 ],
2833 ],
2834 ],
2835 ],
2836 ],
2837 ],
2838 ],
2839 ],
2840 ],
2841 ],
2842 ],
2843 ],
2844 ],
2845 ],
2846 ],
2847
2848 // flex section container field to flex field value of same container with naming clash to flex field value of same sheet
2849 'remove flex section container field by flex container field value of same container with naming clash' => [
2850 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
2851 [
2852 'field_1' => [
2853 'data' => [
2854 'sheet_1' => [
2855 'lDEF' => [
2856 'field_1' => [
2857 'vDEF' => [
2858 0 => 'bar',
2859 ],
2860 ],
2861 'section_1' => [
2862 'el' => [
2863 '1' => [
2864 'container_1' => [
2865 'el' => [
2866 'field_1' => [
2867 'vDEF' => 'foo',
2868 ],
2869 ],
2870 ],
2871 ],
2872 ],
2873 ],
2874 ],
2875 ],
2876 ],
2877 ],
2878 ],
2879 [
2880 'columns' => [
2881 'field_1' => [
2882 'config' => [
2883 'type' => 'flex',
2884 'ds' => [
2885 'sheets' => [
2886 'sheet_1' => [
2887 'ROOT' => [
2888 'el' => [
2889 'section_1' => [
2890 'type' => 'array',
2891 'section' => 1,
2892 'children' => [
2893 '1' => [
2894 'el' => [
2895 'field_1' => [],
2896 'field_2' => [
2897 'displayCond' => 'FIELD:field_1:!=:foo',
2898 ],
2899 ],
2900 ],
2901 ],
2902 ],
2903 ],
2904 ],
2905 ],
2906 ],
2907 ],
2908 ],
2909 ],
2910 ],
2911 ],
2912 ],
2913
2914 'remove flex section container field by flex container field value of same container with naming clash with dot in flex sheet name' => [
2915 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
2916 [
2917 'field_1' => [
2918 'data' => [
2919 'sheet.1' => [
2920 'lDEF' => [
2921 'field_1' => [
2922 'vDEF' => [
2923 0 => 'bar',
2924 ],
2925 ],
2926 'section_1' => [
2927 'el' => [
2928 '1' => [
2929 'container_1' => [
2930 'el' => [
2931 'field_1' => [
2932 'vDEF' => 'foo',
2933 ],
2934 ],
2935 ],
2936 ],
2937 ],
2938 ],
2939 ],
2940 ],
2941 ],
2942 ],
2943 ],
2944 [
2945 'columns' => [
2946 'field_1' => [
2947 'config' => [
2948 'type' => 'flex',
2949 'ds' => [
2950 'sheets' => [
2951 'sheet.1' => [
2952 'ROOT' => [
2953 'el' => [
2954 'section_1' => [
2955 'type' => 'array',
2956 'section' => 1,
2957 'children' => [
2958 '1' => [
2959 'el' => [
2960 'field_1' => [],
2961 'field_2' => [
2962 'displayCond' => 'FIELD:field_1:!=:foo',
2963 ],
2964 ],
2965 ],
2966 ],
2967 ],
2968 ],
2969 ],
2970 ],
2971 ],
2972 ],
2973 ],
2974 ],
2975 ],
2976 ],
2977 ],
2978
2979 'remove flex section container field by flex container field value of same container with naming clash with dot in flex field name' => [
2980 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
2981 [
2982 'field_1' => [
2983 'data' => [
2984 'sheet_1' => [
2985 'lDEF' => [
2986 'field.1' => [
2987 'vDEF' => [
2988 0 => 'bar',
2989 ],
2990 ],
2991 'section_1' => [
2992 'el' => [
2993 '1' => [
2994 'container_1' => [
2995 'el' => [
2996 'field.1' => [
2997 'vDEF' => 'foo',
2998 ],
2999 ],
3000 ],
3001 ],
3002 ],
3003 ],
3004 ],
3005 ],
3006 ],
3007 ],
3008 ],
3009 [
3010 'columns' => [
3011 'field_1' => [
3012 'config' => [
3013 'type' => 'flex',
3014 'ds' => [
3015 'sheets' => [
3016 'sheet_1' => [
3017 'ROOT' => [
3018 'el' => [
3019 'section_1' => [
3020 'type' => 'array',
3021 'section' => 1,
3022 'children' => [
3023 '1' => [
3024 'el' => [
3025 'field.1' => [],
3026 'field_2' => [
3027 'displayCond' => 'FIELD:field.1:!=:foo',
3028 ],
3029 ],
3030 ],
3031 ],
3032 ],
3033 ],
3034 ],
3035 ],
3036 ],
3037 ],
3038 ],
3039 ],
3040 ],
3041 ],
3042 ],
3043
3044 'remove flex section container field by flex container field value of same container with naming clash with dot in flex sheet name and dot in flex field name' => [
3045 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
3046 [
3047 'field_1' => [
3048 'data' => [
3049 'sheet.1' => [
3050 'lDEF' => [
3051 'field.1' => [
3052 'vDEF' => [
3053 0 => 'bar',
3054 ],
3055 ],
3056 'section_1' => [
3057 'el' => [
3058 '1' => [
3059 'container_1' => [
3060 'el' => [
3061 'field.1' => [
3062 'vDEF' => 'foo',
3063 ],
3064 ],
3065 ],
3066 ],
3067 ],
3068 ],
3069 ],
3070 ],
3071 ],
3072 ],
3073 ],
3074 [
3075 'columns' => [
3076 'field_1' => [
3077 'config' => [
3078 'type' => 'flex',
3079 'ds' => [
3080 'sheets' => [
3081 'sheet.1' => [
3082 'ROOT' => [
3083 'el' => [
3084 'section_1' => [
3085 'type' => 'array',
3086 'section' => 1,
3087 'children' => [
3088 '1' => [
3089 'el' => [
3090 'field.1' => [],
3091 'field_2' => [
3092 'displayCond' => 'FIELD:field.1:!=:foo',
3093 ],
3094 ],
3095 ],
3096 ],
3097 ],
3098 ],
3099 ],
3100 ],
3101 ],
3102 ],
3103 ],
3104 ],
3105 ],
3106 ],
3107 ],
3108
3109 'remove flex section container field by flex container field value of same container with naming clash with specified flex sheet name' => [
3110 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
3111 [
3112 'field_1' => [
3113 'data' => [
3114 'sheet_1' => [
3115 'lDEF' => [
3116 'field_1' => [
3117 'vDEF' => [
3118 0 => 'bar',
3119 ],
3120 ],
3121 'section_1' => [
3122 'el' => [
3123 '1' => [
3124 'container_1' => [
3125 'el' => [
3126 'field_1' => [
3127 'vDEF' => 'foo',
3128 ],
3129 ],
3130 ],
3131 ],
3132 ],
3133 ],
3134 ],
3135 ],
3136 ],
3137 ],
3138 ],
3139 [
3140 'columns' => [
3141 'field_1' => [
3142 'config' => [
3143 'type' => 'flex',
3144 'ds' => [
3145 'sheets' => [
3146 'sheet_1' => [
3147 'ROOT' => [
3148 'el' => [
3149 'section_1' => [
3150 'type' => 'array',
3151 'section' => 1,
3152 'children' => [
3153 '1' => [
3154 'el' => [
3155 'field_1' => [],
3156 'field_2' => [
3157 'displayCond' => 'FIELD:sheet_1.field_1:!=:foo',
3158 ],
3159 ],
3160 ],
3161 ],
3162 ],
3163 ],
3164 ],
3165 ],
3166 ],
3167 ],
3168 ],
3169 ],
3170 ],
3171 ],
3172 ],
3173
3174 'remove flex section container field by flex container field value of same container with naming clash with specified flex sheet name with dot in flex sheet name' => [
3175 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
3176 [
3177 'field_1' => [
3178 'data' => [