@rs-x/angular 0.4.11 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,63 +1,161 @@
1
- # Rsx
1
+ # RS-X Angular Extension
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.
3
+ The **RS-X Angular Extension** provides seamless integration of RS-X expressions within Angular templates. It allows you to bind expressions to your data models, making your templates fully reactive without extra boilerplate.
4
4
 
5
- ## Code scaffolding
5
+ ## Installation
6
6
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
7
+ Update the `dependencies` section in your `package.json` to include the required RS-X packages. You can ignore the version numbers and use the latest versions compatible with your Angular version. The latest RS-X packages are currently built with Angular 21. After updating, run `npm install` to install the dependencies.
8
8
 
9
- ```bash
10
- ng generate component component-name
9
+ ```json
10
+ "dependencies": {
11
+ "@rs-x/core": "^0.4.12",
12
+ "@rs-x/state-manager": "^0.4.12",
13
+ "@rs-x/expression-parser": "^0.4.12",
14
+ "@rs-x/angular": "^0.4.12",
15
+ },
11
16
  ```
12
17
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
18
+ ## Prepare Angular application for using rs-x
14
19
 
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
20
+ Add the RS-X providers to the `providers` array when bootstrapping your Angular application. After that you can use the rsx-pipe and inject the rsx expression factory as a service
20
21
 
21
- To build the library, run:
22
+ So
22
23
 
23
- ```bash
24
- ng build rsx
24
+ ```ts
25
+ providers: [...providexRsx()];
25
26
  ```
26
27
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+ Example:
29
+
30
+ ```ts
31
+ import { bootstrapApplication } from '@angular/platform-browser';
32
+ import { App } from './app/app';
33
+ import {
34
+ provideRouter,
35
+ withDebugTracing,
36
+ withViewTransitions,
37
+ } from '@angular/router';
38
+ import { provideBrowserGlobalErrorListeners } from '@angular/core';
39
+ import { providexRsx } from '@rs-x/angular';
40
+
41
+ bootstrapApplication(App, {
42
+ providers: [
43
+ provideRouter([], withDebugTracing(), withViewTransitions()),
44
+ provideBrowserGlobalErrorListeners(),
45
+ ...providexRsx(),
46
+ ],
47
+ }).catch((err) => console.error(err));
48
+ ```
28
49
 
29
- ### Publishing the Library
50
+ ## Rsx pipe
30
51
 
31
- Once the project is built, you can publish your library by following these steps:
52
+ The `rsx` pipe enables binding RS-X expressions or strings to Angular templates and automatically updates the view whenever the underlying data changes. It transforms expressions into reactive values, subscribes to changes, triggers Angular change detection, and cleans up subscriptions when no longer needed. It supports both synchronous and asynchronous data sources.
32
53
 
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/rsx
36
- ```
54
+ The value passed to the `rsx` pipe can be either an expression string or an expression tree. Expression trees are created by the expression factory. The `rsx` pipe also requires a model, as the expression tree is bound to that model to resolve the necessary data.
37
55
 
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
56
+ Example:
42
57
 
43
- ## Running unit tests
58
+ ```ts
59
+ import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
60
+ import { RsxPipe } from '@rs-x/angular';
61
+ import { type IExpression } from '@rs-x/expression-parser';
44
62
 
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
63
 
47
- ```bash
48
- ng test
64
+ @Component({
65
+ selector: 'rsx-field',
66
+ standalone: true,
67
+ imports: [ RsxPipe],
68
+ template: ' {{ expression | rsx: model }}',
69
+ changeDetection: ChangeDetectionStrategy.OnPush
70
+ })
71
+ export class RsxField {
72
+ @Input() expression!: string | IExpression;
73
+ @Input() model!: object;
49
74
  ```
50
75
 
51
- ## Running end-to-end tests
52
-
53
- For end-to-end (e2e) testing, run:
54
-
55
- ```bash
56
- ng e2e
76
+ ## Injection the expression factory and change transaction manager
77
+
78
+ - **Expression Factory**: Used to translate a JavaScript expression string into an observable expression tree.
79
+ - **Change Transaction Manager**: Used to temporarily suspend change event emission, allowing you to update the model without emitting more than one change event per expression.
80
+
81
+ The example below shows how you can use these two services.
82
+
83
+ ```ts
84
+ import { inject, Injectable } from '@angular/core';
85
+
86
+ import {
87
+ IExpressionChangeTransactionManagerToken,
88
+ IExpressionFactoryToken,
89
+ } from '@rs-x/angular';
90
+ import { IExpression } from '@rs-x/expression-parser';
91
+
92
+ import { Observable, Subject, Subscription } from 'rxjs';
93
+
94
+ interface IModel {
95
+ x: number;
96
+ r: number;
97
+ }
98
+
99
+ @Injectable({ providedIn: 'root' })
100
+ export class MyFormula {
101
+ private _isDisposed = false;
102
+ private readonly _expressionFactory = inject(IExpressionFactoryToken);
103
+ private readonly _expressionChangeTransactionManager = inject(
104
+ IExpressionChangeTransactionManagerToken,
105
+ );
106
+ private readonly _changed: Subject<number | undefined>;
107
+ private readonly _changedSubscription: Subscription;
108
+ private readonly _expression: IExpression<number | undefined>;
109
+ private readonly _model: IModel = {
110
+ x: 10,
111
+ r: 2,
112
+ };
113
+
114
+ constructor() {
115
+ this._changed = new Subject();
116
+ this._expression = this._expressionFactory.create(
117
+ this._model,
118
+ 'r * x * (1 - x)',
119
+ );
120
+ this._changedSubscription = this._expression.changed.subscribe(() =>
121
+ this._changed.next(this._expression.value),
122
+ );
123
+ }
124
+
125
+ public get changed(): Observable<number | undefined> {
126
+ return this._changed;
127
+ }
128
+
129
+ public dispose(): void {
130
+ if (this._isDisposed) {
131
+ return;
132
+ }
133
+ this._expression.dispose();
134
+ this._changedSubscription.unsubscribe();
135
+ this._isDisposed = true;
136
+ }
137
+
138
+ public update(r: number, x: number): void {
139
+ // Suspend change event emission to prevent emitting it twice
140
+ this._expressionChangeTransactionManager.suspend();
141
+ this._model.r = r;
142
+ this._model.x = x;
143
+ this._expressionChangeTransactionManager.continue();
144
+ }
145
+ }
57
146
  ```
58
147
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
148
+ ## Benefits
149
+
150
+ - **Reactive Templates:** Automatically updates Angular views whenever bound data changes.
151
+ - **Supports Complex Data:** Works with synchronous, asynchronous, or mixed data models.
152
+ - **Minimal Boilerplate:** No manual subscriptions or change detection needed.
153
+ - **Full Angular Integration:** Works seamlessly with Angular’s dependency injection and change detection system.
60
154
 
61
- ## Additional Resources
155
+ ## References
62
156
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
157
+ - [RS-X]('../../../readme.md')
158
+ - [RS-X core]('../../../rs-x-core/readme.md')
159
+ - [RS-X state manager]('../../../rs-x-state-manager/readme.md')
160
+ - [RS-X expression parser]('../../../rs-x-expression-parser/readme.md')
161
+ - [RS=X angular demo](https://stackblitz.com/~/github.com/robert-sanders-software-ontwikkeling/rs-x-angular-demo)
@@ -4,6 +4,7 @@ import { InjectionContainer, Type, UnsupportedException } from '@rs-x/core';
4
4
  import { RsXExpressionParserInjectionTokens, RsXExpressionParserModule, AbstractExpression } from '@rs-x/expression-parser';
5
5
 
6
6
  const IExpressionFactoryToken = new InjectionToken('IExpressionFactoryProvider');
7
+ const IExpressionChangeTransactionManagerToken = new InjectionToken('IExpressionChangeTransactionManager');
7
8
  function initializeRsx() {
8
9
  return () => {
9
10
  if (InjectionContainer.isBound(RsXExpressionParserInjectionTokens.IExpressionFactory)) {
@@ -17,12 +18,16 @@ function providexRsx() {
17
18
  {
18
19
  provide: APP_INITIALIZER,
19
20
  useFactory: initializeRsx,
20
- multi: true
21
+ multi: true,
21
22
  },
22
23
  {
23
24
  provide: IExpressionFactoryToken,
24
- useFactory: () => InjectionContainer.get(RsXExpressionParserInjectionTokens.IExpressionFactory)
25
- }
25
+ useFactory: () => InjectionContainer.get(RsXExpressionParserInjectionTokens.IExpressionFactory),
26
+ },
27
+ {
28
+ provide: IExpressionChangeTransactionManagerToken,
29
+ useFactory: () => InjectionContainer.get(RsXExpressionParserInjectionTokens.IExpressionChangeTransactionManager),
30
+ },
26
31
  ];
27
32
  }
28
33
 
@@ -35,7 +40,8 @@ class RsxPipe {
35
40
  _lastContext;
36
41
  _value;
37
42
  transform(expression, context) {
38
- if ((expression instanceof AbstractExpression && this._expression !== expression) ||
43
+ if ((expression instanceof AbstractExpression &&
44
+ this._expression !== expression) ||
39
45
  expression !== this._lastExpressionString ||
40
46
  context !== this._lastContext) {
41
47
  this.disposeExpression();
@@ -99,5 +105,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
99
105
  * Generated bundle index. Do not edit.
100
106
  */
101
107
 
102
- export { IExpressionFactoryToken, RsxPipe, providexRsx };
108
+ export { IExpressionChangeTransactionManagerToken, IExpressionFactoryToken, RsxPipe, providexRsx };
103
109
  //# sourceMappingURL=rs-x-angular.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rs-x-angular.mjs","sources":["../../../projects/rsx/src/lib/rsx.providers.ts","../../../projects/rsx/src/lib/rsx.pipe.ts","../../../projects/rsx/src/public-api.ts","../../../projects/rsx/src/rs-x-angular.ts"],"sourcesContent":["import { APP_INITIALIZER, InjectionToken, type Provider } from '@angular/core';\nimport { InjectionContainer } from '@rs-x/core';\nimport { type IExpressionFactory, RsXExpressionParserInjectionTokens, RsXExpressionParserModule } from '@rs-x/expression-parser';\n\nexport const IExpressionFactoryToken = new InjectionToken<IExpressionFactory>('IExpressionFactoryProvider');\n\nfunction initializeRsx(): () => Promise<void> {\n return () => {\n if (InjectionContainer.isBound(RsXExpressionParserInjectionTokens.IExpressionFactory)) {\n return Promise.resolve();\n }\n return InjectionContainer.load(RsXExpressionParserModule);\n }\n}\n\nexport function providexRsx(): Provider[] {\n return [\n {\n provide: APP_INITIALIZER,\n useFactory: initializeRsx,\n multi: true\n },\n {\n provide: IExpressionFactoryToken,\n useFactory: () => InjectionContainer.get(RsXExpressionParserInjectionTokens.IExpressionFactory)\n }\n ];\n}","import {\n ChangeDetectorRef,\n inject,\n Pipe,\n type OnDestroy,\n type PipeTransform\n} from '@angular/core';\nimport { Type, UnsupportedException } from '@rs-x/core';\nimport {\n AbstractExpression,\n type IExpression\n} from '@rs-x/expression-parser';\nimport { Subscription } from 'rxjs';\nimport { IExpressionFactoryToken } from './rsx.providers';\n\n@Pipe({\n name: 'rsx',\n pure: false,\n})\nexport class RsxPipe implements PipeTransform, OnDestroy {\n private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n private readonly _expressionFactory = inject(IExpressionFactoryToken);\n private _expression?: IExpression<unknown>;\n private _changedSubscription?: Subscription;\n private _lastExpressionString?: string;\n private _lastContext?: object;\n private _value: unknown;\n\n public transform<T>(expression: string | IExpression<T>| null | undefined, context?: object): T {\n if (\n (expression instanceof AbstractExpression && this._expression !== expression) ||\n expression !== this._lastExpressionString ||\n context !== this._lastContext\n ) {\n this.disposeExpression();\n this.createExpression(expression, context);\n }\n\n return this._value as T\n }\n\n public ngOnDestroy(): void {\n this.disposeExpression();\n }\n\n private createExpression(expression: string | IExpression | null | undefined, context?: object): void {\n if (expression instanceof AbstractExpression) {\n this._lastExpressionString = undefined;\n this._expression = expression;\n } else if (Type.isString(expression)) {\n this._lastExpressionString = expression;\n if (context) {\n this._expression = this._expressionFactory.create(context, expression)\n }\n\n } else if(!Type.isNullOrUndefined(expression)) {\n throw new UnsupportedException(`string or IExpression expected`)\n }\n\n this._lastContext = context;\n\n this.tryToSubscribeToExpression();\n }\n\n private tryToSubscribeToExpression(): void {\n if (!this._expression) {\n return;\n }\n this._changedSubscription = this._expression.changed.subscribe(() => {\n this._value = this._expression!.value;\n this._changeDetectorRef.markForCheck();\n });\n }\n\n private disposeExpression(): void {\n this._changedSubscription?.unsubscribe();\n this._changedSubscription = undefined;\n\n if (this._lastExpressionString) {\n this._expression?.dispose();\n }\n this._expression = undefined;\n }\n}","/*\n * Public API Surface of rsx\n */\n\nexport * from './lib'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAIa,uBAAuB,GAAG,IAAI,cAAc,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A,IAAA,EAAA,CAAA;qGAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,KAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBAJnB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,KAAK;AACX,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"rs-x-angular.mjs","sources":["../../../projects/rsx/src/lib/rsx.providers.ts","../../../projects/rsx/src/lib/rsx.pipe.ts","../../../projects/rsx/src/public-api.ts","../../../projects/rsx/src/rs-x-angular.ts"],"sourcesContent":["import { APP_INITIALIZER, InjectionToken, type Provider } from '@angular/core';\n\nimport { InjectionContainer } from '@rs-x/core';\nimport {\n type IExpressionChangeTransactionManager,\n type IExpressionFactory,\n RsXExpressionParserInjectionTokens,\n RsXExpressionParserModule,\n} from '@rs-x/expression-parser';\n\nexport const IExpressionFactoryToken = new InjectionToken<IExpressionFactory>(\n 'IExpressionFactoryProvider',\n);\n\nexport const IExpressionChangeTransactionManagerToken =\n new InjectionToken<IExpressionChangeTransactionManager>(\n 'IExpressionChangeTransactionManager',\n );\n\nfunction initializeRsx(): () => Promise<void> {\n return () => {\n if (\n InjectionContainer.isBound(\n RsXExpressionParserInjectionTokens.IExpressionFactory,\n )\n ) {\n return Promise.resolve();\n }\n return InjectionContainer.load(RsXExpressionParserModule);\n };\n}\n\nexport function providexRsx(): Provider[] {\n return [\n {\n provide: APP_INITIALIZER,\n useFactory: initializeRsx,\n multi: true,\n },\n {\n provide: IExpressionFactoryToken,\n useFactory: () =>\n InjectionContainer.get(\n RsXExpressionParserInjectionTokens.IExpressionFactory,\n ),\n },\n {\n provide: IExpressionChangeTransactionManagerToken,\n useFactory: () =>\n InjectionContainer.get(\n RsXExpressionParserInjectionTokens.IExpressionChangeTransactionManager,\n ),\n },\n ];\n}\n","import {\n ChangeDetectorRef,\n inject,\n type OnDestroy,\n Pipe,\n type PipeTransform,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { Type, UnsupportedException } from '@rs-x/core';\nimport { AbstractExpression, type IExpression } from '@rs-x/expression-parser';\n\nimport { IExpressionFactoryToken } from './rsx.providers';\n\n@Pipe({\n name: 'rsx',\n pure: false,\n})\nexport class RsxPipe implements PipeTransform, OnDestroy {\n private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n private readonly _expressionFactory = inject(IExpressionFactoryToken);\n private _expression?: IExpression<unknown>;\n private _changedSubscription?: Subscription;\n private _lastExpressionString?: string;\n private _lastContext?: object;\n private _value: unknown;\n\n public transform<T>(\n expression: string | IExpression<T> | null | undefined,\n context?: object,\n ): T {\n if (\n (expression instanceof AbstractExpression &&\n this._expression !== expression) ||\n expression !== this._lastExpressionString ||\n context !== this._lastContext\n ) {\n this.disposeExpression();\n this.createExpression(expression, context);\n }\n\n return this._value as T;\n }\n\n public ngOnDestroy(): void {\n this.disposeExpression();\n }\n\n private createExpression(\n expression: string | IExpression | null | undefined,\n context?: object,\n ): void {\n if (expression instanceof AbstractExpression) {\n this._lastExpressionString = undefined;\n this._expression = expression;\n } else if (Type.isString(expression)) {\n this._lastExpressionString = expression;\n if (context) {\n this._expression = this._expressionFactory.create(context, expression);\n }\n } else if (!Type.isNullOrUndefined(expression)) {\n throw new UnsupportedException(`string or IExpression expected`);\n }\n\n this._lastContext = context;\n\n this.tryToSubscribeToExpression();\n }\n\n private tryToSubscribeToExpression(): void {\n if (!this._expression) {\n return;\n }\n this._changedSubscription = this._expression.changed.subscribe(() => {\n this._value = this._expression!.value;\n this._changeDetectorRef.markForCheck();\n });\n }\n\n private disposeExpression(): void {\n this._changedSubscription?.unsubscribe();\n this._changedSubscription = undefined;\n\n if (this._lastExpressionString) {\n this._expression?.dispose();\n }\n this._expression = undefined;\n }\n}\n","/*\n * Public API Surface of rsx\n */\n\nexport * from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,uBAAuB,GAAG,IAAI,cAAc,CACvD,4BAA4B;MAGjB,wCAAwC,GACnD,IAAI,cAAc,CAChB,qCAAqC;AAGzC,SAAS,aAAa,GAAA;AACpB,IAAA,OAAO,MAAK;QACV,IACE,kBAAkB,CAAC,OAAO,CACxB,kCAAkC,CAAC,kBAAkB,CACtD,EACD;AACA,YAAA,OAAO,OAAO,CAAC,OAAO,EAAE;QAC1B;AACA,QAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,yBAAyB,CAAC;AAC3D,IAAA,CAAC;AACH;SAEgB,WAAW,GAAA;IACzB,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,UAAU,EAAE,aAAa;AACzB,YAAA,KAAK,EAAE,IAAI;AACZ,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,uBAAuB;YAChC,UAAU,EAAE,MACV,kBAAkB,CAAC,GAAG,CACpB,kCAAkC,CAAC,kBAAkB,CACtD;AACJ,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,wCAAwC;YACjD,UAAU,EAAE,MACV,kBAAkB,CAAC,GAAG,CACpB,kCAAkC,CAAC,mCAAmC,CACvE;AACJ,SAAA;KACF;AACH;;MCpCa,OAAO,CAAA;AACD,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,kBAAkB,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC7D,IAAA,WAAW;AACX,IAAA,oBAAoB;AACpB,IAAA,qBAAqB;AACrB,IAAA,YAAY;AACZ,IAAA,MAAM;IAEP,SAAS,CACd,UAAsD,EACtD,OAAgB,EAAA;QAEhB,IACE,CAAC,UAAU,YAAY,kBAAkB;AACvC,YAAA,IAAI,CAAC,WAAW,KAAK,UAAU;YACjC,UAAU,KAAK,IAAI,CAAC,qBAAqB;AACzC,YAAA,OAAO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BAAoB,EAAE,WAAW,EAAE;AACxC,QAAA,IAAI,CAAC,oBAAoB,GAAG,SAAS;AAErC,QAAA,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAC9B,YAAA,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE;QAC7B;AACA,QAAA,IAAI,CAAC,WAAW,GAAG,SAAS;IAC9B;uGArEW,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,KAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBAJnB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,KAAK;AACX,oBAAA,IAAI,EAAE,KAAK;AACZ,iBAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rs-x/angular",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Angular integration for RS-X, providing the RsxPipe",
5
5
  "type": "module",
6
6
  "module": "fesm2022/rs-x-angular.mjs",
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { PipeTransform, OnDestroy, InjectionToken, Provider } from '@angular/core';
3
- import { IExpression, IExpressionFactory } from '@rs-x/expression-parser';
3
+ import { IExpression, IExpressionFactory, IExpressionChangeTransactionManager } from '@rs-x/expression-parser';
4
4
 
5
5
  declare class RsxPipe implements PipeTransform, OnDestroy {
6
6
  private readonly _changeDetectorRef;
@@ -20,6 +20,7 @@ declare class RsxPipe implements PipeTransform, OnDestroy {
20
20
  }
21
21
 
22
22
  declare const IExpressionFactoryToken: InjectionToken<IExpressionFactory>;
23
+ declare const IExpressionChangeTransactionManagerToken: InjectionToken<IExpressionChangeTransactionManager>;
23
24
  declare function providexRsx(): Provider[];
24
25
 
25
- export { IExpressionFactoryToken, RsxPipe, providexRsx };
26
+ export { IExpressionChangeTransactionManagerToken, IExpressionFactoryToken, RsxPipe, providexRsx };