# Changelog

All notable changes to `@databricks/aibi-client` are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package
adheres to [semantic versioning](https://semver.org).

## 1.2.1

### Changed

- **`colorScheme` now applies to dashboards that use basic embedding.** Previously, dashboards
  embedded without a `token` always rendered in light mode.
- **Embedding from pages with a strict `Referrer-Policy`.** The dashboard iframe now sets
  [`referrerpolicy="origin"`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy#origin),
  so pages that send
  [`Referrer-Policy: no-referrer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy#no-referrer_2)
  no longer prevent communication that enables methods like `onFiltersReady`.

## 1.2.0 - 2026-09-28

### Added

- **Global filters visibility.** New `config.globalFilterVisibility` option controlling the embedded
  dashboard's global filters panel.
  - **`shownByDefault`:** the panel starts expanded.
  - **`hiddenByDefault`:** the panel starts collapsed.
  - **`disabled`:** the panel and its toggle button are hidden entirely, so viewers cannot open or
    change the global filters. This only hides the controls. Filter values from the embed URL or the
    dashboard's author-configured defaults still apply.
  - **Omitted:** the dashboard's own default is used.

  The by-default states set the initial visibility only; viewers can toggle the panel afterwards and
  their saved preference takes precedence on later visits.

## 1.1.0 - 2026-09-01

### Added

- **Embedded filter controls.** New host APIs on `DatabricksDashboard` for reading and controlling
  an embedded dashboard's filters.
  - `getFilters()` - read the current state of every filter in the embedded dashboard.
  - `setFilters(filters, options?)` - set one or more filter values by URL identifier. On apply-mode
    dashboards, pass `{ apply: false }` to stage values instead of committing them.
  - `applyStagedFilters()` / `cancelStagedFilters()` - commit or discard staged filter values, as
    the dashboard's Apply / Cancel buttons do.
  - `onFiltersReady(callback)` — fires once when filter controls are ready to be interacted with.
  - `onFiltersChanged(callback)` - subscribe to filter changes (viewer interaction, an applied
    `setFilters` call, or a URL restore).
