@dloizides/ui-tables 3.0.0 → 3.0.1
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.js +20 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1670,21 +1670,6 @@ function SelectField({ field, barTestID, value, onChange, placeholder, dropdownH
|
|
|
1670
1670
|
}
|
|
1671
1671
|
);
|
|
1672
1672
|
}
|
|
1673
|
-
var NO_HINT = "";
|
|
1674
|
-
function SingleDateField({ field, barTestID, value, onChange, onSubmit, containerStyle }) {
|
|
1675
|
-
const testID = field.testID ?? fieldTestID(barTestID, field.key);
|
|
1676
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: containerStyle, testID, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1677
|
-
uiForms.DateField,
|
|
1678
|
-
{
|
|
1679
|
-
accessibilityHint: field.accessibilityHint ?? NO_HINT,
|
|
1680
|
-
label: field.label,
|
|
1681
|
-
testID: `${testID}-input`,
|
|
1682
|
-
value,
|
|
1683
|
-
onChange,
|
|
1684
|
-
onSubmit
|
|
1685
|
-
}
|
|
1686
|
-
) });
|
|
1687
|
-
}
|
|
1688
1673
|
function TextField({ field, barTestID, value, onChange, onSubmit }) {
|
|
1689
1674
|
const { theme } = uiFeedback.useUi();
|
|
1690
1675
|
const { colors } = theme;
|
|
@@ -1736,6 +1721,7 @@ function clampedMinWidth(minWidth) {
|
|
|
1736
1721
|
}
|
|
1737
1722
|
var EMPTY_RANGE = { from: "", to: "" };
|
|
1738
1723
|
var GROW_FLEX = 1;
|
|
1724
|
+
var NO_HINT = "";
|
|
1739
1725
|
function asString(value) {
|
|
1740
1726
|
return typeof value === "string" ? value : "";
|
|
1741
1727
|
}
|
|
@@ -1757,21 +1743,26 @@ function FilterFieldView({ field, barTestID, values, setField, onSubmit, strings
|
|
|
1757
1743
|
return /* @__PURE__ */ jsxRuntime.jsx(BooleanField, { field, barTestID, value: asBool(raw), onChange: (v) => setField(field.key, v) });
|
|
1758
1744
|
}
|
|
1759
1745
|
const containerStyle = fieldContainerStyle(field);
|
|
1760
|
-
|
|
1761
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1762
|
-
SingleDateField,
|
|
1763
|
-
{
|
|
1764
|
-
barTestID,
|
|
1765
|
-
containerStyle,
|
|
1766
|
-
field,
|
|
1767
|
-
value: asString(raw),
|
|
1768
|
-
onChange: (v) => setField(field.key, v),
|
|
1769
|
-
onSubmit
|
|
1770
|
-
}
|
|
1771
|
-
);
|
|
1772
|
-
}
|
|
1746
|
+
const testID = field.testID ?? fieldTestID(barTestID, field.key);
|
|
1773
1747
|
const body = (() => {
|
|
1774
1748
|
switch (field.kind) {
|
|
1749
|
+
case "date":
|
|
1750
|
+
return function renderDateInput(context) {
|
|
1751
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
+
uiForms.DateInput,
|
|
1753
|
+
{
|
|
1754
|
+
context,
|
|
1755
|
+
fieldProps: {
|
|
1756
|
+
accessibilityHint: field.accessibilityHint ?? NO_HINT,
|
|
1757
|
+
label: field.label,
|
|
1758
|
+
testID: `${testID}-input`,
|
|
1759
|
+
value: asString(raw),
|
|
1760
|
+
onChange: (v) => setField(field.key, v),
|
|
1761
|
+
onSubmit
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
);
|
|
1765
|
+
};
|
|
1775
1766
|
case "select":
|
|
1776
1767
|
if (renderSelect !== void 0) {
|
|
1777
1768
|
return renderSelect({
|
|
@@ -1837,7 +1828,7 @@ function FilterFieldView({ field, barTestID, values, setField, onSubmit, strings
|
|
|
1837
1828
|
containerStyle,
|
|
1838
1829
|
label: field.label,
|
|
1839
1830
|
labelVariant: "control",
|
|
1840
|
-
testID
|
|
1831
|
+
testID,
|
|
1841
1832
|
children: body
|
|
1842
1833
|
}
|
|
1843
1834
|
);
|