@dloizides/ui-tables 3.4.0 → 3.6.0
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/CHANGELOG.md +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1616,7 +1616,7 @@ function BooleanField({ field, barTestID, value, onChange }) {
|
|
|
1616
1616
|
const { theme } = useUi();
|
|
1617
1617
|
const { colors, palette } = theme;
|
|
1618
1618
|
const testID = field.testID ?? fieldTestID(barTestID, field.key);
|
|
1619
|
-
return /* @__PURE__ */ jsxs(View, { style: filterStyles.switchRow, testID, children: [
|
|
1619
|
+
return /* @__PURE__ */ jsxs(View, { style: filterStyles.switchRow, testID: field.wrapperTestID ?? testID, children: [
|
|
1620
1620
|
/* @__PURE__ */ jsx(Text, { style: [controlStyles.subLabel, { color: colors.text }], children: field.label }),
|
|
1621
1621
|
/* @__PURE__ */ jsx(
|
|
1622
1622
|
Pressable,
|
|
@@ -1688,6 +1688,10 @@ function SelectField({ field, barTestID, value, onChange, placeholder, dropdownH
|
|
|
1688
1688
|
}
|
|
1689
1689
|
);
|
|
1690
1690
|
}
|
|
1691
|
+
function inputTestID(field, barTestID) {
|
|
1692
|
+
const custom = field.kind === "text" ? field.inputTestID : void 0;
|
|
1693
|
+
return custom ?? `${field.testID ?? fieldTestID(barTestID, field.key)}-input`;
|
|
1694
|
+
}
|
|
1691
1695
|
function TextField({ field, barTestID, value, onChange, onSubmit }) {
|
|
1692
1696
|
const { theme } = useUi();
|
|
1693
1697
|
const { colors } = theme;
|
|
@@ -1695,7 +1699,7 @@ function TextField({ field, barTestID, value, onChange, onSubmit }) {
|
|
|
1695
1699
|
const { a11yProps, hintNode } = useA11y({
|
|
1696
1700
|
label: field.label,
|
|
1697
1701
|
hint: field.accessibilityHint,
|
|
1698
|
-
testID:
|
|
1702
|
+
testID: inputTestID(field, barTestID)
|
|
1699
1703
|
});
|
|
1700
1704
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1701
1705
|
/* @__PURE__ */ jsx(
|
|
@@ -1860,7 +1864,7 @@ function FilterFieldView({ field, barTestID, values, setField, onSubmit, strings
|
|
|
1860
1864
|
error: field.kind === "dateRange" ? field.error : void 0,
|
|
1861
1865
|
label: field.label,
|
|
1862
1866
|
labelVariant: "control",
|
|
1863
|
-
testID,
|
|
1867
|
+
testID: field.wrapperTestID ?? testID,
|
|
1864
1868
|
children: body
|
|
1865
1869
|
}
|
|
1866
1870
|
);
|