@nova-ui/bits 19.0.2 → 19.0.4

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.
@@ -30264,6 +30264,12 @@ class ToolbarKeyboardService {
30264
30264
  this.menu = menu;
30265
30265
  }
30266
30266
  onKeyDown(event) {
30267
+ // Allow native keyboard handling inside search inputs (e.g. arrow keys move caret)
30268
+ // instead of hijacking navigation for the whole toolbar.
30269
+ const target = event.target;
30270
+ if (this.isSearchTarget(target)) {
30271
+ return;
30272
+ }
30267
30273
  const { code } = event;
30268
30274
  if (code === KEYBOARD_CODE.ARROW_LEFT ||
30269
30275
  code === KEYBOARD_CODE.ARROW_RIGHT) {
@@ -30274,6 +30280,17 @@ class ToolbarKeyboardService {
30274
30280
  this.closeMenuIfOpened();
30275
30281
  }
30276
30282
  }
30283
+ isSearchTarget(target) {
30284
+ if (!target) {
30285
+ return false;
30286
+ }
30287
+ // Common ways a search input can be marked in DOM.
30288
+ // - <input type="search">
30289
+ // - role="searchbox"
30290
+ // - a class/data attribute containing "search"
30291
+ const el = target.closest?.("input[type=\"search\"], [role=\"searchbox\"], .search, [class*=\"search\"], [data-testid*=\"search\"], [data-automation-id*=\"search\"]");
30292
+ return !!el;
30293
+ }
30277
30294
  navigateByArrow(code) {
30278
30295
  const activeEl = document.activeElement;
30279
30296
  const activeIndex = this.toolbarItems.indexOf(activeEl);
@@ -32714,6 +32731,14 @@ class DataSourceService extends DataSource {
32714
32731
  deregisterComponent(componentKey) {
32715
32732
  delete this._components?.[componentKey];
32716
32733
  }
32734
+ resetFilterComponent(componentName) {
32735
+ const component = this._components?.[componentName]?.componentInstance;
32736
+ if (component?.resetFilter) {
32737
+ component.resetFilter();
32738
+ return true;
32739
+ }
32740
+ return false;
32741
+ }
32717
32742
  connect(collectionViewer) {
32718
32743
  return this.dataSubject.asObservable();
32719
32744
  }