@inseefr/lunatic 2.0.0-v2 → 2.0.1-v2
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/lib/components/button/lunatic-button.js +5 -1
- package/lib/components/checkbox/checkbox-boolean/checkbox-boolean.js +4 -2
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +2 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.js +7 -7
- package/lib/components/checkbox/checkbox-group/checkbox.scss +1 -0
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +3 -2
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +5 -2
- package/lib/components/checkbox/commons/checkbox-option.js +12 -3
- package/lib/components/checkbox/commons/checkbox-option.scss +3 -0
- package/lib/components/commons/components/combo-box/combo-box.js +1 -1
- package/lib/components/commons/components/combo-box/combo-box.scss +0 -10
- package/lib/components/commons/components/combo-box/selection/label-selection.js +1 -1
- package/lib/components/commons/components/errors/errors.js +26 -6
- package/lib/components/commons/components/fieldset.scss +2 -0
- package/lib/components/commons/components/orchestrated-component.js +4 -2
- package/lib/components/commons/create-row-orchestrator.js +4 -2
- package/lib/components/datepicker/datepicker.js +4 -1
- package/lib/components/datepicker/lunatic-datepicker.js +4 -2
- package/lib/components/declarations/declarations.js +5 -1
- package/lib/components/dropdown/lunatic-dropdown.js +3 -2
- package/lib/components/filter-description/component.js +4 -1
- package/lib/components/input/lunatic-input.js +3 -1
- package/lib/components/input-number/lunatic-input-number.js +4 -2
- package/lib/components/loop/block-for-loop/block-for-loop.js +7 -6
- package/lib/components/loop/block-for-loop/row.js +5 -3
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +5 -5
- package/lib/components/loop/roster-for-loop/row.js +5 -3
- package/lib/components/modal-controls/modal-controls.scss +8 -30
- package/lib/components/pairwise/index.js +0 -8
- package/lib/components/pairwise/links/{links-orchestrator.js → orchestrator.js} +0 -0
- package/lib/components/pairwise/links/pairwise-links.js +5 -7
- package/lib/components/radio/lunatic-radio-group.js +3 -2
- package/lib/components/radio/radio-group.js +3 -5
- package/lib/components/radio/radio-option.js +6 -2
- package/lib/components/radio/radio.scss +3 -1
- package/lib/components/sequence/sequence.js +4 -1
- package/lib/components/subsequence/subsequence.js +4 -1
- package/lib/components/suggester/check-store.js +1 -6
- package/lib/components/suggester/lunatic-suggester.js +2 -1
- package/lib/components/table/lunatic-table.js +5 -2
- package/lib/components/textarea/lunatic-textarea.js +3 -1
- package/lib/stories/pairwise/data.json +13 -0
- package/lib/stories/pairwise/{links/links.json → links.json} +90 -24
- package/lib/stories/pairwise/{links/pairwise-links.stories.js → pairwise-links.stories.js} +3 -3
- package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +13 -52
- package/lib/stories/questionnaires-test/controls/boucles-n.json +74 -444
- package/lib/stories/questionnaires-test/controls/controls.stories.js +8 -8
- package/lib/use-lunatic/commons/get-errors-without-empty-value.js +31 -0
- package/lib/use-lunatic/commons/index.js +8 -0
- package/lib/use-lunatic/initial-state.js +1 -0
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +16 -9
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +2 -1
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +8 -1
- package/lib/use-lunatic/reducer/validate-controls/create-controls-reducer.js +21 -11
- package/lib/use-lunatic/reducer/validate-controls/create-modal-controls-reducer.js +19 -7
- package/lib/use-lunatic/reducer/validate-controls/validation-utils.js +5 -3
- package/package.json +2 -2
- package/lib/components/checkbox/checkbox-group/checkbox-option.js +0 -57
- package/lib/components/checkbox/checkbox.scss +0 -1
- package/lib/components/pairwise/block/index.js +0 -15
- package/lib/components/pairwise/block/pairwise-block.js +0 -17
- package/lib/stories/pairwise/block/block.json +0 -3
- package/lib/stories/pairwise/block/pairwise-block.stories.js +0 -36
- package/lib/stories/pairwise/links/data.json +0 -12
|
@@ -17,6 +17,8 @@ var _isElement = require("../../utils/is-element");
|
|
|
17
17
|
|
|
18
18
|
require("./button.scss");
|
|
19
19
|
|
|
20
|
+
var _commons = require("../commons");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -58,5 +60,7 @@ Button.propTypes = {
|
|
|
58
60
|
disabled: _propTypes["default"].bool,
|
|
59
61
|
onClick: _propTypes["default"].func.isRequired
|
|
60
62
|
};
|
|
61
|
-
|
|
63
|
+
|
|
64
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Button);
|
|
65
|
+
|
|
62
66
|
exports["default"] = _default;
|
|
@@ -18,14 +18,16 @@ function CheckboxBoolean(_ref) {
|
|
|
18
18
|
id = _ref.id,
|
|
19
19
|
disabled = _ref.disabled,
|
|
20
20
|
onClick = _ref.onClick,
|
|
21
|
-
labelId = _ref.labelId
|
|
21
|
+
labelId = _ref.labelId,
|
|
22
|
+
label = _ref.label;
|
|
22
23
|
return /*#__PURE__*/_react["default"].createElement(_commons.CheckboxOption, {
|
|
23
24
|
disabled: disabled,
|
|
24
25
|
checked: checked,
|
|
25
26
|
id: id,
|
|
26
27
|
onClick: onClick,
|
|
27
28
|
labelledBy: labelId,
|
|
28
|
-
value: checked
|
|
29
|
+
value: checked,
|
|
30
|
+
label: label
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -24,7 +24,8 @@ function CheckBoxOptionWrapper(_ref) {
|
|
|
24
24
|
value = _ref.value,
|
|
25
25
|
onKeyDown = _ref.onKeyDown,
|
|
26
26
|
handleChange = _ref.handleChange,
|
|
27
|
-
response = _ref.response
|
|
27
|
+
response = _ref.response,
|
|
28
|
+
label = _ref.label;
|
|
28
29
|
var booleanValue = value || false;
|
|
29
30
|
var onClickOption = (0, _commons.useOnHandleChange)({
|
|
30
31
|
handleChange: handleChange,
|
|
@@ -43,7 +44,8 @@ function CheckBoxOptionWrapper(_ref) {
|
|
|
43
44
|
checked: checked,
|
|
44
45
|
onClick: onClickOption,
|
|
45
46
|
value: booleanValue,
|
|
46
|
-
onKeyDown: onKeyDown
|
|
47
|
+
onKeyDown: onKeyDown,
|
|
48
|
+
label: label
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
|
|
@@ -79,11 +81,9 @@ function CheckboxGroup(_ref3) {
|
|
|
79
81
|
value: optionValue,
|
|
80
82
|
onKeyDown: onClick,
|
|
81
83
|
response: response,
|
|
82
|
-
handleChange: handleChange
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
htmlFor: checkboxId
|
|
86
|
-
}, label));
|
|
84
|
+
handleChange: handleChange,
|
|
85
|
+
label: label
|
|
86
|
+
}));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -29,11 +29,12 @@ function LunaticCheckboxGroup(_ref) {
|
|
|
29
29
|
custom: custom,
|
|
30
30
|
label: label
|
|
31
31
|
}), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
32
|
-
errors: errors
|
|
32
|
+
errors: errors,
|
|
33
|
+
activeId: id
|
|
33
34
|
}));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
var _default = (0, _commons.createLunaticComponent)(LunaticCheckboxGroup, {
|
|
37
|
+
var _default = (0, _commons.createLunaticComponent)((0, _commons.createCustomizableLunaticField)(LunaticCheckboxGroup), {
|
|
37
38
|
fieldset: true,
|
|
38
39
|
inputId: 'lunatic-checkbox-group'
|
|
39
40
|
});
|
|
@@ -25,12 +25,15 @@ function LunaticCheckboxOne(_ref) {
|
|
|
25
25
|
var errors = _ref.errors,
|
|
26
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
27
|
|
|
28
|
+
var id = props.id;
|
|
28
29
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radio["default"], _extends({}, props, {
|
|
29
30
|
checkboxStyle: true
|
|
30
31
|
})), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
31
|
-
errors: errors
|
|
32
|
+
errors: errors,
|
|
33
|
+
activeId: id
|
|
32
34
|
}));
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
var _default = LunaticCheckboxOne;
|
|
37
|
+
var _default = (0, _commons.createCustomizableLunaticField)(LunaticCheckboxOne);
|
|
38
|
+
|
|
36
39
|
exports["default"] = _default;
|
|
@@ -13,6 +13,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _icons = require("../../commons/icons");
|
|
15
15
|
|
|
16
|
+
require("./checkbox-option.scss");
|
|
17
|
+
|
|
18
|
+
var _commons = require("../../commons");
|
|
19
|
+
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
21
|
|
|
18
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -26,7 +30,8 @@ function CheckboxOption(_ref) {
|
|
|
26
30
|
_ref$value = _ref.value,
|
|
27
31
|
value = _ref$value === void 0 ? false : _ref$value,
|
|
28
32
|
onClick = _ref.onClick,
|
|
29
|
-
labelledBy = _ref.labelledBy
|
|
33
|
+
labelledBy = _ref.labelledBy,
|
|
34
|
+
label = _ref.label;
|
|
30
35
|
var onClickOption = (0, _react.useCallback)(function () {
|
|
31
36
|
onClick(!value);
|
|
32
37
|
}, [value, onClick]);
|
|
@@ -52,8 +57,12 @@ function CheckboxOption(_ref) {
|
|
|
52
57
|
onClick: onClickOption,
|
|
53
58
|
onKeyDown: handleKeyDown,
|
|
54
59
|
"aria-labelledby": labelledBy
|
|
55
|
-
}, /*#__PURE__*/_react["default"].createElement(Icon, null)
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement(Icon, null), /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
id: labelledBy,
|
|
62
|
+
htmlFor: id
|
|
63
|
+
}, label)));
|
|
56
64
|
}
|
|
57
65
|
|
|
58
|
-
var _default = CheckboxOption;
|
|
66
|
+
var _default = (0, _commons.createCustomizableLunaticField)(CheckboxOption);
|
|
67
|
+
|
|
59
68
|
exports["default"] = _default;
|
|
@@ -100,7 +100,7 @@ function ComboBox(_ref) {
|
|
|
100
100
|
selectedIndex: selectedIndex,
|
|
101
101
|
getOptionValue: getOptionValue
|
|
102
102
|
}));
|
|
103
|
-
}, [value, selectedIndex,
|
|
103
|
+
}, [options, value, selectedIndex, getOptionValue]);
|
|
104
104
|
var onFocus = (0, _react.useCallback)(function () {
|
|
105
105
|
dispatch(_stateManagement.actions.onFocus());
|
|
106
106
|
}, []);
|
|
@@ -70,9 +70,6 @@
|
|
|
70
70
|
display: block;
|
|
71
71
|
@include placeholder();
|
|
72
72
|
|
|
73
|
-
.placeholder {
|
|
74
|
-
}
|
|
75
|
-
|
|
76
73
|
.selection {
|
|
77
74
|
display: inline-block;
|
|
78
75
|
line-height: 34px;
|
|
@@ -101,8 +98,6 @@
|
|
|
101
98
|
box-shadow: 0 2px 2px grey;
|
|
102
99
|
border-radius: 4px;
|
|
103
100
|
}
|
|
104
|
-
&:focus {
|
|
105
|
-
}
|
|
106
101
|
.lunatic-combo-box-option {
|
|
107
102
|
text-overflow: ellipsis;
|
|
108
103
|
white-space: nowrap;
|
|
@@ -183,11 +178,6 @@
|
|
|
183
178
|
&.displayed {
|
|
184
179
|
display: block;
|
|
185
180
|
}
|
|
186
|
-
|
|
187
|
-
.placeholder {
|
|
188
|
-
}
|
|
189
|
-
.selection {
|
|
190
|
-
}
|
|
191
181
|
}
|
|
192
182
|
}
|
|
193
183
|
|
|
@@ -27,7 +27,7 @@ function LabelSelection(_ref) {
|
|
|
27
27
|
disabled: disabled
|
|
28
28
|
}),
|
|
29
29
|
"aria-labelledby": labelledBy
|
|
30
|
-
},
|
|
30
|
+
}, /*#__PURE__*/_react["default"].createElement(Renderer, {
|
|
31
31
|
option: option,
|
|
32
32
|
placeholder: placeholder,
|
|
33
33
|
search: search
|
|
@@ -11,13 +11,33 @@ require("./errors.scss");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
|
-
function
|
|
15
|
-
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
23
|
+
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
|
|
26
|
+
function Errors(_ref) {
|
|
27
|
+
var errors = _ref.errors,
|
|
28
|
+
activeId = _ref.activeId;
|
|
29
|
+
var activeErrors = Object.entries(errors || {}).find(function (_ref2) {
|
|
30
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
31
|
+
k = _ref3[0];
|
|
32
|
+
|
|
33
|
+
return activeId.trim().endsWith(k);
|
|
34
|
+
});
|
|
35
|
+
if (!activeErrors) return null;
|
|
36
|
+
|
|
37
|
+
if (Array.isArray(activeErrors[1])) {
|
|
38
|
+
var content = activeErrors[1].map(function (_ref4) {
|
|
39
|
+
var id = _ref4.id,
|
|
40
|
+
errorMessage = _ref4.errorMessage;
|
|
21
41
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
42
|
key: "error-".concat(id),
|
|
23
43
|
className: "lunatic-error"
|
|
@@ -34,7 +34,8 @@ function OrchestratedComponent(_ref) {
|
|
|
34
34
|
iteration = _ref.iteration,
|
|
35
35
|
linksIterations = _ref.linksIterations,
|
|
36
36
|
executeExpression = _ref.executeExpression,
|
|
37
|
-
custom = _ref.custom
|
|
37
|
+
custom = _ref.custom,
|
|
38
|
+
errors = _ref.errors;
|
|
38
39
|
var componentType = component.componentType;
|
|
39
40
|
var componentFilled = (0, _commons.fillComponentExpressions)(component, {
|
|
40
41
|
executeExpression: executeExpression,
|
|
@@ -58,7 +59,8 @@ function OrchestratedComponent(_ref) {
|
|
|
58
59
|
shortcut: shortcut,
|
|
59
60
|
value: value,
|
|
60
61
|
executeExpression: executeExpression,
|
|
61
|
-
custom: custom
|
|
62
|
+
custom: custom,
|
|
63
|
+
errors: errors
|
|
62
64
|
}));
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -23,7 +23,8 @@ function createRowOrchestrator(Row) {
|
|
|
23
23
|
executeExpression = _ref.executeExpression,
|
|
24
24
|
iteration = _ref.iteration,
|
|
25
25
|
xAxisIterations = _ref.xAxisIterations,
|
|
26
|
-
custom = _ref.custom
|
|
26
|
+
custom = _ref.custom,
|
|
27
|
+
errors = _ref.errors;
|
|
27
28
|
|
|
28
29
|
if (nbRows > 0) {
|
|
29
30
|
return new Array(nbRows).fill(null).map(function (_, index) {
|
|
@@ -45,7 +46,8 @@ function createRowOrchestrator(Row) {
|
|
|
45
46
|
features: features,
|
|
46
47
|
shortcut: shortcut,
|
|
47
48
|
preferences: preferences,
|
|
48
|
-
missing: missing
|
|
49
|
+
missing: missing,
|
|
50
|
+
errors: errors
|
|
49
51
|
});
|
|
50
52
|
});
|
|
51
53
|
}
|
|
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
require("./datepicker.scss");
|
|
15
15
|
|
|
16
|
+
var _commons = require("../commons");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -49,5 +51,6 @@ function Datepicker(_ref) {
|
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
var _default = Datepicker;
|
|
54
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Datepicker);
|
|
55
|
+
|
|
53
56
|
exports["default"] = _default;
|
|
@@ -25,12 +25,14 @@ var LunaticDatepicker = function LunaticDatepicker(_ref) {
|
|
|
25
25
|
var errors = _ref.errors,
|
|
26
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
27
|
|
|
28
|
+
var id = props.id;
|
|
28
29
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_datepicker["default"], props), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
29
|
-
errors: errors
|
|
30
|
+
errors: errors,
|
|
31
|
+
activeId: id
|
|
30
32
|
}));
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
var _default = (0, _commons.createLunaticComponent)(LunaticDatepicker, {
|
|
35
|
+
var _default = (0, _commons.createLunaticComponent)((0, _commons.createCustomizableLunaticField)(LunaticDatepicker), {
|
|
34
36
|
inputId: 'lunatic-datepicker'
|
|
35
37
|
});
|
|
36
38
|
|
|
@@ -11,6 +11,8 @@ require("./declarations.scss");
|
|
|
11
11
|
|
|
12
12
|
var _declaration = _interopRequireDefault(require("./declaration"));
|
|
13
13
|
|
|
14
|
+
var _commons = require("../commons");
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
18
|
var DECLARATION_POSITIONS = {
|
|
@@ -53,5 +55,7 @@ Declarations.defaultProps = {
|
|
|
53
55
|
bindings: {}
|
|
54
56
|
};
|
|
55
57
|
Declarations.propTypes = {};
|
|
56
|
-
|
|
58
|
+
|
|
59
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Declarations);
|
|
60
|
+
|
|
57
61
|
exports["default"] = _default;
|
|
@@ -37,7 +37,8 @@ function LunaticDropdown(_ref) {
|
|
|
37
37
|
value: value,
|
|
38
38
|
className: "lunatic-dropdown"
|
|
39
39
|
}), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
40
|
-
errors: errors
|
|
40
|
+
errors: errors,
|
|
41
|
+
activeId: id
|
|
41
42
|
}));
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -56,6 +57,6 @@ LunaticDropdown.defaultProps = {
|
|
|
56
57
|
value: null
|
|
57
58
|
};
|
|
58
59
|
|
|
59
|
-
var _default = (0, _commons.createLunaticComponent)(LunaticDropdown);
|
|
60
|
+
var _default = (0, _commons.createLunaticComponent)((0, _commons.createCustomizableLunaticField)(LunaticDropdown));
|
|
60
61
|
|
|
61
62
|
exports["default"] = _default;
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _commons = require("../commons");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
var FilterDescription = function FilterDescription(_ref) {
|
|
@@ -19,5 +21,6 @@ var FilterDescription = function FilterDescription(_ref) {
|
|
|
19
21
|
}, label);
|
|
20
22
|
};
|
|
21
23
|
|
|
22
|
-
var _default = FilterDescription;
|
|
24
|
+
var _default = (0, _commons.createCustomizableLunaticField)(FilterDescription);
|
|
25
|
+
|
|
23
26
|
exports["default"] = _default;
|
|
@@ -25,8 +25,10 @@ var LunaticInput = function LunaticInput(_ref) {
|
|
|
25
25
|
var errors = _ref.errors,
|
|
26
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
27
|
|
|
28
|
+
var id = props.id;
|
|
28
29
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_input["default"], props), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
29
|
-
errors: errors
|
|
30
|
+
errors: errors,
|
|
31
|
+
activeId: id
|
|
30
32
|
}));
|
|
31
33
|
};
|
|
32
34
|
|
|
@@ -23,12 +23,14 @@ var LunaticInputNumber = function LunaticInputNumber(_ref) {
|
|
|
23
23
|
var errors = _ref.errors,
|
|
24
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
|
|
26
|
+
var id = props.id;
|
|
26
27
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_inputNumber["default"], props), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
27
|
-
errors: errors
|
|
28
|
+
errors: errors,
|
|
29
|
+
activeId: id
|
|
28
30
|
}));
|
|
29
31
|
};
|
|
30
32
|
|
|
31
|
-
var _default = (0, _commons.createLunaticComponent)(LunaticInputNumber, {
|
|
33
|
+
var _default = (0, _commons.createLunaticComponent)((0, _commons.createCustomizableLunaticField)(LunaticInputNumber), {
|
|
32
34
|
inputId: 'lunatic-input-number'
|
|
33
35
|
});
|
|
34
36
|
|
|
@@ -117,7 +117,8 @@ function BlockForLoop(_ref) {
|
|
|
117
117
|
v[args.index] = value;
|
|
118
118
|
handleChange(response, v, {
|
|
119
119
|
loop: true,
|
|
120
|
-
length: nbRows
|
|
120
|
+
length: nbRows,
|
|
121
|
+
shallowIteration: args.index
|
|
121
122
|
});
|
|
122
123
|
} else handleChange(response, value, _objectSpread(_objectSpread({}, args), {}, {
|
|
123
124
|
loop: true,
|
|
@@ -145,7 +146,8 @@ function BlockForLoop(_ref) {
|
|
|
145
146
|
features: features,
|
|
146
147
|
preferences: preferences,
|
|
147
148
|
executeExpression: executeExpression,
|
|
148
|
-
custom: custom
|
|
149
|
+
custom: custom,
|
|
150
|
+
errors: errors
|
|
149
151
|
}), /*#__PURE__*/_react["default"].createElement(_declarations.DeclarationsDetachable, {
|
|
150
152
|
declarations: declarations,
|
|
151
153
|
id: id,
|
|
@@ -158,15 +160,13 @@ function BlockForLoop(_ref) {
|
|
|
158
160
|
onClick: removeRow,
|
|
159
161
|
disabled: nbRows === 1,
|
|
160
162
|
custom: custom
|
|
161
|
-
}, _i18n["default"].DEFAULT_BUTTON_REMOVE))
|
|
162
|
-
errors: errors
|
|
163
|
-
}));
|
|
163
|
+
}, _i18n["default"].DEFAULT_BUTTON_REMOVE)));
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
return null;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
var _default = BlockForLoop; // handleChange={handleChange}
|
|
169
|
+
var _default = (0, _commons.createCustomizableLunaticField)(BlockForLoop); // handleChange={handleChange}
|
|
170
170
|
// preferences={preferences}
|
|
171
171
|
// savingType={savingType}
|
|
172
172
|
// management={management}
|
|
@@ -175,4 +175,5 @@ var _default = BlockForLoop; // handleChange={handleChange}
|
|
|
175
175
|
// missing={missing}
|
|
176
176
|
// shortcut={shortcut}
|
|
177
177
|
|
|
178
|
+
|
|
178
179
|
exports["default"] = _default;
|
|
@@ -39,7 +39,8 @@ function Row(_ref) {
|
|
|
39
39
|
preferences = _ref.preferences,
|
|
40
40
|
rowIndex = _ref.rowIndex,
|
|
41
41
|
executeExpression = _ref.executeExpression,
|
|
42
|
-
custom = _ref.custom
|
|
42
|
+
custom = _ref.custom,
|
|
43
|
+
errors = _ref.errors;
|
|
43
44
|
var handleChangeRow = (0, _react.useCallback)(function (response, value) {
|
|
44
45
|
handleChange(response, value, {
|
|
45
46
|
index: rowIndex
|
|
@@ -48,7 +49,7 @@ function Row(_ref) {
|
|
|
48
49
|
return components.reduce(function (row, component) {
|
|
49
50
|
var response = component.response,
|
|
50
51
|
id = component.id;
|
|
51
|
-
var idComponent = "".concat(id, "-").concat(rowIndex
|
|
52
|
+
var idComponent = "".concat(id, "-").concat(rowIndex, " ");
|
|
52
53
|
var value = undefined;
|
|
53
54
|
|
|
54
55
|
if (response) {
|
|
@@ -73,7 +74,8 @@ function Row(_ref) {
|
|
|
73
74
|
preferences: preferences,
|
|
74
75
|
iteration: rowIndex,
|
|
75
76
|
executeExpression: executeExpression,
|
|
76
|
-
custom: custom
|
|
77
|
+
custom: custom,
|
|
78
|
+
errors: errors
|
|
77
79
|
})]);
|
|
78
80
|
}, []);
|
|
79
81
|
}
|
|
@@ -128,7 +128,8 @@ function RosterforLoop(_ref) {
|
|
|
128
128
|
management: management,
|
|
129
129
|
missing: missing,
|
|
130
130
|
shortcut: shortcut,
|
|
131
|
-
custom: custom
|
|
131
|
+
custom: custom,
|
|
132
|
+
errors: errors
|
|
132
133
|
}), /*#__PURE__*/_react["default"].createElement(_declarations.DeclarationsDetachable, {
|
|
133
134
|
declarations: declarations,
|
|
134
135
|
id: id,
|
|
@@ -141,13 +142,12 @@ function RosterforLoop(_ref) {
|
|
|
141
142
|
onClick: removeRow,
|
|
142
143
|
disabled: nbRows === 1,
|
|
143
144
|
custom: custom
|
|
144
|
-
}, _i18n["default"].DEFAULT_BUTTON_REMOVE))
|
|
145
|
-
errors: errors
|
|
146
|
-
}));
|
|
145
|
+
}, _i18n["default"].DEFAULT_BUTTON_REMOVE)));
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
return null;
|
|
150
149
|
}
|
|
151
150
|
|
|
152
|
-
var _default = RosterforLoop;
|
|
151
|
+
var _default = (0, _commons.createCustomizableLunaticField)(RosterforLoop);
|
|
152
|
+
|
|
153
153
|
exports["default"] = _default;
|
|
@@ -29,7 +29,8 @@ function Row(_ref) {
|
|
|
29
29
|
management = _ref.management,
|
|
30
30
|
preferences = _ref.preferences,
|
|
31
31
|
executeExpression = _ref.executeExpression,
|
|
32
|
-
custom = _ref.custom
|
|
32
|
+
custom = _ref.custom,
|
|
33
|
+
errors = _ref.errors;
|
|
33
34
|
var handleChangeRow = (0, _react.useCallback)(function (response, value) {
|
|
34
35
|
handleChange(response, value, {
|
|
35
36
|
index: rowIndex
|
|
@@ -44,7 +45,7 @@ function Row(_ref) {
|
|
|
44
45
|
}, components.map(function (component) {
|
|
45
46
|
var response = component.response,
|
|
46
47
|
id = component.id;
|
|
47
|
-
var idComponent = "".concat(id, "-").concat(rowIndex
|
|
48
|
+
var idComponent = "".concat(id, "-").concat(rowIndex, " ");
|
|
48
49
|
var value = undefined;
|
|
49
50
|
var key = "".concat(id, "-").concat(rowIndex);
|
|
50
51
|
|
|
@@ -72,7 +73,8 @@ function Row(_ref) {
|
|
|
72
73
|
preferences: preferences,
|
|
73
74
|
iteration: rowIndex,
|
|
74
75
|
executeExpression: executeExpression,
|
|
75
|
-
custom: custom
|
|
76
|
+
custom: custom,
|
|
77
|
+
errors: errors
|
|
76
78
|
}));
|
|
77
79
|
}));
|
|
78
80
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.lunatic-modal-controls {
|
|
2
2
|
position: fixed;
|
|
3
|
-
|
|
4
3
|
top: 0;
|
|
5
4
|
left: 0;
|
|
6
5
|
width: 100%;
|
|
@@ -9,29 +8,13 @@
|
|
|
9
8
|
|
|
10
9
|
.modal {
|
|
11
10
|
background-color: snow;
|
|
12
|
-
height:
|
|
13
|
-
width:
|
|
11
|
+
height: 25%;
|
|
12
|
+
width: 50%;
|
|
14
13
|
margin: auto;
|
|
15
|
-
margin-top:
|
|
14
|
+
margin-top: 38vh;
|
|
16
15
|
position: relative;
|
|
17
16
|
border-radius: 8px;
|
|
18
|
-
|
|
19
|
-
.title {
|
|
20
|
-
height: 32px;
|
|
21
|
-
background-color: darkslateblue;
|
|
22
|
-
color: black;
|
|
23
|
-
font-size: 18px;
|
|
24
|
-
font-weight: bolder;
|
|
25
|
-
line-height: 32px;
|
|
26
|
-
padding: 0 12px;
|
|
27
|
-
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
28
|
-
border-radius: 8px 8px 0 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
17
|
.body {
|
|
32
|
-
// padding: 0 12px 0 12px;
|
|
33
|
-
padding: 12px 0 0 12px;
|
|
34
|
-
height: 60%;
|
|
35
18
|
color: black;
|
|
36
19
|
font-size: 16px;
|
|
37
20
|
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
@@ -41,9 +24,9 @@
|
|
|
41
24
|
position: absolute;
|
|
42
25
|
bottom: 0;
|
|
43
26
|
right: 0;
|
|
44
|
-
margin: 0
|
|
27
|
+
margin: 0 0.2em 0.2em 0;
|
|
45
28
|
:first-child {
|
|
46
|
-
margin-right:
|
|
29
|
+
margin-right: 0.5em;
|
|
47
30
|
}
|
|
48
31
|
}
|
|
49
32
|
}
|
|
@@ -53,16 +36,11 @@
|
|
|
53
36
|
li,
|
|
54
37
|
div,
|
|
55
38
|
span {
|
|
56
|
-
margin: 0;
|
|
57
|
-
padding: 0;
|
|
58
39
|
border: none;
|
|
59
40
|
list-style: none;
|
|
60
41
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.info {
|
|
66
|
-
}
|
|
42
|
+
}
|
|
43
|
+
ul {
|
|
44
|
+
padding: 0.5em;
|
|
67
45
|
}
|
|
68
46
|
}
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "PairwiseBlock", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _block["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "PairwiseLinks", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -16,8 +10,6 @@ Object.defineProperty(exports, "PairwiseLinks", {
|
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
12
|
|
|
19
|
-
var _block = _interopRequireDefault(require("./block"));
|
|
20
|
-
|
|
21
13
|
var _links = _interopRequireDefault(require("./links"));
|
|
22
14
|
|
|
23
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
File without changes
|