@dloizides/ui-tables 3.4.0 → 3.5.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/dist/index.d.mts CHANGED
@@ -611,6 +611,8 @@ interface SelectFilterField extends FilterFieldBase {
611
611
  interface TextFilterField extends FilterFieldBase {
612
612
  kind: 'text';
613
613
  placeholder?: string;
614
+ /** testID of the input itself; defaults to `<field testID>-input`. */
615
+ inputTestID?: string;
614
616
  }
615
617
  /** A numeric text input (`keyboardType="numeric"`). Value stays a string (''=unset). */
616
618
  interface NumberFilterField extends FilterFieldBase {
package/dist/index.d.ts CHANGED
@@ -611,6 +611,8 @@ interface SelectFilterField extends FilterFieldBase {
611
611
  interface TextFilterField extends FilterFieldBase {
612
612
  kind: 'text';
613
613
  placeholder?: string;
614
+ /** testID of the input itself; defaults to `<field testID>-input`. */
615
+ inputTestID?: string;
614
616
  }
615
617
  /** A numeric text input (`keyboardType="numeric"`). Value stays a string (''=unset). */
616
618
  interface NumberFilterField extends FilterFieldBase {
package/dist/index.js CHANGED
@@ -1693,6 +1693,10 @@ function SelectField({ field, barTestID, value, onChange, placeholder, dropdownH
1693
1693
  }
1694
1694
  );
1695
1695
  }
1696
+ function inputTestID(field, barTestID) {
1697
+ const custom = field.kind === "text" ? field.inputTestID : void 0;
1698
+ return custom ?? `${field.testID ?? fieldTestID(barTestID, field.key)}-input`;
1699
+ }
1696
1700
  function TextField({ field, barTestID, value, onChange, onSubmit }) {
1697
1701
  const { theme } = uiFeedback.useUi();
1698
1702
  const { colors } = theme;
@@ -1700,7 +1704,7 @@ function TextField({ field, barTestID, value, onChange, onSubmit }) {
1700
1704
  const { a11yProps, hintNode } = a11y.useA11y({
1701
1705
  label: field.label,
1702
1706
  hint: field.accessibilityHint,
1703
- testID: `${field.testID ?? fieldTestID(barTestID, field.key)}-input`
1707
+ testID: inputTestID(field, barTestID)
1704
1708
  });
1705
1709
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1706
1710
  /* @__PURE__ */ jsxRuntime.jsx(