diff --git a/downstream_projects.json b/downstream_projects.json index 9cbc3ee4..3b0d6723 100644 --- a/downstream_projects.json +++ b/downstream_projects.json @@ -3,6 +3,7 @@ "projects": { "sample-app-angular": "https://github.com/ui-router/sample-app-angular.git", "angular18": "./test-angular-versions/v18", + "angular18standalone": "./test-angular-versions/v18-standalone", "typescript54": "./test-typescript-versions/typescript5.4" } } diff --git a/package.json b/package.json index 304e7dda..d6b9a4de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@uirouter/angular", "description": "State-based routing for Angular", - "version": "14.0.0", + "version": "15.0.0", "scripts": { "clean": "shx rm -rf lib lib-esm _bundles _doc dist", "compile": "npm run clean && ngc", diff --git a/src/directives/uiSref.ts b/src/directives/uiSref.ts index 3b9055f9..558b3735 100644 --- a/src/directives/uiSref.ts +++ b/src/directives/uiSref.ts @@ -17,7 +17,10 @@ import { ReplaySubject, Subscription } from 'rxjs'; * @internal * # blah blah blah */ -@Directive({ selector: 'a[uiSref]' }) +@Directive({ + selector: 'a[uiSref]', + standalone: true +}) export class AnchorUISref { constructor(public _el: ElementRef, public _renderer: Renderer2) {} @@ -78,6 +81,7 @@ export class AnchorUISref { @Directive({ selector: '[uiSref]', exportAs: 'uiSref', + standalone: true }) export class UISref implements OnChanges { /** diff --git a/src/directives/uiSrefActive.ts b/src/directives/uiSrefActive.ts index 2884d40b..478dea2c 100644 --- a/src/directives/uiSrefActive.ts +++ b/src/directives/uiSrefActive.ts @@ -82,6 +82,11 @@ import { Subscription } from 'rxjs'; */ @Directive({ selector: '[uiSrefActive],[uiSrefActiveEq]', + hostDirectives: [{ + directive: UISrefStatus, + outputs: ['uiSrefStatus'] + }], + standalone: true }) export class UISrefActive { private _classes: string[] = []; diff --git a/src/directives/uiSrefStatus.ts b/src/directives/uiSrefStatus.ts index 66cc8a71..c86f52a9 100644 --- a/src/directives/uiSrefStatus.ts +++ b/src/directives/uiSrefStatus.ts @@ -180,8 +180,9 @@ function mergeSrefStatus(left: SrefStatus, right: SrefStatus): SrefStatus { * This API is subject to change. */ @Directive({ - selector: '[uiSrefStatus],[uiSrefActive],[uiSrefActiveEq]', + selector: '[uiSrefStatus]', exportAs: 'uiSrefStatus', + standalone: true }) export class UISrefStatus { /** current statuses of the state/params the uiSref directive is linking to */ diff --git a/src/directives/uiView.ts b/src/directives/uiView.ts index 724978c7..dff42e14 100755 --- a/src/directives/uiView.ts +++ b/src/directives/uiView.ts @@ -33,6 +33,7 @@ import { } from '@uirouter/core'; import { Ng2ViewConfig } from '../statebuilders/views'; import { MergeInjector } from '../mergeInjector'; +import { CommonModule } from '@angular/common'; /** @hidden */ let id = 0; @@ -110,6 +111,8 @@ const ng2ComponentInputs = (factory: ComponentFactory): InputMapping[] => { @Component({ selector: 'ui-view, [ui-view]', exportAs: 'uiView', + standalone: true, + imports: [CommonModule], template: ` diff --git a/src/index.ts b/src/index.ts index 111cd493..b497146b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,5 +7,6 @@ export * from './statebuilders/lazyLoad'; export * from './statebuilders/views'; export * from './uiRouterConfig'; export * from './uiRouterNgModule'; +export * from './provideUiRouter'; export * from '@uirouter/core'; diff --git a/src/provideUiRouter.ts b/src/provideUiRouter.ts new file mode 100644 index 00000000..4cfe3390 --- /dev/null +++ b/src/provideUiRouter.ts @@ -0,0 +1,37 @@ +import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core"; +import { locationStrategy, makeRootProviders, RootModule } from "./uiRouterNgModule"; +import { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from "./providers"; + +/** + * Sets up providers necessary to enable UI-Router for the application. Intended as a replacement + * for [[UIRouterModule.forRoot]] in newer standalone based applications. + * + * Example: + * ```js + * const routerConfig = { + * otherwise: '/home', + * states: [homeState, aboutState] + * }; + * + * const appConfig: ApplicationConfig = { + * providers: [ + * provideZoneChangeDetection({ eventCoalescing: true }), + * provideUIRouter(routerConfig) + * ] + * }; + * + * bootstrapApplication(AppComponent, appConfig) + * .catch((err) => console.error(err)); + * ``` + * + * @param config declarative UI-Router configuration + * @returns an `EnvironmentProviders` which provides the [[UIRouter]] singleton instance + */ +export function provideUIRouter(config: RootModule = {}): EnvironmentProviders { + return makeEnvironmentProviders([ + _UIROUTER_INSTANCE_PROVIDERS, + _UIROUTER_SERVICE_PROVIDERS, + locationStrategy(config.useHash), + ...makeRootProviders(config), + ]); +} diff --git a/src/uiRouterNgModule.ts b/src/uiRouterNgModule.ts index 033ec735..0275636e 100644 --- a/src/uiRouterNgModule.ts +++ b/src/uiRouterNgModule.ts @@ -7,9 +7,8 @@ import { Injector, APP_INITIALIZER, } from '@angular/core'; -import { CommonModule, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common'; +import { LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common'; import { _UIROUTER_DIRECTIVES } from './directives/directives'; -import { UIView } from './directives/uiView'; import { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter, TransitionService } from '@uirouter/core'; import { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from './providers'; @@ -71,8 +70,9 @@ export function locationStrategy(useHash) { * This enables UI-Router to automatically register the states with the [[StateRegistry]] at bootstrap (and during lazy load). */ @NgModule({ - imports: [CommonModule], - declarations: [_UIROUTER_DIRECTIVES], + imports: [ + _UIROUTER_DIRECTIVES + ], exports: [_UIROUTER_DIRECTIVES], }) export class UIRouterModule { diff --git a/test-angular-versions/v18-standalone/README.md b/test-angular-versions/v18-standalone/README.md new file mode 100644 index 00000000..b3fa584f --- /dev/null +++ b/test-angular-versions/v18-standalone/README.md @@ -0,0 +1,27 @@ +# V18 + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.7. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/test-angular-versions/v18-standalone/angular.json b/test-angular-versions/v18-standalone/angular.json new file mode 100644 index 00000000..2e2421af --- /dev/null +++ b/test-angular-versions/v18-standalone/angular.json @@ -0,0 +1,124 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "cli": { + "packageManager": "yarn" + }, + "newProjectRoot": "projects", + "projects": { + "v18": { + "projectType": "application", + "schematics": { + "@schematics/angular:class": { + "skipTests": true + }, + "@schematics/angular:component": { + "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/v18", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [ + { + "glob": "**/*", + "input": "public" + } + ], + "styles": [ + "src/styles.css" + ], + "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": "v18:build:production" + }, + "development": { + "buildTarget": "v18:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n" + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [ + { + "glob": "**/*", + "input": "public" + } + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + } + } + } + } +} diff --git a/test-angular-versions/v18-standalone/cypress.config.ts b/test-angular-versions/v18-standalone/cypress.config.ts new file mode 100644 index 00000000..d764a065 --- /dev/null +++ b/test-angular-versions/v18-standalone/cypress.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'cypress'; + +export default defineConfig({ + video: false, + e2e: { + setupNodeEvents(on, config) {}, + baseUrl: 'http://localhost:4000', + supportFile: false + }, +}) diff --git a/test-angular-versions/v18-standalone/cypress/e2e/sample_app.cy.js b/test-angular-versions/v18-standalone/cypress/e2e/sample_app.cy.js new file mode 100644 index 00000000..f01159c7 --- /dev/null +++ b/test-angular-versions/v18-standalone/cypress/e2e/sample_app.cy.js @@ -0,0 +1,69 @@ +describe('Angular app', () => { + beforeEach(() => { + window.sessionStorage.clear(); + }); + + it('loads', () => { + cy.visit(''); + }); + + it('loads home state by default', () => { + cy.visit(''); + cy.url().should('include', '/home'); + }); + + it('renders uisref as links', () => { + cy.visit(''); + cy.get('a').contains('home'); + cy.get('a').contains('about'); + cy.get('a').contains('lazy'); + cy.get('a').contains('lazy.child'); + cy.get('a').contains('lazy.child.viewtarget'); + }); + + it('renders home', () => { + cy.visit('/home'); + cy.get('a').contains('home').should('have.class', 'active'); + cy.get('a').contains('about').should('not.have.class', 'active'); + cy.get('#default').contains('home works'); + }); + + it('renders about', () => { + cy.visit('/home'); + cy.visit('/about'); + cy.get('a').contains('home').should('not.have.class', 'active'); + cy.get('a').contains('about').should('have.class', 'active'); + cy.get('#default').contains('about works'); + }); + + it('loads lazy routes', () => { + cy.visit('/home'); + cy.visit('/lazy'); + cy.get('a').contains('home').should('not.have.class', 'active'); + cy.get('a').contains('lazy').should('have.class', 'active'); + cy.get('#default').contains('lazy works'); + }); + + it('routes to lazy routes', () => { + cy.visit('/lazy'); + cy.get('a').contains('home').should('not.have.class', 'active'); + cy.get('a').contains('lazy').should('have.class', 'active'); + cy.get('#default').contains('lazy works'); + }); + + it('routes to lazy child routes', () => { + cy.visit('/lazy/child'); + cy.get('a').contains('home').should('not.have.class', 'active'); + cy.get('a').contains('lazy.child').should('have.class', 'active'); + cy.get('#default').contains('lazy.child works'); + }); + + it('targets named views', () => { + cy.visit('/lazy/child/viewtarget'); + cy.get('a').contains('home').should('not.have.class', 'active'); + cy.get('a').contains('lazy.child').should('have.class', 'active'); + cy.get('#default').contains('lazy.child works'); + cy.get('#header').contains('lazy.child.viewtarget works'); + cy.get('#footer').contains('lazy.child.viewtarget works'); + }); +}); diff --git a/test-angular-versions/v18-standalone/package.json b/test-angular-versions/v18-standalone/package.json new file mode 100644 index 00000000..26365b60 --- /dev/null +++ b/test-angular-versions/v18-standalone/package.json @@ -0,0 +1,50 @@ +{ + "name": "v18", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "npm run test:dev && npm run test:prod", + "test:dev": "ng build --configuration development && cypress-runner run --path dist/v18/browser", + "test:prod": "ng build --configuration production && cypress-runner run --path dist/v18/browser" + }, + "private": true, + "dependencies": { + "@angular/animations": "^18.0.0", + "@angular/common": "^18.0.0", + "@angular/compiler": "^18.0.0", + "@angular/core": "^18.0.0", + "@angular/forms": "^18.0.0", + "@angular/platform-browser": "^18.0.0", + "@angular/platform-browser-dynamic": "^18.0.0", + "@angular/router": "^18.0.0", + "rxjs": "~7.8.0", + "tslib": "^2.3.0", + "zone.js": "~0.14.3", + "@uirouter/angular": "*", + "@uirouter/cypress-runner": "*", + "@uirouter/core": "*", + "@uirouter/rx": "*" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^18.0.7", + "@angular/cli": "^18.0.7", + "@angular/compiler-cli": "^18.0.0", + "@types/jasmine": "~5.1.0", + "jasmine-core": "~5.1.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "typescript": "~5.4.5" + }, + "checkPeerDependencies": { + "ignore": [ + "ajv", + "terser" + ] + } +} diff --git a/test-angular-versions/v18-standalone/public/favicon.ico b/test-angular-versions/v18-standalone/public/favicon.ico new file mode 100644 index 00000000..57614f9c Binary files /dev/null and b/test-angular-versions/v18-standalone/public/favicon.ico differ diff --git a/test-angular-versions/v18-standalone/src/app/about.component.ts b/test-angular-versions/v18-standalone/src/app/about.component.ts new file mode 100644 index 00000000..92e22051 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/about.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-about', + template: `

about works!

`, + standalone: true, +}) +export class AboutComponent {} diff --git a/test-angular-versions/v18-standalone/src/app/app.component.ts b/test-angular-versions/v18-standalone/src/app/app.component.ts new file mode 100644 index 00000000..ac0e6f53 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/app.component.ts @@ -0,0 +1,35 @@ +import { Component } from '@angular/core'; +import { AnchorUISref, UISref, UISrefActive, UIView } from '@uirouter/angular'; + +@Component({ + selector: 'app-root', + template: ` + +
+ Angular Logo +
+ home + about + lazy + lazy.child + lazy.child.viewtarget +
+ +
+ +`, + styles: [ + ` + .app { + text-align: center; + border: 1px solid; + } + .active { + font-weight: bold; + } + `, + ], + standalone: true, + imports: [UIView, AnchorUISref, UISref, UISrefActive] +}) +export class AppComponent {} diff --git a/test-angular-versions/v18-standalone/src/app/app.config.ts b/test-angular-versions/v18-standalone/src/app/app.config.ts new file mode 100644 index 00000000..e4f2f542 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/app.config.ts @@ -0,0 +1,10 @@ +import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; +import { provideUIRouter } from '@uirouter/angular'; +import { states, config } from "./app.routes"; + +export const appConfig: ApplicationConfig = { + providers: [ + provideZoneChangeDetection({ eventCoalescing: true }), + provideUIRouter({ states: states, config: config }) + ] +}; diff --git a/test-angular-versions/v18-standalone/src/app/app.routes.ts b/test-angular-versions/v18-standalone/src/app/app.routes.ts new file mode 100644 index 00000000..defc3a10 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/app.routes.ts @@ -0,0 +1,13 @@ +import { HomeComponent } from './home.component'; +import { AboutComponent } from './about.component'; +import { UIRouter } from '@uirouter/angular'; + +export const states = [ + { name: 'home', url: '/home', component: HomeComponent }, + { name: 'about', url: '/about', component: AboutComponent }, + { name: 'lazy.**', url: '/lazy', loadChildren: () => import('./lazy/lazy.module').then((m) => m.LazyModule) }, +]; + +export function config(router: UIRouter) { + router.urlService.rules.initial({ state: 'home' }); +} diff --git a/test-angular-versions/v18-standalone/src/app/home.component.ts b/test-angular-versions/v18-standalone/src/app/home.component.ts new file mode 100644 index 00000000..6fea45e5 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/home.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-home', + template: `

home works!

`, + standalone: true, +}) +export class HomeComponent {} diff --git a/test-angular-versions/v18-standalone/src/app/lazy/lazy.component.ts b/test-angular-versions/v18-standalone/src/app/lazy/lazy.component.ts new file mode 100644 index 00000000..60b4fbf2 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/lazy/lazy.component.ts @@ -0,0 +1,12 @@ +import { Component, Input } from '@angular/core'; + +@Component({ + selector: 'app-lazy', + template: ` +

{{ state.name }} works!

+ + `, +}) +export class LazyComponent { + @Input('$state$') state: any; +} diff --git a/test-angular-versions/v18-standalone/src/app/lazy/lazy.module.ts b/test-angular-versions/v18-standalone/src/app/lazy/lazy.module.ts new file mode 100644 index 00000000..2ca79698 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/app/lazy/lazy.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { UIRouterModule } from '@uirouter/angular'; +import { LazyComponent } from './lazy.component'; + +export const states = [ + { name: 'lazy', url: '/lazy', component: LazyComponent }, + { name: 'lazy.child', url: '/child', component: LazyComponent }, + { + name: 'lazy.child.viewtarget', + url: '/viewtarget', + views: { + '!header': { component: LazyComponent }, + 'footer@': { component: LazyComponent }, + }, + }, +]; + +@NgModule({ + imports: [CommonModule, UIRouterModule.forChild({ states: states })], + declarations: [LazyComponent], +}) +export class LazyModule {} diff --git a/test-angular-versions/v18-standalone/src/index.html b/test-angular-versions/v18-standalone/src/index.html new file mode 100644 index 00000000..9a21ef6c --- /dev/null +++ b/test-angular-versions/v18-standalone/src/index.html @@ -0,0 +1,13 @@ + + + + + V18 + + + + + + + + diff --git a/test-angular-versions/v18-standalone/src/main.ts b/test-angular-versions/v18-standalone/src/main.ts new file mode 100644 index 00000000..35b00f34 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/main.ts @@ -0,0 +1,6 @@ +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/test-angular-versions/v18-standalone/src/styles.css b/test-angular-versions/v18-standalone/src/styles.css new file mode 100644 index 00000000..90d4ee00 --- /dev/null +++ b/test-angular-versions/v18-standalone/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/test-angular-versions/v18-standalone/tsconfig.app.json b/test-angular-versions/v18-standalone/tsconfig.app.json new file mode 100644 index 00000000..3775b37e --- /dev/null +++ b/test-angular-versions/v18-standalone/tsconfig.app.json @@ -0,0 +1,15 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/test-angular-versions/v18-standalone/tsconfig.json b/test-angular-versions/v18-standalone/tsconfig.json new file mode 100644 index 00000000..7f6dcedf --- /dev/null +++ b/test-angular-versions/v18-standalone/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "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/test-angular-versions/v18-standalone/tsconfig.spec.json b/test-angular-versions/v18-standalone/tsconfig.spec.json new file mode 100644 index 00000000..5fb748d9 --- /dev/null +++ b/test-angular-versions/v18-standalone/tsconfig.spec.json @@ -0,0 +1,15 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +}