@rs-x/state-manager 0.4.10 → 0.4.12
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/dist/index.d.ts +52 -47
- package/dist/index.js +323 -300
- package/package.json +2 -2
- package/readme.md +605 -529
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDisposable, IPropertyChange, IDisposableOwner, ISingletonFactory, SingletonFactoryWithGuid, IErrorLog, IGuidFactory, IIndexValueAccessor, IArrayIndexAccessor, IMapKeyAccessor, IPropertyValueAccessor, ISetKeyAccessor, SingletonFactory, IEqualityService, DateProperty, IDatePropertyAccessor, IObservableAccessor, IPromiseAccessor, IMultiInjectService, ContainerModule, IDeepClone, ISingletonFactoryWithIdGeneration } from '@rs-x/core';
|
|
2
1
|
import { Observable, Subject, Subscription } from 'rxjs';
|
|
2
|
+
import { IDisposable, IPropertyChange, IDisposableOwner, ISingletonFactory, SingletonFactoryWithGuid, IErrorLog, IGuidFactory, IIndexValueAccessor, IArrayIndexAccessor, IMapKeyAccessor, IPropertyValueAccessor, ISetKeyAccessor, SingletonFactory, IEqualityService, IValueMetadata, DateProperty, IDatePropertyAccessor, IObservableAccessor, IPromiseAccessor, IMultiInjectService, ContainerModule, IDeepClone, ISingletonFactoryWithIdGeneration, IInstanceGroupInfo } from '@rs-x/core';
|
|
3
3
|
|
|
4
4
|
interface IObserver<T = unknown> extends IDisposable {
|
|
5
5
|
target: T | undefined;
|
|
@@ -41,11 +41,12 @@ interface IGroupedChangeSubscriptionsForContextManager<TSubsriptionData, TData,
|
|
|
41
41
|
getSubsriptionData(id: string): TSubsriptionData | undefined;
|
|
42
42
|
}
|
|
43
43
|
declare abstract class GroupedChangeSubscriptionsForContextManager<TSubsriptionData, TData extends TIdData & IChangeSubscriptionsCreateMethods, TIdData = TData> extends SingletonFactoryWithGuid<TData, IObserver> implements IGroupedChangeSubscriptionsForContextManager<TSubsriptionData, TData, TIdData> {
|
|
44
|
-
|
|
44
|
+
private _context;
|
|
45
45
|
private readonly releaseContext;
|
|
46
46
|
protected readonly _errorLog: IErrorLog;
|
|
47
47
|
private readonly _subscriptions;
|
|
48
48
|
constructor(_context: unknown, releaseContext: () => void, _errorLog: IErrorLog, guidFactory: IGuidFactory);
|
|
49
|
+
protected get context(): unknown;
|
|
49
50
|
getSubsriptionData(id: string): TSubsriptionData | undefined;
|
|
50
51
|
protected createInstance(data: TData, id: string): IObserver;
|
|
51
52
|
protected onInstanceCreated(observer: IObserver<unknown>, data: TData): void;
|
|
@@ -57,6 +58,20 @@ declare abstract class GroupedChangeSubscriptionsForContextManager<TSubsriptionD
|
|
|
57
58
|
protected onReleased(): void;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
type ShouldWatchIndexPredicate = (context: unknown, index: unknown, target: unknown) => boolean;
|
|
62
|
+
interface IIndexWatchRule {
|
|
63
|
+
context: unknown;
|
|
64
|
+
test(index: unknown, target: unknown): boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class IndexWatchRule implements IIndexWatchRule {
|
|
68
|
+
context: unknown;
|
|
69
|
+
private readonly predicate;
|
|
70
|
+
constructor(context: unknown, predicate: (index: unknown, target: unknown, context: unknown) => boolean);
|
|
71
|
+
test(index: unknown, target: unknown): boolean;
|
|
72
|
+
}
|
|
73
|
+
declare const watchIndexRecursiveRule: IndexWatchRule;
|
|
74
|
+
|
|
60
75
|
interface IObjectChange {
|
|
61
76
|
root: object;
|
|
62
77
|
mutation: IPropertyChange;
|
|
@@ -67,18 +82,17 @@ interface IObserverProxyPair<TProxy = unknown> {
|
|
|
67
82
|
proxy?: TProxy;
|
|
68
83
|
proxyTarget?: TProxy;
|
|
69
84
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
mustProxify?: MustProxify;
|
|
85
|
+
interface IIndexInfo {
|
|
86
|
+
index: unknown;
|
|
87
|
+
indexWatchRule?: IIndexWatchRule;
|
|
74
88
|
}
|
|
75
|
-
interface IPropertyInfo extends
|
|
89
|
+
interface IPropertyInfo extends IIndexInfo {
|
|
76
90
|
value?: unknown;
|
|
77
91
|
owner?: IDisposableOwner;
|
|
78
92
|
setValue?: (value: unknown) => boolean;
|
|
79
93
|
initializeManually?: boolean;
|
|
80
94
|
}
|
|
81
|
-
type IPropertyObserverProxyPairManager = ISingletonFactory<unknown, IPropertyInfo, IObserverProxyPair,
|
|
95
|
+
type IPropertyObserverProxyPairManager = ISingletonFactory<unknown, IPropertyInfo, IObserverProxyPair, IIndexInfo>;
|
|
82
96
|
type IObjectPropertyObserverProxyPairManager = ISingletonFactory<unknown, unknown, IPropertyObserverProxyPairManager>;
|
|
83
97
|
|
|
84
98
|
declare class ObserverGroup extends AbstractObserver {
|
|
@@ -107,7 +121,7 @@ declare class ObserverGroup extends AbstractObserver {
|
|
|
107
121
|
interface IProxyTarget<TTarget> {
|
|
108
122
|
initializeManually?: boolean;
|
|
109
123
|
target: TTarget;
|
|
110
|
-
|
|
124
|
+
indexWatchRule?: IIndexWatchRule;
|
|
111
125
|
}
|
|
112
126
|
type IObjectObserverProxyPairManager<TTarget = unknown> = ISingletonFactory<unknown, IProxyTarget<TTarget>, IObserverProxyPair<TTarget>>;
|
|
113
127
|
|
|
@@ -128,7 +142,7 @@ declare abstract class AbstractObjectObserverProxyPairFactory<TTarget, TData ext
|
|
|
128
142
|
create(owner: IDisposableOwner, data: TData): IObserverProxyPair<TTarget>;
|
|
129
143
|
protected createDisposableOwner(owner: IDisposableOwner, _data: TData): IDisposableOwner;
|
|
130
144
|
protected abstract createRootObserver(data: TData): IObserverProxyPair<TTarget> | undefined;
|
|
131
|
-
protected onObserverGroupCreate(target: TTarget, observerGroup: ObserverGroup,
|
|
145
|
+
protected onObserverGroupCreate(target: TTarget, observerGroup: ObserverGroup, indexWatchRule?: IIndexWatchRule): void;
|
|
132
146
|
}
|
|
133
147
|
|
|
134
148
|
interface IArrayProxyIdData {
|
|
@@ -151,7 +165,7 @@ declare class ArrayObserverProxyPairFactory extends AbstractObjectObserverProxyP
|
|
|
151
165
|
|
|
152
166
|
interface IDateProxyIdData {
|
|
153
167
|
date: Date;
|
|
154
|
-
|
|
168
|
+
indexWatchRule?: IIndexWatchRule;
|
|
155
169
|
}
|
|
156
170
|
interface IDateProxyData extends IDateProxyIdData {
|
|
157
171
|
owner?: IDisposableOwner;
|
|
@@ -266,7 +280,7 @@ declare class ObjectObserverProxyPairManager extends SingletonFactoryWithGuid<IP
|
|
|
266
280
|
private readonly _proxyRegistry;
|
|
267
281
|
constructor(getObserverFactoryProvider: () => IObjectObserverProxyPairFactoryProvider, _proxyRegistry: IProxyRegistry, guidFactory: IGuidFactory);
|
|
268
282
|
protected getGroupId(data: IProxyTarget<unknown>): unknown;
|
|
269
|
-
protected getGroupMemberId(data: IProxyTarget<unknown>):
|
|
283
|
+
protected getGroupMemberId(data: IProxyTarget<unknown>): IIndexWatchRule | undefined;
|
|
270
284
|
create(data: IProxyTarget<unknown>): {
|
|
271
285
|
referenceCount: number;
|
|
272
286
|
instance: IObserverProxyPair<unknown>;
|
|
@@ -316,7 +330,7 @@ declare class CollectionItemObserverManager extends SingletonFactory<Collection,
|
|
|
316
330
|
|
|
317
331
|
interface ISubscriptionIdInfo<TIndex> {
|
|
318
332
|
index: TIndex;
|
|
319
|
-
|
|
333
|
+
indexWatchRule: IIndexWatchRule | undefined;
|
|
320
334
|
}
|
|
321
335
|
interface ISubscriptionInfo<TIndex> extends ISubscriptionIdInfo<TIndex>, IChangeSubscriptionsCreateMethods {
|
|
322
336
|
initialValue?: unknown;
|
|
@@ -329,7 +343,7 @@ interface IndexChangeSubscriptionForContext<TIndex> {
|
|
|
329
343
|
context: unknown;
|
|
330
344
|
index: TIndex;
|
|
331
345
|
}
|
|
332
|
-
type IIndexSetObserverManager<TIndex> = ISingletonFactory<unknown, unknown, ISingletonFactory<
|
|
346
|
+
type IIndexSetObserverManager<TIndex> = ISingletonFactory<unknown, unknown, ISingletonFactory<IIndexWatchRule | TIndex, IIndexObserverInfo<TIndex>, IObserver, ISubscriptionIdInfo<TIndex>>>;
|
|
333
347
|
type IIndexChangeSubscriptionsForContextManager<TIndex> = IGroupedChangeSubscriptionsForContextManager<ObserverGroup, ISubscriptionInfo<TIndex>, ISubscriptionIdInfo<TIndex>>;
|
|
334
348
|
declare class IndexChangeSubscriptionManager<TIndex> extends SingletonFactory<unknown, unknown, IIndexChangeSubscriptionsForContextManager<TIndex>> {
|
|
335
349
|
private readonly _indexSetObserverManager;
|
|
@@ -346,13 +360,13 @@ declare abstract class IndexObserverProxyPairFactory<TContext, TIndex> implement
|
|
|
346
360
|
private readonly _objectObserveryManager;
|
|
347
361
|
protected readonly _indexValueAccessor: IIndexValueAccessor;
|
|
348
362
|
private readonly _proxyRegister;
|
|
363
|
+
private readonly _valueMetadata;
|
|
349
364
|
private readonly mustHandleChange?;
|
|
350
365
|
private readonly _indexChangeSubscriptionManager;
|
|
351
|
-
protected constructor(_objectObserveryManager: IObjectObserverProxyPairManager, indexSetObserverManager: IIndexSetObserverManager<TIndex>, errorLog: IErrorLog, guidFactory: IGuidFactory, _indexValueAccessor: IIndexValueAccessor, _proxyRegister: IProxyRegistry, mustHandleChange?: ((change: IPropertyChange) => boolean) | undefined);
|
|
366
|
+
protected constructor(_objectObserveryManager: IObjectObserverProxyPairManager, indexSetObserverManager: IIndexSetObserverManager<TIndex>, errorLog: IErrorLog, guidFactory: IGuidFactory, _indexValueAccessor: IIndexValueAccessor, _proxyRegister: IProxyRegistry, _valueMetadata: IValueMetadata, mustHandleChange?: ((change: IPropertyChange) => boolean) | undefined);
|
|
352
367
|
dispose(): void;
|
|
353
368
|
abstract applies(object: unknown, propertyInfo: IPropertyInfo): boolean;
|
|
354
369
|
create(owner: IDisposableOwner, object: TContext, propertyInfo: IPropertyInfo): IObserverProxyPair<TContext>;
|
|
355
|
-
private getMustProxifyHandler;
|
|
356
370
|
private createIndexValueProxy;
|
|
357
371
|
private createGroupObserver;
|
|
358
372
|
private onIndexSet;
|
|
@@ -361,14 +375,12 @@ declare abstract class IndexObserverProxyPairFactory<TContext, TIndex> implement
|
|
|
361
375
|
}
|
|
362
376
|
|
|
363
377
|
declare class CollectionItemObserverProxyPairFactory extends IndexObserverProxyPairFactory<Collection, unknown> {
|
|
364
|
-
constructor(objectObserverManager: IObjectObserverProxyPairManager, collectionItemObserverManager: ICollectionItemObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, indexValueAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry);
|
|
378
|
+
constructor(objectObserverManager: IObjectObserverProxyPairManager, collectionItemObserverManager: ICollectionItemObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, indexValueAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry, valueMetadata: IValueMetadata);
|
|
365
379
|
applies(object: unknown): boolean;
|
|
366
380
|
}
|
|
367
381
|
|
|
368
382
|
type ICollectionItemObserverProxyPairFactory = IIndexObserverProxyPairFactory<Collection>;
|
|
369
383
|
|
|
370
|
-
type IMustProxifyItemHandlerFactory = ISingletonFactory<unknown, unknown, MustProxify>;
|
|
371
|
-
|
|
372
384
|
type IDatePropertyObserverIdInfo = IIndexObserverIdInfo<DateProperty>;
|
|
373
385
|
type IDatePropertyObserverInfo = IIndexObserverInfo<DateProperty>;
|
|
374
386
|
type IProperForDataObserverManager = ISingletonFactory<DateProperty, IDatePropertyObserverInfo, IObserver>;
|
|
@@ -378,8 +390,7 @@ declare class DatePropertyObserverManager extends SingletonFactory<Date, Date, I
|
|
|
378
390
|
private readonly _dateProxyFactory;
|
|
379
391
|
private readonly _errorLog;
|
|
380
392
|
private readonly _datePropertyAccessor;
|
|
381
|
-
|
|
382
|
-
constructor(_dateProxyFactory: IDateProxyFactory, _errorLog: IErrorLog, _datePropertyAccessor: IDatePropertyAccessor, _mustProxifyItemHandlerFactory: IMustProxifyItemHandlerFactory);
|
|
393
|
+
constructor(_dateProxyFactory: IDateProxyFactory, _errorLog: IErrorLog, _datePropertyAccessor: IDatePropertyAccessor);
|
|
383
394
|
getId(date: Date): Date;
|
|
384
395
|
createId(date: Date): Date;
|
|
385
396
|
protected createInstance(date: Date): IProperForDataObserverManager;
|
|
@@ -389,7 +400,7 @@ declare class DatePropertyObserverManager extends SingletonFactory<Date, Date, I
|
|
|
389
400
|
type IDatePropertyObserverProxyPairFactory = IIndexObserverProxyPairFactory<Date>;
|
|
390
401
|
|
|
391
402
|
declare class DatePropertyObserverProxyPairFactory extends IndexObserverProxyPairFactory<Date, DateProperty> implements IDatePropertyObserverProxyPairFactory {
|
|
392
|
-
constructor(objectObserverManager: IObjectObserverProxyPairManager, datePropertyObserverManager: IDatePropertyObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, datePropertyAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry);
|
|
403
|
+
constructor(objectObserverManager: IObjectObserverProxyPairManager, datePropertyObserverManager: IDatePropertyObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, datePropertyAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry, valueMetadata: IValueMetadata);
|
|
393
404
|
applies(object: unknown): boolean;
|
|
394
405
|
}
|
|
395
406
|
|
|
@@ -399,7 +410,7 @@ type IPropertyObserverManager = ISingletonFactory<string, IPropertyObserverInfo,
|
|
|
399
410
|
type IObjectPropertyObserverManager = ISingletonFactory<object, object, IPropertyObserverManager>;
|
|
400
411
|
|
|
401
412
|
declare class NonIterableObjectPropertyObserverProxyPairFactory extends IndexObserverProxyPairFactory<object, string> {
|
|
402
|
-
constructor(objectObserveryManager: IObjectObserverProxyPairManager, objectPropertyObserverManager: IObjectPropertyObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, indexValueAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry);
|
|
413
|
+
constructor(objectObserveryManager: IObjectObserverProxyPairManager, objectPropertyObserverManager: IObjectPropertyObserverManager, errorLog: IErrorLog, guidFactory: IGuidFactory, indexValueAccessor: IIndexValueAccessor, proxyRegister: IProxyRegistry, valueMetadata: IValueMetadata);
|
|
403
414
|
applies(object: unknown, propertyInfo: IPropertyInfo): boolean;
|
|
404
415
|
protected setIndexValue(object: Record<string, unknown>, key: string, value: unknown): void;
|
|
405
416
|
}
|
|
@@ -413,13 +424,6 @@ declare class ObjectPropertyObserverManager extends SingletonFactory<object, obj
|
|
|
413
424
|
protected releaseInstance(propertyObserverManager: IPropertyObserverManager): void;
|
|
414
425
|
}
|
|
415
426
|
|
|
416
|
-
declare class MustProxifyItemHandlerFactory extends SingletonFactory<unknown, unknown, MustProxify> implements IMustProxifyItemHandlerFactory {
|
|
417
|
-
constructor();
|
|
418
|
-
getId(index: unknown): unknown;
|
|
419
|
-
protected createInstance(_: unknown, id: unknown): MustProxify;
|
|
420
|
-
protected createId(index: unknown): unknown;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
427
|
declare class ArrayProxyFactory extends SingletonFactory<unknown[], IArrayProxyData, IArrayObserverProxyPair, IArrayProxyIdData> implements IArrayProxyFactory {
|
|
424
428
|
private readonly _proxyRegistry;
|
|
425
429
|
constructor(_proxyRegistry: IProxyRegistry);
|
|
@@ -433,7 +437,7 @@ declare class DateProxyFactory extends SingletonFactoryWithGuid<IDateProxyData,
|
|
|
433
437
|
private readonly _proxyRegistry;
|
|
434
438
|
constructor(guidFactory: IGuidFactory, _proxyRegistry: IProxyRegistry);
|
|
435
439
|
protected getGroupId(data: IDateProxyIdData): Date;
|
|
436
|
-
protected getGroupMemberId(data: IDateProxyIdData):
|
|
440
|
+
protected getGroupMemberId(data: IDateProxyIdData): IIndexWatchRule | undefined;
|
|
437
441
|
protected createInstance(dateProxyData: IDateProxyData, id: string): IDateObserverProxyPair;
|
|
438
442
|
}
|
|
439
443
|
|
|
@@ -507,6 +511,11 @@ declare class SetProxyFactory extends SingletonFactory<Set<unknown>, ISetProxify
|
|
|
507
511
|
protected releaseInstance(setObserverWithProxy: ISetObserverProxyPair): void;
|
|
508
512
|
}
|
|
509
513
|
|
|
514
|
+
declare const defaultObjectObserverProxyPairFactoryList: readonly IMultiInjectService[];
|
|
515
|
+
declare const defaultPropertyObserverProxyPairFactoryList: readonly IMultiInjectService[];
|
|
516
|
+
declare const RsXStateManagerModule: ContainerModule;
|
|
517
|
+
declare function unloadRsXStateManagerModule(): Promise<void>;
|
|
518
|
+
|
|
510
519
|
declare const RsXStateManagerInjectionTokens: {
|
|
511
520
|
IArrayProxyFactory: symbol;
|
|
512
521
|
IMapProxyFactory: symbol;
|
|
@@ -534,7 +543,6 @@ declare const RsXStateManagerInjectionTokens: {
|
|
|
534
543
|
IPropertyObserverProxyPairFactoryList: symbol;
|
|
535
544
|
NonIterableObjectPropertyObserverProxyPairFactory: symbol;
|
|
536
545
|
ICollectionItemObserverProxyPairFactory: symbol;
|
|
537
|
-
IMustProxifyItemHandlerFactory: symbol;
|
|
538
546
|
IObjectStateManager: symbol;
|
|
539
547
|
IPropertyObserverProxyPairFactoryProvider: symbol;
|
|
540
548
|
IPropertyObserverProxyPairFactoryProviderFactory: symbol;
|
|
@@ -542,11 +550,6 @@ declare const RsXStateManagerInjectionTokens: {
|
|
|
542
550
|
IStateManager: symbol;
|
|
543
551
|
};
|
|
544
552
|
|
|
545
|
-
declare const defaultObjectObserverProxyPairFactoryList: readonly IMultiInjectService[];
|
|
546
|
-
declare const defaultPropertyObserverProxyPairFactoryList: readonly IMultiInjectService[];
|
|
547
|
-
declare const RsXStateManagerModule: ContainerModule;
|
|
548
|
-
declare function unloadRsXStateManagerModule(): Promise<void>;
|
|
549
|
-
|
|
550
553
|
interface IState {
|
|
551
554
|
value: unknown;
|
|
552
555
|
valueCopy: unknown;
|
|
@@ -593,8 +596,8 @@ interface IStateChangeObserverInfo {
|
|
|
593
596
|
readonly subscription: Subscription;
|
|
594
597
|
}
|
|
595
598
|
interface IStateChangeSubscriptionIdInfo {
|
|
596
|
-
|
|
597
|
-
|
|
599
|
+
index: unknown;
|
|
600
|
+
indexWatchRule?: IIndexWatchRule;
|
|
598
601
|
}
|
|
599
602
|
interface IStateChangeSubscriptionInfo extends IStateChangeSubscriptionIdInfo {
|
|
600
603
|
onChanged: (change: IPropertyChange) => void;
|
|
@@ -603,6 +606,7 @@ interface IStateChangeSubscriptionInfo extends IStateChangeSubscriptionIdInfo {
|
|
|
603
606
|
type IStateChangeSubscriptionsForContextManager = ISingletonFactoryWithIdGeneration<string, IStateChangeSubscriptionInfo, IObserver, IStateChangeSubscriptionIdInfo>;
|
|
604
607
|
interface IStateChangeSubscriptionManager extends ISingletonFactory<unknown, unknown, IStateChangeSubscriptionsForContextManager> {
|
|
605
608
|
isRegistered(context: unknown, key: unknown): boolean;
|
|
609
|
+
instanceGroupInfoEntriesForContext(context: unknown): IterableIterator<IInstanceGroupInfo<string, IObserver>>;
|
|
606
610
|
}
|
|
607
611
|
|
|
608
612
|
declare class StateChangeSubscriptionManager extends SingletonFactory<unknown, unknown, IStateChangeSubscriptionsForContextManager> implements IStateChangeSubscriptionManager {
|
|
@@ -611,6 +615,7 @@ declare class StateChangeSubscriptionManager extends SingletonFactory<unknown, u
|
|
|
611
615
|
private readonly _guidFactory;
|
|
612
616
|
constructor(_objectObserverManager: IObjectPropertyObserverProxyPairManager, _errorLog: IErrorLog, _guidFactory: IGuidFactory);
|
|
613
617
|
getId(context: unknown): unknown;
|
|
618
|
+
instanceGroupInfoEntriesForContext(context: unknown): IterableIterator<IInstanceGroupInfo<string, IObserver>>;
|
|
614
619
|
isRegistered(context: unknown, key: unknown): boolean;
|
|
615
620
|
protected createId(context: unknown): unknown;
|
|
616
621
|
protected createInstance(context: unknown, id: unknown): IStateChangeSubscriptionsForContextManager;
|
|
@@ -620,7 +625,7 @@ declare class StateChangeSubscriptionManager extends SingletonFactory<unknown, u
|
|
|
620
625
|
interface IContextChanged {
|
|
621
626
|
oldContext: unknown;
|
|
622
627
|
context: unknown;
|
|
623
|
-
|
|
628
|
+
index: unknown;
|
|
624
629
|
}
|
|
625
630
|
interface IStateChange extends IContextChanged {
|
|
626
631
|
oldValue: unknown;
|
|
@@ -632,9 +637,9 @@ interface IStateManager {
|
|
|
632
637
|
readonly contextChanged: Observable<IContextChanged>;
|
|
633
638
|
readonly startChangeCycle: Observable<void>;
|
|
634
639
|
readonly endChangeCycle: Observable<void>;
|
|
635
|
-
isWatched(context: unknown, index: unknown,
|
|
636
|
-
watchState(context: unknown, index: unknown,
|
|
637
|
-
releaseState(oontext: unknown, index: unknown,
|
|
640
|
+
isWatched(context: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): boolean;
|
|
641
|
+
watchState(context: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): unknown;
|
|
642
|
+
releaseState(oontext: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): void;
|
|
638
643
|
getState<T>(context: unknown, index: unknown): T;
|
|
639
644
|
setState<T>(context: unknown, index: unknown, value: T): void;
|
|
640
645
|
clear(): void;
|
|
@@ -656,9 +661,9 @@ declare class StateManager implements IStateManager {
|
|
|
656
661
|
get startChangeCycle(): Observable<void>;
|
|
657
662
|
get endChangeCycle(): Observable<void>;
|
|
658
663
|
toString(): string;
|
|
659
|
-
isWatched(context: unknown, index: unknown,
|
|
660
|
-
watchState(context: unknown, index: unknown,
|
|
661
|
-
releaseState(context: unknown, index: unknown,
|
|
664
|
+
isWatched(context: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): boolean;
|
|
665
|
+
watchState(context: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): unknown;
|
|
666
|
+
releaseState(context: unknown, index: unknown, indexWatchRule?: IIndexWatchRule): void;
|
|
662
667
|
clear(): void;
|
|
663
668
|
getState<T>(context: unknown, index: unknown): T;
|
|
664
669
|
setState<T>(context: unknown, index: unknown, value: T): void;
|
|
@@ -680,4 +685,4 @@ declare class StateManager implements IStateManager {
|
|
|
680
685
|
private onChange;
|
|
681
686
|
}
|
|
682
687
|
|
|
683
|
-
export { AbstractObjectObserverProxyPairFactory, AbstractObserver, ArrayObserverProxyPairFactory, ArrayProxyFactory, type Collection, CollectionItemObserverManager, CollectionItemObserverProxyPairFactory, DateObserverProxyPairFactory, DatePropertyObserverManager, DatePropertyObserverProxyPairFactory, DateProxyFactory, GroupedChangeSubscriptionsForContextManager, type IArrayObserverProxyPair, type IArrayObserverProxyPairFactory, type IArrayProxyData, type IArrayProxyFactory, type IArrayProxyIdData, type IChangeSubscriptionsCreateMethods, type ICollectionIdexObserverIdInfo, type ICollectionIndexObserverManager, type ICollectionItemObserverManager, type ICollectionItemObserverProxyPairFactory, type IContextChanged, type IDateObserverProxyPair, type IDateObserverProxyPairFactory, type IDateOserverProxyPair, type IDatePropertyObserverIdInfo, type IDatePropertyObserverInfo, type IDatePropertyObserverManager, type IDatePropertyObserverProxyPairFactory, type IDateProxyData, type IDateProxyFactory, type IDateProxyIdData, type IGroupedChangeSubscriptionsForContextManager, type IIndexChangeSubscriptionsForContextManager, type IIndexObserverIdInfo, type IIndexObserverInfo, type IIndexObserverProxyPairFactory, type IIndexSetObserverManager, type IMapObserverProxyPair, type IMapObserverProxyPairFactory, type IMapProxifyData, type IMapProxifyIdData, type IMapProxyFactory, type
|
|
688
|
+
export { AbstractObjectObserverProxyPairFactory, AbstractObserver, ArrayObserverProxyPairFactory, ArrayProxyFactory, type Collection, CollectionItemObserverManager, CollectionItemObserverProxyPairFactory, DateObserverProxyPairFactory, DatePropertyObserverManager, DatePropertyObserverProxyPairFactory, DateProxyFactory, GroupedChangeSubscriptionsForContextManager, type IArrayObserverProxyPair, type IArrayObserverProxyPairFactory, type IArrayProxyData, type IArrayProxyFactory, type IArrayProxyIdData, type IChangeSubscriptionsCreateMethods, type ICollectionIdexObserverIdInfo, type ICollectionIndexObserverManager, type ICollectionItemObserverManager, type ICollectionItemObserverProxyPairFactory, type IContextChanged, type IDateObserverProxyPair, type IDateObserverProxyPairFactory, type IDateOserverProxyPair, type IDatePropertyObserverIdInfo, type IDatePropertyObserverInfo, type IDatePropertyObserverManager, type IDatePropertyObserverProxyPairFactory, type IDateProxyData, type IDateProxyFactory, type IDateProxyIdData, type IGroupedChangeSubscriptionsForContextManager, type IIndexChangeSubscriptionsForContextManager, type IIndexInfo, type IIndexObserverIdInfo, type IIndexObserverInfo, type IIndexObserverProxyPairFactory, type IIndexSetObserverManager, type IIndexWatchRule, type IMapObserverProxyPair, type IMapObserverProxyPairFactory, type IMapProxifyData, type IMapProxifyIdData, type IMapProxyFactory, type IObjectChange, type IObjectObserverProxyPairFactory, type IObjectObserverProxyPairFactoryProvider, type IObjectObserverProxyPairManager, type IObjectPropertyObserverManager, type IObjectPropertyObserverProxyPairManager, type IObjectStateManager, type IObservableObserverProxyPair, type IObservableProxyData, type IObservableProxyFactory, type IObserver, type IObserverProxyPair, type IPlainObjectObserverProxyPairFactory, type IPromiseObserverProxyPair, type IPromiseProxyData, type IPromiseProxyFactory, type IProperForDataObserverManager, type IPropertyInfo, type IPropertyObserverIdInfo, type IPropertyObserverInfo, type IPropertyObserverManager, type IPropertyObserverProxyPairManager, type IProxyRegistry, type IProxyTarget, type ISetObserverProxyPair, type ISetObserverProxyPairFactory, type ISetProxifyData, type ISetProxifyIdData, type ISetProxyFactory, type IState, type IStateChange, type IStateChangeObserverInfo, type IStateChangeSubscriptionIdInfo, type IStateChangeSubscriptionInfo, type IStateChangeSubscriptionManager, type IStateChangeSubscriptionsForContextManager, type IStateForObjectManager, type IStateManager, type ISubscriptionIdInfo, type ISubscriptionInfo, type ISubscriptionWithData, type IValueKey, type IValueWithKey, type IndexChangeSubscriptionForContext, IndexChangeSubscriptionManager, IndexObserverProxyPairFactory, IndexWatchRule, MapObserverProxyPairFactory, MapProxy, MapProxyFactory, NonIterableObjectPropertyObserverProxyPairFactory, ObjectObserverProxyPairFactoryProvider, ObjectObserverProxyPairManager, ObjectPropertyObserverManager, ObjectPropertyObserverProxyPairManager, ObjectStateManager, ObservableObserverProxyPairFactory, ObservableProxyFactory, ObserverGroup, PlainObjectObserverProxyPairFactory, PromiseObserverProxyPairFactory, PromiseProxyFactory, ProxyRegistry, RsXStateManagerInjectionTokens, RsXStateManagerModule, SetObserverProxyPairFactory, SetProxy, SetProxyFactory, type ShouldWatchIndexPredicate, StateChangeSubscriptionManager, StateForObjectManager, StateManager, defaultObjectObserverProxyPairFactoryList, defaultPropertyObserverProxyPairFactoryList, unloadRsXStateManagerModule, watchIndexRecursiveRule };
|