@maif/react-forms 1.0.54 → 1.0.57
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/README.md +41 -9
- package/lib/esm/index.js +182 -418
- package/lib/index.css +360 -0
- package/lib/index.js +182 -417
- package/package.json +4 -6
package/lib/index.js
CHANGED
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('fs');
|
|
5
6
|
var yup = require('yup');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var yup$1 = require('@hookform/resolvers/yup');
|
|
8
9
|
var classNames = require('classnames');
|
|
10
|
+
var deepEqual = require('fast-deep-equal');
|
|
9
11
|
var reactFeather = require('react-feather');
|
|
10
12
|
var reactHookForm = require('react-hook-form');
|
|
11
13
|
var reactRainbowComponents = require('react-rainbow-components');
|
|
12
14
|
var ReactToolTip = require('react-tooltip');
|
|
13
15
|
var uuid = require('uuid');
|
|
14
|
-
var reactJss = require('react-jss');
|
|
15
16
|
var CreatableSelect = require('react-select/creatable');
|
|
16
17
|
var Select = require('react-select');
|
|
17
|
-
var
|
|
18
|
+
var hash$1 = require('object-hash');
|
|
18
19
|
var showdown = require('showdown');
|
|
19
20
|
require('@fortawesome/fontawesome-free/css/all.css');
|
|
20
21
|
require('highlight.js/styles/monokai.css');
|
|
@@ -43,10 +44,11 @@ function _interopNamespace(e) {
|
|
|
43
44
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
44
45
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
45
46
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
47
|
+
var deepEqual__default = /*#__PURE__*/_interopDefaultLegacy(deepEqual);
|
|
46
48
|
var ReactToolTip__default = /*#__PURE__*/_interopDefaultLegacy(ReactToolTip);
|
|
47
49
|
var CreatableSelect__default = /*#__PURE__*/_interopDefaultLegacy(CreatableSelect);
|
|
48
50
|
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
|
49
|
-
var
|
|
51
|
+
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash$1);
|
|
50
52
|
var showdown__default = /*#__PURE__*/_interopDefaultLegacy(showdown);
|
|
51
53
|
var hljs__default = /*#__PURE__*/_interopDefaultLegacy(hljs);
|
|
52
54
|
|
|
@@ -108,7 +110,8 @@ var _matches = function matches() {
|
|
|
108
110
|
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "This field does not match the pattern";
|
|
109
111
|
return function (r) {
|
|
110
112
|
return r.matches(regexp, {
|
|
111
|
-
message: message
|
|
113
|
+
message: message,
|
|
114
|
+
excludeEmptyString: true
|
|
112
115
|
});
|
|
113
116
|
};
|
|
114
117
|
}; //string & number
|
|
@@ -249,7 +252,7 @@ var _oneOf = function oneOf(arrayOfValues) {
|
|
|
249
252
|
return function (r) {
|
|
250
253
|
return r.oneOf(arrayOfValues.map(maybeRef), message);
|
|
251
254
|
};
|
|
252
|
-
};
|
|
255
|
+
}; //todo: rename by notOneOf
|
|
253
256
|
|
|
254
257
|
var _blacklist = function blacklist(arrayOfValues) {
|
|
255
258
|
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "This value can't include the following values ".concat(arrayOfValues.join(', '));
|
|
@@ -565,279 +568,12 @@ function _nonIterableRest() {
|
|
|
565
568
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
566
569
|
}
|
|
567
570
|
|
|
568
|
-
var _switch_button_on, _style;
|
|
569
|
-
|
|
570
|
-
var buttonOutline = function buttonOutline(color, darker) {
|
|
571
|
-
return {
|
|
572
|
-
color: color,
|
|
573
|
-
borderColor: color,
|
|
574
|
-
"&:hover": {
|
|
575
|
-
color: '#fff',
|
|
576
|
-
backgroundColor: color,
|
|
577
|
-
borderColor: darker
|
|
578
|
-
},
|
|
579
|
-
"&.active": {
|
|
580
|
-
color: '#fff',
|
|
581
|
-
backgroundColor: color,
|
|
582
|
-
borderColor: darker
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
var style = (_style = {
|
|
588
|
-
input: {
|
|
589
|
-
display: "block",
|
|
590
|
-
width: "100%",
|
|
591
|
-
padding: "8px 12px",
|
|
592
|
-
fontSize: "1rem",
|
|
593
|
-
color: "#495057",
|
|
594
|
-
border: "1px solid #ced4da",
|
|
595
|
-
borderRadius: 4,
|
|
596
|
-
"&[readonly]": {
|
|
597
|
-
backgroundColor: "#e9ecef",
|
|
598
|
-
opacity: 1
|
|
599
|
-
}
|
|
600
|
-
},
|
|
601
|
-
btn: {
|
|
602
|
-
borderRadius: 5,
|
|
603
|
-
padding: 10,
|
|
604
|
-
fontSize: "1rem",
|
|
605
|
-
cursor: "pointer",
|
|
606
|
-
borderWidth: '1px',
|
|
607
|
-
backgroundColor: '#fff',
|
|
608
|
-
'&:disabled': {
|
|
609
|
-
opacity: .6,
|
|
610
|
-
cursor: 'not-allowed'
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
|
-
btn_sm: {
|
|
614
|
-
fontSize: "0.875rem",
|
|
615
|
-
padding: ".25rem .5rem",
|
|
616
|
-
lineHeight: "1.5",
|
|
617
|
-
borderRadius: ".2rem"
|
|
618
|
-
},
|
|
619
|
-
btn_group: {
|
|
620
|
-
"& > button:not(:last-child)": {
|
|
621
|
-
borderTopRightRadius: 0,
|
|
622
|
-
borderBottomRightRadius: 0
|
|
623
|
-
},
|
|
624
|
-
"& > button:not(:first-child)": {
|
|
625
|
-
borderTopLeftRadius: 0,
|
|
626
|
-
borderBottomLeftRadius: 0
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
btn_red: buttonOutline("#dc3545", "#bd2130"),
|
|
630
|
-
btn_green: buttonOutline("#28a745", "#1e7e34"),
|
|
631
|
-
btn_blue: buttonOutline("#007bff", "#0069d9"),
|
|
632
|
-
btn_grey: buttonOutline("#6c757d", "#5c636a"),
|
|
633
|
-
txt_red: {
|
|
634
|
-
color: "#dc3545"
|
|
635
|
-
},
|
|
636
|
-
ml_5: {
|
|
637
|
-
marginLeft: 5
|
|
638
|
-
},
|
|
639
|
-
ml_10: {
|
|
640
|
-
marginLeft: 10
|
|
641
|
-
},
|
|
642
|
-
mr_5: {
|
|
643
|
-
marginRight: 5
|
|
644
|
-
},
|
|
645
|
-
mr_10: {
|
|
646
|
-
marginRight: 10
|
|
647
|
-
},
|
|
648
|
-
mt_5: {
|
|
649
|
-
marginTop: 5
|
|
650
|
-
},
|
|
651
|
-
mt_10: {
|
|
652
|
-
marginTop: 10
|
|
653
|
-
},
|
|
654
|
-
mt_20: {
|
|
655
|
-
marginTop: 20
|
|
656
|
-
},
|
|
657
|
-
mb_5: {
|
|
658
|
-
marginBottom: 5
|
|
659
|
-
},
|
|
660
|
-
mb_10: {
|
|
661
|
-
marginBottom: 10
|
|
662
|
-
},
|
|
663
|
-
mb_20: {
|
|
664
|
-
marginBottom: 20
|
|
665
|
-
},
|
|
666
|
-
pt_15: {
|
|
667
|
-
paddingTop: 15
|
|
668
|
-
},
|
|
669
|
-
p_15: {
|
|
670
|
-
padding: 15
|
|
671
|
-
},
|
|
672
|
-
pr_15: {
|
|
673
|
-
paddingRight: 15
|
|
674
|
-
},
|
|
675
|
-
w_100: {
|
|
676
|
-
width: '100%'
|
|
677
|
-
},
|
|
678
|
-
w_50: {
|
|
679
|
-
width: '50%'
|
|
680
|
-
},
|
|
681
|
-
d_none: {
|
|
682
|
-
display: "none"
|
|
683
|
-
},
|
|
684
|
-
flexWrap: {
|
|
685
|
-
flexWrap: 'wrap'
|
|
686
|
-
},
|
|
687
|
-
flex: {
|
|
688
|
-
display: "flex"
|
|
689
|
-
},
|
|
690
|
-
flexColumn: {
|
|
691
|
-
flexDirection: "column"
|
|
692
|
-
},
|
|
693
|
-
flex_grow_1: {
|
|
694
|
-
flexGrow: 1
|
|
695
|
-
},
|
|
696
|
-
jc_between: {
|
|
697
|
-
justifyContent: "space-between"
|
|
698
|
-
},
|
|
699
|
-
jc_end: {
|
|
700
|
-
justifyContent: "end"
|
|
701
|
-
},
|
|
702
|
-
jc_flex_end: {
|
|
703
|
-
justifyContent: "flex-end"
|
|
704
|
-
},
|
|
705
|
-
jc_flex_start: {
|
|
706
|
-
justifyContent: "flex-start"
|
|
707
|
-
},
|
|
708
|
-
ac_center: {
|
|
709
|
-
alignContent: "center"
|
|
710
|
-
},
|
|
711
|
-
ai_center: {
|
|
712
|
-
alignItems: "center"
|
|
713
|
-
},
|
|
714
|
-
cursor_pointer: {
|
|
715
|
-
cursor: "pointer"
|
|
716
|
-
},
|
|
717
|
-
cursor_not_allowed: {
|
|
718
|
-
cursor: "not-allowed"
|
|
719
|
-
},
|
|
720
|
-
collapse: {
|
|
721
|
-
display: "flex",
|
|
722
|
-
justifyContent: "space-between",
|
|
723
|
-
cursor: "pointer"
|
|
724
|
-
},
|
|
725
|
-
collapse_label: {
|
|
726
|
-
fontWeight: "bold",
|
|
727
|
-
marginTop: 7
|
|
728
|
-
}
|
|
729
|
-
}, _defineProperty$1(_style, "collapse_label", {
|
|
730
|
-
fontWeight: "bold",
|
|
731
|
-
marginTop: 7
|
|
732
|
-
}), _defineProperty$1(_style, "collapse_error", {
|
|
733
|
-
color: '#dc3545'
|
|
734
|
-
}), _defineProperty$1(_style, "datepicker", {
|
|
735
|
-
"& input": {
|
|
736
|
-
borderRadius: "4px"
|
|
737
|
-
}
|
|
738
|
-
}), _defineProperty$1(_style, "code", {}), _defineProperty$1(_style, "input__boolean__on", {
|
|
739
|
-
color: "MediumSeaGreen"
|
|
740
|
-
}), _defineProperty$1(_style, "input__boolean__off", {
|
|
741
|
-
color: "tomato"
|
|
742
|
-
}), _defineProperty$1(_style, "input__invalid", {
|
|
743
|
-
borderColor: '#dc3545 !important'
|
|
744
|
-
}), _defineProperty$1(_style, "feedback", {
|
|
745
|
-
width: "100%",
|
|
746
|
-
marginTop: ".25rem",
|
|
747
|
-
fontSize: "80%"
|
|
748
|
-
}), _defineProperty$1(_style, "display__none", {
|
|
749
|
-
display: "none"
|
|
750
|
-
}), _defineProperty$1(_style, "collapse__inline", {
|
|
751
|
-
"& .form-group+.form-group": {
|
|
752
|
-
marginLeft: '20px'
|
|
753
|
-
}
|
|
754
|
-
}), _defineProperty$1(_style, "nestedform__border", {
|
|
755
|
-
borderLeft: '2px solid lightGray',
|
|
756
|
-
paddingLeft: '0.5rem',
|
|
757
|
-
marginLeft: '0.5rem',
|
|
758
|
-
marginBottom: '.5rem',
|
|
759
|
-
paddingBottom: '1rem',
|
|
760
|
-
marginRight: '.5rem',
|
|
761
|
-
paddingRight: '2.5rem'
|
|
762
|
-
}), _defineProperty$1(_style, "border__error", {
|
|
763
|
-
borderColor: "#dc3545"
|
|
764
|
-
}), _defineProperty$1(_style, "btn_for_descriptionToolbar", {
|
|
765
|
-
textAlign: "left",
|
|
766
|
-
cursor: "pointer",
|
|
767
|
-
height: "22px",
|
|
768
|
-
padding: "4px",
|
|
769
|
-
border: "none",
|
|
770
|
-
background: "none",
|
|
771
|
-
color: "#242729",
|
|
772
|
-
marginRight: "5px",
|
|
773
|
-
marginLeft: "5px"
|
|
774
|
-
}), _defineProperty$1(_style, "content_switch_button_on", {
|
|
775
|
-
width: "35px",
|
|
776
|
-
height: "22px",
|
|
777
|
-
borderRadius: "20px",
|
|
778
|
-
display: "flex",
|
|
779
|
-
marginTop: "10px",
|
|
780
|
-
backgroundColor: "green",
|
|
781
|
-
border: "1px solid green",
|
|
782
|
-
justifyContent: "flex-end"
|
|
783
|
-
}), _defineProperty$1(_style, "content_switch_button_off", {
|
|
784
|
-
width: "35px",
|
|
785
|
-
height: "22px",
|
|
786
|
-
borderRadius: "20px",
|
|
787
|
-
display: "flex",
|
|
788
|
-
marginTop: "10px",
|
|
789
|
-
backgroundColor: "#dc3545",
|
|
790
|
-
border: "1px solid #dc3545",
|
|
791
|
-
justifyContent: "flex-start"
|
|
792
|
-
}), _defineProperty$1(_style, "content_switch_button_null", {
|
|
793
|
-
width: "35px",
|
|
794
|
-
height: "22px",
|
|
795
|
-
borderRadius: "20px",
|
|
796
|
-
display: "flex",
|
|
797
|
-
marginTop: "10px",
|
|
798
|
-
backgroundColor: "#fff",
|
|
799
|
-
border: "1px solid #dfdfdf",
|
|
800
|
-
justifyContent: "flex-start"
|
|
801
|
-
}), _defineProperty$1(_style, "switch_button_on", (_switch_button_on = {
|
|
802
|
-
backgroundColor: "#fff",
|
|
803
|
-
borderRadius: "20px",
|
|
804
|
-
cursor: "pointer",
|
|
805
|
-
width: "20px",
|
|
806
|
-
height: "20px"
|
|
807
|
-
}, _defineProperty$1(_switch_button_on, "backgroundColor", "#fff"), _defineProperty$1(_switch_button_on, "borderRadius", "20px"), _switch_button_on)), _defineProperty$1(_style, "switch_button_off", {
|
|
808
|
-
backgroundColor: "#fff",
|
|
809
|
-
borderRadius: "20px",
|
|
810
|
-
cursor: "pointer",
|
|
811
|
-
width: "20px",
|
|
812
|
-
height: "20px",
|
|
813
|
-
border: "1px solid #dfdfdf",
|
|
814
|
-
boxShadow: "1px 0px 5px 0px rgba(0, 0, 0, 0.3)"
|
|
815
|
-
}), _defineProperty$1(_style, "switch_button_null", {
|
|
816
|
-
backgroundColor: "#fff",
|
|
817
|
-
borderRadius: "20px",
|
|
818
|
-
cursor: "pointer",
|
|
819
|
-
width: "22px",
|
|
820
|
-
height: "22px",
|
|
821
|
-
marginTop: "-1px",
|
|
822
|
-
marginLeft: "-1px",
|
|
823
|
-
border: "1px solid #dfdfdf",
|
|
824
|
-
boxShadow: "1px 0px 5px 0px rgba(0, 0, 0, 0.3)"
|
|
825
|
-
}), _style);
|
|
826
|
-
|
|
827
|
-
var useCustomStyle = function useCustomStyle() {
|
|
828
|
-
var overrideStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
829
|
-
var useStyle = reactJss.createUseStyles(_objectSpread2$1(_objectSpread2$1({}, style), overrideStyle));
|
|
830
|
-
var classes = useStyle();
|
|
831
|
-
return classes;
|
|
832
|
-
};
|
|
833
|
-
|
|
834
571
|
var BooleanInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
835
572
|
var _classNames;
|
|
836
573
|
|
|
837
574
|
var onChange = _ref.onChange,
|
|
838
575
|
value = _ref.value,
|
|
839
576
|
readOnly = _ref.readOnly;
|
|
840
|
-
var classes = useCustomStyle();
|
|
841
577
|
|
|
842
578
|
var handleClick = function handleClick(value) {
|
|
843
579
|
if (!readOnly) {
|
|
@@ -846,28 +582,28 @@ var BooleanInput = /*#__PURE__*/React__default["default"].forwardRef(function (_
|
|
|
846
582
|
};
|
|
847
583
|
|
|
848
584
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
849
|
-
className: classNames__default["default"]((_classNames = {}, _defineProperty$1(_classNames,
|
|
585
|
+
className: classNames__default["default"]((_classNames = {}, _defineProperty$1(_classNames, 'cursor_pointer', !readOnly), _defineProperty$1(_classNames, 'cursor_not_allowed', readOnly), _classNames))
|
|
850
586
|
}, !!value && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
851
|
-
className: classNames__default["default"](
|
|
587
|
+
className: classNames__default["default"]('content_switch_button_on'),
|
|
852
588
|
onClick: function onClick() {
|
|
853
589
|
return handleClick(false);
|
|
854
590
|
}
|
|
855
591
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
856
|
-
className: classNames__default["default"](
|
|
592
|
+
className: classNames__default["default"]('switch_button_on')
|
|
857
593
|
})), !value && value !== null && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
858
|
-
className: classNames__default["default"](
|
|
594
|
+
className: classNames__default["default"]('content_switch_button_off'),
|
|
859
595
|
onClick: function onClick() {
|
|
860
596
|
return handleClick(true);
|
|
861
597
|
}
|
|
862
598
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
863
|
-
className: classNames__default["default"](
|
|
599
|
+
className: classNames__default["default"]('switch_button_off')
|
|
864
600
|
})), value === null && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
865
|
-
className: classNames__default["default"](
|
|
601
|
+
className: classNames__default["default"]('content_switch_button_null'),
|
|
866
602
|
onClick: function onClick() {
|
|
867
603
|
return handleClick(true);
|
|
868
604
|
}
|
|
869
605
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
870
|
-
className: classNames__default["default"](
|
|
606
|
+
className: classNames__default["default"]('switch_button_null')
|
|
871
607
|
})));
|
|
872
608
|
});
|
|
873
609
|
|
|
@@ -879,30 +615,28 @@ var Collapse = function Collapse(props) {
|
|
|
879
615
|
collapsed = _useState2[0],
|
|
880
616
|
setCollapsed = _useState2[1];
|
|
881
617
|
|
|
882
|
-
var classes = useCustomStyle();
|
|
883
|
-
|
|
884
618
|
var toggle = function toggle(e) {
|
|
885
619
|
if (e && e.preventDefault) e.stopPropagation();
|
|
886
620
|
setCollapsed(!collapsed);
|
|
887
621
|
};
|
|
888
622
|
|
|
889
623
|
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("hr", {
|
|
890
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
624
|
+
className: classNames__default["default"](_defineProperty$1({}, 'collapse_error', props.errored))
|
|
891
625
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
892
|
-
className: "
|
|
626
|
+
className: "cursor_pointer flex jc_between",
|
|
893
627
|
onClick: toggle
|
|
894
628
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
895
|
-
className: classNames__default["default"](
|
|
629
|
+
className: classNames__default["default"]('collapse_label', _defineProperty$1({}, 'collapse_error', props.errored))
|
|
896
630
|
}, props.label), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
897
631
|
type: "button",
|
|
898
|
-
className: classNames__default["default"](
|
|
632
|
+
className: classNames__default["default"]('btn', 'btn_sm', 'ml_5', _defineProperty$1({}, 'collapse_error', props.errored)),
|
|
899
633
|
onClick: toggle
|
|
900
634
|
}, !!collapsed && /*#__PURE__*/React__default["default"].createElement(reactFeather.Eye, {
|
|
901
635
|
size: 16
|
|
902
636
|
}), !collapsed && /*#__PURE__*/React__default["default"].createElement(reactFeather.EyeOff, {
|
|
903
637
|
size: 16
|
|
904
638
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
905
|
-
className: classNames__default["default"](
|
|
639
|
+
className: classNames__default["default"]('ml_10', (_classNames4 = {}, _defineProperty$1(_classNames4, 'display__none', !!collapsed), _defineProperty$1(_classNames4, 'flex', !!props.inline), _defineProperty$1(_classNames4, 'collapse__inline', !!props.inline), _classNames4))
|
|
906
640
|
}, props.children), props.lineEnd && /*#__PURE__*/React__default["default"].createElement("hr", null));
|
|
907
641
|
};
|
|
908
642
|
|
|
@@ -970,6 +704,28 @@ var arrayFlatten = function arrayFlatten(array) {
|
|
|
970
704
|
|
|
971
705
|
return array;
|
|
972
706
|
};
|
|
707
|
+
var isDefined = function isDefined(value) {
|
|
708
|
+
return value !== null && value !== undefined;
|
|
709
|
+
};
|
|
710
|
+
var useHashEffect = function useHashEffect(func, deps) {
|
|
711
|
+
var isFirst = React.useRef(true);
|
|
712
|
+
var prevDeps = React.useRef(deps);
|
|
713
|
+
React.useEffect(function () {
|
|
714
|
+
if (isFirst.current) {
|
|
715
|
+
func();
|
|
716
|
+
isFirst.current = false;
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
var depsHash = hash__default["default"](deps);
|
|
721
|
+
var prevDepsHash = hash__default["default"](prevDeps.current);
|
|
722
|
+
|
|
723
|
+
if (depsHash !== prevDepsHash) {
|
|
724
|
+
prevDeps.current = deps;
|
|
725
|
+
func();
|
|
726
|
+
}
|
|
727
|
+
}, [deps]);
|
|
728
|
+
};
|
|
973
729
|
|
|
974
730
|
var valueToSelectOption = function valueToSelectOption(value) {
|
|
975
731
|
var possibleValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -1004,7 +760,9 @@ var valueToSelectOption = function valueToSelectOption(value) {
|
|
|
1004
760
|
};
|
|
1005
761
|
|
|
1006
762
|
var SelectInput = /*#__PURE__*/React__default["default"].forwardRef(function (props, _) {
|
|
1007
|
-
var
|
|
763
|
+
var _useFormContext = reactHookForm.useFormContext(),
|
|
764
|
+
getValues = _useFormContext.getValues;
|
|
765
|
+
|
|
1008
766
|
var possibleValues = (props.possibleValues || []).map(function (v) {
|
|
1009
767
|
return props.transformer ? typeof props.transformer === 'function' ? props.transformer(v) : {
|
|
1010
768
|
label: v[props.transformer.label],
|
|
@@ -1043,9 +801,24 @@ var SelectInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
1043
801
|
|
|
1044
802
|
if (cond) {
|
|
1045
803
|
setLoading(true);
|
|
1046
|
-
var promise
|
|
1047
|
-
|
|
1048
|
-
|
|
804
|
+
var promise;
|
|
805
|
+
|
|
806
|
+
if (isPromise(props.optionsFrom)) {
|
|
807
|
+
promise = props.optionsFrom;
|
|
808
|
+
} else if (typeof props.optionsFrom === 'function') {
|
|
809
|
+
var result = props.optionsFrom({
|
|
810
|
+
rawValues: getValues(),
|
|
811
|
+
value: getValues(props.id)
|
|
812
|
+
});
|
|
813
|
+
promise = isPromise(result) ? result : props.httpClient(result, 'GET').then(function (r) {
|
|
814
|
+
return r.json();
|
|
815
|
+
});
|
|
816
|
+
} else {
|
|
817
|
+
promise = props.httpClient(props.optionsFrom, 'GET').then(function (r) {
|
|
818
|
+
return r.json();
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
|
|
1049
822
|
promise.then(function (values) {
|
|
1050
823
|
return values.map(function (x) {
|
|
1051
824
|
return props.transformer ? props.transformer(x) : valueToSelectOption(x, values, props.isMulti, props.transformer);
|
|
@@ -1115,7 +888,7 @@ var SelectInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
1115
888
|
key: idx,
|
|
1116
889
|
type: "button",
|
|
1117
890
|
disabled: props.disabled,
|
|
1118
|
-
className: classNames__default["default"](props.className,
|
|
891
|
+
className: classNames__default["default"](props.className, 'btn btn_grey ml_5', {
|
|
1119
892
|
active: active
|
|
1120
893
|
}),
|
|
1121
894
|
onClick: function onClick() {
|
|
@@ -1132,7 +905,6 @@ var SelectInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
1132
905
|
value: value,
|
|
1133
906
|
isDisabled: props.disabled,
|
|
1134
907
|
placeholder: props.placeholder,
|
|
1135
|
-
isClearable: true,
|
|
1136
908
|
onChange: onChange,
|
|
1137
909
|
options: values,
|
|
1138
910
|
onCreateOption: function onCreateOption(option) {
|
|
@@ -1147,7 +919,6 @@ var SelectInput = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
1147
919
|
name: "".concat(props.label, "-search"),
|
|
1148
920
|
isLoading: loading,
|
|
1149
921
|
value: value,
|
|
1150
|
-
isClearable: true,
|
|
1151
922
|
defaultValue: value,
|
|
1152
923
|
isDisabled: props.disabled,
|
|
1153
924
|
placeholder: props.placeholder,
|
|
@@ -1264,13 +1035,12 @@ var ObjectInput = function ObjectInput(props) {
|
|
|
1264
1035
|
onChange(newState);
|
|
1265
1036
|
};
|
|
1266
1037
|
|
|
1267
|
-
var classes = useCustomStyle();
|
|
1268
1038
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1269
1039
|
className: props.className
|
|
1270
1040
|
}, Object.keys(internalState || {}).length === 0 && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
1271
1041
|
disabled: props.disabled,
|
|
1272
1042
|
type: "button",
|
|
1273
|
-
className:
|
|
1043
|
+
className: "flex btn btn_blue btn_sm",
|
|
1274
1044
|
onClick: addFirst
|
|
1275
1045
|
}, /*#__PURE__*/React__default["default"].createElement(reactFeather.PlusCircle, null)), Object.entries(internalState || {}).map(function (_ref9, idx) {
|
|
1276
1046
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
@@ -1280,12 +1050,12 @@ var ObjectInput = function ObjectInput(props) {
|
|
|
1280
1050
|
value = _ref10$.value;
|
|
1281
1051
|
|
|
1282
1052
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1283
|
-
className:
|
|
1053
|
+
className: "flex mt_5",
|
|
1284
1054
|
key: idx
|
|
1285
1055
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
1286
1056
|
disabled: props.disabled,
|
|
1287
1057
|
type: "text",
|
|
1288
|
-
className:
|
|
1058
|
+
className: "w_50 input",
|
|
1289
1059
|
placeholder: props.placeholderKey,
|
|
1290
1060
|
value: key,
|
|
1291
1061
|
onChange: function onChange(e) {
|
|
@@ -1294,7 +1064,7 @@ var ObjectInput = function ObjectInput(props) {
|
|
|
1294
1064
|
}), /*#__PURE__*/React__default["default"].createElement("input", {
|
|
1295
1065
|
disabled: props.disabled,
|
|
1296
1066
|
type: "text",
|
|
1297
|
-
className:
|
|
1067
|
+
className: "w_50 input",
|
|
1298
1068
|
placeholder: props.placeholderValue,
|
|
1299
1069
|
value: value,
|
|
1300
1070
|
onChange: function onChange(e) {
|
|
@@ -1303,14 +1073,14 @@ var ObjectInput = function ObjectInput(props) {
|
|
|
1303
1073
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
1304
1074
|
disabled: props.disabled,
|
|
1305
1075
|
type: "button",
|
|
1306
|
-
className:
|
|
1076
|
+
className: "flex btn btn_red btn_sm ml_10",
|
|
1307
1077
|
onClick: function onClick() {
|
|
1308
1078
|
return remove(id);
|
|
1309
1079
|
}
|
|
1310
1080
|
}, /*#__PURE__*/React__default["default"].createElement(reactFeather.MinusCircle, null)), idx === Object.keys(internalState).length - 1 && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
1311
1081
|
disabled: props.disabled,
|
|
1312
1082
|
type: "button",
|
|
1313
|
-
className:
|
|
1083
|
+
className: "flex btn btn_blue btn_sm ml_5",
|
|
1314
1084
|
onClick: addNext
|
|
1315
1085
|
}, /*#__PURE__*/React__default["default"].createElement(reactFeather.PlusCircle, null)));
|
|
1316
1086
|
}));
|
|
@@ -28715,7 +28485,6 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28715
28485
|
};
|
|
28716
28486
|
|
|
28717
28487
|
var injectButtons = function injectButtons() {
|
|
28718
|
-
var classes = useCustomStyle();
|
|
28719
28488
|
return commands.map(function (command, idx) {
|
|
28720
28489
|
if (command.component) {
|
|
28721
28490
|
return command.component(idx);
|
|
@@ -28723,7 +28492,7 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28723
28492
|
|
|
28724
28493
|
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
28725
28494
|
type: "button",
|
|
28726
|
-
className: classNames__default["default"](
|
|
28495
|
+
className: classNames__default["default"]('btn_for_descriptionToolbar'),
|
|
28727
28496
|
"aria-label": command.name,
|
|
28728
28497
|
title: command.name,
|
|
28729
28498
|
key: "toolbar-btn-".concat(idx),
|
|
@@ -28751,7 +28520,6 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28751
28520
|
});
|
|
28752
28521
|
};
|
|
28753
28522
|
|
|
28754
|
-
var classes = useCustomStyle();
|
|
28755
28523
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
28756
28524
|
className: classNames__default["default"](props.className)
|
|
28757
28525
|
}, !props.readOnly && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -28760,7 +28528,7 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28760
28528
|
}
|
|
28761
28529
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
28762
28530
|
type: "button",
|
|
28763
|
-
className:
|
|
28531
|
+
className: "btn btn_sm",
|
|
28764
28532
|
style: {
|
|
28765
28533
|
color: !preview ? '#7f96af' : 'white',
|
|
28766
28534
|
backgroundColor: preview ? '#7f96af' : 'white'
|
|
@@ -28770,7 +28538,7 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28770
28538
|
}
|
|
28771
28539
|
}, "Write"), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
28772
28540
|
type: "button",
|
|
28773
|
-
className:
|
|
28541
|
+
className: "btn btn_sm ml_5",
|
|
28774
28542
|
style: {
|
|
28775
28543
|
color: preview ? '#7f96af' : 'white',
|
|
28776
28544
|
backgroundColor: preview ? 'white' : '#7f96af'
|
|
@@ -28779,7 +28547,7 @@ var MarkdownInput = function MarkdownInput(props) {
|
|
|
28779
28547
|
return setPreview(true);
|
|
28780
28548
|
}
|
|
28781
28549
|
}, "Preview"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
28782
|
-
className:
|
|
28550
|
+
className: "flex flexWrap"
|
|
28783
28551
|
}, injectButtons())), !preview && /*#__PURE__*/React__default["default"].createElement(CodeInput, _extends({}, props, {
|
|
28784
28552
|
setRef: function setRef(e) {
|
|
28785
28553
|
return ref.current = e;
|
|
@@ -28979,15 +28747,14 @@ var CustomizableInput$1 = /*#__PURE__*/React__default["default"].memo(function (
|
|
|
28979
28747
|
return prev.field.value === next.field.value && next.errorDisplayed === prev.errorDisplayed;
|
|
28980
28748
|
});
|
|
28981
28749
|
var ControlledInput = function ControlledInput(_ref) {
|
|
28982
|
-
var
|
|
28983
|
-
step = _ref.step,
|
|
28750
|
+
var step = _ref.step,
|
|
28984
28751
|
entry = _ref.entry,
|
|
28985
28752
|
children = _ref.children,
|
|
28986
28753
|
component = _ref.component,
|
|
28987
28754
|
errorDisplayed = _ref.errorDisplayed;
|
|
28988
28755
|
|
|
28989
28756
|
var _useController = reactHookForm.useController({
|
|
28990
|
-
defaultValue: defaultValue
|
|
28757
|
+
defaultValue: isDefined(step.defaultValue) ? step.defaultValue : null,
|
|
28991
28758
|
name: entry
|
|
28992
28759
|
}),
|
|
28993
28760
|
field = _useController.field;
|
|
@@ -29070,9 +28837,9 @@ var usePrevious = function usePrevious(value) {
|
|
|
29070
28837
|
};
|
|
29071
28838
|
|
|
29072
28839
|
var BasicWrapper = function BasicWrapper(_ref) {
|
|
29073
|
-
var entry = _ref.entry
|
|
29074
|
-
|
|
29075
|
-
label = _ref.label,
|
|
28840
|
+
var entry = _ref.entry;
|
|
28841
|
+
_ref.className;
|
|
28842
|
+
var label = _ref.label,
|
|
29076
28843
|
help = _ref.help,
|
|
29077
28844
|
children = _ref.children,
|
|
29078
28845
|
render = _ref.render;
|
|
@@ -29081,7 +28848,6 @@ var BasicWrapper = function BasicWrapper(_ref) {
|
|
|
29081
28848
|
return children;
|
|
29082
28849
|
}
|
|
29083
28850
|
|
|
29084
|
-
var classes = useCustomStyle();
|
|
29085
28851
|
var id = uuid.v4();
|
|
29086
28852
|
|
|
29087
28853
|
var _useFormContext = reactHookForm.useFormContext(),
|
|
@@ -29109,19 +28875,19 @@ var BasicWrapper = function BasicWrapper(_ref) {
|
|
|
29109
28875
|
}
|
|
29110
28876
|
|
|
29111
28877
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29112
|
-
className: "
|
|
28878
|
+
className: "mt_10",
|
|
29113
28879
|
style: {
|
|
29114
28880
|
position: 'relative'
|
|
29115
28881
|
}
|
|
29116
28882
|
}, label && /*#__PURE__*/React__default["default"].createElement("label", {
|
|
29117
|
-
className: "
|
|
28883
|
+
className: "flex ai_center mb_5",
|
|
29118
28884
|
htmlFor: entry
|
|
29119
28885
|
}, /*#__PURE__*/React__default["default"].createElement("span", null, label), help && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ReactToolTip__default["default"], {
|
|
29120
28886
|
html: true,
|
|
29121
28887
|
place: 'bottom',
|
|
29122
28888
|
id: id
|
|
29123
28889
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
29124
|
-
className: "
|
|
28890
|
+
className: "flex ai_center",
|
|
29125
28891
|
"data-html": true,
|
|
29126
28892
|
"data-tip": help,
|
|
29127
28893
|
"data-for": id
|
|
@@ -29133,7 +28899,7 @@ var BasicWrapper = function BasicWrapper(_ref) {
|
|
|
29133
28899
|
cursor: 'help'
|
|
29134
28900
|
}
|
|
29135
28901
|
})))), children, error && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29136
|
-
className: classNames__default["default"](
|
|
28902
|
+
className: classNames__default["default"]('feedback', _defineProperty$1({}, 'txt_red', errorDisplayed))
|
|
29137
28903
|
}, error.message));
|
|
29138
28904
|
};
|
|
29139
28905
|
|
|
@@ -29147,8 +28913,8 @@ var CustomizableInput = function CustomizableInput(props) {
|
|
|
29147
28913
|
return props.children;
|
|
29148
28914
|
};
|
|
29149
28915
|
|
|
29150
|
-
var defaultVal = function defaultVal(value, array, defaultValue) {
|
|
29151
|
-
if (
|
|
28916
|
+
var defaultVal = function defaultVal(value, array, defaultValue, type) {
|
|
28917
|
+
if (isDefined(defaultValue)) return defaultValue;
|
|
29152
28918
|
if (!!array) return [];
|
|
29153
28919
|
return value;
|
|
29154
28920
|
};
|
|
@@ -29185,9 +28951,17 @@ var cleanInputArray = function cleanInputArray(obj, defaultValues, flow, subSche
|
|
|
29185
28951
|
key = _ref5[0],
|
|
29186
28952
|
step = _ref5[1];
|
|
29187
28953
|
|
|
29188
|
-
var v;
|
|
29189
|
-
|
|
29190
|
-
if (
|
|
28954
|
+
var v = null;
|
|
28955
|
+
|
|
28956
|
+
if (obj) {
|
|
28957
|
+
v = obj[key];
|
|
28958
|
+
}
|
|
28959
|
+
|
|
28960
|
+
var maybeDefaultValue = defaultValues[key];
|
|
28961
|
+
|
|
28962
|
+
if (!v && isDefined(maybeDefaultValue)) {
|
|
28963
|
+
v = maybeDefaultValue;
|
|
28964
|
+
}
|
|
29191
28965
|
|
|
29192
28966
|
if (step.array && !step.render) {
|
|
29193
28967
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, (v || []).map(function (value) {
|
|
@@ -29269,15 +29043,12 @@ var Watcher = function Watcher(_ref6) {
|
|
|
29269
29043
|
schema = _ref6.schema,
|
|
29270
29044
|
onSubmit = _ref6.onSubmit,
|
|
29271
29045
|
handleSubmit = _ref6.handleSubmit;
|
|
29272
|
-
_ref6.getValues;
|
|
29273
|
-
_ref6.watch;
|
|
29274
29046
|
var data = reactHookForm.useWatch({
|
|
29275
29047
|
control: control
|
|
29276
29048
|
});
|
|
29277
|
-
|
|
29278
|
-
React.useEffect(function () {
|
|
29049
|
+
useHashEffect(function () {
|
|
29279
29050
|
if (!!options.autosubmit) {
|
|
29280
|
-
|
|
29051
|
+
handleSubmit(function () {
|
|
29281
29052
|
onSubmit(cleanOutputArray(data, schema));
|
|
29282
29053
|
})();
|
|
29283
29054
|
}
|
|
@@ -29304,14 +29075,19 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29304
29075
|
onSubmit = _ref7.onSubmit,
|
|
29305
29076
|
_ref7$onError = _ref7.onError,
|
|
29306
29077
|
onError = _ref7$onError === void 0 ? function () {} : _ref7$onError,
|
|
29307
|
-
footer = _ref7.footer
|
|
29308
|
-
_ref7
|
|
29309
|
-
|
|
29310
|
-
className = _ref7.className,
|
|
29078
|
+
footer = _ref7.footer;
|
|
29079
|
+
_ref7.style;
|
|
29080
|
+
var className = _ref7.className,
|
|
29311
29081
|
_ref7$options = _ref7.options,
|
|
29312
29082
|
options = _ref7$options === void 0 ? {} : _ref7$options;
|
|
29313
|
-
|
|
29314
|
-
|
|
29083
|
+
_ref7.nostyle;
|
|
29084
|
+
|
|
29085
|
+
var _useState = React.useState(schema),
|
|
29086
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29087
|
+
calcSchema = _useState2[0];
|
|
29088
|
+
_useState2[1];
|
|
29089
|
+
|
|
29090
|
+
var formFlow = flow || Object.keys(calcSchema);
|
|
29315
29091
|
|
|
29316
29092
|
var maybeCustomHttpClient = function maybeCustomHttpClient(url, method) {
|
|
29317
29093
|
//todo: if present props.resolve()
|
|
@@ -29328,7 +29104,7 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29328
29104
|
});
|
|
29329
29105
|
};
|
|
29330
29106
|
|
|
29331
|
-
var defaultValues = getDefaultValues(formFlow,
|
|
29107
|
+
var defaultValues = getDefaultValues(formFlow, calcSchema, value); //FIXME: get real schema through the switch
|
|
29332
29108
|
|
|
29333
29109
|
var _resolver = function resolver(rawData) {
|
|
29334
29110
|
var _getShapeAndDependenc2 = getShapeAndDependencies(formFlow, schema, [], rawData),
|
|
@@ -29347,18 +29123,17 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29347
29123
|
mode: 'onChange'
|
|
29348
29124
|
});
|
|
29349
29125
|
|
|
29350
|
-
var
|
|
29351
|
-
|
|
29352
|
-
initialReseted =
|
|
29353
|
-
|
|
29126
|
+
var _useState3 = React.useState(false),
|
|
29127
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29128
|
+
initialReseted = _useState4[0];
|
|
29129
|
+
_useState4[1]; // useEffect(() => {
|
|
29130
|
+
// reset(cleanInputArray(value, defaultValues, flow, schema))
|
|
29131
|
+
// setReset(true)
|
|
29132
|
+
// }, [reset])
|
|
29354
29133
|
|
|
29355
|
-
React.useEffect(function () {
|
|
29356
|
-
_reset(cleanInputArray(value, defaultValues, flow, schema));
|
|
29357
29134
|
|
|
29358
|
-
setReset(true);
|
|
29359
|
-
}, [_reset]);
|
|
29360
29135
|
React.useEffect(function () {
|
|
29361
|
-
|
|
29136
|
+
trigger();
|
|
29362
29137
|
}, [trigger, initialReseted]);
|
|
29363
29138
|
var _handleSubmit = methods.handleSubmit,
|
|
29364
29139
|
_methods$formState = methods.formState;
|
|
@@ -29368,13 +29143,9 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29368
29143
|
trigger = methods.trigger,
|
|
29369
29144
|
getValues = methods.getValues,
|
|
29370
29145
|
watch = methods.watch;
|
|
29371
|
-
|
|
29372
|
-
|
|
29373
|
-
|
|
29374
|
-
if (!deepEqual__default["default"](value, prev) || !deepEqual__default["default"](schema, prevSchema)) {
|
|
29375
|
-
_reset(_objectSpread2$1({}, cleanInputArray(value, defaultValues, flow, schema)));
|
|
29376
|
-
}
|
|
29377
|
-
}, [value, schema]);
|
|
29146
|
+
useHashEffect(function () {
|
|
29147
|
+
_reset(_objectSpread2$1({}, cleanInputArray(value, defaultValues, flow, schema)));
|
|
29148
|
+
}, [value, calcSchema]);
|
|
29378
29149
|
|
|
29379
29150
|
var functionalProperty = function functionalProperty(entry, prop) {
|
|
29380
29151
|
if (typeof prop === 'function') {
|
|
@@ -29411,7 +29182,7 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29411
29182
|
handleSubmit: _handleSubmit,
|
|
29412
29183
|
watch: methods.watch
|
|
29413
29184
|
}), /*#__PURE__*/React__default["default"].createElement("form", {
|
|
29414
|
-
className: className || "
|
|
29185
|
+
className: className || "pr_15 w_100",
|
|
29415
29186
|
onSubmit: _handleSubmit(function (data) {
|
|
29416
29187
|
var clean = cleanOutputArray(data, schema);
|
|
29417
29188
|
onSubmit(clean);
|
|
@@ -29478,8 +29249,6 @@ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, re
|
|
|
29478
29249
|
var Footer = function Footer(props) {
|
|
29479
29250
|
var _props$actions, _props$actions$submit, _props$actions2, _props$actions2$submi, _props$actions3, _props$actions3$cance, _props$actions5, _props$actions5$cance, _props$actions6, _props$actions6$reset, _props$actions7, _props$actions7$reset, _props$actions8, _props$actions8$submi;
|
|
29480
29251
|
|
|
29481
|
-
var classes = useCustomStyle();
|
|
29482
|
-
|
|
29483
29252
|
if (props.render) {
|
|
29484
29253
|
return props.render({
|
|
29485
29254
|
reset: props.reset,
|
|
@@ -29489,9 +29258,9 @@ var Footer = function Footer(props) {
|
|
|
29489
29258
|
|
|
29490
29259
|
var isSubmitDisplayed = ((_props$actions = props.actions) === null || _props$actions === void 0 ? void 0 : (_props$actions$submit = _props$actions.submit) === null || _props$actions$submit === void 0 ? void 0 : _props$actions$submit.display) === undefined ? true : !!((_props$actions2 = props.actions) !== null && _props$actions2 !== void 0 && (_props$actions2$submi = _props$actions2.submit) !== null && _props$actions2$submi !== void 0 && _props$actions2$submi.display);
|
|
29491
29260
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29492
|
-
className: "
|
|
29261
|
+
className: "flex jc_end mt_5"
|
|
29493
29262
|
}, ((_props$actions3 = props.actions) === null || _props$actions3 === void 0 ? void 0 : (_props$actions3$cance = _props$actions3.cancel) === null || _props$actions3$cance === void 0 ? void 0 : _props$actions3$cance.display) && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
29494
|
-
className: "
|
|
29263
|
+
className: "btn btn_red",
|
|
29495
29264
|
type: "button",
|
|
29496
29265
|
onClick: function onClick() {
|
|
29497
29266
|
var _props$actions4;
|
|
@@ -29499,11 +29268,11 @@ var Footer = function Footer(props) {
|
|
|
29499
29268
|
return (_props$actions4 = props.actions) === null || _props$actions4 === void 0 ? void 0 : _props$actions4.cancel.action();
|
|
29500
29269
|
}
|
|
29501
29270
|
}, ((_props$actions5 = props.actions) === null || _props$actions5 === void 0 ? void 0 : (_props$actions5$cance = _props$actions5.cancel) === null || _props$actions5$cance === void 0 ? void 0 : _props$actions5$cance.label) || 'Cancel'), ((_props$actions6 = props.actions) === null || _props$actions6 === void 0 ? void 0 : (_props$actions6$reset = _props$actions6.reset) === null || _props$actions6$reset === void 0 ? void 0 : _props$actions6$reset.display) && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
29502
|
-
className: "
|
|
29271
|
+
className: "btn btn_red",
|
|
29503
29272
|
type: "button",
|
|
29504
29273
|
onClick: props.reset
|
|
29505
29274
|
}, ((_props$actions7 = props.actions) === null || _props$actions7 === void 0 ? void 0 : (_props$actions7$reset = _props$actions7.reset) === null || _props$actions7$reset === void 0 ? void 0 : _props$actions7$reset.label) || 'Reset'), isSubmitDisplayed && /*#__PURE__*/React__default["default"].createElement("button", {
|
|
29506
|
-
className: "
|
|
29275
|
+
className: "btn btn_green ml_10",
|
|
29507
29276
|
type: "submit"
|
|
29508
29277
|
}, ((_props$actions8 = props.actions) === null || _props$actions8 === void 0 ? void 0 : (_props$actions8$submi = _props$actions8.submit) === null || _props$actions8$submi === void 0 ? void 0 : _props$actions8$submi.label) || 'Save'));
|
|
29509
29278
|
};
|
|
@@ -29520,7 +29289,6 @@ var Step = function Step(_ref8) {
|
|
|
29520
29289
|
functionalProperty = _ref8.functionalProperty,
|
|
29521
29290
|
parent = _ref8.parent,
|
|
29522
29291
|
onAfterChange = _ref8.onAfterChange;
|
|
29523
|
-
var classes = useCustomStyle();
|
|
29524
29292
|
|
|
29525
29293
|
var _useFormContext2 = reactHookForm.useFormContext(),
|
|
29526
29294
|
_useFormContext2$form = _useFormContext2.formState,
|
|
@@ -29678,7 +29446,7 @@ var Step = function Step(_ref8) {
|
|
|
29678
29446
|
errorDisplayed: errorDisplayed
|
|
29679
29447
|
}, /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
29680
29448
|
type: "text",
|
|
29681
|
-
className: classNames__default["default"](
|
|
29449
|
+
className: classNames__default["default"]('input', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29682
29450
|
}));
|
|
29683
29451
|
|
|
29684
29452
|
case format.code:
|
|
@@ -29690,7 +29458,7 @@ var Step = function Step(_ref8) {
|
|
|
29690
29458
|
entry: entry,
|
|
29691
29459
|
errorDisplayed: errorDisplayed
|
|
29692
29460
|
}, /*#__PURE__*/React__default["default"].createElement(Component, {
|
|
29693
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29461
|
+
className: classNames__default["default"](step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29694
29462
|
}));
|
|
29695
29463
|
|
|
29696
29464
|
case format.markdown:
|
|
@@ -29700,7 +29468,7 @@ var Step = function Step(_ref8) {
|
|
|
29700
29468
|
entry: entry,
|
|
29701
29469
|
errorDisplayed: errorDisplayed
|
|
29702
29470
|
}, /*#__PURE__*/React__default["default"].createElement(MarkdownInput, {
|
|
29703
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29471
|
+
className: classNames__default["default"](step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29704
29472
|
}));
|
|
29705
29473
|
|
|
29706
29474
|
case format.buttonsSelect:
|
|
@@ -29711,9 +29479,10 @@ var Step = function Step(_ref8) {
|
|
|
29711
29479
|
step: step,
|
|
29712
29480
|
entry: entry,
|
|
29713
29481
|
errorDisplayed: errorDisplayed
|
|
29714
|
-
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, {
|
|
29715
|
-
className: classNames__default["default"](
|
|
29716
|
-
disabled: functionalProperty(entry, step.disabled)
|
|
29482
|
+
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, _extends({
|
|
29483
|
+
className: classNames__default["default"]('flex_grow_1', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed)),
|
|
29484
|
+
disabled: functionalProperty(entry, step.disabled)
|
|
29485
|
+
}, step.props, {
|
|
29717
29486
|
possibleValues: step.options,
|
|
29718
29487
|
httpClient: httpClient,
|
|
29719
29488
|
isMulti: step.isMulti,
|
|
@@ -29721,7 +29490,7 @@ var Step = function Step(_ref8) {
|
|
|
29721
29490
|
transformer: step.transformer,
|
|
29722
29491
|
buttons: step.format === format.buttonsSelect,
|
|
29723
29492
|
optionsFrom: step.optionsFrom
|
|
29724
|
-
}));
|
|
29493
|
+
})));
|
|
29725
29494
|
}
|
|
29726
29495
|
|
|
29727
29496
|
default:
|
|
@@ -29732,7 +29501,7 @@ var Step = function Step(_ref8) {
|
|
|
29732
29501
|
errorDisplayed: errorDisplayed
|
|
29733
29502
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
29734
29503
|
type: step.format || 'text',
|
|
29735
|
-
className: classNames__default["default"](
|
|
29504
|
+
className: classNames__default["default"]('input', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29736
29505
|
}));
|
|
29737
29506
|
}
|
|
29738
29507
|
|
|
@@ -29745,8 +29514,9 @@ var Step = function Step(_ref8) {
|
|
|
29745
29514
|
step: step,
|
|
29746
29515
|
entry: entry,
|
|
29747
29516
|
errorDisplayed: errorDisplayed
|
|
29748
|
-
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, {
|
|
29749
|
-
className: classNames__default["default"](
|
|
29517
|
+
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, _extends({
|
|
29518
|
+
className: classNames__default["default"]('content', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29519
|
+
}, step.props, {
|
|
29750
29520
|
possibleValues: step.options,
|
|
29751
29521
|
httpClient: httpClient,
|
|
29752
29522
|
isMulti: step.isMulti,
|
|
@@ -29755,7 +29525,7 @@ var Step = function Step(_ref8) {
|
|
|
29755
29525
|
transformer: step.transformer,
|
|
29756
29526
|
buttons: step.format === format.buttonsSelect,
|
|
29757
29527
|
optionsFrom: step.optionsFrom
|
|
29758
|
-
}));
|
|
29528
|
+
})));
|
|
29759
29529
|
|
|
29760
29530
|
default:
|
|
29761
29531
|
return /*#__PURE__*/React__default["default"].createElement(ControlledInput, {
|
|
@@ -29765,18 +29535,17 @@ var Step = function Step(_ref8) {
|
|
|
29765
29535
|
errorDisplayed: errorDisplayed
|
|
29766
29536
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
29767
29537
|
type: step.format || 'number',
|
|
29768
|
-
className: classNames__default["default"](
|
|
29538
|
+
className: classNames__default["default"]('input', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29769
29539
|
}));
|
|
29770
29540
|
}
|
|
29771
29541
|
|
|
29772
29542
|
case type.bool:
|
|
29773
29543
|
return /*#__PURE__*/React__default["default"].createElement(ControlledInput, {
|
|
29774
|
-
defaultValue: defaultValue,
|
|
29775
29544
|
step: step,
|
|
29776
29545
|
entry: entry,
|
|
29777
29546
|
errorDisplayed: errorDisplayed
|
|
29778
29547
|
}, /*#__PURE__*/React__default["default"].createElement(BooleanInput, {
|
|
29779
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29548
|
+
className: classNames__default["default"](steop.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29780
29549
|
}));
|
|
29781
29550
|
|
|
29782
29551
|
case type.object:
|
|
@@ -29788,8 +29557,9 @@ var Step = function Step(_ref8) {
|
|
|
29788
29557
|
step: step,
|
|
29789
29558
|
entry: entry,
|
|
29790
29559
|
errorDisplayed: errorDisplayed
|
|
29791
|
-
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, {
|
|
29792
|
-
className: classNames__default["default"](
|
|
29560
|
+
}, /*#__PURE__*/React__default["default"].createElement(SelectInput, _extends({
|
|
29561
|
+
className: classNames__default["default"]('flex_grow_1', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29562
|
+
}, step.props, {
|
|
29793
29563
|
possibleValues: step.options,
|
|
29794
29564
|
httpClient: httpClient,
|
|
29795
29565
|
isMulti: step.isMulti,
|
|
@@ -29798,7 +29568,7 @@ var Step = function Step(_ref8) {
|
|
|
29798
29568
|
transformer: step.transformer,
|
|
29799
29569
|
buttons: step.format === format.buttonsSelect,
|
|
29800
29570
|
optionsFrom: step.optionsFrom
|
|
29801
|
-
}));
|
|
29571
|
+
})));
|
|
29802
29572
|
|
|
29803
29573
|
case format.form:
|
|
29804
29574
|
//todo: disabled ?
|
|
@@ -29841,7 +29611,7 @@ var Step = function Step(_ref8) {
|
|
|
29841
29611
|
errorDisplayed: errorDisplayed,
|
|
29842
29612
|
component: function component(field, props) {
|
|
29843
29613
|
return /*#__PURE__*/React__default["default"].createElement(CodeInput, _extends({}, props, {
|
|
29844
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29614
|
+
className: classNames__default["default"](step.className, _defineProperty$1({}, 'input__invalid', error)),
|
|
29845
29615
|
onChange: function onChange(e) {
|
|
29846
29616
|
_readOnlyError("errorDisplayed");
|
|
29847
29617
|
var v;
|
|
@@ -29873,7 +29643,7 @@ var Step = function Step(_ref8) {
|
|
|
29873
29643
|
entry: entry,
|
|
29874
29644
|
errorDisplayed: errorDisplayed
|
|
29875
29645
|
}, /*#__PURE__*/React__default["default"].createElement(ObjectInput, {
|
|
29876
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29646
|
+
className: classNames__default["default"](step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed))
|
|
29877
29647
|
}));
|
|
29878
29648
|
}
|
|
29879
29649
|
|
|
@@ -29884,7 +29654,7 @@ var Step = function Step(_ref8) {
|
|
|
29884
29654
|
entry: entry,
|
|
29885
29655
|
errorDisplayed: errorDisplayed
|
|
29886
29656
|
}, /*#__PURE__*/React__default["default"].createElement(reactRainbowComponents.DatePicker, {
|
|
29887
|
-
className: classNames__default["default"](
|
|
29657
|
+
className: classNames__default["default"]('datepicker', step.className, _defineProperty$1({}, 'input__invalid', errorDisplayed)),
|
|
29888
29658
|
formatStyle: "large"
|
|
29889
29659
|
}));
|
|
29890
29660
|
|
|
@@ -29898,15 +29668,15 @@ var Step = function Step(_ref8) {
|
|
|
29898
29668
|
var FileInput = function FileInput(_ref10) {
|
|
29899
29669
|
var onChange = _ref10.onChange;
|
|
29900
29670
|
|
|
29901
|
-
var
|
|
29902
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
29903
|
-
uploading = _useState4[0],
|
|
29904
|
-
setUploading = _useState4[1];
|
|
29905
|
-
|
|
29906
|
-
var _useState5 = React.useState(undefined),
|
|
29671
|
+
var _useState5 = React.useState(false),
|
|
29907
29672
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
29908
|
-
|
|
29909
|
-
|
|
29673
|
+
uploading = _useState6[0],
|
|
29674
|
+
setUploading = _useState6[1];
|
|
29675
|
+
|
|
29676
|
+
var _useState7 = React.useState(undefined),
|
|
29677
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
29678
|
+
input = _useState8[0],
|
|
29679
|
+
setInput = _useState8[1];
|
|
29910
29680
|
|
|
29911
29681
|
var setFiles = function setFiles(e) {
|
|
29912
29682
|
var files = e.target.files;
|
|
@@ -29921,24 +29691,24 @@ var Step = function Step(_ref8) {
|
|
|
29921
29691
|
|
|
29922
29692
|
var files = field.value || [];
|
|
29923
29693
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29924
|
-
className: classNames__default["default"](
|
|
29694
|
+
className: classNames__default["default"]('flex', 'ai_center', step.className, _defineProperty$1({}, 'input__invalid', error))
|
|
29925
29695
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
29926
29696
|
ref: function ref(r) {
|
|
29927
29697
|
return setInput(r);
|
|
29928
29698
|
},
|
|
29929
29699
|
type: "file",
|
|
29930
29700
|
multiple: true,
|
|
29931
|
-
className:
|
|
29701
|
+
className: 'd_none',
|
|
29932
29702
|
onChange: setFiles
|
|
29933
29703
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
29934
29704
|
type: "button",
|
|
29935
|
-
className: "
|
|
29705
|
+
className: "btn btn_sm flex ai_center",
|
|
29936
29706
|
disabled: uploading || functionalProperty(entry, step.disabled),
|
|
29937
29707
|
onClick: trigger
|
|
29938
29708
|
}, uploading && /*#__PURE__*/React__default["default"].createElement(reactFeather.Loader, null), !uploading && /*#__PURE__*/React__default["default"].createElement(reactFeather.Upload, null), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
29939
|
-
className: ""
|
|
29709
|
+
className: "ml_5"
|
|
29940
29710
|
}, "Select file(s)")), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
29941
|
-
className: ""
|
|
29711
|
+
className: "ml_5"
|
|
29942
29712
|
}, files.length <= 0 ? 'No files selected' : files.map(function (r) {
|
|
29943
29713
|
return r.name;
|
|
29944
29714
|
}).join(" , ")));
|
|
@@ -29960,7 +29730,7 @@ var Step = function Step(_ref8) {
|
|
|
29960
29730
|
entry: entry,
|
|
29961
29731
|
component: function component(field, props) {
|
|
29962
29732
|
return /*#__PURE__*/React__default["default"].createElement(CodeInput, _extends({}, props, {
|
|
29963
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29733
|
+
className: classNames__default["default"](_defineProperty$1({}, 'input__invalid', error)),
|
|
29964
29734
|
onChange: function onChange(v) {
|
|
29965
29735
|
field.onChange(v);
|
|
29966
29736
|
option(step.onChange).map(function (onChange) {
|
|
@@ -29986,7 +29756,6 @@ var ArrayStep = function ArrayStep(_ref11) {
|
|
|
29986
29756
|
step = _ref11.step,
|
|
29987
29757
|
component = _ref11.component,
|
|
29988
29758
|
disabled = _ref11.disabled;
|
|
29989
|
-
var classes = useCustomStyle();
|
|
29990
29759
|
|
|
29991
29760
|
var _useFormContext3 = reactHookForm.useFormContext(),
|
|
29992
29761
|
getValues = _useFormContext3.getValues,
|
|
@@ -30019,7 +29788,7 @@ var ArrayStep = function ArrayStep(_ref11) {
|
|
|
30019
29788
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
30020
29789
|
key: field.id
|
|
30021
29790
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
30022
|
-
className: classNames__default["default"](
|
|
29791
|
+
className: classNames__default["default"]('ai_center', 'mt_5'),
|
|
30023
29792
|
style: {
|
|
30024
29793
|
position: 'relative'
|
|
30025
29794
|
}
|
|
@@ -30038,7 +29807,7 @@ var ArrayStep = function ArrayStep(_ref11) {
|
|
|
30038
29807
|
top: '2px',
|
|
30039
29808
|
right: 0
|
|
30040
29809
|
},
|
|
30041
|
-
className: classNames__default["default"](
|
|
29810
|
+
className: classNames__default["default"]('btn', 'btn_red', 'btn_sm', 'ml_5'),
|
|
30042
29811
|
disabled: disabled,
|
|
30043
29812
|
onClick: function onClick() {
|
|
30044
29813
|
remove(idx);
|
|
@@ -30048,10 +29817,10 @@ var ArrayStep = function ArrayStep(_ref11) {
|
|
|
30048
29817
|
size: 16
|
|
30049
29818
|
}))));
|
|
30050
29819
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
30051
|
-
className: classNames__default["default"](
|
|
29820
|
+
className: classNames__default["default"]('flex', 'jc_flex_end')
|
|
30052
29821
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
30053
29822
|
type: "button",
|
|
30054
|
-
className: classNames__default["default"](
|
|
29823
|
+
className: classNames__default["default"]('btn', 'btn_blue', 'btn_sm', 'mt_5', _defineProperty$1({}, 'input__invalid', errorDisplayed)),
|
|
30055
29824
|
onClick: function onClick() {
|
|
30056
29825
|
var newValue = cleanInputArray({}, getValues(entry), step.flow, step.schema);
|
|
30057
29826
|
append({
|
|
@@ -30091,22 +29860,21 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30091
29860
|
setValue = _useFormContext4.setValue,
|
|
30092
29861
|
watch = _useFormContext4.watch;
|
|
30093
29862
|
|
|
30094
|
-
var
|
|
30095
|
-
|
|
30096
|
-
collapsed =
|
|
30097
|
-
setCollapsed =
|
|
29863
|
+
var _useState9 = React.useState(!!step.collapsed),
|
|
29864
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
29865
|
+
collapsed = _useState10[0],
|
|
29866
|
+
setCollapsed = _useState10[1];
|
|
30098
29867
|
|
|
30099
|
-
var classes = useCustomStyle();
|
|
30100
29868
|
reactHookForm.useWatch(step === null || step === void 0 ? void 0 : (_step$conditionalSche = step.conditionalSchema) === null || _step$conditionalSche === void 0 ? void 0 : _step$conditionalSche.ref);
|
|
30101
29869
|
var schemaAndFlow = option(step.conditionalSchema).map(function (condiSchema) {
|
|
30102
29870
|
var ref = option(condiSchema.ref).map(function (ref) {
|
|
30103
29871
|
return getValues(ref);
|
|
30104
29872
|
}).getOrNull();
|
|
30105
|
-
var
|
|
29873
|
+
var rawValues = getValues();
|
|
30106
29874
|
var filterSwitch = condiSchema["switch"].find(function (s) {
|
|
30107
29875
|
if (typeof s.condition === 'function') {
|
|
30108
29876
|
return s.condition({
|
|
30109
|
-
|
|
29877
|
+
rawValues: rawValues,
|
|
30110
29878
|
ref: ref
|
|
30111
29879
|
});
|
|
30112
29880
|
} else {
|
|
@@ -30127,15 +29895,12 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30127
29895
|
schema: schema,
|
|
30128
29896
|
flow: flow
|
|
30129
29897
|
});
|
|
30130
|
-
|
|
30131
|
-
|
|
30132
|
-
|
|
30133
|
-
|
|
30134
|
-
|
|
30135
|
-
|
|
30136
|
-
});
|
|
30137
|
-
}
|
|
30138
|
-
}, [prevSchema, schemaAndFlow.schema]);
|
|
29898
|
+
useHashEffect(function () {
|
|
29899
|
+
var def = getDefaultValues(schemaAndFlow.flow, schemaAndFlow.schema, getValues(parent));
|
|
29900
|
+
setValue(parent, def, {
|
|
29901
|
+
shouldValidate: false
|
|
29902
|
+
});
|
|
29903
|
+
}, [schemaAndFlow.schema]);
|
|
30139
29904
|
var computedSandF = schemaAndFlow.flow.reduce(function (acc, entry) {
|
|
30140
29905
|
var step = schemaAndFlow.schema[entry];
|
|
30141
29906
|
var visibleStep = option(step).map(function (s) {
|
|
@@ -30166,13 +29931,13 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30166
29931
|
return x.visibleStep;
|
|
30167
29932
|
}).length >= 1 && step.label !== null;
|
|
30168
29933
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
30169
|
-
className: classNames__default["default"]((_classNames17 = {}, _defineProperty$1(_classNames17,
|
|
29934
|
+
className: classNames__default["default"]((_classNames17 = {}, _defineProperty$1(_classNames17, 'nestedform__border', bordered), _defineProperty$1(_classNames17, 'border__error', !!errorDisplayed), _classNames17)),
|
|
30170
29935
|
style: {
|
|
30171
29936
|
position: 'relative'
|
|
30172
29937
|
}
|
|
30173
29938
|
}, !!step.collapsable && schemaAndFlow.flow.length > 1 && collapsed && /*#__PURE__*/React__default["default"].createElement(reactFeather.ChevronDown, {
|
|
30174
29939
|
size: 30,
|
|
30175
|
-
className:
|
|
29940
|
+
className: 'cursor_pointer',
|
|
30176
29941
|
style: {
|
|
30177
29942
|
position: 'absolute',
|
|
30178
29943
|
top: -35,
|
|
@@ -30185,7 +29950,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30185
29950
|
}
|
|
30186
29951
|
}), !!step.collapsable && schemaAndFlow.flow.length > 1 && !collapsed && /*#__PURE__*/React__default["default"].createElement(reactFeather.ChevronUp, {
|
|
30187
29952
|
size: 30,
|
|
30188
|
-
className:
|
|
29953
|
+
className: 'cursor_pointer',
|
|
30189
29954
|
style: {
|
|
30190
29955
|
position: 'absolute',
|
|
30191
29956
|
top: -35,
|
|
@@ -30208,7 +29973,7 @@ var NestedForm = function NestedForm(_ref12) {
|
|
|
30208
29973
|
|
|
30209
29974
|
return /*#__PURE__*/React__default["default"].createElement(BasicWrapper, {
|
|
30210
29975
|
key: "".concat(entry, ".").concat(idx),
|
|
30211
|
-
className: classNames__default["default"](_defineProperty$1({},
|
|
29976
|
+
className: classNames__default["default"](_defineProperty$1({}, 'display__none', collapsed && !step.visibleOnCollapse || !visibleStep)),
|
|
30212
29977
|
entry: "".concat(parent, ".").concat(entry),
|
|
30213
29978
|
label: functionalProperty(entry, (step === null || step === void 0 ? void 0 : step.label) === null ? null : (step === null || step === void 0 ? void 0 : step.label) || entry),
|
|
30214
29979
|
help: step.help,
|