@dloizides/ui-tables 1.21.1 → 1.22.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.mjs CHANGED
@@ -483,6 +483,7 @@ function DataTableRow({
483
483
  onRowPress,
484
484
  getRowAccessibilityLabel,
485
485
  renderRowDetail,
486
+ getRowDetailAccessibilityLabel,
486
487
  expanded,
487
488
  onHoverIn,
488
489
  onHoverOut,
@@ -555,7 +556,7 @@ function DataTableRow({
555
556
  /* @__PURE__ */ jsx(
556
557
  View,
557
558
  {
558
- accessibilityLabel: t(TABLE_I18N.rowDetail),
559
+ accessibilityLabel: getRowDetailAccessibilityLabel?.(row) ?? t(TABLE_I18N.rowDetail),
559
560
  accessibilityRole: "summary",
560
561
  style: [tableStyles.rowDetail, { borderTopColor: colors.border, backgroundColor: colors.background }, o?.rowDetail],
561
562
  testID: rowDetailTestID(tableTestID, rowKey),
@@ -853,6 +854,7 @@ function DataTable(props) {
853
854
  loadingLabel,
854
855
  emptyLabel,
855
856
  renderRowDetail,
857
+ getRowDetailAccessibilityLabel,
856
858
  expandedRowKeys,
857
859
  styleOverrides: o,
858
860
  selectedRowKeys,
@@ -917,6 +919,7 @@ function DataTable(props) {
917
919
  columns,
918
920
  expanded: expandedRowKeys?.includes(key) ?? false,
919
921
  getRowAccessibilityLabel,
922
+ getRowDetailAccessibilityLabel,
920
923
  keyboardNavigation,
921
924
  renderRowDetail,
922
925
  roving,
@@ -2010,6 +2013,7 @@ var LedgerLayout = /* @__PURE__ */ ((LedgerLayout2) => {
2010
2013
  var GAP = 12;
2011
2014
  var HEADING_FONT = 15;
2012
2015
  var HEADING_WEIGHT = "700";
2016
+ var expandedKeys = (key) => key === null || key === void 0 ? void 0 : [key];
2013
2017
  var styles3 = StyleSheet.create({
2014
2018
  root: { gap: GAP },
2015
2019
  heading: { fontSize: HEADING_FONT, fontWeight: HEADING_WEIGHT },
@@ -2023,9 +2027,12 @@ function LedgerSection({ title, rows, columns, emptyLabel, testID, ledger }) {
2023
2027
  DataTable,
2024
2028
  {
2025
2029
  columns,
2030
+ expandedRowKeys: expandedKeys(ledger.expandedRowKey),
2026
2031
  getRowAccessibilityLabel: ledger.getRowAccessibilityLabel,
2032
+ getRowDetailAccessibilityLabel: ledger.getRowAccessibilityLabel,
2027
2033
  keyExtractor: ledger.keyExtractor,
2028
2034
  onRowPress: ledger.onRowPress,
2035
+ renderRowDetail: ledger.renderRowDetail,
2029
2036
  rows,
2030
2037
  stackBreakpoint: ledger.breakpoint ?? CARD_STACK_BREAKPOINT,
2031
2038
  testID: `${testID}-table`
@@ -2073,10 +2080,13 @@ function StatusLedger(props) {
2073
2080
  {
2074
2081
  columns: view.tableColumns,
2075
2082
  emptyLabel: labels.empty,
2083
+ expandedRowKeys: expandedKeys(props.expandedRowKey),
2076
2084
  getRowAccessibilityLabel: props.getRowAccessibilityLabel,
2085
+ getRowDetailAccessibilityLabel: props.getRowAccessibilityLabel,
2077
2086
  keyExtractor: props.keyExtractor,
2078
2087
  loading,
2079
2088
  onRowPress: props.onRowPress,
2089
+ renderRowDetail: props.renderRowDetail,
2080
2090
  rows: view.visible,
2081
2091
  stackBreakpoint: feed ? breakpoint : 0,
2082
2092
  testID: `${testID}-table`