diff --git a/docs/config.json b/docs/config.json index 03bc29afe7..11a32c4323 100644 --- a/docs/config.json +++ b/docs/config.json @@ -1045,6 +1045,10 @@ { "label": "Angular Router", "to": "framework/angular/examples/router" + }, + { + "label": "RxJS autocomplete", + "to": "framework/angular/examples/rxjs" } ] } diff --git a/examples/angular/basic/src/app/components/post.component.html b/examples/angular/basic/src/app/components/post.component.html index da69eec04b..34b36e94fc 100644 --- a/examples/angular/basic/src/app/components/post.component.html +++ b/examples/angular/basic/src/app/components/post.component.html @@ -2,10 +2,10 @@
Back
- @if (postQuery.status() === 'pending') { + @if (postQuery.isPending()) { Loading... - } @else if (postQuery.status() === 'error') { - Error: {{ postQuery.error()?.message }} + } @else if (postQuery.isError()) { + Error: {{ postQuery.error().message }} } @if (postQuery.data(); as post) {

{{ post.title }}

diff --git a/examples/angular/basic/src/index.html b/examples/angular/basic/src/index.html index 8a23987703..53168b1751 100644 --- a/examples/angular/basic/src/index.html +++ b/examples/angular/basic/src/index.html @@ -2,7 +2,7 @@ - Angular Query basic example + TanStack Query Angular basic example diff --git a/examples/angular/router/src/app/components/post.component.html b/examples/angular/router/src/app/components/post.component.html index b493fb9536..9ca755e387 100644 --- a/examples/angular/router/src/app/components/post.component.html +++ b/examples/angular/router/src/app/components/post.component.html @@ -2,10 +2,10 @@
Back
- @if (postQuery.status() === 'pending') { + @if (postQuery.isPending()) { Loading... - } @else if (postQuery.status() === 'error') { - Error: {{ postQuery.error()?.message }} + } @else if (postQuery.isError()) { + Error: {{ postQuery.error().message }} } @if (postQuery.data(); as post) {

{{ post.title }}

diff --git a/examples/angular/router/src/app/components/post.component.ts b/examples/angular/router/src/app/components/post.component.ts index a8a2196798..6fe83fe643 100644 --- a/examples/angular/router/src/app/components/post.component.ts +++ b/examples/angular/router/src/app/components/post.component.ts @@ -20,6 +20,9 @@ import { PostsService } from '../services/posts-service' export default class PostComponent { #postsService = inject(PostsService) + // The Angular router will automatically bind postId + // as `withComponentInputBinding` is added to `provideRouter`. + // See https://angular.dev/api/router/withComponentInputBinding postId = input.required({ transform: numberAttribute, }) diff --git a/examples/angular/router/src/index.html b/examples/angular/router/src/index.html index 23585df9a8..2efe6b0718 100644 --- a/examples/angular/router/src/index.html +++ b/examples/angular/router/src/index.html @@ -2,7 +2,7 @@ - Angular Query router example + TanStack Query Angular router example diff --git a/examples/angular/rxjs/.devcontainer/devcontainer.json b/examples/angular/rxjs/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/rxjs/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/rxjs/.eslintrc.cjs b/examples/angular/rxjs/.eslintrc.cjs new file mode 100644 index 0000000000..cca134ce16 --- /dev/null +++ b/examples/angular/rxjs/.eslintrc.cjs @@ -0,0 +1,6 @@ +// @ts-check + +/** @type {import('eslint').Linter.Config} */ +const config = {} + +module.exports = config diff --git a/examples/angular/rxjs/README.md b/examples/angular/rxjs/README.md new file mode 100644 index 0000000000..bc63a82b7f --- /dev/null +++ b/examples/angular/rxjs/README.md @@ -0,0 +1,6 @@ +# TanStack Query Angular RxJS Example + +To run this example: + +- `npm install` or `yarn` or `pnpm i` or `bun i` +- `npm run start` or `yarn start` or `pnpm start` or `bun start` diff --git a/examples/angular/rxjs/angular.json b/examples/angular/rxjs/angular.json new file mode 100644 index 0000000000..c105727c39 --- /dev/null +++ b/examples/angular/rxjs/angular.json @@ -0,0 +1,104 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "cli": { + "packageManager": "pnpm", + "analytics": false, + "cache": { + "enabled": false + } + }, + "newProjectRoot": "projects", + "projects": { + "basic": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "inlineTemplate": true, + "inlineStyle": true, + "skipTests": true + }, + "@schematics/angular:class": { + "skipTests": true + }, + "@schematics/angular:directive": { + "skipTests": true + }, + "@schematics/angular:guard": { + "skipTests": true + }, + "@schematics/angular:interceptor": { + "skipTests": true + }, + "@schematics/angular:pipe": { + "skipTests": true + }, + "@schematics/angular:resolver": { + "skipTests": true + }, + "@schematics/angular:service": { + "skipTests": true + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/basic", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "assets": ["src/favicon.ico", "src/mockServiceWorker.js"], + "styles": [], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "basic:build:production" + }, + "development": { + "buildTarget": "basic:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "basic:build" + } + } + } + } + } +} diff --git a/examples/angular/rxjs/package.json b/examples/angular/rxjs/package.json new file mode 100644 index 0000000000..f859c976a4 --- /dev/null +++ b/examples/angular/rxjs/package.json @@ -0,0 +1,31 @@ +{ + "name": "@tanstack/query-example-angular-rxjs", + "private": true, + "type": "module", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development" + }, + "dependencies": { + "@angular/cdk": "17.3.10", + "@angular/common": "^17.3.12", + "@angular/compiler": "^17.3.12", + "@angular/core": "^17.3.12", + "@angular/forms": "17.3.12", + "@angular/platform-browser": "^17.3.12", + "@angular/platform-browser-dynamic": "^17.3.12", + "@tanstack/angular-query-experimental": "^5.56.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.3", + "zone.js": "^0.14.8" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.12", + "@tanstack/angular-query-devtools-experimental": "^5.58.0", + "typescript": "5.3.3" + } +} diff --git a/examples/angular/rxjs/src/app/api/autocomplete-mock.interceptor.ts b/examples/angular/rxjs/src/app/api/autocomplete-mock.interceptor.ts new file mode 100644 index 0000000000..936619a3fc --- /dev/null +++ b/examples/angular/rxjs/src/app/api/autocomplete-mock.interceptor.ts @@ -0,0 +1,51 @@ +import { HttpResponse } from '@angular/common/http' +import { delayWhen, of, timer } from 'rxjs' +import type { Observable } from 'rxjs' +import type { HttpEvent, HttpInterceptorFn } from '@angular/common/http' + +export const autocompleteMockInterceptor: HttpInterceptorFn = ( + req, + next, +): Observable> => { + const { url } = req + + if (url.includes('/api/autocomplete')) { + const term = new URLSearchParams(req.url.split('?')[1]).get('term') || '' + + const data = [ + 'C#', + 'C++', + 'Go', + 'Java', + 'JavaScript', + 'Kotlin', + 'Lisp', + 'Objective-C', + 'PHP', + 'Perl', + 'Python', + 'R', + 'Ruby', + 'Rust', + 'SQL', + 'Scala', + 'Shell', + 'Swift', + 'TypeScript', + ] + + // Simulate network latency with a random delay between 100ms and 500ms + const delayDuration = Math.random() * (500 - 100) + 100 + return of( + new HttpResponse({ + status: 200, + body: { + suggestions: data.filter((item) => + item.toLowerCase().startsWith(term.toLowerCase()), + ), + }, + }), + ).pipe(delayWhen(() => timer(delayDuration))) + } + return next(req) +} diff --git a/examples/angular/rxjs/src/app/app.component.ts b/examples/angular/rxjs/src/app/app.component.ts new file mode 100644 index 0000000000..cc0dc44f09 --- /dev/null +++ b/examples/angular/rxjs/src/app/app.component.ts @@ -0,0 +1,12 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental' +import { ExampleComponent } from './components/example.component' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'app-root', + standalone: true, + template: ``, + imports: [AngularQueryDevtools, ExampleComponent], +}) +export class AppComponent {} diff --git a/examples/angular/rxjs/src/app/app.config.ts b/examples/angular/rxjs/src/app/app.config.ts new file mode 100644 index 0000000000..e9131c8f59 --- /dev/null +++ b/examples/angular/rxjs/src/app/app.config.ts @@ -0,0 +1,29 @@ +import { + provideHttpClient, + withFetch, + withInterceptors, +} from '@angular/common/http' +import { + QueryClient, + provideAngularQuery, +} from '@tanstack/angular-query-experimental' +import { autocompleteMockInterceptor } from './api/autocomplete-mock.interceptor' +import type { ApplicationConfig } from '@angular/core' + +export const appConfig: ApplicationConfig = { + providers: [ + provideAngularQuery( + new QueryClient({ + defaultOptions: { + queries: { + gcTime: 1000 * 60 * 60 * 24, // 24 hours + }, + }, + }), + ), + provideHttpClient( + withFetch(), + withInterceptors([autocompleteMockInterceptor]), + ), + ], +} diff --git a/examples/angular/rxjs/src/app/components/example.component.html b/examples/angular/rxjs/src/app/components/example.component.html new file mode 100644 index 0000000000..67a6d0ea3d --- /dev/null +++ b/examples/angular/rxjs/src/app/components/example.component.html @@ -0,0 +1,13 @@ +

Search for a programming language

+ +
+ + + @if (query.isSuccess() && query.data().suggestions.length) { +
    + @for (suggestion of query.data().suggestions; track suggestion) { +
  • {{ suggestion }}
  • + } +
+ } +
diff --git a/examples/angular/rxjs/src/app/components/example.component.ts b/examples/angular/rxjs/src/app/components/example.component.ts new file mode 100644 index 0000000000..a2bd4571b4 --- /dev/null +++ b/examples/angular/rxjs/src/app/components/example.component.ts @@ -0,0 +1,45 @@ +import { ChangeDetectionStrategy, Component, inject } from '@angular/core' +import { toSignal } from '@angular/core/rxjs-interop' +import { NonNullableFormBuilder, ReactiveFormsModule } from '@angular/forms' +import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental' +import { + injectQuery, + keepPreviousData, +} from '@tanstack/angular-query-experimental' +import { debounceTime, distinctUntilChanged, lastValueFrom } from 'rxjs' +import { AutocompleteService } from '../services/autocomplete-service' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'example', + standalone: true, + templateUrl: './example.component.html', + imports: [AngularQueryDevtools, ReactiveFormsModule], +}) +export class ExampleComponent { + #autocompleteService = inject(AutocompleteService) + #fb = inject(NonNullableFormBuilder) + + form = this.#fb.group({ + term: '', + }) + + term = toSignal( + this.form.controls.term.valueChanges.pipe( + debounceTime(300), + distinctUntilChanged(), + ), + { initialValue: '' }, + ) + + query = injectQuery(() => ({ + queryKey: ['suggestions', this.term()], + queryFn: () => { + return lastValueFrom( + this.#autocompleteService.getSuggestions(this.term()), + ) + }, + placeholderData: keepPreviousData, + staleTime: 1000 * 60 * 5, // 5 minutes + })) +} diff --git a/examples/angular/rxjs/src/app/services/autocomplete-service.ts b/examples/angular/rxjs/src/app/services/autocomplete-service.ts new file mode 100644 index 0000000000..4a1e044343 --- /dev/null +++ b/examples/angular/rxjs/src/app/services/autocomplete-service.ts @@ -0,0 +1,18 @@ +import { HttpClient } from '@angular/common/http' +import { Injectable, inject } from '@angular/core' +import { of } from 'rxjs' + +interface Response { + suggestions: Array +} + +@Injectable({ + providedIn: 'root', +}) +export class AutocompleteService { + #http = inject(HttpClient) + getSuggestions = (term: string) => + term.trim() === '' + ? of({ suggestions: [] }) + : this.#http.get(`/api/autocomplete?term=${term}`) +} diff --git a/examples/angular/rxjs/src/favicon.ico b/examples/angular/rxjs/src/favicon.ico new file mode 100644 index 0000000000..57614f9c96 Binary files /dev/null and b/examples/angular/rxjs/src/favicon.ico differ diff --git a/examples/angular/rxjs/src/index.html b/examples/angular/rxjs/src/index.html new file mode 100644 index 0000000000..2c67e4a362 --- /dev/null +++ b/examples/angular/rxjs/src/index.html @@ -0,0 +1,13 @@ + + + + + TanStack Query Angular RxJS example + + + + + + + + diff --git a/examples/angular/rxjs/src/main.ts b/examples/angular/rxjs/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/rxjs/src/main.ts @@ -0,0 +1,5 @@ +import { bootstrapApplication } from '@angular/platform-browser' +import { appConfig } from './app/app.config' +import { AppComponent } from './app/app.component' + +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/rxjs/tsconfig.app.json b/examples/angular/rxjs/tsconfig.app.json new file mode 100644 index 0000000000..5b9d3c5ecb --- /dev/null +++ b/examples/angular/rxjs/tsconfig.app.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/rxjs/tsconfig.json b/examples/angular/rxjs/tsconfig.json new file mode 100644 index 0000000000..82c63d482a --- /dev/null +++ b/examples/angular/rxjs/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/examples/angular/simple/src/index.html b/examples/angular/simple/src/index.html index f75676c368..523f556b39 100644 --- a/examples/angular/simple/src/index.html +++ b/examples/angular/simple/src/index.html @@ -2,7 +2,7 @@ - Angular Query simple example + TanStack Query Angular simple example diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b346a07e28..e618239ace 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,10 +143,10 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/platform-browser-dynamic': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@tanstack/angular-query-experimental': specifier: ^5.56.2 version: link:../../../packages/angular-query-experimental @@ -189,10 +189,10 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/platform-browser-dynamic': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@tanstack/angular-query-experimental': specifier: ^5.56.2 version: link:../../../packages/angular-query-experimental @@ -235,13 +235,65 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/platform-browser-dynamic': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@angular/router': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) + '@tanstack/angular-query-experimental': + specifier: ^5.56.2 + version: link:../../../packages/angular-query-experimental + rxjs: + specifier: ^7.8.1 + version: 7.8.1 + tslib: + specifier: ^2.6.3 + version: 2.6.3 + zone.js: + specifier: ^0.14.8 + version: 0.14.8 + devDependencies: + '@angular-devkit/build-angular': + specifier: ^17.3.8 + version: 17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.3.3))(@types/express@4.17.21)(@types/node@22.0.2)(chokidar@3.6.0)(html-webpack-plugin@5.6.0(webpack@5.93.0(esbuild@0.19.12)))(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.3.3))(tailwindcss@3.4.7)(tslib@2.6.3)(typescript@5.3.3))(tailwindcss@3.4.7)(typescript@5.3.3) + '@angular/cli': + specifier: ^17.3.8 + version: 17.3.8(chokidar@3.6.0) + '@angular/compiler-cli': + specifier: ^17.3.12 + version: 17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.3.3) + '@tanstack/angular-query-devtools-experimental': + specifier: ^5.58.0 + version: link:../../../packages/angular-query-devtools-experimental + typescript: + specifier: 5.3.3 + version: 5.3.3 + + examples/angular/rxjs: + dependencies: + '@angular/cdk': + specifier: 17.3.10 + version: 17.3.10(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) + '@angular/common': + specifier: ^17.3.12 + version: 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^17.3.12 + version: 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + '@angular/core': + specifier: ^17.3.12 + version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) + '@angular/forms': + specifier: 17.3.12 + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) + '@angular/platform-browser': + specifier: ^17.3.12 + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + '@angular/platform-browser-dynamic': + specifier: ^17.3.12 + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@tanstack/angular-query-experimental': specifier: ^5.56.2 version: link:../../../packages/angular-query-experimental @@ -284,13 +336,13 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/platform-browser-dynamic': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@angular/router': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': specifier: ^5.56.2 version: link:../../../packages/angular-query-experimental @@ -1630,7 +1682,7 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@tanstack/angular-query-devtools-experimental': specifier: workspace:* version: link:../../packages/angular-query-devtools-experimental @@ -1899,10 +1951,10 @@ importers: version: 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) '@angular/platform-browser': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + version: 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/platform-browser-dynamic': specifier: ^17.3.12 - version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) + version: 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))) '@microsoft/api-extractor': specifier: ^7.47.4 version: 7.47.4(@types/node@22.0.2) @@ -2396,6 +2448,19 @@ packages: resolution: {integrity: sha512-QRVEYpIfgkprNHc916JlPuNbLzOgrm9DZalHasnLUz4P6g7pR21olb8YCyM2OTJjombNhya9ZpckcADU5Qyvlg==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + '@angular/animations@17.3.12': + resolution: {integrity: sha512-9hsdWF4gRRcVJtPcCcYLaX1CIyM9wUu6r+xRl6zU5hq8qhl35hig6ounz7CXFAzLf0WDBdM16bPHouVGaG76lg==} + engines: {node: ^18.13.0 || >=20.9.0} + peerDependencies: + '@angular/core': 17.3.12 + + '@angular/cdk@17.3.10': + resolution: {integrity: sha512-b1qktT2c1TTTe5nTji/kFAVW92fULK0YhYAvJ+BjZTPKu2FniZNe8o4qqQ0pUuvtMu+ZQxp/QqFYoidIVCjScg==} + peerDependencies: + '@angular/common': ^17.0.0 || ^18.0.0 + '@angular/core': ^17.0.0 || ^18.0.0 + rxjs: ^6.5.3 || ^7.4.0 + '@angular/cli@17.3.8': resolution: {integrity: sha512-X5ZOQ6ZTKVHjhIsfl32ZRqbs+FUoeHLbT7x4fh2Os/8ObDDwrUcCJPqxe2b2RB5E2d0vepYigknHeLE7gwzlNQ==} engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -2432,6 +2497,15 @@ packages: rxjs: ^6.5.3 || ^7.4.0 zone.js: ~0.14.0 + '@angular/forms@17.3.12': + resolution: {integrity: sha512-tV6r12Q3yEUlXwpVko4E+XscunTIpPkLbaiDn/MTL3Vxi2LZnsLgHyd/i38HaHN+e/H3B0a1ToSOhV5wf3ay4Q==} + engines: {node: ^18.13.0 || >=20.9.0} + peerDependencies: + '@angular/common': 17.3.12 + '@angular/core': 17.3.12 + '@angular/platform-browser': 17.3.12 + rxjs: ^6.5.3 || ^7.4.0 + '@angular/platform-browser-dynamic@17.3.12': resolution: {integrity: sha512-DQwV7B2x/DRLRDSisngZRdLqHdYbbrqZv2Hmu4ZbnNYaWPC8qvzgE/0CvY+UkDat3nCcsfwsMnlDeB6TL7/IaA==} engines: {node: ^18.13.0 || >=20.9.0} @@ -9598,7 +9672,7 @@ packages: resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} engines: {node: '>= 4.0'} os: [darwin] - deprecated: Upgrade to fsevents v2 to mitigate potential security issues + deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -17254,6 +17328,21 @@ snapshots: transitivePeerDependencies: - chokidar + '@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))': + dependencies: + '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) + tslib: 2.6.3 + optional: true + + '@angular/cdk@17.3.10(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1)': + dependencies: + '@angular/common': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) + '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) + rxjs: 7.8.1 + tslib: 2.6.3 + optionalDependencies: + parse5: 7.1.2 + '@angular/cli@17.3.8(chokidar@3.6.0)': dependencies: '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) @@ -17312,25 +17401,35 @@ snapshots: tslib: 2.6.3 zone.js: 0.14.8 - '@angular/platform-browser-dynamic@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))': + '@angular/forms@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1)': + dependencies: + '@angular/common': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) + '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) + '@angular/platform-browser': 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + rxjs: 7.8.1 + tslib: 2.6.3 + + '@angular/platform-browser-dynamic@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))': dependencies: '@angular/common': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) '@angular/compiler': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) - '@angular/platform-browser': 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + '@angular/platform-browser': 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) tslib: 2.6.3 - '@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))': + '@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))': dependencies: '@angular/common': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) tslib: 2.6.3 + optionalDependencies: + '@angular/animations': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) - '@angular/router@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1)': + '@angular/router@17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(@angular/platform-browser@17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(rxjs@7.8.1)': dependencies: '@angular/common': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1) '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) - '@angular/platform-browser': 17.3.12(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + '@angular/platform-browser': 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) rxjs: 7.8.1 tslib: 2.6.3