oolib 2.28.1 → 2.28.2
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/dist/components/RadioAndCheckbox/comps/CheckboxList/index.d.ts +2 -2
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.js +3 -3
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.d.ts +2 -2
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.js +3 -3
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ export function CheckboxList({ id, injectOtherOption, value: valueProp, onChange
|
|
|
4
4
|
value?: any[];
|
|
5
5
|
onChange: any;
|
|
6
6
|
commonIsCorrectDesc: any;
|
|
7
|
-
options
|
|
7
|
+
options?: any[];
|
|
8
8
|
saveValueAsString: any;
|
|
9
9
|
inputStyle?: string;
|
|
10
10
|
rightWrongResult: any;
|
|
11
|
-
listType
|
|
11
|
+
listType?: string;
|
|
12
12
|
invert: any;
|
|
13
13
|
optionsLimit?: number;
|
|
14
14
|
style: any;
|
|
@@ -51,11 +51,11 @@ var optionsContainers = {
|
|
|
51
51
|
};
|
|
52
52
|
var convToString = function (value) { return value.map(function (v) { var _a; return (_a = v.display_desc) !== null && _a !== void 0 ? _a : v.value; }); };
|
|
53
53
|
function CheckboxList(_a) {
|
|
54
|
-
var id = _a.id, _b = _a.injectOtherOption, injectOtherOption = _b === void 0 ? false : _b, _c = _a.value, valueProp = _c === void 0 ? [] : _c, onChange = _a.onChange, commonIsCorrectDesc = _a.commonIsCorrectDesc,
|
|
54
|
+
var id = _a.id, _b = _a.injectOtherOption, injectOtherOption = _b === void 0 ? false : _b, _c = _a.value, valueProp = _c === void 0 ? [] : _c, onChange = _a.onChange, commonIsCorrectDesc = _a.commonIsCorrectDesc, _d = _a.options, options = _d === void 0 ? [] : _d, saveValueAsString = _a.saveValueAsString, _e = _a.inputStyle, inputStyle = _e === void 0 ? 'checkbox' : _e, rightWrongResult = _a.rightWrongResult, _f = _a.listType, listType = _f === void 0 ? 'horizontal' : _f, invert = _a.invert, _g = _a.optionsLimit, optionsLimit = _g === void 0 ? Infinity : _g, style = _a.style, disabled = _a.disabled, className = _a.className, S = _a.S, readOnly = _a.readOnly;
|
|
55
55
|
var props = arguments[0];
|
|
56
56
|
var shouldHideSomeOptions = options.length > optionsLimit;
|
|
57
|
-
var
|
|
58
|
-
var
|
|
57
|
+
var _h = (0, react_1.useState)(false), seeMore = _h[0], setSeeMore = _h[1];
|
|
58
|
+
var _j = (0, utils_1.genDisplayedOptions)({ injectOtherOption: injectOtherOption, options: options, valueProp: valueProp, saveValueAsString: saveValueAsString }), typicalOptions = _j.typicalOptions, injectedOtherOption = _j.injectedOtherOption;
|
|
59
59
|
var value = saveValueAsString ?
|
|
60
60
|
typicalOptions
|
|
61
61
|
.concat(injectedOtherOption || [])
|
|
@@ -4,11 +4,11 @@ export function RadioList({ id, injectOtherOption, value: valueProp, onChange, s
|
|
|
4
4
|
value: any;
|
|
5
5
|
onChange: any;
|
|
6
6
|
saveValueAsString: any;
|
|
7
|
-
options
|
|
7
|
+
options?: any[];
|
|
8
8
|
commonIsCorrectDesc: any;
|
|
9
9
|
rightWrongResult: any;
|
|
10
10
|
optionsLimit?: number;
|
|
11
|
-
listType
|
|
11
|
+
listType?: string;
|
|
12
12
|
disabled: any;
|
|
13
13
|
invert: any;
|
|
14
14
|
readOnly: any;
|
|
@@ -45,11 +45,11 @@ var styled_1 = require("../../styled");
|
|
|
45
45
|
var utils_1 = require("../../utils");
|
|
46
46
|
var comps_1 = require("./comps");
|
|
47
47
|
function RadioList(_a) {
|
|
48
|
-
var id = _a.id, _b = _a.injectOtherOption, injectOtherOption = _b === void 0 ? false : _b, valueProp = _a.value, onChange = _a.onChange, saveValueAsString = _a.saveValueAsString,
|
|
48
|
+
var id = _a.id, _b = _a.injectOtherOption, injectOtherOption = _b === void 0 ? false : _b, valueProp = _a.value, onChange = _a.onChange, saveValueAsString = _a.saveValueAsString, _c = _a.options, options = _c === void 0 ? [] : _c, commonIsCorrectDesc = _a.commonIsCorrectDesc, rightWrongResult = _a.rightWrongResult, _d = _a.optionsLimit, optionsLimit = _d === void 0 ? Infinity : _d, _e = _a.listType, listType = _e === void 0 ? 'horizontal' : _e, disabled = _a.disabled, invert = _a.invert, readOnly = _a.readOnly, S = _a.S;
|
|
49
49
|
var props = arguments[0];
|
|
50
50
|
var shouldHideSomeOptions = options.length > optionsLimit;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
51
|
+
var _f = (0, react_1.useState)(false), seeMore = _f[0], setSeeMore = _f[1];
|
|
52
|
+
var _g = (0, utils_1.genDisplayedOptions)({ injectOtherOption: injectOtherOption, options: options, valueProp: valueProp, saveValueAsString: saveValueAsString }), typicalOptions = _g.typicalOptions, injectedOtherOption = _g.injectedOtherOption;
|
|
53
53
|
var value = saveValueAsString ?
|
|
54
54
|
typicalOptions
|
|
55
55
|
.concat(injectedOtherOption || [])
|