oolib 2.127.5 → 2.128.1
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.
|
@@ -69,8 +69,6 @@ var ActionMenu = function (_a) {
|
|
|
69
69
|
(0, useHandleClickOutside_1.useHandleClickOutside)(popOutOfOverflowHiddenParent
|
|
70
70
|
? [actionMenuRef, optionsWrapperRef]
|
|
71
71
|
: actionMenuRef, setShowActions);
|
|
72
|
-
if (!actions || actions.length === 0)
|
|
73
|
-
return null;
|
|
74
72
|
var getOpsRect = function () { var _a; return (_a = optionsWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(); };
|
|
75
73
|
var ButtonComp = ButtonComps[_ButtonComp];
|
|
76
74
|
var buttonSize = M ? { M: true } : {};
|
|
@@ -93,6 +91,8 @@ var ActionMenu = function (_a) {
|
|
|
93
91
|
};
|
|
94
92
|
}, []);
|
|
95
93
|
var _h = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _h.fixPos, applyFixedPos = _h.applyFixedPos, removeFixedPos = _h.removeFixedPos, trackerRef = _h.trackerRef;
|
|
94
|
+
if (!actions || actions.length === 0)
|
|
95
|
+
return null;
|
|
96
96
|
var genLighbox = function () {
|
|
97
97
|
var _a, _b;
|
|
98
98
|
return (react_1.default.createElement(styled_1.StyledActionsDropMenu, { id: "dropmenu", align: align, invert: invert, optionsHeight: (_a = getOpsRect()) === null || _a === void 0 ? void 0 : _a.height, optionsWidth: (_b = getOpsRect()) === null || _b === void 0 ? void 0 : _b.width, showActions: showActions, fixPos: fixPos },
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
export default RadioListMultiQuestion;
|
|
2
|
-
declare function RadioListMultiQuestion({
|
|
3
|
-
label: any;
|
|
4
|
-
sublabel: any;
|
|
2
|
+
declare function RadioListMultiQuestion({ options, subQuestionLabels, onChange, value, readOnly }: {
|
|
5
3
|
options: any;
|
|
6
4
|
subQuestionLabels: any;
|
|
7
5
|
onChange: any;
|
|
8
6
|
value: any;
|
|
9
7
|
readOnly: any;
|
|
10
|
-
}): React.JSX.Element;
|
|
8
|
+
}, ...args: any[]): React.JSX.Element;
|
|
11
9
|
import React from 'react';
|
|
@@ -40,21 +40,22 @@ var Typo_1 = require("../Typo");
|
|
|
40
40
|
var styled_1 = require("./styled");
|
|
41
41
|
var BlockLabel_1 = require("../BlockLabel");
|
|
42
42
|
var themes_1 = require("../../themes");
|
|
43
|
+
var getBlockLabelProps_1 = require("../../utils/getBlockLabelProps");
|
|
43
44
|
var greyColor10 = themes_1.colors.greyColor10;
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
45
|
+
function RadioListMultiQuestion(_a) {
|
|
46
|
+
var options = _a.options, subQuestionLabels = _a.subQuestionLabels, onChange = _a.onChange, value = _a.value, readOnly = _a.readOnly;
|
|
47
|
+
// const [ value, setValue ] = useState(_value);
|
|
48
|
+
var props = arguments[0];
|
|
47
49
|
var handleChange = function (subQuestionValue, option) {
|
|
48
50
|
// const key = `${label.trim().replaceAll(' ','').toLowerCase()}.${subQuestionValue}`
|
|
49
51
|
var display = option.display, optionValue = option.value;
|
|
50
|
-
|
|
52
|
+
onChange(function (prevValue) {
|
|
51
53
|
var _a;
|
|
52
54
|
return (__assign(__assign({}, prevValue), (_a = {}, _a[subQuestionValue] = { display: display, value: optionValue }, _a)));
|
|
53
55
|
});
|
|
54
|
-
onChange(value);
|
|
55
56
|
};
|
|
56
57
|
return (react_1.default.createElement("div", null,
|
|
57
|
-
react_1.default.createElement(BlockLabel_1.BlockLabel, {
|
|
58
|
+
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props))),
|
|
58
59
|
react_1.default.createElement(styled_1.StyledTable, null,
|
|
59
60
|
react_1.default.createElement("thead", null,
|
|
60
61
|
react_1.default.createElement("tr", null,
|
|
@@ -73,5 +74,6 @@ var RadioListMultiQuestion = function (_a) {
|
|
|
73
74
|
react_1.default.createElement(styled_1.StyledElem, null,
|
|
74
75
|
react_1.default.createElement(RadioAndCheckbox_1.RadioButton, { isSelected: value[subQuestion === null || subQuestion === void 0 ? void 0 : subQuestion.value] && ((_a = value[subQuestion === null || subQuestion === void 0 ? void 0 : subQuestion.value]) === null || _a === void 0 ? void 0 : _a.value) === (option === null || option === void 0 ? void 0 : option.value), onClick: function () { return !readOnly && handleChange(subQuestion === null || subQuestion === void 0 ? void 0 : subQuestion.value, option); } }))));
|
|
75
76
|
}))); })))));
|
|
76
|
-
}
|
|
77
|
+
}
|
|
78
|
+
;
|
|
77
79
|
exports.default = RadioListMultiQuestion;
|