@inseefr/lunatic 2.5.1-testRoundaboutFix → 2.5.2-rc1-beta
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/commons/components/combo-box/combo-box-container.js +16 -7
- package/lib/components/commons/components/combo-box/combo-box-container.spec.js +5 -5
- package/lib/components/commons/components/combo-box/combo-box-content-box.js +25 -0
- package/lib/components/commons/components/combo-box/combo-box-content.js +11 -11
- package/lib/components/commons/components/combo-box/combo-box.js +26 -11
- package/lib/components/commons/components/combo-box/panel/panel-container.js +5 -2
- package/lib/components/commons/components/combo-box/panel/panel-container.spec.js +7 -6
- package/lib/components/commons/components/combo-box/panel/panel.js +2 -2
- package/lib/components/commons/components/combo-box/selection/selection-container.js +3 -2
- package/lib/components/commons/components/combo-box/selection/selection.js +3 -1
- package/lib/components/component-set/html/component-set-components.js +5 -23
- package/lib/components/dropdown/lunatic-dropdown.js +3 -1
- package/lib/components/index.js +7 -0
- package/lib/components/loop/block-for-loop/row.js +6 -16
- package/lib/components/modal/html/modal.js +88 -0
- package/lib/components/modal/html/modal.scss +43 -0
- package/lib/components/modal/index.js +13 -0
- package/lib/components/modal/lunatic-modal.js +38 -0
- package/lib/components/pairwise-links/orchestrator.js +2 -0
- package/lib/components/pairwise-links/pairwise-links.js +1 -1
- package/lib/components/pairwise-links/row.js +2 -0
- package/lib/components/suggester/html/suggester.js +10 -6
- package/lib/components/suggester/lunatic-suggester.js +3 -1
- package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +5 -2
- package/lib/src/components/commons/components/combo-box/combo-box-content-box.d.ts +8 -0
- package/lib/src/components/commons/components/combo-box/combo-box-content.d.ts +2 -1
- package/lib/src/components/commons/components/combo-box/combo-box.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/combo-box.stories.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/panel/panel-container.d.ts +2 -2
- package/lib/src/components/commons/components/combo-box/selection/selection-container.d.ts +2 -1
- package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +2 -1
- package/lib/src/components/component-set/html/component-set-components.d.ts +1 -1
- package/lib/src/components/dropdown/lunatic-dropdown.d.ts +1 -1
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/components/modal/html/modal.d.ts +14 -0
- package/lib/src/components/modal/index.d.ts +1 -0
- package/lib/src/components/modal/lunatic-modal.d.ts +3 -0
- package/lib/src/components/pairwise-links/row.d.ts +1 -1
- package/lib/src/components/suggester/html/suggester.d.ts +1 -0
- package/lib/src/components/suggester/lunatic-suggester.d.ts +1 -1
- package/lib/src/components/type.d.ts +8 -0
- package/lib/src/use-lunatic/actions.d.ts +4 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +40 -0
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +2 -0
- package/lib/src/use-lunatic/type.d.ts +2 -0
- package/lib/src/use-lunatic/use-lunatic.d.ts +22 -0
- package/lib/src/utils/get-component-value.d.ts +5 -0
- package/lib/stories/checkboxGroup/checkboxGroup.stories.js +17 -1
- package/lib/stories/checkboxGroup/sourceComponentset.json +424 -0
- package/lib/stories/checkboxGroup/sourceLoop.json +83 -0
- package/lib/stories/modal/modal.stories.js +34 -0
- package/lib/stories/modal/source.json +97 -0
- package/lib/stories/questionnaires/simpsons/simpsons.stories.js +33 -36
- package/lib/stories/suggester/simple.json +15 -0
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +6 -2
- package/lib/use-lunatic/commons/page-navigation.js +2 -2
- package/lib/use-lunatic/commons/page.js +0 -6
- package/lib/use-lunatic/initial-state.js +2 -0
- package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +9 -3
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +11 -4
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +13 -5
- package/lib/use-lunatic/reducer/reduce-go-to-page.js +7 -6
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +0 -3
- package/lib/use-lunatic/reducer/reduce-on-init.js +11 -7
- package/lib/use-lunatic/use-lunatic.js +3 -1
- package/lib/utils/get-component-value.js +38 -0
- package/package.json +1 -1
|
@@ -3,19 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _createCustomizableField = _interopRequireDefault(require("../../create-customizable-field"));
|
|
9
|
+
var _errors = _interopRequireDefault(require("../errors"));
|
|
8
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
12
|
function ComboBoxContainer(_ref) {
|
|
11
13
|
var children = _ref.children,
|
|
12
14
|
className = _ref.className,
|
|
15
|
+
classNamePrefix = _ref.classNamePrefix,
|
|
13
16
|
id = _ref.id,
|
|
14
17
|
_ref$classStyle = _ref.classStyle,
|
|
15
|
-
classStyle = _ref$classStyle === void 0 ? 'default-style' : _ref$classStyle
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
classStyle = _ref$classStyle === void 0 ? 'default-style' : _ref$classStyle,
|
|
19
|
+
errors = _ref.errors;
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
id: "".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-combo-box-container-").concat(id),
|
|
22
|
+
className: (0, _classnames["default"])(className, "".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-combo-box-container"), "".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-suggester-").concat(classStyle), "lunatic-suggester-default-style", classStyle),
|
|
23
|
+
children: [children, errors && /*#__PURE__*/(0, _jsxRuntime.jsx)(_errors["default"], {
|
|
24
|
+
errors: errors,
|
|
25
|
+
activeId: id
|
|
26
|
+
})]
|
|
20
27
|
});
|
|
21
|
-
}
|
|
28
|
+
}
|
|
29
|
+
var _default = (0, _createCustomizableField["default"])(ComboBoxContainer, 'ComboboxContainer');
|
|
30
|
+
exports["default"] = _default;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _react2 = require("@testing-library/react");
|
|
5
|
-
var _comboBoxContainer = require("./combo-box-container");
|
|
5
|
+
var _comboBoxContainer = _interopRequireDefault(require("./combo-box-container"));
|
|
6
6
|
var _vitest = require("vitest");
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
(0, _vitest.describe)('ComboBoxContainer', function () {
|
|
10
10
|
(0, _vitest.it)('renders with default styles when no classStyle prop is provided', function () {
|
|
11
|
-
var _render = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer
|
|
11
|
+
var _render = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer["default"], {
|
|
12
12
|
id: "test-id",
|
|
13
13
|
children: "Content"
|
|
14
14
|
})),
|
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
16
|
(0, _vitest.expect)(container.firstChild).toHaveClass('default-style');
|
|
17
17
|
});
|
|
18
18
|
(0, _vitest.it)('renders with additional styles when classStyle prop is provided', function () {
|
|
19
|
-
var _render2 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer["default"], {
|
|
20
20
|
id: "test-id",
|
|
21
21
|
classStyle: "custom-style",
|
|
22
22
|
children: "Content"
|
|
@@ -26,7 +26,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
26
26
|
(0, _vitest.expect)(container.firstChild).toHaveClass('custom-style');
|
|
27
27
|
});
|
|
28
28
|
(0, _vitest.it)('renders children inside the component', function () {
|
|
29
|
-
var _render3 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer
|
|
29
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer["default"], {
|
|
30
30
|
id: "test-id",
|
|
31
31
|
children: "Content"
|
|
32
32
|
})),
|
|
@@ -34,7 +34,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
34
34
|
(0, _vitest.expect)(getByText('Content')).toBeInTheDocument();
|
|
35
35
|
});
|
|
36
36
|
(0, _vitest.it)('passes className prop to the component', function () {
|
|
37
|
-
var _render4 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer
|
|
37
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContainer["default"], {
|
|
38
38
|
id: "test-id",
|
|
39
39
|
className: "test-class",
|
|
40
40
|
children: "Content"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ComboBoxContentBox = ComboBoxContentBox;
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _index = require("../../index");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function ComboBoxContentBox(_ref) {
|
|
14
|
+
var children = _ref.children,
|
|
15
|
+
classNamePrefix = _ref.classNamePrefix,
|
|
16
|
+
focused = _ref.focused;
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
18
|
+
className: (0, _classnames["default"])("".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-combo-box"), {
|
|
19
|
+
focused: focused
|
|
20
|
+
}),
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
var _default = (0, _index.createCustomizableLunaticField)(ComboBoxContentBox, 'ComboboxContentBox');
|
|
25
|
+
exports["default"] = _default;
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _keyboardKeyCodes = require("./state-management/reduce-on-keydown/keyboard-key-codes");
|
|
12
12
|
var _index = require("../../index");
|
|
13
|
+
var _comboBoxContentBox = _interopRequireDefault(require("./combo-box-content-box"));
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
16
|
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); }
|
|
@@ -19,7 +20,8 @@ function ComboBoxContent(_ref) {
|
|
|
19
20
|
focused = _ref.focused,
|
|
20
21
|
onFocus = _ref.onFocus,
|
|
21
22
|
onBlur = _ref.onBlur,
|
|
22
|
-
onKeyDown = _ref.onKeyDown
|
|
23
|
+
onKeyDown = _ref.onKeyDown,
|
|
24
|
+
classNamePrefix = _ref.classNamePrefix;
|
|
23
25
|
var ref = (0, _react.useRef)(null);
|
|
24
26
|
var onClick = (0, _react.useCallback)(function (e) {
|
|
25
27
|
var _ref$current;
|
|
@@ -44,19 +46,17 @@ function ComboBoxContent(_ref) {
|
|
|
44
46
|
|
|
45
47
|
onKeyDown(key);
|
|
46
48
|
}, [onKeyDown]);
|
|
47
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
48
|
-
|
|
49
|
-
focused: focused
|
|
50
|
-
}),
|
|
51
|
-
onFocus: onFocus,
|
|
52
|
-
onClick: onFocus,
|
|
53
|
-
onKeyDown: handleKeyDown,
|
|
54
|
-
ref: ref,
|
|
55
|
-
tabIndex: 0,
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_comboBoxContentBox["default"], {
|
|
50
|
+
classNamePrefix: classNamePrefix,
|
|
56
51
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
57
|
-
className: (0, _classnames["default"])('lunatic-combo-box-content
|
|
52
|
+
className: (0, _classnames["default"])("".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-combo-box-content"), {
|
|
58
53
|
focused: focused
|
|
59
54
|
}),
|
|
55
|
+
ref: ref,
|
|
56
|
+
tabIndex: 0,
|
|
57
|
+
onFocus: onFocus,
|
|
58
|
+
onClick: onFocus,
|
|
59
|
+
onKeyDown: handleKeyDown,
|
|
60
60
|
children: children
|
|
61
61
|
})
|
|
62
62
|
});
|
|
@@ -12,10 +12,9 @@ var _stateManagement = require("./state-management");
|
|
|
12
12
|
require("./combo-box.scss");
|
|
13
13
|
var _selection = require("./selection/selection");
|
|
14
14
|
var _panel = require("./panel/panel");
|
|
15
|
-
var _comboBoxContainer = require("./combo-box-container");
|
|
15
|
+
var _comboBoxContainer = _interopRequireDefault(require("./combo-box-container"));
|
|
16
16
|
var _comboBoxContent = _interopRequireDefault(require("./combo-box-content"));
|
|
17
17
|
var _label = _interopRequireDefault(require("../label"));
|
|
18
|
-
var _errors = _interopRequireDefault(require("../errors"));
|
|
19
18
|
var _index = require("../../index");
|
|
20
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -33,6 +32,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
33
32
|
var EMPTY_SEARCH = '';
|
|
34
33
|
function ComboBox(_ref) {
|
|
35
34
|
var className = _ref.className,
|
|
35
|
+
classNamePrefix = _ref.classNamePrefix,
|
|
36
36
|
_ref$classStyle = _ref.classStyle,
|
|
37
37
|
classStyle = _ref$classStyle === void 0 ? 'default-style' : _ref$classStyle,
|
|
38
38
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -73,12 +73,26 @@ function ComboBox(_ref) {
|
|
|
73
73
|
getOptionValue: getOptionValue
|
|
74
74
|
}));
|
|
75
75
|
}, [options, value, getOptionValue]);
|
|
76
|
+
|
|
77
|
+
// This useEffect ensures that onSelect is called when selectedIndex changes
|
|
78
|
+
(0, _react.useEffect)(function () {
|
|
79
|
+
if (selectedIndex) {
|
|
80
|
+
var option = options[selectedIndex];
|
|
81
|
+
onSelect(getOptionValue(option));
|
|
82
|
+
}
|
|
83
|
+
}, [selectedIndex, options, getOptionValue, onSelect]);
|
|
76
84
|
var onFocus = (0, _react.useCallback)(function () {
|
|
85
|
+
if (disabled) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
77
88
|
dispatch(_stateManagement.actions.onFocus());
|
|
78
|
-
}, []);
|
|
89
|
+
}, [disabled]);
|
|
79
90
|
var onBlur = (0, _react.useCallback)(function () {
|
|
91
|
+
if (disabled) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
80
94
|
dispatch(_stateManagement.actions.onBlur());
|
|
81
|
-
}, []);
|
|
95
|
+
}, [disabled]);
|
|
82
96
|
var handleSelect = (0, _react.useCallback)(function (index) {
|
|
83
97
|
var indexNumber = parseInt(index, 10);
|
|
84
98
|
var option = options[indexNumber];
|
|
@@ -97,16 +111,18 @@ function ComboBox(_ref) {
|
|
|
97
111
|
dispatch(_stateManagement.actions.onDelete());
|
|
98
112
|
onChange === null || onChange === void 0 ? void 0 : onChange(EMPTY_SEARCH);
|
|
99
113
|
}, [onChange]);
|
|
114
|
+
var showClearButton = !disabled;
|
|
100
115
|
if (messageError) {
|
|
101
116
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
102
117
|
className: "lunatic-combo-box-message-error",
|
|
103
118
|
children: messageError
|
|
104
119
|
});
|
|
105
120
|
}
|
|
106
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_comboBoxContainer
|
|
121
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_comboBoxContainer["default"], {
|
|
107
122
|
id: id,
|
|
108
123
|
classStyle: classStyle,
|
|
109
|
-
|
|
124
|
+
classNamePrefix: classNamePrefix,
|
|
125
|
+
errors: errors,
|
|
110
126
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_label["default"], {
|
|
111
127
|
htmlFor: id,
|
|
112
128
|
id: labelId,
|
|
@@ -117,6 +133,7 @@ function ComboBox(_ref) {
|
|
|
117
133
|
onFocus: onFocus,
|
|
118
134
|
onBlur: onBlur,
|
|
119
135
|
onKeyDown: onKeyDown,
|
|
136
|
+
classNamePrefix: classNamePrefix,
|
|
120
137
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_selection.Selection, {
|
|
121
138
|
labelRenderer: labelRenderer,
|
|
122
139
|
placeholder: placeholder,
|
|
@@ -129,7 +146,8 @@ function ComboBox(_ref) {
|
|
|
129
146
|
editable: editable,
|
|
130
147
|
selectedIndex: selectedIndex,
|
|
131
148
|
options: options,
|
|
132
|
-
onChange: handleChange
|
|
149
|
+
onChange: handleChange,
|
|
150
|
+
classNamePrefix: classNamePrefix
|
|
133
151
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panel.Panel, {
|
|
134
152
|
optionRenderer: optionRenderer,
|
|
135
153
|
options: options,
|
|
@@ -140,16 +158,13 @@ function ComboBox(_ref) {
|
|
|
140
158
|
search: search,
|
|
141
159
|
onSelect: handleSelect
|
|
142
160
|
})]
|
|
143
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_clearButton.ClearButton, {
|
|
161
|
+
}), showClearButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_clearButton.ClearButton, {
|
|
144
162
|
className: (0, _classnames["default"])({
|
|
145
163
|
focused: focused
|
|
146
164
|
}),
|
|
147
165
|
search: search,
|
|
148
166
|
onClick: onDelete,
|
|
149
167
|
editable: editable
|
|
150
|
-
}), errors && /*#__PURE__*/(0, _jsxRuntime.jsx)(_errors["default"], {
|
|
151
|
-
errors: errors,
|
|
152
|
-
activeId: id
|
|
153
168
|
})]
|
|
154
169
|
});
|
|
155
170
|
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _createCustomizableField = _interopRequireDefault(require("../../../create-customizable-field"));
|
|
8
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
11
|
function PanelContainer(_ref) {
|
|
@@ -22,4 +23,6 @@ function PanelContainer(_ref) {
|
|
|
22
23
|
role: "listbox",
|
|
23
24
|
children: children
|
|
24
25
|
});
|
|
25
|
-
}
|
|
26
|
+
}
|
|
27
|
+
var _default = (0, _createCustomizableField["default"])(PanelContainer, 'ComboboxPanelContainer');
|
|
28
|
+
exports["default"] = _default;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = require("@testing-library/react");
|
|
4
4
|
var _vitest = require("vitest");
|
|
5
|
-
var _panelContainer = require("./panel-container");
|
|
5
|
+
var _panelContainer = _interopRequireDefault(require("./panel-container"));
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
8
|
(0, _vitest.describe)('PanelContainer', function () {
|
|
8
9
|
(0, _vitest.it)('should render children', function () {
|
|
9
|
-
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_panelContainer
|
|
10
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_panelContainer["default"], {
|
|
10
11
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
11
12
|
children: "Item 1"
|
|
12
13
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
@@ -20,7 +21,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
20
21
|
});
|
|
21
22
|
(0, _vitest.it)('should set the id attribute', function () {
|
|
22
23
|
var id = 'test-panel';
|
|
23
|
-
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer
|
|
24
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer["default"], {
|
|
24
25
|
id: id,
|
|
25
26
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
26
27
|
children: "Item 1"
|
|
@@ -29,7 +30,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
30
|
(0, _vitest.expect)(_react.screen.getByRole('listbox')).toHaveAttribute('id', "lunatic-combo-box-panel-".concat(id));
|
|
30
31
|
});
|
|
31
32
|
(0, _vitest.it)('should set the aria-label attribute', function () {
|
|
32
|
-
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer
|
|
33
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer["default"], {
|
|
33
34
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
34
35
|
children: "Item 1"
|
|
35
36
|
})
|
|
@@ -37,7 +38,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
37
38
|
(0, _vitest.expect)(_react.screen.getByRole('listbox')).toHaveAttribute('aria-label', 'suggestions');
|
|
38
39
|
});
|
|
39
40
|
(0, _vitest.it)('should set the focused class when focused prop is true', function () {
|
|
40
|
-
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer
|
|
41
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer["default"], {
|
|
41
42
|
focused: true,
|
|
42
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
43
44
|
children: "Item 1"
|
|
@@ -46,7 +47,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
46
47
|
(0, _vitest.expect)(_react.screen.getByRole('listbox')).toHaveClass('focused');
|
|
47
48
|
});
|
|
48
49
|
(0, _vitest.it)('should set the expanded class when expanded prop is true', function () {
|
|
49
|
-
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer
|
|
50
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer["default"], {
|
|
50
51
|
expanded: true,
|
|
51
52
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
52
53
|
children: "Item 1"
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Panel = Panel;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _panelContainer = require("./panel-container");
|
|
8
|
+
var _panelContainer = _interopRequireDefault(require("./panel-container"));
|
|
9
9
|
var _optionContainer = require("./option-container");
|
|
10
10
|
var _comboBoxOption = _interopRequireDefault(require("./combo-box-option"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -22,7 +22,7 @@ function Panel(_ref) {
|
|
|
22
22
|
onSelect = _ref.onSelect;
|
|
23
23
|
var visibleOptions = expanded ? options : [];
|
|
24
24
|
var ComboBoxOptionComponent = OptionRender !== null && OptionRender !== void 0 ? OptionRender : _comboBoxOption["default"];
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_panelContainer["default"], {
|
|
26
26
|
expanded: expanded,
|
|
27
27
|
focused: focused,
|
|
28
28
|
id: "".concat(id, "-list"),
|
|
@@ -14,11 +14,12 @@ function SelectionContainer(_ref) {
|
|
|
14
14
|
expanded = _ref.expanded,
|
|
15
15
|
focused = _ref.focused,
|
|
16
16
|
disabled = _ref.disabled,
|
|
17
|
-
labelId = _ref.labelId
|
|
17
|
+
labelId = _ref.labelId,
|
|
18
|
+
classNamePrefix = _ref.classNamePrefix;
|
|
18
19
|
var comboBoxId = "".concat(id);
|
|
19
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
21
|
id: comboBoxId,
|
|
21
|
-
className: (0, _classnames["default"])('lunatic-combo-box-selection
|
|
22
|
+
className: (0, _classnames["default"])("".concat(classNamePrefix !== null && classNamePrefix !== void 0 ? classNamePrefix : 'lunatic', "-combo-box-selection"), {
|
|
22
23
|
focused: focused,
|
|
23
24
|
disabled: disabled
|
|
24
25
|
}),
|
|
@@ -21,7 +21,8 @@ function Selection(_ref) {
|
|
|
21
21
|
options = _ref.options,
|
|
22
22
|
editable = _ref.editable,
|
|
23
23
|
labelId = _ref.labelId,
|
|
24
|
-
id = _ref.id
|
|
24
|
+
id = _ref.id,
|
|
25
|
+
classNamePrefix = _ref.classNamePrefix;
|
|
25
26
|
var onChangeEx = (0, _react.useCallback)(function (e) {
|
|
26
27
|
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
27
28
|
}, [onChange]);
|
|
@@ -30,6 +31,7 @@ function Selection(_ref) {
|
|
|
30
31
|
labelId: labelId,
|
|
31
32
|
expanded: expanded,
|
|
32
33
|
"aria-owns": "".concat(id, "-list"),
|
|
34
|
+
classNamePrefix: classNamePrefix,
|
|
33
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LabelOrInput.LabelOrInput, {
|
|
34
36
|
labelRenderer: labelRenderer,
|
|
35
37
|
placeholder: placeholder,
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _commons = require("../../commons");
|
|
9
9
|
var _componentSetComponentContainer = _interopRequireDefault(require("./component-set-component-container"));
|
|
10
|
+
var _getComponentValue = require("../../../utils/get-component-value");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
var _excluded = ["components", "componentClassName", "className", "value"];
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -17,45 +18,26 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
17
18
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
19
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
20
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
/**
|
|
21
|
-
* Extract the value associated with a component
|
|
22
|
-
*/
|
|
23
|
-
function getComponentValue(component, value) {
|
|
24
|
-
if (hasResponse(component) && component.response.name in value) {
|
|
25
|
-
var _value$component$resp;
|
|
26
|
-
return (_value$component$resp = value[component.response.name]) !== null && _value$component$resp !== void 0 ? _value$component$resp : '';
|
|
27
|
-
}
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Narrow the type of the component
|
|
33
|
-
*/
|
|
34
|
-
function hasResponse(component) {
|
|
35
|
-
return 'response' in component;
|
|
36
|
-
}
|
|
37
21
|
function ComponentSetComponents(_ref) {
|
|
38
22
|
var components = _ref.components,
|
|
39
23
|
componentClassName = _ref.componentClassName,
|
|
40
24
|
className = _ref.className,
|
|
41
|
-
|
|
25
|
+
valueMap = _ref.value,
|
|
42
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
27
|
if (!Array.isArray(components)) {
|
|
44
28
|
return null;
|
|
45
29
|
}
|
|
46
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
47
31
|
children: components.map(function (component) {
|
|
48
|
-
var id = component.id;
|
|
49
|
-
var componentValue = getComponentValue(component, value);
|
|
50
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentSetComponentContainer["default"], {
|
|
51
33
|
className: className,
|
|
52
34
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_commons.OrchestratedComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
53
35
|
component: component,
|
|
54
|
-
id: id,
|
|
36
|
+
id: component.id,
|
|
55
37
|
className: componentClassName,
|
|
56
|
-
value:
|
|
38
|
+
value: (0, _getComponentValue.getComponentValue)(component, valueMap)
|
|
57
39
|
}))
|
|
58
|
-
}, id);
|
|
40
|
+
}, component.id);
|
|
59
41
|
})
|
|
60
42
|
});
|
|
61
43
|
}
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _lunaticComponentWithoutLabel = _interopRequireDefault(require("../commons/components/lunatic-component-without-label"));
|
|
9
9
|
var _useOnHandleChange = _interopRequireDefault(require("../commons/use-on-handle-change"));
|
|
10
10
|
var _dropdown = _interopRequireDefault(require("./html/dropdown"));
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
14
|
function LunaticDropdown(_ref) {
|
|
@@ -16,6 +17,7 @@ function LunaticDropdown(_ref) {
|
|
|
16
17
|
options = _ref.options,
|
|
17
18
|
writable = _ref.writable,
|
|
18
19
|
disabled = _ref.disabled,
|
|
20
|
+
className = _ref.className,
|
|
19
21
|
value = _ref.value,
|
|
20
22
|
response = _ref.response,
|
|
21
23
|
errors = _ref.errors,
|
|
@@ -48,7 +50,7 @@ function LunaticDropdown(_ref) {
|
|
|
48
50
|
options: options,
|
|
49
51
|
onSelect: onChange,
|
|
50
52
|
value: value,
|
|
51
|
-
className: "lunatic-dropdown",
|
|
53
|
+
className: (0, _classnames["default"])(className, "lunatic-dropdown"),
|
|
52
54
|
errors: errors,
|
|
53
55
|
label: label
|
|
54
56
|
})
|
package/lib/components/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "ComponentSet", {
|
|
|
33
33
|
return _componentSet["default"];
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "ConfirmationModal", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _modal["default"];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "Datepicker", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function get() {
|
|
@@ -205,4 +211,5 @@ var _summary = require("./summary");
|
|
|
205
211
|
var _questionInformation = _interopRequireDefault(require("./questions/question-information"));
|
|
206
212
|
var _questionContext = _interopRequireDefault(require("./questions/question-context"));
|
|
207
213
|
var _questionExplication = _interopRequireDefault(require("./question-explication"));
|
|
214
|
+
var _modal = _interopRequireDefault(require("./modal"));
|
|
208
215
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _commons = require("../../commons");
|
|
10
|
+
var _getComponentValue = require("../../../utils/get-component-value");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
12
|
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); }
|
|
11
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
14
|
function Row(_ref) {
|
|
14
15
|
var components = _ref.components,
|
|
15
16
|
_ref$valueMap = _ref.valueMap,
|
|
@@ -31,16 +32,8 @@ function Row(_ref) {
|
|
|
31
32
|
}, [handleChange, rowIndex]);
|
|
32
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
33
34
|
children: components.map(function (component) {
|
|
34
|
-
var id = component.id;
|
|
35
|
-
var
|
|
36
|
-
var value = undefined;
|
|
37
|
-
if (hasResponse(component)) {
|
|
38
|
-
var name = component.response.name;
|
|
39
|
-
var valueArray = valueMap[name];
|
|
40
|
-
if (Array.isArray(valueArray)) {
|
|
41
|
-
value = valueArray[rowIndex] || '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
35
|
+
var id = "".concat(component.id, "-").concat(rowIndex);
|
|
36
|
+
var value = (0, _getComponentValue.getComponentValue)(component, valueMap, rowIndex);
|
|
44
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_commons.OrchestratedComponent, {
|
|
45
38
|
component: component,
|
|
46
39
|
handleChange: handleChangeRow,
|
|
@@ -49,18 +42,15 @@ function Row(_ref) {
|
|
|
49
42
|
shortcut: shortcut,
|
|
50
43
|
management: management,
|
|
51
44
|
value: value,
|
|
52
|
-
id:
|
|
45
|
+
id: id,
|
|
53
46
|
preferences: preferences,
|
|
54
47
|
iteration: rowIndex,
|
|
55
48
|
executeExpression: executeExpression,
|
|
56
49
|
errors: errors,
|
|
57
50
|
disabled: disabled
|
|
58
|
-
},
|
|
51
|
+
}, id);
|
|
59
52
|
})
|
|
60
53
|
});
|
|
61
54
|
}
|
|
62
|
-
function hasResponse(component) {
|
|
63
|
-
return !!component && _typeof(component) === 'object' && 'response' in component;
|
|
64
|
-
}
|
|
65
55
|
var _default = Row;
|
|
66
56
|
exports["default"] = _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _commons = require("../../commons");
|
|
9
|
+
var _reactDom = require("react-dom");
|
|
10
|
+
require("./modal.scss");
|
|
11
|
+
var _button = _interopRequireDefault(require("../../button"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function Modal(props) {
|
|
15
|
+
var id = props.id,
|
|
16
|
+
label = props.label,
|
|
17
|
+
description = props.description,
|
|
18
|
+
goNextPage = props.goNextPage,
|
|
19
|
+
goPreviousPage = props.goPreviousPage;
|
|
20
|
+
var first = (0, _react.useRef)(null);
|
|
21
|
+
var last = (0, _react.useRef)(null);
|
|
22
|
+
(0, _react.useEffect)(function () {
|
|
23
|
+
var _first$current;
|
|
24
|
+
var focusOnInit = first === null || first === void 0 || (_first$current = first.current) === null || _first$current === void 0 ? void 0 : _first$current.lastElementChild;
|
|
25
|
+
focusOnInit.focus();
|
|
26
|
+
}, [first]);
|
|
27
|
+
var onKeyDown = (0, _react.useCallback)(function (e) {
|
|
28
|
+
var _first$current2, _last$current;
|
|
29
|
+
var firstButtonToFocus = first === null || first === void 0 || (_first$current2 = first.current) === null || _first$current2 === void 0 ? void 0 : _first$current2.lastElementChild;
|
|
30
|
+
var lastButtonToFocus = last === null || last === void 0 || (_last$current = last.current) === null || _last$current === void 0 ? void 0 : _last$current.lastElementChild;
|
|
31
|
+
if (e.key === 'Tab') {
|
|
32
|
+
if (e.shiftKey) {
|
|
33
|
+
if (document.activeElement === firstButtonToFocus) {
|
|
34
|
+
lastButtonToFocus.focus();
|
|
35
|
+
e.nativeEvent.preventDefault();
|
|
36
|
+
}
|
|
37
|
+
} else if (document.activeElement === lastButtonToFocus) {
|
|
38
|
+
firstButtonToFocus.focus();
|
|
39
|
+
e.nativeEvent.preventDefault();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, [first, last]);
|
|
43
|
+
var handleNextClick = (0, _react.useCallback)(function () {
|
|
44
|
+
goNextPage();
|
|
45
|
+
}, [goNextPage]);
|
|
46
|
+
var handlePreviousClick = (0, _react.useCallback)(function () {
|
|
47
|
+
goPreviousPage();
|
|
48
|
+
}, [goPreviousPage]);
|
|
49
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/(0, _jsxRuntime.jsx)("dialog", {
|
|
50
|
+
className: "lunatic-modal",
|
|
51
|
+
open: true,
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
|
+
className: "modal-content",
|
|
54
|
+
onKeyDown: onKeyDown,
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
56
|
+
id: id,
|
|
57
|
+
className: "lunatic-modal-container",
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
59
|
+
className: "close-button",
|
|
60
|
+
ref: first,
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button["default"], {
|
|
62
|
+
onClick: handlePreviousClick,
|
|
63
|
+
children: "fermer x"
|
|
64
|
+
})
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
|
+
className: "modal-message",
|
|
67
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
68
|
+
children: label
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
70
|
+
children: description
|
|
71
|
+
})]
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
73
|
+
className: "cancel-confirm-buttons",
|
|
74
|
+
ref: last,
|
|
75
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button["default"], {
|
|
76
|
+
onClick: handlePreviousClick,
|
|
77
|
+
children: "Annuler"
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button["default"], {
|
|
79
|
+
onClick: handleNextClick,
|
|
80
|
+
children: "Je confirme"
|
|
81
|
+
})]
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
}), document.body);
|
|
86
|
+
}
|
|
87
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Modal, 'Modal');
|
|
88
|
+
exports["default"] = _default;
|