Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
78 lines
2.5 KiB
TypeScript
78 lines
2.5 KiB
TypeScript
// Module ID: 5771
|
|
// Function ID: 5772
|
|
// Name: TableRadioGroup
|
|
// Dependencies: [32, 19, 1074, 21, 5772, 5773, 5774, 2]
|
|
// Exports: TableRadioGroup
|
|
|
|
// Module 5771 (TableRadioGroup)
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = fn;
|
|
let jsx = fn(21).jsx;
|
|
const context = noop.createContext({ selectedValue: null, onSelect: fn(1074).NOOP });
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("design/components/TableRow/native/TableRadioGroup.native.tsx");
|
|
|
|
export const TableRadioGroupContext = context;
|
|
export const TableRadioGroup = function TableRadioGroup(arg0) {
|
|
({ value, defaultValue, onChange } = arg0);
|
|
_slicedToArray = undefined;
|
|
noop = undefined;
|
|
jsx = undefined;
|
|
let onSelect;
|
|
dependencyMap = tmp;
|
|
let tmp2 = null;
|
|
({ children, title, description, helperText, hasIcons, groupRef, accessibilityLabel } = arg0);
|
|
if (undefined === value) {
|
|
if (defaultValue == null) {
|
|
defaultValue = null;
|
|
}
|
|
tmp2 = defaultValue;
|
|
}
|
|
[tmp4, c2] = noop.useState(tmp2);
|
|
if (undefined !== value) {
|
|
tmp4 = value;
|
|
}
|
|
if (tmp4 == null) {
|
|
tmp4 = null;
|
|
}
|
|
noop = tmp4;
|
|
const items = [undefined !== value, onChange, tmp4];
|
|
const imperativeHandle = obj.useImperativeHandle(groupRef, () => ({
|
|
setValue(arg0) {
|
|
if (!closure_1_1) {
|
|
_undefined(arg0);
|
|
}
|
|
if (onChange != null) {
|
|
tmp3(arg0);
|
|
}
|
|
},
|
|
getValue() {
|
|
return selectedValue;
|
|
}
|
|
}), items);
|
|
jsx = obj.useContext(onChange(5772).RedesignCompatContext);
|
|
const items1 = [undefined !== value, onChange];
|
|
onSelect = obj.useCallback((arg0) => {
|
|
if (!closure_1) {
|
|
_undefined(arg0);
|
|
}
|
|
if (onChange != null) {
|
|
tmp3(arg0);
|
|
}
|
|
}, items1);
|
|
const items2 = [tmp4, onSelect];
|
|
const obj2 = { value: noop.useMemo(() => ({ selectedValue, onSelect }), items2), children: null };
|
|
const obj3 = { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null };
|
|
const Children = obj.Children;
|
|
obj3.children = Children.map(children, (type) => {
|
|
if (!noop.isValidElement(type)) {
|
|
let tmp4 = null;
|
|
return tmp4;
|
|
}
|
|
tmp4 = type;
|
|
});
|
|
obj2.children = jsx(onChange(5773).TableRowGroup, { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null });
|
|
return <onSelect.Provider value={noop.useMemo(() => ({ selectedValue, onSelect }), items2)}>{null}</onSelect.Provider>;
|
|
};
|