@emuanalytics/flow-rdf-angular 4.0.0-preview.0 → 4.0.0-preview.2

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.
@@ -1,13 +1,13 @@
1
1
  import { InjectionToken, ModuleWithProviders } from '@angular/core';
2
- import { FlowContext, FlowContextOptions, StateStore } from '@emuanalytics/flow-rdf-core';
2
+ import { FlowContext, FlowContextOptions } from '@emuanalytics/flow-rdf-core';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@angular/common";
5
5
  import * as i2 from "./modals/modal-container/modal-container.component";
6
- export declare const FLOW_RDF_ANGULAR_CONFIG: InjectionToken<FlowContextOptions<StateStore>>;
7
- export declare const FLOW_CONTEXT: InjectionToken<FlowContext<StateStore>>;
8
- export declare function initializeFlowContext(config: FlowContextOptions): FlowContext<StateStore>;
6
+ export declare const FLOW_RDF_ANGULAR_CONFIG: InjectionToken<FlowContextOptions<import("@emuanalytics/flow-rdf-core").StateStore>>;
7
+ export declare const FLOW_CONTEXT: InjectionToken<FlowContext<import("@emuanalytics/flow-rdf-core").StateStore>>;
8
+ export declare function initializeFlowContext(config: FlowContextOptions): FlowContext<import("@emuanalytics/flow-rdf-core").StateStore>;
9
9
  export declare class FlowRdfAngularModule {
10
- static register<TState extends StateStore>(options?: FlowContextOptions<TState>): ModuleWithProviders<FlowRdfAngularModule>;
10
+ static forRoot(): ModuleWithProviders<FlowRdfAngularModule>;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowRdfAngularModule, never>;
12
12
  static ɵmod: i0.ɵɵNgModuleDeclaration<FlowRdfAngularModule, never, [typeof i1.CommonModule, typeof i2.ModalContainerComponent], [typeof i2.ModalContainerComponent]>;
13
13
  static ɵinj: i0.ɵɵInjectorDeclaration<FlowRdfAngularModule>;
@@ -1,6 +1,10 @@
1
1
  import { Injector, Signal, ValueEqualityFn, WritableSignal } from '@angular/core';
2
2
  import { Path, PathValue, StateStore } from '@emuanalytics/flow-rdf-core';
3
3
  export interface FlowSignalOptions<T> {
4
+ /**
5
+ * Name of signal to use in debugging.
6
+ */
7
+ name?: string;
4
8
  /**
5
9
  * If `true`, the signal will be writable and changes will be propagated to the state store.
6
10
  */
@@ -20,6 +24,13 @@ export interface FlowSignalOptions<T> {
20
24
  equal?: ValueEqualityFn<T>;
21
25
  }
22
26
  export declare function flowSignal<TState extends StateStore, P extends Path<TState, StateStore>>(state: TState, path: P): Signal<PathValue<TState, P, StateStore>>;
27
+ export declare function flowSignal<TState extends StateStore, P extends Path<TState, StateStore>>(state: TState, path: P, options: FlowSignalOptions<PathValue<TState, P, StateStore>> & {
28
+ writable?: false;
29
+ }): Signal<PathValue<TState, P, StateStore>>;
23
30
  export declare function flowSignal<TState extends StateStore, P extends Path<TState, StateStore>>(state: TState, path: P, options: FlowSignalOptions<PathValue<TState, P, StateStore>> & {
24
31
  writable: true;
25
32
  }): WritableSignal<PathValue<TState, P, StateStore>>;
33
+ export declare function flowSignal<TState extends StateStore, R>(state: TState, path: (state: TState) => R): Signal<R>;
34
+ export declare function flowSignal<TState extends StateStore, R>(state: TState, path: (state: TState) => R, options: FlowSignalOptions<R> & {
35
+ writable?: false;
36
+ }): Signal<R>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-angular",
3
- "version": "4.0.0-preview.0",
3
+ "version": "4.0.0-preview.2",
4
4
  "files": [
5
5
  "dist/"
6
6
  ],
@@ -26,8 +26,8 @@
26
26
  "@angular/core": "^18.2.0",
27
27
  "@angular/forms": "^18.2.0",
28
28
  "rxjs": "~7.8.0",
29
- "@emuanalytics/flow-rdf-ui": "4.0.0-preview.0",
30
- "@emuanalytics/flow-rdf-core": "4.0.0-preview.0"
29
+ "@emuanalytics/flow-rdf-ui": "4.0.0-preview.2",
30
+ "@emuanalytics/flow-rdf-core": "4.0.0-preview.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@angular-devkit/build-angular": "^18.2.7",
@@ -42,7 +42,9 @@
42
42
  "karma-jasmine-html-reporter": "~2.1.0",
43
43
  "ng-packagr": "^18.2.0",
44
44
  "rimraf": "^6.0.1",
45
- "typescript": "~5.5.2"
45
+ "typescript": "~5.5.2",
46
+ "@emuanalytics/flow-rdf-core": "4.0.0-preview.2",
47
+ "@emuanalytics/flow-rdf-ui": "4.0.0-preview.2"
46
48
  },
47
49
  "scripts": {
48
50
  "ng": "ng",