Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
61 lines
2.2 KiB
TypeScript
61 lines
2.2 KiB
TypeScript
// Module ID: 5618
|
|
// Function ID: 5619
|
|
// Name: TableCheckboxRow
|
|
// Dependencies: [19, 21, 4310, 4277, 4292, 5619, 5631, 2]
|
|
// Exports: TableCheckboxRow
|
|
|
|
// Module 5618 (TableCheckboxRow)
|
|
import native from "native" /* 4277 */;
|
|
import useA11yRolesNative from "useA11yRolesNative" /* 4292 */;
|
|
import ReanimatedRexport from "ReanimatedRexport" /* 4310 */;
|
|
import TableRow from "TableRow" /* 5619 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const FormCheckbox = tmp2(5631);
|
|
require = fn;
|
|
const jsx = fn(21).jsx;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("design/components/TableRow/native/TableCheckboxRow.native.tsx");
|
|
|
|
export const TableCheckboxRow = function TableCheckboxRow(checked) {
|
|
checked = checked.checked;
|
|
({ label, subLabel, disabled } = checked);
|
|
if (disabled === undefined) {
|
|
disabled = false;
|
|
}
|
|
const onPress = checked.onPress;
|
|
const merged = Object.assign(checked, Object.assign({ checked: 0, label: 0, subLabel: 0, disabled: 0, onPress: 0, accessibilityHint: 0 }));
|
|
const sharedValue = ReanimatedRexport.useSharedValue(0);
|
|
const items = [sharedValue];
|
|
const items1 = [onPress, sharedValue, checked];
|
|
const callback = noop.useCallback(() => {
|
|
const result = sharedValue.set(1);
|
|
}, items);
|
|
const callback1 = noop.useCallback(() => {
|
|
const result = sharedValue.set(0);
|
|
onPress(!checked);
|
|
}, items1);
|
|
const nodeText = native.getNodeText(label);
|
|
const nodeText1 = native.getNodeText(subLabel);
|
|
const checkboxA11yNative = useA11yRolesNative.useCheckboxA11yNative({ checked, disabled });
|
|
({ accessibilityRole, accessibilityState } = checkboxA11yNative);
|
|
const obj5 = {};
|
|
const merged1 = Object.assign(merged);
|
|
obj5.arrow = false;
|
|
obj5.label = label;
|
|
obj5.subLabel = subLabel;
|
|
obj5.disabled = disabled;
|
|
obj5.accessibilityState = accessibilityState;
|
|
obj5.accessible = true;
|
|
obj5.accessibilityRole = accessibilityRole;
|
|
let str = nodeText1;
|
|
if (nodeText1 == null) {
|
|
str = "";
|
|
}
|
|
obj5.accessibilityLabel = "" + nodeText + ", " + str;
|
|
obj5.accessibilityHint = checked.accessibilityHint;
|
|
obj5.onPressIn = callback;
|
|
obj5.onPress = callback1;
|
|
obj5.trailing = jsx(FormCheckbox.FormCheckbox, { checked });
|
|
return jsx(TableRow.TableRow, {});
|
|
};
|