diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f451abc4..17206740e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,155 +1,3 @@ -# 20.0.0 (2026-05-13) - -### BREAKING CHANGES — Angular 20 - -* **angular:** bump to Angular 20.3.21. `requiredAngularVersion` is now `^20.0.0`. All `peerDependencies` of published packages target `^20.0.0`. Consumers must upgrade to Angular 20+. -* **node:** minimum supported Node.js is now **20.19** (added `"engines": { "node": ">=20.19" }`). -* **zone.js:** downgraded to `~0.15.1` to match Angular 20 peer requirement. -* **components:** `KbqPopUpTrigger` (base of tooltip / popover / notification-center / app-switcher) refactored to use `Signal` for `enterDelay`, `leaveDelay`, `stickToWindow`, `container`, `hideWithTimeout`, `preventClose`, and `arrow` so the existing signal-input overrides in subclasses now type-check. Consumers reading these from the trigger instance must call them as signals (`.enterDelay()`, etc.). -* **popover:** the runtime-broken `set trigger(value)` mutation of `hideWithTimeout`/`leaveDelay` (added in DS-3677 #851 and silently broken since DS-4749 #1442) is replaced by writable backing signals; `leaveDelay` is now a `computed` signal combining the user input and the hover-mode fallback default of `500ms`. -* **form-field:** `KbqInput.placeholder`, `KbqInput.errorStateMatcher`, `KbqInputPassword.placeholder`, `KbqInputPassword.errorStateMatcher`, `KbqTextarea.placeholder`, `KbqTextarea.errorStateMatcher`, `KbqSelect.errorStateMatcher`, `KbqTagList.errorStateMatcher`, `KbqTreeSelect.errorStateMatcher`, `KbqSingleFileUploadComponent.errorStateMatcher`, `KbqMultipleFileUploadComponent.errorStateMatcher`, `KbqTagInput.placeholder`/`id` reverted to `@Input` primitives — they conflict with interface types (`CanUpdateErrorState`, `KbqFormFieldControl`, `KbqTagTextControl`) that expect raw values. Template bindings via aliases stay the same. -* **code-block:** `softWrap`, `viewAll`, `canDownload`, `activeFileIndex` are now `model()` signals (writable + bindable). Bare attribute shorthand `` no longer coerces — use `[canDownload]="true"`, `[activeFileIndex]="1"`, etc. -* **textarea:** `freeRowsHeight` is now a `model()` signal; bare attribute shorthand is not supported, use `[freeRowsHeight]="160"`. -* **search-expandable / dl / radio / checkbox / toggle / sidepanel:** `isOpened` / `vertical` / `name` / `id` / `sidepanelResult` are now `model()` signals (use `.set()` / `.update()` internally; two-way binding `[(x)]` works externally). -* **modal:** `kbqOkText`, `kbqOkType`, `kbqRestoreFocus`, `kbqCancelText`, `kbqModalType`, `kbqComponent`, `kbqContent`, `kbqComponentParams`, `kbqFooter`, `kbqWidth`, `kbqSize`, `kbqWrapClassName`, `kbqClassName`, `kbqStyle`, `kbqTitle`, `kbqCloseByESC`, `kbqOnOk`, `kbqOnCancel` reverted to plain `@Input`/`@Output` to match `ModalOptions`. Programmatic API (consumed via `KbqModalService`) stays the same. -* **notification-center / app-switcher:** removed `placement` signal-input overrides (which conflicted with `KbqPopUpTrigger.placement`) — placement is again configured via `@Input('kbqNotificationCenterPlacement')` / `@Input('kbqAppSwitcherPlacement')` getter/setter pattern delegating to `super.updatePlacement(...)`. `arrow` in both is now a `Signal` (matches the new base contract). -* **tabs:** `KbqPaginatedTabHeader.disablePagination` is now a `computed` that combines the user input with a writable fallback set by the `vertical` setter. `KbqTabGroupComponent.animationDuration` is a `computed` that resolves user input → `KBQ_TABS_CONFIG` default → `'0ms'`. `KbqTabLink.disabled` reverted to plain `@Input` (matches `FocusableOption.disabled`). -* **dropdown:** `KbqDropdown.backdropClass` reverted to `@Input` to match the `KbqDropdownPanel` interface. `KbqDropdownContent` constructor no longer accepts `ComponentFactoryResolver` (removed in Angular 20). -* **input-number:** dropped `@Attribute('step' | 'big-step' | 'min' | 'max')` constructor coercion; the same defaults are now provided by `input(..., { transform: numberAttribute })`. Template bindings `[step]="..."` still work; bare HTML attributes are coerced through the transform. -* **breadcrumbs:** `RdxRovingFocusGroupDirective.orientation` is a `computed` signal combining an `orientation` input alias and an internal `setOrientation()` override called by `KbqBreadcrumbs` (replaces the broken `inject(...).orientation = 'horizontal'` assignment). -* **navbar / navbar-ic / filter-bar / datepicker / timepicker / splitter:** direct assignments to readonly signal inputs (`this.arrow = false`, `this.offset = 0`, `this.popover.preventClose = true`, `tooltip.enterDelay = ...`, `this.ghost.visible = ...`, etc.) cast to `any` to preserve current runtime behavior. The underlying state migration to writable signals is tracked as a follow-up. - -### Tooling - -* `ng-packagr` → `^20.3.2`. -* `@angular-builders/jest` → `20.0.0`. -* `@angular-eslint/*` → `^20.7.0`. -* `@typescript-eslint/*` → `^8.59.3` (ESLint stays on `8.57.1`). -* `@schematics/angular` → `20.3.21` (was stuck on `18.2.21`). -* `@angular-devkit/architect` → `0.2003.21`. -* Per-project `tsconfig.spec.json` files added under each library/app root that extend the workspace-root config; `angular.json` `test.options.tsConfig` paths now resolve from the project root (required by v20 schematic migrations). -* Schematics unit tests updated for the v20 `@schematics/angular:application` output (file names changed from `app.component.html` → `app.html`). - -### BREAKING CHANGES — Deprecated API removals - -Removed long-standing deprecated symbols. Use `ng update @koobiq/components@20` for assisted migration (schematics TBD — track follow-up). - -#### Removed packages - -* **`@koobiq/components/navbar-ic`** — entire package deleted. Migrate to `@koobiq/components/navbar` (`KbqNavbar`, `KbqNavbarItem`, `KbqNavbarModule`). -* **`@koobiq/components/risk-level`** — entire package deleted. Migrate to `@koobiq/components/badge` (`KbqBadge` with `[outline]` and `[badgeColor]`). Note: Badge default density and color enum differ — verify visual parity. -* **`@koobiq/components-experimental/form-field`** — sub-package deleted. Migrate to `@koobiq/components/form-field`. The experimental package was a transitional fork that has been merged back. - -#### Removed core symbols - -* `AnimationCurves` enum → use `KbqAnimationCurves`. -* `MeasurementSystem` enum → use `KbqMeasurementSystem`. -* `SizeUnitsConfig` interface → use `KbqSizeUnitsConfig`. -* `KbqCommonModule`, `KBQ_SANITY_CHECKS`, `mcSanityChecksFactory` → no longer used. -* `toBoolean()` → use Angular `booleanAttribute` from `@angular/core`. -* `RdxAccordionItemState` → use `KbqAccordionItemState`. -* `KbqCodeFile` → use `KbqCodeBlockFile`. -* `KBQ_SIDEPANEL_WITH_SHADOW` token → removed. -* `KbqSidepanelConfig.requiredBackdrop` field → removed (single shared backdrop used). -* `formatDataSize()` → use `getFormattedSizeParts()`. -* `getFormattedSizeParts(value, precision, system)` 3-arg overload → use 2-arg `getFormattedSizeParts(value, system)`. -* `KBQ_VALIDATION` token and `KbqValidationOptions` interface → removed with legacy validation pipeline. -* `kbqDisableLegacyValidationDirectiveProvider()` — the no-op shim kept after the `KbqValidateDirective` removal is also gone in v20.0.0. Run `ng update @koobiq/components@20` to auto-strip the call sites and import; the schematic also flags the resulting `providers: []` arrays for manual cleanup. - -#### Removed component methods / inputs - -* `KbqAutocompleteTrigger.openPanel()` → use `open()`. -* `KbqClampedText.toggleIsCollapsed()` → use `toggle()`. -* `KbqDivider.inset` input → removed. -* `KbqTagList`: `multiple`, `compareWith`, `emitOnTagChanges`, `orientation`, `selectionModel`, `tagChanges`, `setSelectionByValue()` — all unused, removed. -* `KbqTagInput`: `countOfSymbolsForUpdateWidth`, `updateInputWidth()` — unused, removed. -* `KbqFormField.canShowStepper` → use `hasStepper` (stepper is always visible when provided). -* `KbqAppSwitcherTrigger.apps` input → use `sites` with a single-element array. - -#### Removed validation - -* **`KbqValidateDirective`** — legacy validation directive deleted entirely. The new behaviour relies exclusively on `ErrorStateMatcher`. Consumers that relied on the legacy "show errors only after blur/submit" pattern should wire `ShowOnSubmitErrorStateMatcher` (or similar) explicitly via `errorStateMatcher` input or `ErrorStateMatcher` provider. The "lazy validation" behaviour (suppress required-not-shown until submit) is gone. - -#### Removed file-upload validation API - -* `KbqInputFile`, `KbqInputFileLabel` interfaces — removed. -* `KbqFileValidatorFn` type → removed. -* `isCorrectExtension()` function → use `FileValidators.isCorrectExtension` (`ValidatorFn`). -* `KbqMultipleFileUploadComponent.errors`, `customValidation`, `hasErrors` → use `FormControl.errors` and `FormControl` validators. -* `KbqSingleFileUploadComponent.errors`, `customValidation` → same. - -#### Removed modal API - -* `ModalOptions.kbqComponentParams` → use `data` field + `inject(KBQ_MODAL_DATA)` in the child component. -* `KbqModalComponent.kbqComponentParams` @Input → removed. - -#### Removed filter-bar API - -* `KbqFilters.onSaveAsNew` Output → use `onSave` with `status === 'newFilter'`. -* **`KbqFilterBarSearch`** component (``) — removed. Use `` instead. Note: `kbq-search-expandable` requires a `FormControl`/`NgModel` binding. - -#### Removed form-field directives - -* **`KbqDatepickerToggle`** component (``) — removed. Use `` (`KbqDatepickerToggleIconComponent`) instead. -* **`KbqFormFieldWithoutBorders`** directive (``) — removed. Use the `noBorders` input on `KbqFormField`: ``. - -#### Removed tooltip modifier triggers - -* **`KbqWarningTooltipTrigger`** (`[kbqWarningTooltip]`) and **`KbqExtendedTooltipTrigger`** (`[kbqExtendedTooltip]`) directives removed. Use the base `[kbqTooltip]` directive with the new public `kbqTooltipModifier` input: - - ```html - - - - - - ``` - - For the extended variant, `[kbqTooltipHeader]` is now also exposed on the base trigger: - - ```html - - + + +``` + +**Datepicker, Timepicker**. The KbqDatepickerInput.kbqValidationTooltip and KbqTimepicker.kbqValidationTooltip setters now accept KbqTooltipTrigger (the base class) instead of KbqWarningTooltipTrigger. + +### Migration + +**V20 upgrade**. Consumers can run the automatic migration with the `ng update @koobiq/components@20` command. It invokes the `v20-upgrade` schematic, which rewrites your code in place. + +**Imports and packages**. Imports from @koobiq/components/navbar-ic, risk-level, and components-experimental/form-field are remapped to the surviving packages (navbar, badge, components/form-field). + +**Identifiers in .ts files**. The following identifiers have been renamed: + +| Old name | New name | +| ------------------------- | -------------------------------- | +| KbqNavbarIc\* | KbqNavbar\* | +| KbqRiskLevel\* | KbqBadge\* | +| KbqWarningTooltipTrigger | KbqTooltipTrigger | +| KbqExtendedTooltipTrigger | KbqTooltipTrigger | +| KbqDatepickerToggle | KbqDatepickerToggleIconComponent | +| KbqFilterBarSearch | KbqSearchExpandable | +| RdxAccordionItemState | KbqAccordionItemState | +| KbqCodeFile | KbqCodeBlockFile | +| AnimationCurves | KbqAnimationCurves | +| MeasurementSystem | KbqMeasurementSystem | +| SizeUnitsConfig | KbqSizeUnitsConfig | +| KbqFormFieldRef | KbqFormField | + +**Tokens and functions**. Updated: toBoolean( → booleanAttribute(, isCorrectExtension( → FileValidators.isCorrectExtension(, formatDataSize( → getFormattedSizeParts(, kbqComponentParams: → data:; + +Removed tokens are stripped from imports: KBQ_VALIDATION, KBQ_SANITY_CHECKS, KBQ_SIDEPANEL_WITH_SHADOW + +**Instance methods**. Updated: .openPanel( → .open(, .toggleIsCollapsed( → .toggle(, .focusViaKeyboard( → .focus(. + +**Selectors in templates**. Updated: `` → ``, `` → ``, `` → ``, `` → ``. + +**Attributes in templates**. Updated: `kbqFormFieldWithoutBorders` → `noBorders`, `[kbqWarningTooltip]` → `kbqTooltipModifier="warning" [kbqTooltip]`, `[kbqExtendedTooltip]` → `kbqTooltipModifier="extended" [kbqTooltip]`, the template ref `="kbqWarningTooltip"` → `="kbqTooltip"`. + +**CSS classes in SCSS**. Updated: `.kbq-risk-level` → `.kbq-badge`, `.kbq-navbar-ic` → `.kbq-navbar`, etc. + +**Manual fixes**. The schematic emits warnings for structural changes that cannot be fixed automatically and safely: `(onSaveAsNew)` listeners on `` must be moved to `(onSave)` with branching on `$event.status === 'newFilter'`; the `[customValidation]` / `[errors]` attributes on file-upload components must be replaced with `FormControl` validators; the `[apps]` attribute on ` + + +``` + +**Datepicker, Timepicker**. Сеттеры KbqDatepickerInput.kbqValidationTooltip и KbqTimepicker.kbqValidationTooltip теперь принимают KbqTooltipTrigger (базовый класс) вместо KbqWarningTooltipTrigger. + +### Миграция + +**V20 upgrade**. Потребители могут запустить автоматическую миграцию с помощью команды `ng update @koobiq/components@20`. Она вызывает схематик `v20-upgrade`, который переписывает ваш код на месте. + +**Импорты и пакеты**. Импорты из @koobiq/components/navbar-ic, risk-level и components-experimental/form-field переназначаются на сохранившиеся пакеты (navbar, badge, components/form-field). + +**Идентификаторы в .ts файлах**. Переименованы идентификаторы: + +| Старое имя | Новое имя | +| ------------------------- | -------------------------------- | +| KbqNavbarIc\* | KbqNavbar\* | +| KbqRiskLevel\* | KbqBadge\* | +| KbqWarningTooltipTrigger | KbqTooltipTrigger | +| KbqExtendedTooltipTrigger | KbqTooltipTrigger | +| KbqDatepickerToggle | KbqDatepickerToggleIconComponent | +| KbqFilterBarSearch | KbqSearchExpandable | +| RdxAccordionItemState | KbqAccordionItemState | +| KbqCodeFile | KbqCodeBlockFile | +| AnimationCurves | KbqAnimationCurves | +| MeasurementSystem | KbqMeasurementSystem | +| SizeUnitsConfig | KbqSizeUnitsConfig | +| KbqFormFieldRef | KbqFormField | + +**Токены и функции**. Обновляются: toBoolean( → booleanAttribute(, isCorrectExtension( → FileValidators.isCorrectExtension(, formatDataSize( → getFormattedSizeParts(, kbqComponentParams: → data:; + +Убираются из импортов удаленные токены: KBQ_VALIDATION,KBQ_SANITY_CHECKS, KBQ_SIDEPANEL_WITH_SHADOW + +**Методы инстансов**. Обновляются: .openPanel( → .open(, .toggleIsCollapsed( → .toggle(, .focusViaKeyboard( → .focus(. + +**Селекторы в шаблонах**. Обновляются: `` → ``, `` → ``, `` → ``, `` → ``. + +**Атрибуты в шаблонах**. Обновляются: `kbqFormFieldWithoutBorders` → `noBorders`, `[kbqWarningTooltip]` → `kbqTooltipModifier="warning" [kbqTooltip]`, `[kbqExtendedTooltip]` → `kbqTooltipModifier="extended" [kbqTooltip]`, template-ref `="kbqWarningTooltip"` → `="kbqTooltip"`. + +**CSS классы в SCSS**. Обновляются: `.kbq-risk-level` → `.kbq-badge`, `.kbq-navbar-ic` → `.kbq-navbar` и т. д. + +**Ручные исправления**. Схематик выводит предупреждения для структурных изменений, которые нельзя безопасно исправить автоматически: слушатели `(onSaveAsNew)` у `` нужно перевести на `(onSave)` с ветвлением по `$event.status === 'newFilter'`; атрибуты `[customValidation]` / `[errors]` у file-upload компонентов нужно заменить валидаторами `FormControl`; атрибут `[apps]` у `