# Changelog

<!-- http://keepachangelog.com/en/1.0.0/
Added       for new features.
Changed     for changes in existing functionality.
Deprecated  for once-stable features removed in upcoming releases.
Removed     for deprecated features removed in this release.
Fixed       for any bug fixes.
Security    to invite users to upgrade in case of vulnerabilities.
-->

## [6.1.0-beta.69] - 2026/08/31

### Fixed

- Status labels no longer capitalize the letter after an accent. The title-case
  helper matched word boundaries with `\b\w`, which excludes accented
  characters, so "EN REVISIÓN" rendered as "En RevisióN". Word boundaries are
  now detected with whitespace plus the Unicode letter class.
- Checks without a stored image show the "not available" placeholder again.
  `viacheck-check-detail` only applies its `errorImage` prop in the legacy
  carousel; with `newDesign` it mounts the CheckViewer and forwards an empty
  URL with no fallback, leaving the frame blank. The viewer is now fed the
  placeholder when the check has no front image.
- The filters card no longer paints over the host's blue top bar on small
  screens. `.cdr-filters-form` was raised to `z-index: 100` when it only needed
  to clear the results table's sticky header (`z-index: 2`), and ViaOne's
  `.navigation` declares `z-index: 1001` without `position`, making that value
  inert. The filters subtree now uses `z-index: 3`.

## [6.1.0-beta.68] - 2026/08/31

### Changed

- The close (X) button of the check zoom no longer fills with blue on hover,
  focus or press: it keeps the same white background with the blue frame and
  glyph at all times.

  Inverting it meant the control changed completely at the exact moment of the
  click, and over the check image the solid blue block drew more attention than
  the check itself. `:active` and `:focus` are pinned explicitly because the
  browser applies its own pressed-button styling.

  Keyboard focus is now shown with a ring outside the frame instead of the
  inverted fill, so removing the inversion does not cost accessibility.

## [6.1.0-beta.67] - 2026/08/31

### Fixed

- The filter placeholders were hardcoded in English and stayed that way with the
  UI in Spanish: Transit, Account, Check #, Payee, Batch ID and the "$ to" of the
  Between range. They now go through `t()`.

  No new translation keys were needed: `langReport.transit`, `account`,
  `checkNumber`, `payee`, `batchId` and `to` already existed and were already
  being used for the labels of those same fields. Each call keeps an inline
  English fallback so a host missing a key still renders something usable instead
  of the raw key.

- The amount comparison select widened from 110px to 130px. A native `select`
  clips its text with no ellipsis, so the Spanish "Seleccionar" was being cut to
  "Selecciona" and read like a typo. The string was always correct in all four
  locale files; the box was too narrow.

## [6.1.0-beta.66] - 2026/08/31

### Added

- The Reason column is back, sitting right after Status among the base columns.

  It renders only when at least one row on the current page carries a non-empty
  `returnedReason`, the same dataset criterion the CTR block uses: a column that
  is empty on every row is noise. The value is the same `returnedReason` the
  detail panel already shows, so no backend or SP change was needed.

  Label comes from the new `langReport.reason` key ("Motivo" / "Reason"), with an
  inline fallback so an old host without the key still renders a usable header.

  Column widths are positional (`nth-child`), so the presence of the column has
  to reach the CSS: the component now adds a `cdr-container--with-reason`
  modifier. With Reason the CTR block shifts from positions 7-9 to 8-10, which is
  why two new width blocks were added (10 columns with CTR, 7 without). The
  Reason cell wraps instead of truncating, since cutting the text would leave the
  agent without the actual return motive.

### Changed

- Every purple in the report is now `violet-700` (`#4a3781`) from the design
  system, via a new `$violet` variable. It previously used the CSS keyword
  `purple` (`#800080`), which is not part of the palette. Covers the amount, the
  status text and the totals panel value for temporary account.

## [6.1.0-beta.65] - 2026/08/31

### Changed

- The info icon in the totals panel is now the institutional blue (`$secondary`)
  instead of grey.

  Scoped to `.ctr-info-icon.cdr-totals__info` on purpose, so the icons in the CTR
  column stay grey. There the icon sits next to the Send / Resend / Sent control
  and the state colour is already carried by the button; in the totals panel the
  icon is the only interactive element of the label, so it needs to read as one.

## [6.1.0-beta.64] - 2026/08/31

### Changed

- The info tooltip icons in the totals panel move to the right of the Hold and
  Temporary Account labels, so the label reads first and the icon trails it.

- The tooltip bubble is now the institutional blue (`$secondary`, `#075ca6`) with
  white text, replacing the dark grey. The arrow follows the same colour.

  Reuses the existing `$secondary` variable instead of adding a duplicate hex, so
  it stays tied to the same blue as the viewer's Front/Back/Zoom buttons and the
  ARCA registration notice. White on `#075ca6` gives 5.9:1, above the AA minimum.

  Note this applies to every CTR tooltip, including the ones in the CTR column
  next to the Send / Resend / Sent controls, which keeps them consistent.

## [6.1.0-beta.63] - 2026/08/31

### Added

- Info tooltip icons next to the Hold and Temporary Account labels in the totals
  panel, restoring the ones the previous `SummaryChecks` layout had. They carry
  the same copy (`summaryCheck.holdtooltip` / `summaryCheck.temporarytooltip`),
  so no new translation keys are needed.

  Reuses the package's existing CSS-only tooltip (`data-ctr-tooltip` + `::after`)
  instead of pulling in `react-tooltip`. A `cdr-totals__info` modifier lets the
  bubble wrap at a fixed 220px, since these strings are full sentences while the
  CTR tooltip is a short `nowrap` label.

### Changed

- Restyled the close (X) button of the check zoom overlay: blue glyph (`#075ca6`)
  inside a blue framed box, with hover and keyboard focus inverting the frame.

  The definitive style now lives in `@viamericas/viacheck-check-viewer` 0.0.4.
  This report keeps its own override because npm can resolve an older nested
  copy of the viewer here; restating the frame guarantees the design regardless
  of the installed viewer version. The override also trims the button from
  48x48 to 40x40 so the frame stays inside the overlay's 44px top padding
  instead of clipping over the check image.

## [6.1.0-beta.61] - 2026/08/31

### Changed

- The STATUS text takes the same colour as the row's amount whenever the backend
  sends one.

  The two used to be driven by different fields: the amount colour comes from
  `item.color` (where the money ended up — hold, temporary account, void,
  credited) and the status text from `checkStatus` (how far along the check is).
  A check can be "Scanned" and sit in a temporary account at the same time, which
  rendered a green status next to a purple amount.

  Mapping applied: `summary-hold-style` → blue `#005ea6`,
  `summary-void-style` → red `#d21b40`, `summary-temporary-style` → purple,
  `summary-clean-style` → green `#54ba4c`. When `item.color` is absent the status
  keeps the colour derived from its own key, so nothing regresses for states the
  backend sends no amount colour for.

- The Temporary Account total in the summary panel is purple, matching the amount
  and status colours the same concept uses in the table. It was rendering in the
  default dark grey. New modifier `cdr-totals__item-value--purple`.

- Per-column alignment rules are scoped to `.cdr-results__table-section` instead of
  `.cdr-container`. The detail panel also renders tables (Transit / Account /
  Clearing Date) and the `nth-child` rules were reaching them: the "Account" title
  picked up the left alignment meant for the USER header in column 2.

  The detail panel's table alignment is now declared explicitly. It used to be
  centred only as a side effect of that same leak, so removing the leak without
  stating it would have left those columns left-aligned.

### Fixed

- Info icons in the CTR column really do line up now, and the send/resend buttons
  are narrower.

  6.1.0-beta.60 gave the action slot `flex: 1 1 auto`. With an `auto` basis each
  element starts from its natural width (button ~112px, "Sent" text ~35px) and only
  the leftover space is shared, so they ended up different widths and the icons
  stayed slightly off. The slot now has a fixed 92px width, which pins the icon
  position and sizes every button the same.

  92px fits the longest label in both languages ("Reenviar") and is narrower than
  the 112px the consumer sets. `.ctr-btn` width and min-width are overridden so the
  slot governs the size.

## [6.1.0-beta.60] - 2026/08/31

### Removed

- Parentheses around VOID amounts in the VALUE column. The red amount and the
  STATUS column already state the check is void, and the parentheses read as a
  negative figure.

  Note: the embedded batch-detail view (`dataGrid !== null`) still renders the
  parentheses and the fixed `0.00` above the amount. It builds its columns from
  `dataGrid.columns` and has been left untouched since 6.1.0-beta.54 to avoid
  disturbing its layout, so the two views now differ more visibly.

### Changed

- The VOID entry in the STATUS column uses the same red (`#d21b40`) as the amount,
  instead of orange. Hold and Scanned already matched their amount colour; void was
  the only state where the two disagreed. `delete`, `returned` and `imgbad` keep
  their orange, since the backend sends no amount colour for them.

- Info icons in the CTR column line up across rows. The cell centred itself as a
  whole, so a ~112px button left the icon much further right than the ~35px "Sent"
  text and the icons did not form a column. The action slot now takes the
  available width and centres its own content, which pins the icon to a fixed
  position regardless of what the slot holds.

  Side effect: the send/resend buttons stretch to fill the slot, so they all share
  one width instead of the consumer's fixed 112px.

- CTR deadline badges align to the left edge of their column, and the column
  header lines up with them. They were centred, so each badge started at a
  different x depending on its length ("Sent 08/31/26" vs "15 days remain") and no
  header alignment could match them.

- The CTR column header is centred again, reverting the left alignment introduced
  in 6.1.0-beta.58. Its content is a wide control, which a centred title suits
  better. USER, ID CTR and CTR DEADLINE stay left-aligned.

### Fixed

- The chip remove control no longer turns red on hover, and the clear-all control
  is grey instead of orange. Red read as a destructive action when it only drops a
  search criterion, and the orange accent implied a primary action.

- The multiselect control's box (border, radius, background, height, typography)
  is now pinned from within `.cdr-filters__field`. `CheckboxSelect.css` declares it
  with single-class selectors, which lose against the consumer's global rules: in
  the reports micro-front the control rendered with no border and an orange chevron
  instead of grey.

## [6.1.0-beta.58] - 2026/08/31

### Fixed

- The CTR info icon used `cursor: help`, which renders a question-mark pointer and
  reads as unresolved contextual help. It now uses `cursor: default`.

### Changed

- Column headers for USER, ID CTR, CTR and CTR DEADLINE are left-aligned. Only the
  headers changed; the cell values keep their alignment, since those columns hold
  centred controls and badges.

- Check number column back to 85px from the 105px set in 6.1.0-beta.56 (row
  min-width 990px, no-CTR layout 590px). The wider value was needed for the
  spelled-out English label, which consumers have since shortened.

- The `SENT` / `RESENT` state renders as plain green text instead of a disabled
  grey button. A greyed-out control reads as something waiting to be enabled, when
  the submission has in fact already completed. It is a state, not an action, so it
  is no longer styled as one.

  The info icon and its tooltip are unchanged, and still carry the sent date.

  Consumers can drop any `.ctr-btn-sent` rule: that class is no longer rendered.
  The new element is `.ctr-sent-text`, styled by the package.

## [6.1.0-beta.57] - 2026/08/31

### Fixed

- Reverted the Status and ARCA Status filters back to `CheckboxSelect`. Release
  6.1.0-beta.56 swapped them for a react-select wrapper, which dropped the
  checkbox list and the "All" option. Only the chips in the control were wanted,
  not a different dropdown. See the `Changed (filters)` entry below for the
  behaviour that ships now.

### Changed

- The CTR info icon is now `fa-info-circle`, the same Font Awesome glyph the ARCA
  registration form uses for its notification hint, instead of a circle drawn with
  `border-radius` plus a literal `"i"` character.

  It renders in a single grey tone for all three states. The per-state colours
  (grey / orange / blue) were dropped because the button beside it already carries
  the state, and the icon reading as a status signal was redundant.

## [6.1.0-beta.56] - 2026/08/31

### Changed (filters)

> Nota: publicado con los filtros migrados a react-select. Ese cambio se revirtió
> en 6.1.0-beta.57; lo descrito acá es el comportamiento definitivo, disponible a
> partir de esa versión.

- `CheckboxSelect` shows the current selection as chips inside the control, one
  per selected item, each with its own remove control, plus a control that clears
  the whole selection. The dropdown is untouched: it keeps the "All" option and a
  checkbox per option.

  Previously the control collapsed the selection into `"N selected"`, so the
  applied criteria were not visible and a single one could not be dropped without
  opening the list and hunting for it.

  Implementation notes:
  - The trigger is no longer a `<button>`. Each chip carries its own remove
    button, and nesting interactive elements is invalid HTML. It is now a
    `role="combobox"` element with `tabIndex={0}`, and the keyboard behaviour the
    button provided is handled explicitly (Enter and Space toggle, Escape closes).
  - The trigger uses `min-height` instead of a fixed 36px height, and the chip
    container wraps, so the box grows to a second line instead of clipping.
  - Chips are ordered by the `options` array rather than by click order, so they
    do not jump around as items are checked and unchecked.
  - Clicks on a chip's remove control and on the clear-all control stop
    propagation, otherwise they would also toggle the dropdown.

  New optional props `removeLabel` and `clearLabel` supply the accessible text for
  those controls, defaulting to `"Remove"` and `"Clear all"`. Consumers can pass
  translated values; the report reads them from `langReport.remove` and
  `langReport.clearAll`.

  The `onChange` contract is unchanged: it still emits an array of
  `{ value, label }`, and an empty array when the selection is cleared.

### Fixed

- Void amounts in the VALUE column render red (`#d21b40`) instead of orange
  (`#f36421`). The report's own totals panel already used that red for Voids, so
  the same check showed an orange amount in the table and a red total beside it.

  The colours are now pinned inside `td:nth-child(5)` rather than by redefining
  `.summary-void-style` and friends at their source. Those classes are shared with
  the summary blocks of other reports and with the deposit micro-front, so editing
  their definitions would have carried the change outside this report.

  Final mapping: hold `#005ea6`, void `#d21b40`, temporary `purple`,
  credited `#54ba4c`.

### Added

- The CTR status text now renders as a tooltip on an info icon placed next to the
  action button, instead of as a line of text underneath it. The cell became a
  single flex row, so rows no longer grow taller to fit the second line.

  Tooltip contents by status:
  - `PENDING` / `RETRYING` → `langReport.ctrNotSent`
  - `FAILED` → `langReport.ctrSubmissionFailed`
  - `SENT` / `RESENT` → `langReport.ctrSentDate` plus the formatted date

  The `SENT` state previously showed a bare date with no icon; it now gets a
  labelled tooltip like the others.

  New locale key required: **`langReport.ctrSentDate`**. Falls back to the literal
  `"Sent date"` when absent.

  The tooltip is CSS-only (`data-ctr-tooltip` + `::after`), so no new runtime
  dependency was added. The icon is focusable and carries `aria-label`, so the
  text is reachable without a pointer, and clicks on it do not bubble up to the
  row selection or the CTR action.

### Removed

- Dead branch in `getCtrCell`: the `if (check.hasSenderData)` path returned JSX
  byte-identical to the fallback below it, so the flag was read without affecting
  the output. The ARCA modal already decides whether to collect sender data or
  just confirm the send, so the cell does not need to distinguish the two.

### Changed

- The CTR action column header now reads from `langReport.ctrColumn` (falling back
  to `"CTR"`) instead of `langReport.ctrAction`.

  `ctrAction` was shared with the ARCA status filter label in `CheckDetailsForm`,
  so the column header and the filter were forced to display the same text. They
  are different things: the column holds the send/resend control, the filter
  narrows results by ARCA send status. Splitting the keys lets each one be named
  for what it does.

  Consumers must add `langReport.ctrColumn` to their locale files. If the key is
  missing the header falls back to the literal `"CTR"`, so nothing renders a raw
  i18n key.

- Hardcoded fallbacks for the CTR action buttons dropped the "to ARCA" suffix, to
  match the shorter labels the consumer locales now use: `"Send"`, `"Resend"`,
  `"Sent"`. These only render when no `t` function is supplied at all; the visible
  text comes from `langReport.sendToArca`, `resendToArca` and `sentToArca`, whose
  values live in the consumer locale files and need no package release to change.

- The CTR transaction column fallback reads `"ID CTR"` instead of `"# CTR"`, to
  match the value consumers now set in `langReport.ctrTransaction`.

- Check number column widened from 80px to 105px (row min-width 985px → 1010px,
  no-CTR layout 585px → 610px). Headers use `white-space: nowrap`, and the English
  label no longer fits 80px now that consumers set `langReport.checkNumber` to the
  spelled-out name rather than `"Check #"`.

## [6.1.0-beta.55] - 2026/08/28

### Added

- New STATUS column in the results table, placed right after VALUE as the 6th
  base column. It is always visible, independent of the CTR block, and shows the
  check status translated to the active language.
- `resolveCheckStatusKey` / `translateCheckStatus` helpers
  (`src/core/utils/checkStatus.js`). Both accept the numeric `statusID` (0-9) the
  backend is migrating to **and** the `CHECK_STATUS_*` constant name currently
  returned, resolving either one to the same `langReport.CHECK_STATUS_*` i18n key.
  No new translation keys are required: the host already ships all ten in EN/ES.
  `statusID: 0` (Scanned) is handled explicitly so it is not lost as a falsy value.
- Each status cell carries a language-independent modifier class derived from the
  canonical key, e.g. `cdr-status-cell--on-hold`, so consumers can restyle a
  single status without matching translated text.

### Changed

- `originalStatus` is now the key resolved by `resolveCheckStatusKey` instead of
  the raw `checkStatus` field. This keeps the VOID parentheses in the VALUE column
  working once the backend stops sending the constant name.
- Column layout widened from 8 to 9 fixed widths (`$cdr-cols`, min row width
  985px). The no-CTR layout now spreads 6 base columns (585px) instead of 5.
- Excel export writes the status as a plain translated string; it previously
  wrapped it in a single-element array.

## [6.1.0-beta.54] - 2026/08/28

### Fixed

- The VALUE column now applies the status colour the backend sends in the check's
  `color` field (`summary-hold-style`, `summary-void-style`,
  `summary-temporary-style`, ...). It previously used `cdr-amount-void` /
  `cdr-amount-normal`, which have no styles defined anywhere, so every amount
  rendered identically regardless of status.
  Consumers must not force a single colour over those classes in the VALUE column.

### Changed

- Removed the fixed `0.00` shown above the amount in the VALUE column for checks
  that carry a status colour (hold, temporary, void). The cell now shows only the
  check amount. The equivalent `0.00` in the embedded batch-detail view
  (`dataGrid`) was left untouched.

## [6.1.0-beta.53] - 2026/08/28

### Fixed

- When the CTR block is hidden, the table now spans the full container width.
  Rows kept the `min-width` computed for 8 fixed columns, and the column that
  absorbs leftover horizontal space is the 8th, so with only the 5 base columns
  rendered there was a blank gap on the right. The 5 columns now grow to share
  the available width while keeping their relative proportions.

## [6.1.0-beta.52] - 2026/08/27

### Added

- New `isArcaEnabled` prop (boolean, defaults to `false`). It is the agency-level
  gate resolved by the host: the branch has CTR active **and** is registered in
  ARCA. When `false`, the report renders no CTR UI at all and never sends
  `arcaStatusParam` to the backend.

### Changed

- **Breaking for consumers that relied on the previous behaviour.** The three CTR
  columns (`# CTR`, `CTR Action`, `CTR Deadline`) and the ARCA status filter are
  now hidden unless two conditions hold: `isArcaEnabled` is `true` **and** the
  current page of results contains at least one check with `needCtr`.
  **Required action:** hosts that want to keep showing the CTR block must pass
  `isArcaEnabled={true}`. Hosts that do not pass the prop get the report without
  the CTR block, which matches the state prior to the CTR feature.
- The ARCA status filter is omitted from the DOM rather than hidden with CSS, and
  its value is cleared when it stops being visible, so a filter the agent cannot
  see is never applied to a query.
- `getCtrCell` and `getDeadlineCell` moved to module scope; they were being
  redefined on every table row. Rendering logic is unchanged.
- Table headers and rows are now built by concatenation, so the row length always
  matches the header length (5 columns without CTR, 8 with it).

### Fixed

- `ctrUpdatedCheck` was declared and consumed internally but never forwarded from
  the package entry point, so in-place CTR status updates never reached the
  report. It is now propagated and typed.

## [4.0.5] - 2022/05/02

### Fixed

- Account min length filter from 8 to 1

## [4.0.4] - 2022/01/28

### Changed

- Fix handler for DatePicker, leaving date without format

## [4.0.2] - 2022/02/06

### Changed

- Update versions to support Node 16 and npm 8

### Fixed

- InputDatePicker year format when was changed manually
