diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3fabd0f9ab..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,18 +0,0 @@ -dist -node_modules -coverage - -# eslint ignores root level "dot" files by default -!/.*.js - -# ignore build tokens -/apps/docs/src/styles/koobiq/default-theme/ - -# ignore nunjuck templates -/tools/api-gen/rendering/templates - -# ignore index.html -**/index.html - -# ignore mocks -**/mock.ts diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 0e15b32b99..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,532 +0,0 @@ -// @ts-check - -const isCI = !!process.env.CI; - -/** - * @param {string} str - * @returns {string} - */ -const capitalizeFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1); - -/** - * @see https://typescript-eslint.io/rules/naming-convention/#options - * - * @param {string} prefix - */ -const makeNamingConventionOptions = (prefix) => { - return [ - { selector: 'variable', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, - { - selector: 'variable', - modifiers: ['exported'], - format: ['StrictPascalCase', 'UPPER_CASE'], - prefix: [prefix, `${prefix.toUpperCase()}_`] - }, - - { selector: 'function', format: ['camelCase'] }, - { selector: 'function', modifiers: ['exported'], format: ['StrictPascalCase'], prefix: [prefix] }, - - { selector: 'interface', format: ['PascalCase'] }, - { - selector: 'interface', - modifiers: ['exported'], - format: ['StrictPascalCase'], - prefix: [capitalizeFirst(prefix)] - }, - - { selector: 'typeLike', format: ['PascalCase'] }, - { - selector: 'typeLike', - modifiers: ['exported'], - format: ['StrictPascalCase'], - prefix: [capitalizeFirst(prefix)] - }, - - { selector: 'enum', format: ['PascalCase'] }, - { selector: 'enum', modifiers: ['exported'], format: ['StrictPascalCase'], prefix: [capitalizeFirst(prefix)] }, - { selector: 'enumMember', format: ['PascalCase'] }, - - { selector: 'class', format: ['PascalCase'] }, - { selector: 'class', modifiers: ['exported'], format: ['PascalCase'], prefix: [capitalizeFirst(prefix)] }, - { selector: 'classMethod', format: ['camelCase'] }, - { selector: 'classProperty', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' } - ]; -}; - -/** - * @see https://eslint.org/docs/latest/rules/no-restricted-globals - */ -const noRestrictedGlobalsOptionsForSSR = (() => { - /** @type {Array} */ - const restrictedWindowGlobals = [ - 'window', - 'open', - 'close', - 'scroll', - 'scrollTo', - 'scrollBy', - 'requestAnimationFrame', - 'cancelAnimationFrame', - 'requestIdleCallback', - 'cancelIdleCallback', - 'getComputedStyle', - 'matchMedia', - 'navigator', - 'location', - 'history', - 'screen', - 'localStorage', - 'sessionStorage', - 'crypto', - 'caches', - 'performance', - 'speechSynthesis' - ]; - - const restrictedOptions = restrictedWindowGlobals.map((name) => ({ - name, - message: `Global property '${name}' is not available is SSR. Use 'KBQ_WINDOW' injection token from '@koobiq/components/core' instead.` - })); - - restrictedOptions.push({ - name: 'document', - message: `Global property 'document' is not available is SSR. Use 'DOCUMENT' injection token from '@angular/common' instead.` - }); - - return restrictedOptions; -})(); - -/** - * Rules for JavaScript and TypeScript files - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const javascriptAndTypescriptRules = { - files: ['*.js', '*.ts'], - extends: [ - 'eslint:recommended', - 'plugin:promise/recommended' - ], - plugins: [ - '@stylistic' - ], - rules: { - // plugin:eslint - 'no-useless-escape': 0, - 'no-self-assign': 0, - 'no-prototype-builtins': 0, - 'no-console': 1, - - // plugin:promise - 'promise/catch-or-return': 0, - 'promise/always-return': 0, - - // @stylistic - '@stylistic/padding-line-between-statements': [ - 1, - { blankLine: 'always', next: 'block', prev: '*' }, - { blankLine: 'always', next: '*', prev: 'block' }, - { blankLine: 'always', next: 'block-like', prev: '*' }, - { blankLine: 'always', next: '*', prev: 'block-like' }, - { blankLine: 'always', next: 'return', prev: '*' }, - { blankLine: 'always', next: '*', prev: 'directive' }, - { blankLine: 'always', next: ['interface', 'type'], prev: '*' }, - { blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] }, - { blankLine: 'always', next: 'class', prev: '*' }, - { blankLine: 'always', next: '*', prev: 'class' }, - { - blankLine: 'any', - next: ['const', 'let', 'var', 'export'], - prev: ['const', 'let', 'var', 'export'] - }, - { blankLine: 'any', next: ['case', 'default'], prev: '*' }, - { blankLine: 'any', next: '*', prev: ['case', 'default'] }, - { blankLine: 'any', next: 'directive', prev: 'directive' } - ] - } -}; - -/** - * Rules for TypeScript files - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const typescriptRules = { - files: ['*.ts'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: './tsconfig.eslint.json', - tsconfigRootDir: __dirname - }, - extends: [ - /** @see https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/all.ts */ - 'plugin:@typescript-eslint/recommended', - /** @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/angular-eslint/src/configs/ts-all.ts */ - 'plugin:@angular-eslint/all', - 'plugin:@angular-eslint/template/process-inline-templates', - 'plugin:rxjs/recommended' - ], - rules: { - // plugin:@typescript-eslint - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-var-requires': 0, - '@typescript-eslint/no-unused-vars': [ - 1, - { - argsIgnorePattern: '^_' - } - ], - '@typescript-eslint/no-duplicate-enum-values': 0, - '@typescript-eslint/ban-tslint-comment': 1, - - // plugin:@angular-eslint - '@angular-eslint/component-class-suffix': 0, - '@angular-eslint/no-host-metadata-property': 0, - '@angular-eslint/directive-class-suffix': 0, - '@angular-eslint/no-output-rename': 0, - '@angular-eslint/no-inputs-metadata-property': 0, - '@angular-eslint/no-output-on-prefix': 0, - '@angular-eslint/no-input-rename': 0, - '@angular-eslint/no-outputs-metadata-property': 0, - '@angular-eslint/no-output-native': 0, - '@angular-eslint/prefer-on-push-component-change-detection': 0, - '@angular-eslint/relative-url-prefix': 0, - '@angular-eslint/component-max-inline-declarations': 0, - '@angular-eslint/consistent-component-styles': 0, - '@angular-eslint/use-component-view-encapsulation': 0, - '@angular-eslint/use-injectable-provided-in': 0, - '@angular-eslint/no-forward-ref': 0, - '@angular-eslint/no-conflicting-lifecycle': 0, - '@angular-eslint/no-attribute-decorator': 0, - '@angular-eslint/no-pipe-impure': 0, - '@angular-eslint/sort-ngmodule-metadata-arrays': 0, - '@angular-eslint/template/cyclomatic-complexity': 0, - - '@angular-eslint/prefer-signals': 0, - '@angular-eslint/prefer-output-emitter-ref': 0, - '@angular-eslint/prefer-inject': 0, - - // plugin:rxjs - 'rxjs/no-implicit-any-catch': 0, - 'rxjs/no-sharereplay': 0, - 'rxjs/no-internal': 0, - 'rxjs/no-unbound-methods': 0, - 'rxjs/no-topromise': 1, - 'rxjs/throw-error': 1 - } -}; - -/** - * Rules for Angular templates - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const templateRules = { - files: ['*.html'], - extends: [ - /** @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/angular-eslint/src/configs/template-all.ts */ - 'plugin:@angular-eslint/template/all' - ], - rules: { - // plugin:@angular-eslint/template - '@angular-eslint/template/no-autofocus': 0, - '@angular-eslint/template/elements-content': 0, - '@angular-eslint/template/click-events-have-key-events': 0, - '@angular-eslint/template/interactive-supports-focus': 0, - '@angular-eslint/template/label-has-associated-control': 0, - '@angular-eslint/template/i18n': 0, - '@angular-eslint/template/no-call-expression': 0, - '@angular-eslint/template/prefer-ngsrc': 0, - '@angular-eslint/template/no-inline-styles': 0, - '@angular-eslint/template/button-has-type': 0, - '@angular-eslint/template/no-interpolation-in-attributes': 0, - '@angular-eslint/template/no-any': 0, - '@angular-eslint/template/prefer-static-string-properties': 0, - '@angular-eslint/template/cyclomatic-complexity': 0, - // Allow combining a static `class`/`style` attribute with its `[class]`/`[style]` binding. - // Angular merges them via styling precedence, so this is a valid pattern (e.g. after the - // NgClass -> [class] migration). Genuine duplicates (two static `class`, two `[class]`) are - // still reported. - '@angular-eslint/template/no-duplicate-attributes': [ - 2, - { - allowStylePrecedenceDuplicates: true - } - ] - } -}; - -/** - * Override rules for packages/components-dev - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const componentsDevRules = { - files: ['packages/components-dev/**/*.ts'], - rules: { - // plugin:eslint - 'no-restricted-globals': [ - 1, - ...noRestrictedGlobalsOptionsForSSR - ], - 'no-console': 0, - - // plugin:@angular-eslint - '@angular-eslint/directive-selector': [ - 1, - { - type: 'attribute', - prefix: 'dev', - style: 'camelCase' - } - ], - '@angular-eslint/component-selector': [ - 1, - { - type: 'element', - prefix: 'dev', - style: 'kebab-case' - } - ], - '@angular-eslint/use-component-selector': 1, - '@angular-eslint/prefer-on-push-component-change-detection': 1, - - // plugin:@typescript-eslint - '@typescript-eslint/naming-convention': [ - 1, - ...makeNamingConventionOptions('dev') - ] - } -}; - -/** - * Override rules for packages/docs-examples - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const componentsExamplesRules = { - files: ['packages/docs-examples/**/*.ts'], - rules: { - // plugin:eslint - 'no-restricted-globals': [ - 1, - ...noRestrictedGlobalsOptionsForSSR - ], - 'no-console': 0, - - // plugin:@angular-eslint - '@angular-eslint/use-component-selector': 1, - '@angular-eslint/prefer-on-push-component-change-detection': 1 - } -}; - -/** - * Override rules for e2e - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const e2eRules = { - files: ['*.playwright-spec.ts', '**/e2e.ts', 'packages/e2e/**/*.ts'], - rules: { - // plugin:eslint - // ignore `noRestrictedGlobalsOptionsForSSR` in e2e tests, because they are not executed in SSR context - 'no-restricted-globals': 0, - - // plugin:@angular-eslint - '@angular-eslint/directive-selector': [ - 1, - { - type: 'attribute', - prefix: 'e2e', - style: 'camelCase' - } - ], - '@angular-eslint/component-selector': [ - 1, - { - type: 'element', - prefix: 'e2e', - style: 'kebab-case' - } - ], - '@angular-eslint/use-component-selector': 1, - '@angular-eslint/prefer-on-push-component-change-detection': 1, - - // plugin:@typescript-eslint - '@typescript-eslint/naming-convention': [ - 1, - ...makeNamingConventionOptions('e2e') - ] - } -}; - -/** - * Override rules for packages/components - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const componentsRules = { - files: ['packages/components/**/*.ts'], - rules: { - // plugin:eslint - 'no-restricted-globals': [ - 1, - ...noRestrictedGlobalsOptionsForSSR - ] - } -}; - -/** - * Override rules for apps/docs - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const appDocsRules = { - files: ['apps/docs/**/*.ts'], - rules: { - // plugin:eslint - 'no-console': [1, { allow: ['warn', 'error'] }], - 'no-restricted-globals': [ - 1, - ...noRestrictedGlobalsOptionsForSSR - ], - - // plugin:@angular-eslint - '@angular-eslint/directive-selector': [ - 1, - { - type: 'attribute', - prefix: 'docs', - style: 'camelCase' - } - ], - '@angular-eslint/component-selector': [ - 1, - { - type: 'element', - prefix: 'docs', - style: 'kebab-case' - } - ], - '@angular-eslint/use-component-selector': 1, - - // plugin:@typescript-eslint - '@typescript-eslint/naming-convention': [ - 1, - ...makeNamingConventionOptions('docs') - ] - } -}; - -/** - * Override rules for specs - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const specRules = { - files: ['*.spec.ts'], - rules: { - // plugin:eslint - // ignore `noRestrictedGlobalsOptionsForSSR` in specs, because they are not executed in SSR context - 'no-restricted-globals': 0, - - // plugin:@angular-eslint - '@angular-eslint/use-component-selector': 0, - '@angular-eslint/prefer-on-push-component-change-detection': 0 - } -}; - -/** - * Override rules for /tools - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const toolsRules = { - files: ['tools/**/*.ts', 'tools/**/*.js'], - rules: { - // plugin:eslint - 'no-console': 0, - - // plugin:@typescript-eslint - // node-only build scripts may use require() for legacy CommonJS modules - '@typescript-eslint/no-require-imports': 0 - } -}; - -/** - * Override rules for /packages/schematics/ - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const schematicsRules = { - files: ['packages/schematics/**/*.ts', 'packages/schematics/**/*.js'], - rules: { - // plugin:eslint - 'no-console': 0 - } -}; - -/** - * Override rules for /packages/cli/ - * - * @type {import('eslint').Linter.ConfigOverride} - */ -const cliRules = { - files: ['packages/cli/**/*.ts', 'packages/cli/**/*.js'], - rules: { - // plugin:eslint - 'no-console': 0, - - // plugin:@typescript-eslint - // node-only CLI scripts may use require() for legacy CommonJS modules - '@typescript-eslint/no-require-imports': 0 - } -}; - -/** @type {import('eslint').Linter.ConfigOverride} */ -const prettierRules = { - files: ['*.js', '*.ts', '*.html'], - extends: ['plugin:prettier/recommended'] -}; - -/** @type {import('eslint').Linter.Config} */ -const config = { - root: true, - env: { - es2022: true, - commonjs: true, - node: true - }, - plugins: [ - 'file-progress' - ], - extends: [ - 'plugin:@eslint-community/eslint-comments/recommended' - ], - rules: { - // plugin:file-progress - 'file-progress/activate': isCI ? 0 : 1, - - // plugin:@eslint-community/eslint-comments - '@eslint-community/eslint-comments/no-unused-disable': 1, - '@eslint-community/eslint-comments/disable-enable-pair': [1, { allowWholeFile: true }] - }, - overrides: [ - javascriptAndTypescriptRules, - typescriptRules, - templateRules, - appDocsRules, - componentsDevRules, - componentsExamplesRules, - componentsRules, - specRules, - e2eRules, - toolsRules, - schematicsRules, - cliRules, - // should be last - prettierRules - ] -}; - -module.exports = config; diff --git a/apps/docs/src/app/components/anchors/anchors.component.ts b/apps/docs/src/app/components/anchors/anchors.component.ts index f7cea37dad..ab0230c4f9 100644 --- a/apps/docs/src/app/components/anchors/anchors.component.ts +++ b/apps/docs/src/app/components/anchors/anchors.component.ts @@ -4,7 +4,6 @@ import { Component, DestroyRef, inject, - Inject, Input, OnDestroy, OnInit, @@ -45,6 +44,11 @@ const NEXT_ROUTE_KEY = 'KBQ_nextRoute'; } }) export class DocsAnchorsComponent implements OnDestroy, OnInit { + private router = inject(Router); + private route = inject(ActivatedRoute); + private ref = inject(ChangeDetectorRef); + private document = inject(DOCUMENT); + @Input() anchors: KbqDocsAnchor[] = []; @Input() headerSelectors: string; @@ -84,12 +88,9 @@ export class DocsAnchorsComponent implements OnDestroy, OnInit { private readonly destroyRef = inject(DestroyRef); private readonly window = inject(KBQ_WINDOW); - constructor( - private router: Router, - private route: ActivatedRoute, - private ref: ChangeDetectorRef, - @Inject(DOCUMENT) private document: Document - ) { + constructor() { + const router = this.router; + this.isSmoothScrollSupported = 'scrollBehavior' in this.scrollContainer.style; if (!this.isSmoothScrollSupported) { diff --git a/apps/docs/src/app/components/example-viewer/example-viewer.ts b/apps/docs/src/app/components/example-viewer/example-viewer.ts index c2dedd43fd..1275103b89 100644 --- a/apps/docs/src/app/components/example-viewer/example-viewer.ts +++ b/apps/docs/src/app/components/example-viewer/example-viewer.ts @@ -41,6 +41,13 @@ import { DocsLiveExampleViewerComponent } from '../live-example-viewer/docs-live } }) export class DocsExampleViewerComponent extends DocsLocaleState implements OnDestroy { + private appRef = inject(ApplicationRef); + private elementRef = inject>(ElementRef); + private injector = inject(Injector); + private viewContainerRef = inject(ViewContainerRef); + private ngZone = inject(NgZone); + private domSanitizer = inject(DomSanitizer); + private portalHosts: DomPortalOutlet[] = []; private documentFetchSubscription: Subscription | undefined; private readonly window = inject(KBQ_WINDOW); @@ -71,17 +78,6 @@ export class DocsExampleViewerComponent extends DocsLocaleState implements OnDes private readonly documentLoader = inject(DocsDocumentLoader); private readonly platformId = inject(PLATFORM_ID); - constructor( - private appRef: ApplicationRef, - private elementRef: ElementRef, - private injector: Injector, - private viewContainerRef: ViewContainerRef, - private ngZone: NgZone, - private domSanitizer: DomSanitizer - ) { - super(); - } - ngOnDestroy() { this.clearLiveExamples(); this.documentFetchSubscription?.unsubscribe(); diff --git a/apps/docs/src/app/components/stackblitz/stackblitz-button.ts b/apps/docs/src/app/components/stackblitz/stackblitz-button.ts index 81769a4a25..8bff0927bb 100644 --- a/apps/docs/src/app/components/stackblitz/stackblitz-button.ts +++ b/apps/docs/src/app/components/stackblitz/stackblitz-button.ts @@ -1,5 +1,4 @@ -import { FocusMonitor } from '@angular/cdk/a11y'; -import { Component, ElementRef, Input, ViewEncapsulation } from '@angular/core'; +import { Component, Input, ViewEncapsulation, inject } from '@angular/core'; import { KbqIconModule } from '@koobiq/components/icon'; import { KbqLink, KbqLinkModule } from '@koobiq/components/link'; import { ExampleData } from '@koobiq/docs-examples'; @@ -20,6 +19,8 @@ import { DocsStackblitzWriter } from './stackblitz-writer'; } }) export class DocsStackblitzButtonComponent extends KbqLink { + private stackBlitzWriter = inject(DocsStackblitzWriter); + @Input() set exampleId(value: string | undefined) { if (value) { @@ -39,14 +40,6 @@ export class DocsStackblitzButtonComponent extends KbqLink { private exampleData: ExampleData | undefined; - constructor( - elementRef: ElementRef, - focusMonitor: FocusMonitor, - private stackBlitzWriter: DocsStackblitzWriter - ) { - super(elementRef, focusMonitor); - } - protected openStackBlitz(): void { if (!this._exampleId || !this.exampleData) return; diff --git a/apps/docs/src/app/components/welcome/welcome.component.ts b/apps/docs/src/app/components/welcome/welcome.component.ts index 0d7e50d7f0..27cdf88b05 100644 --- a/apps/docs/src/app/components/welcome/welcome.component.ts +++ b/apps/docs/src/app/components/welcome/welcome.component.ts @@ -29,6 +29,8 @@ import { DocsRegisterHeaderDirective } from '../register-header/register-header. } }) export class DocsWelcomeComponent extends DocsLocaleState implements OnInit { + private readonly themeService = inject(ThemeService); + protected structureCategories: DocsStructureCategory[]; readonly currentTheme = toSignal( this.themeService.current.pipe(map((theme) => theme?.className.replace('kbq-', '') ?? 'light')), @@ -38,7 +40,7 @@ export class DocsWelcomeComponent extends DocsLocaleState implements OnInit { private readonly elementRef = inject>(ElementRef); private readonly docStates = inject(DocsDocStates); - constructor(private readonly themeService: ThemeService) { + constructor() { super(); fromEvent(this.elementRef.nativeElement, 'scroll') diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000000..7e5a4f39be --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,522 @@ +// @ts-check + +const eslint = require('@eslint/js'); +const tseslint = require('typescript-eslint'); +const angular = require('angular-eslint'); +const globals = require('globals'); +const stylistic = require('@stylistic/eslint-plugin'); +const promise = require('eslint-plugin-promise'); +// eslint-plugin-rxjs-x ships as transpiled ESM (the plugin object lives under `.default`) +const rxjs = require('eslint-plugin-rxjs-x').default; +const comments = require('@eslint-community/eslint-plugin-eslint-comments/configs'); +const progress = require('eslint-plugin-file-progress'); +const prettierRecommended = require('eslint-plugin-prettier/recommended'); + +const isCI = !!process.env.CI; + +/** + * @param {string} str + * @returns {string} + */ +const capitalizeFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1); + +/** + * @see https://typescript-eslint.io/rules/naming-convention/#options + * + * @param {string} prefix + */ +const makeNamingConventionOptions = (prefix) => { + return [ + { selector: 'variable', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, + { + selector: 'variable', + modifiers: ['exported'], + format: ['StrictPascalCase', 'UPPER_CASE'], + prefix: [prefix, `${prefix.toUpperCase()}_`] + }, + + { selector: 'function', format: ['camelCase'] }, + { selector: 'function', modifiers: ['exported'], format: ['StrictPascalCase'], prefix: [prefix] }, + + { selector: 'interface', format: ['PascalCase'] }, + { + selector: 'interface', + modifiers: ['exported'], + format: ['StrictPascalCase'], + prefix: [capitalizeFirst(prefix)] + }, + + { selector: 'typeLike', format: ['PascalCase'] }, + { + selector: 'typeLike', + modifiers: ['exported'], + format: ['StrictPascalCase'], + prefix: [capitalizeFirst(prefix)] + }, + + { selector: 'enum', format: ['PascalCase'] }, + { selector: 'enum', modifiers: ['exported'], format: ['StrictPascalCase'], prefix: [capitalizeFirst(prefix)] }, + { selector: 'enumMember', format: ['PascalCase'] }, + + { selector: 'class', format: ['PascalCase'] }, + { selector: 'class', modifiers: ['exported'], format: ['PascalCase'], prefix: [capitalizeFirst(prefix)] }, + { selector: 'classMethod', format: ['camelCase'] }, + { selector: 'classProperty', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' } + ]; +}; + +/** + * @see https://eslint.org/docs/latest/rules/no-restricted-globals + */ +const noRestrictedGlobalsOptionsForSSR = (() => { + /** @type {Array} */ + const restrictedWindowGlobals = [ + 'window', + 'open', + 'close', + 'scroll', + 'scrollTo', + 'scrollBy', + 'requestAnimationFrame', + 'cancelAnimationFrame', + 'requestIdleCallback', + 'cancelIdleCallback', + 'getComputedStyle', + 'matchMedia', + 'navigator', + 'location', + 'history', + 'screen', + 'localStorage', + 'sessionStorage', + 'crypto', + 'caches', + 'performance', + 'speechSynthesis' + ]; + + const restrictedOptions = restrictedWindowGlobals.map((name) => ({ + name, + message: `Global property '${name}' is not available is SSR. Use 'KBQ_WINDOW' injection token from '@koobiq/components/core' instead.` + })); + + restrictedOptions.push({ + name: 'document', + message: `Global property 'document' is not available is SSR. Use 'DOCUMENT' injection token from '@angular/common' instead.` + }); + + return restrictedOptions; +})(); + +module.exports = tseslint.config( + // Global ignores (ported from .eslintignore) + { + ignores: [ + 'dist', + 'node_modules', + 'coverage', + // ignore Yarn's bundled release/plugin binaries (flat config lints .cjs by default, + // unlike the previous `--ext=.js,.ts,.html`) + '.yarn', + // ignore build tokens + 'apps/docs/src/styles/koobiq/default-theme/', + // ignore nunjuck templates + 'tools/api-gen/rendering/templates/**', + // ignore index.html + '**/index.html', + // ignore mocks + '**/mock.ts' + ] + }, + + // plugin:file-progress + { + plugins: { + 'file-progress': progress + }, + rules: { + 'file-progress/activate': isCI ? 0 : 1 + } + }, + + // plugin:@eslint-community/eslint-comments + comments.recommended, + { + rules: { + '@eslint-community/eslint-comments/no-unused-disable': 1, + '@eslint-community/eslint-comments/disable-enable-pair': [1, { allowWholeFile: true }] + } + }, + + // Rules for JavaScript and TypeScript files + { + files: ['**/*.js', '**/*.ts'], + extends: [ + eslint.configs.recommended, + promise.configs['flat/recommended'] + ], + plugins: { + '@stylistic': stylistic + }, + languageOptions: { + globals: { + ...globals.node, + ...globals.es2022 + } + }, + rules: { + // plugin:eslint + 'no-useless-escape': 0, + 'no-self-assign': 0, + 'no-prototype-builtins': 0, + 'no-console': 1, + + // plugin:promise + 'promise/catch-or-return': 0, + 'promise/always-return': 0, + + // @stylistic + '@stylistic/padding-line-between-statements': [ + 1, + { blankLine: 'always', next: 'block', prev: '*' }, + { blankLine: 'always', next: '*', prev: 'block' }, + { blankLine: 'always', next: 'block-like', prev: '*' }, + { blankLine: 'always', next: '*', prev: 'block-like' }, + { blankLine: 'always', next: 'return', prev: '*' }, + { blankLine: 'always', next: '*', prev: 'directive' }, + { blankLine: 'always', next: ['interface', 'type'], prev: '*' }, + { blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] }, + { blankLine: 'always', next: 'class', prev: '*' }, + { blankLine: 'always', next: '*', prev: 'class' }, + { + blankLine: 'any', + next: ['const', 'let', 'var', 'export'], + prev: ['const', 'let', 'var', 'export'] + }, + { blankLine: 'any', next: ['case', 'default'], prev: '*' }, + { blankLine: 'any', next: '*', prev: ['case', 'default'] }, + { blankLine: 'any', next: 'directive', prev: 'directive' } + ] + } + }, + + // JavaScript files in this repo are CommonJS (require/module.exports) + { + files: ['**/*.js'], + languageOptions: { + sourceType: 'commonjs' + }, + rules: { + // ESLint 9 changed the `no-unused-vars` `caughtErrors` default from 'none' to 'all'. + // Restore the previous behavior so unused `catch` bindings are not newly reported. + 'no-unused-vars': ['error', { caughtErrors: 'none' }] + } + }, + + // Rules for TypeScript files + { + files: ['**/*.ts'], + extends: [ + /** @see https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts */ + tseslint.configs.recommended, + /** @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/angular-eslint/src/configs/ts-all.ts */ + angular.configs.tsAll, + rxjs.configs.recommended + ], + processor: angular.processInlineTemplates, + languageOptions: { + parser: tseslint.parser, + parserOptions: { + project: ['tsconfig.eslint.json'], + tsconfigRootDir: __dirname + } + }, + rules: { + // plugin:@typescript-eslint + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-var-requires': 0, + '@typescript-eslint/no-unused-vars': [ + 1, + { + argsIgnorePattern: '^_' + } + ], + '@typescript-eslint/no-duplicate-enum-values': 0, + '@typescript-eslint/ban-tslint-comment': 1, + + // plugin:@angular-eslint + '@angular-eslint/component-class-suffix': 0, + '@angular-eslint/no-host-metadata-property': 0, + '@angular-eslint/directive-class-suffix': 0, + '@angular-eslint/no-output-rename': 0, + '@angular-eslint/no-inputs-metadata-property': 0, + '@angular-eslint/no-output-on-prefix': 0, + '@angular-eslint/no-input-rename': 0, + '@angular-eslint/no-outputs-metadata-property': 0, + '@angular-eslint/no-output-native': 0, + '@angular-eslint/prefer-on-push-component-change-detection': 0, + '@angular-eslint/relative-url-prefix': 0, + '@angular-eslint/component-max-inline-declarations': 0, + '@angular-eslint/consistent-component-styles': 0, + '@angular-eslint/use-component-view-encapsulation': 0, + '@angular-eslint/use-injectable-provided-in': 0, + '@angular-eslint/no-forward-ref': 0, + '@angular-eslint/no-conflicting-lifecycle': 0, + '@angular-eslint/no-attribute-decorator': 0, + '@angular-eslint/no-pipe-impure': 0, + '@angular-eslint/sort-ngmodule-metadata-arrays': 0, + + '@angular-eslint/prefer-signals': 0, + '@angular-eslint/prefer-output-emitter-ref': 0, + '@angular-eslint/prefer-inject': 0, + + // plugin:rxjs-x + 'rxjs-x/no-implicit-any-catch': 0, + 'rxjs-x/no-sharereplay': 0, + 'rxjs-x/no-internal': 0, + 'rxjs-x/no-unbound-methods': 0, + 'rxjs-x/no-topromise': 1, + 'rxjs-x/throw-error': 1, + // These rules are new in eslint-plugin-rxjs-x's `recommended` set (they were not enabled by + // the previous eslint-plugin-rxjs). Disabled to preserve the prior lint behavior. + 'rxjs-x/prefer-root-operators': 0, + 'rxjs-x/prefer-observer': 0 + } + }, + + // Rules for Angular templates + { + files: ['**/*.html'], + extends: [ + /** @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/angular-eslint/src/configs/template-all.ts */ + angular.configs.templateAll + ], + languageOptions: { + parser: angular.templateParser + }, + rules: { + // plugin:@angular-eslint/template + '@angular-eslint/template/no-autofocus': 0, + '@angular-eslint/template/elements-content': 0, + '@angular-eslint/template/click-events-have-key-events': 0, + '@angular-eslint/template/interactive-supports-focus': 0, + '@angular-eslint/template/label-has-associated-control': 0, + '@angular-eslint/template/i18n': 0, + '@angular-eslint/template/no-call-expression': 0, + '@angular-eslint/template/prefer-ngsrc': 0, + '@angular-eslint/template/no-inline-styles': 0, + '@angular-eslint/template/button-has-type': 0, + '@angular-eslint/template/no-interpolation-in-attributes': 0, + '@angular-eslint/template/no-any': 0, + '@angular-eslint/template/prefer-static-string-properties': 0, + '@angular-eslint/template/cyclomatic-complexity': 0, + // Allow combining a static `class`/`style` attribute with its `[class]`/`[style]` binding. + // Angular merges them via styling precedence, so this is a valid pattern (e.g. after the + // NgClass -> [class] migration). Genuine duplicates (two static `class`, two `[class]`) are + // still reported. + '@angular-eslint/template/no-duplicate-attributes': [ + 2, + { + allowStylePrecedenceDuplicates: true + } + ] + } + }, + + // Override rules for apps/docs + { + files: ['apps/docs/**/*.ts'], + rules: { + // plugin:eslint + 'no-console': [1, { allow: ['warn', 'error'] }], + 'no-restricted-globals': [ + 1, + ...noRestrictedGlobalsOptionsForSSR + ], + + // plugin:@angular-eslint + '@angular-eslint/directive-selector': [ + 1, + { + type: 'attribute', + prefix: 'docs', + style: 'camelCase' + } + ], + '@angular-eslint/component-selector': [ + 1, + { + type: 'element', + prefix: 'docs', + style: 'kebab-case' + } + ], + '@angular-eslint/use-component-selector': 1, + + // plugin:@typescript-eslint + '@typescript-eslint/naming-convention': [ + 1, + ...makeNamingConventionOptions('docs') + ] + } + }, + + // Override rules for packages/components-dev + { + files: ['packages/components-dev/**/*.ts'], + rules: { + // plugin:eslint + 'no-restricted-globals': [ + 1, + ...noRestrictedGlobalsOptionsForSSR + ], + 'no-console': 0, + + // plugin:@angular-eslint + '@angular-eslint/directive-selector': [ + 1, + { + type: 'attribute', + prefix: 'dev', + style: 'camelCase' + } + ], + '@angular-eslint/component-selector': [ + 1, + { + type: 'element', + prefix: 'dev', + style: 'kebab-case' + } + ], + '@angular-eslint/use-component-selector': 1, + '@angular-eslint/prefer-on-push-component-change-detection': 1, + + // plugin:@typescript-eslint + '@typescript-eslint/naming-convention': [ + 1, + ...makeNamingConventionOptions('dev') + ] + } + }, + + // Override rules for packages/docs-examples + { + files: ['packages/docs-examples/**/*.ts'], + rules: { + // plugin:eslint + 'no-restricted-globals': [ + 1, + ...noRestrictedGlobalsOptionsForSSR + ], + 'no-console': 0, + + // plugin:@angular-eslint + '@angular-eslint/use-component-selector': 1, + '@angular-eslint/prefer-on-push-component-change-detection': 1 + } + }, + + // Override rules for packages/components + { + files: ['packages/components/**/*.ts'], + rules: { + // plugin:eslint + 'no-restricted-globals': [ + 1, + ...noRestrictedGlobalsOptionsForSSR + ] + } + }, + + // Override rules for specs + { + files: ['**/*.spec.ts'], + rules: { + // plugin:eslint + // ignore `noRestrictedGlobalsOptionsForSSR` in specs, because they are not executed in SSR context + 'no-restricted-globals': 0, + + // plugin:@angular-eslint + '@angular-eslint/use-component-selector': 0, + '@angular-eslint/prefer-on-push-component-change-detection': 0 + } + }, + + // Override rules for e2e + { + files: ['**/*.playwright-spec.ts', '**/e2e.ts', 'packages/e2e/**/*.ts'], + rules: { + // plugin:eslint + // ignore `noRestrictedGlobalsOptionsForSSR` in e2e tests, because they are not executed in SSR context + 'no-restricted-globals': 0, + + // plugin:@angular-eslint + '@angular-eslint/directive-selector': [ + 1, + { + type: 'attribute', + prefix: 'e2e', + style: 'camelCase' + } + ], + '@angular-eslint/component-selector': [ + 1, + { + type: 'element', + prefix: 'e2e', + style: 'kebab-case' + } + ], + '@angular-eslint/use-component-selector': 1, + '@angular-eslint/prefer-on-push-component-change-detection': 1, + + // plugin:@typescript-eslint + '@typescript-eslint/naming-convention': [ + 1, + ...makeNamingConventionOptions('e2e') + ] + } + }, + + // Override rules for /tools + { + files: ['tools/**/*.ts', 'tools/**/*.js'], + rules: { + // plugin:eslint + 'no-console': 0, + + // plugin:@typescript-eslint + // node-only build scripts may use require() for legacy CommonJS modules + '@typescript-eslint/no-require-imports': 0 + } + }, + + // Override rules for /packages/schematics/ + { + files: ['packages/schematics/**/*.ts', 'packages/schematics/**/*.js'], + rules: { + // plugin:eslint + 'no-console': 0 + } + }, + + // Override rules for /packages/cli/ + { + files: ['packages/cli/**/*.ts', 'packages/cli/**/*.js'], + rules: { + // plugin:eslint + 'no-console': 0, + + // plugin:@typescript-eslint + // node-only CLI scripts may use require() for legacy CommonJS modules + '@typescript-eslint/no-require-imports': 0 + } + }, + + // plugin:prettier — must be last so it can turn off conflicting formatting rules + { + files: ['**/*.js', '**/*.ts', '**/*.html'], + extends: [prettierRecommended] + } +); diff --git a/package.json b/package.json index 3ce4af03d0..f09681a937 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,6 @@ "@angular-devkit/build-angular": "20.3.27", "@angular-devkit/core": "20.3.27", "@angular-devkit/schematics": "20.3.27", - "@angular-eslint/eslint-plugin": "^20.7.0", - "@angular-eslint/eslint-plugin-template": "^20.7.0", - "@angular-eslint/template-parser": "^20.7.0", "@angular/cli": "20.3.27", "@angular/compiler-cli": "20.3.24", "@angular/platform-browser-dynamic": "20.3.24", @@ -66,6 +63,7 @@ "@cspell/dict-markdown": "^2.0.17", "@cspell/dict-ru_ru": "^2.3.2", "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", + "@eslint/js": "^9.0.0", "@koobiq/design-tokens": "^3.17.2", "@koobiq/luxon-date-adapter": "^3.5.1", "@koobiq/moment-date-adapter": "^3.5.1", @@ -87,7 +85,7 @@ "@types/chalk": "^2.2.0", "@types/conventional-changelog": "^3.1.5", "@types/conventional-changelog-writer": "^4.0.10", - "@types/eslint": "^8.56.12", + "@types/eslint": "^9.0.0", "@types/express": "^4.17.21", "@types/fs-extra": "^5.1.0", "@types/glob": "^7.1.4", @@ -100,8 +98,7 @@ "@types/nunjucks": "^3.2.1", "@types/spdx-satisfies": "^0.1.2", "@types/ws": "<8.18.2", - "@typescript-eslint/eslint-plugin": "^8.60.1", - "@typescript-eslint/parser": "^8.60.1", + "angular-eslint": "^20.7.0", "autoprefixer": "^10.4.21", "chalk": "^4.1.2", "commander": "^11.1.0", @@ -110,16 +107,17 @@ "conventional-changelog-writer": "5.0.1", "cspell": "^8.19.4", "dotenv": "^16.6.1", - "eslint": "^8.57.1", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.2", "eslint-plugin-file-progress": "^1.5.0", "eslint-plugin-prettier": "^5.5.6", "eslint-plugin-promise": "^7.3.0", - "eslint-plugin-rxjs": "^5.0.3", + "eslint-plugin-rxjs-x": "^1.0.0", "express": "^4.22.1", "firebase-tools": "^15.3.1", "fs-extra": "^5.0.0", "glob": "^7.1.3", + "globals": "^16.0.0", "husky": "^9.1.7", "inquirer": "^7.3.3", "jest": "^30.4.2", @@ -154,7 +152,8 @@ "ts-node": "^10.9.1", "tsconfig-paths": "^3.9.0", "tsickle": "^0.39.1", - "typescript": "5.8.3" + "typescript": "5.8.3", + "typescript-eslint": "^8.60.1" }, "scripts": { "ng": "ng", @@ -286,7 +285,7 @@ "approve-api": "ts-node --project tools/api-extractor/tsconfig.json tools/api-extractor/api-extractor.ts", "check-api": "yarn run approve-api onlyCheck", "-----LINTERS-----": "----------------------------------------------------------------------------------------", - "eslint": "eslint . --ext='.js,.ts,.html'", + "eslint": "eslint .", "eslint:fix": "yarn run eslint --fix", "stylelint": "stylelint '**/*.{css,scss}'", "stylelint:fix": "yarn run stylelint --fix", diff --git a/packages/angular-luxon-adapter/adapter/date-adapter.ts b/packages/angular-luxon-adapter/adapter/date-adapter.ts index ff54dcd387..ce53a7945a 100644 --- a/packages/angular-luxon-adapter/adapter/date-adapter.ts +++ b/packages/angular-luxon-adapter/adapter/date-adapter.ts @@ -1,5 +1,5 @@ import { getLocaleFirstDayOfWeek } from '@angular/common'; -import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; +import { Injectable, InjectionToken, inject } from '@angular/core'; import { KBQ_DATE_LOCALE, KBQ_DEFAULT_LOCALE_ID, KBQ_LOCALE_SERVICE, KbqLocaleService } from '@koobiq/components/core'; import { LuxonDateAdapter as BaseLuxonDateAdapter, LuxonDateAdapterOptions } from '@koobiq/luxon-date-adapter'; import { Info } from 'luxon'; @@ -24,6 +24,8 @@ export function KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY(): KbqLuxonDateAdapterOpt @Injectable() export class LuxonDateAdapter extends BaseLuxonDateAdapter { + protected readonly options?: LuxonDateAdapterOptions; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; /** A stream that emits when the locale changes. */ get localeChanges(): Observable { return this._localeChanges; @@ -31,12 +33,13 @@ export class LuxonDateAdapter extends BaseLuxonDateAdapter { private _localeChanges = new BehaviorSubject(KBQ_DEFAULT_LOCALE_ID); - constructor( - @Inject(KBQ_DATE_LOCALE) dateLocale: string, - @Optional() @Inject(KBQ_LUXON_DATE_ADAPTER_OPTIONS) protected readonly options?: LuxonDateAdapterOptions, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService?: KbqLocaleService - ) { + constructor() { + const dateLocale = inject(KBQ_DATE_LOCALE); + const options = + inject(KBQ_LUXON_DATE_ADAPTER_OPTIONS, { optional: true }) ?? undefined; + super(dateLocale, options); + this.options = options; this.setLocale(this.localeService?.id || dateLocale); diff --git a/packages/angular-luxon-adapter/adapter/index.ts b/packages/angular-luxon-adapter/adapter/index.ts index 148114f0d8..95352cc221 100644 --- a/packages/angular-luxon-adapter/adapter/index.ts +++ b/packages/angular-luxon-adapter/adapter/index.ts @@ -1,12 +1,6 @@ import { NgModule } from '@angular/core'; -import { - DateAdapter, - KBQ_DATE_FORMATS, - KBQ_DATE_LOCALE, - KBQ_LOCALE_SERVICE, - KbqLocaleServiceModule -} from '@koobiq/components/core'; -import { KBQ_LUXON_DATE_ADAPTER_OPTIONS, LuxonDateAdapter } from './date-adapter'; +import { DateAdapter, KBQ_DATE_FORMATS, KbqLocaleServiceModule } from '@koobiq/components/core'; +import { LuxonDateAdapter } from './date-adapter'; export * from './date-adapter'; export * from './date-formats'; @@ -15,8 +9,7 @@ export * from './date-formats'; providers: [ { provide: DateAdapter, - useClass: LuxonDateAdapter, - deps: [KBQ_DATE_LOCALE, KBQ_LUXON_DATE_ADAPTER_OPTIONS, KBQ_LOCALE_SERVICE] + useClass: LuxonDateAdapter } ] }) diff --git a/packages/angular-moment-adapter/adapter/index.ts b/packages/angular-moment-adapter/adapter/index.ts index aa3eb52ada..d4136b3223 100644 --- a/packages/angular-moment-adapter/adapter/index.ts +++ b/packages/angular-moment-adapter/adapter/index.ts @@ -1,12 +1,6 @@ import { NgModule } from '@angular/core'; -import { - DateAdapter, - KBQ_DATE_FORMATS, - KBQ_DATE_LOCALE, - KBQ_LOCALE_SERVICE, - KbqLocaleServiceModule -} from '@koobiq/components/core'; -import { KBQ_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter } from './moment-date-adapter'; +import { DateAdapter, KBQ_DATE_FORMATS, KbqLocaleServiceModule } from '@koobiq/components/core'; +import { MomentDateAdapter } from './moment-date-adapter'; export * from './moment-date-adapter'; export * from './moment-date-formats'; @@ -15,8 +9,7 @@ export * from './moment-date-formats'; providers: [ { provide: DateAdapter, - useClass: MomentDateAdapter, - deps: [KBQ_DATE_LOCALE, KBQ_MOMENT_DATE_ADAPTER_OPTIONS, KBQ_LOCALE_SERVICE] + useClass: MomentDateAdapter } ] }) diff --git a/packages/angular-moment-adapter/adapter/moment-date-adapter.ts b/packages/angular-moment-adapter/adapter/moment-date-adapter.ts index a2515f051f..91ad2a4f41 100644 --- a/packages/angular-moment-adapter/adapter/moment-date-adapter.ts +++ b/packages/angular-moment-adapter/adapter/moment-date-adapter.ts @@ -1,4 +1,4 @@ -import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; +import { Injectable, InjectionToken, inject } from '@angular/core'; import { KBQ_DATE_LOCALE, KBQ_LOCALE_SERVICE, KbqLocaleService } from '@koobiq/components/core'; import { MomentDateAdapter as BaseMomentDateAdapter, MomentDateAdapterOptions } from '@koobiq/moment-date-adapter'; import { Observable, Subject } from 'rxjs'; @@ -25,12 +25,15 @@ export function KBQ_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): IKbqMomentDateAdapter @Injectable() export class MomentDateAdapter extends BaseMomentDateAdapter { - constructor( - @Optional() @Inject(KBQ_DATE_LOCALE) dateLocale: string, - @Optional() @Inject(KBQ_MOMENT_DATE_ADAPTER_OPTIONS) protected readonly options?: IKbqMomentDateAdapterOptions, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService?: KbqLocaleService - ) { + protected readonly options?: IKbqMomentDateAdapterOptions; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + constructor() { + const dateLocale = inject(KBQ_DATE_LOCALE, { optional: true })!; + const options = + inject(KBQ_MOMENT_DATE_ADAPTER_OPTIONS, { optional: true }) ?? undefined; + super(dateLocale, options); + this.options = options; this.setLocale(this.localeService?.id || dateLocale); diff --git a/packages/components-dev/all/module.ts b/packages/components-dev/all/module.ts index 8e80ff4a1c..4fed84fcf4 100644 --- a/packages/components-dev/all/module.ts +++ b/packages/components-dev/all/module.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, OnDestroy, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject, OnDestroy, ViewEncapsulation } from '@angular/core'; import { FormsModule, ReactiveFormsModule, UntypedFormControl, Validators } from '@angular/forms'; import { KbqLuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { KbqMomentDateModule } from '@koobiq/angular-moment-adapter/adapter'; @@ -78,6 +78,8 @@ const MAX_PERCENT: number = 100; encapsulation: ViewEncapsulation.None }) export class DevApp implements OnDestroy { + private modalService = inject(KbqModalService); + themePalette = ThemePalette; popUpPlacements = PopUpPlacements; @@ -162,7 +164,7 @@ export class DevApp implements OnDestroy { dataSource: KbqTreeFlatDataSource; treeFlattener: KbqTreeFlattener; - constructor(private modalService: KbqModalService) { + constructor() { setInterval(() => (this.percent = (this.percent + STEP) % (MAX_PERCENT + STEP)), INTERVAL); this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren); diff --git a/packages/components-dev/date-formatter/module.ts b/packages/components-dev/date-formatter/module.ts index ae0d15a4fd..16987785a7 100644 --- a/packages/components-dev/date-formatter/module.ts +++ b/packages/components-dev/date-formatter/module.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewEncapsulation, inject } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { DateAdapter, @@ -26,6 +26,11 @@ import { DevLocaleSelector } from '../locale-selector'; encapsulation: ViewEncapsulation.None }) export class DevApp { + private cdr = inject(ChangeDetectorRef); + formatter = inject>(DateFormatter); + adapter = inject>(DateAdapter); + localeService = inject(KBQ_LOCALE_SERVICE); + lang = { absolute: { long: { @@ -329,12 +334,7 @@ export class DevApp { } }; - constructor( - private cdr: ChangeDetectorRef, - public formatter: DateFormatter, - public adapter: DateAdapter, - @Inject(KBQ_LOCALE_SERVICE) public localeService: KbqLocaleService - ) { + constructor() { this.localeService.changes.pipe(distinctUntilChanged(), delay(0)).subscribe(this.onLocaleChange); } diff --git a/packages/components-dev/datepicker/module.ts b/packages/components-dev/datepicker/module.ts index fd534fe91f..9fd2d1f25a 100644 --- a/packages/components-dev/datepicker/module.ts +++ b/packages/components-dev/datepicker/module.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, ChangeDetectionStrategy, Component, ViewEncapsulation, viewChild } from '@angular/core'; +import { AfterViewInit, ChangeDetectionStrategy, Component, ViewEncapsulation, inject, viewChild } from '@angular/core'; import { FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms'; import { KbqLuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter } from '@koobiq/components/core'; @@ -58,6 +58,8 @@ export class DevDocsExamples {} encapsulation: ViewEncapsulation.None }) export class DevApp implements AfterViewInit { + private adapter = inject>(DateAdapter); + date = this.adapter.today(); formControlValue: UntypedFormControl; minDate; @@ -66,7 +68,7 @@ export class DevApp implements AfterViewInit { readonly datepicker = viewChild.required(KbqDatepicker); - constructor(private adapter: DateAdapter) { + constructor() { this.formControlValue = new UntypedFormControl(this.adapter.createDateTime(2021, 8, 11, 12, 0, 0, 0)); this.formControlValue.valueChanges.subscribe((value) => { console.log('this.formControlValue.valueChanges: ', value?.toString()); diff --git a/packages/components-dev/input/module.ts b/packages/components-dev/input/module.ts index fdeb56cedb..ff39a308eb 100644 --- a/packages/components-dev/input/module.ts +++ b/packages/components-dev/input/module.ts @@ -2,7 +2,7 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, - Inject, + inject, model, viewChild, viewChildren, @@ -79,6 +79,8 @@ export class DevDocsExamples {} } }) export class DevApp implements AfterViewInit { + localeService = inject(KBQ_LOCALE_SERVICE); + passwordRules = PasswordRules; password = '456'; @@ -96,7 +98,7 @@ export class DevApp implements AfterViewInit { readonly passwordHints = viewChildren(KbqPasswordHint); readonly formField = viewChild.required('formField'); - constructor(@Inject(KBQ_LOCALE_SERVICE) public localeService: KbqLocaleService) { + constructor() { this.locales = Object.keys(this.localeService.locales).filter((key) => key !== 'items'); } diff --git a/packages/components-dev/list/module.ts b/packages/components-dev/list/module.ts index 8c40626869..f322a0b1c6 100644 --- a/packages/components-dev/list/module.ts +++ b/packages/components-dev/list/module.ts @@ -1,7 +1,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { AsyncPipe, JsonPipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, signal, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject, signal, ViewEncapsulation } from '@angular/core'; import { FormsModule, UntypedFormControl } from '@angular/forms'; import { PopUpPlacements } from '@koobiq/components/core'; import { KbqDropdownModule } from '@koobiq/components/dropdown'; @@ -54,6 +54,8 @@ export class DevDocsExamples {} encapsulation: ViewEncapsulation.None }) export class DevApp { + private clipboard = inject(Clipboard); + list = signal(Array.from({ length: 5 }, (_, i) => `Item ${i}`)); readonly options = Array.from({ length: 10000 }).map((_, i) => ({ @@ -79,8 +81,6 @@ export class DevApp { }) ); - constructor(private clipboard: Clipboard) {} - onSelectionChange($event: KbqListSelectionChange) { console.log(`onSelectionChange: ${$event.option.value}`); } diff --git a/packages/components-dev/locale/module.ts b/packages/components-dev/locale/module.ts index 51de73a512..acca2a3b42 100644 --- a/packages/components-dev/locale/module.ts +++ b/packages/components-dev/locale/module.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Inject, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { KbqButtonModule } from '@koobiq/components/button'; import { @@ -31,11 +31,13 @@ import { KbqSelectModule } from '@koobiq/components/select'; encapsulation: ViewEncapsulation.None }) export class DevApp { + private localeService = inject(KBQ_LOCALE_SERVICE); + themePalette = ThemePalette; selectedLanguage; languages; - constructor(@Inject(KBQ_LOCALE_SERVICE) private localeService: KbqLocaleService) { + constructor() { this.languages = this.localeService.locales.items.map((item) => ({ ...item, selected: false })); this.selectLanguage(this.languages[0]); diff --git a/packages/components-dev/modal/module.ts b/packages/components-dev/modal/module.ts index 12734948e8..285d99b222 100644 --- a/packages/components-dev/modal/module.ts +++ b/packages/components-dev/modal/module.ts @@ -82,11 +82,12 @@ export class DevModalLongCustomComponent { changeDetection: ChangeDetectionStrategy.OnPush }) export class DevModalCustomComponent { - componentColors = KbqComponentColors; + private modal = inject(KbqModalRef); - data = inject<{ title?: string; subtitle?: string; myData?: string }>(KBQ_MODAL_DATA, { optional: true }); + componentColors = KbqComponentColors; - constructor(private modal: KbqModalRef) { + data = inject<{ title?: string; subtitle?: string; myData?: string }>(KBQ_MODAL_DATA, { optional: true })!; + constructor() { console.log('data: ', this.data); } @@ -123,13 +124,13 @@ export class DevModalCustomComponent { changeDetection: ChangeDetectionStrategy.OnPush }) export class DevModalFullCustomComponent { + private modal = inject(KbqModalRef); + componentColors = KbqComponentColors; readonly title = input(undefined!); readonly subtitle = input(undefined!); - constructor(private modal: KbqModalRef) {} - destroyModal() { this.modal.destroy({ data: 'this the result data' }); } @@ -151,6 +152,8 @@ export class DevModalFullCustomComponent { encapsulation: ViewEncapsulation.None }) export class DevApp { + private modalService = inject(KbqModalService); + componentColors = KbqComponentColors; isVisible = false; @@ -159,8 +162,6 @@ export class DevApp { isLoading = false; - constructor(private modalService: KbqModalService) {} - showConfirm() { this.modalService.success({ kbqSize: ModalSize.Small, diff --git a/packages/components-dev/navbar/module.ts b/packages/components-dev/navbar/module.ts index 4ca6115edc..9d45b0716e 100644 --- a/packages/components-dev/navbar/module.ts +++ b/packages/components-dev/navbar/module.ts @@ -1,5 +1,5 @@ import { AsyncPipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, ViewEncapsulation, viewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject, viewChild } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { KbqBadgeModule } from '@koobiq/components/badge'; import { KbqButtonModule } from '@koobiq/components/button'; @@ -54,6 +54,8 @@ export class DevDocsExamples {} encapsulation: ViewEncapsulation.None }) export class DevApp { + private modalService = inject(KbqModalService); + popUpPlacements = PopUpPlacements; readonly navbar = viewChild.required('verticalNavbar'); @@ -78,8 +80,6 @@ export class DevApp { permission$ = timer(500).pipe(map(() => true)); - constructor(private modalService: KbqModalService) {} - collapsedNavbarWidthChange() { this.navbar().updateExpandedStateForItems(); } diff --git a/packages/components-dev/sidepanel/module.ts b/packages/components-dev/sidepanel/module.ts index 4ce26f25c9..f0f550dc8d 100644 --- a/packages/components-dev/sidepanel/module.ts +++ b/packages/components-dev/sidepanel/module.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Inject, TemplateRef, ViewEncapsulation, viewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, inject, viewChild } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { KbqButtonModule } from '@koobiq/components/button'; import { ThemePalette } from '@koobiq/components/core'; @@ -83,13 +83,17 @@ export class DevDocsExamples {} } }) export class DevSidepanelComponent { + data = inject(KBQ_SIDEPANEL_DATA); + themePalette = ThemePalette; openComponentSidepanel: () => void; array = new Array(60); - constructor(@Inject(KBQ_SIDEPANEL_DATA) public data: any) { + constructor() { + const data = this.data; + this.openComponentSidepanel = data.openComponentSidepanel; } } @@ -112,6 +116,8 @@ export class DevSidepanelComponent { encapsulation: ViewEncapsulation.None }) export class DevApp { + private sidepanelService = inject(KbqSidepanelService); + themePalette = ThemePalette; position: KbqSidepanelPosition = KbqSidepanelPosition.Right; size: KbqSidepanelSize = KbqSidepanelSize.Medium; @@ -121,7 +127,6 @@ export class DevApp { readonly template = viewChild.required(TemplateRef); array = new Array(40); - constructor(private sidepanelService: KbqSidepanelService) {} openComponentSidepanel() { this.sidepanelService.open(DevSidepanelComponent, { diff --git a/packages/components-dev/timepicker/module.ts b/packages/components-dev/timepicker/module.ts index b5c3e02fe6..c4f8d133d3 100644 --- a/packages/components-dev/timepicker/module.ts +++ b/packages/components-dev/timepicker/module.ts @@ -1,5 +1,5 @@ import { JsonPipe, LowerCasePipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core'; import { FormsModule, ReactiveFormsModule, @@ -50,6 +50,9 @@ export class DevExamples {} encapsulation: ViewEncapsulation.None }) export class DevApp { + private fb = inject(UntypedFormBuilder); + private adapter = inject>(DateAdapter); + timeFormats = TimeFormats; placeholder: string = 'placeholder'; minDate: DateTime; @@ -66,10 +69,7 @@ export class DevApp { testForm: UntypedFormGroup; selectedLanguage!: { id: string; name: string }; - constructor( - private fb: UntypedFormBuilder, - private adapter: DateAdapter - ) { + constructor() { this.minDate = this.adapter.createDateTime(2020, 0, 6, 12, 0, 10, 0); this.maxDate = this.adapter.createDateTime(2020, 0, 6, 13, 0, 10, 0); diff --git a/packages/components-dev/toast/module.ts b/packages/components-dev/toast/module.ts index 99276bbb9e..06bbc8bf99 100644 --- a/packages/components-dev/toast/module.ts +++ b/packages/components-dev/toast/module.ts @@ -1,12 +1,4 @@ -import { FocusMonitor } from '@angular/cdk/a11y'; -import { - ChangeDetectionStrategy, - Component, - ElementRef, - TemplateRef, - ViewEncapsulation, - viewChild -} from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, inject, viewChild } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { ThemePalette } from '@koobiq/components/core'; import { KbqDropdownModule } from '@koobiq/components/dropdown'; @@ -73,13 +65,16 @@ export class DevDocsExamples {} } }) export class DevToastComponent extends KbqToastComponent { - constructor( - readonly data: KbqToastData, - readonly service: KbqToastService, - elementRef: ElementRef, - focusMonitor: FocusMonitor - ) { - super(data, service, elementRef, focusMonitor); + readonly data: KbqToastData; + readonly service: KbqToastService; + + constructor() { + const data = inject(KbqToastData); + const service = inject(KbqToastService); + + super(); + this.data = data; + this.service = service; console.log('MyToastComponent: '); } @@ -106,6 +101,11 @@ export class DevToastComponent extends KbqToastComponent { encapsulation: ViewEncapsulation.None }) export class DevApp { + private toastService = inject(KbqToastService); + private newToastService = inject>(KbqToastService); + private modalService = inject(KbqModalService); + private sidepanelService = inject(KbqSidepanelService); + themePalette = ThemePalette; position: KbqSidepanelPosition = KbqSidepanelPosition.Right; @@ -115,13 +115,6 @@ export class DevApp { array = new Array(40); readonly template = viewChild.required>('sipanelTemplate'); - constructor( - private toastService: KbqToastService, - private newToastService: KbqToastService, - private modalService: KbqModalService, - private sidepanelService: KbqSidepanelService - ) {} - openTemplateSidepanel() { this.sidepanelService.open(this.template(), { position: this.position, diff --git a/packages/components-dev/validation/module.ts b/packages/components-dev/validation/module.ts index 7e4c65a4e9..53fb716ecd 100644 --- a/packages/components-dev/validation/module.ts +++ b/packages/components-dev/validation/module.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, ViewEncapsulation } from '@angular/core'; import { AbstractControl, FormsModule, @@ -83,6 +83,9 @@ export class DevDocsExamples {} encapsulation: ViewEncapsulation.None }) export class DevApp { + private formBuilder = inject(UntypedFormBuilder); + changeDetectorRef = inject(ChangeDetectorRef); + themePalette = ThemePalette; reactiveTypeaheadItems: string[] = []; @@ -128,10 +131,7 @@ export class DevApp { formControlTags: UntypedFormControl; formControlTagInputFormControl: UntypedFormControl; - constructor( - private formBuilder: UntypedFormBuilder, - public changeDetectorRef: ChangeDetectorRef - ) { + constructor() { this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren); this.treeControl = new FlatTreeControl( diff --git a/packages/components-dev/z-index/module.ts b/packages/components-dev/z-index/module.ts index cf9e2222a3..fda17fa852 100644 --- a/packages/components-dev/z-index/module.ts +++ b/packages/components-dev/z-index/module.ts @@ -1,15 +1,7 @@ -import { FocusMonitor } from '@angular/cdk/a11y'; import { OverlayContainer } from '@angular/cdk/overlay'; import { CdkScrollableModule } from '@angular/cdk/scrolling'; import { NgTemplateOutlet } from '@angular/common'; -import { - ChangeDetectionStrategy, - Component, - ElementRef, - TemplateRef, - ViewEncapsulation, - viewChild -} from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, inject, viewChild } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { KbqOptionModule, PopUpPlacements, ThemePalette } from '@koobiq/components/core'; import { KbqDropdownModule } from '@koobiq/components/dropdown'; @@ -35,13 +27,17 @@ import { KbqToolTipModule } from '@koobiq/components/tooltip'; } }) export class DevToastComponent extends KbqToastComponent { - constructor( - readonly data: KbqToastData, - readonly service: KbqToastService, - elementRef: ElementRef, - focusMonitor: FocusMonitor - ) { - super(data, service, elementRef, focusMonitor); + readonly data: KbqToastData; + readonly service: KbqToastService; + + constructor() { + const data = inject(KbqToastData); + const service = inject(KbqToastService); + + super(); + + this.data = data; + this.service = service; } } @@ -71,6 +67,11 @@ export class DevToastComponent extends KbqToastComponent { encapsulation: ViewEncapsulation.None }) export class DevApp { + private toastService = inject(KbqToastService); + private modalService = inject(KbqModalService); + private sidepanelService = inject(KbqSidepanelService); + private overlayRef = inject(OverlayContainer); + themePalette = ThemePalette; selectValue = ''; @@ -82,12 +83,9 @@ export class DevApp { array = new Array(40); readonly template = viewChild.required>('sipanelTemplate'); - constructor( - private toastService: KbqToastService, - private modalService: KbqModalService, - private sidepanelService: KbqSidepanelService, - private overlayRef: OverlayContainer - ) { + constructor() { + const overlayRef = this.overlayRef; + console.log('overlayRef: ', overlayRef); console.log('overlayRef.getContainerElement(): ', overlayRef.getContainerElement()); console.log('qwe: ', overlayRef.getContainerElement().childNodes.length); diff --git a/packages/components/app-switcher/app-switcher.ts b/packages/components/app-switcher/app-switcher.ts index e8e4ee5b41..492637da98 100644 --- a/packages/components/app-switcher/app-switcher.ts +++ b/packages/components/app-switcher/app-switcher.ts @@ -537,7 +537,7 @@ export class KbqAppSwitcherTrigger this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible: boolean) => { if (visible) { - // eslint-disable-next-line rxjs/no-nested-subscribe + // eslint-disable-next-line rxjs-x/no-nested-subscribe this.preventClosingByInnerScrollSubscription = this.closingActions().subscribe((event) => { if (event['scrollDispatcher']) { event['kbqPopoverPreventHide'] = true; diff --git a/packages/components/autocomplete/autocomplete-origin.directive.ts b/packages/components/autocomplete/autocomplete-origin.directive.ts index ff6bac82bd..4a1089a761 100644 --- a/packages/components/autocomplete/autocomplete-origin.directive.ts +++ b/packages/components/autocomplete/autocomplete-origin.directive.ts @@ -1,4 +1,4 @@ -import { Directive, ElementRef } from '@angular/core'; +import { Directive, ElementRef, inject } from '@angular/core'; /** * Directive applied to an element to make it usable @@ -9,5 +9,5 @@ import { Directive, ElementRef } from '@angular/core'; exportAs: 'kbqAutocompleteOrigin' }) export class KbqAutocompleteOrigin { - constructor(public elementRef: ElementRef) {} + elementRef = inject>(ElementRef); } diff --git a/packages/components/autocomplete/autocomplete-trigger.directive.ts b/packages/components/autocomplete/autocomplete-trigger.directive.ts index f2595b413a..ef753d2e78 100644 --- a/packages/components/autocomplete/autocomplete-trigger.directive.ts +++ b/packages/components/autocomplete/autocomplete-trigger.directive.ts @@ -18,13 +18,10 @@ import { ChangeDetectorRef, Directive, ElementRef, - Host, - Inject, InjectionToken, Input, NgZone, OnDestroy, - Optional, Provider, ViewContainerRef, afterNextRender, @@ -116,6 +113,15 @@ export function getKbqAutocompleteMissingPanelError(): Error { export class KbqAutocompleteTrigger implements AfterViewInit, ControlValueAccessor, OnDestroy, KeyboardNavigationHandler { + private elementRef = inject>(ElementRef); + private viewContainerRef = inject(ViewContainerRef); + private changeDetectorRef = inject(ChangeDetectorRef); + private overlay = inject(Overlay); + private zone = inject(NgZone); + private dir = inject(Directionality, { optional: true })!; + private formField = inject(KbqFormField, { optional: true, host: true })!; + private viewportRuler = inject(ViewportRuler); + protected readonly document = inject(DOCUMENT); readonly optionSelections: Observable = defer(() => { @@ -221,18 +227,10 @@ export class KbqAutocompleteTrigger private readonly closeKeyEventStream = new Subject(); private readonly window = inject(KBQ_WINDOW); - constructor( - private elementRef: ElementRef, - private viewContainerRef: ViewContainerRef, - private changeDetectorRef: ChangeDetectorRef, - private overlay: Overlay, - private zone: NgZone, - @Inject(KBQ_AUTOCOMPLETE_SCROLL_STRATEGY) scrollStrategy: any, - @Optional() private dir: Directionality, - @Optional() @Host() private formField: KbqFormField, - // @breaking-change 8.0.0 Make `_viewportRuler` required. - private viewportRuler?: ViewportRuler - ) { + constructor() { + const zone = this.zone; + const scrollStrategy = inject(KBQ_AUTOCOMPLETE_SCROLL_STRATEGY); + afterNextRender(() => { zone.runOutsideAngular(() => this.window.addEventListener('blur', this.windowBlurHandler)); }); diff --git a/packages/components/autocomplete/autocomplete.component.ts b/packages/components/autocomplete/autocomplete.component.ts index 6cd95a9358..a35f8aa249 100644 --- a/packages/components/autocomplete/autocomplete.component.ts +++ b/packages/components/autocomplete/autocomplete.component.ts @@ -9,13 +9,10 @@ import { DestroyRef, Directive, ElementRef, - Host, inject, - Inject, InjectionToken, Input, numberAttribute, - Optional, output, QueryList, TemplateRef, @@ -90,6 +87,9 @@ export function KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): KbqAutocompleteDefau exportAs: 'kbqAutocomplete' }) export class KbqAutocomplete implements AfterContentInit { + private changeDetectorRef = inject(ChangeDetectorRef); + private elementRef = inject>(ElementRef); + private readonly parentFormField = inject(KbqFormField, { host: true, optional: true })!; private readonly destroyRef = inject(DestroyRef); /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */ id: string = `kbq-autocomplete-${uniqueAutocompleteIdCounter++}`; @@ -203,12 +203,9 @@ export class KbqAutocomplete implements AfterContentInit { private _openOnFocus: boolean = true; - constructor( - private changeDetectorRef: ChangeDetectorRef, - private elementRef: ElementRef, - @Inject(KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS) defaults: KbqAutocompleteDefaultOptions, - @Host() @Optional() private readonly parentFormField: KbqFormField - ) { + constructor() { + const defaults = inject(KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS); + this._autoActiveFirstOption = !!defaults.autoActiveFirstOption; } diff --git a/packages/components/badge/badge.component.ts b/packages/components/badge/badge.component.ts index ed4882eaa3..8b15bbae5e 100644 --- a/packages/components/badge/badge.component.ts +++ b/packages/components/badge/badge.component.ts @@ -8,10 +8,10 @@ import { Directive, ElementRef, forwardRef, + inject, Input, input, Renderer2, - SkipSelf, ViewEncapsulation } from '@angular/core'; import { getNodesWithoutComments } from '@koobiq/components/core'; @@ -50,17 +50,18 @@ export const badgeRightIconClassName = 'kbq-badge-icon_right'; selector: 'kbq-badge' }) export class KbqBadgeCssStyler implements AfterContentInit { + private renderer = inject(Renderer2); + private cdr = inject(ChangeDetectorRef, { skipSelf: true }); + readonly icons = contentChildren(forwardRef(() => KbqIcon)); nativeElement: HTMLElement; isIconButton: boolean = false; - constructor( - elementRef: ElementRef, - private renderer: Renderer2, - @SkipSelf() private cdr: ChangeDetectorRef - ) { + constructor() { + const elementRef = inject>(ElementRef); + this.nativeElement = elementRef.nativeElement; } diff --git a/packages/components/button-toggle/button-toggle.component.ts b/packages/components/button-toggle/button-toggle.component.ts index caf197c181..fb27e16308 100644 --- a/packages/components/button-toggle/button-toggle.component.ts +++ b/packages/components/button-toggle/button-toggle.component.ts @@ -11,11 +11,11 @@ import { Directive, ElementRef, forwardRef, + inject, Input, input, OnDestroy, OnInit, - Optional, output, viewChild, ViewEncapsulation @@ -61,6 +61,8 @@ export class KbqButtonToggleChange { exportAs: 'kbqButtonToggleGroup' }) export class KbqButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit { + private _changeDetector = inject(ChangeDetectorRef); + /** Whether the toggle group is vertical. */ // TODO: Skipped for migration because: // Accessor inputs cannot be migrated as they are too complex. @@ -156,8 +158,6 @@ export class KbqButtonToggleGroup implements ControlValueAccessor, OnInit, After */ private rawValue: any; - constructor(private _changeDetector: ChangeDetectorRef) {} - /** * The method to be called in order to update ngModel. * Now `ngModel` binding is not supported in multiple selection mode. @@ -332,6 +332,11 @@ export class KbqButtonToggleGroup implements ControlValueAccessor, OnInit, After exportAs: 'kbqButtonToggle' }) export class KbqButtonToggle implements OnInit, AfterContentInit, AfterViewInit, OnDestroy { + buttonToggleGroup = inject(KbqButtonToggleGroup, { optional: true })!; + private changeDetectorRef = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + private element = inject(ElementRef); + readonly icons = contentChildren(KbqIcon, { descendants: true }); /** Whether the button is checked. */ @@ -387,13 +392,6 @@ export class KbqButtonToggle implements OnInit, AfterContentInit, AfterViewInit, private _checked = false; private _disabled: boolean = false; - constructor( - @Optional() public buttonToggleGroup: KbqButtonToggleGroup, - private changeDetectorRef: ChangeDetectorRef, - private focusMonitor: FocusMonitor, - private element: ElementRef - ) {} - ngOnInit() { this.isSingleSelector = this.buttonToggleGroup && !this.buttonToggleGroup.multiple; this.type = this.isSingleSelector ? 'radio' : 'checkbox'; diff --git a/packages/components/button/button.component.ts b/packages/components/button/button.component.ts index 162a2930eb..9c092cccf1 100644 --- a/packages/components/button/button.component.ts +++ b/packages/components/button/button.component.ts @@ -18,7 +18,6 @@ import { OnDestroy, Renderer2, signal, - SkipSelf, ViewChild, ViewEncapsulation } from '@angular/core'; @@ -51,17 +50,18 @@ export const buttonRightIconClassName = 'kbq-button-icon_right'; } }) export class KbqButtonCssStyler implements AfterContentInit { + private renderer = inject(Renderer2); + private cdr = inject(ChangeDetectorRef, { skipSelf: true }); + readonly icons = contentChildren(forwardRef(() => KbqIcon)); nativeElement: HTMLElement; isIconButton: boolean = false; - constructor( - elementRef: ElementRef, - private renderer: Renderer2, - @SkipSelf() private cdr: ChangeDetectorRef - ) { + constructor() { + const elementRef = inject>(ElementRef); + this.nativeElement = elementRef.nativeElement; } @@ -137,6 +137,9 @@ export class KbqButtonCssStyler implements AfterContentInit { } }) export class KbqButton extends KbqColorDirective implements OnDestroy, AfterViewInit, KbqTitleTextRef { + private focusMonitor = inject(FocusMonitor); + private styler = inject(KbqButtonCssStyler); + private readonly changeDetectorRef = inject(ChangeDetectorRef); hasFocus: boolean = false; @@ -190,10 +193,7 @@ export class KbqButton extends KbqColorDirective implements OnDestroy, AfterView private _tabIndex = 0; - constructor( - private focusMonitor: FocusMonitor, - private styler: KbqButtonCssStyler - ) { + constructor() { super(); this.color = KbqComponentColors.ContrastFade; diff --git a/packages/components/checkbox/checkbox.ts b/packages/components/checkbox/checkbox.ts index eeef32a61b..99873cf18f 100644 --- a/packages/components/checkbox/checkbox.ts +++ b/packages/components/checkbox/checkbox.ts @@ -89,6 +89,9 @@ export class KbqCheckboxChange { exportAs: 'kbqCheckbox' }) export class KbqCheckbox extends KbqColorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy { + private changeDetectorRef = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + readonly big = input(false); /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */ @@ -213,10 +216,7 @@ export class KbqCheckbox extends KbqColorDirective implements ControlValueAccess private currentCheckState: TransitionCheckState = TransitionCheckState.Init; - constructor( - private changeDetectorRef: ChangeDetectorRef, - private focusMonitor: FocusMonitor - ) { + constructor() { super(); this.id = this.uniqueId; diff --git a/packages/components/core/formatters/date/formatter.spec.ts b/packages/components/core/formatters/date/formatter.spec.ts index 013ce3f785..b6c161e50b 100644 --- a/packages/components/core/formatters/date/formatter.spec.ts +++ b/packages/components/core/formatters/date/formatter.spec.ts @@ -4,8 +4,8 @@ import { KbqLuxonDateModule, LuxonDateAdapter, LuxonDateModule } from '@koobiq/a import { DateAdapter, DateFormatter, - KBQ_DATE_LOCALE, KBQ_DEFAULT_LOCALE_DATA_FACTORY, + KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KbqAbsoluteLongDatePipe, @@ -45,7 +45,7 @@ describe('Date formatter', () => { providers: [ { provide: DateAdapter, useClass: LuxonDateAdapter }, { provide: LOCALE_ID, useValue: 'ru-RU' }, - { provide: DateFormatter, deps: [DateAdapter, KBQ_DATE_LOCALE] } + DateFormatter ] }).compileComponents(); }); @@ -2312,10 +2312,9 @@ describe('Date formatter (imports and providing)', () => { TestBed.configureTestingModule({ imports: [KbqFormattersModule, KbqLuxonDateModule], providers: [ - { - provide: KBQ_LOCALE_SERVICE, - useFactory: () => new KbqLocaleService('pt-BR', KBQ_DEFAULT_LOCALE_DATA_FACTORY()) - } + { provide: KBQ_LOCALE_ID, useValue: 'pt-BR' }, + { provide: KBQ_LOCALE_DATA, useValue: KBQ_DEFAULT_LOCALE_DATA_FACTORY() }, + { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService } ] }).compileComponents(); }); @@ -2341,11 +2340,8 @@ describe('Date formatter (imports and providing)', () => { imports: [KbqFormattersModule, KbqLuxonDateModule], providers: [ { provide: KBQ_LOCALE_ID, useValue: 'en-US' }, - { - provide: KBQ_LOCALE_SERVICE, - useFactory: (locale: string) => new KbqLocaleService(locale, KBQ_DEFAULT_LOCALE_DATA_FACTORY()), - deps: [KBQ_LOCALE_ID] - } + { provide: KBQ_LOCALE_DATA, useValue: KBQ_DEFAULT_LOCALE_DATA_FACTORY() }, + { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService } ] }).compileComponents(); }); @@ -2382,10 +2378,9 @@ describe('Date formatter (imports and providing)', () => { TestBed.configureTestingModule({ imports: [HostComponent, KbqFormattersModule, KbqLuxonDateModule], providers: [ - { - provide: KBQ_LOCALE_SERVICE, - useFactory: () => new KbqLocaleService('ru-RU', KBQ_DEFAULT_LOCALE_DATA_FACTORY()) - } + { provide: KBQ_LOCALE_ID, useValue: 'ru-RU' }, + { provide: KBQ_LOCALE_DATA, useValue: KBQ_DEFAULT_LOCALE_DATA_FACTORY() }, + { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService } ] }); }); @@ -2530,10 +2525,9 @@ describe('Date formatter (imports and providing)', () => { TestBed.configureTestingModule({ imports: [AllPipesHostComponent, KbqFormattersModule, KbqLuxonDateModule], providers: [ - { - provide: KBQ_LOCALE_SERVICE, - useFactory: () => new KbqLocaleService('ru-RU', KBQ_DEFAULT_LOCALE_DATA_FACTORY()) - } + { provide: KBQ_LOCALE_ID, useValue: 'ru-RU' }, + { provide: KBQ_LOCALE_DATA, useValue: KBQ_DEFAULT_LOCALE_DATA_FACTORY() }, + { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService } ] }); }); diff --git a/packages/components/core/formatters/date/formatter.ts b/packages/components/core/formatters/date/formatter.ts index 48d47044b6..0a1d8503c8 100644 --- a/packages/components/core/formatters/date/formatter.ts +++ b/packages/components/core/formatters/date/formatter.ts @@ -1,18 +1,21 @@ -import { inject, Inject, Injectable } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { DateAdapter } from '@koobiq/date-adapter'; import { DateFormatter as BaseDateFormatter } from '@koobiq/date-formatter'; -import { KBQ_DATE_LOCALE } from '../../datetime'; +import { KBQ_DATE_LOCALE, DateAdapter as KbqDateAdapter } from '../../datetime'; import { KBQ_LOCALE_SERVICE, KbqLocaleService } from '../../locales'; @Injectable() export class DateFormatter extends BaseDateFormatter { - protected localeService = inject(KBQ_LOCALE_SERVICE, { optional: true }); - constructor( - override readonly adapter: DateAdapter, - @Inject(KBQ_DATE_LOCALE) locale: string - ) { + override readonly adapter: DateAdapter; + + protected localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + constructor() { + const adapter = inject>(KbqDateAdapter); + const locale = inject(KBQ_DATE_LOCALE); + super(adapter, locale); + this.adapter = adapter; this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe((locale) => this.setLocale(locale)); } diff --git a/packages/components/core/formatters/index.ts b/packages/components/core/formatters/index.ts index 4e6e7c410c..520e794fad 100644 --- a/packages/components/core/formatters/index.ts +++ b/packages/components/core/formatters/index.ts @@ -1,5 +1,4 @@ import { NgModule } from '@angular/core'; -import { DateAdapter, KBQ_DATE_LOCALE } from '../datetime'; import { DateFormatter } from './date/formatter'; import { AbsoluteDateFormatterImpurePipe, @@ -91,7 +90,7 @@ import { KbqDecimalPipe, KbqRoundDecimalPipe, KbqTableNumberPipe } from './numbe KbqRoundDecimalPipe, KbqTableNumberPipe ], - providers: [{ provide: DateFormatter, deps: [DateAdapter, KBQ_DATE_LOCALE] }], + providers: [DateFormatter], exports: [ KbqDecimalPipe, KbqRoundDecimalPipe, diff --git a/packages/components/core/formatters/number/formatter.spec.ts b/packages/components/core/formatters/number/formatter.spec.ts index 52723493e9..41dfd0ff90 100644 --- a/packages/components/core/formatters/number/formatter.spec.ts +++ b/packages/components/core/formatters/number/formatter.spec.ts @@ -1,6 +1,5 @@ import { fakeAsync, flush, TestBed } from '@angular/core/testing'; import { - KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KbqFormattersModule, @@ -17,7 +16,7 @@ describe('KbqRoundDecimalPipe', () => { imports: [KbqFormattersModule], providers: [ { provide: KBQ_LOCALE_ID, useValue: 'ru-RU' }, - { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService, deps: [KBQ_LOCALE_ID, KBQ_LOCALE_DATA] } + { provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService } ] }).compileComponents(); diff --git a/packages/components/core/formatters/number/formatter.ts b/packages/components/core/formatters/number/formatter.ts index b8ca7fbb95..acaa5e9e90 100644 --- a/packages/components/core/formatters/number/formatter.ts +++ b/packages/components/core/formatters/number/formatter.ts @@ -1,5 +1,5 @@ import { coerceNumberProperty } from '@angular/cdk/coercion'; -import { Inject, Injectable, InjectionToken, Optional, Pipe, PipeTransform } from '@angular/core'; +import { Injectable, InjectionToken, Pipe, PipeTransform, inject } from '@angular/core'; import { KBQ_DEFAULT_LOCALE_ID, KBQ_LOCALE_ID, @@ -149,11 +149,10 @@ function parseDigitsInfo(digitsInfo: string): ParsedDigitsInfo { pure: false }) export class KbqDecimalPipe implements KbqNumericPipe, PipeTransform { - constructor( - @Optional() @Inject(KBQ_LOCALE_ID) private id: string, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService: KbqLocaleService, - @Optional() @Inject(KBQ_NUMBER_FORMATTER_OPTIONS) private readonly options: ParsedDigitsInfo - ) { + private id = inject(KBQ_LOCALE_ID, { optional: true })!; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + private readonly options = inject(KBQ_NUMBER_FORMATTER_OPTIONS, { optional: true })!; + constructor() { this.options = this.options || KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS; this.localeService?.changes.subscribe((newId: string) => (this.id = newId)); @@ -223,11 +222,10 @@ export class KbqDecimalPipe implements KbqNumericPipe, PipeTransform { pure: false }) export class KbqTableNumberPipe implements KbqNumericPipe, PipeTransform { - constructor( - @Optional() @Inject(KBQ_LOCALE_ID) private id: string, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService: KbqLocaleService, - @Optional() @Inject(KBQ_NUMBER_FORMATTER_OPTIONS) private readonly options: ParsedDigitsInfo - ) { + private id = inject(KBQ_LOCALE_ID, { optional: true })!; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + private readonly options = inject(KBQ_NUMBER_FORMATTER_OPTIONS, { optional: true })!; + constructor() { this.options = this.options || KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS; this.localeService?.changes.subscribe((newId: string) => (this.id = newId)); @@ -289,12 +287,11 @@ export function isWithin(startRange: number, endRange: number, valueToCheck: num pure: false }) export class KbqRoundDecimalPipe implements PipeTransform { + private id = inject(KBQ_LOCALE_ID, { optional: true })!; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; roundingOptions: RoundDecimalOptions; - constructor( - @Optional() @Inject(KBQ_LOCALE_ID) private id: string, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService: KbqLocaleService - ) { + constructor() { this.localeService?.changes.subscribe((newId: string) => (this.id = newId)); } diff --git a/packages/components/core/forms/forms.directive.ts b/packages/components/core/forms/forms.directive.ts index beb48e8715..113bf16a74 100644 --- a/packages/components/core/forms/forms.directive.ts +++ b/packages/components/core/forms/forms.directive.ts @@ -1,4 +1,4 @@ -import { AfterContentInit, Directive, ElementRef, contentChildren } from '@angular/core'; +import { AfterContentInit, Directive, ElementRef, contentChildren, inject } from '@angular/core'; @Directive({ selector: '.kbq-form__row, .kbq-form__fieldset, .kbq-form__legend', @@ -8,6 +8,8 @@ import { AfterContentInit, Directive, ElementRef, contentChildren } from '@angul exportAs: 'kbqFormElement' }) export class KbqFormElement implements AfterContentInit { + private readonly element = inject>(ElementRef); + margin = false; isRow = false; @@ -17,8 +19,6 @@ export class KbqFormElement implements AfterContentInit { readonly elements = contentChildren(KbqFormElement); - constructor(private readonly element: ElementRef) {} - ngAfterContentInit(): void { const classList = this.element.nativeElement.classList; diff --git a/packages/components/core/locales/locale-service.ts b/packages/components/core/locales/locale-service.ts index a9e506c5bc..e7a0d67e77 100644 --- a/packages/components/core/locales/locale-service.ts +++ b/packages/components/core/locales/locale-service.ts @@ -1,5 +1,5 @@ import { DOCUMENT } from '@angular/common'; -import { Inject, inject, Injectable, InjectionToken, Optional, Provider } from '@angular/core'; +import { inject, Injectable, InjectionToken, Provider } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; import { enUSLocaleData } from './en-US'; import { esLALocaleData } from './es-LA'; @@ -77,7 +77,10 @@ export class KbqLocaleService { private readonly langAttrName = inject(KBQ_LOCALE_SERVICE_LANG_ATTR_NAME); - constructor(@Optional() @Inject(KBQ_LOCALE_ID) id: string, @Optional() @Inject(KBQ_LOCALE_DATA) localeData) { + constructor() { + const id = inject(KBQ_LOCALE_ID, { optional: true }); + const localeData = inject(KBQ_LOCALE_DATA, { optional: true }); + this.locales = localeData; this.id = id || KBQ_DEFAULT_LOCALE_ID; diff --git a/packages/components/core/option/option.ts b/packages/components/core/option/option.ts index cd38ca127f..9081c6a7ad 100644 --- a/packages/components/core/option/option.ts +++ b/packages/components/core/option/option.ts @@ -7,12 +7,11 @@ import { Component, ElementRef, EventEmitter, - Inject, + inject, InjectionToken, Input, input, OnDestroy, - Optional, Output, QueryList, ViewChild, @@ -163,6 +162,10 @@ export class KbqVirtualOption extends KbqOptionBase { exportAs: 'kbqOption' }) export class KbqOption extends KbqOptionBase implements AfterViewChecked, OnDestroy, KbqTitleTextRef { + private readonly elementRef = inject>(ElementRef); + private readonly changeDetectorRef = inject(ChangeDetectorRef); + protected readonly parent = inject(KBQ_OPTION_PARENT_COMPONENT, { optional: true })!; + readonly group = inject(KbqOptgroup, { optional: true })!; @ViewChild('kbqTitleText', { static: false }) textElement: ElementRef; /** The form value of the option. */ @@ -264,15 +267,6 @@ export class KbqOption extends KbqOptionBase implements AfterViewChecked, OnDest */ private isFocusedByMouse: boolean = false; - constructor( - private readonly elementRef: ElementRef, - private readonly changeDetectorRef: ChangeDetectorRef, - @Optional() @Inject(KBQ_OPTION_PARENT_COMPONENT) protected readonly parent: KbqOptionParentComponent, - @Optional() readonly group: KbqOptgroup - ) { - super(); - } - ngAfterViewChecked() { // Since parent components could be using the option's label to display the selected values // (e.g. `kbq-select`) and they don't have a way of knowing if the option's label has changed diff --git a/packages/components/core/select/common.ts b/packages/components/core/select/common.ts index d068c448f8..faeff2f4c5 100644 --- a/packages/components/core/select/common.ts +++ b/packages/components/core/select/common.ts @@ -1,14 +1,5 @@ import { CdkConnectedOverlay } from '@angular/cdk/overlay'; -import { - AfterContentInit, - booleanAttribute, - Directive, - EventEmitter, - Inject, - input, - OnDestroy, - Optional -} from '@angular/core'; +import { AfterContentInit, booleanAttribute, Directive, EventEmitter, inject, input, OnDestroy } from '@angular/core'; import { Subscription } from 'rxjs'; import { KBQ_FORM_FIELD_REF, KbqFormFieldRef } from '../form-field'; import { END, ESCAPE, HOME, SPACE } from '../keycodes'; @@ -49,6 +40,8 @@ export class KbqSelectFooter {} exportAs: 'kbqSelectSearch' }) export class KbqSelectSearch implements AfterContentInit, OnDestroy { + protected formField = inject(KBQ_FORM_FIELD_REF, { optional: true })!; + readonly changes: EventEmitter = new EventEmitter(); isSearchChanged: boolean = false; @@ -59,7 +52,7 @@ export class KbqSelectSearch implements AfterContentInit, OnDestroy { private searchChangesSubscription: Subscription = new Subscription(); - constructor(@Optional() @Inject(KBQ_FORM_FIELD_REF) protected formField: KbqFormFieldRef) { + constructor() { this.formField.canCleanerClearByEsc = false; this.formField.inOverlay.set(true); } diff --git a/packages/components/datepicker/calendar-header.component.ts b/packages/components/datepicker/calendar-header.component.ts index 58fb9ce88e..6b3e33e8a5 100644 --- a/packages/components/datepicker/calendar-header.component.ts +++ b/packages/components/datepicker/calendar-header.component.ts @@ -1,5 +1,13 @@ import { TitleCasePipe } from '@angular/common'; -import { AfterContentInit, ChangeDetectionStrategy, Component, Input, ViewEncapsulation, output } from '@angular/core'; +import { + AfterContentInit, + ChangeDetectionStrategy, + Component, + Input, + ViewEncapsulation, + inject, + output +} from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { DateAdapter, KbqOptionModule } from '@koobiq/components/core'; import { KbqIconModule } from '@koobiq/components/icon'; @@ -35,6 +43,8 @@ export type MonthName = { exportAs: 'kbqCalendarHeader' }) export class KbqCalendarHeader implements AfterContentInit { + private readonly adapter = inject>(DateAdapter); + monthNames: MonthName[]; selectedMonth: number; @@ -114,7 +124,7 @@ export class KbqCalendarHeader implements AfterContentInit { readonly monthSelected = output(); readonly yearSelected = output(); - constructor(private readonly adapter: DateAdapter) { + constructor() { this.monthNames = this.adapter.getMonthNames('long').map((name, i) => { return { name, nameShort: this.adapter.getMonthNames('short')[i], value: i, disabled: false }; }); diff --git a/packages/components/datepicker/calendar-header.spec.ts b/packages/components/datepicker/calendar-header.spec.ts index 513775c158..707bf3b8e6 100644 --- a/packages/components/datepicker/calendar-header.spec.ts +++ b/packages/components/datepicker/calendar-header.spec.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, inject as inject_1 } from '@angular/core'; import { ComponentFixture, inject, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { KbqLuxonDateModule, LuxonDateAdapter } from '@koobiq/angular-luxon-adapter/adapter'; @@ -81,10 +81,10 @@ describe('KbqCalendarHeader', () => { ` }) class StandardCalendar { + adapter = inject_1>(DateAdapter); + selected: DateTime; selectedYear: DateTime; selectedMonth: DateTime; startDate = this.adapter.createDate(2017, 0, 31); - - constructor(public adapter: DateAdapter) {} } diff --git a/packages/components/datepicker/calendar.component.ts b/packages/components/datepicker/calendar.component.ts index 5074adb7f5..589ece41d6 100644 --- a/packages/components/datepicker/calendar.component.ts +++ b/packages/components/datepicker/calendar.component.ts @@ -6,9 +6,9 @@ import { Input, OnChanges, OnDestroy, - Optional, SimpleChanges, ViewEncapsulation, + inject, input, output, viewChild @@ -41,6 +41,9 @@ import { KbqMonthView } from './month-view.component'; exportAs: 'kbqCalendar' }) export class KbqCalendar implements AfterContentInit, OnDestroy, OnChanges { + private readonly adapter = inject>(DateAdapter, { optional: true })!; + private changeDetectorRef = inject(ChangeDetectorRef); + /** A date representing the period (month or year) to start the calendar in. */ // TODO: Skipped for migration because: // Accessor inputs cannot be migrated as they are too complex. @@ -160,11 +163,10 @@ export class KbqCalendar implements AfterContentInit, OnDestroy, OnChanges { /** Subscription to value changes in the associated input element. */ private inputSubscription = Subscription.EMPTY; - constructor( - intl: KbqDatepickerIntl, - @Optional() private readonly adapter: DateAdapter, - private changeDetectorRef: ChangeDetectorRef - ) { + constructor() { + const intl = inject(KbqDatepickerIntl); + const changeDetectorRef = this.changeDetectorRef; + if (!this.adapter) { throw createMissingDateImplError('DateAdapter'); } diff --git a/packages/components/datepicker/calendar.spec.ts b/packages/components/datepicker/calendar.spec.ts index cf4575feb7..b14ce80f32 100644 --- a/packages/components/datepicker/calendar.spec.ts +++ b/packages/components/datepicker/calendar.spec.ts @@ -1,4 +1,4 @@ -import { Component, LOCALE_ID } from '@angular/core'; +import { Component, LOCALE_ID, inject as inject_1 } from '@angular/core'; import { ComponentFixture, TestBed, inject } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { LuxonDateAdapter } from '@koobiq/angular-luxon-adapter/adapter'; @@ -342,12 +342,12 @@ describe('KbqCalendar', () => { ` }) class StandardCalendar { + adapter = inject_1>(DateAdapter); + selected: DateTime; selectedYear: DateTime; selectedMonth: DateTime; startDate = this.adapter.createDate(2017, 0, 31); - - constructor(public adapter: DateAdapter) {} } @Component({ @@ -357,11 +357,11 @@ class StandardCalendar { ` }) class CalendarWithMinMax { + adapter = inject_1>(DateAdapter); + startAt: DateTime; minDate = this.adapter.createDate(2016, 0, 1); maxDate = this.adapter.createDate(2018, 0, 1); - - constructor(public adapter: DateAdapter) {} } @Component({ @@ -371,11 +371,11 @@ class CalendarWithMinMax { ` }) class CalendarWithDateFilter { + adapter = inject_1>(DateAdapter); + selected: DateTime; startDate = this.adapter.createDate(2017, 0, 1); - constructor(public adapter: DateAdapter) {} - dateFilter = (date: DateTime): boolean => !(this.adapter.getDate(date) % 2) && this.adapter.getMonth(date) !== 10; } diff --git a/packages/components/datepicker/datepicker-input.directive.ts b/packages/components/datepicker/datepicker-input.directive.ts index 0adf60fffa..46db55fa36 100644 --- a/packages/components/datepicker/datepicker-input.directive.ts +++ b/packages/components/datepicker/datepicker-input.directive.ts @@ -7,11 +7,9 @@ import { EventEmitter, forwardRef, inject, - Inject, InjectionToken, Input, OnDestroy, - Optional, output, Renderer2 } from '@angular/core'; @@ -248,14 +246,15 @@ interface DateTimeObject { export class KbqDatepickerInput implements KbqFormFieldControl, ControlValueAccessor, Validator, OnDestroy, DoCheck, AfterContentInit { + elementRef = inject>(ElementRef); + private readonly renderer = inject(Renderer2); + readonly adapter = inject>(DateAdapter, { optional: true })!; + private readonly dateFormats = inject(KBQ_DATE_FORMATS, { optional: true })!; /** @docs-private */ - protected readonly formField = inject(KbqFormField, { optional: true, host: true }); + protected readonly formField = inject(KbqFormField, { optional: true, host: true })!; /** @docs-private */ + protected readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; /** @docs-private */ - protected readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true }); - - /** @docs-private */ - protected readonly externalConfiguration = inject(KBQ_DATEPICKER_CONFIGURATION, { optional: true }); - + protected readonly externalConfiguration = inject(KBQ_DATEPICKER_CONFIGURATION, { optional: true })!; protected configuration; readonly stateChanges: Subject = new Subject(); @@ -557,12 +556,7 @@ export class KbqDatepickerInput private errorStateTracker: KbqErrorStateTracker; - constructor( - public elementRef: ElementRef, - private readonly renderer: Renderer2, - @Optional() readonly adapter: DateAdapter, - @Optional() @Inject(KBQ_DATE_FORMATS) private readonly dateFormats: KbqDateFormats - ) { + constructor() { this.validator = Validators.compose([ this.parseValidator, this.minValidator, diff --git a/packages/components/datepicker/datepicker.component.ts b/packages/components/datepicker/datepicker.component.ts index 58a97960fb..14e8fbaabf 100644 --- a/packages/components/datepicker/datepicker.component.ts +++ b/packages/components/datepicker/datepicker.component.ts @@ -11,13 +11,11 @@ import { Component, ComponentRef, inject, - Inject, InjectionToken, Input, input, NgZone, OnDestroy, - Optional, output, viewChild, ViewContainerRef, @@ -81,6 +79,8 @@ export const KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = { exportAs: 'kbqDatepickerContent' }) export class KbqDatepickerContent implements OnDestroy, AfterViewInit { + private changeDetectorRef = inject(ChangeDetectorRef); + /** Emits when an animation has finished. */ readonly animationDone = new Subject(); @@ -95,8 +95,6 @@ export class KbqDatepickerContent implements OnDestroy, AfterViewInit { private subscriptions = new Subscription(); - constructor(private changeDetectorRef: ChangeDetectorRef) {} - ngAfterViewInit() { this.subscriptions.add( this.datepicker.stateChanges.subscribe(() => { @@ -129,6 +127,12 @@ export class KbqDatepickerContent implements OnDestroy, AfterViewInit { exportAs: 'kbqDatepicker' }) export class KbqDatepicker implements OnDestroy { + private overlay = inject(Overlay); + private ngZone = inject(NgZone); + private viewContainerRef = inject(ViewContainerRef); + private readonly dateAdapter = inject>(DateAdapter, { optional: true })!; + private dir = inject(Directionality, { optional: true })!; + protected readonly document = inject(DOCUMENT); // TODO: Skipped for migration because: @@ -286,14 +290,9 @@ export class KbqDatepicker implements OnDestroy { private closeSubscription = Subscription.EMPTY; - constructor( - private overlay: Overlay, - private ngZone: NgZone, - private viewContainerRef: ViewContainerRef, - @Inject(KBQ_DATEPICKER_SCROLL_STRATEGY) scrollStrategy: any, - @Optional() private readonly dateAdapter: DateAdapter, - @Optional() private dir: Directionality - ) { + constructor() { + const scrollStrategy = inject(KBQ_DATEPICKER_SCROLL_STRATEGY); + if (!this.dateAdapter) { throw createMissingDateImplError('DateAdapter'); } diff --git a/packages/components/datepicker/datepicker.spec.ts b/packages/components/datepicker/datepicker.spec.ts index 1a5cc2c246..8d7a2df2c5 100644 --- a/packages/components/datepicker/datepicker.spec.ts +++ b/packages/components/datepicker/datepicker.spec.ts @@ -1,6 +1,6 @@ import { Directionality } from '@angular/cdk/bidi'; import { OverlayContainer } from '@angular/cdk/overlay'; -import { Component, FactoryProvider, Type, ValueProvider, viewChild } from '@angular/core'; +import { Component, FactoryProvider, inject as inject_1, Type, ValueProvider, viewChild } from '@angular/core'; import { ComponentFixture, fakeAsync, flush, inject, TestBed, tick } from '@angular/core/testing'; import { AsyncValidatorFn, @@ -1570,11 +1570,11 @@ class DatepickerWithStartAt { ` }) class DatepickerWithNgModel { + adapter = inject_1>(DateAdapter); + selected: DateTime | null = null; readonly datepicker = viewChild.required>('d'); readonly datepickerInput = viewChild.required(KbqDatepickerInput); - - constructor(public adapter: DateAdapter) {} } @Component({ diff --git a/packages/components/datepicker/month-view.component.ts b/packages/components/datepicker/month-view.component.ts index 9db201e4ff..9e87739494 100644 --- a/packages/components/datepicker/month-view.component.ts +++ b/packages/components/datepicker/month-view.component.ts @@ -4,8 +4,8 @@ import { ChangeDetectorRef, Component, Input, - Optional, ViewEncapsulation, + inject, input, output, viewChild @@ -31,6 +31,9 @@ const DAYS_PER_WEEK = 7; exportAs: 'kbqMonthView' }) export class KbqMonthView implements AfterContentInit { + private changeDetectorRef = inject(ChangeDetectorRef); + adapter = inject>(DateAdapter, { optional: true })!; + /** * The date to display in this month view (everything other than the month and year is ignored). */ @@ -110,10 +113,7 @@ export class KbqMonthView implements AfterContentInit { /** The names of the weekdays. */ weekdays: { long: string; narrow: string }[]; - constructor( - private changeDetectorRef: ChangeDetectorRef, - @Optional() public adapter: DateAdapter - ) { + constructor() { if (!this.adapter) { throw createMissingDateImplError('DateAdapter'); } diff --git a/packages/components/dropdown/dropdown-content.directive.ts b/packages/components/dropdown/dropdown-content.directive.ts index b9159fd99b..929e1c8702 100644 --- a/packages/components/dropdown/dropdown-content.directive.ts +++ b/packages/components/dropdown/dropdown-content.directive.ts @@ -10,6 +10,11 @@ import { Subject } from 'rxjs'; selector: 'ng-template[kbqDropdownContent]' }) export class KbqDropdownContent implements OnDestroy { + private template = inject>(TemplateRef); + private appRef = inject(ApplicationRef); + private injector = inject(Injector); + private viewContainerRef = inject(ViewContainerRef); + protected readonly document = inject(DOCUMENT); /** Emits when the dropdown content has been attached. */ @@ -17,13 +22,6 @@ export class KbqDropdownContent implements OnDestroy { private portal: TemplatePortal; private outlet: DomPortalOutlet; - constructor( - private template: TemplateRef, - private appRef: ApplicationRef, - private injector: Injector, - private viewContainerRef: ViewContainerRef - ) {} - /** * Attaches the content with a particular context. * @docs-private diff --git a/packages/components/dropdown/dropdown-item.component.ts b/packages/components/dropdown/dropdown-item.component.ts index 81dd9765e3..75550e2ad5 100644 --- a/packages/components/dropdown/dropdown-item.component.ts +++ b/packages/components/dropdown/dropdown-item.component.ts @@ -6,10 +6,9 @@ import { Component, ContentChild, ElementRef, - Inject, + inject, Input, OnDestroy, - Optional, ViewChild, ViewEncapsulation } from '@angular/core'; @@ -49,6 +48,9 @@ import { KBQ_DROPDOWN_PANEL, KbqDropdownPanel } from './dropdown.types'; exportAs: 'kbqDropdownItem' }) export class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, AfterViewInit, OnDestroy { + private elementRef = inject>(ElementRef); + private focusMonitor = inject(FocusMonitor); + parentDropdownPanel? = inject(KBQ_DROPDOWN_PANEL, { optional: true })!; @ViewChild('kbqTitleText', { static: true }) textElement: ElementRef; @ContentChild(KbqIcon) icon: KbqIcon; @@ -83,12 +85,6 @@ export class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, After /** @docs-private */ protected readonly componentColors = KbqComponentColors; - constructor( - private elementRef: ElementRef, - private focusMonitor: FocusMonitor, - @Inject(KBQ_DROPDOWN_PANEL) @Optional() public parentDropdownPanel?: KbqDropdownPanel - ) {} - ngAfterViewInit() { if (this.focusMonitor) { // Start monitoring the element so it gets the appropriate focused classes. We want diff --git a/packages/components/dropdown/dropdown-trigger.directive.ts b/packages/components/dropdown/dropdown-trigger.directive.ts index f3f81e2b0a..636ee59b18 100644 --- a/packages/components/dropdown/dropdown-trigger.directive.ts +++ b/packages/components/dropdown/dropdown-trigger.directive.ts @@ -18,16 +18,15 @@ import { ChangeDetectorRef, Directive, ElementRef, + EventEmitter, inject, - Inject, InjectionToken, Input, numberAttribute, OnDestroy, - Optional, + Output, output, Renderer2, - Self, ViewContainerRef } from '@angular/core'; import { defaultOffsetY, DOWN_ARROW, ENTER, KBQ_WINDOW, LEFT_ARROW, RIGHT_ARROW, SPACE } from '@koobiq/components/core'; @@ -116,13 +115,22 @@ const positionMap = { exportAs: 'kbqDropdownTrigger' }) export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { + private overlay = inject(Overlay); + private elementRef = inject>(ElementRef); + private viewContainerRef = inject(ViewContainerRef); + private scrollStrategy = inject(KBQ_DROPDOWN_SCROLL_STRATEGY); + private parent = inject(KbqDropdown, { optional: true })!; + private dropdownItemInstance = inject(KbqDropdownItem, { optional: true, self: true })!; + private _dir = inject(Directionality, { optional: true })!; + private changeDetectorRef = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + private readonly overlayContainer = inject(OverlayContainer); private readonly renderer = inject(Renderer2); protected readonly isBrowser = inject(Platform).isBrowser; private readonly window = inject(KBQ_WINDOW); - private readonly host = inject(KBQ_DROPDOWN_HOST, { optional: true }); - + private readonly host = inject(KBQ_DROPDOWN_HOST, { optional: true })!; lastDestroyReason: DropdownCloseReason; /** Position offset of the dropdown in the X axis. */ @@ -195,8 +203,12 @@ export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { /** Event emitted when the associated dropdown is opened. */ readonly dropdownOpened = output(); - /** Event emitted when the associated dropdown is closed. */ - readonly dropdownClosed = output(); + /** + * Event emitted when the associated dropdown is closed. Kept as an `@Output()` EventEmitter + * (not `output()`): `KbqOptionActionComponent` subscribes to it via `.pipe()` through the + * KBQ_OPTION_ACTION_PARENT contract, which an `OutputEmitterRef` does not support — see #DS-5079. + */ + @Output() readonly dropdownClosed = new EventEmitter(); // Tracking input type is necessary so it's possible to only auto-focus // the first item of the list when the dropdown is opened via the keyboard @@ -224,17 +236,10 @@ export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { private classAddedToOverlayContainer: boolean = false; - constructor( - private overlay: Overlay, - private elementRef: ElementRef, - private viewContainerRef: ViewContainerRef, - @Inject(KBQ_DROPDOWN_SCROLL_STRATEGY) private scrollStrategy: any, - @Optional() private parent: KbqDropdown, - @Optional() @Self() private dropdownItemInstance: KbqDropdownItem, - @Optional() private _dir: Directionality, - private changeDetectorRef: ChangeDetectorRef, - private focusMonitor?: FocusMonitor - ) { + constructor() { + const elementRef = this.elementRef; + const dropdownItemInstance = this.dropdownItemInstance; + elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions); if (dropdownItemInstance) { @@ -678,7 +683,7 @@ export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { // 'changed after checked' errors in some cases. See #12194. this.dropdown.animationDone .pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered())) - // eslint-disable-next-line rxjs/no-nested-subscribe + // eslint-disable-next-line rxjs-x/no-nested-subscribe .subscribe(() => this.open()); } else { this.open(); diff --git a/packages/components/dropdown/dropdown.component.ts b/packages/components/dropdown/dropdown.component.ts index 53ad707920..8c4d866cc2 100644 --- a/packages/components/dropdown/dropdown.component.ts +++ b/packages/components/dropdown/dropdown.component.ts @@ -12,7 +12,6 @@ import { Directive, ElementRef, EventEmitter, - Inject, Input, NgZone, OnDestroy, @@ -23,6 +22,7 @@ import { ViewChild, ViewEncapsulation, contentChild, + inject, input } from '@angular/core'; import { ESCAPE, FocusKeyManager, LEFT_ARROW, RIGHT_ARROW } from '@koobiq/components/core'; @@ -65,6 +65,10 @@ export class KbqDropdownStaticContent {} exportAs: 'kbqDropdown' }) export class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit, OnDestroy { + private elementRef = inject>(ElementRef); + private ngZone = inject(NgZone); + private defaultOptions = inject(KBQ_DROPDOWN_DEFAULT_OPTIONS); + private readonly search = contentChild(KbqFormField); readonly navigationWithWrap = input(false); @@ -226,12 +230,6 @@ export class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit, /** Subscription to tab events on the dropdown panel */ private tabSubscription = Subscription.EMPTY; - constructor( - private elementRef: ElementRef, - private ngZone: NgZone, - @Inject(KBQ_DROPDOWN_DEFAULT_OPTIONS) private defaultOptions: KbqDropdownDefaultOptions - ) {} - ngOnInit() { this.setPositionClasses(); } diff --git a/packages/components/empty-state/empty-state.component.ts b/packages/components/empty-state/empty-state.component.ts index 418af3f0d8..39ac2eefc9 100644 --- a/packages/components/empty-state/empty-state.component.ts +++ b/packages/components/empty-state/empty-state.component.ts @@ -5,8 +5,8 @@ import { ContentChild, Directive, Input, - Optional, ViewEncapsulation, + inject, input } from '@angular/core'; import { KbqDefaultSizes } from '@koobiq/components/core'; @@ -19,7 +19,7 @@ import { KbqIconItem } from '@koobiq/components/icon'; } }) export class KbqEmptyStateIcon { - constructor(@Optional() private icon: KbqIconItem) {} + private icon = inject(KbqIconItem, { optional: true })!; setErrorColor() { if (!this.icon) { diff --git a/packages/components/file-upload/file-upload.spec.ts b/packages/components/file-upload/file-upload.spec.ts index 4fb4b49a07..6c3a05fa4a 100644 --- a/packages/components/file-upload/file-upload.spec.ts +++ b/packages/components/file-upload/file-upload.spec.ts @@ -1,6 +1,6 @@ import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { DOCUMENT } from '@angular/common'; -import { ChangeDetectorRef, Component, ElementRef, signal, viewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, ElementRef, inject as inject_1, signal, viewChild } from '@angular/core'; import { ComponentFixture, TestBed, fakeAsync, flush, tick } from '@angular/core/testing'; import { AbstractControl, @@ -1532,6 +1532,8 @@ describe('KbqLocalDropzone', () => { ` }) class BasicSingleFileUpload { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); disabled: boolean; file: KbqFileItem | null; @@ -1540,8 +1542,6 @@ class BasicSingleFileUpload { localeConfig = signal>({}); - constructor(public elementRef: ElementRef) {} - onChange = jest.fn().mockImplementation((file: KbqFileItem) => { this.file = file; }); @@ -1562,13 +1562,13 @@ class BasicSingleFileUpload { ` }) class ControlValueAccessorSingleFileUpload { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); file: KbqFileItem | null; accept: string[] = []; control = new FormControl(); - constructor(public elementRef: ElementRef) {} - onChange = jest.fn().mockImplementation((file: KbqFileItem) => { this.file = file; }); @@ -1590,6 +1590,9 @@ class ControlValueAccessorSingleFileUpload { ` }) class BasicMultipleFileUpload { + elementRef = inject_1(ElementRef); + cdr = inject_1(ChangeDetectorRef); + readonly fileUpload = viewChild.required('fileUpload'); disabled: boolean; files: KbqFileItem[]; @@ -1597,11 +1600,6 @@ class BasicMultipleFileUpload { localeConfig = signal>({}); - constructor( - public elementRef: ElementRef, - public cdr: ChangeDetectorRef - ) {} - onChange = jest.fn().mockImplementation((files: KbqFileItem[]) => { this.files = files; }); @@ -1622,13 +1620,13 @@ class BasicMultipleFileUpload { ` }) class ControlValueAccessorMultipleFileUpload { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); files: KbqFileItem[]; accept: string[] = []; control = new FormControl(); - constructor(public elementRef: ElementRef) {} - onChange = jest.fn().mockImplementation((files: KbqFileItem[]) => { this.files = files; }); @@ -1642,12 +1640,12 @@ class ControlValueAccessorMultipleFileUpload { ` }) class SingleFileUploadWithAsyncValidator { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); readonly control = new FormControl(null, { asyncValidators: [getAsyncValidator()] }); - - constructor(public elementRef: ElementRef) {} } @Component({ @@ -1658,12 +1656,12 @@ class SingleFileUploadWithAsyncValidator { ` }) class SingleFileUploadWithInvalidAsyncValidator { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); readonly control = new FormControl(null, { asyncValidators: [getAsyncValidator(false)] }); - - constructor(public elementRef: ElementRef) {} } @Component({ @@ -1674,12 +1672,12 @@ class SingleFileUploadWithInvalidAsyncValidator { ` }) class SingleFileUploadWithFileReaderValidator { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); readonly control = new FormControl(null, { asyncValidators: [fileContentLinesValidator(MAX_FILE_LINES_FOR_TEST)] }); - - constructor(public elementRef: ElementRef) {} } @Component({ @@ -1690,12 +1688,12 @@ class SingleFileUploadWithFileReaderValidator { ` }) class MultipleFileUploadWithAsyncValidator { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); readonly control = new FormControl(null, { asyncValidators: [getAsyncValidator()] }); - - constructor(public elementRef: ElementRef) {} } @Component({ @@ -1706,12 +1704,12 @@ class MultipleFileUploadWithAsyncValidator { ` }) class MultipleFileUploadWithInvalidAsyncValidator { + elementRef = inject_1(ElementRef); + readonly fileUpload = viewChild.required('fileUpload'); readonly control = new FormControl(null, { asyncValidators: [getAsyncValidator(false)] }); - - constructor(public elementRef: ElementRef) {} } // Test host component diff --git a/packages/components/filter-bar/pipes/pipe-date.spec.ts b/packages/components/filter-bar/pipes/pipe-date.spec.ts index 903bd7cd2b..38bd81d656 100644 --- a/packages/components/filter-bar/pipes/pipe-date.spec.ts +++ b/packages/components/filter-bar/pipes/pipe-date.spec.ts @@ -5,7 +5,7 @@ import { FormControl, FormGroup } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { KbqLuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; -import { DateAdapter, DateFormatter, KBQ_DATE_LOCALE } from '@koobiq/components/core'; +import { DateAdapter, DateFormatter } from '@koobiq/components/core'; import { KbqFilter, KbqFilterBar, @@ -88,7 +88,7 @@ describe('KbqPipeDateComponent', () => { imports: [NoopAnimationsModule, KbqFilterBarModule, KbqLuxonDateModule, TestComponent], providers: [ { provide: LOCALE_ID, useValue: 'ru-RU' }, - { provide: DateFormatter, deps: [DateAdapter, KBQ_DATE_LOCALE] } + DateFormatter ] }) .overrideComponent(KbqPipeDateComponent, { diff --git a/packages/components/filter-bar/pipes/pipe-datetime.spec.ts b/packages/components/filter-bar/pipes/pipe-datetime.spec.ts index a00f1fc0f7..a209f733cd 100644 --- a/packages/components/filter-bar/pipes/pipe-datetime.spec.ts +++ b/packages/components/filter-bar/pipes/pipe-datetime.spec.ts @@ -5,7 +5,7 @@ import { FormControl, FormGroup } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { KbqLuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; -import { DateAdapter, DateFormatter, KBQ_DATE_LOCALE } from '@koobiq/components/core'; +import { DateAdapter, DateFormatter } from '@koobiq/components/core'; import { KbqFilter, KbqFilterBar, @@ -88,7 +88,7 @@ describe('KbqPipeDatetimeComponent', () => { imports: [NoopAnimationsModule, KbqFilterBarModule, KbqLuxonDateModule, TestComponent], providers: [ { provide: LOCALE_ID, useValue: 'ru-RU' }, - { provide: DateFormatter, deps: [DateAdapter, KBQ_DATE_LOCALE] } + DateFormatter ] }) .overrideComponent(KbqPipeDatetimeComponent, { diff --git a/packages/components/form-field/form-field.ts b/packages/components/form-field/form-field.ts index 7e3913d26b..1741608422 100644 --- a/packages/components/form-field/form-field.ts +++ b/packages/components/form-field/form-field.ts @@ -4,7 +4,6 @@ import { AfterContentChecked, AfterContentInit, AfterViewInit, - Attribute, booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, @@ -15,15 +14,14 @@ import { DestroyRef, Directive, ElementRef, + HostAttributeToken, inject, InjectionToken, input, model, OnDestroy, - Optional, Provider, QueryList, - Self, viewChild, ViewEncapsulation } from '@angular/core'; @@ -134,8 +132,7 @@ export class KbqFormField private readonly destroyRef = inject(DestroyRef); private readonly changeDetectorRef = inject(ChangeDetectorRef); private readonly focusMonitor = inject(FocusMonitor); - private readonly defaultOptions = inject(KBQ_FORM_FIELD_DEFAULT_OPTIONS, { optional: true }); - /** + private readonly defaultOptions = inject(KBQ_FORM_FIELD_DEFAULT_OPTIONS, { optional: true })!; /** * @docs-private */ readonly elementRef = inject>(ElementRef); @@ -535,14 +532,12 @@ export class KbqFormField exportAs: 'KbqTrim' }) export class KbqTrim { - private original: (fn: any) => void; + private readonly noTrim = coerceBooleanProperty(inject(new HostAttributeToken('no-trim'), { optional: true })); + private ngControl = inject(NgControl, { optional: true, self: true })!; - constructor( - @Attribute('no-trim') private readonly noTrim: boolean, - @Optional() @Self() private ngControl: NgControl - ) { - this.noTrim = coerceBooleanProperty(noTrim); + private original: (fn: any) => void; + constructor() { if (this.noTrim || !this.ngControl?.valueAccessor) { return; } diff --git a/packages/components/form-field/password-hint.ts b/packages/components/form-field/password-hint.ts index aa969b3b94..3fc76d1998 100644 --- a/packages/components/form-field/password-hint.ts +++ b/packages/components/form-field/password-hint.ts @@ -3,11 +3,9 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, - forwardRef, - Inject, + inject, Input, input, - Optional, QueryList, ViewEncapsulation } from '@angular/core'; @@ -62,6 +60,9 @@ export const hasPasswordStrengthError = (passwordHints: QueryList(`kbq-hint-${nextPasswordHintUniqueId++}`); readonly rule = input(); @@ -107,10 +108,7 @@ export class KbqPasswordHint extends KbqHint implements AfterContentInit { private lastControlValue: string; - constructor( - private changeDetectorRef: ChangeDetectorRef, - @Optional() @Inject(forwardRef(() => KBQ_FORM_FIELD_REF)) private formField: any - ) { + constructor() { super(); this.color = KbqComponentColors.ContrastFade; this.setDefaultColor(KbqComponentColors.ContrastFade); diff --git a/packages/components/input/input-number.spec.ts b/packages/components/input/input-number.spec.ts index 9a2b0ae4ed..f7d868a38d 100644 --- a/packages/components/input/input-number.spec.ts +++ b/packages/components/input/input-number.spec.ts @@ -1,4 +1,4 @@ -import { Component, DebugElement, Inject, Optional, Provider, Type, viewChild } from '@angular/core'; +import { Component, DebugElement, Provider, Type, inject, viewChild } from '@angular/core'; import { ComponentFixture, ComponentFixtureAutoDetect, TestBed, fakeAsync, flush, tick } from '@angular/core/testing'; import { FormsModule, @@ -130,9 +130,11 @@ class KbqNumberInputWithFormControl { ` }) class KbqNumberInputWithFormControlName { + private formBuilder = inject(UntypedFormBuilder); + reactiveForm: UntypedFormGroup; - constructor(private formBuilder: UntypedFormBuilder) { + constructor() { this.reactiveForm = this.formBuilder.group({ reactiveInputValue: new UntypedFormControl(10) }); @@ -212,6 +214,8 @@ class KbqNumberInputWithCleaner { ` }) class KbqNumberInputWithMask { + localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + value: number | null = null; max: number = 10; min: number = 3; @@ -220,8 +224,6 @@ class KbqNumberInputWithMask { withMask = true; readonly inputNumberDirective = viewChild.required(KbqNumberInput); - - constructor(@Optional() @Inject(KBQ_LOCALE_SERVICE) public localeService: KbqLocaleService) {} } @Component({ @@ -237,13 +239,13 @@ class KbqNumberInputWithMask { ` }) class KbqNumberInputWithInteger { + localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + value: number | null = null; step: number = 1; bigStep: number = 5; readonly inputNumberDirective = viewChild.required(KbqNumberInput); - - constructor(@Optional() @Inject(KBQ_LOCALE_SERVICE) public localeService: KbqLocaleService) {} } describe('KbqNumberInput', () => { diff --git a/packages/components/input/input-number.ts b/packages/components/input/input-number.ts index 866f87a54f..4366faa3a7 100644 --- a/packages/components/input/input-number.ts +++ b/packages/components/input/input-number.ts @@ -1,16 +1,15 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { - Attribute, booleanAttribute, Directive, ElementRef, EventEmitter, forwardRef, - Inject, + HostAttributeToken, + inject, Input, input, OnDestroy, - Optional, Renderer2 } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @@ -102,6 +101,9 @@ export const KBQ_NUMBER_INPUT_VALUE_ACCESSOR: any = { exportAs: 'kbqNumericalInput' }) export class KbqNumberInput implements KbqFormFieldControl, ControlValueAccessor, OnDestroy { + private elementRef = inject>(ElementRef); + private readonly renderer = inject(Renderer2); + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; /** Emits when the value changes (either due to user input or programmatic change). */ valueChange = new EventEmitter(); @@ -230,15 +232,13 @@ export class KbqNumberInput implements KbqFormFieldControl, ControlValueAcc private valueFromPaste: number | null; - constructor( - private elementRef: ElementRef, - private readonly renderer: Renderer2, - @Attribute('step') step: string, - @Attribute('big-step') bigStep: string, - @Attribute('min') min: string, - @Attribute('max') max: string, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService?: KbqLocaleService - ) { + constructor() { + const step = inject(new HostAttributeToken('step'), { optional: true })!; + const bigStep = inject(new HostAttributeToken('big-step'), { optional: true })!; + const min = inject(new HostAttributeToken('min'), { optional: true })!; + const max = inject(new HostAttributeToken('max'), { optional: true })!; + const localeService = this.localeService; + this.step = isDigit(step) ? parseFloat(step) : SMALL_STEP; this.bigStep = isDigit(bigStep) ? parseFloat(bigStep) : BIG_STEP; this.min = isDigit(min) ? parseFloat(min) : -Infinity; diff --git a/packages/components/input/input-password.ts b/packages/components/input/input-password.ts index 3fc79fde5e..2f0f4dcae1 100644 --- a/packages/components/input/input-password.ts +++ b/packages/components/input/input-password.ts @@ -1,5 +1,5 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion'; -import { Directive, DoCheck, ElementRef, Inject, Input, OnChanges, OnDestroy, Optional, Self } from '@angular/core'; +import { Directive, DoCheck, ElementRef, Input, OnChanges, OnDestroy, inject } from '@angular/core'; import { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms'; import { CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; @@ -34,6 +34,12 @@ let nextUniqueId = 0; export class KbqInputPassword implements KbqFormFieldControl, OnChanges, OnDestroy, DoCheck, OnChanges, CanUpdateErrorState { + protected elementRef = inject>(ElementRef); + ngControl = inject(NgControl, { optional: true, self: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + defaultErrorStateMatcher = inject(ErrorStateMatcher); + /** Whether the component is in an error state. */ errorState: boolean = false; @@ -171,14 +177,9 @@ export class KbqInputPassword private _inputValueAccessor: { value: any }; - constructor( - protected elementRef: ElementRef, - @Optional() @Self() public ngControl: NgControl, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - public defaultErrorStateMatcher: ErrorStateMatcher, - @Optional() @Self() @Inject(KBQ_INPUT_VALUE_ACCESSOR) inputValueAccessor: any - ) { + constructor() { + const inputValueAccessor = inject(KBQ_INPUT_VALUE_ACCESSOR, { optional: true, self: true }); + // If no input value accessor was explicitly specified, use the element as the input value // accessor. this._inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement; diff --git a/packages/components/input/input.ts b/packages/components/input/input.ts index b149aa5726..c45d63920f 100644 --- a/packages/components/input/input.ts +++ b/packages/components/input/input.ts @@ -1,6 +1,6 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { getSupportedInputTypes } from '@angular/cdk/platform'; -import { Directive, DoCheck, ElementRef, Inject, Input, OnChanges, OnDestroy, Optional, Self } from '@angular/core'; +import { Directive, DoCheck, ElementRef, Input, OnChanges, OnDestroy, inject } from '@angular/core'; import { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms'; import { CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; @@ -47,6 +47,13 @@ let nextUniqueId = 0; export class KbqInput implements KbqFormFieldControl, OnChanges, OnDestroy, DoCheck, OnChanges, CanUpdateErrorState { + protected elementRef = inject>(ElementRef); + ngControl = inject(NgControl, { optional: true, self: true })!; + numberInput = inject(KbqNumberInput, { optional: true, self: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + defaultErrorStateMatcher = inject(ErrorStateMatcher); + /** Whether the component is in an error state. */ errorState: boolean = false; @@ -198,15 +205,9 @@ export class KbqInput private inputValueAccessor: { value: any }; - constructor( - protected elementRef: ElementRef, - @Optional() @Self() public ngControl: NgControl, - @Optional() @Self() public numberInput: KbqNumberInput, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - public defaultErrorStateMatcher: ErrorStateMatcher, - @Optional() @Self() @Inject(KBQ_INPUT_VALUE_ACCESSOR) inputValueAccessor: any - ) { + constructor() { + const inputValueAccessor = inject(KBQ_INPUT_VALUE_ACCESSOR, { optional: true, self: true }); + // If no input value accessor was explicitly specified, use the element as the input value accessor. this.inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement; diff --git a/packages/components/link/link.component.ts b/packages/components/link/link.component.ts index 6f8561cd7b..6f1491c375 100644 --- a/packages/components/link/link.component.ts +++ b/packages/components/link/link.component.ts @@ -50,6 +50,9 @@ export const baseURLRegex = /^http(s)?:\/\//; exportAs: 'kbqLink' }) export class KbqLink implements AfterContentInit, AfterViewInit, OnDestroy { + private elementRef = inject>(ElementRef); + private focusMonitor = inject(FocusMonitor); + protected readonly renderer = inject(Renderer2); protected readonly destroyRef = inject(DestroyRef); protected readonly nativeElement = kbqInjectNativeElement(); @@ -124,10 +127,7 @@ export class KbqLink implements AfterContentInit, AfterViewInit, OnDestroy { readonly icon = contentChild(KbqIcon); - constructor( - private elementRef: ElementRef, - private focusMonitor: FocusMonitor - ) { + constructor() { this.updatePrintUrl(); // @todo 20 In the next major release this line will be deleted. diff --git a/packages/components/list/list-selection.component.ts b/packages/components/list/list-selection.component.ts index 90c1af1230..077cab4199 100644 --- a/packages/components/list/list-selection.component.ts +++ b/packages/components/list/list-selection.component.ts @@ -5,11 +5,11 @@ import { SelectionModel } from '@angular/cdk/collections'; import { AfterContentInit, AfterViewInit, - Attribute, booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, + ContentChild, contentChild, ContentChildren, DestroyRef, @@ -17,14 +17,13 @@ import { ElementRef, EventEmitter, forwardRef, + HostAttributeToken, inject, - Inject, Input, input, NgZone, OnDestroy, OnInit, - Optional, Output, output, QueryList, @@ -127,6 +126,9 @@ export class KbqListCopyEvent { preserveWhitespaces: false }) export class KbqListSelection implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor { + private elementRef = inject>(ElementRef); + private changeDetectorRef = inject(ChangeDetectorRef); + private clipboard = inject(Clipboard, { optional: true })!; protected readonly focusMonitor = inject(FocusMonitor); keyManager: FocusKeyManager; @@ -234,12 +236,9 @@ export class KbqListSelection implements AfterContentInit, AfterViewInit, OnDest private optionBlurSubscription: Subscription | null; - constructor( - private elementRef: ElementRef, - private changeDetectorRef: ChangeDetectorRef, - @Attribute('multiple') multiple: MultipleMode, - @Optional() private clipboard: Clipboard - ) { + constructor() { + const multiple = inject(new HostAttributeToken('multiple'), { optional: true }); + if (multiple === MultipleMode.CHECKBOX || multiple === MultipleMode.KEYBOARD) { this.multipleMode = multiple; } else if (multiple !== null) { @@ -706,6 +705,11 @@ export class KbqListOptionCaption {} preserveWhitespaces: false }) export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTitleTextRef { + private elementRef = inject>(ElementRef); + private changeDetector = inject(ChangeDetectorRef); + private ngZone = inject(NgZone); + listSelection = inject(KbqListSelection); + readonly group = inject(KbqOptgroup, { optional: true })!; hasFocus: boolean = false; preventBlur: boolean = false; @@ -714,8 +718,13 @@ export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTi readonly onBlur = new Subject(); readonly actionButton = contentChild(KbqOptionActionComponent); - readonly tooltipTrigger = contentChild(KbqTooltipTrigger); - readonly dropdownTrigger = contentChild(KbqDropdownTrigger); + + // `KbqOptionActionComponent` reads these as directive instances through KBQ_OPTION_ACTION_PARENT, + // so they must stay decorator queries. A signal `contentChild` would expose the query function + // instead of the trigger, making `dropdownTrigger.dropdownClosed` undefined and throwing on `.pipe` + // when an action button is rendered — see #DS-5079. + @ContentChild(KbqTooltipTrigger) tooltipTrigger: KbqTooltipTrigger; + @ContentChild(KbqDropdownTrigger) dropdownTrigger: KbqDropdownTrigger; readonly pseudoCheckbox = contentChild(KbqPseudoCheckbox); readonly text = viewChild.required('text'); @@ -801,14 +810,6 @@ export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTi return !!this.pseudoCheckbox(); } - constructor( - private elementRef: ElementRef, - private changeDetector: ChangeDetectorRef, - private ngZone: NgZone, - @Inject(forwardRef(() => KbqListSelection)) public listSelection: KbqListSelection, - @Optional() readonly group: KbqOptgroup - ) {} - ngOnInit() { const list = this.listSelection; diff --git a/packages/components/list/list.component.ts b/packages/components/list/list.component.ts index 7af9d7cc3c..aec9efd0e6 100644 --- a/packages/components/list/list.component.ts +++ b/packages/components/list/list.component.ts @@ -6,7 +6,8 @@ import { ContentChildren, ElementRef, QueryList, - ViewEncapsulation + ViewEncapsulation, + inject } from '@angular/core'; import { KbqLine, KbqLineSetter } from '@koobiq/components/core'; @@ -33,9 +34,9 @@ export class KbqList {} preserveWhitespaces: false }) export class KbqListItem implements AfterContentInit { - @ContentChildren(KbqLine) lines: QueryList; + private elementRef = inject(ElementRef); - constructor(private elementRef: ElementRef) {} + @ContentChildren(KbqLine) lines: QueryList; ngAfterContentInit() { new KbqLineSetter(this.lines, this.elementRef); diff --git a/packages/components/loader-overlay/loader-overlay.component.ts b/packages/components/loader-overlay/loader-overlay.component.ts index 807206fde7..a9b8d7e37e 100644 --- a/packages/components/loader-overlay/loader-overlay.component.ts +++ b/packages/components/loader-overlay/loader-overlay.component.ts @@ -5,6 +5,7 @@ import { ContentChild, Directive, ElementRef, + inject, Input, input, OnDestroy, @@ -58,6 +59,9 @@ export class KbqLoaderOverlayCaption {} } }) export class KbqLoaderOverlay implements OnInit, OnDestroy { + private elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + // TODO: Skipped for migration because: // This input is used in a control flow expression (e.g. `@if` or `*ngIf`) // and migrating would break narrowing currently. @@ -108,11 +112,6 @@ export class KbqLoaderOverlay implements OnInit, OnDestroy { @ContentChild(KbqLoaderOverlayText) externalText: KbqLoaderOverlayText | null; @ContentChild(KbqLoaderOverlayCaption) externalCaption: KbqLoaderOverlayCaption | null; - constructor( - private elementRef: ElementRef, - private renderer: Renderer2 - ) {} - ngOnInit(): void { this.parent = this.elementRef.nativeElement.parentElement; diff --git a/packages/components/markdown/markdown.component.ts b/packages/components/markdown/markdown.component.ts index dfe1bd919c..db0324414a 100644 --- a/packages/components/markdown/markdown.component.ts +++ b/packages/components/markdown/markdown.component.ts @@ -6,11 +6,9 @@ import { effect, ElementRef, inject, - Inject, InjectionToken, Input, OnDestroy, - Optional, Provider, signal, viewChild, @@ -45,6 +43,11 @@ export const kbqMarkdownMarkedOptionsProvider = (options: MarkedOptions): Provid } }) export class KbqMarkdown implements OnDestroy { + private readonly markdownService = inject(KbqMarkdownService); + private sanitizer = inject(DomSanitizer); + private readonly markedOptions = + inject(KBQ_MARKDOWN_MARKED_OPTIONS, { optional: true }) ?? undefined; + private readonly contentWrapper = viewChild.required>('contentWrapper'); private readonly outputWrapper = viewChild.required>('outputWrapper'); @@ -70,11 +73,7 @@ export class KbqMarkdown implements OnDestroy { private readonly focusMonitor = inject(FocusMonitor); private readonly links: HTMLAnchorElement[] = []; - constructor( - private readonly markdownService: KbqMarkdownService, - private sanitizer: DomSanitizer, - @Optional() @Inject(KBQ_MARKDOWN_MARKED_OPTIONS) private readonly markedOptions?: MarkedOptions | undefined - ) { + constructor() { afterNextRender(() => { const contentWrapper = this.contentWrapper(); diff --git a/packages/components/modal/modal-control.service.ts b/packages/components/modal/modal-control.service.ts index d601fe76ee..781a2e7f16 100644 --- a/packages/components/modal/modal-control.service.ts +++ b/packages/components/modal/modal-control.service.ts @@ -1,4 +1,4 @@ -import { Injectable, Optional, SkipSelf } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { Subject, Subscription } from 'rxjs'; import { KbqModalRef } from './modal-ref.class'; import { KbqModalComponent } from './modal.component'; @@ -12,6 +12,7 @@ interface IRegisteredMeta { @Injectable({ providedIn: 'root' }) export class KbqModalControlService { + private parentService = inject(KbqModalControlService, { optional: true, skipSelf: true })!; // Track singleton afterAllClose through over the injection tree get afterAllClose(): Subject { return this.parentService ? this.parentService.afterAllClose : this.rootAfterAllClose; @@ -37,8 +38,6 @@ export class KbqModalControlService { return this.parentService ? this.parentService.registeredMetaMap : this.rootRegisteredMetaMap; } - constructor(@Optional() @SkipSelf() private parentService: KbqModalControlService) {} - // Register a modal to listen its open/close registerModal(modalRef: KbqModalRef): void { if (!this.hasRegistered(modalRef)) { diff --git a/packages/components/modal/modal.component.ts b/packages/components/modal/modal.component.ts index 9840655241..796c72b287 100644 --- a/packages/components/modal/modal.component.ts +++ b/packages/components/modal/modal.component.ts @@ -70,6 +70,15 @@ export class KbqModalComponent extends KbqModalRef implements OnInit, OnChanges, AfterViewInit, OnDestroy, ModalOptions { + private overlay = inject(Overlay); + private renderer = inject(Renderer2); + private cfr = inject(ComponentFactoryResolver); + private elementRef = inject>(ElementRef); + private viewContainer = inject(ViewContainerRef); + private modalControl = inject(KbqModalControlService); + private changeDetector = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + protected readonly document = inject(DOCUMENT); componentColors = KbqComponentColors; @@ -296,19 +305,6 @@ export class KbqModalComponent private animationState: AnimationState; private container: HTMLElement | OverlayRef; - constructor( - private overlay: Overlay, - private renderer: Renderer2, - private cfr: ComponentFactoryResolver, - private elementRef: ElementRef, - private viewContainer: ViewContainerRef, - private modalControl: KbqModalControlService, - private changeDetector: ChangeDetectorRef, - private focusMonitor: FocusMonitor - ) { - super(); - } - // TODO: Skipped for migration because: // This input overrides a field from a superclass, while the superclass field // is not migrated. diff --git a/packages/components/modal/modal.directive.ts b/packages/components/modal/modal.directive.ts index 776abc8ed8..49ff1c0527 100644 --- a/packages/components/modal/modal.directive.ts +++ b/packages/components/modal/modal.directive.ts @@ -1,4 +1,4 @@ -import { Component, Directive } from '@angular/core'; +import { Component, Directive, inject } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { KbqIconModule } from '@koobiq/components/icon'; import { KbqTitleDirective } from '@koobiq/components/title'; @@ -34,7 +34,7 @@ import { KbqModalComponent } from './modal.component'; } }) export class KbqModalTitle { - constructor(protected modal: KbqModalComponent) {} + protected modal = inject(KbqModalComponent); } @Directive({ diff --git a/packages/components/modal/modal.service.ts b/packages/components/modal/modal.service.ts index b4bac85cdc..6654a8fb8b 100644 --- a/packages/components/modal/modal.service.ts +++ b/packages/components/modal/modal.service.ts @@ -1,6 +1,6 @@ import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal } from '@angular/cdk/portal'; -import { ComponentRef, Injectable, InjectionToken, Injector, isDevMode } from '@angular/core'; +import { ComponentRef, inject, Injectable, InjectionToken, Injector, isDevMode } from '@angular/core'; import { ESCAPE } from '@koobiq/components/core'; import { Observable } from 'rxjs'; import { filter, switchMap } from 'rxjs/operators'; @@ -75,6 +75,10 @@ export class ModalBuilderForService { @Injectable({ providedIn: 'root' }) export class KbqModalService { + private readonly overlay = inject(Overlay); + private readonly modalControl = inject(KbqModalControlService); + private injector = inject(Injector); + // Track of the current close modals (we assume invisible is close this time) get openModals(): KbqModalRef[] { return this.modalControl.openModals; @@ -84,12 +88,6 @@ export class KbqModalService { return this.modalControl.afterAllClose.asObservable(); } - constructor( - private readonly overlay: Overlay, - private readonly modalControl: KbqModalControlService, - private injector: Injector - ) {} - // Closes all of the currently-open dialogs closeAll(): void { this.modalControl.closeAll(); diff --git a/packages/components/modal/modal.spec.ts b/packages/components/modal/modal.spec.ts index de597420d2..4cb6940f43 100644 --- a/packages/components/modal/modal.spec.ts +++ b/packages/components/modal/modal.spec.ts @@ -609,10 +609,8 @@ class TestComponentLevelService { ` }) export class CustomModalComponent { - constructor( - public componentLevelService: TestComponentLevelService, - public injector: Injector - ) {} + componentLevelService = inject(TestComponentLevelService); + injector = inject(Injector); } @Component({ @@ -626,10 +624,8 @@ export class CustomModalComponent { ] }) export class CustomComponent { - constructor( - public modalService: KbqModalService, - public injector: Injector - ) {} + modalService = inject(KbqModalService); + injector = inject(Injector); open() { return this.modalService.open({ @@ -661,8 +657,6 @@ class TestModalContentComponent {} }) class ModalByServiceComponent { nonServiceModalVisible = false; - - constructor(_modalControlService: KbqModalControlService) {} } @Component({ @@ -680,14 +674,12 @@ class ModalByServiceComponent { providers: [KbqModalControlService] }) class ModalByServiceFromDropdownComponent { + modalControlService = inject(KbqModalControlService); + modalService = inject(KbqModalService); + nonServiceModalVisible = false; kbqOkText = 'Save'; - constructor( - public modalControlService: KbqModalControlService, - public modalService: KbqModalService - ) {} - showConfirm() { this.modalService.success({ kbqSize: ModalSize.Small, diff --git a/packages/components/navbar/navbar-item.component.ts b/packages/components/navbar/navbar-item.component.ts index 21ee6f5de6..aac2a1b018 100644 --- a/packages/components/navbar/navbar-item.component.ts +++ b/packages/components/navbar/navbar-item.component.ts @@ -12,7 +12,6 @@ import { Input, NgZone, OnDestroy, - Optional, ViewEncapsulation, booleanAttribute, contentChild, @@ -128,6 +127,11 @@ export class KbqNavbarDivider {} } }) export class KbqNavbarFocusableItem implements AfterContentInit, AfterViewInit, OnDestroy, IFocusableOption { + private elementRef = inject>(ElementRef); + private changeDetector = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + private ngZone = inject(NgZone); + readonly title = contentChild(KbqNavbarTitle); readonly button = contentChild(KbqButton); @@ -179,13 +183,6 @@ export class KbqNavbarFocusableItem implements AfterContentInit, AfterViewInit, return -1; } - constructor( - private elementRef: ElementRef, - private changeDetector: ChangeDetectorRef, - private focusMonitor: FocusMonitor, - private ngZone: NgZone - ) {} - ngAfterViewInit(): void { this.focusMonitor.monitor(this.elementRef); } @@ -369,6 +366,11 @@ export class KbqNavbarRectangleElement { exportAs: 'kbqNavbarItem' }) export class KbqNavbarItem extends KbqTooltipTrigger implements AfterContentInit { + rectangleElement = inject(KbqNavbarRectangleElement); + navbarFocusableItem = inject(KbqNavbarFocusableItem); + private changeDetectorRef = inject(ChangeDetectorRef); + private dropdownTrigger = inject(KbqDropdownTrigger, { optional: true })!; + private bento = inject(KbqNavbarBento, { optional: true })!; readonly title = contentChild(KbqNavbarTitle); readonly icon = contentChild(KbqIcon); @@ -469,13 +471,7 @@ export class KbqNavbarItem extends KbqTooltipTrigger implements AfterContentInit return !!this.title()?.isOverflown; } - constructor( - public rectangleElement: KbqNavbarRectangleElement, - public navbarFocusableItem: KbqNavbarFocusableItem, - private changeDetectorRef: ChangeDetectorRef, - @Optional() private dropdownTrigger: KbqDropdownTrigger, - @Optional() private bento: KbqNavbarBento - ) { + constructor() { super(); if (this.hasDropDownTrigger) { diff --git a/packages/components/navbar/navbar.component.ts b/packages/components/navbar/navbar.component.ts index 57c21f07a3..44e1291afe 100644 --- a/packages/components/navbar/navbar.component.ts +++ b/packages/components/navbar/navbar.component.ts @@ -41,6 +41,10 @@ export type KbqNavbarContainerPositionType = 'left' | 'right'; @Directive() export class KbqFocusableComponent implements AfterContentInit, AfterViewInit, OnDestroy { + protected readonly changeDetectorRef = inject(ChangeDetectorRef); + protected readonly elementRef = inject>(ElementRef); + protected readonly focusMonitor = inject(FocusMonitor); + @ContentChildren(forwardRef(() => KbqNavbarFocusableItem), { descendants: true }) focusableItems: QueryList; @@ -74,12 +78,6 @@ export class KbqFocusableComponent implements AfterContentInit, AfterViewInit, O private optionFocusSubscription: Subscription | null; private optionBlurSubscription: Subscription | null; - constructor( - protected readonly changeDetectorRef: ChangeDetectorRef, - protected readonly elementRef: ElementRef, - protected readonly focusMonitor: FocusMonitor - ) {} - ngAfterContentInit(): void { this.keyManager = new FocusKeyManager(this.focusableItems).withTypeAhead(); @@ -210,6 +208,10 @@ export class KbqNavbarContainer {} } }) export class KbqNavbar extends KbqFocusableComponent implements AfterViewInit, AfterContentInit, OnDestroy { + protected readonly elementRef: ElementRef; + protected readonly changeDetectorRef: ChangeDetectorRef; + protected readonly focusMonitor: FocusMonitor; + readonly rectangleElements = contentChildren( forwardRef(() => KbqNavbarRectangleElement), { descendants: true } @@ -245,12 +247,15 @@ export class KbqNavbar extends KbqFocusableComponent implements AfterViewInit, A private resizeSubscription: Subscription; - constructor( - protected readonly elementRef: ElementRef, - protected readonly changeDetectorRef: ChangeDetectorRef, - protected readonly focusMonitor: FocusMonitor - ) { - super(changeDetectorRef, elementRef, focusMonitor); + constructor() { + const elementRef = inject>(ElementRef); + const changeDetectorRef = inject(ChangeDetectorRef); + const focusMonitor = inject(FocusMonitor); + + super(); + this.elementRef = elementRef; + this.changeDetectorRef = changeDetectorRef; + this.focusMonitor = focusMonitor; this.resizeSubscription = this.resizeStream .pipe(debounceTime(this.resizeDebounceInterval), takeUntilDestroyed()) diff --git a/packages/components/navbar/vertical-navbar.component.ts b/packages/components/navbar/vertical-navbar.component.ts index 7d9baaf0e9..8ced26889a 100644 --- a/packages/components/navbar/vertical-navbar.component.ts +++ b/packages/components/navbar/vertical-navbar.component.ts @@ -1,9 +1,8 @@ -import { CdkMonitorFocus, FocusMonitor } from '@angular/cdk/a11y'; +import { CdkMonitorFocus } from '@angular/cdk/a11y'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { AfterContentInit, ChangeDetectionStrategy, - ChangeDetectorRef, Component, contentChild, contentChildren, @@ -70,11 +69,11 @@ export const KBQ_VERTICAL_NAVBAR_CONFIGURATION = new InjectionToken('KbqVertical exportAs: 'KbqVerticalNavbar' }) export class KbqVerticalNavbar extends KbqFocusableComponent implements AfterContentInit { - /** @docs-private */ - protected readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true }); - - readonly externalConfiguration = inject(KBQ_VERTICAL_NAVBAR_CONFIGURATION, { optional: true }); + protected elementRef: ElementRef; + /** @docs-private */ + protected readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; + readonly externalConfiguration = inject(KBQ_VERTICAL_NAVBAR_CONFIGURATION, { optional: true })!; configuration; rectangleElements = contentChildren( @@ -108,12 +107,11 @@ export class KbqVerticalNavbar extends KbqFocusableComponent implements AfterCon private _expanded: boolean = false; - constructor( - protected elementRef: ElementRef, - changeDetectorRef: ChangeDetectorRef, - focusMonitor: FocusMonitor - ) { - super(changeDetectorRef, elementRef, focusMonitor); + constructor() { + const elementRef = inject>(ElementRef); + + super(); + this.elementRef = elementRef; this.animationDone.pipe(takeUntilDestroyed()).subscribe(this.updateTooltipForItems); diff --git a/packages/components/notification-center/notification-center.module.ts b/packages/components/notification-center/notification-center.module.ts index 315b575805..880c66255e 100644 --- a/packages/components/notification-center/notification-center.module.ts +++ b/packages/components/notification-center/notification-center.module.ts @@ -1,6 +1,6 @@ import { ConfigurableFocusTrapFactory, FOCUS_TRAP_INERT_STRATEGY, FocusTrapFactory } from '@angular/cdk/a11y'; import { NgModule } from '@angular/core'; -import { DateAdapter, DateFormatter, EmptyFocusTrapStrategy } from '@koobiq/components/core'; +import { EmptyFocusTrapStrategy } from '@koobiq/components/core'; import { KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqNotificationCenterComponent, @@ -17,7 +17,7 @@ import { KbqNotificationCenterService } from './notification-center.service'; KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER, { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }, { provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy }, - { provide: KbqNotificationCenterService, deps: [DateAdapter, DateFormatter] } + KbqNotificationCenterService ], exports: [ KbqNotificationCenterComponent, diff --git a/packages/components/notification-center/notification-center.ts b/packages/components/notification-center/notification-center.ts index 125eedb23e..46e1ce2193 100644 --- a/packages/components/notification-center/notification-center.ts +++ b/packages/components/notification-center/notification-center.ts @@ -385,7 +385,7 @@ export class KbqNotificationCenterTrigger ngAfterContentInit(): void { this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible: boolean) => { if (visible) { - // eslint-disable-next-line rxjs/no-nested-subscribe + // eslint-disable-next-line rxjs-x/no-nested-subscribe this.preventClosingByInnerScrollSubscription = this.closingActions().subscribe((event) => { if (event && event['scrollDispatcher']) { this.instance.setStickPosition(); diff --git a/packages/components/popover/popover-confirm.component.ts b/packages/components/popover/popover-confirm.component.ts index 977342b725..e29962f25a 100644 --- a/packages/components/popover/popover-confirm.component.ts +++ b/packages/components/popover/popover-confirm.component.ts @@ -3,11 +3,10 @@ import { ChangeDetectionStrategy, Component, Directive, - Inject, InjectionToken, Input, - Optional, ViewEncapsulation, + inject, output } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @@ -81,10 +80,10 @@ export class KbqPopoverConfirmTrigger extends KbqPopoverTrigger { private _confirmButtonText: string = 'Да'; - constructor( - @Optional() @Inject(KBQ_POPOVER_CONFIRM_TEXT) confirmText: string, - @Optional() @Inject(KBQ_POPOVER_CONFIRM_BUTTON_TEXT) confirmButtonText: string - ) { + constructor() { + const confirmText = inject(KBQ_POPOVER_CONFIRM_TEXT, { optional: true }); + const confirmButtonText = inject(KBQ_POPOVER_CONFIRM_BUTTON_TEXT, { optional: true }); + super(); this.confirmText = confirmText || 'Вы уверены, что хотите продолжить?'; diff --git a/packages/components/popover/popover.spec.ts b/packages/components/popover/popover.spec.ts index 1fff9a2b50..050e8a41e4 100644 --- a/packages/components/popover/popover.spec.ts +++ b/packages/components/popover/popover.spec.ts @@ -1,6 +1,6 @@ import { coerceElement } from '@angular/cdk/coercion'; import { FlexibleConnectedPositionStrategy, OverlayContainer } from '@angular/cdk/overlay'; -import { Component, DebugElement, ElementRef, Provider, Type, viewChild } from '@angular/core'; +import { Component, DebugElement, ElementRef, Provider, Type, inject as inject_1, viewChild } from '@angular/core'; import { ComponentFixture, TestBed, fakeAsync, inject, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; @@ -414,9 +414,10 @@ describe('KbqPopover', () => { ` }) export class PopoverSimple { + elementRef = inject_1(ElementRef); + readonly popoverTrigger = viewChild.required(KbqPopoverTrigger); readonly triggerElementRef = viewChild.required(KbqPopoverTrigger, { read: ElementRef }); - constructor(public elementRef: ElementRef) {} } @Component({ diff --git a/packages/components/radio/radio.component.ts b/packages/components/radio/radio.component.ts index d32576c8cd..a2bf2dbbc5 100644 --- a/packages/components/radio/radio.component.ts +++ b/packages/components/radio/radio.component.ts @@ -11,12 +11,12 @@ import { Directive, ElementRef, forwardRef, + inject, Input, input, numberAttribute, OnDestroy, OnInit, - Optional, output, QueryList, viewChild, @@ -61,6 +61,8 @@ export const KBQ_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = { exportAs: 'kbqRadioGroup' }) export class KbqRadioGroup implements AfterContentInit, ControlValueAccessor { + private readonly changeDetector = inject(ChangeDetectorRef); + readonly big = input(false); /** Name of the radio button group. All radio buttons inside this group will use this name. */ @@ -183,8 +185,6 @@ export class KbqRadioGroup implements AfterContentInit, ControlValueAccessor { /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */ private _labelPosition: 'before' | 'after' = 'after'; - constructor(private readonly changeDetector: ChangeDetectorRef) {} - /** The method to be called in order to update ngModel */ controlValueAccessorChangeFn: (value: any) => void = () => {}; @@ -308,6 +308,10 @@ export class KbqRadioGroup implements AfterContentInit, ControlValueAccessor { exportAs: 'kbqRadioButton' }) export class KbqRadioButton extends KbqColorDirective implements OnInit, AfterViewInit, OnDestroy { + private readonly changeDetector = inject(ChangeDetectorRef); + private focusMonitor = inject(FocusMonitor); + private readonly radioDispatcher = inject(UniqueSelectionDispatcher); + /** Whether this radio button is checked. */ // TODO: Skipped for migration because: // Accessor inputs cannot be migrated as they are too complex. @@ -464,13 +468,11 @@ export class KbqRadioButton extends KbqColorDirective implements OnInit, AfterVi /** Value assigned to this radio. */ private _value: any = null; - constructor( - @Optional() radioGroup: KbqRadioGroup, - private readonly changeDetector: ChangeDetectorRef, - private focusMonitor: FocusMonitor, - private readonly radioDispatcher: UniqueSelectionDispatcher - ) { + constructor() { + const radioGroup = inject(KbqRadioGroup, { optional: true })!; + super(); + const radioDispatcher = this.radioDispatcher; this.id = this.uniqueId; diff --git a/packages/components/scrollbar/scrollbar.component.ts b/packages/components/scrollbar/scrollbar.component.ts index 4cdfe92457..4b76fec86c 100644 --- a/packages/components/scrollbar/scrollbar.component.ts +++ b/packages/components/scrollbar/scrollbar.component.ts @@ -67,6 +67,9 @@ const filterEvents = (emits: KbqScrollbarEvents, events: KbqScrollbarEvents) => exportAs: 'kbqScrollbar' }) export class KbqScrollbar implements AfterViewInit, OnDestroy { + private ngZone = inject(NgZone); + private targetElement = inject>(ElementRef); + /** Element that is being overflowed */ readonly contentElement = viewChild.required>('content'); private readonly kbqScrollbarDirective = viewChild.required('content', { read: KbqScrollbarDirective }); @@ -92,11 +95,6 @@ export class KbqScrollbar implements AfterViewInit, OnDestroy { private readonly injector = inject(Injector); - constructor( - private ngZone: NgZone, - private targetElement: ElementRef - ) {} - ngAfterViewInit() { afterNextRender( () => { diff --git a/packages/components/scrollbar/scrollbar.directive.ts b/packages/components/scrollbar/scrollbar.directive.ts index b627c9b2ba..1081574c96 100644 --- a/packages/components/scrollbar/scrollbar.directive.ts +++ b/packages/components/scrollbar/scrollbar.directive.ts @@ -1,5 +1,5 @@ import { CdkScrollable } from '@angular/cdk/overlay'; -import { Directive, Inject, Input, NgZone, OnDestroy, input } from '@angular/core'; +import { Directive, Input, NgZone, OnDestroy, inject, input } from '@angular/core'; import { OverlayScrollbars } from 'overlayscrollbars'; import { KBQ_SCROLLBAR_CONFIG, KbqScrollbarEvents, KbqScrollbarOptions, KbqScrollbarTarget } from './scrollbar.types'; @@ -57,6 +57,9 @@ const createDefer = (): Defer => { hostDirectives: [CdkScrollable] }) export class KbqScrollbarDirective implements OnDestroy { + private ngZone = inject(NgZone); + private scrollbarConfig = inject(KBQ_SCROLLBAR_CONFIG); + private requestDefer: ReturnType[0]; private cancelDefer: ReturnType[1]; @@ -100,10 +103,7 @@ export class KbqScrollbarDirective implements OnDestroy { scrollbarInstance?: OverlayScrollbars; - constructor( - private ngZone: NgZone, - @Inject(KBQ_SCROLLBAR_CONFIG) private scrollbarConfig?: KbqScrollbarOptions - ) { + constructor() { const [requestDefer, cancelDefer] = createDefer(); this.requestDefer = requestDefer; diff --git a/packages/components/select/select.component.spec.ts b/packages/components/select/select.component.spec.ts index e16960f941..d58542f3de 100644 --- a/packages/components/select/select.component.spec.ts +++ b/packages/components/select/select.component.spec.ts @@ -10,6 +10,7 @@ import { TemplateRef, Type, getDebugNode, + inject as inject_1, viewChild, viewChildren } from '@angular/core'; @@ -1421,6 +1422,8 @@ class MultiSelectWithCustomizedTagContent { ` }) class CdkVirtualScrollViewportSelect { + scrollDispatcher = inject_1(ScrollDispatcher); + itemSize = 32; control = new UntypedFormControl(); isRequired: boolean; @@ -1431,8 +1434,6 @@ class CdkVirtualScrollViewportSelect { readonly select = viewChild.required(KbqSelect); readonly viewport = viewChild.required(CdkVirtualScrollViewport); options: any[] = OPTIONS.sort(); - - constructor(public scrollDispatcher: ScrollDispatcher) {} } @Component({ @@ -1476,6 +1477,8 @@ class CdkVirtualScrollViewportSelectOptionAsObject extends CdkVirtualScrollViewp id: number; name: string; }> { + scrollDispatcher: ScrollDispatcher; + values: any[] = [ { id: 3, name: 'Anapa' }, { id: 55, name: 'Lyubertsy' }, @@ -1486,8 +1489,12 @@ class CdkVirtualScrollViewportSelectOptionAsObject extends CdkVirtualScrollViewp return { id: index, name: option, active: true }; }); - constructor(public scrollDispatcher: ScrollDispatcher) { - super(scrollDispatcher); + constructor() { + const scrollDispatcher = inject_1(ScrollDispatcher); + + super(); + + this.scrollDispatcher = scrollDispatcher; } } diff --git a/packages/components/select/select.component.ts b/packages/components/select/select.component.ts index bf03f3540f..47e702715f 100644 --- a/packages/components/select/select.component.ts +++ b/packages/components/select/select.component.ts @@ -16,19 +16,15 @@ import { DoCheck, ElementRef, EventEmitter, - Host, - Inject, InjectionToken, Input, NgZone, OnDestroy, OnInit, - Optional, Output, Provider, QueryList, Renderer2, - Self, TemplateRef, ViewChild, ViewChildren, @@ -209,13 +205,25 @@ export class KbqSelect KbqFormFieldControl, CanUpdateErrorState { + private readonly _changeDetectorRef = inject(ChangeDetectorRef); + private readonly _ngZone = inject(NgZone); + private readonly _renderer = inject(Renderer2); + defaultErrorStateMatcher = inject(ErrorStateMatcher); + elementRef = inject>(ElementRef); + private overlayContainer = inject(OverlayContainer); + private readonly _dir = inject(Directionality, { optional: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + private readonly parentFormField = inject(KbqFormField, { host: true, optional: true })!; + ngControl = inject(NgControl, { self: true, optional: true })!; + private readonly scrollStrategyFactory = inject(KBQ_SELECT_SCROLL_STRATEGY); + protected localeService? = inject(KBQ_LOCALE_SERVICE, { optional: true })!; /** @docs-private */ protected readonly destroyRef = inject(DestroyRef); protected readonly isBrowser = inject(Platform).isBrowser; - protected readonly defaultOptions = inject(KBQ_SELECT_OPTIONS, { optional: true }); - + protected readonly defaultOptions = inject(KBQ_SELECT_OPTIONS, { optional: true })!; private readonly window = inject(KBQ_WINDOW); /** Whether the component is in an error state. */ @@ -838,21 +846,7 @@ export class KbqSelect private openPanelTimeout: ReturnType; - constructor( - private readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _ngZone: NgZone, - private readonly _renderer: Renderer2, - public defaultErrorStateMatcher: ErrorStateMatcher, - public elementRef: ElementRef, - private overlayContainer: OverlayContainer, - @Optional() private readonly _dir: Directionality, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - @Host() @Optional() private readonly parentFormField: KbqFormField, - @Self() @Optional() public ngControl: NgControl, - @Inject(KBQ_SELECT_SCROLL_STRATEGY) private readonly scrollStrategyFactory, - @Optional() @Inject(KBQ_LOCALE_SERVICE) protected localeService?: KbqLocaleService - ) { + constructor() { super(); this.localeService?.changes.subscribe(this.updateLocaleParams); diff --git a/packages/components/sidebar/sidebar.component.ts b/packages/components/sidebar/sidebar.component.ts index 3222f33a32..55452083e6 100644 --- a/packages/components/sidebar/sidebar.component.ts +++ b/packages/components/sidebar/sidebar.component.ts @@ -76,6 +76,9 @@ export class KbqSidebarClosed { exportAs: 'kbqSidebar' }) export class KbqSidebar implements OnDestroy, AfterContentInit { + private ngZone = inject(NgZone); + private elementRef = inject(ElementRef); + /** * @docs-private */ @@ -139,10 +142,7 @@ export class KbqSidebar implements OnDestroy, AfterContentInit { private unbindKeydownListener: ReturnType | null = null; - constructor( - private ngZone: NgZone, - private elementRef: ElementRef - ) { + constructor() { afterNextRender(() => this.registerKeydownListener()); } diff --git a/packages/components/sidepanel/sidepanel-container.component.ts b/packages/components/sidepanel/sidepanel-container.component.ts index 57b218afb8..b117db44d9 100644 --- a/packages/components/sidepanel/sidepanel-container.component.ts +++ b/packages/components/sidepanel/sidepanel-container.component.ts @@ -9,7 +9,7 @@ import { ElementRef, EmbeddedViewRef, EventEmitter, - Inject, + inject, InjectionToken, OnDestroy, viewChild, @@ -51,6 +51,11 @@ export const KBQ_SIDEPANEL_WITH_INDENT = new InjectionToken('kbq-sidepa animations: [kbqSidepanelAnimations.sidepanelState] }) export class KbqSidepanelContainerComponent extends BasePortalOutlet implements OnDestroy { + private elementRef = inject>(ElementRef); + private changeDetectorRef = inject(ChangeDetectorRef); + sidepanelConfig = inject(KbqSidepanelConfig); + withIndent = inject(KBQ_SIDEPANEL_WITH_INDENT); + /** ID for the container DOM element. */ id: string; @@ -93,15 +98,6 @@ export class KbqSidepanelContainerComponent extends BasePortalOutlet implements /** Whether the component has been destroyed. */ private destroyed: boolean; - constructor( - private elementRef: ElementRef, - private changeDetectorRef: ChangeDetectorRef, - public sidepanelConfig: KbqSidepanelConfig, - @Inject(KBQ_SIDEPANEL_WITH_INDENT) public withIndent: boolean - ) { - super(); - } - ngOnDestroy(): void { this.destroyed = true; } diff --git a/packages/components/sidepanel/sidepanel-directives.ts b/packages/components/sidepanel/sidepanel-directives.ts index 29efa9d78a..b4484563c0 100644 --- a/packages/components/sidepanel/sidepanel-directives.ts +++ b/packages/components/sidepanel/sidepanel-directives.ts @@ -8,7 +8,6 @@ import { input, OnChanges, OnInit, - Optional, SimpleChanges } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; @@ -29,18 +28,16 @@ import { KbqSidepanelService } from './sidepanel.service'; } }) export class KbqSidepanelClose implements OnInit, OnChanges { + sidepanelRef = inject(KbqSidepanelRef, { optional: true })!; + private elementRef = inject>(ElementRef); + private sidepanelService = inject(KbqSidepanelService); + // TODO: Skipped for migration because: // Your application code writes to the input. This prevents migration. @Input('kbq-sidepanel-close') sidepanelResult: any; readonly kbqSidepanelClose = input(); - constructor( - @Optional() public sidepanelRef: KbqSidepanelRef, - private elementRef: ElementRef, - private sidepanelService: KbqSidepanelService - ) {} - ngOnInit() { if (!this.sidepanelRef) { // When this directive is included in a sidepanel via TemplateRef (rather than being diff --git a/packages/components/sidepanel/sidepanel.service.ts b/packages/components/sidepanel/sidepanel.service.ts index ff3e614f40..184f83be5c 100644 --- a/packages/components/sidepanel/sidepanel.service.ts +++ b/packages/components/sidepanel/sidepanel.service.ts @@ -1,16 +1,6 @@ import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; import { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal'; -import { - ComponentRef, - Inject, - Injectable, - InjectionToken, - Injector, - OnDestroy, - Optional, - SkipSelf, - TemplateRef -} from '@angular/core'; +import { ComponentRef, Injectable, InjectionToken, Injector, OnDestroy, TemplateRef, inject } from '@angular/core'; import { KbqSidepanelAnimationState } from './sidepanel-animations'; import { KBQ_SIDEPANEL_DATA, KbqSidepanelConfig } from './sidepanel-config'; import { KBQ_SIDEPANEL_WITH_INDENT, KbqSidepanelContainerComponent } from './sidepanel-container.component'; @@ -21,6 +11,10 @@ export const KBQ_SIDEPANEL_DEFAULT_OPTIONS = new InjectionToken(KBQ_SIDEPANEL_DEFAULT_OPTIONS, { optional: true })!; + private parentSidepanelService = inject(KbqSidepanelService, { optional: true, skipSelf: true })!; private openedSidepanelsAtThisLevel: KbqSidepanelRef[] = []; /** Keeps track of the currently-open sidepanels. */ @@ -30,13 +24,6 @@ export class KbqSidepanelService implements OnDestroy { : this.openedSidepanelsAtThisLevel; } - constructor( - private overlay: Overlay, - private injector: Injector, - @Optional() @Inject(KBQ_SIDEPANEL_DEFAULT_OPTIONS) private defaultOptions: KbqSidepanelConfig, - @Optional() @SkipSelf() private parentSidepanelService: KbqSidepanelService - ) {} - ngOnDestroy() { // Only close the sidepanels at this level on destroy // since the parent service may still be active. diff --git a/packages/components/sidepanel/sidepanel.spec.ts b/packages/components/sidepanel/sidepanel.spec.ts index d8d41f19bf..3c328fe01e 100644 --- a/packages/components/sidepanel/sidepanel.spec.ts +++ b/packages/components/sidepanel/sidepanel.spec.ts @@ -1,7 +1,6 @@ import { OverlayContainer } from '@angular/cdk/overlay'; import { Component, - Inject, InjectionToken, Injector, NgModule, @@ -457,9 +456,9 @@ class SidepanelWithFormComponent { providers: [KbqSidepanelService] }) class SidepanelFromDropdownComponent { - readonly trigger = viewChild.required('trigger'); + ss = injectCore(KbqSidepanelService); - constructor(public ss: KbqSidepanelService) {} + readonly trigger = viewChild.required('trigger'); showSidepanel() { this.ss.open(ComponentForSidepanel); @@ -479,10 +478,8 @@ class SidepanelWithCustomToken { template: '
Simple Sidepanel
' }) class SimpleSidepanelExample { - constructor( - public sidepanelRef: KbqSidepanelRef, - @Inject(KBQ_SIDEPANEL_DATA) public data: any - ) {} + sidepanelRef = injectCore>(KbqSidepanelRef); + data = injectCore(KBQ_SIDEPANEL_DATA); } @Component({ diff --git a/packages/components/splitter/splitter.component.ts b/packages/components/splitter/splitter.component.ts index ac56c1d188..2da5ba46ca 100644 --- a/packages/components/splitter/splitter.component.ts +++ b/packages/components/splitter/splitter.component.ts @@ -8,7 +8,6 @@ import { ContentChildren, Directive, ElementRef, - Inject, Input, NgZone, OnDestroy, @@ -69,6 +68,9 @@ export enum Direction { } }) export class KbqGutterDirective implements OnInit { + private elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + // TODO: Skipped for migration because: // Accessor inputs cannot be migrated as they are too complex. @Input() @@ -114,11 +116,6 @@ export class KbqGutterDirective implements OnInit { dragged: boolean = false; - constructor( - private elementRef: ElementRef, - private renderer: Renderer2 - ) {} - ngOnInit(): void { this.setStyle(StyleProperty.FlexBasis, coerceCssPixelValue(this.size)); this.setStyle(this.isVertical ? StyleProperty.Height : StyleProperty.Width, coerceCssPixelValue(this.size)); @@ -153,6 +150,9 @@ export class KbqGutterDirective implements OnInit { } }) export class KbqGutterGhostDirective { + private elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + // TODO: Skipped for migration because: // Your application code writes to the input. This prevents migration. @Input() visible: boolean; @@ -217,11 +217,6 @@ export class KbqGutterGhostDirective { return this.direction === Direction.Vertical; } - constructor( - private elementRef: ElementRef, - private renderer: Renderer2 - ) {} - private updateDimensions(): void { this.setStyle(this.isVertical ? StyleProperty.Width : StyleProperty.Height, '100%'); this.setStyle(this.isVertical ? StyleProperty.Height : StyleProperty.Width, coerceCssPixelValue(this.size)); @@ -246,6 +241,11 @@ export class KbqGutterGhostDirective { preserveWhitespaces: false }) export class KbqSplitterComponent implements OnInit, AfterContentInit, OnDestroy { + elementRef = inject>(ElementRef); + changeDetectorRef = inject(ChangeDetectorRef); + private ngZone = inject(NgZone); + private renderer = inject(Renderer2); + readonly gutterPositionChange = output(); areas: IArea[] = []; @@ -338,13 +338,6 @@ export class KbqSplitterComponent implements OnInit, AfterContentInit, OnDestroy private _resizing: boolean = false; - constructor( - public elementRef: ElementRef, - public changeDetectorRef: ChangeDetectorRef, - private ngZone: NgZone, - private renderer: Renderer2 - ) {} - addArea(area: KbqSplitterAreaDirective): void { this.areas.push(this.mapAndOrderArea(area, this.areas.length)); this.changeDetectorRef.detectChanges(); @@ -581,16 +574,14 @@ export class KbqSplitterComponent implements OnInit, AfterContentInit, OnDestroy } }) export class KbqSplitterAreaDirective implements AfterViewInit, OnDestroy { + private elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + private splitter = inject(KbqSplitterComponent); + readonly sizeChange = output(); private readonly window = inject(KBQ_WINDOW); - constructor( - private elementRef: ElementRef, - private renderer: Renderer2, - @Inject(forwardRef(() => KbqSplitterComponent)) private splitter: KbqSplitterComponent - ) {} - isResizing(): boolean { return this.splitter.isDragging; } diff --git a/packages/components/tabs/tab-body.component.ts b/packages/components/tabs/tab-body.component.ts index 8bcf48ec2b..eb75614a8f 100644 --- a/packages/components/tabs/tab-body.component.ts +++ b/packages/components/tabs/tab-body.component.ts @@ -10,15 +10,14 @@ import { Directive, ElementRef, EventEmitter, - Inject, Input, OnDestroy, OnInit, - Optional, Output, ViewContainerRef, ViewEncapsulation, forwardRef, + inject, input, output, viewChild @@ -64,6 +63,8 @@ export type KbqTabBodyOriginState = 'left' | 'right'; animations: [kbqTabsAnimations.translateTab] }) export class KbqTabBody implements OnInit, OnDestroy { + private readonly elementRef = inject>(ElementRef); + private readonly dir = inject(Directionality, { optional: true })!; /** The shifted index position of the tab body, where zero represents the active center tab. */ // TODO: Skipped for migration because: // Accessor inputs cannot be migrated as they are too complex. @@ -110,11 +111,9 @@ export class KbqTabBody implements OnInit, OnDestroy { /** Subscription to the directionality change observable. */ private readonly dirChangeSubscription = Subscription.EMPTY; - constructor( - private readonly elementRef: ElementRef, - @Optional() private readonly dir: Directionality, - changeDetectorRef: ChangeDetectorRef - ) { + constructor() { + const changeDetectorRef = inject(ChangeDetectorRef); + if (this.dir && changeDetectorRef) { this.dirChangeSubscription = this.dir.change.subscribe((direction: Direction) => { this.computePositionAnimationState(direction); @@ -203,16 +202,17 @@ export class KbqTabBody implements OnInit, OnDestroy { selector: '[kbqTabBodyHost]' }) export class KbqTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy { + private readonly host = inject(KbqTabBody); + /** Subscription to events for when the tab body begins centering. */ private centeringSub = Subscription.EMPTY; /** Subscription to events for when the tab body finishes leaving from center position. */ private leavingSub = Subscription.EMPTY; - constructor( - componentFactoryResolver: ComponentFactoryResolver, - viewContainerRef: ViewContainerRef, - @Inject(forwardRef(() => KbqTabBody)) private readonly host: KbqTabBody - ) { + constructor() { + const componentFactoryResolver = inject(ComponentFactoryResolver); + const viewContainerRef = inject(ViewContainerRef); + super(componentFactoryResolver, viewContainerRef); } diff --git a/packages/components/tabs/tab-body.spec.ts b/packages/components/tabs/tab-body.spec.ts index d7815e868c..bf3ba513f9 100644 --- a/packages/components/tabs/tab-body.spec.ts +++ b/packages/components/tabs/tab-body.spec.ts @@ -1,6 +1,6 @@ import { Direction, Directionality } from '@angular/cdk/bidi'; import { PortalModule, TemplatePortal } from '@angular/cdk/portal'; -import { AfterContentInit, Component, TemplateRef, ViewContainerRef, viewChild } from '@angular/core'; +import { AfterContentInit, Component, TemplateRef, ViewContainerRef, inject, viewChild } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Subject } from 'rxjs'; @@ -182,6 +182,8 @@ describe('KbqTabBody', () => { ` }) class SimpleTabBodyApp implements AfterContentInit { + private viewContainerRef = inject(ViewContainerRef); + content: TemplatePortal; position: number; origin: number | null; @@ -189,8 +191,6 @@ class SimpleTabBodyApp implements AfterContentInit { readonly tabBody = viewChild.required(KbqTabBody); readonly template = viewChild.required(TemplateRef); - constructor(private viewContainerRef: ViewContainerRef) {} - ngAfterContentInit() { this.content = new TemplatePortal(this.template(), this.viewContainerRef); } diff --git a/packages/components/tabs/tab-content.directive.ts b/packages/components/tabs/tab-content.directive.ts index 0ba23c16d8..f3564bac7e 100644 --- a/packages/components/tabs/tab-content.directive.ts +++ b/packages/components/tabs/tab-content.directive.ts @@ -1,9 +1,9 @@ -import { Directive, TemplateRef } from '@angular/core'; +import { Directive, TemplateRef, inject } from '@angular/core'; /** Decorates the `ng-template` tags and reads out the template from it. */ @Directive({ selector: '[kbqTabContent]' }) export class KbqTabContent { - constructor(public template: TemplateRef) {} + template = inject>(TemplateRef); } diff --git a/packages/components/tabs/tab-group.component.ts b/packages/components/tabs/tab-group.component.ts index 2accff5917..a0efa9169d 100644 --- a/packages/components/tabs/tab-group.component.ts +++ b/packages/components/tabs/tab-group.component.ts @@ -12,13 +12,12 @@ import { Directive, ElementRef, forwardRef, - Inject, + inject, InjectionToken, Input, input, numberAttribute, OnDestroy, - Optional, output, QueryList, viewChild, @@ -108,6 +107,8 @@ export type KbqTabSelectBy = string | number | ((tabs: KbqTab[]) => KbqTab | nul exportAs: 'kbqTabGroup' }) export class KbqTabGroup implements AfterContentInit, AfterViewInit, AfterContentChecked, OnDestroy { + private readonly changeDetectorRef = inject(ChangeDetectorRef); + readonly resizeStream = new Subject(); @ContentChildren(KbqTab) tabs: QueryList; @@ -221,10 +222,9 @@ export class KbqTabGroup implements AfterContentInit, AfterViewInit, AfterConten private readonly groupId: number; private readonly resizeDebounceInterval: number = 100; - constructor( - private readonly changeDetectorRef: ChangeDetectorRef, - @Inject(KBQ_TABS_CONFIG) @Optional() defaultConfig?: KbqTabsConfig - ) { + constructor() { + const defaultConfig = inject(KBQ_TABS_CONFIG, { optional: true }); + this.groupId = nextId++; this.animationDuration = defaultConfig?.animationDuration || '0ms'; diff --git a/packages/components/tabs/tab-label-wrapper.directive.ts b/packages/components/tabs/tab-label-wrapper.directive.ts index 481e379770..850a1f5f34 100644 --- a/packages/components/tabs/tab-label-wrapper.directive.ts +++ b/packages/components/tabs/tab-label-wrapper.directive.ts @@ -1,4 +1,13 @@ -import { AfterViewInit, booleanAttribute, ContentChild, Directive, ElementRef, Input, Renderer2 } from '@angular/core'; +import { + AfterViewInit, + booleanAttribute, + ContentChild, + Directive, + ElementRef, + inject, + Input, + Renderer2 +} from '@angular/core'; import { KbqTab } from './tab.component'; /** @@ -13,6 +22,9 @@ import { KbqTab } from './tab.component'; } }) export class KbqTabLabelWrapper implements AfterViewInit { + elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + @ContentChild('labelContent') labelContent: ElementRef; // TODO: Skipped for migration because: @@ -34,11 +46,6 @@ export class KbqTabLabelWrapper implements AfterViewInit { private _disabled: boolean = false; - constructor( - public elementRef: ElementRef, - private renderer: Renderer2 - ) {} - ngAfterViewInit(): void { this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.kbq-icon'))); } diff --git a/packages/components/tabs/tab.component.ts b/packages/components/tabs/tab.component.ts index b6e4c3b81d..a7f6ae188c 100644 --- a/packages/components/tabs/tab.component.ts +++ b/packages/components/tabs/tab.component.ts @@ -5,6 +5,7 @@ import { Component, ContentChild, contentChild, + inject, Input, input, OnChanges, @@ -43,6 +44,8 @@ import { KBQ_TAB_LABEL, KbqTabLabel } from './tab-label.directive'; exportAs: 'kbqTab' }) export class KbqTab implements OnInit, OnChanges, OnDestroy { + private readonly viewContainerRef = inject(ViewContainerRef); + /** @docs-private */ get content(): TemplatePortal | null { return this.contentPortal; @@ -150,8 +153,6 @@ export class KbqTab implements OnInit, OnChanges, OnDestroy { /** Portal that will be the hosted content of the tab */ private contentPortal: TemplatePortal | null = null; - constructor(private readonly viewContainerRef: ViewContainerRef) {} - ngOnChanges(changes: SimpleChanges): void { if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) { this.stateChanges.next(); diff --git a/packages/components/tags/tag-input.ts b/packages/components/tags/tag-input.ts index e02f3e0ea8..3e28ad08a4 100644 --- a/packages/components/tags/tag-input.ts +++ b/packages/components/tags/tag-input.ts @@ -4,13 +4,11 @@ import { Directive, ElementRef, EventEmitter, - Inject, + inject, Input, input, OnChanges, - Optional, - output, - Self + output } from '@angular/core'; import { NgControl } from '@angular/forms'; import { KbqAutocompleteTrigger } from '@koobiq/components/autocomplete'; @@ -65,6 +63,11 @@ let nextUniqueId = 0; exportAs: 'kbqTagInput, kbqTagInputFor' }) export class KbqTagInput implements KbqTagTextControl, OnChanges { + private elementRef = inject>(ElementRef); + private defaultOptions = inject(KBQ_TAGS_DEFAULT_OPTIONS); + private trimDirective = inject(KbqTrim, { optional: true, self: true })!; + ngControl = inject(NgControl, { optional: true, self: true })!; + autocompleteTrigger? = inject(KbqAutocompleteTrigger, { optional: true, self: true })!; /** Whether the control is focused. */ focused: boolean = false; @@ -171,13 +174,7 @@ export class KbqTagInput implements KbqTagTextControl, OnChanges { /** The native input element to which this directive is attached. */ private inputElement: HTMLInputElement; - constructor( - private elementRef: ElementRef, - @Inject(KBQ_TAGS_DEFAULT_OPTIONS) private defaultOptions: KbqTagsDefaultOptions, - @Optional() @Self() private trimDirective: KbqTrim, - @Optional() @Self() public ngControl: NgControl, - @Optional() @Self() public autocompleteTrigger?: KbqAutocompleteTrigger - ) { + constructor() { this.inputElement = this.elementRef.nativeElement as HTMLInputElement; } diff --git a/packages/components/tags/tag-list.component.ts b/packages/components/tags/tag-list.component.ts index 6deaf88646..a58f0f5e6e 100644 --- a/packages/components/tags/tag-list.component.ts +++ b/packages/components/tags/tag-list.component.ts @@ -20,10 +20,8 @@ import { Input, input, OnDestroy, - Optional, output, QueryList, - Self, ViewEncapsulation } from '@angular/core'; import { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop'; @@ -101,6 +99,14 @@ export class KbqTagList CanUpdateErrorState, AfterViewInit { + protected elementRef = inject>(ElementRef); + private changeDetectorRef = inject(ChangeDetectorRef); + defaultErrorStateMatcher = inject(ErrorStateMatcher); + private dir = inject(Directionality, { optional: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + ngControl = inject(NgControl, { optional: true, self: true })!; + private readonly dropList = inject(CdkDropList, { host: true }); private readonly destroyRef = inject(DestroyRef); private readonly focusMonitor = inject(FocusMonitor); @@ -418,15 +424,7 @@ export class KbqTagList /** Triggers unsubscription from all per-tags streams when tags are reset. */ private readonly tagsSubscriptions$ = new Subject(); - constructor( - protected elementRef: ElementRef, - private changeDetectorRef: ChangeDetectorRef, - public defaultErrorStateMatcher: ErrorStateMatcher, - @Optional() private dir: Directionality, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - @Optional() @Self() public ngControl: NgControl - ) { + constructor() { if (this.ngControl) { this.ngControl.valueAccessor = this; } diff --git a/packages/components/tags/tag.component.ts b/packages/components/tags/tag.component.ts index 2a35be5766..b1cdbad6da 100644 --- a/packages/components/tags/tag.component.ts +++ b/packages/components/tags/tag.component.ts @@ -15,7 +15,6 @@ import { ElementRef, forwardRef, inject, - Inject, Input, input, OnDestroy, @@ -223,8 +222,10 @@ export class KbqTag extends KbqColorDirective implements IFocusableOption, OnDestroy, KbqTitleTextRef, AfterContentInit, AfterViewInit { + changeDetectorRef = inject(ChangeDetectorRef); + private readonly focusMonitor = inject(FocusMonitor); - private readonly tagList = inject(KbqTagList, { optional: true }); + private readonly tagList = inject(KbqTagList, { optional: true })!; private readonly drag: CdkDrag = inject(CdkDrag, { host: true }); private readonly destroyRef = inject(DestroyRef); @@ -414,7 +415,7 @@ export class KbqTag return (this.tagList?.draggable ?? false) && !this.disabled; } - constructor(public changeDetectorRef: ChangeDetectorRef) { + constructor() { super(); this.color = KbqComponentColors.ContrastFade; @@ -728,7 +729,7 @@ export class KbqTag } }) export class KbqTagRemove { - constructor(@Inject(forwardRef(() => KbqTag)) protected parentTag: KbqTag) {} + protected parentTag = inject(KbqTag); /** @docs-private */ focus(event: FocusEvent): void { diff --git a/packages/components/textarea/textarea.component.ts b/packages/components/textarea/textarea.component.ts index 8f55d18c5b..be3bd47271 100644 --- a/packages/components/textarea/textarea.component.ts +++ b/packages/components/textarea/textarea.component.ts @@ -5,9 +5,7 @@ import { Directive, DoCheck, ElementRef, - Host, inject, - Inject, InjectionToken, Input, input, @@ -16,9 +14,7 @@ import { OnChanges, OnDestroy, OnInit, - Optional, - Renderer2, - Self + Renderer2 } from '@angular/core'; import { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms'; import { @@ -56,6 +52,14 @@ let nextUniqueId = 0; export class KbqTextarea implements KbqFormFieldControl, OnInit, OnChanges, OnDestroy, DoCheck, CanUpdateErrorState { + protected elementRef = inject>(ElementRef); + ngControl = inject(NgControl, { optional: true, self: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + defaultErrorStateMatcher = inject(ErrorStateMatcher); + private parent = inject(KBQ_PARENT_ANIMATION_COMPONENT, { optional: true, host: true })!; + private ngZone = inject(NgZone); + /** Whether the component is in an error state. */ errorState: boolean = false; @@ -210,16 +214,9 @@ export class KbqTextarea private minHeight: number = 0; private rowsCount: number; - constructor( - protected elementRef: ElementRef, - @Optional() @Self() public ngControl: NgControl, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - public defaultErrorStateMatcher: ErrorStateMatcher, - @Optional() @Self() @Inject(KBQ_TEXTAREA_VALUE_ACCESSOR) inputValueAccessor: any, - @Optional() @Host() @Inject(KBQ_PARENT_ANIMATION_COMPONENT) private parent: any, - private ngZone: NgZone - ) { + constructor() { + const inputValueAccessor = inject(KBQ_TEXTAREA_VALUE_ACCESSOR, { optional: true, self: true }); + // If no input value accessor was explicitly specified, use the element as the textarea value // accessor. this.valueAccessor = inputValueAccessor || this.elementRef.nativeElement; diff --git a/packages/components/time-range/time-range.spec.ts b/packages/components/time-range/time-range.spec.ts index a92cf0f66f..2143837d40 100644 --- a/packages/components/time-range/time-range.spec.ts +++ b/packages/components/time-range/time-range.spec.ts @@ -5,7 +5,7 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { KbqLuxonDateModule, LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; -import { DateAdapter, DateFormatter, KBQ_DATE_LOCALE, KbqFormattersModule } from '@koobiq/components/core'; +import { DateFormatter, KbqFormattersModule } from '@koobiq/components/core'; import { KbqFormFieldModule } from '@koobiq/components/form-field'; import { KbqIconModule } from '@koobiq/components/icon'; import { KbqPopoverComponent } from '@koobiq/components/popover'; @@ -132,7 +132,7 @@ describe('KbqTimeRange', () => { const customDefaultTypes = customTypes.map(({ type }) => type); const fixture = setup(TestComponent, [ - { provide: DateFormatter, deps: [DateAdapter, KBQ_DATE_LOCALE] }, + DateFormatter, { provide: KBQ_CUSTOM_TIME_RANGE_TYPES, useValue: customTypes }, { provide: KBQ_DEFAULT_TIME_RANGE_TYPES, useValue: customDefaultTypes } ]); diff --git a/packages/components/timepicker/timepicker.directive.ts b/packages/components/timepicker/timepicker.directive.ts index 98d8d9f5cb..71bb209818 100644 --- a/packages/components/timepicker/timepicker.directive.ts +++ b/packages/components/timepicker/timepicker.directive.ts @@ -6,10 +6,8 @@ import { ElementRef, forwardRef, inject, - Inject, Input, OnDestroy, - Optional, output, Renderer2 } from '@angular/core'; @@ -116,6 +114,10 @@ const fullFormatSize: number = 8; export class KbqTimepicker implements KbqFormFieldControl, ControlValueAccessor, Validator, OnDestroy, DoCheck, AfterContentInit { + private elementRef = inject>(ElementRef); + private renderer = inject(Renderer2); + private dateAdapter = inject>(DateAdapter, { optional: true })!; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; /** * Implemented as part of KbqFormFieldControl. * @docs-private @@ -394,12 +396,9 @@ export class KbqTimepicker private errorStateTracker: KbqErrorStateTracker; - constructor( - private elementRef: ElementRef, - private renderer: Renderer2, - @Optional() private dateAdapter: DateAdapter, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService?: KbqLocaleService - ) { + constructor() { + const dateAdapter = this.dateAdapter; + if (!this.dateAdapter) { throw Error( `KbqTimepicker: No provider found for DateAdapter. You must import one of the existing ` + diff --git a/packages/components/timepicker/timepicker.spec.ts b/packages/components/timepicker/timepicker.spec.ts index a5cd6f394c..0f71666dd5 100644 --- a/packages/components/timepicker/timepicker.spec.ts +++ b/packages/components/timepicker/timepicker.spec.ts @@ -1,4 +1,4 @@ -import { Component, DebugElement, Inject, Type, viewChild } from '@angular/core'; +import { Component, DebugElement, inject as inject_1, Type, viewChild } from '@angular/core'; import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing'; import { AsyncValidatorFn, @@ -136,6 +136,8 @@ class TimepickerControlWithAsyncValidators { ` }) class TestApp { + adapter = inject_1>(DateAdapter); + readonly ngModel = viewChild.required('ngModel'); timeFormat: TimeFormats; @@ -144,7 +146,9 @@ class TestApp { timeValue: DateTime; isDisabled: boolean; - constructor(public adapter: DateAdapter) { + constructor() { + const adapter = this.adapter; + this.timeValue = adapter.createDateTime(1970, 1, 1, 12, 18, 28, 100); } } @@ -1028,10 +1032,10 @@ describe('KbqTimepicker with null model value', () => { ` }) class TimepickerWithLocaleChange { + localeService = inject_1(KBQ_LOCALE_SERVICE); + timeFormat: TimeFormats; model: any = null; - - constructor(@Inject(KBQ_LOCALE_SERVICE) public localeService: KbqLocaleService) {} } describe('with Locale change', () => { diff --git a/packages/components/title/title.directive.ts b/packages/components/title/title.directive.ts index 3e6c6a6e04..b8d4ef311d 100644 --- a/packages/components/title/title.directive.ts +++ b/packages/components/title/title.directive.ts @@ -1,15 +1,5 @@ import { ContentObserver } from '@angular/cdk/observers'; -import { - AfterViewInit, - ContentChild, - Directive, - ElementRef, - Host, - inject, - Inject, - OnDestroy, - Optional -} from '@angular/core'; +import { AfterViewInit, ContentChild, Directive, ElementRef, inject, OnDestroy } from '@angular/core'; import { KBQ_TITLE_TEXT_REF, kbqInjectNativeElement, KbqTitleTextRef, PopUpTriggers } from '@koobiq/components/core'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { Subject, Subscription, throttleTime } from 'rxjs'; @@ -25,6 +15,7 @@ import { debounceTime } from 'rxjs/operators'; exportAs: 'kbqTitle' }) export class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewInit, OnDestroy { + private componentInstance = inject(KBQ_TITLE_TEXT_REF, { host: true, optional: true })!; private readonly nativeElement = kbqInjectNativeElement(); private contentObserver = inject(ContentObserver); @@ -103,10 +94,6 @@ export class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewIni @ContentChild('kbqTitleContainer') private parentContainer: ElementRef; - constructor(@Host() @Optional() @Inject(KBQ_TITLE_TEXT_REF) private componentInstance?: KbqTitleTextRef) { - super(); - } - ngAfterViewInit() { this.parentContainer = this.parentContainer || this.componentInstance?.parentTextElement || this.elementRef; this.childContainer = this.childContainer || this.componentInstance?.textElement || this.elementRef; diff --git a/packages/components/toast/toast-container.component.ts b/packages/components/toast/toast-container.component.ts index 912e386dc8..befb739287 100644 --- a/packages/components/toast/toast-container.component.ts +++ b/packages/components/toast/toast-container.component.ts @@ -6,14 +6,13 @@ import { ComponentRef, ElementRef, EmbeddedViewRef, - Inject, Injector, NgZone, TemplateRef, ViewContainerRef, ViewEncapsulation, ViewRef, - forwardRef, + inject, viewChild } from '@angular/core'; import { KbqToastService } from './toast.service'; @@ -30,17 +29,17 @@ import { KbqToastData } from './toast.type'; } }) export class KbqToastContainerComponent extends CdkScrollable { + private injector = inject(Injector); + private changeDetectorRef = inject(ChangeDetectorRef); + readonly service = inject(KbqToastService); + readonly viewContainer = viewChild.required('container', { read: ViewContainerRef }); - constructor( - private injector: Injector, - private changeDetectorRef: ChangeDetectorRef, - @Inject(forwardRef(() => KbqToastService)) readonly service: KbqToastService, + constructor() { + const elementRef = inject>(ElementRef); + const scrollDispatcher = inject(ScrollDispatcher); + const ngZone = inject(NgZone); - elementRef: ElementRef, - scrollDispatcher: ScrollDispatcher, - ngZone: NgZone - ) { super(elementRef, scrollDispatcher, ngZone); this.service.animation.subscribe(this.dispatchScrollEvent); diff --git a/packages/components/toast/toast.component.ts b/packages/components/toast/toast.component.ts index 9290741d65..08a8609432 100644 --- a/packages/components/toast/toast.component.ts +++ b/packages/components/toast/toast.component.ts @@ -6,11 +6,9 @@ import { Component, Directive, ElementRef, - Inject, OnDestroy, TemplateRef, ViewEncapsulation, - forwardRef, inject } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @@ -60,6 +58,11 @@ let id = 0; animations: [kbqToastAnimations.toastState] }) export class KbqToastComponent implements OnDestroy { + readonly data = inject(KbqToastData); + readonly service = inject(KbqToastService); + elementRef = inject>(ElementRef); + private focusMonitor = inject(FocusMonitor); + protected readonly readStateDirective = inject(KbqReadStateDirective, { host: true }); themePalette = ThemePalette; @@ -85,12 +88,7 @@ export class KbqToastComponent implements OnDestroy { return this.hovered.getValue() || this.focused.getValue(); } - constructor( - readonly data: KbqToastData, - @Inject(forwardRef(() => KbqToastService)) readonly service: KbqToastService, - public elementRef: ElementRef, - private focusMonitor: FocusMonitor - ) { + constructor() { this.$implicit = this; this.data.style = this.data.style || KbqToastStyle.Contrast; diff --git a/packages/components/toast/toast.service.ts b/packages/components/toast/toast.service.ts index aebcf9b429..9698b16b1f 100644 --- a/packages/components/toast/toast.service.ts +++ b/packages/components/toast/toast.service.ts @@ -4,14 +4,13 @@ import { ComponentPortal } from '@angular/cdk/portal'; import { ComponentRef, EmbeddedViewRef, - Inject, Injectable, InjectionToken, Injector, NgZone, OnDestroy, - Optional, - TemplateRef + TemplateRef, + inject } from '@angular/core'; import { BehaviorSubject, Subscription, filter, shareReplay, timer } from 'rxjs'; import { KbqToastContainerComponent } from './toast-container.component'; @@ -29,6 +28,13 @@ let templateId = 0; /** Generic `T` is a type hint only; the runtime component comes from `KBQ_TOAST_FACTORY`. */ @Injectable({ providedIn: 'root' }) export class KbqToastService implements OnDestroy { + private overlay = inject(Overlay); + private injector = inject(Injector); + private overlayContainer = inject(OverlayContainer); + private ngZone = inject(NgZone); + private toastFactory = inject(KBQ_TOAST_FACTORY); + private toastConfig = inject(KBQ_TOAST_CONFIG, { optional: true })!; + get toasts(): ComponentRef[] { return Object.values(this.toastsDict).filter((item) => !item.hostView.destroyed); } @@ -44,7 +50,7 @@ export class KbqToastService im timer = timer(CHECK_INTERVAL, CHECK_INTERVAL).pipe( filter(() => this.toasts.length > 0 && !this.hovered.getValue() && !this.focused.getValue()), - // eslint-disable-next-line rxjs/no-ignored-replay-buffer + // eslint-disable-next-line rxjs-x/no-ignored-replay-buffer shareReplay() ); @@ -57,14 +63,7 @@ export class KbqToastService im private toastsDict: { [id: number]: ComponentRef } = {}; private templatesDict: { [id: number]: EmbeddedViewRef } = {}; - constructor( - private overlay: Overlay, - private injector: Injector, - private overlayContainer: OverlayContainer, - private ngZone: NgZone, - @Inject(KBQ_TOAST_FACTORY) private toastFactory: any, - @Optional() @Inject(KBQ_TOAST_CONFIG) private toastConfig: KbqToastConfig - ) { + constructor() { this.ngZone.runOutsideAngular(() => { this.timerSubscription = this.timer.subscribe(this.processToasts); }); diff --git a/packages/components/toast/toast.spec.ts b/packages/components/toast/toast.spec.ts index e47038ef5b..c2e27d9c04 100644 --- a/packages/components/toast/toast.spec.ts +++ b/packages/components/toast/toast.spec.ts @@ -1,5 +1,5 @@ import { OverlayContainer } from '@angular/cdk/overlay'; -import { Component, NgZone, TemplateRef, viewChild } from '@angular/core'; +import { Component, NgZone, TemplateRef, inject as inject_1, viewChild } from '@angular/core'; import { TestBed, discardPeriodicTasks, fakeAsync, flush, inject, tick } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Subject } from 'rxjs'; @@ -203,7 +203,8 @@ describe('Standalone ToastService', () => { ` }) class KbqToastButtonWrapperComponent { - constructor(public toastService: KbqToastService) {} + toastService = inject_1(KbqToastService); + show(): void { this.toastService.show({ style: 'warning', title: 'Warning', content: 'Message Content' }, 0); } diff --git a/packages/components/toggle/toggle.component.ts b/packages/components/toggle/toggle.component.ts index c32bf1845e..06da8aae18 100644 --- a/packages/components/toggle/toggle.component.ts +++ b/packages/components/toggle/toggle.component.ts @@ -79,6 +79,9 @@ export class KbqToggleChange { exportAs: 'kbqToggle' }) export class KbqToggleComponent extends KbqColorDirective implements AfterViewInit, ControlValueAccessor, OnDestroy { + private focusMonitor = inject(FocusMonitor); + private changeDetectorRef = inject(ChangeDetectorRef); + readonly big = input(false); readonly inputElement = viewChild.required>('input'); @@ -191,10 +194,7 @@ export class KbqToggleComponent extends KbqColorDirective implements AfterViewIn private uniqueId: string = `kbq-toggle-${++nextUniqueId}`; - constructor( - private focusMonitor: FocusMonitor, - private changeDetectorRef: ChangeDetectorRef - ) { + constructor() { super(); this.id = this.uniqueId; diff --git a/packages/components/tooltip/tooltip.component.ts b/packages/components/tooltip/tooltip.component.ts index 36806eb8f0..3a3d8b66eb 100644 --- a/packages/components/tooltip/tooltip.component.ts +++ b/packages/components/tooltip/tooltip.component.ts @@ -10,7 +10,6 @@ import { Directive, ElementRef, EventEmitter, - Inject, InjectionToken, Input, OnChanges, @@ -51,7 +50,7 @@ export enum TooltipModifier { Extended = 'extended' } -export const KBQ_TOOLTIP_OPEN_TIME = new InjectionToken<() => ScrollStrategy>('kbq-tooltip-open-time'); +export const KBQ_TOOLTIP_OPEN_TIME = new InjectionToken<{ value: number }>('kbq-tooltip-open-time'); /** @docs-private */ export const KBQ_TOOLTIP_OPEN_TIME_PROVIDER = { @@ -74,14 +73,12 @@ export const MIN_TIME_FOR_DELAY = 2000; animations: [kbqTooltipAnimations.tooltipState] }) export class KbqTooltipComponent extends KbqPopUp { + private openTime = inject(KBQ_TOOLTIP_OPEN_TIME); + prefix = 'kbq-tooltip'; @ViewChild('tooltip') elementRef: ElementRef; - constructor(@Inject(KBQ_TOOLTIP_OPEN_TIME) private openTime) { - super(); - } - show(delay: number) { if (!this.content) { return; @@ -139,7 +136,7 @@ export class KbqTooltipTrigger implements AfterViewInit, OnChanges, OnDestroy { protected scrollStrategy: () => ScrollStrategy = inject(KBQ_TOOLTIP_SCROLL_STRATEGY); - protected parentPopup = inject(KBQ_PARENT_POPUP, { optional: true }); + protected parentPopup = inject(KBQ_PARENT_POPUP, { optional: true })!; protected focusMonitor: FocusMonitor = inject(FocusMonitor); /** @docs-private */ protected renderer: Renderer2 = inject(Renderer2); diff --git a/packages/components/tree-select/__screenshots__/01-dark.png b/packages/components/tree-select/__screenshots__/01-dark.png index e066efa3e6..e01607b071 100644 Binary files a/packages/components/tree-select/__screenshots__/01-dark.png and b/packages/components/tree-select/__screenshots__/01-dark.png differ diff --git a/packages/components/tree-select/__screenshots__/01-light.png b/packages/components/tree-select/__screenshots__/01-light.png index 54426ecacb..7f6ba3df8b 100644 Binary files a/packages/components/tree-select/__screenshots__/01-light.png and b/packages/components/tree-select/__screenshots__/01-light.png differ diff --git a/packages/components/tree-select/__screenshots__/02-dark.png b/packages/components/tree-select/__screenshots__/02-dark.png index db3c4499bc..86b28cfaa0 100644 Binary files a/packages/components/tree-select/__screenshots__/02-dark.png and b/packages/components/tree-select/__screenshots__/02-dark.png differ diff --git a/packages/components/tree-select/__screenshots__/02-light.png b/packages/components/tree-select/__screenshots__/02-light.png index ec99988c95..503abea004 100644 Binary files a/packages/components/tree-select/__screenshots__/02-light.png and b/packages/components/tree-select/__screenshots__/02-light.png differ diff --git a/packages/components/tree-select/__screenshots__/03-dark.png b/packages/components/tree-select/__screenshots__/03-dark.png index ed6c702a83..20afc23883 100644 Binary files a/packages/components/tree-select/__screenshots__/03-dark.png and b/packages/components/tree-select/__screenshots__/03-dark.png differ diff --git a/packages/components/tree-select/__screenshots__/03-light.png b/packages/components/tree-select/__screenshots__/03-light.png index 96971091e8..3eef02258d 100644 Binary files a/packages/components/tree-select/__screenshots__/03-light.png and b/packages/components/tree-select/__screenshots__/03-light.png differ diff --git a/packages/components/tree-select/tree-select.component.ts b/packages/components/tree-select/tree-select.component.ts index 834cb79d6c..c6f54432cb 100644 --- a/packages/components/tree-select/tree-select.component.ts +++ b/packages/components/tree-select/tree-select.component.ts @@ -15,19 +15,15 @@ import { DoCheck, ElementRef, EventEmitter, - Host, - Inject, InjectionToken, Input, NgZone, OnDestroy, OnInit, - Optional, Output, Provider, QueryList, Renderer2, - Self, TemplateRef, ViewChild, ViewChildren, @@ -190,10 +186,21 @@ export class KbqTreeSelect KbqFormFieldControl, CanUpdateErrorState { + elementRef = inject>(ElementRef); + readonly changeDetectorRef = inject(ChangeDetectorRef); + private readonly ngZone = inject(NgZone); + private readonly renderer = inject(Renderer2); + defaultErrorStateMatcher = inject(ErrorStateMatcher); + private readonly scrollStrategyFactory = inject(KBQ_SELECT_SCROLL_STRATEGY); + private readonly dir = inject(Directionality, { optional: true })!; + parentForm = inject(NgForm, { optional: true })!; + parentFormGroup = inject(FormGroupDirective, { optional: true })!; + private readonly parentFormField = inject(KbqFormField, { host: true, optional: true })!; + ngControl = inject(NgControl, { optional: true, self: true })!; + private localeService = inject(KBQ_LOCALE_SERVICE, { optional: true })!; protected readonly isBrowser = inject(Platform).isBrowser; - private readonly defaultOptions = inject(KBQ_TREE_SELECT_OPTIONS, { optional: true }); - + private readonly defaultOptions = inject(KBQ_TREE_SELECT_OPTIONS, { optional: true })!; /** Whether the component is in an error state. */ errorState: boolean = false; /** @@ -635,20 +642,7 @@ export class KbqTreeSelect private readonly destroyRef = inject(DestroyRef); private readonly window = inject(KBQ_WINDOW); - constructor( - public elementRef: ElementRef, - readonly changeDetectorRef: ChangeDetectorRef, - private readonly ngZone: NgZone, - private readonly renderer: Renderer2, - public defaultErrorStateMatcher: ErrorStateMatcher, - @Inject(KBQ_SELECT_SCROLL_STRATEGY) private readonly scrollStrategyFactory, - @Optional() private readonly dir: Directionality, - @Optional() public parentForm: NgForm, - @Optional() public parentFormGroup: FormGroupDirective, - @Host() @Optional() private readonly parentFormField: KbqFormField, - @Optional() @Self() public ngControl: NgControl, - @Optional() @Inject(KBQ_LOCALE_SERVICE) private localeService?: KbqLocaleService - ) { + constructor() { super(); this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams); diff --git a/packages/components/tree/__screenshots__/01-dark.png b/packages/components/tree/__screenshots__/01-dark.png index 5aa7462a39..55708868a8 100644 Binary files a/packages/components/tree/__screenshots__/01-dark.png and b/packages/components/tree/__screenshots__/01-dark.png differ diff --git a/packages/components/tree/__screenshots__/01-light.png b/packages/components/tree/__screenshots__/01-light.png index e806a39dea..4a1b85966b 100644 Binary files a/packages/components/tree/__screenshots__/01-light.png and b/packages/components/tree/__screenshots__/01-light.png differ diff --git a/packages/components/tree/node.ts b/packages/components/tree/node.ts index 99a7217ff2..2a3c79429a 100644 --- a/packages/components/tree/node.ts +++ b/packages/components/tree/node.ts @@ -1,4 +1,4 @@ -import { Directive, TemplateRef, input } from '@angular/core'; +import { Directive, TemplateRef, inject, input } from '@angular/core'; /** Context provided to the tree node component. */ export class KbqTreeNodeOutletContext { @@ -28,6 +28,8 @@ export class KbqTreeNodeOutletContext { inputs: ['when: kbqTreeNodeDefWhen'] }) export class KbqTreeNodeDef { + template = inject>(TemplateRef); + readonly data = input(undefined!, { alias: 'kbqTreeNode' }); /** @@ -40,5 +42,4 @@ export class KbqTreeNodeDef { when: (index: number, nodeData: T) => boolean; /** @docs-private */ - constructor(public template: TemplateRef) {} } diff --git a/packages/components/tree/outlet.ts b/packages/components/tree/outlet.ts index b5dc8e2ad5..fe0962c0fa 100644 --- a/packages/components/tree/outlet.ts +++ b/packages/components/tree/outlet.ts @@ -1,11 +1,9 @@ -import { ChangeDetectorRef, Directive, ViewContainerRef } from '@angular/core'; +import { ChangeDetectorRef, Directive, ViewContainerRef, inject } from '@angular/core'; @Directive({ selector: '[kbqTreeNodeOutlet]' }) export class KbqTreeNodeOutlet { - constructor( - public viewContainer: ViewContainerRef, - public changeDetectorRef: ChangeDetectorRef - ) {} + viewContainer = inject(ViewContainerRef); + changeDetectorRef = inject(ChangeDetectorRef); } diff --git a/packages/components/tree/padding.directive.ts b/packages/components/tree/padding.directive.ts index 848cf0448e..fe8a6b681e 100644 --- a/packages/components/tree/padding.directive.ts +++ b/packages/components/tree/padding.directive.ts @@ -1,6 +1,6 @@ import { Directionality } from '@angular/cdk/bidi'; import { coerceNumberProperty } from '@angular/cdk/coercion'; -import { AfterViewInit, Directive, ElementRef, Input, Optional, Renderer2 } from '@angular/core'; +import { AfterViewInit, Directive, ElementRef, Input, Renderer2, inject } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { KbqTreeBase, KbqTreeNode } from './tree-base'; import { KbqTreeOption } from './tree-option.component'; @@ -13,6 +13,12 @@ const cssUnitPattern = /([A-Za-z%]+)$/; exportAs: 'kbqTreeNodePadding' }) export class KbqTreeNodePadding implements AfterViewInit { + protected treeNode = inject>(KbqTreeNode); + protected tree = inject>(KbqTreeBase); + private renderer = inject(Renderer2); + private element = inject>(ElementRef); + private option = inject(KbqTreeOption); + private dir = inject(Directionality, { optional: true })!; get level(): number { return this._level; } @@ -52,14 +58,7 @@ export class KbqTreeNodePadding implements AfterViewInit { withIcon: boolean; iconWidth: number = 24; - constructor( - protected treeNode: KbqTreeNode, - protected tree: KbqTreeBase, - private renderer: Renderer2, - private element: ElementRef, - private option: KbqTreeOption, - @Optional() private dir: Directionality - ) { + constructor() { this.dir?.change?.pipe(takeUntilDestroyed()).subscribe(() => this.setPadding()); } diff --git a/packages/components/tree/toggle.ts b/packages/components/tree/toggle.ts index d90bfe4a27..9f51c9bc8a 100644 --- a/packages/components/tree/toggle.ts +++ b/packages/components/tree/toggle.ts @@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, Component, Directive, + inject, Input, input, ViewEncapsulation @@ -14,6 +15,9 @@ import { KbqTreeBase, KbqTreeNode } from './tree-base'; /** @docs-private */ @Directive() export class KbqTreeNodeToggleBaseDirective { + private tree = inject>(KbqTreeBase); + private treeNode = inject>(KbqTreeNode); + readonly node = input(undefined!); // TODO: Skipped for migration because: @@ -48,10 +52,7 @@ export class KbqTreeNodeToggleBaseDirective { return this.tree.treeControl.isExpanded(this.node()); } - constructor( - private tree: KbqTreeBase, - private treeNode: KbqTreeNode - ) { + constructor() { this.tree.treeControl.filterValue.subscribe((value) => (this.disabled = !!value?.length)); } diff --git a/packages/components/tree/tree-base.ts b/packages/components/tree/tree-base.ts index ab9478cbb9..ce8f83ece7 100644 --- a/packages/components/tree/tree-base.ts +++ b/packages/components/tree/tree-base.ts @@ -6,7 +6,6 @@ import { DestroyRef, Directive, ElementRef, - Inject, Input, IterableChangeRecord, IterableDiffer, @@ -17,7 +16,6 @@ import { TrackByFunction, ViewChild, ViewContainerRef, - forwardRef, inject, input } from '@angular/core'; @@ -36,6 +34,9 @@ import { @Directive() export class KbqTreeBase implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit { + protected differs = inject(IterableDiffers); + protected changeDetectorRef = inject(ChangeDetectorRef); + // TODO: Skipped for migration because: // Subclass KbqTreeSelection overrides this input with a narrower type // (FlatTreeControl) via `@Input() declare`, which is incompatible @@ -98,11 +99,6 @@ export class KbqTreeBase implements AfterContentChecked, CollectionViewer, On protected readonly destroyRef = inject(DestroyRef); - constructor( - protected differs: IterableDiffers, - protected changeDetectorRef: ChangeDetectorRef - ) {} - ngOnInit() { this.dataDiffer = this.differs.find([]).create(this.trackBy()); @@ -282,6 +278,9 @@ export class KbqTreeBase implements AfterContentChecked, CollectionViewer, On exportAs: 'kbqTreeNode' }) export class KbqTreeNode implements IFocusableOption, OnDestroy { + protected elementRef = inject>(ElementRef); + tree = inject>(KbqTreeBase); + /** * The most recently created `KbqTreeNode`. We save it in static variable so we can retrieve it * in `KbqTree` and set the data to it. @@ -310,10 +309,7 @@ export class KbqTreeNode implements IFocusableOption, OnDestroy { return treeControl.getLevel ? treeControl.getLevel(this._data) : 0; } - constructor( - protected elementRef: ElementRef, - @Inject(forwardRef(() => KbqTreeBase)) public tree: KbqTreeBase - ) { + constructor() { KbqTreeNode.mostRecentTreeNode = this; } diff --git a/packages/components/tree/tree-option.component.ts b/packages/components/tree/tree-option.component.ts index bfdd3c3f93..243a7fe17e 100644 --- a/packages/components/tree/tree-option.component.ts +++ b/packages/components/tree/tree-option.component.ts @@ -6,10 +6,11 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, + ContentChild, contentChild, ElementRef, EventEmitter, - Inject, + inject, InjectionToken, Input, input, @@ -96,6 +97,10 @@ let uniqueIdCounter: number = 0; exportAs: 'kbqTreeOption' }) export class KbqTreeOption extends KbqTreeNode implements AfterContentInit, KbqTitleTextRef { + private changeDetectorRef = inject(ChangeDetectorRef); + private ngZone = inject(NgZone); + tree: any; + readonly onFocus = new Subject(); readonly onBlur = new Subject(); @@ -107,8 +112,13 @@ export class KbqTreeOption extends KbqTreeNode implements AfterCo readonly toggleElementComponent = contentChild(KbqTreeNodeToggleComponent); readonly pseudoCheckbox = contentChild(KbqPseudoCheckbox); readonly actionButton = contentChild(KbqOptionActionComponent); - readonly tooltipTrigger = contentChild(KbqTooltipTrigger); - readonly dropdownTrigger = contentChild(KbqDropdownTrigger); + + // `KbqOptionActionComponent` reads these as directive instances through KBQ_OPTION_ACTION_PARENT, + // so they must stay decorator queries. A signal `contentChild` would expose the query function + // instead of the trigger, making `dropdownTrigger.dropdownClosed` undefined and throwing on `.pipe` + // when an action button is rendered (e.g. on tree node expansion) — see #DS-5079. + @ContentChild(KbqTooltipTrigger) tooltipTrigger: KbqTooltipTrigger; + @ContentChild(KbqDropdownTrigger) dropdownTrigger: KbqDropdownTrigger; readonly checkboxThirdState = input(false); @@ -202,13 +212,12 @@ export class KbqTreeOption extends KbqTreeNode implements AfterCo checkboxState: KbqPseudoCheckboxState; - constructor( - elementRef: ElementRef, - private changeDetectorRef: ChangeDetectorRef, - private ngZone: NgZone, - @Inject(KBQ_TREE_OPTION_PARENT_COMPONENT) public tree: any - ) { - super(elementRef, tree); + constructor() { + const tree = inject(KBQ_TREE_OPTION_PARENT_COMPONENT); + + super(); + + this.tree = tree; } ngAfterContentInit(): void { diff --git a/packages/components/tree/tree-option.scss b/packages/components/tree/tree-option.scss index d36f3abb8e..424f80e9be 100644 --- a/packages/components/tree/tree-option.scss +++ b/packages/components/tree/tree-option.scss @@ -36,13 +36,6 @@ gap: var(--kbq-tree-size-container-content-gap-horizontal); - & > *[kbqtreenodetoggle], - & > .kbq-tree-node-toggle, - & > .kbq-pseudo-checkbox { - margin-top: var(--kbq-size-3xs); - align-self: flex-start; - } - & .kbq-option-text { @include common.kbq-line-wrapper-base(); display: inline-block; @@ -53,6 +46,26 @@ padding-bottom: var(--kbq-list-size-text-padding-vertical, 0); } + // Two-line options only: align leading content to the center of the FIRST line. + &:has(.kbq-option-caption) { + & > [kbq-tree-node-toggle], + & > [kbqTreeNodeToggle], + & > .kbq-tree-node-toggle, + & > .kbq-pseudo-checkbox, + & > kbq-checkbox, + & > [kbq-icon], + & > kbq-progress-spinner { + align-self: flex-start; + // (20px line-height − 16px element box) / 2 = 2px + margin-top: var(--kbq-size-3xs); + } + + & > .kbq-tree-node-toggle { + height: var(--kbq-typography-text-normal-line-height); + margin-top: 0; + } + } + &:focus { outline: none; } diff --git a/packages/components/tree/tree-selection.component.spec.ts b/packages/components/tree/tree-selection.component.spec.ts index bd43ba6eeb..1f4d1b98d5 100644 --- a/packages/components/tree/tree-selection.component.spec.ts +++ b/packages/components/tree/tree-selection.component.spec.ts @@ -1,9 +1,18 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, DebugElement, ViewChild, viewChild } from '@angular/core'; -import { ComponentFixture, TestBed, fakeAsync, flush, tick } from '@angular/core/testing'; +import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; -import { A, C, createKeyboardEvent, createMouseEvent, dispatchEvent, dispatchFakeEvent } from '@koobiq/components/core'; +import { + A, + C, + createKeyboardEvent, + createMouseEvent, + dispatchEvent, + dispatchFakeEvent, + KbqOptionModule +} from '@koobiq/components/core'; +import { KbqDropdownModule } from '@koobiq/components/dropdown'; import { AsyncScheduler } from 'rxjs/internal/scheduler/AsyncScheduler'; import { TestScheduler } from 'rxjs/testing'; import { @@ -505,6 +514,34 @@ describe('KbqTreeSelection', () => { }); }); + describe('with an action button and dropdown (#DS-5079)', () => { + beforeEach(() => { + configureKbqTreeTestingModule(); + }); + + it('renders deeper nodes as selectable options without crashing the action button', fakeAsync(() => { + const fixture = TestBed.createComponent(TreeWithActionButtonApp); + + fixture.detectChanges(); + + const component = fixture.componentInstance; + const parent = component.treeControl.dataNodes.find((node) => node.name === 'Pictures')!; + + component.treeControl.expand(parent); + fixture.detectChanges(); + tick(); + + // Before the fix, KbqOptionActionComponent.ngAfterViewInit threw — `dropdownTrigger` was a + // signal query and `dropdownClosed` an `output()` without `.pipe` — aborting the tree render, + // so nodes revealed on expand never registered in renderedOptions and could not be selected. + const renderedHasSun = component.tree.renderedOptions + .toArray() + .some((option) => option.getHostElement().textContent!.includes('Sun')); + + expect(renderedHasSun).toBe(true); + })); + }); + // todo need recover xdescribe('with when node template', () => { let fixture: ComponentFixture; @@ -1080,6 +1117,35 @@ class KbqTreeAppMultiple extends TreeParams { } } +@Component({ + imports: [ + KbqTreeModule, + KbqDropdownModule, + KbqOptionModule + ], + template: ` + + + {{ node.name }} + + + + + + {{ node.name }} + + + + + + + + ` +}) +class TreeWithActionButtonApp extends TreeParams { + @ViewChild(KbqTreeSelection) tree: KbqTreeSelection; +} + @Component({ imports: [ KbqTreeModule, diff --git a/packages/components/tree/tree-selection.component.ts b/packages/components/tree/tree-selection.component.ts index bcbd912984..df85d98b07 100644 --- a/packages/components/tree/tree-selection.component.ts +++ b/packages/components/tree/tree-selection.component.ts @@ -5,20 +5,17 @@ import { SelectionModel } from '@angular/cdk/collections'; import { AfterContentInit, AfterViewInit, - Attribute, ChangeDetectionStrategy, - ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, forwardRef, + HostAttributeToken, inject, Input, IterableDiffer, - IterableDiffers, OnDestroy, - Optional, Output, output, QueryList, @@ -135,6 +132,9 @@ export class KbqTreeSelection extends KbqTreeBase implements ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy { + private elementRef = inject>(ElementRef); + private scheduler = inject(AsyncScheduler); + private clipboard = inject(Clipboard, { optional: true })!; protected readonly focusMonitor = inject(FocusMonitor); /** Indicates whether this component is placed inside a KbqFormField component. */ @@ -258,15 +258,10 @@ export class KbqTreeSelection private optionBlurSubscription: Subscription | null; - constructor( - private elementRef: ElementRef, - private scheduler: AsyncScheduler, - differs: IterableDiffers, - changeDetectorRef: ChangeDetectorRef, - @Attribute('multiple') multiple: MultipleMode, - @Optional() private clipboard: Clipboard - ) { - super(differs, changeDetectorRef); + constructor() { + const multiple = inject(new HostAttributeToken('multiple'), { optional: true }); + + super(); if (multiple === MultipleMode.CHECKBOX || multiple === MultipleMode.KEYBOARD) { this.multipleMode = multiple; diff --git a/packages/docs-examples/components/accordion/accordion-in-panel/accordion-in-panel-example.ts b/packages/docs-examples/components/accordion/accordion-in-panel/accordion-in-panel-example.ts index 636625c891..4396df42fa 100644 --- a/packages/docs-examples/components/accordion/accordion-in-panel/accordion-in-panel-example.ts +++ b/packages/docs-examples/components/accordion/accordion-in-panel/accordion-in-panel-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, inject } from '@angular/core'; import { KbqAccordionModule } from '@koobiq/components/accordion'; import { KbqButtonModule } from '@koobiq/components/button'; import { @@ -18,13 +18,13 @@ import { changeDetection: ChangeDetectionStrategy.OnPush }) export class AccordionInPanelExample { + private sidepanelService = inject(KbqSidepanelService); + position: KbqSidepanelPosition = KbqSidepanelPosition.Right; size: KbqSidepanelSize = KbqSidepanelSize.Medium; @ViewChild('template', { static: false }) template: TemplateRef; - constructor(private sidepanelService: KbqSidepanelService) {} - openPanel() { this.sidepanelService.open(this.template, { position: this.position, diff --git a/packages/docs-examples/components/checkbox/checkbox-indeterminate/checkbox-indeterminate-example.ts b/packages/docs-examples/components/checkbox/checkbox-indeterminate/checkbox-indeterminate-example.ts index ed69316390..3acb02679b 100644 --- a/packages/docs-examples/components/checkbox/checkbox-indeterminate/checkbox-indeterminate-example.ts +++ b/packages/docs-examples/components/checkbox/checkbox-indeterminate/checkbox-indeterminate-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core'; import { KbqCheckboxModule } from '@koobiq/components/checkbox'; interface ICheckbox { @@ -31,6 +31,8 @@ interface ICheckbox { changeDetection: ChangeDetectionStrategy.OnPush }) export class CheckboxIndeterminateExample { + private ref = inject(ChangeDetectorRef); + parentIndeterminate = true; parentChecked = true; @@ -40,8 +42,6 @@ export class CheckboxIndeterminateExample { { name: 'Grapes', checked: false } ]; - constructor(private ref: ChangeDetectorRef) {} - updateCheckboxes(index: number) { this.toggleFruitChecked(index); this.updateIndeterminate(); diff --git a/packages/docs-examples/components/datepicker/datepicker-inactive/datepicker-inactive-example.ts b/packages/docs-examples/components/datepicker/datepicker-inactive/datepicker-inactive-example.ts index 5167a7f666..dcbcfc5c55 100644 --- a/packages/docs-examples/components/datepicker/datepicker-inactive/datepicker-inactive-example.ts +++ b/packages/docs-examples/components/datepicker/datepicker-inactive/datepicker-inactive-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter, KbqFormsModule } from '@koobiq/components/core'; @@ -46,9 +46,11 @@ import { DateTime } from 'luxon'; changeDetection: ChangeDetectionStrategy.OnPush }) export class DatepickerInactiveExample { + private adapter = inject>(DateAdapter); + selectedDate: DateTime; - constructor(private adapter: DateAdapter) { + constructor() { this.selectedDate = this.adapter.createDate(1989, 11, 13); } } diff --git a/packages/docs-examples/components/datepicker/datepicker-minimax/datepicker-minimax-example.ts b/packages/docs-examples/components/datepicker/datepicker-minimax/datepicker-minimax-example.ts index 92eaa22cf0..80d23d0862 100644 --- a/packages/docs-examples/components/datepicker/datepicker-minimax/datepicker-minimax-example.ts +++ b/packages/docs-examples/components/datepicker/datepicker-minimax/datepicker-minimax-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter, KbqFormsModule } from '@koobiq/components/core'; @@ -49,8 +49,8 @@ import { DateTime } from 'luxon'; changeDetection: ChangeDetectionStrategy.OnPush }) export class DatepickerMinimaxExample { + private adapter = inject>(DateAdapter); + readonly minDate = this.adapter.createDate(2023, 11, 14); readonly maxDate = this.adapter.createDate(2024, 7, 25); - - constructor(private adapter: DateAdapter) {} } diff --git a/packages/docs-examples/components/datepicker/datepicker-range/datepicker-range-example.ts b/packages/docs-examples/components/datepicker/datepicker-range/datepicker-range-example.ts index c745e7c15a..34746dd8cc 100644 --- a/packages/docs-examples/components/datepicker/datepicker-range/datepicker-range-example.ts +++ b/packages/docs-examples/components/datepicker/datepicker-range/datepicker-range-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter, KbqFormsModule } from '@koobiq/components/core'; import { KbqDatepickerModule } from '@koobiq/components/datepicker'; @@ -43,8 +43,8 @@ import { DateTime } from 'luxon'; changeDetection: ChangeDetectionStrategy.OnPush }) export class DatepickerRangeExample { + private adapter = inject>(DateAdapter); + readonly minDate = this.adapter.createDate(2023, 11, 14); readonly maxDate = this.adapter.createDate(2024, 7, 25); - - constructor(private adapter: DateAdapter) {} } diff --git a/packages/docs-examples/components/dropdown/dropdown-recursive-template/dropdown-recursive-template-example.ts b/packages/docs-examples/components/dropdown/dropdown-recursive-template/dropdown-recursive-template-example.ts index c076c7d538..b4cf331381 100644 --- a/packages/docs-examples/components/dropdown/dropdown-recursive-template/dropdown-recursive-template-example.ts +++ b/packages/docs-examples/components/dropdown/dropdown-recursive-template/dropdown-recursive-template-example.ts @@ -6,6 +6,7 @@ import { OnInit, TemplateRef, ViewContainerRef, + inject, input } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; @@ -21,11 +22,11 @@ type DropdownItem = { selector: '[exampleDropdownOutlet]' }) export class ExampleDropdownPortal implements OnInit { + private viewContainerRef = inject(ViewContainerRef); + readonly context = input({}, { alias: 'exampleDropdownOutletContext' }); readonly template = input>(undefined!, { alias: 'exampleDropdownOutlet' }); - constructor(private viewContainerRef: ViewContainerRef) {} - ngOnInit() { this.viewContainerRef.createEmbeddedView(this.template(), this.context(), { injector: Injector.create({ diff --git a/packages/docs-examples/components/sidepanel/sidepanel-normal-mode/sidepanel-normal-mode-example.ts b/packages/docs-examples/components/sidepanel/sidepanel-normal-mode/sidepanel-normal-mode-example.ts index a4bd3d826c..01329c076c 100644 --- a/packages/docs-examples/components/sidepanel/sidepanel-normal-mode/sidepanel-normal-mode-example.ts +++ b/packages/docs-examples/components/sidepanel/sidepanel-normal-mode/sidepanel-normal-mode-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, inject } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { KbqSelectModule } from '@koobiq/components/select'; import { KbqSidepanelModule, KbqSidepanelPosition, KbqSidepanelService } from '@koobiq/components/sidepanel'; @@ -14,6 +14,8 @@ import { take } from 'rxjs/operators'; changeDetection: ChangeDetectionStrategy.OnPush }) export class SidepanelNormalModeExample { + private sidepanelService = inject(KbqSidepanelService); + position = KbqSidepanelPosition.Right; isOpened = false; @@ -22,7 +24,6 @@ export class SidepanelNormalModeExample { arrayLength = 40; array = new Array(this.arrayLength); - constructor(private sidepanelService: KbqSidepanelService) {} toggleSidepanel() { if (!this.isOpened) { diff --git a/packages/docs-examples/components/sidepanel/sidepanel-overview/sidepanel-overview-example.ts b/packages/docs-examples/components/sidepanel/sidepanel-overview/sidepanel-overview-example.ts index 7a512dac63..69ee8a6893 100644 --- a/packages/docs-examples/components/sidepanel/sidepanel-overview/sidepanel-overview-example.ts +++ b/packages/docs-examples/components/sidepanel/sidepanel-overview/sidepanel-overview-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, inject } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { KbqSelectModule } from '@koobiq/components/select'; import { KbqSidepanelModule, KbqSidepanelPosition, KbqSidepanelService } from '@koobiq/components/sidepanel'; @@ -13,13 +13,14 @@ import { KbqSidepanelModule, KbqSidepanelPosition, KbqSidepanelService } from '@ changeDetection: ChangeDetectionStrategy.OnPush }) export class SidepanelOverviewExample { + private sidepanelService = inject(KbqSidepanelService); + position = KbqSidepanelPosition.Right; @ViewChild(TemplateRef, { static: false }) template: TemplateRef; arrayLength = 40; array = new Array(this.arrayLength); - constructor(private sidepanelService: KbqSidepanelService) {} openSidepanel() { this.sidepanelService.open(this.template, { diff --git a/packages/docs-examples/components/sidepanel/sidepanel-sizes/sidepanel-sizes-example.ts b/packages/docs-examples/components/sidepanel/sidepanel-sizes/sidepanel-sizes-example.ts index f692cba114..96cc6f215b 100644 --- a/packages/docs-examples/components/sidepanel/sidepanel-sizes/sidepanel-sizes-example.ts +++ b/packages/docs-examples/components/sidepanel/sidepanel-sizes/sidepanel-sizes-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, inject } from '@angular/core'; import { KbqButtonModule } from '@koobiq/components/button'; import { KbqSidepanelModule, @@ -20,13 +20,14 @@ import { changeDetection: ChangeDetectionStrategy.OnPush }) export class SidepanelSizesExample { + private sidepanelService = inject(KbqSidepanelService); + size = KbqSidepanelPosition.Right; @ViewChild(TemplateRef, { static: false }) template: TemplateRef; arrayLength = 40; array = new Array(this.arrayLength); - constructor(private sidepanelService: KbqSidepanelService) {} showSmall() { this.sidepanelService.open(this.template, { diff --git a/packages/docs-examples/components/timepicker/timepicker-overview/timepicker-overview-example.ts b/packages/docs-examples/components/timepicker/timepicker-overview/timepicker-overview-example.ts index 7e9380d32b..382fb098d6 100644 --- a/packages/docs-examples/components/timepicker/timepicker-overview/timepicker-overview-example.ts +++ b/packages/docs-examples/components/timepicker/timepicker-overview/timepicker-overview-example.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter } from '@koobiq/components/core'; @@ -24,11 +24,13 @@ import { DateTime } from 'luxon'; changeDetection: ChangeDetectionStrategy.OnPush }) export class TimepickerOverviewExample { + private adapter = inject>(DateAdapter); + timeFormats = TimeFormats; time: DateTime; - constructor(private adapter: DateAdapter) { + constructor() { this.time = this.adapter.today().startOf('hour'); } } diff --git a/packages/docs-examples/components/timepicker/timepicker-variations/timepicker-variations-example.ts b/packages/docs-examples/components/timepicker/timepicker-variations/timepicker-variations-example.ts index f8f1c52a2d..df81924173 100644 --- a/packages/docs-examples/components/timepicker/timepicker-variations/timepicker-variations-example.ts +++ b/packages/docs-examples/components/timepicker/timepicker-variations/timepicker-variations-example.ts @@ -1,5 +1,5 @@ import { LowerCasePipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { LuxonDateModule } from '@koobiq/angular-luxon-adapter/adapter'; import { DateAdapter } from '@koobiq/components/core'; @@ -28,12 +28,14 @@ import { DateTime } from 'luxon'; changeDetection: ChangeDetectionStrategy.OnPush }) export class TimepickerVariationsExample { + private adapter = inject>(DateAdapter); + value: DateTime; timeFormat = TimeFormats.HHmm; protected readonly TimeFormats = TimeFormats; - constructor(private adapter: DateAdapter) { + constructor() { this.value = this.adapter.today(); } } diff --git a/packages/docs-examples/components/tree-select/tree-select-lazyload/tree-select-lazyload-example.ts b/packages/docs-examples/components/tree-select/tree-select-lazyload/tree-select-lazyload-example.ts index e16ffdadd2..ce3d30b596 100644 --- a/packages/docs-examples/components/tree-select/tree-select-lazyload/tree-select-lazyload-example.ts +++ b/packages/docs-examples/components/tree-select/tree-select-lazyload/tree-select-lazyload-example.ts @@ -1,5 +1,5 @@ import { SelectionChange } from '@angular/cdk/collections'; -import { ChangeDetectionStrategy, Component, Injectable } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Injectable, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { KbqIconModule } from '@koobiq/components/icon'; import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner'; @@ -202,6 +202,8 @@ export class LazyLoadDataSource extends KbqTreeFlatDataSource { changeDetection: ChangeDetectionStrategy.OnPush }) export class TreeSelectLazyloadExample { + private dataService = inject(LazyLoadDataService); + selected = ''; treeControl: FlatTreeControl; treeFlattener: KbqTreeFlattener; @@ -210,7 +212,7 @@ export class TreeSelectLazyloadExample { nodeMap = new Map(); - constructor(private dataService: LazyLoadDataService) { + constructor() { this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren); this.treeControl = new FlatTreeControl( diff --git a/packages/docs-examples/components/tree/tree-action-button/tree-action-button-example.ts b/packages/docs-examples/components/tree/tree-action-button/tree-action-button-example.ts index a37339f440..2df715691f 100644 --- a/packages/docs-examples/components/tree/tree-action-button/tree-action-button-example.ts +++ b/packages/docs-examples/components/tree/tree-action-button/tree-action-button-example.ts @@ -125,7 +125,7 @@ export const DATA_OBJECT = { -
+
badge
@@ -142,7 +142,7 @@ export const DATA_OBJECT = { -
+
badge
diff --git a/packages/docs-examples/components/tree/tree-lazyload/tree-lazyload-example.ts b/packages/docs-examples/components/tree/tree-lazyload/tree-lazyload-example.ts index 5b4a3963a3..de2a88caff 100644 --- a/packages/docs-examples/components/tree/tree-lazyload/tree-lazyload-example.ts +++ b/packages/docs-examples/components/tree/tree-lazyload/tree-lazyload-example.ts @@ -1,5 +1,5 @@ import { SelectionChange } from '@angular/cdk/collections'; -import { ChangeDetectionStrategy, Component, Injectable } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Injectable, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner'; import { FlatTreeControl, KbqTreeFlatDataSource, KbqTreeFlattener, KbqTreeModule } from '@koobiq/components/tree'; @@ -191,6 +191,8 @@ class LazyLoadDataSource extends KbqTreeFlatDataSource { changeDetection: ChangeDetectionStrategy.OnPush }) export class TreeLazyloadExample { + private dataService = inject(LazyLoadDataService); + treeControl: FlatTreeControl; treeFlattener: KbqTreeFlattener; @@ -200,7 +202,7 @@ export class TreeLazyloadExample { nodeMap = new Map(); - constructor(private dataService: LazyLoadDataService) { + constructor() { this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren); this.treeControl = new FlatTreeControl( diff --git a/packages/schematics/src/migrations/v20-upgrade/README.md b/packages/schematics/src/migrations/v20-upgrade/README.md index 3cb8196572..cb5006cd61 100644 --- a/packages/schematics/src/migrations/v20-upgrade/README.md +++ b/packages/schematics/src/migrations/v20-upgrade/README.md @@ -19,15 +19,19 @@ from three ordered tables in `data.ts`: removals (`KBQ_VALIDATION`, `KBQ_SANITY_CHECKS`, `KBQ_SIDEPANEL_WITH_SHADOW`), function renames (`toBoolean(` → `booleanAttribute(`, `isCorrectExtension(` → `FileValidators.isCorrectExtension(`, `formatDataSize(` → `getFormattedSizeParts(`), - and method renames on instances (`.openPanel(` → `.open(`, `.toggleIsCollapsed(` → - `.toggle(`, `.focusViaKeyboard(` → `.focus(`). + method renames on instances (`.openPanel(` → `.open(`, `.toggleIsCollapsed(` → + `.toggle(`, `.focusViaKeyboard(` → `.focus(`), and deprecated type-alias + renames (`DropdownPositionX` → `KbqDropdownPositionX`, `DropdownPositionY` → + `KbqDropdownPositionY`). - **`templateReplacements`** — selectors and attributes in Angular templates (both external `.html` files and inline `template:` strings inside `.ts`): `` → ``, `` → ``, `` → ``, `` → ``, `[kbqWarningTooltip]` → `kbqTooltipModifier="warning" [kbqTooltip]`, `kbqFormFieldWithoutBorders` → - `noBorders`, and template-ref exportAs renames + `noBorders`, the deprecated `KbqCodeBlock` input attributes + (`[canLoad]` / `canLoad=` → `canDownload`, `[codeFiles]` / `codeFiles=` → + `files`), and template-ref exportAs renames (`="kbqWarningTooltip"` → `="kbqTooltip"`). - **`scssReplacements`** — CSS class selectors renamed at the component level. @@ -36,12 +40,15 @@ from three ordered tables in `data.ts`: Some changes require code restructuring and are surfaced as console warnings without auto-fixing: -| Pattern | Manual migration | -| ------------------------ | --------------------------------------------------------------------------------------- | -| `(onSaveAsNew)` | Listen to `(onSave)` and branch on `$event.status === 'newFilter'` | -| `[customValidation]` | Use `FormControl` validators (e.g. `FileValidators.isCorrectExtension`) | -| `[errors]` (file-upload) | Use `FormControl.errors` | -| `[apps]` (app-switcher) | Wrap in single-site `[sites]="[{ id, name, apps }]"` and read with `KbqAppSwitcherSite` | +| Pattern | Manual migration | +| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `(onSaveAsNew)` | Listen to `(onSave)` and branch on `$event.status === 'newFilter'` | +| `[customValidation]` | Use `FormControl` validators (e.g. `FileValidators.isCorrectExtension`) | +| `[errors]` (file-upload) | Use `FormControl.errors` | +| `[apps]` (app-switcher) | Wrap in single-site `[sites]="[{ id, name, apps }]"` and read with `KbqAppSwitcherSite` | +| `scrollableCodeContent` (code-block) | Use the `scrollTo()` method instead | +| `.canLoad` / `.codeFiles` (code-block, TS access) | Template bindings are auto-migrated; update programmatic access to `.canDownload` / `.files` manually | +| `required` (KbqFilter) | Use `cleanable = false` and `removable = false` (best-effort match — verify it is a KbqFilter config) | ## Running it manually diff --git a/packages/schematics/src/migrations/v20-upgrade/data.ts b/packages/schematics/src/migrations/v20-upgrade/data.ts index 8709a88d47..e84c40d1de 100644 --- a/packages/schematics/src/migrations/v20-upgrade/data.ts +++ b/packages/schematics/src/migrations/v20-upgrade/data.ts @@ -103,6 +103,12 @@ export const tsReplacements: Replacement[] = [ }, { from: '\\bKbqFormFieldRef\\b', to: 'KbqFormField' }, + // Deprecated dropdown position type aliases → Kbq-prefixed names. The + // `\b…\b` boundaries make these idempotent: `KbqDropdownPositionX` is not + // re-matched because the `D` is preceded by a word char (`q`). + { from: '\\bDropdownPositionX\\b', to: 'KbqDropdownPositionX' }, + { from: '\\bDropdownPositionY\\b', to: 'KbqDropdownPositionY' }, + // ─── Tokens / function renames ──────────────────────────────────────── { from: '\\bKBQ_VALIDATION\\b', @@ -218,6 +224,14 @@ export const templateReplacements: Replacement[] = [ // ─── Attribute renames ──────────────────────────────────────────────── { from: '\\bkbqFormFieldWithoutBorders\\b', to: 'noBorders' }, + // ─── KbqCodeBlock deprecated input renames ──────────────────────────── + // Scoped strictly to the attribute form (`[x]` binding or `x="…"` static) + // so the common words `canDownload` / `files` elsewhere are never touched. + { from: '\\[canLoad\\]', to: '[canDownload]' }, + { from: '\\bcanLoad="', to: 'canDownload="' }, + { from: '\\[codeFiles\\]', to: '[files]' }, + { from: '\\bcodeFiles="', to: 'files="' }, + // ─── Tooltip warning trigger → kbqTooltip + modifier ─────────────────── // Two-step: first add modifier attribute, then rename binding key. // The modifier insertion must come before the binding rename otherwise we @@ -287,5 +301,22 @@ export const warnPatterns: WarnPattern[] = [ 'kbqComponentParams is being rewritten to "data:" — remember the CHILD modal ' + "component must read the payload via inject(KBQ_MODAL_DATA) (from '@koobiq/components/modal') " + 'instead of @Input.' + }, + { + pattern: '\\bscrollableCodeContent\\b', + message: + 'KbqCodeBlock.scrollableCodeContent is deprecated; use the scrollTo() method instead. Manual migration required.' + }, + { + pattern: '\\.canLoad\\b|\\.codeFiles\\b', + message: + 'KbqCodeBlock.canLoad → canDownload and .codeFiles → files. Template bindings are auto-migrated; ' + + 'update any programmatic (TypeScript) access manually.' + }, + { + pattern: '\\brequired:\\s*(true|false)', + message: + 'KbqFilter.required is deprecated — use cleanable = false and removable = false instead. ' + + 'NOTE: this warning is best-effort and may match unrelated `required:` keys; verify it is a KbqFilter config.' } ]; diff --git a/packages/schematics/src/migrations/v20-upgrade/index.spec.ts b/packages/schematics/src/migrations/v20-upgrade/index.spec.ts index 1d6b595af7..85207d70ac 100644 --- a/packages/schematics/src/migrations/v20-upgrade/index.spec.ts +++ b/packages/schematics/src/migrations/v20-upgrade/index.spec.ts @@ -322,6 +322,108 @@ describe(SCHEMATIC_NAME, () => { expect(updated).not.toContain('.kbq-risk-level'); }); + it('rewrites DropdownPositionX / DropdownPositionY type aliases to the Kbq-prefixed names', async () => { + const [first] = projects.keys(); + const { ts } = paths(projects.get(first)!); + + appTree.overwrite( + ts, + "import { DropdownPositionX, DropdownPositionY } from '@koobiq/components/dropdown';\n" + + "const x: DropdownPositionX = 'before';\n" + + "const y: DropdownPositionY = 'below';\n" + ); + + const result = await runner.runSchematic( + SCHEMATIC_NAME, + { project: first, fix: true } satisfies Schema, + appTree + ); + + const updated = result.readText(ts); + + expect(updated).toContain('KbqDropdownPositionX'); + expect(updated).toContain('KbqDropdownPositionY'); + // Old (un-prefixed) names are gone; `\b` boundaries leave the new + // `Kbq…` names intact (no double-rewrite). + expect(updated).not.toMatch(/\bDropdownPositionX\b/); + expect(updated).not.toMatch(/\bDropdownPositionY\b/); + }); + + it('rewrites KbqCodeBlock [canLoad]/[codeFiles] bindings to [canDownload]/[files]', async () => { + const [first] = projects.keys(); + const { html } = paths(projects.get(first)!); + + appTree.overwrite(html, '\n'); + + const result = await runner.runSchematic( + SCHEMATIC_NAME, + { project: first, fix: true } satisfies Schema, + appTree + ); + + const updated = result.readText(html); + + expect(updated).toContain('[canDownload]="x"'); + expect(updated).toContain('[files]="files"'); + expect(updated).not.toContain('[canLoad]'); + expect(updated).not.toContain('[codeFiles]'); + }); + + it('rewrites the static canLoad="true" attribute form to canDownload', async () => { + const [first] = projects.keys(); + const { html } = paths(projects.get(first)!); + + appTree.overwrite(html, '\n'); + + const result = await runner.runSchematic( + SCHEMATIC_NAME, + { project: first, fix: true } satisfies Schema, + appTree + ); + + expect(result.readText(html)).toContain('canDownload="true"'); + }); + + it('warns about KbqCodeBlock.scrollableCodeContent (use scrollTo())', async () => { + const [first] = projects.keys(); + const { ts } = paths(projects.get(first)!); + + appTree.overwrite(ts, 'const el = cb.scrollableCodeContent();\n'); + + const messages: string[] = []; + + runner.logger.subscribe((entry) => { + if (entry.message) messages.push(entry.message); + }); + + await runner.runSchematic(SCHEMATIC_NAME, { project: first, fix: true } satisfies Schema, appTree); + + expect(messages.some((m) => m.includes('scrollableCodeContent'))).toBe(true); + }); + + it('warns about deprecated KbqFilter.required without auto-fixing it', async () => { + const [first] = projects.keys(); + const { ts } = paths(projects.get(first)!); + const original = "const f = { name: 'x', required: true, cleanable: true };\n"; + + appTree.overwrite(ts, original); + + const messages: string[] = []; + + runner.logger.subscribe((entry) => { + if (entry.message) messages.push(entry.message); + }); + + const result = await runner.runSchematic( + SCHEMATIC_NAME, + { project: first, fix: true } satisfies Schema, + appTree + ); + + expect(result.readText(ts)).toContain('required: true'); // not auto-fixed + expect(messages.some((m) => m.includes('required'))).toBe(true); + }); + it('warns about (onSaveAsNew) without auto-fixing', async () => { const [first] = projects.keys(); const { html } = paths(projects.get(first)!); diff --git a/tools/public_api_guard/components/autocomplete.api.md b/tools/public_api_guard/components/autocomplete.api.md index 46994fa50f..3dde9cf495 100644 --- a/tools/public_api_guard/components/autocomplete.api.md +++ b/tools/public_api_guard/components/autocomplete.api.md @@ -7,20 +7,16 @@ import { ActiveDescendantKeyManager } from '@koobiq/components/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; -import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i1 from '@koobiq/components/core'; import * as i2 from '@angular/cdk/overlay'; import { InjectionToken } from '@angular/core'; -import { KbqFormField } from '@koobiq/components/form-field'; import { KbqOptgroup } from '@koobiq/components/core'; import { KbqOption } from '@koobiq/components/core'; import { KbqOptionSelectionChange } from '@koobiq/components/core'; import { KeyboardNavigationHandler } from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { Overlay } from '@angular/cdk/overlay'; @@ -28,8 +24,6 @@ import { Provider } from '@angular/core'; import { QueryList } from '@angular/core'; import { ScrollStrategy } from '@angular/cdk/overlay'; import { TemplateRef } from '@angular/core'; -import { ViewContainerRef } from '@angular/core'; -import { ViewportRuler } from '@angular/cdk/scrolling'; // @public export const AUTOCOMPLETE_PANEL_HEIGHT = 256; @@ -61,7 +55,7 @@ export const KBQ_AUTOCOMPLETE_VALUE_ACCESSOR: Provider; // @public (undocumented) export class KbqAutocomplete implements AfterContentInit { - constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, defaults: KbqAutocompleteDefaultOptions, parentFormField: KbqFormField); + constructor(); get autoActiveFirstOption(): boolean; set autoActiveFirstOption(value: boolean); get classList(): string; @@ -106,7 +100,7 @@ export class KbqAutocomplete implements AfterContentInit { // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public @@ -134,7 +128,6 @@ export class KbqAutocompleteModule { // @public export class KbqAutocompleteOrigin { - constructor(elementRef: ElementRef); // (undocumented) elementRef: ElementRef; // (undocumented) @@ -154,7 +147,7 @@ export class KbqAutocompleteSelectedEvent { // @public (undocumented) export class KbqAutocompleteTrigger implements AfterViewInit, ControlValueAccessor, OnDestroy, KeyboardNavigationHandler { - constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, changeDetectorRef: ChangeDetectorRef, overlay: Overlay, zone: NgZone, scrollStrategy: any, dir: Directionality, formField: KbqFormField, viewportRuler?: ViewportRuler | undefined); + constructor(); get activeOption(): KbqOption | null; readonly autocomplete: i0.InputSignal; readonly autocompleteAttribute: i0.InputSignal; @@ -200,7 +193,7 @@ export class KbqAutocompleteTrigger implements AfterViewInit, ControlValueAccess // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // (No @packageDocumentation comment for this package) diff --git a/tools/public_api_guard/components/badge.api.md b/tools/public_api_guard/components/badge.api.md index 57c07aa46a..60f9b806f9 100644 --- a/tools/public_api_guard/components/badge.api.md +++ b/tools/public_api_guard/components/badge.api.md @@ -5,13 +5,10 @@ ```ts import { AfterContentInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; -import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; import * as i2 from '@angular/cdk/platform'; import { KbqIconItem } from '@koobiq/components/icon'; -import { Renderer2 } from '@angular/core'; // @public (undocumented) export const badgeLeftIconClassName = "kbq-badge-icon_left"; @@ -72,7 +69,7 @@ export enum KbqBadgeColors { // @public (undocumented) export class KbqBadgeCssStyler implements AfterContentInit { - constructor(elementRef: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef); + constructor(); // (undocumented) readonly icons: i0.Signal; // (undocumented) @@ -86,7 +83,7 @@ export class KbqBadgeCssStyler implements AfterContentInit { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/button-toggle.api.md b/tools/public_api_guard/components/button-toggle.api.md index ae647e81e5..48f161360b 100644 --- a/tools/public_api_guard/components/button-toggle.api.md +++ b/tools/public_api_guard/components/button-toggle.api.md @@ -7,10 +7,7 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import * as _angular_core from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; -import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i1 from '@koobiq/components/button'; import * as i2 from '@koobiq/components/title'; import { KbqButton } from '@koobiq/components/button'; @@ -23,7 +20,6 @@ export const KBQ_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any; // @public export class KbqButtonToggle implements OnInit, AfterContentInit, AfterViewInit, OnDestroy { - constructor(buttonToggleGroup: KbqButtonToggleGroup, changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor, element: ElementRef); // (undocumented) buttonToggleGroup: KbqButtonToggleGroup; readonly change: _angular_core.OutputEmitterRef; @@ -56,7 +52,7 @@ export class KbqButtonToggle implements OnInit, AfterContentInit, AfterViewInit, // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: _angular_core.ɵɵFactoryDeclaration; } // @public @@ -70,7 +66,6 @@ export class KbqButtonToggleChange { // @public export class KbqButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit { - constructor(_changeDetector: ChangeDetectorRef); readonly buttonToggles: _angular_core.Signal; readonly change: _angular_core.OutputEmitterRef; controlValueAccessorChangeFn: (value: any) => void; diff --git a/tools/public_api_guard/components/button.api.md b/tools/public_api_guard/components/button.api.md index 0cd7df8d00..7f88bb47df 100644 --- a/tools/public_api_guard/components/button.api.md +++ b/tools/public_api_guard/components/button.api.md @@ -6,9 +6,7 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; import * as i2 from '@angular/cdk/platform'; @@ -19,7 +17,6 @@ import { KbqDropdownTrigger } from '@koobiq/components/dropdown'; import { KbqOrientation } from '@koobiq/components/core'; import { KbqTitleTextRef } from '@koobiq/components/core'; import { OnDestroy } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { ThemePalette } from '@koobiq/components/core'; // @public (undocumented) @@ -30,7 +27,7 @@ export const buttonRightIconClassName = "kbq-button-icon_right"; // @public (undocumented) export class KbqButton extends KbqColorDirective implements OnDestroy, AfterViewInit, KbqTitleTextRef { - constructor(focusMonitor: FocusMonitor, styler: KbqButtonCssStyler); + constructor(); get disabled(): boolean; set disabled(value: boolean); readonly disabledSignal: i0.WritableSignal; @@ -74,7 +71,7 @@ export class KbqButton extends KbqColorDirective implements OnDestroy, AfterView // @public (undocumented) export class KbqButtonCssStyler implements AfterContentInit { - constructor(elementRef: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef); + constructor(); // (undocumented) readonly icons: i0.Signal; // (undocumented) @@ -88,7 +85,7 @@ export class KbqButtonCssStyler implements AfterContentInit { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public diff --git a/tools/public_api_guard/components/checkbox.api.md b/tools/public_api_guard/components/checkbox.api.md index 81cdfeb43b..3af8abd98f 100644 --- a/tools/public_api_guard/components/checkbox.api.md +++ b/tools/public_api_guard/components/checkbox.api.md @@ -6,11 +6,9 @@ import { AfterViewInit } from '@angular/core'; import * as _angular_core from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { CheckboxRequiredValidator } from '@angular/forms'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import { InjectionToken } from '@angular/core'; import { KbqCheckedState } from '@koobiq/components/core'; import { KbqColorDirective } from '@koobiq/components/core'; @@ -28,7 +26,7 @@ export const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider; // @public export class KbqCheckbox extends KbqColorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy { - constructor(changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor); + constructor(); // (undocumented) readonly big: _angular_core.InputSignal; readonly change: _angular_core.OutputEmitterRef; diff --git a/tools/public_api_guard/components/core.api.md b/tools/public_api_guard/components/core.api.md index e06d90fcaa..80f4c0065c 100644 --- a/tools/public_api_guard/components/core.api.md +++ b/tools/public_api_guard/components/core.api.md @@ -280,11 +280,11 @@ export abstract class DateAdapter extends DateAdapter_2 { // @public (undocumented) export class DateFormatter extends DateFormatter_2 { - constructor(adapter: DateAdapter_2, locale: string); + constructor(); // (undocumented) readonly adapter: DateAdapter_2; // (undocumented) - protected localeService: KbqLocaleService | null; + protected localeService: KbqLocaleService; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration, never>; // (undocumented) @@ -2373,13 +2373,13 @@ export type KbqDateFormats = DateFormats; // @public (undocumented) export class KbqDecimalPipe implements KbqNumericPipe, PipeTransform { - constructor(id: string, localeService: KbqLocaleService, options: ParsedDigitsInfo); + constructor(); // (undocumented) isSpecialFormatForRULocale(locale: string, value: number, grouping?: boolean): boolean; // (undocumented) transform(value: any, digitsInfo?: string, locale?: string): string | null; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) static ɵpipe: i0.ɵɵPipeDeclaration; // (undocumented) @@ -2461,7 +2461,6 @@ export class KbqFormattersModule { // @public (undocumented) export class KbqFormElement implements AfterContentInit { - constructor(element: ElementRef); // (undocumented) readonly elements: i0.Signal; // (undocumented) @@ -2553,7 +2552,7 @@ export class KbqLineSetter { // @public (undocumented) export class KbqLocaleService { - constructor(id: string, localeData: any); + constructor(); // (undocumented) addLocale(id: string, localeData: any): void; // (undocumented) @@ -2569,7 +2568,7 @@ export class KbqLocaleService { // (undocumented) setLocale(id: string): void; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) static ɵprov: i0.ɵɵInjectableDeclaration; } @@ -2669,7 +2668,6 @@ export class KbqOptgroup { // @public export class KbqOption extends KbqOptionBase implements AfterViewChecked, OnDestroy, KbqTitleTextRef { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, parent: KbqOptionParentComponent, group: KbqOptgroup); get active(): boolean; // (undocumented) deselect(emitEvent?: boolean): void; @@ -2722,7 +2720,7 @@ export class KbqOption extends KbqOptionBase implements AfterViewChecked, OnDest // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -3225,7 +3223,7 @@ export class KbqRelativeShortDateTimePipe extends BaseLocaleAwareFormatterPip // @public (undocumented) export class KbqRoundDecimalPipe implements PipeTransform { - constructor(id: string, localeService: KbqLocaleService); + constructor(); // Warning: (ae-forgotten-export) The symbol "RoundDecimalOptions" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -3233,7 +3231,7 @@ export class KbqRoundDecimalPipe implements PipeTransform { // (undocumented) transform(value: any, locale?: string): any; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) static ɵpipe: i0.ɵɵPipeDeclaration; // (undocumented) @@ -3269,7 +3267,7 @@ export function kbqSelectScrollStrategyProviderFactory(overlay: Overlay): () => // @public (undocumented) export class KbqSelectSearch implements AfterContentInit, OnDestroy { - constructor(formField: KbqFormFieldRef); + constructor(); // (undocumented) readonly changes: EventEmitter; // (undocumented) @@ -3297,7 +3295,7 @@ export class KbqSelectSearch implements AfterContentInit, OnDestroy { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -3332,11 +3330,11 @@ export type KbqStickToWindowPlacementValues = KbqEnumValues; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) static ɵpipe: i0.ɵɵPipeDeclaration; // (undocumented) diff --git a/tools/public_api_guard/components/datepicker.api.md b/tools/public_api_guard/components/datepicker.api.md index 855175a5c0..adc2124152 100644 --- a/tools/public_api_guard/components/datepicker.api.md +++ b/tools/public_api_guard/components/datepicker.api.md @@ -9,10 +9,8 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import * as _angular_core from '@angular/core'; import { AnimationTriggerMetadata } from '@angular/animations'; -import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { DateAdapter } from '@koobiq/components/core'; -import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@koobiq/components/core'; @@ -26,23 +24,19 @@ import * as i5 from '@koobiq/components/select'; import * as i6 from '@koobiq/components/icon'; import * as i8 from '@angular/common'; import { InjectionToken } from '@angular/core'; -import { KbqDateFormats } from '@koobiq/components/core'; import { KbqFormField } from '@koobiq/components/form-field'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import * as _koobiq_components_core from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { Overlay } from '@angular/cdk/overlay'; import { OverlayRef } from '@angular/cdk/overlay'; -import { Renderer2 } from '@angular/core'; import { ScrollStrategy } from '@angular/cdk/overlay'; import { SimpleChanges } from '@angular/core'; import { Subject } from 'rxjs'; import { ValidationErrors } from '@angular/forms'; import { Validator } from '@angular/forms'; -import { ViewContainerRef } from '@angular/core'; // @public export const KBQ_DATEPICKER_CONFIGURATION: InjectionToken; @@ -74,7 +68,7 @@ export const KBQ_DATEPICKER_VALUE_ACCESSOR: any; // @public export class KbqCalendar implements AfterContentInit, OnDestroy, OnChanges { - constructor(intl: KbqDatepickerIntl, adapter: DateAdapter, changeDetectorRef: ChangeDetectorRef); + constructor(); get activeDate(): D; set activeDate(value: D | null); readonly dateClass: _angular_core.InputSignal<(date: D) => KbqCalendarCellCssClasses>; @@ -108,7 +102,7 @@ export class KbqCalendar implements AfterContentInit, OnDestroy, OnChanges { // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration, "kbq-calendar", ["kbqCalendar"], { "startAt": { "alias": "startAt"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "userSelection": "userSelection"; }, never, never, true, never>; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration, [null, { optional: true; }, null]>; + static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; } // @public @@ -156,7 +150,7 @@ export type KbqCalendarCellCssClasses = string | string[] | Set | { // @public export class KbqCalendarHeader implements AfterContentInit { - constructor(adapter: DateAdapter); + constructor(); // (undocumented) get activeDate(): D; set activeDate(value: D); @@ -201,7 +195,7 @@ export class KbqCalendarHeader implements AfterContentInit { // @public export class KbqDatepicker implements OnDestroy { - constructor(overlay: Overlay, ngZone: NgZone, viewContainerRef: ViewContainerRef, scrollStrategy: any, dateAdapter: DateAdapter, dir: Directionality); + constructor(); // (undocumented) readonly backdropClass: _angular_core.InputSignal; close(restoreFocus?: boolean): void; @@ -249,7 +243,7 @@ export class KbqDatepicker implements OnDestroy { // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration, "kbq-datepicker", ["kbqDatepicker"], { "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration, [null, null, null, null, { optional: true; }, { optional: true; }]>; + static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; } // @public @@ -260,7 +254,6 @@ export const kbqDatepickerAnimations: { // @public export class KbqDatepickerContent implements OnDestroy, AfterViewInit { - constructor(changeDetectorRef: ChangeDetectorRef); readonly animationDone: Subject; animationState: 'enter' | 'void'; readonly calendar: _angular_core.Signal>; @@ -279,7 +272,7 @@ export class KbqDatepickerContent implements OnDestroy, AfterViewInit { // @public export class KbqDatepickerInput implements KbqFormFieldControl, ControlValueAccessor, Validator, OnDestroy, DoCheck, AfterContentInit { - constructor(elementRef: ElementRef, renderer: Renderer2, adapter: DateAdapter, dateFormats: KbqDateFormats); + constructor(); // (undocumented) readonly adapter: DateAdapter; // (undocumented) @@ -308,14 +301,14 @@ export class KbqDatepickerInput implements KbqFormFieldControl, ControlVal set errorState(value: boolean); get errorStateMatcher(): ErrorStateMatcher; set errorStateMatcher(value: ErrorStateMatcher); - protected readonly externalConfiguration: unknown; + protected readonly externalConfiguration: {}; // (undocumented) focus(): void; // (undocumented) focusChanged(isFocused: boolean): void; // (undocumented) focused: boolean; - protected readonly formField: KbqFormField | null; + protected readonly formField: KbqFormField; getOrigin(): ElementRef; // (undocumented) get id(): string; @@ -329,7 +322,8 @@ export class KbqDatepickerInput implements KbqFormFieldControl, ControlVal set kbqDatepickerFilter(value: (date: D | null) => boolean); // (undocumented) set kbqValidationTooltip(tooltip: KbqTooltipTrigger); - protected readonly localeService: _koobiq_components_core.KbqLocaleService | null; + // (undocumented) + protected readonly localeService: _koobiq_components_core.KbqLocaleService; get max(): D | null; set max(value: D | null); get min(): D | null; @@ -386,7 +380,7 @@ export class KbqDatepickerInput implements KbqFormFieldControl, ControlVal // (undocumented) static ɵdir: _angular_core.ɵɵDirectiveDeclaration, "input[kbqDatepicker], input[kbqCalendar]", ["kbqDatepickerInput"], { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "kbqDatepicker": { "alias": "kbqDatepicker"; "required": false; }; "kbqCalendar": { "alias": "kbqCalendar"; "required": false; }; "kbqDatepickerFilter": { "alias": "kbqDatepickerFilter"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "id": { "alias": "id"; "required": false; }; "kbqValidationTooltip": { "alias": "kbqValidationTooltip"; "required": false; }; }, { "incorrectInput": "incorrectInput"; "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration, [null, null, { optional: true; }, { optional: true; }]>; + static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; } // @public @@ -456,7 +450,7 @@ export class KbqDatepickerToggleIconComponent implements AfterContentInit, On // @public export class KbqMonthView implements AfterContentInit { - constructor(changeDetectorRef: ChangeDetectorRef, adapter: DateAdapter); + constructor(); get activeDate(): D; set activeDate(value: D); readonly activeDateChange: _angular_core.OutputEmitterRef; @@ -486,7 +480,7 @@ export class KbqMonthView implements AfterContentInit { // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration, "kbq-month-view", ["kbqMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "userSelection": "userSelection"; "activeDateChange": "activeDateChange"; }, never, never, true, never>; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration, [null, { optional: true; }]>; + static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; } // @public (undocumented) diff --git a/tools/public_api_guard/components/dropdown.api.md b/tools/public_api_guard/components/dropdown.api.md index 3179c9fc08..a0b97cf23a 100644 --- a/tools/public_api_guard/components/dropdown.api.md +++ b/tools/public_api_guard/components/dropdown.api.md @@ -8,24 +8,18 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; import { AnimationTriggerMetadata } from '@angular/animations'; -import { ApplicationRef } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; -import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import { FocusOrigin } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/overlay'; import * as i2 from '@koobiq/components/icon'; import { IFocusableOption } from '@koobiq/components/core'; import { InjectionToken } from '@angular/core'; -import { Injector } from '@angular/core'; import { KbqComponentColors } from '@koobiq/components/core'; import { KbqIcon } from '@koobiq/components/icon'; import { KbqTitleTextRef } from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; @@ -34,7 +28,6 @@ import { QueryList } from '@angular/core'; import { ScrollStrategy } from '@angular/cdk/overlay'; import { Subject } from 'rxjs'; import { TemplateRef } from '@angular/core'; -import { ViewContainerRef } from '@angular/core'; // @public export type DropdownCloseReason = void | 'click' | 'keydown' | 'tab'; @@ -75,7 +68,6 @@ export const KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER: { // @public (undocumented) export class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit, OnDestroy { - constructor(elementRef: ElementRef, ngZone: NgZone, defaultOptions: KbqDropdownDefaultOptions); animationDone: Subject; backdropClass: string; classList: { @@ -136,7 +128,6 @@ export const kbqDropdownAnimations: { // @public export class KbqDropdownContent implements OnDestroy { - constructor(template: TemplateRef, appRef: ApplicationRef, injector: Injector, viewContainerRef: ViewContainerRef); attach(context?: any): void; attached: Subject; detach(): void; @@ -162,7 +153,6 @@ export interface KbqDropdownDefaultOptions { // @public export class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, AfterViewInit, OnDestroy { - constructor(elementRef: ElementRef, focusMonitor: FocusMonitor, parentDropdownPanel?: KbqDropdownPanel | undefined); checkDisabled(event: Event): void; protected readonly componentColors: typeof KbqComponentColors; // (undocumented) @@ -196,7 +186,7 @@ export class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, After // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -261,14 +251,14 @@ export class KbqDropdownStaticContent { // @public export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { - constructor(overlay: Overlay, elementRef: ElementRef, viewContainerRef: ViewContainerRef, scrollStrategy: any, parent: KbqDropdown, dropdownItemInstance: KbqDropdownItem, _dir: Directionality, changeDetectorRef: ChangeDetectorRef, focusMonitor?: FocusMonitor | undefined); + constructor(); close(): void; data: any; demoteOverlay: boolean; get dir(): Direction; get dropdown(): KbqDropdownPanel; set dropdown(dropdown: KbqDropdownPanel); - readonly dropdownClosed: i0.OutputEmitterRef; + readonly dropdownClosed: EventEmitter; readonly dropdownOpened: i0.OutputEmitterRef; focus(origin?: FocusOrigin, options?: FocusOptions): void; handleClick(event: MouseEvent): void; @@ -302,7 +292,7 @@ export class KbqDropdownTrigger implements AfterContentInit, OnDestroy { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/empty-state.api.md b/tools/public_api_guard/components/empty-state.api.md index e0d739f9ed..3f92187f6b 100644 --- a/tools/public_api_guard/components/empty-state.api.md +++ b/tools/public_api_guard/components/empty-state.api.md @@ -9,7 +9,6 @@ import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; import * as i2 from '@angular/cdk/platform'; import { KbqDefaultSizes } from '@koobiq/components/core'; -import { KbqIconItem } from '@koobiq/components/icon'; // @public (undocumented) export class KbqEmptyState implements AfterContentInit { @@ -40,13 +39,12 @@ export class KbqEmptyStateActions { // @public (undocumented) export class KbqEmptyStateIcon { - constructor(icon: KbqIconItem); // (undocumented) setErrorColor(): void; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/form-field.api.md b/tools/public_api_guard/components/form-field.api.md index 8e306b12cb..766bf05b61 100644 --- a/tools/public_api_guard/components/form-field.api.md +++ b/tools/public_api_guard/components/form-field.api.md @@ -96,6 +96,7 @@ export class KbqFormField extends KbqColorDirective implements AfterContentInit, readonly contentClass: i0.InputSignal | undefined>; readonly control: i0.Signal>; get disabled(): boolean; + // (undocumented) readonly elementRef: ElementRef; focus(options?: FocusOptions): void; get focusOrigin(): FocusOrigin; @@ -217,7 +218,7 @@ export class KbqLegend { // @public (undocumented) export class KbqPasswordHint extends KbqHint implements AfterContentInit { - constructor(changeDetectorRef: ChangeDetectorRef, formField: any); + constructor(); // (undocumented) checked: boolean; // (undocumented) @@ -246,7 +247,7 @@ export class KbqPasswordHint extends KbqHint implements AfterContentInit { // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public @@ -326,13 +327,13 @@ export class KbqSuffix { // @public export class KbqTrim { - constructor(noTrim: boolean, ngControl: NgControl); + constructor(); // (undocumented) trim(value: any): any; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/input.api.md b/tools/public_api_guard/components/input.api.md index 5a08bfdb07..6c03f847b6 100644 --- a/tools/public_api_guard/components/input.api.md +++ b/tools/public_api_guard/components/input.api.md @@ -19,14 +19,12 @@ import * as i3 from '@koobiq/components/icon'; import * as i8 from '@koobiq/components/form-field'; import { InjectionToken } from '@angular/core'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; -import { KbqLocaleService } from '@koobiq/components/core'; import { KbqNumberInputLocaleConfig } from '@koobiq/components/core'; import { NgControl } from '@angular/forms'; import { NgForm } from '@angular/forms'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { Provider } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SimpleChanges } from '@angular/core'; import { Subject } from 'rxjs'; import { ValidationErrors } from '@angular/forms'; @@ -68,7 +66,7 @@ export const KBQ_NUMBER_INPUT_VALUE_ACCESSOR: any; // @public (undocumented) export class KbqInput implements KbqFormFieldControl, OnChanges, OnDestroy, DoCheck, OnChanges, CanUpdateErrorState { - constructor(elementRef: ElementRef, ngControl: NgControl, numberInput: KbqNumberInput, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, inputValueAccessor: any); + constructor(); controlType: string; // (undocumented) defaultErrorStateMatcher: ErrorStateMatcher; @@ -124,7 +122,7 @@ export class KbqInput implements KbqFormFieldControl, OnChanges, OnDestroy, // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -147,7 +145,7 @@ export class KbqInputMono { // @public (undocumented) export class KbqInputPassword implements KbqFormFieldControl, OnChanges, OnDestroy, DoCheck, OnChanges, CanUpdateErrorState { - constructor(elementRef: ElementRef, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, inputValueAccessor: any); + constructor(); // (undocumented) readonly checkRule: Subject; // (undocumented) @@ -205,12 +203,12 @@ export class KbqInputPassword implements KbqFormFieldControl, OnChanges, On // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) export class KbqNumberInput implements KbqFormFieldControl, ControlValueAccessor, OnDestroy { - constructor(elementRef: ElementRef, renderer: Renderer2, step: string, bigStep: string, min: string, max: string, localeService?: KbqLocaleService | undefined); + constructor(); // (undocumented) bigStep: number; // (undocumented) @@ -288,7 +286,7 @@ export class KbqNumberInput implements KbqFormFieldControl, ControlValueAcc // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/link.api.md b/tools/public_api_guard/components/link.api.md index d38fdfeb17..71234e3d46 100644 --- a/tools/public_api_guard/components/link.api.md +++ b/tools/public_api_guard/components/link.api.md @@ -9,7 +9,6 @@ import { AfterViewInit } from '@angular/core'; import * as _angular_core from '@angular/core'; import { DestroyRef } from '@angular/core'; import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i1 from '@angular/cdk/a11y'; import { KbqIcon } from '@koobiq/components/icon'; import { OnDestroy } from '@angular/core'; @@ -21,7 +20,7 @@ export const baseURLRegex: RegExp; // @public (undocumented) export class KbqLink implements AfterContentInit, AfterViewInit, OnDestroy { - constructor(elementRef: ElementRef, focusMonitor: FocusMonitor); + constructor(); // (undocumented) readonly big: _angular_core.InputSignalWithTransform; // (undocumented) diff --git a/tools/public_api_guard/components/list.api.md b/tools/public_api_guard/components/list.api.md index 1888d8e79d..2c4d68f826 100644 --- a/tools/public_api_guard/components/list.api.md +++ b/tools/public_api_guard/components/list.api.md @@ -6,8 +6,6 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; -import { Clipboard as Clipboard_2 } from '@angular/cdk/clipboard'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; @@ -26,7 +24,6 @@ import { KbqPseudoCheckbox } from '@koobiq/components/core'; import { KbqTitleTextRef } from '@koobiq/components/core'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { MultipleMode } from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; @@ -58,7 +55,6 @@ export class KbqListCopyEvent { // @public (undocumented) export class KbqListItem implements AfterContentInit { - constructor(elementRef: ElementRef); // (undocumented) getHostElement(): HTMLElement; // (undocumented) @@ -87,7 +83,6 @@ export class KbqListModule { // @public export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTitleTextRef { - constructor(elementRef: ElementRef, changeDetector: ChangeDetectorRef, ngZone: NgZone, listSelection: KbqListSelection, group: KbqOptgroup); // (undocumented) readonly actionButton: i0.Signal; // (undocumented) @@ -97,7 +92,7 @@ export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTi get disabled(): boolean; set disabled(value: boolean); // (undocumented) - readonly dropdownTrigger: i0.Signal; + dropdownTrigger: KbqDropdownTrigger; // (undocumented) get externalPseudoCheckbox(): boolean; // (undocumented) @@ -149,14 +144,14 @@ export class KbqListOption implements OnDestroy, OnInit, IFocusableOption, KbqTi // (undocumented) toggle(): void; // (undocumented) - readonly tooltipTrigger: i0.Signal; + tooltipTrigger: KbqTooltipTrigger; // (undocumented) get value(): any; set value(newValue: any); // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -178,7 +173,7 @@ export class KbqListSelectAllEvent { // @public (undocumented) export class KbqListSelection implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, multiple: MultipleMode, clipboard: Clipboard_2); + constructor(); // (undocumented) get autoSelect(): boolean; set autoSelect(value: boolean); @@ -275,7 +270,7 @@ export class KbqListSelection implements AfterContentInit, AfterViewInit, OnDest // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/loader-overlay.api.md b/tools/public_api_guard/components/loader-overlay.api.md index 081917d0b7..0cbbe37e02 100644 --- a/tools/public_api_guard/components/loader-overlay.api.md +++ b/tools/public_api_guard/components/loader-overlay.api.md @@ -4,7 +4,6 @@ ```ts -import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; import * as i2 from '@angular/cdk/platform'; @@ -12,11 +11,9 @@ import * as i3 from '@koobiq/components/progress-spinner'; import { KbqDefaultSizes } from '@koobiq/components/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; -import { Renderer2 } from '@angular/core'; // @public (undocumented) export class KbqLoaderOverlay implements OnInit, OnDestroy { - constructor(elementRef: ElementRef, renderer: Renderer2); // (undocumented) caption: string; readonly card: i0.InputSignalWithTransform; diff --git a/tools/public_api_guard/components/markdown.api.md b/tools/public_api_guard/components/markdown.api.md index 2e78d0aac4..86db718815 100644 --- a/tools/public_api_guard/components/markdown.api.md +++ b/tools/public_api_guard/components/markdown.api.md @@ -4,7 +4,6 @@ ```ts -import { DomSanitizer } from '@angular/platform-browser'; import * as i0 from '@angular/core'; import { InjectionToken } from '@angular/core'; import { MarkedOptions } from 'marked'; @@ -20,7 +19,7 @@ export const KBQ_MARKDOWN_MARKED_OPTIONS: InjectionToken; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public diff --git a/tools/public_api_guard/components/modal.api.md b/tools/public_api_guard/components/modal.api.md index 2cee1da127..24a2bb0f49 100644 --- a/tools/public_api_guard/components/modal.api.md +++ b/tools/public_api_guard/components/modal.api.md @@ -5,12 +5,9 @@ ```ts import { AfterViewInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; -import { ComponentFactoryResolver } from '@angular/core'; import { ComponentRef } from '@angular/core'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/overlay'; import * as i2 from '@angular/cdk/a11y'; @@ -28,9 +25,7 @@ import { OnInit } from '@angular/core'; import { Overlay } from '@angular/cdk/overlay'; import { OverlayRef } from '@angular/cdk/overlay'; import { PipeTransform } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SimpleChanges } from '@angular/core'; -import { Subject } from 'rxjs'; import { TemplateRef } from '@angular/core'; import { Type } from '@angular/core'; import { ViewContainerRef } from '@angular/core'; @@ -88,8 +83,6 @@ export class KbqModalBody { // @public (undocumented) export class KbqModalComponent extends KbqModalRef implements OnInit, OnChanges, AfterViewInit, OnDestroy, ModalOptions { - // Warning: (ae-forgotten-export) The symbol "KbqModalControlService" needs to be exported by the entry point index.d.ts - constructor(overlay: Overlay, renderer: Renderer2, cfr: ComponentFactoryResolver, elementRef: ElementRef, viewContainer: ViewContainerRef, modalControl: KbqModalControlService, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor); // (undocumented) get afterClose(): Observable; // (undocumented) @@ -306,7 +299,6 @@ export abstract class KbqModalRef { // @public (undocumented) export class KbqModalService { - constructor(overlay: Overlay, modalControl: KbqModalControlService, injector: Injector); // (undocumented) get afterAllClose(): Observable; // (undocumented) @@ -331,9 +323,8 @@ export class KbqModalService { // @public (undocumented) export class KbqModalTitle { - constructor(modal: KbqModalComponent); // (undocumented) - protected modal: KbqModalComponent; + protected modal: KbqModalComponent; // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) diff --git a/tools/public_api_guard/components/navbar.api.md b/tools/public_api_guard/components/navbar.api.md index dab5e95b6e..8b2388ae00 100644 --- a/tools/public_api_guard/components/navbar.api.md +++ b/tools/public_api_guard/components/navbar.api.md @@ -20,12 +20,10 @@ import { IFocusableOption } from '@koobiq/components/core'; import { InjectionToken } from '@angular/core'; import { KbqButton } from '@koobiq/components/button'; import { KbqButtonCssStyler } from '@koobiq/components/button'; -import { KbqDropdownTrigger } from '@koobiq/components/dropdown'; import { KbqFormField } from '@koobiq/components/form-field'; import { KbqIcon } from '@koobiq/components/icon'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import * as _koobiq_components_core from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { QueryList } from '@angular/core'; @@ -44,7 +42,6 @@ export const KBQ_VERTICAL_NAVBAR_DEFAULT_CONFIGURATION: { // @public (undocumented) export class KbqFocusableComponent implements AfterContentInit, AfterViewInit, OnDestroy { - constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, focusMonitor: FocusMonitor); // (undocumented) blur(): void; // (undocumented) @@ -84,7 +81,7 @@ export class KbqFocusableComponent implements AfterContentInit, AfterViewInit, O // @public (undocumented) export class KbqNavbar extends KbqFocusableComponent implements AfterViewInit, AfterContentInit, OnDestroy { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor); + constructor(); // (undocumented) protected readonly changeDetectorRef: ChangeDetectorRef; // (undocumented) @@ -170,7 +167,6 @@ export class KbqNavbarDivider { // @public (undocumented) export class KbqNavbarFocusableItem implements AfterContentInit, AfterViewInit, OnDestroy, IFocusableOption { - constructor(elementRef: ElementRef, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor, ngZone: NgZone); // (undocumented) blur(): void; // (undocumented) @@ -224,7 +220,7 @@ export interface KbqNavbarFocusableItemEvent { // @public (undocumented) export class KbqNavbarItem extends KbqTooltipTrigger implements AfterContentInit { - constructor(rectangleElement: KbqNavbarRectangleElement, navbarFocusableItem: KbqNavbarFocusableItem, changeDetectorRef: ChangeDetectorRef, dropdownTrigger: KbqDropdownTrigger, bento: KbqNavbarBento); + constructor(); // (undocumented) get collapsable(): boolean; set collapsable(value: boolean); @@ -274,7 +270,7 @@ export class KbqNavbarItem extends KbqTooltipTrigger implements AfterContentInit // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -368,7 +364,7 @@ export class KbqNavbarToggle implements OnDestroy { // @public (undocumented) export class KbqVerticalNavbar extends KbqFocusableComponent implements AfterContentInit { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor); + constructor(); // (undocumented) readonly animationDone: Subject; // (undocumented) @@ -381,10 +377,10 @@ export class KbqVerticalNavbar extends KbqFocusableComponent implements AfterCon get expanded(): boolean; set expanded(value: boolean); // (undocumented) - readonly externalConfiguration: unknown; + readonly externalConfiguration: {}; // (undocumented) readonly items: i0.Signal; - protected readonly localeService: _koobiq_components_core.KbqLocaleService | null; + protected readonly localeService: _koobiq_components_core.KbqLocaleService; // (undocumented) ngAfterContentInit(): void; // (undocumented) diff --git a/tools/public_api_guard/components/popover.api.md b/tools/public_api_guard/components/popover.api.md index be9cd3f7c4..ae2f3e02f8 100644 --- a/tools/public_api_guard/components/popover.api.md +++ b/tools/public_api_guard/components/popover.api.md @@ -122,7 +122,7 @@ export class KbqPopoverConfirmComponent extends KbqPopoverComponent { // @public (undocumented) export class KbqPopoverConfirmTrigger extends KbqPopoverTrigger { - constructor(confirmText: string, confirmButtonText: string); + constructor(); // (undocumented) readonly confirm: i0.OutputEmitterRef; // (undocumented) @@ -140,7 +140,7 @@ export class KbqPopoverConfirmTrigger extends KbqPopoverTrigger { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/radio.api.md b/tools/public_api_guard/components/radio.api.md index 2f8752385c..333bb290ea 100644 --- a/tools/public_api_guard/components/radio.api.md +++ b/tools/public_api_guard/components/radio.api.md @@ -6,24 +6,21 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; import { KbqColorDirective } from '@koobiq/components/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { QueryList } from '@angular/core'; -import { UniqueSelectionDispatcher } from '@angular/cdk/collections'; // @public export const KBQ_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any; // @public (undocumented) export class KbqRadioButton extends KbqColorDirective implements OnInit, AfterViewInit, OnDestroy { - constructor(radioGroup: KbqRadioGroup, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor, radioDispatcher: UniqueSelectionDispatcher); + constructor(); readonly change: i0.OutputEmitterRef; get checked(): boolean; set checked(value: boolean); @@ -68,7 +65,7 @@ export class KbqRadioButton extends KbqColorDirective implements OnInit, AfterVi // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public @@ -82,7 +79,6 @@ export class KbqRadioChange { // @public (undocumented) export class KbqRadioGroup implements AfterContentInit, ControlValueAccessor { - constructor(changeDetector: ChangeDetectorRef); // (undocumented) readonly big: i0.InputSignal; readonly change: i0.OutputEmitterRef; diff --git a/tools/public_api_guard/components/scrollbar.api.md b/tools/public_api_guard/components/scrollbar.api.md index e711a13baa..5241cb9bb5 100644 --- a/tools/public_api_guard/components/scrollbar.api.md +++ b/tools/public_api_guard/components/scrollbar.api.md @@ -13,7 +13,6 @@ import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/overlay'; import { InitializationTarget } from 'overlayscrollbars'; import { InjectionToken } from '@angular/core'; -import { NgZone } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OverlayScrollbars } from 'overlayscrollbars'; import * as overlayscrollbars from 'overlayscrollbars'; @@ -54,7 +53,6 @@ export const KBQ_SCROLLBAR_OPTIONS_DEFAULT_CONFIG_PROVIDER: Provider; // @public export class KbqScrollbar implements AfterViewInit, OnDestroy { - constructor(ngZone: NgZone, targetElement: ElementRef); readonly contentElement: i0.Signal>; readonly defer: i0.InputSignal; // (undocumented) @@ -112,7 +110,7 @@ export class KbqScrollbar implements AfterViewInit, OnDestroy { // @public export class KbqScrollbarDirective implements OnDestroy { - constructor(ngZone: NgZone, scrollbarConfig?: KbqScrollbarOptions | undefined); + constructor(); readonly defer: i0.InputSignal; set events(value: KbqScrollbarEvents); // (undocumented) diff --git a/tools/public_api_guard/components/select.api.md b/tools/public_api_guard/components/select.api.md index 22f382598a..68e31e0e16 100644 --- a/tools/public_api_guard/components/select.api.md +++ b/tools/public_api_guard/components/select.api.md @@ -7,17 +7,16 @@ import { ActiveDescendantKeyManager } from '@koobiq/components/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; +import * as _angular_cdk_overlay_module_d from '@angular/cdk/overlay-module.d'; import * as _angular_core from '@angular/core'; import { CanUpdateErrorState } from '@koobiq/components/core'; import { CdkConnectedOverlay } from '@angular/cdk/overlay'; import { CdkOverlayOrigin } from '@angular/cdk/overlay'; import { CdkVirtualForOf } from '@angular/cdk/scrolling'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; -import { ChangeDetectorRef } from '@angular/core'; import { ConnectedPosition } from '@angular/cdk/overlay'; import { ControlValueAccessor } from '@angular/forms'; import { DestroyRef } from '@angular/core'; -import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@koobiq/components/core'; @@ -35,7 +34,6 @@ import { InjectionToken } from '@angular/core'; import { KbqAbstractSelect } from '@koobiq/components/core'; import { KbqCleaner } from '@koobiq/components/form-field'; import { KbqComponentColors } from '@koobiq/components/core'; -import { KbqFormField } from '@koobiq/components/form-field'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; import { KbqLocaleService } from '@koobiq/components/core'; import { KbqOptgroup } from '@koobiq/components/core'; @@ -51,14 +49,11 @@ import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { KbqVirtualOption } from '@koobiq/components/core'; import { NgControl } from '@angular/forms'; import { NgForm } from '@angular/forms'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; -import { OverlayContainer } from '@angular/cdk/overlay'; import { Provider } from '@angular/core'; import { QueryList } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SelectionModel } from '@angular/cdk/collections'; import { Subject } from 'rxjs'; import { TemplateRef } from '@angular/core'; @@ -96,7 +91,7 @@ export class KbqOptionTooltip extends KbqTooltipTrigger implements AfterViewInit // @public (undocumented) export class KbqSelect extends KbqAbstractSelect implements AfterContentInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl, CanUpdateErrorState { - constructor(_changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone, _renderer: Renderer2, defaultErrorStateMatcher: ErrorStateMatcher, elementRef: ElementRef, overlayContainer: OverlayContainer, _dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, parentFormField: KbqFormField, ngControl: NgControl, scrollStrategyFactory: any, localeService?: KbqLocaleService | undefined); + constructor(); readonly backdropClass: _angular_core.InputSignal; readonly beforeOpened: _angular_core.OutputEmitterRef; calculateHiddenItems: () => void; @@ -120,7 +115,7 @@ export class KbqSelect extends KbqAbstractSelect implements AfterContentInit, On panelWidth: KbqSelectPanelWidth; panelMinWidth: Exclude; searchMinOptionsThreshold: "auto" | number; - }> | null; + }>; protected readonly destroyRef: DestroyRef; get disabled(): boolean; set disabled(value: boolean); @@ -217,7 +212,7 @@ export class KbqSelect extends KbqAbstractSelect implements AfterContentInit, On resetSearch(): void; readonly scrolledToBottom: _angular_core.OutputEmitterRef; readonly scrolledToBottomOffset: _angular_core.InputSignalWithTransform; - scrollStrategy: any; + scrollStrategy: _angular_cdk_overlay_module_d.ScrollStrategy; readonly search: _angular_core.Signal; readonly searchEmpty: _angular_core.Signal; set searchMinOptionsThreshold(value: 'auto' | number | undefined); @@ -256,7 +251,7 @@ export class KbqSelect extends KbqAbstractSelect implements AfterContentInit, On // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: _angular_core.ɵɵFactoryDeclaration; } // @public diff --git a/tools/public_api_guard/components/sidebar.api.md b/tools/public_api_guard/components/sidebar.api.md index 86d643212e..1e73f6a5a2 100644 --- a/tools/public_api_guard/components/sidebar.api.md +++ b/tools/public_api_guard/components/sidebar.api.md @@ -5,14 +5,12 @@ ```ts import { AfterContentInit } from '@angular/core'; -import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; -import { NgZone } from '@angular/core'; import { OnDestroy } from '@angular/core'; // @public (undocumented) export class KbqSidebar implements OnDestroy, AfterContentInit { - constructor(ngZone: NgZone, elementRef: ElementRef); + constructor(); // Warning: (ae-forgotten-export) The symbol "KbqSidebarAnimationState" needs to be exported by the entry point index.d.ts get animationState(): KbqSidebarAnimationState; readonly closedContent: i0.Signal; diff --git a/tools/public_api_guard/components/sidepanel.api.md b/tools/public_api_guard/components/sidepanel.api.md index fc1c02fea3..bc866d652b 100644 --- a/tools/public_api_guard/components/sidepanel.api.md +++ b/tools/public_api_guard/components/sidepanel.api.md @@ -7,11 +7,9 @@ import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; import { BasePortalOutlet } from '@angular/cdk/portal'; import { CdkPortalOutlet } from '@angular/cdk/portal'; -import { ChangeDetectorRef } from '@angular/core'; import { ComponentPortal } from '@angular/cdk/portal'; import { ComponentRef } from '@angular/core'; import { ComponentType } from '@angular/cdk/portal'; -import { ElementRef } from '@angular/core'; import { EmbeddedViewRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import * as i0 from '@angular/core'; @@ -27,7 +25,6 @@ import { Observable } from 'rxjs'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; -import { Overlay } from '@angular/cdk/overlay'; import { OverlayRef } from '@angular/cdk/overlay'; import { SimpleChanges } from '@angular/core'; import { Subject } from 'rxjs'; @@ -62,7 +59,6 @@ export class KbqSidepanelBody { // @public export class KbqSidepanelClose implements OnInit, OnChanges { - constructor(sidepanelRef: KbqSidepanelRef, elementRef: ElementRef, sidepanelService: KbqSidepanelService); // (undocumented) readonly kbqSidepanelClose: i0.InputSignal; // (undocumented) @@ -70,13 +66,13 @@ export class KbqSidepanelClose implements OnInit, OnChanges { // (undocumented) ngOnInit(): void; // (undocumented) - sidepanelRef: KbqSidepanelRef; + sidepanelRef: KbqSidepanelRef; // (undocumented) sidepanelResult: any; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) @@ -99,7 +95,6 @@ export class KbqSidepanelConfig { // @public (undocumented) export class KbqSidepanelContainerComponent extends BasePortalOutlet implements OnDestroy { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, sidepanelConfig: KbqSidepanelConfig, withIndent: boolean); // Warning: (ae-forgotten-export) The symbol "KbqSidepanelAnimationState" needs to be exported by the entry point index.d.ts animationState: KbqSidepanelAnimationState; animationStateChanged: EventEmitter; @@ -123,7 +118,7 @@ export class KbqSidepanelContainerComponent extends BasePortalOutlet implements readonly portalOutlet: i0.Signal; setAnimationState(state: KbqSidepanelAnimationState): void; // (undocumented) - sidepanelConfig: KbqSidepanelConfig; + sidepanelConfig: KbqSidepanelConfig; get size(): string; get trapFocus(): boolean; get trapFocusAutoCapture(): boolean; @@ -202,7 +197,6 @@ export class KbqSidepanelRef { // @public (undocumented) export class KbqSidepanelService implements OnDestroy { - constructor(overlay: Overlay, injector: Injector, defaultOptions: KbqSidepanelConfig, parentSidepanelService: KbqSidepanelService); closeAll(): void; getSidepanelById(id: string): KbqSidepanelRef | undefined; // (undocumented) @@ -211,7 +205,7 @@ export class KbqSidepanelService implements OnDestroy { open(componentOrTemplateRef: ComponentType | TemplateRef, config?: KbqSidepanelConfig): KbqSidepanelRef; get openedSidepanels(): KbqSidepanelRef[]; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) static ɵprov: i0.ɵɵInjectableDeclaration; } diff --git a/tools/public_api_guard/components/splitter.api.md b/tools/public_api_guard/components/splitter.api.md index 9ba5e74544..cefaf98d29 100644 --- a/tools/public_api_guard/components/splitter.api.md +++ b/tools/public_api_guard/components/splitter.api.md @@ -10,11 +10,9 @@ import { ChangeDetectorRef } from '@angular/core'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i1 from '@koobiq/components/icon'; -import { NgZone } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { QueryList } from '@angular/core'; -import { Renderer2 } from '@angular/core'; // @public (undocumented) export enum Direction { @@ -26,7 +24,6 @@ export enum Direction { // @public (undocumented) export class KbqGutterDirective implements OnInit { - constructor(elementRef: ElementRef, renderer: Renderer2); // (undocumented) get direction(): Direction; set direction(direction: Direction); @@ -54,7 +51,6 @@ export class KbqGutterDirective implements OnInit { // @public (undocumented) export class KbqGutterGhostDirective { - constructor(elementRef: ElementRef, renderer: Renderer2); // (undocumented) get direction(): Direction; set direction(direction: Direction); @@ -79,7 +75,6 @@ export class KbqGutterGhostDirective { // @public (undocumented) export class KbqSplitterAreaDirective implements AfterViewInit, OnDestroy { - constructor(elementRef: ElementRef, renderer: Renderer2, splitter: KbqSplitterComponent); // (undocumented) disableFlex(): void; // (undocumented) @@ -108,7 +103,6 @@ export class KbqSplitterAreaDirective implements AfterViewInit, OnDestroy { // @public (undocumented) export class KbqSplitterComponent implements OnInit, AfterContentInit, OnDestroy { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, ngZone: NgZone, renderer: Renderer2); // (undocumented) addArea(area: KbqSplitterAreaDirective): void; // (undocumented) diff --git a/tools/public_api_guard/components/tabs.api.md b/tools/public_api_guard/components/tabs.api.md index ec062949cf..7fd005ea99 100644 --- a/tools/public_api_guard/components/tabs.api.md +++ b/tools/public_api_guard/components/tabs.api.md @@ -12,10 +12,8 @@ import { AnimationTriggerMetadata } from '@angular/animations'; import { CdkPortal } from '@angular/cdk/portal'; import { CdkPortalOutlet } from '@angular/cdk/portal'; import { ChangeDetectorRef } from '@angular/core'; -import { ComponentFactoryResolver } from '@angular/core'; import { DestroyRef } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; -import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { FocusableOption } from '@angular/cdk/a11y'; @@ -31,12 +29,10 @@ import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { QueryList } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SimpleChanges } from '@angular/core'; import { Subject } from 'rxjs'; import { TemplatePortal } from '@angular/cdk/portal'; import { TemplateRef } from '@angular/core'; -import { ViewContainerRef } from '@angular/core'; // @public (undocumented) export const KBQ_TAB_LABEL: InjectionToken; @@ -70,7 +66,6 @@ export class KbqStretchTabsCssStyler { // @public (undocumented) export class KbqTab implements OnInit, OnChanges, OnDestroy { - constructor(viewContainerRef: ViewContainerRef); get content(): TemplatePortal | null; // (undocumented) get disabled(): boolean; @@ -117,7 +112,7 @@ export class KbqTab implements OnInit, OnChanges, OnDestroy { // @public export class KbqTabBody implements OnInit, OnDestroy { - constructor(elementRef: ElementRef, dir: Directionality, changeDetectorRef: ChangeDetectorRef); + constructor(); readonly afterLeavingCenter: EventEmitter; readonly animationDuration: i0.InputSignal; readonly beforeCentering: EventEmitter; @@ -140,7 +135,7 @@ export class KbqTabBody implements OnInit, OnDestroy { // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public @@ -148,7 +143,7 @@ export type KbqTabBodyOriginState = 'left' | 'right'; // @public export class KbqTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy { - constructor(componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, host: KbqTabBody); + constructor(); ngOnDestroy(): void; ngOnInit(): void; // (undocumented) @@ -168,7 +163,6 @@ export class KbqTabChangeEvent { // @public export class KbqTabContent { - constructor(template: TemplateRef); // (undocumented) template: TemplateRef; // (undocumented) @@ -179,7 +173,7 @@ export class KbqTabContent { // @public export class KbqTabGroup implements AfterContentInit, AfterViewInit, AfterContentChecked, OnDestroy { - constructor(changeDetectorRef: ChangeDetectorRef, defaultConfig?: KbqTabsConfig); + constructor(); // (undocumented) get activeTab(): KbqTab | null; set activeTab(value: KbqTabSelectBy | null); @@ -236,7 +230,7 @@ export class KbqTabGroup implements AfterContentInit, AfterViewInit, AfterConten // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // Warning: (ae-forgotten-export) The symbol "KbqPaginatedTabHeader" needs to be exported by the entry point index.d.ts @@ -278,7 +272,6 @@ export class KbqTabLabel extends CdkPortal { // @public export class KbqTabLabelWrapper implements AfterViewInit { - constructor(elementRef: ElementRef, renderer: Renderer2); // (undocumented) checkOverflow(): void; // (undocumented) diff --git a/tools/public_api_guard/components/tags.api.md b/tools/public_api_guard/components/tags.api.md index 527d30c417..dcd49eb253 100644 --- a/tools/public_api_guard/components/tags.api.md +++ b/tools/public_api_guard/components/tags.api.md @@ -11,7 +11,6 @@ import { CanUpdateErrorState } from '@koobiq/components/core'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; -import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@koobiq/components/core'; @@ -29,7 +28,6 @@ import { KbqColorDirective } from '@koobiq/components/core'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; import { KbqIcon } from '@koobiq/components/icon'; import { KbqTitleTextRef } from '@koobiq/components/core'; -import { KbqTrim } from '@koobiq/components/form-field'; import { NgControl } from '@angular/forms'; import { NgForm } from '@angular/forms'; import { Observable } from 'rxjs'; @@ -43,7 +41,7 @@ export const KBQ_TAGS_DEFAULT_OPTIONS: InjectionToken; // @public (undocumented) export class KbqTag extends KbqColorDirective implements IFocusableOption, OnDestroy, KbqTitleTextRef, AfterContentInit, AfterViewInit { - constructor(changeDetectorRef: ChangeDetectorRef); + constructor(); addClassModificatorForIcons(): void; addHostClassName(): void; readonly avatar: _angular_core.Signal; @@ -174,7 +172,7 @@ export type KbqTagFocusEvent = KbqTagEvent & { // // @public export class KbqTagInput implements KbqTagTextControl, OnChanges { - constructor(elementRef: ElementRef, defaultOptions: KbqTagsDefaultOptions, trimDirective: KbqTrim, ngControl: NgControl, autocompleteTrigger?: KbqAutocompleteTrigger | undefined); + constructor(); get addOnBlur(): boolean; set addOnBlur(value: boolean); readonly addOnPaste: _angular_core.InputSignalWithTransform; @@ -211,7 +209,7 @@ export class KbqTagInput implements KbqTagTextControl, OnChanges { // (undocumented) static ɵdir: _angular_core.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: _angular_core.ɵɵFactoryDeclaration; } // @public @@ -222,7 +220,7 @@ export interface KbqTagInputEvent { // @public (undocumented) export class KbqTagList implements KbqFormFieldControl, ControlValueAccessor, AfterContentInit, DoCheck, OnDestroy, CanUpdateErrorState, AfterViewInit { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, defaultErrorStateMatcher: ErrorStateMatcher, dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, ngControl: NgControl); + constructor(); blur(): void; get canShowCleaner(): boolean; readonly change: _angular_core.OutputEmitterRef; @@ -310,7 +308,7 @@ export class KbqTagList implements KbqFormFieldControl, ControlValueAccesso // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: _angular_core.ɵɵFactoryDeclaration; } // @public @@ -329,7 +327,6 @@ export type KbqTagListDroppedEvent = Pick, 'event' | 'previ // @public export class KbqTagRemove { - constructor(parentTag: KbqTag); focus(event: FocusEvent): void; handleClick(event: Event): void; // (undocumented) diff --git a/tools/public_api_guard/components/textarea.api.md b/tools/public_api_guard/components/textarea.api.md index 247abe047c..fc4c6c26f0 100644 --- a/tools/public_api_guard/components/textarea.api.md +++ b/tools/public_api_guard/components/textarea.api.md @@ -17,7 +17,6 @@ import { InjectionToken } from '@angular/core'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; import { NgControl } from '@angular/forms'; import { NgForm } from '@angular/forms'; -import { NgZone } from '@angular/core'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; @@ -31,7 +30,7 @@ export const KBQ_TEXTAREA_VALUE_ACCESSOR: InjectionToken<{ // @public (undocumented) export class KbqTextarea implements KbqFormFieldControl, OnInit, OnChanges, OnDestroy, DoCheck, CanUpdateErrorState { - constructor(elementRef: ElementRef, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, inputValueAccessor: any, parent: any, ngZone: NgZone); + constructor(); get canGrow(): boolean; set canGrow(value: boolean); controlType: string; @@ -95,7 +94,7 @@ export class KbqTextarea implements KbqFormFieldControl, OnInit, OnChanges, // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/timepicker.api.md b/tools/public_api_guard/components/timepicker.api.md index 7d0ef76dca..7e950d8433 100644 --- a/tools/public_api_guard/components/timepicker.api.md +++ b/tools/public_api_guard/components/timepicker.api.md @@ -7,9 +7,7 @@ import { AbstractControl } from '@angular/forms'; import { AfterContentInit } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; -import { DateAdapter } from '@koobiq/components/core'; import { DoCheck } from '@angular/core'; -import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@koobiq/components/core'; import * as i0 from '@angular/core'; import * as i1 from '@angular/cdk/a11y'; @@ -17,10 +15,8 @@ import * as i2 from '@angular/cdk/platform'; import * as i3 from '@angular/forms'; import * as i5 from '@koobiq/components/form-field'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; -import { KbqLocaleService } from '@koobiq/components/core'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { OnDestroy } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { Subject } from 'rxjs'; import { ValidationErrors } from '@angular/forms'; import { Validator } from '@angular/forms'; @@ -51,7 +47,7 @@ export const KBQ_TIMEPICKER_VALUE_ACCESSOR: any; // @public (undocumented) export class KbqTimepicker implements KbqFormFieldControl, ControlValueAccessor, Validator, OnDestroy, DoCheck, AfterContentInit { - constructor(elementRef: ElementRef, renderer: Renderer2, dateAdapter: DateAdapter, localeService?: KbqLocaleService | undefined); + constructor(); controlType: string; // (undocumented) get disabled(): boolean; @@ -140,7 +136,7 @@ export class KbqTimepicker implements KbqFormFieldControl, ControlValueAcc // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration, "input[kbqTimepicker]", ["kbqTimepicker"], { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "format": { "alias": "format"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "kbqValidationTooltip": { "alias": "kbqValidationTooltip"; "required": false; }; }, { "incorrectInput": "incorrectInput"; }, never, never, true, never>; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, { optional: true; }, { optional: true; }]>; + static ɵfac: i0.ɵɵFactoryDeclaration, never>; } // @public (undocumented) diff --git a/tools/public_api_guard/components/title.api.md b/tools/public_api_guard/components/title.api.md index 622cdd9ac5..f6a126fdb4 100644 --- a/tools/public_api_guard/components/title.api.md +++ b/tools/public_api_guard/components/title.api.md @@ -7,14 +7,12 @@ import { AfterViewInit } from '@angular/core'; import * as i0 from '@angular/core'; import * as i1 from '@koobiq/components/tooltip'; -import { KbqTitleTextRef } from '@koobiq/components/core'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; // @public (undocumented) export class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewInit, OnDestroy { - constructor(componentInstance?: KbqTitleTextRef | undefined); // (undocumented) get child(): HTMLElement; // (undocumented) @@ -45,7 +43,7 @@ export class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewIni // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/tools/public_api_guard/components/toast.api.md b/tools/public_api_guard/components/toast.api.md index 0ec09341f3..a1f597f911 100644 --- a/tools/public_api_guard/components/toast.api.md +++ b/tools/public_api_guard/components/toast.api.md @@ -7,23 +7,17 @@ import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; import { BehaviorSubject } from 'rxjs'; import { CdkScrollable } from '@angular/cdk/overlay'; -import { ChangeDetectorRef } from '@angular/core'; import { ComponentRef } from '@angular/core'; import { ElementRef } from '@angular/core'; import { EmbeddedViewRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i0 from '@angular/core'; import * as i1 from '@koobiq/components/core'; import { InjectionToken } from '@angular/core'; import { Injector } from '@angular/core'; import { KbqReadStateDirective } from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { OnDestroy } from '@angular/core'; -import { Overlay } from '@angular/cdk/overlay'; -import { OverlayContainer } from '@angular/cdk/overlay'; import { Provider } from '@angular/core'; import * as rxjs from 'rxjs'; -import { ScrollDispatcher } from '@angular/cdk/overlay'; import { TemplateRef } from '@angular/core'; import { ThemePalette } from '@koobiq/components/core'; import { ViewContainerRef } from '@angular/core'; @@ -50,7 +44,7 @@ export class KbqToastCloseButton { export class KbqToastComponent implements OnDestroy { // (undocumented) $implicit: any; - constructor(data: KbqToastData, service: KbqToastService, elementRef: ElementRef, focusMonitor: FocusMonitor); + constructor(); // (undocumented) animationState: string; // (undocumented) @@ -78,7 +72,7 @@ export class KbqToastComponent implements OnDestroy { // (undocumented) protected readonly readStateDirective: KbqReadStateDirective; // (undocumented) - readonly service: KbqToastService; + readonly service: KbqToastService; // (undocumented) themePalette: typeof ThemePalette; // (undocumented) @@ -114,7 +108,7 @@ export const kbqToastConfigurationProvider: (configuration: Partial, scrollDispatcher: ScrollDispatcher, ngZone: NgZone); + constructor(); // (undocumented) createTemplate(data: KbqToastData, template: TemplateRef, onTop: boolean): EmbeddedViewRef; // (undocumented) @@ -126,7 +120,7 @@ export class KbqToastContainerComponent extends CdkScrollable { // (undocumented) remove(viewRef: ViewRef): void; // (undocumented) - readonly service: KbqToastService; + readonly service: KbqToastService; // (undocumented) readonly viewContainer: i0.Signal; // (undocumented) @@ -187,7 +181,7 @@ export enum KbqToastPosition { // @public export class KbqToastService implements OnDestroy { - constructor(overlay: Overlay, injector: Injector, overlayContainer: OverlayContainer, ngZone: NgZone, toastFactory: any, toastConfig: KbqToastConfig); + constructor(); // (undocumented) readonly animation: BehaviorSubject; // (undocumented) @@ -219,7 +213,7 @@ export class KbqToastService im // (undocumented) get toasts(): ComponentRef[]; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, null, { optional: true; }]>; + static ɵfac: i0.ɵɵFactoryDeclaration, never>; // (undocumented) static ɵprov: i0.ɵɵInjectableDeclaration>; } diff --git a/tools/public_api_guard/components/toggle.api.md b/tools/public_api_guard/components/toggle.api.md index e760988be1..2e00b9846f 100644 --- a/tools/public_api_guard/components/toggle.api.md +++ b/tools/public_api_guard/components/toggle.api.md @@ -6,10 +6,8 @@ import { AfterViewInit } from '@angular/core'; import * as _angular_core from '@angular/core'; -import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; -import { FocusMonitor } from '@angular/cdk/a11y'; import * as i1 from '@angular/cdk/a11y'; import { KbqCheckboxClickAction } from '@koobiq/components/checkbox'; import { KbqCheckedState } from '@koobiq/components/core'; @@ -27,7 +25,7 @@ export class KbqToggleChange { // @public (undocumented) export class KbqToggleComponent extends KbqColorDirective implements AfterViewInit, ControlValueAccessor, OnDestroy { - constructor(focusMonitor: FocusMonitor, changeDetectorRef: ChangeDetectorRef); + constructor(); // (undocumented) readonly ariaLabel: _angular_core.InputSignal; // (undocumented) diff --git a/tools/public_api_guard/components/tooltip.api.md b/tools/public_api_guard/components/tooltip.api.md index e79f9054a0..506fdaac2b 100644 --- a/tools/public_api_guard/components/tooltip.api.md +++ b/tools/public_api_guard/components/tooltip.api.md @@ -28,11 +28,15 @@ import { Type } from '@angular/core'; import { WritableSignal } from '@angular/core'; // @public (undocumented) -export const KBQ_TOOLTIP_OPEN_TIME: InjectionToken<() => ScrollStrategy>; +export const KBQ_TOOLTIP_OPEN_TIME: InjectionToken<{ + value: number; +}>; // @public export const KBQ_TOOLTIP_OPEN_TIME_PROVIDER: { - provide: InjectionToken<() => ScrollStrategy>; + provide: InjectionToken<{ + value: number; + }>; useValue: { value: number; }; @@ -50,7 +54,6 @@ export const KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: { // @public (undocumented) export class KbqTooltipComponent extends KbqPopUp { - constructor(openTime: any); // (undocumented) elementRef: ElementRef; // (undocumented) @@ -137,7 +140,7 @@ export class KbqTooltipTrigger extends KbqPopUpTrigger impl // (undocumented) protected overlayConfig: OverlayConfig; // (undocumented) - protected parentPopup: KbqParentPopup | null; + protected parentPopup: KbqParentPopup; // (undocumented) readonly placementChange: EventEmitter; relativeToPointer: boolean; diff --git a/tools/public_api_guard/components/tree-select.api.md b/tools/public_api_guard/components/tree-select.api.md index 53778e23a7..f2f62978b8 100644 --- a/tools/public_api_guard/components/tree-select.api.md +++ b/tools/public_api_guard/components/tree-select.api.md @@ -6,6 +6,7 @@ import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; +import * as _angular_cdk_overlay_module_d from '@angular/cdk/overlay-module.d'; import * as _angular_core from '@angular/core'; import { CanUpdateErrorState } from '@koobiq/components/core'; import { CdkConnectedOverlay } from '@angular/cdk/overlay'; @@ -13,7 +14,6 @@ import { CdkOverlayOrigin } from '@angular/cdk/overlay'; import { ChangeDetectorRef } from '@angular/core'; import { ConnectedPosition } from '@angular/cdk/overlay'; import { ControlValueAccessor } from '@angular/forms'; -import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@koobiq/components/core'; @@ -31,9 +31,7 @@ import { InjectionToken } from '@angular/core'; import { KbqAbstractSelect } from '@koobiq/components/core'; import { KbqCleaner } from '@koobiq/components/form-field'; import { KbqComponentColors } from '@koobiq/components/core'; -import { KbqFormField } from '@koobiq/components/form-field'; import { KbqFormFieldControl } from '@koobiq/components/form-field'; -import { KbqLocaleService } from '@koobiq/components/core'; import { KbqSelectMatcher } from '@koobiq/components/core'; import { KbqSelectSearch } from '@koobiq/components/core'; import { KbqSelectTrigger } from '@koobiq/components/core'; @@ -42,13 +40,11 @@ import { KbqTreeOption } from '@koobiq/components/tree'; import { KbqTreeSelection } from '@koobiq/components/tree'; import { NgControl } from '@angular/forms'; import { NgForm } from '@angular/forms'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { Provider } from '@angular/core'; import { QueryList } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SelectionModel } from '@angular/cdk/collections'; import { Subject } from 'rxjs'; import { TemplateRef } from '@angular/core'; @@ -62,7 +58,7 @@ export const KBQ_TREE_SELECT_OPTIONS: InjectionToken, CanUpdateErrorState { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, ngZone: NgZone, renderer: Renderer2, defaultErrorStateMatcher: ErrorStateMatcher, scrollStrategyFactory: any, dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, parentFormField: KbqFormField, ngControl: NgControl, localeService?: KbqLocaleService | undefined); + constructor(); // (undocumented) get autoSelect(): boolean; set autoSelect(value: boolean); @@ -195,7 +191,7 @@ export class KbqTreeSelect extends KbqAbstractSelect implements AfterContentInit // (undocumented) get required(): boolean; set required(value: boolean); - scrollStrategy: any; + scrollStrategy: _angular_cdk_overlay_module_d.ScrollStrategy; // (undocumented) readonly search: _angular_core.Signal; set searchMinOptionsThreshold(value: 'auto' | number | undefined); @@ -242,7 +238,7 @@ export class KbqTreeSelect extends KbqAbstractSelect implements AfterContentInit // (undocumented) static ɵcmp: _angular_core.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: _angular_core.ɵɵFactoryDeclaration; } // @public diff --git a/tools/public_api_guard/components/tree.api.md b/tools/public_api_guard/components/tree.api.md index a8ece3b07b..fe79ca0080 100644 --- a/tools/public_api_guard/components/tree.api.md +++ b/tools/public_api_guard/components/tree.api.md @@ -7,15 +7,12 @@ import { AfterContentChecked } from '@angular/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; -import { AsyncScheduler } from 'rxjs/internal/scheduler/AsyncScheduler'; import { BehaviorSubject } from 'rxjs'; import { ChangeDetectorRef } from '@angular/core'; -import { Clipboard as Clipboard_2 } from '@angular/cdk/clipboard'; import { CollectionViewer } from '@angular/cdk/collections'; import { ControlValueAccessor } from '@angular/forms'; import { DataSource } from '@angular/cdk/collections'; import { DestroyRef } from '@angular/core'; -import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { FocusKeyManager } from '@koobiq/components/core'; @@ -35,12 +32,10 @@ import { KbqPseudoCheckboxState } from '@koobiq/components/core'; import { KbqTitleTextRef } from '@koobiq/components/core'; import { KbqTooltipTrigger } from '@koobiq/components/tooltip'; import { MultipleMode } from '@koobiq/components/core'; -import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { QueryList } from '@angular/core'; -import { Renderer2 } from '@angular/core'; import { SelectionChange } from '@angular/cdk/collections'; import { SelectionModel } from '@angular/cdk/collections'; import { Subject } from 'rxjs'; @@ -166,7 +161,6 @@ export class KbqTree extends KbqTreeBase { // @public (undocumented) export class KbqTreeBase implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit { - constructor(differs: IterableDiffers, changeDetectorRef: ChangeDetectorRef); // (undocumented) protected changeDetectorRef: ChangeDetectorRef; protected dataDiffer: IterableDiffer; @@ -285,7 +279,7 @@ export class KbqTreeNestedDataSource extends DataSource { // @public (undocumented) export class KbqTreeNode implements IFocusableOption, OnDestroy { - constructor(elementRef: ElementRef, tree: KbqTreeBase); + constructor(); // (undocumented) get data(): T; set data(value: T); @@ -312,7 +306,6 @@ export class KbqTreeNode implements IFocusableOption, OnDestroy { // @public export class KbqTreeNodeDef { - constructor(template: TemplateRef); // (undocumented) readonly data: i0.InputSignal; // (undocumented) @@ -326,7 +319,6 @@ export class KbqTreeNodeDef { // @public (undocumented) export class KbqTreeNodeOutlet { - constructor(viewContainer: ViewContainerRef, changeDetectorRef: ChangeDetectorRef); // (undocumented) changeDetectorRef: ChangeDetectorRef; // (undocumented) @@ -348,7 +340,7 @@ export class KbqTreeNodeOutletContext { // @public (undocumented) export class KbqTreeNodePadding implements AfterViewInit { - constructor(treeNode: KbqTreeNode, tree: KbqTreeBase, renderer: Renderer2, element: ElementRef, option: KbqTreeOption, dir: Directionality); + constructor(); // (undocumented) iconWidth: number; // (undocumented) @@ -375,12 +367,12 @@ export class KbqTreeNodePadding implements AfterViewInit { // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration, "[kbqTreeNodePadding]", ["kbqTreeNodePadding"], { "indent": { "alias": "kbqTreeNodePaddingIndent"; "required": false; }; }, {}, never, never, true, never>; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, null, { optional: true; }]>; + static ɵfac: i0.ɵɵFactoryDeclaration, never>; } // @public export class KbqTreeNodeToggleBaseDirective { - constructor(tree: KbqTreeBase, treeNode: KbqTreeNode); + constructor(); // (undocumented) get disabled(): boolean; set disabled(value: boolean); @@ -419,7 +411,7 @@ export class KbqTreeNodeToggleDirective extends KbqTreeNodeToggleBaseDirectiv // @public (undocumented) export class KbqTreeOption extends KbqTreeNode implements AfterContentInit, KbqTitleTextRef { - constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, ngZone: NgZone, tree: any); + constructor(); // (undocumented) readonly actionButton: i0.Signal; // (undocumented) @@ -438,7 +430,7 @@ export class KbqTreeOption extends KbqTreeNode implements AfterCo get disabled(): any; set disabled(value: any); // (undocumented) - readonly dropdownTrigger: i0.Signal; + dropdownTrigger: KbqDropdownTrigger; // (undocumented) emitSelectionChangeEvent(): void; // (undocumented) @@ -498,7 +490,7 @@ export class KbqTreeOption extends KbqTreeNode implements AfterCo // (undocumented) readonly toggleElementDirective: i0.Signal | undefined>; // (undocumented) - readonly tooltipTrigger: i0.Signal; + tooltipTrigger: KbqTooltipTrigger; // (undocumented) tree: any; // (undocumented) @@ -547,7 +539,7 @@ export const kbqTreeSelectAllValue = "selectAll"; // @public (undocumented) export class KbqTreeSelection extends KbqTreeBase implements ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy { - constructor(elementRef: ElementRef, scheduler: AsyncScheduler, differs: IterableDiffers, changeDetectorRef: ChangeDetectorRef, multiple: MultipleMode, clipboard: Clipboard_2); + constructor(); // (undocumented) get autoSelect(): boolean; set autoSelect(value: boolean); @@ -659,7 +651,7 @@ export class KbqTreeSelection extends KbqTreeBase implements ControlValueAc // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented) diff --git a/yarn.lock b/yarn.lock index 1ee7bec065..e587d1ae75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -406,7 +406,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/architect@npm:0.2003.27": +"@angular-devkit/architect@npm:0.2003.27, @angular-devkit/architect@npm:>= 0.2000.0 < 0.2100.0": version: 0.2003.27 resolution: "@angular-devkit/architect@npm:0.2003.27" dependencies: @@ -570,7 +570,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/core@npm:20.3.27": +"@angular-devkit/core@npm:20.3.27, @angular-devkit/core@npm:>= 20.0.0 < 21.0.0": version: 20.3.27 resolution: "@angular-devkit/core@npm:20.3.27" dependencies: @@ -589,7 +589,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/schematics@npm:20.3.27": +"@angular-devkit/schematics@npm:20.3.27, @angular-devkit/schematics@npm:>= 20.0.0 < 21.0.0": version: 20.3.27 resolution: "@angular-devkit/schematics@npm:20.3.27" dependencies: @@ -602,6 +602,19 @@ __metadata: languageName: node linkType: hard +"@angular-eslint/builder@npm:20.7.0": + version: 20.7.0 + resolution: "@angular-eslint/builder@npm:20.7.0" + dependencies: + "@angular-devkit/architect": "npm:>= 0.2000.0 < 0.2100.0" + "@angular-devkit/core": "npm:>= 20.0.0 < 21.0.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: "*" + checksum: 10c0/3cfbd894d93b52989fe26e583b203e7eef51c4f825fcff98bcff27c0039bf3dbfb756692396759a8bb74790ce7d0e3675fe345111769f773da131afe160ab405 + languageName: node + linkType: hard + "@angular-eslint/bundled-angular-compiler@npm:20.7.0": version: 20.7.0 resolution: "@angular-eslint/bundled-angular-compiler@npm:20.7.0" @@ -609,7 +622,7 @@ __metadata: languageName: node linkType: hard -"@angular-eslint/eslint-plugin-template@npm:^20.7.0": +"@angular-eslint/eslint-plugin-template@npm:20.7.0": version: 20.7.0 resolution: "@angular-eslint/eslint-plugin-template@npm:20.7.0" dependencies: @@ -627,7 +640,7 @@ __metadata: languageName: node linkType: hard -"@angular-eslint/eslint-plugin@npm:^20.7.0": +"@angular-eslint/eslint-plugin@npm:20.7.0": version: 20.7.0 resolution: "@angular-eslint/eslint-plugin@npm:20.7.0" dependencies: @@ -642,7 +655,22 @@ __metadata: languageName: node linkType: hard -"@angular-eslint/template-parser@npm:^20.7.0": +"@angular-eslint/schematics@npm:20.7.0": + version: 20.7.0 + resolution: "@angular-eslint/schematics@npm:20.7.0" + dependencies: + "@angular-devkit/core": "npm:>= 20.0.0 < 21.0.0" + "@angular-devkit/schematics": "npm:>= 20.0.0 < 21.0.0" + "@angular-eslint/eslint-plugin": "npm:20.7.0" + "@angular-eslint/eslint-plugin-template": "npm:20.7.0" + ignore: "npm:7.0.5" + semver: "npm:7.7.3" + strip-json-comments: "npm:3.1.1" + checksum: 10c0/275bd939a530acff911861e84d54dcd54caf49ca8dd2b6ebfdfc361730787b42bfdf00eb832c89603d184f1600075a55544a6f491986b740bc1bbc2e3e4655e9 + languageName: node + linkType: hard + +"@angular-eslint/template-parser@npm:20.7.0": version: 20.7.0 resolution: "@angular-eslint/template-parser@npm:20.7.0" dependencies: @@ -1798,7 +1826,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.10.3, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": version: 7.24.8 resolution: "@babel/parser@npm:7.24.8" bin: @@ -2910,7 +2938,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.10.3, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": +"@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": version: 7.24.8 resolution: "@babel/traverse@npm:7.24.8" dependencies: @@ -2958,7 +2986,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.10.3, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9": version: 7.24.9 resolution: "@babel/types@npm:7.24.9" dependencies: @@ -4768,7 +4796,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": +"@eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: @@ -4779,7 +4807,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.9.1": +"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": version: 4.9.1 resolution: "@eslint-community/eslint-utils@npm:4.9.1" dependencies: @@ -4790,41 +4818,80 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.12.2": +"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.6.1": - version: 4.10.0 - resolution: "@eslint-community/regexpp@npm:4.10.0" - checksum: 10c0/c5f60ef1f1ea7649fa7af0e80a5a79f64b55a8a8fa5086de4727eb4c86c652aedee407a9c143b8995d2c0b2d75c1222bec9ba5d73dbfc1f314550554f0979ef4 +"@eslint/config-array@npm:^0.21.2": + version: 0.21.2 + resolution: "@eslint/config-array@npm:0.21.2" + dependencies: + "@eslint/object-schema": "npm:^2.1.7" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.5" + checksum: 10c0/89dfe815d18456177c0a1f238daf4593107fd20298b3598e0103054360d3b8d09d967defd8318f031185d68df1f95cfa68becf1390a9c5c6887665f1475142e3 languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" +"@eslint/config-helpers@npm:^0.4.2": + version: 0.4.2 + resolution: "@eslint/config-helpers@npm:0.4.2" + dependencies: + "@eslint/core": "npm:^0.17.0" + checksum: 10c0/92efd7a527b2d17eb1a148409d71d80f9ac160b565ac73ee092252e8bf08ecd08670699f46b306b94f13d22e88ac88a612120e7847570dd7cdc72f234d50dcb4 + languageName: node + linkType: hard + +"@eslint/core@npm:^0.17.0": + version: 0.17.0 + resolution: "@eslint/core@npm:0.17.0" dependencies: - ajv: "npm:^6.12.4" + "@types/json-schema": "npm:^7.0.15" + checksum: 10c0/9a580f2246633bc752298e7440dd942ec421860d1946d0801f0423830e67887e4aeba10ab9a23d281727a978eb93d053d1922a587d502942a713607f40ed704e + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.3.5": + version: 3.3.5 + resolution: "@eslint/eslintrc@npm:3.3.5" + dependencies: + ajv: "npm:^6.14.0" debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" ignore: "npm:^5.2.0" import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" + js-yaml: "npm:^4.1.1" + minimatch: "npm:^3.1.5" strip-json-comments: "npm:^3.1.1" - checksum: 10c0/32f67052b81768ae876c84569ffd562491ec5a5091b0c1e1ca1e0f3c24fb42f804952fdd0a137873bc64303ba368a71ba079a6f691cee25beee9722d94cc8573 + checksum: 10c0/9fb9f1ca65e46d6173966e3aaa5bd353e3a65d7f1f582bebf77f578fab7d7960a399fac1ecfb1e7d52bd61f5cefd6531087ca52a3a3c388f2e1b4f1ebd3da8b7 languageName: node linkType: hard -"@eslint/js@npm:8.57.1": - version: 8.57.1 - resolution: "@eslint/js@npm:8.57.1" - checksum: 10c0/b489c474a3b5b54381c62e82b3f7f65f4b8a5eaaed126546520bf2fede5532a8ed53212919fed1e9048dcf7f37167c8561d58d0ba4492a4244004e7793805223 +"@eslint/js@npm:9.39.4, @eslint/js@npm:^9.0.0": + version: 9.39.4 + resolution: "@eslint/js@npm:9.39.4" + checksum: 10c0/5aa7dea2cbc5decf7f5e3b0c6f86a084ccee0f792d288ca8e839f8bc1b64e03e227068968e49b26096e6f71fd857ab6e42691d1b993826b9a3883f1bdd7a0e46 + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.7": + version: 2.1.7 + resolution: "@eslint/object-schema@npm:2.1.7" + checksum: 10c0/936b6e499853d1335803f556d526c86f5fe2259ed241bc665000e1d6353828edd913feed43120d150adb75570cae162cf000b5b0dfc9596726761c36b82f4e87 + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.4.1": + version: 0.4.1 + resolution: "@eslint/plugin-kit@npm:0.4.1" + dependencies: + "@eslint/core": "npm:^0.17.0" + levn: "npm:^0.4.1" + checksum: 10c0/51600f78b798f172a9915dffb295e2ffb44840d583427bc732baf12ecb963eb841b253300e657da91d890f4b323d10a1bd12934bf293e3018d8bb66fdce5217b languageName: node linkType: hard @@ -4956,14 +5023,30 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.13.0": - version: 0.13.0 - resolution: "@humanwhocodes/config-array@npm:0.13.0" +"@humanfs/core@npm:^0.19.2": + version: 0.19.2 + resolution: "@humanfs/core@npm:0.19.2" dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.3" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10c0/205c99e756b759f92e1f44a3dc6292b37db199beacba8f26c2165d4051fe73a4ae52fdcfd08ffa93e7e5cb63da7c88648f0e84e197d154bbbbe137b2e0dd332e + "@humanfs/types": "npm:^0.15.0" + checksum: 10c0/d0a1d52d7b30c27d49475a53072d1510b81c5803e44b342fb8faf3887f1aa27593a1e6dc76a45268e7892d3f4e198146659281f6b6d55eacf3fd5a38bac30c5c + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.6": + version: 0.16.8 + resolution: "@humanfs/node@npm:0.16.8" + dependencies: + "@humanfs/core": "npm:^0.19.2" + "@humanfs/types": "npm:^0.15.0" + "@humanwhocodes/retry": "npm:^0.4.0" + checksum: 10c0/56140579db811af4e160b195d45d0f29acf644d192c93fe24c9e594ebf06f19dfc157494a07c84540b8a071c0e4b37209c2362765d31734f4d0be869c2422e25 + languageName: node + linkType: hard + +"@humanfs/types@npm:^0.15.0": + version: 0.15.0 + resolution: "@humanfs/types@npm:0.15.0" + checksum: 10c0/fc26b9a024b0e55f7eaf64036df94345bf5d36d6a41ef80ef38e78f1f7430ce26cf435af736adae58913baae18eac3f38c18739054a3d379102015978eae862e languageName: node linkType: hard @@ -4974,10 +5057,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.3": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10c0/80520eabbfc2d32fe195a93557cef50dfe8c8905de447f022675aaf66abc33ae54098f5ea78548d925aa671cd4ab7c7daa5ad704fe42358c9b5e7db60f80696c +"@humanwhocodes/retry@npm:^0.4.0, @humanwhocodes/retry@npm:^0.4.2": + version: 0.4.3 + resolution: "@humanwhocodes/retry@npm:0.4.3" + checksum: 10c0/3775bb30087d4440b3f7406d5a057777d90e4b9f435af488a4923ef249e93615fb78565a85f173a186a076c7706a81d0d57d563a2624e4de2c5c9c66c486ce42 languageName: node linkType: hard @@ -6538,7 +6621,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:^1.2.3": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -8423,7 +8506,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:*": +"@types/eslint@npm:*, @types/eslint@npm:^9.0.0": version: 9.6.1 resolution: "@types/eslint@npm:9.6.1" dependencies: @@ -8433,16 +8516,6 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:^8.56.12": - version: 8.56.12 - resolution: "@types/eslint@npm:8.56.12" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10c0/e4ca426abe9d55f82b69a3250bec78b6d340ad1e567f91c97ecc59d3b2d6a1d8494955ac62ad0ea14b97519db580611c02be8277cbea370bdfb0f96aa2910504 - languageName: node - linkType: hard - "@types/esrecurse@npm:^4.3.1": version: 4.3.1 resolution: "@types/esrecurse@npm:4.3.1" @@ -8464,7 +8537,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:1.0.9": +"@types/estree@npm:1.0.9, @types/estree@npm:^1.0.6": version: 1.0.9 resolution: "@types/estree@npm:1.0.9" checksum: 10c0/3ad3286ca2988cd550dafb8f2ad599c8474868e954fa601a36655bdfefd8039f7c714b8c1c7f2ae219ffbd58bd4660e66fa7479a0120fc02d4777057d4865387 @@ -8761,13 +8834,6 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.3.12": - version: 7.5.8 - resolution: "@types/semver@npm:7.5.8" - checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa - languageName: node - linkType: hard - "@types/send@npm:*": version: 0.17.4 resolution: "@types/send@npm:0.17.4" @@ -8880,25 +8946,25 @@ __metadata: languageName: node linkType: hard -"@types/yargs@npm:^17.0.0, @types/yargs@npm:^17.0.8": - version: 17.0.32 - resolution: "@types/yargs@npm:17.0.32" +"@types/yargs@npm:^17.0.33": + version: 17.0.35 + resolution: "@types/yargs@npm:17.0.35" dependencies: "@types/yargs-parser": "npm:*" - checksum: 10c0/2095e8aad8a4e66b86147415364266b8d607a3b95b4239623423efd7e29df93ba81bb862784a6e08664f645cc1981b25fd598f532019174cd3e5e1e689e1cccf + checksum: 10c0/609557826a6b85e73ccf587923f6429850d6dc70e420b455bab4601b670bfadf684b09ae288bccedab042c48ba65f1666133cf375814204b544009f57d6eef63 languageName: node linkType: hard -"@types/yargs@npm:^17.0.33": - version: 17.0.35 - resolution: "@types/yargs@npm:17.0.35" +"@types/yargs@npm:^17.0.8": + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" dependencies: "@types/yargs-parser": "npm:*" - checksum: 10c0/609557826a6b85e73ccf587923f6429850d6dc70e420b455bab4601b670bfadf684b09ae288bccedab042c48ba65f1666133cf375814204b544009f57d6eef63 + checksum: 10c0/2095e8aad8a4e66b86147415364266b8d607a3b95b4239623423efd7e29df93ba81bb862784a6e08664f645cc1981b25fd598f532019174cd3e5e1e689e1cccf languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^8.60.1": +"@typescript-eslint/eslint-plugin@npm:8.60.1": version: 8.60.1 resolution: "@typescript-eslint/eslint-plugin@npm:8.60.1" dependencies: @@ -8918,18 +8984,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:^5.0.0": - version: 5.62.0 - resolution: "@typescript-eslint/experimental-utils@npm:5.62.0" - dependencies: - "@typescript-eslint/utils": "npm:5.62.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/f7037977e00849cd8c03677a88b0659a4f0e0b1e0151aebb47c49c92b8e57408578142df598eac08b364623d926343c724f42494f87662e437b1c89f0b2e815b - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.60.1": +"@typescript-eslint/parser@npm:8.60.1": version: 8.60.1 resolution: "@typescript-eslint/parser@npm:8.60.1" dependencies: @@ -8958,16 +9013,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10c0/861253235576c1c5c1772d23cdce1418c2da2618a479a7de4f6114a12a7ca853011a1e530525d0931c355a8fd237b9cd828fac560f85f9623e24054fd024726f - languageName: node - linkType: hard - "@typescript-eslint/scope-manager@npm:8.30.1": version: 8.30.1 resolution: "@typescript-eslint/scope-manager@npm:8.30.1" @@ -9013,13 +9058,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/types@npm:5.62.0" - checksum: 10c0/7febd3a7f0701c0b927e094f02e82d8ee2cada2b186fcb938bc2b94ff6fbad88237afc304cbaf33e82797078bbbb1baf91475f6400912f8b64c89be79bfa4ddf - languageName: node - linkType: hard - "@typescript-eslint/types@npm:8.30.1": version: 8.30.1 resolution: "@typescript-eslint/types@npm:8.30.1" @@ -9027,31 +9065,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:8.60.1, @typescript-eslint/types@npm:^8.60.1": +"@typescript-eslint/types@npm:8.60.1, @typescript-eslint/types@npm:^8.0.0, @typescript-eslint/types@npm:^8.60.1": version: 8.60.1 resolution: "@typescript-eslint/types@npm:8.60.1" checksum: 10c0/44308007e090ae1ac9cfdc5c2089cf1a82601298f69dd4835f62549e3d36886d41ecb1f84b490603382657481ca4e2ff23de49b97ad09d199dc65ce6c2e00b22 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/d7984a3e9d56897b2481940ec803cb8e7ead03df8d9cfd9797350be82ff765dfcf3cfec04e7355e1779e948da8f02bc5e11719d07a596eb1cb995c48a95e38cf - languageName: node - linkType: hard - "@typescript-eslint/typescript-estree@npm:8.30.1": version: 8.30.1 resolution: "@typescript-eslint/typescript-estree@npm:8.30.1" @@ -9089,25 +9109,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/utils@npm:5.62.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@types/json-schema": "npm:^7.0.9" - "@types/semver": "npm:^7.3.12" - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - eslint-scope: "npm:^5.1.1" - semver: "npm:^7.3.7" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/f09b7d9952e4a205eb1ced31d7684dd55cee40bf8c2d78e923aa8a255318d97279825733902742c09d8690f37a50243f4c4d383ab16bd7aefaf9c4b438f785e1 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.60.1": +"@typescript-eslint/utils@npm:8.60.1, @typescript-eslint/utils@npm:^8.0.0, @typescript-eslint/utils@npm:^8.58.0": version: 8.60.1 resolution: "@typescript-eslint/utils@npm:8.60.1" dependencies: @@ -9137,16 +9139,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10c0/7c3b8e4148e9b94d9b7162a596a1260d7a3efc4e65199693b8025c71c4652b8042501c0bc9f57654c1e2943c26da98c0f77884a746c6ae81389fcb0b513d995d - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:8.30.1": version: 8.30.1 resolution: "@typescript-eslint/visitor-keys@npm:8.30.1" @@ -9167,13 +9159,6 @@ __metadata: languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.2.0": - version: 1.2.0 - resolution: "@ungap/structured-clone@npm:1.2.0" - checksum: 10c0/8209c937cb39119f44eb63cf90c0b73e7c754209a6411c707be08e50e29ee81356dca1a848a405c8bdeebfe2f5e4f831ad310ae1689eeef65e7445c090c6657d - languageName: node - linkType: hard - "@ungap/structured-clone@npm:^1.3.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" @@ -9653,7 +9638,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": +"acorn@npm:^8.4.1, acorn@npm:^8.8.2": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -9815,15 +9800,15 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" +"ajv@npm:^6.14.0": + version: 6.15.0 + resolution: "ajv@npm:6.15.0" dependencies: fast-deep-equal: "npm:^3.1.1" fast-json-stable-stringify: "npm:^2.0.0" json-schema-traverse: "npm:^0.4.1" uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 + checksum: 10c0/67966499dd272ecde1c2e467084411132891523d057487587879d39ac04207f4351b7b2324c83198013967fbfa632c1612adc960114a30770fbe07a0773b32c2 languageName: node linkType: hard @@ -9906,6 +9891,27 @@ __metadata: languageName: node linkType: hard +"angular-eslint@npm:^20.7.0": + version: 20.7.0 + resolution: "angular-eslint@npm:20.7.0" + dependencies: + "@angular-devkit/core": "npm:>= 20.0.0 < 21.0.0" + "@angular-devkit/schematics": "npm:>= 20.0.0 < 21.0.0" + "@angular-eslint/builder": "npm:20.7.0" + "@angular-eslint/eslint-plugin": "npm:20.7.0" + "@angular-eslint/eslint-plugin-template": "npm:20.7.0" + "@angular-eslint/schematics": "npm:20.7.0" + "@angular-eslint/template-parser": "npm:20.7.0" + "@typescript-eslint/types": "npm:^8.0.0" + "@typescript-eslint/utils": "npm:^8.0.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: "*" + typescript-eslint: ^8.0.0 + checksum: 10c0/bfc86fca1c4a6e82fe9fe03eebf051e960e79d0fd41e82349b2220ecdbd143c4c5d1c2a15149e84104ecea2f33657ed6179c45a1c96ac2fe7739b6b141f4b772 + languageName: node + linkType: hard + "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -10450,17 +10456,6 @@ __metadata: languageName: node linkType: hard -"bent@npm:~7.3.6": - version: 7.3.12 - resolution: "bent@npm:7.3.12" - dependencies: - bytesish: "npm:^0.4.1" - caseless: "npm:~0.12.0" - is-stream: "npm:^2.0.0" - checksum: 10c0/20f77364bcb462a6eb0ea7322442a1125ca6181ea6b94ad498b8348c678a2adf56c231a653bcac016c5d017aee91ff55b2169b69d8263a4b3c710f4121cbe615 - languageName: node - linkType: hard - "big.js@npm:^5.2.2": version: 5.2.2 resolution: "big.js@npm:5.2.2" @@ -10793,13 +10788,6 @@ __metadata: languageName: node linkType: hard -"bytesish@npm:^0.4.1": - version: 0.4.4 - resolution: "bytesish@npm:0.4.4" - checksum: 10c0/469088f0020797dfbb61b6ce3972c91d95d79df8aacca55841ea93ac59ef3209bb04be8212b6265dfbafb7583a58dd73ca2f14e4feae36d3333a4f1509dd2eef - languageName: node - linkType: hard - "cacache@npm:^18.0.0": version: 18.0.2 resolution: "cacache@npm:18.0.2" @@ -10979,13 +10967,6 @@ __metadata: languageName: node linkType: hard -"caseless@npm:~0.12.0": - version: 0.12.0 - resolution: "caseless@npm:0.12.0" - checksum: 10c0/ccf64bcb6c0232cdc5b7bd91ddd06e23a4b541f138336d4725233ac538041fb2f29c2e86c3c4a7a61ef990b665348db23a047060b9414c3a6603e9fa61ad4626 - languageName: node - linkType: hard - "chalk-template@npm:^1.1.0": version: 1.1.0 resolution: "chalk-template@npm:1.1.0" @@ -11013,7 +10994,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2, chalk@npm:~4.1.0": +"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -11501,13 +11482,6 @@ __metadata: languageName: node linkType: hard -"common-tags@npm:^1.8.0": - version: 1.8.2 - resolution: "common-tags@npm:1.8.2" - checksum: 10c0/23efe47ff0a1a7c91489271b3a1e1d2a171c12ec7f9b35b29b2fce51270124aff0ec890087e2bc2182c1cb746e232ab7561aaafe05f1e7452aea733d2bfe3f63 - languageName: node - linkType: hard - "commondir@npm:^1.0.1": version: 1.0.1 resolution: "commondir@npm:1.0.1" @@ -12030,7 +12004,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -12041,7 +12015,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.5": +"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.5, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" dependencies: @@ -12454,10 +12428,10 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^5.0.0": - version: 5.0.1 - resolution: "decamelize@npm:5.0.1" - checksum: 10c0/3da71022bc1e85487810fa0833138effb599fa331ca21e179650e93a765d0c4dabeb1ecdd6ad1474fa0bacd2457953c63ea335afb6e53b35f2b4bf779514e2a3 +"decamelize@npm:^6.0.1": + version: 6.0.1 + resolution: "decamelize@npm:6.0.1" + checksum: 10c0/c0a3a529591ebab1d1a9458b60684194e91d904e9b0a56367d3d507b2c8ab89dfd40c61423ca6a1eb2f70e2d44d2efe78f3342326395d3738d1d42592b1a6224 languageName: node linkType: hard @@ -12729,15 +12703,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/c96bdccabe9d62ab6fea9399fdff04a66e6563c1d6fb3a3a063e8d53c3bb136ba63e84250bbf63d00086a769ad53aef92d2bd483f03f837fc97b71cbee6b2520 - languageName: node - linkType: hard - "dom-serializer@npm:^2.0.0": version: 2.0.0 resolution: "dom-serializer@npm:2.0.0" @@ -13560,20 +13525,6 @@ __metadata: languageName: node linkType: hard -"eslint-etc@npm:^5.1.0": - version: 5.2.1 - resolution: "eslint-etc@npm:5.2.1" - dependencies: - "@typescript-eslint/experimental-utils": "npm:^5.0.0" - tsutils: "npm:^3.17.1" - tsutils-etc: "npm:^1.4.1" - peerDependencies: - eslint: ^8.0.0 - typescript: ">=4.0.0" - checksum: 10c0/628f9d65e16f7c7d06c663256d39f5e72f508a515d2712b0bcb329dbb9e7a1a4f175292c3477c83be9cc8a75deea5f050a00c3dc9b084af6b651d46ee8360a9e - languageName: node - linkType: hard - "eslint-plugin-file-progress@npm:^1.5.0": version: 1.5.0 resolution: "eslint-plugin-file-progress@npm:1.5.0" @@ -13617,27 +13568,25 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-rxjs@npm:^5.0.3": - version: 5.0.3 - resolution: "eslint-plugin-rxjs@npm:5.0.3" - dependencies: - "@typescript-eslint/experimental-utils": "npm:^5.0.0" - common-tags: "npm:^1.8.0" - decamelize: "npm:^5.0.0" - eslint-etc: "npm:^5.1.0" - requireindex: "npm:~1.2.0" - rxjs-report-usage: "npm:^1.0.4" - tslib: "npm:^2.0.0" - tsutils: "npm:^3.0.0" - tsutils-etc: "npm:^1.4.1" +"eslint-plugin-rxjs-x@npm:^1.0.0": + version: 1.0.2 + resolution: "eslint-plugin-rxjs-x@npm:1.0.2" + dependencies: + "@typescript-eslint/utils": "npm:^8.58.0" + decamelize: "npm:^6.0.1" + ts-api-utils: "npm:^2.5.0" peerDependencies: - eslint: ^8.0.0 - typescript: ">=4.0.0" - checksum: 10c0/bba2048a6772ec017e63c9201642c90043365308f2d386b448a28b91f7195a7f65ebb39705bb886f89bcc4fe1ffbd18bd2b25bf8f389bc5cae592828dbfe9d58 + eslint: ^10.0.1 + rxjs: ^7.2.0 + typescript: ">=4.8.4 <6.1.0" + peerDependenciesMeta: + rxjs: + optional: true + checksum: 10c0/2af7669ad52b0880043ec8c1860614257f72648e8c08579935593b53540194510d5d005dc9592aac0894b04f1af0f4d9d4456dc7c6d27d69ae07f14c4a6c8394 languageName: node linkType: hard -"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -13647,13 +13596,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" +"eslint-scope@npm:^8.4.0": + version: 8.4.0 + resolution: "eslint-scope@npm:8.4.0" dependencies: esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10c0/613c267aea34b5a6d6c00514e8545ef1f1433108097e857225fed40d397dd6b1809dffd11c2fde23b37ca53d7bf935fe04d2a18e6fc932b31837b6ad67e1c116 + checksum: 10c0/407f6c600204d0f3705bd557f81bd0189e69cd7996f408f8971ab5779c0af733d1af2f1412066b40ee1588b085874fc37a2333986c6521669cdbdd36ca5058e0 languageName: node linkType: hard @@ -13669,7 +13618,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 @@ -13683,6 +13632,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-visitor-keys@npm:4.2.1" + checksum: 10c0/fcd43999199d6740db26c58dbe0c2594623e31ca307e616ac05153c9272f12f1364f5a0b1917a8e962268fdecc6f3622c1c2908b4fcc2e047a106fe6de69dc43 + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^5.0.0": version: 5.0.1 resolution: "eslint-visitor-keys@npm:5.0.1" @@ -13690,51 +13646,63 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.57.1": - version: 8.57.1 - resolution: "eslint@npm:8.57.1" +"eslint@npm:^9.0.0": + version: 9.39.4 + resolution: "eslint@npm:9.39.4" dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.1" - "@humanwhocodes/config-array": "npm:^0.13.0" + "@eslint-community/eslint-utils": "npm:^4.8.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.21.2" + "@eslint/config-helpers": "npm:^0.4.2" + "@eslint/core": "npm:^0.17.0" + "@eslint/eslintrc": "npm:^3.3.5" + "@eslint/js": "npm:9.39.4" + "@eslint/plugin-kit": "npm:^0.4.1" + "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" + ajv: "npm:^6.14.0" chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" + cross-spawn: "npm:^7.0.6" debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" + eslint-scope: "npm:^8.4.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + esquery: "npm:^1.5.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" + file-entry-cache: "npm:^8.0.0" find-up: "npm:^5.0.0" glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" ignore: "npm:^5.2.0" imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" + minimatch: "npm:^3.1.5" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true bin: eslint: bin/eslint.js - checksum: 10c0/1fd31533086c1b72f86770a4d9d7058ee8b4643fd1cfd10c7aac1ecb8725698e88352a87805cf4b2ce890aa35947df4b4da9655fb7fdfa60dbb448a43f6ebcf1 + checksum: 10c0/1955067c2d991f0c84f4c4abfafe31bb47fa3b717a7fd3e43fe1e511c6f859d7700cbca969f85661dc4c130f7aeced5e5444884314198a54428f5e5141db9337 + languageName: node + linkType: hard + +"espree@npm:^10.0.1, espree@npm:^10.4.0": + version: 10.4.0 + resolution: "espree@npm:10.4.0" + dependencies: + acorn: "npm:^8.15.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10c0/c63fe06131c26c8157b4083313cb02a9a54720a08e21543300e55288c40e06c3fc284bdecf108d3a1372c5934a0a88644c98714f38b6ae8ed272b40d9ea08d6b languageName: node linkType: hard @@ -13749,17 +13717,6 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.6.0, espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10c0/1a2e9b4699b715347f62330bcc76aee224390c28bb02b31a3752e9d07549c473f5f986720483c6469cf3cfb3c9d05df612ffc69eb1ee94b54b739e67de9bb460 - languageName: node - linkType: hard - "esprima@npm:^4.0.0, esprima@npm:^4.0.1": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -13770,12 +13727,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" +"esquery@npm:^1.5.0": + version: 1.7.0 + resolution: "esquery@npm:1.7.0" dependencies: estraverse: "npm:^5.1.0" - checksum: 10c0/a084bd049d954cc88ac69df30534043fb2aee5555b56246493f42f27d1e168f00d9e5d4192e46f10290d312dc30dc7d58994d61a609c579c1219d636996f9213 + checksum: 10c0/77d5173db450b66f3bc685d11af4c90cffeedb340f34a39af96d43509a335ce39c894fd79233df32d38f5e4e219fa0f7076f6ec90bae8320170ba082c0db4793 languageName: node linkType: hard @@ -14374,12 +14331,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10c0/58473e8a82794d01b38e5e435f6feaf648e3f36fdb3a56e98f417f4efae71ad1c0d4ebd8a9a7c50c3ad085820a93fc7494ad721e0e4ebc1da3573f4e1c3c7cdd + flat-cache: "npm:^4.0.0" + checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 languageName: node linkType: hard @@ -14644,14 +14601,13 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^3.0.4": - version: 3.2.0 - resolution: "flat-cache@npm:3.2.0" +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" dependencies: flatted: "npm:^3.2.9" - keyv: "npm:^4.5.3" - rimraf: "npm:^3.0.2" - checksum: 10c0/b76f611bd5f5d68f7ae632e3ae503e678d205cf97a17c6ab5b12f6ca61188b5f1f7464503efae6dc18683ed8f0b41460beb48ac4b9ac63fe6201296a91ba2f75 + keyv: "npm:^4.5.4" + checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc languageName: node linkType: hard @@ -15246,7 +15202,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:~7.2.0": +"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -15318,12 +15274,17 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10c0/d3c11aeea898eb83d5ec7a99508600fbe8f83d2cf00cbb77f873dbf2bcb39428eff1b538e4915c993d8a3b3473fa71eeebfe22c9bb3a3003d1e26b1f2c8a42cd +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d + languageName: node + linkType: hard + +"globals@npm:^16.0.0": + version: 16.5.0 + resolution: "globals@npm:16.5.0" + checksum: 10c0/615241dae7851c8012f5aa0223005b1ed6607713d6813de0741768bd4ddc39353117648f1a7086b4b0fa45eae733f1c0a0fe369aa4e543bb63f8de8990178ea9 languageName: node linkType: hard @@ -15454,13 +15415,6 @@ __metadata: languageName: node linkType: hard -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - "gtoken@npm:^7.0.0": version: 7.1.0 resolution: "gtoken@npm:7.1.0" @@ -15986,6 +15940,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:7.0.5, ignore@npm:^7.0.4, ignore@npm:^7.0.5": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d + languageName: node + linkType: hard + "ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.1 resolution: "ignore@npm:5.3.1" @@ -15993,13 +15954,6 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^7.0.4, ignore@npm:^7.0.5": - version: 7.0.5 - resolution: "ignore@npm:7.0.5" - checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d - languageName: node - linkType: hard - "image-size@npm:~0.5.0": version: 0.5.5 resolution: "image-size@npm:0.5.5" @@ -16450,7 +16404,7 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": +"is-path-inside@npm:^3.0.2": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: 10c0/cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05 @@ -17536,6 +17490,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.1": + version: 4.2.0 + resolution: "js-yaml@npm:4.2.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/1916456c118746603b067d74bbcbb0445d9a1d5e474ad4ae775e7b20525bed902e01d9d97dd0c81fcd8d4f596162309d0eb057f4aa38f3e9647f14075e9dea45 + languageName: node + linkType: hard + "jsbn@npm:1.1.0": version: 1.1.0 resolution: "jsbn@npm:1.1.0" @@ -17853,7 +17818,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3, keyv@npm:^4.5.4": +"keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -17887,13 +17852,6 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^3.0.3": - version: 3.0.3 - resolution: "kleur@npm:3.0.3" - checksum: 10c0/cd3a0b8878e7d6d3799e54340efe3591ca787d9f95f109f28129bdd2915e37807bf8918bb295ab86afb8c82196beec5a1adcaf29042ce3f2bd932b038fe3aa4b - languageName: node - linkType: hard - "known-css-properties@npm:^0.37.0": version: 0.37.0 resolution: "known-css-properties@npm:0.37.0" @@ -17911,9 +17869,6 @@ __metadata: "@angular-devkit/build-angular": "npm:20.3.27" "@angular-devkit/core": "npm:20.3.27" "@angular-devkit/schematics": "npm:20.3.27" - "@angular-eslint/eslint-plugin": "npm:^20.7.0" - "@angular-eslint/eslint-plugin-template": "npm:^20.7.0" - "@angular-eslint/template-parser": "npm:^20.7.0" "@angular/animations": "npm:20.3.24" "@angular/cdk": "npm:20.2.14" "@angular/cli": "npm:20.3.27" @@ -17934,6 +17889,7 @@ __metadata: "@docsearch/css": "npm:^3.9.0" "@docsearch/js": "npm:^3.9.0" "@eslint-community/eslint-plugin-eslint-comments": "npm:^4.5.0" + "@eslint/js": "npm:^9.0.0" "@fontsource/inter": "npm:^5.2.8" "@fontsource/jetbrains-mono": "npm:^5.2.6" "@koobiq/ag-grid-angular-theme": "npm:^34.3.1" @@ -17964,7 +17920,7 @@ __metadata: "@types/chalk": "npm:^2.2.0" "@types/conventional-changelog": "npm:^3.1.5" "@types/conventional-changelog-writer": "npm:^4.0.10" - "@types/eslint": "npm:^8.56.12" + "@types/eslint": "npm:^9.0.0" "@types/express": "npm:^4.17.21" "@types/fs-extra": "npm:^5.1.0" "@types/glob": "npm:^7.1.4" @@ -17977,10 +17933,9 @@ __metadata: "@types/nunjucks": "npm:^3.2.1" "@types/spdx-satisfies": "npm:^0.1.2" "@types/ws": "npm:<8.18.2" - "@typescript-eslint/eslint-plugin": "npm:^8.60.1" - "@typescript-eslint/parser": "npm:^8.60.1" ag-grid-angular: "npm:^34.3.1" ag-grid-community: "npm:^34.3.1" + angular-eslint: "npm:^20.7.0" autoprefixer: "npm:^10.4.21" chalk: "npm:^4.1.2" commander: "npm:^11.1.0" @@ -17989,16 +17944,17 @@ __metadata: conventional-changelog-writer: "npm:5.0.1" cspell: "npm:^8.19.4" dotenv: "npm:^16.6.1" - eslint: "npm:^8.57.1" + eslint: "npm:^9.0.0" eslint-config-prettier: "npm:^9.1.2" eslint-plugin-file-progress: "npm:^1.5.0" eslint-plugin-prettier: "npm:^5.5.6" eslint-plugin-promise: "npm:^7.3.0" - eslint-plugin-rxjs: "npm:^5.0.3" + eslint-plugin-rxjs-x: "npm:^1.0.0" express: "npm:^4.22.1" firebase-tools: "npm:^15.3.1" fs-extra: "npm:^5.0.0" glob: "npm:^7.1.3" + globals: "npm:^16.0.0" highlight.js: "npm:^11.11.1" husky: "npm:^9.1.7" inquirer: "npm:^7.3.3" @@ -18039,6 +17995,7 @@ __metadata: tsickle: "npm:^0.39.1" tslib: "npm:^2.8.1" typescript: "npm:5.8.3" + typescript-eslint: "npm:^8.60.1" zone.js: "npm:~0.16.2" languageName: unknown linkType: soft @@ -19145,7 +19102,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -19154,6 +19111,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^3.1.5": + version: 3.1.5 + resolution: "minimatch@npm:3.1.5" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10c0/2ecbdc0d33f07bddb0315a8b5afbcb761307a8778b48f0b312418ccbced99f104a2d17d8aca7573433c70e8ccd1c56823a441897a45e384ea76ef401a26ace70 + languageName: node + linkType: hard + "minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -21445,16 +21411,6 @@ __metadata: languageName: node linkType: hard -"prompts@npm:~2.4.2": - version: 2.4.2 - resolution: "prompts@npm:2.4.2" - dependencies: - kleur: "npm:^3.0.3" - sisteransi: "npm:^1.0.5" - checksum: 10c0/16f1ac2977b19fe2cf53f8411cc98db7a3c8b115c479b2ca5c82b5527cd937aa405fa04f9a5960abeb9daef53191b53b4d13e35c1f5d50e8718c76917c5f1ea4 - languageName: node - linkType: hard - "proto-list@npm:~1.2.1": version: 1.2.4 resolution: "proto-list@npm:1.2.4" @@ -22114,13 +22070,6 @@ __metadata: languageName: node linkType: hard -"requireindex@npm:~1.2.0": - version: 1.2.0 - resolution: "requireindex@npm:1.2.0" - checksum: 10c0/7fb42aed73bf8de9acc4d6716cf07acc7fbe180e58729433bafcf702e76e7bb10e54f8266c06bfec62d752e0ac14d50e8758833de539e6f4e2cd642077866153 - languageName: node - linkType: hard - "requires-port@npm:^1.0.0": version: 1.0.0 resolution: "requires-port@npm:1.0.0" @@ -22309,17 +22258,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 - languageName: node - linkType: hard - "rimraf@npm:^5.0.1, rimraf@npm:^5.0.10": version: 5.0.10 resolution: "rimraf@npm:5.0.10" @@ -22774,23 +22712,6 @@ __metadata: languageName: node linkType: hard -"rxjs-report-usage@npm:^1.0.4": - version: 1.0.6 - resolution: "rxjs-report-usage@npm:1.0.6" - dependencies: - "@babel/parser": "npm:^7.10.3" - "@babel/traverse": "npm:^7.10.3" - "@babel/types": "npm:^7.10.3" - bent: "npm:~7.3.6" - chalk: "npm:~4.1.0" - glob: "npm:~7.2.0" - prompts: "npm:~2.4.2" - bin: - rxjs-report-usage: bin/rxjs-report-usage - checksum: 10c0/f87af567fcce83644cd028de6aaba5ee7555c85fc5b7f075068c4e48088b220721548c1b0cef9e8452def26257a098e732e062e82e494f236cf9ed5748bd8e5b - languageName: node - linkType: hard - "rxjs@npm:7.8.2, rxjs@npm:^7.8.2": version: 7.8.2 resolution: "rxjs@npm:7.8.2" @@ -23014,6 +22935,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:7.7.3": + version: 7.7.3 + resolution: "semver@npm:7.7.3" + bin: + semver: bin/semver.js + checksum: 10c0/4afe5c986567db82f44c8c6faef8fe9df2a9b1d98098fc1721f57c696c4c21cebd572f297fc21002f81889492345b8470473bc6f4aff5fb032a6ea59ea2bc45e + languageName: node + linkType: hard + "semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" @@ -23398,13 +23328,6 @@ __metadata: languageName: node linkType: hard -"sisteransi@npm:^1.0.5": - version: 1.0.5 - resolution: "sisteransi@npm:1.0.5" - checksum: 10c0/230ac975cca485b7f6fe2b96a711aa62a6a26ead3e6fb8ba17c5a00d61b8bed0d7adc21f5626b70d7c33c62ff4e63933017a6462942c719d1980bb0b1207ad46 - languageName: node - linkType: hard - "skin-tone@npm:^2.0.0": version: 2.0.0 resolution: "skin-tone@npm:2.0.0" @@ -24009,7 +23932,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd @@ -24473,13 +24396,6 @@ __metadata: languageName: node linkType: hard -"text-table@npm:^0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10c0/02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c - languageName: node - linkType: hard - "thenify-all@npm:^1.0.0": version: 1.6.0 resolution: "thenify-all@npm:1.6.0" @@ -24965,7 +24881,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.0": +"tslib@npm:^1.9.0": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 @@ -24986,33 +24902,6 @@ __metadata: languageName: node linkType: hard -"tsutils-etc@npm:^1.4.1": - version: 1.4.2 - resolution: "tsutils-etc@npm:1.4.2" - dependencies: - "@types/yargs": "npm:^17.0.0" - yargs: "npm:^17.0.0" - peerDependencies: - tsutils: ^3.0.0 - typescript: ">=4.0.0" - bin: - ts-flags: bin/ts-flags - ts-kind: bin/ts-kind - checksum: 10c0/7b07273627f2f4af2a785a073d0fead7c0c0d1133fee68e5de19f2aca4b01ea35a08de2c97e75f58fb6ba6ddb03ad490abf056bb8b71fb01e84bfed1b8a24a0d - languageName: node - linkType: hard - -"tsutils@npm:^3.0.0, tsutils@npm:^3.17.1, tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" - dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 10c0/02f19e458ec78ead8fffbf711f834ad8ecd2cc6ade4ec0320790713dccc0a412b99e7fd907c4cda2a1dc602c75db6f12e0108e87a5afad4b2f9e90a24cabd5a2 - languageName: node - linkType: hard - "tuf-js@npm:^4.1.0": version: 4.1.0 resolution: "tuf-js@npm:4.1.0" @@ -25168,6 +25057,21 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^8.60.1": + version: 8.60.1 + resolution: "typescript-eslint@npm:8.60.1" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:8.60.1" + "@typescript-eslint/parser": "npm:8.60.1" + "@typescript-eslint/typescript-estree": "npm:8.60.1" + "@typescript-eslint/utils": "npm:8.60.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.1.0" + checksum: 10c0/75a42e14b4a7446dd9ad992422135f696e0af58d7c0f64ff2d9f157f1df7bac6a089fa7a35454d2393eadd329e602c0002c07043bbcf4906f7007e45e783b54e + languageName: node + linkType: hard + "typescript@npm:5.8.2": version: 5.8.2 resolution: "typescript@npm:5.8.2"