@dloizides/ui-tables 3.5.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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- `Filters`: optional `wrapperTestID` on every field puts an id on the field's outer wrapper only; control ids (`-input`, `-from`, `-to`) keep deriving from `testID`. Default unchanged.
|
|
7
8
|
- `WorkQueue`: a StatusLedger of waiting work, oldest first, in three variants (`WorkQueueVariant.Bands` default, `Table` with a toned age label, `Bar` with an age bar against `limitMs`); age band headings with counts, `buildAgeColumn` takes the cell component (`AgeLabelCell` / `AgeBarCell`).
|
|
8
9
|
- `fetchAllPages(fetchPage, { pageSize, maxPages, concurrency = 2 })`: reads every page from page 1 in batches of `concurrency`, stops at `maxPages`, returns `{ rows, truncated }`.
|
|
9
10
|
- `useReportFilterQuery({ params, setParams, keys })`: router-agnostic URL state for `ReportFilters`, plus `reportFiltersToParams` (every key, `undefined` clears).
|
package/dist/index.d.mts
CHANGED
|
@@ -591,6 +591,8 @@ interface FilterFieldBase {
|
|
|
591
591
|
label: string;
|
|
592
592
|
/** Override the derived testID (`${barTestID}-field-${key}` by default). */
|
|
593
593
|
testID?: string;
|
|
594
|
+
/** testID of the field's outer wrapper only; defaults to the field testID. Control ids keep deriving from `testID`. */
|
|
595
|
+
wrapperTestID?: string;
|
|
594
596
|
/** Let the field grow to fill spare width (search boxes usually do). Default false. */
|
|
595
597
|
grow?: boolean;
|
|
596
598
|
/** Minimum width (px) before the field wraps to the next line. Sensible per-kind default. */
|
package/dist/index.d.ts
CHANGED
|
@@ -591,6 +591,8 @@ interface FilterFieldBase {
|
|
|
591
591
|
label: string;
|
|
592
592
|
/** Override the derived testID (`${barTestID}-field-${key}` by default). */
|
|
593
593
|
testID?: string;
|
|
594
|
+
/** testID of the field's outer wrapper only; defaults to the field testID. Control ids keep deriving from `testID`. */
|
|
595
|
+
wrapperTestID?: string;
|
|
594
596
|
/** Let the field grow to fill spare width (search boxes usually do). Default false. */
|
|
595
597
|
grow?: boolean;
|
|
596
598
|
/** Minimum width (px) before the field wraps to the next line. Sensible per-kind default. */
|
package/dist/index.js
CHANGED
|
@@ -1621,7 +1621,7 @@ function BooleanField({ field, barTestID, value, onChange }) {
|
|
|
1621
1621
|
const { theme } = uiFeedback.useUi();
|
|
1622
1622
|
const { colors, palette } = theme;
|
|
1623
1623
|
const testID = field.testID ?? fieldTestID(barTestID, field.key);
|
|
1624
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: filterStyles.switchRow, testID, children: [
|
|
1624
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: filterStyles.switchRow, testID: field.wrapperTestID ?? testID, children: [
|
|
1625
1625
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [uiForms.controlStyles.subLabel, { color: colors.text }], children: field.label }),
|
|
1626
1626
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1627
1627
|
reactNative.Pressable,
|
|
@@ -1869,7 +1869,7 @@ function FilterFieldView({ field, barTestID, values, setField, onSubmit, strings
|
|
|
1869
1869
|
error: field.kind === "dateRange" ? field.error : void 0,
|
|
1870
1870
|
label: field.label,
|
|
1871
1871
|
labelVariant: "control",
|
|
1872
|
-
testID,
|
|
1872
|
+
testID: field.wrapperTestID ?? testID,
|
|
1873
1873
|
children: body
|
|
1874
1874
|
}
|
|
1875
1875
|
);
|