@rentman/rm-core 64.0.2 → 65.0.0-RM4-45884
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/rm-core.js +1 -1
- package/dist/rm-core.js.map +1 -1
- package/dist/types/src/classes/ApiFormatter.d.ts +1 -1
- package/dist/types/src/classes/cache/AbstractCache.d.ts +3 -2
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +6 -18
- package/dist/types/src/types/ItemTypesCollection.d.ts +9 -1
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@ export declare abstract class ApiFormatter {
|
|
|
43
43
|
* Compares the given fields, returns `true` when the fields are equal
|
|
44
44
|
*/
|
|
45
45
|
static compareFields<ColumnType extends ApiEnumApiType>(columnType: ColumnType, first?: ApiEnumApiTypeToTsTypeMap[ColumnType], second?: ApiEnumApiTypeToTsTypeMap[ColumnType]): boolean;
|
|
46
|
-
static compareFloats(a: number, b: number): boolean;
|
|
46
|
+
static compareFloats(a: number, b: number, epsilonPrecision?: 'float' | 'double'): boolean;
|
|
47
47
|
static compareMomentObjects(first: moment.Moment, second: moment.Moment): boolean;
|
|
48
48
|
static compareDurations(first: moment.Duration, second: moment.Duration): boolean;
|
|
49
49
|
static formatResponseValue(columnType: string, value: any): any;
|
|
@@ -11,14 +11,15 @@ export type TransactionOptions = {
|
|
|
11
11
|
export declare abstract class AbstractCache {
|
|
12
12
|
dependencies: AbstractCacheDependencyInterface;
|
|
13
13
|
core: RmCore;
|
|
14
|
-
|
|
14
|
+
readonly childrenSignal: import("@angular/core").WritableSignal<TransactionCache[]>;
|
|
15
15
|
readonly itemHandler: ItemHandlerBase;
|
|
16
16
|
readonly cachedQueryHandler: CachedQueryHandlerBase;
|
|
17
17
|
parent: AbstractCache | null;
|
|
18
18
|
protected constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore);
|
|
19
|
+
getChildren(): TransactionCache[];
|
|
19
20
|
getDescendantsIterator(): IterableIterator<TransactionCache>;
|
|
20
21
|
abstract createChild(id?: string, validatorFactory?: TransactionValidatorFactory, options?: TransactionOptions): TransactionCache;
|
|
21
|
-
onChildDestroy(
|
|
22
|
+
onChildDestroy(transactionCache: TransactionCache): void;
|
|
22
23
|
/**
|
|
23
24
|
* @description
|
|
24
25
|
* Returns {@link ItemEntry ItemEntries} that fit the collection's query, copies over the collectionChanges on all transactions in the chain.
|
|
@@ -94,13 +94,15 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
94
94
|
validatorWithDependencies?: TransactionValidatorWithDependencies<any>;
|
|
95
95
|
private readonly options;
|
|
96
96
|
private actionsQueue;
|
|
97
|
-
private
|
|
97
|
+
private pendingActionLabels;
|
|
98
98
|
private transactionStateSignal;
|
|
99
|
-
|
|
100
|
-
isReadySignal: import("@angular/core").Signal<boolean>;
|
|
101
|
-
isPendingSignal: import("@angular/core").Signal<boolean>;
|
|
99
|
+
isPendingSignal: any;
|
|
102
100
|
isDestroyedSignal: WritableSignal<boolean>;
|
|
103
101
|
isValidSignal: import("@angular/core").Signal<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* Like {@link isPendingSignal}, but does not take the 'saving' transaction state into account.
|
|
104
|
+
*/
|
|
105
|
+
private isStrictlyPendingSignal;
|
|
104
106
|
constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore, parent: AbstractCache,
|
|
105
107
|
/**
|
|
106
108
|
* @description
|
|
@@ -139,20 +141,6 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
139
141
|
* - Changes on existing items
|
|
140
142
|
*/
|
|
141
143
|
get hasChanges(): boolean;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated use isSavingSignal instead
|
|
144
|
-
*
|
|
145
|
-
* @description
|
|
146
|
-
* Is true while the {@link TransactionCache TransactionCache} is applying changes to the parent (can either be through a merge or an Api save)
|
|
147
|
-
*/
|
|
148
|
-
get isSaving(): boolean;
|
|
149
|
-
/**
|
|
150
|
-
* @deprecated use isReadySignal instead
|
|
151
|
-
*
|
|
152
|
-
* @description
|
|
153
|
-
* Is true while the {@link TransactionCache TransactionCache} is ready to handle new saves
|
|
154
|
-
*/
|
|
155
|
-
get isReady(): boolean;
|
|
156
144
|
/**
|
|
157
145
|
* @deprecated use isValidSignal instead
|
|
158
146
|
*/
|
|
@@ -114,6 +114,14 @@ export interface SocketMessageBase {
|
|
|
114
114
|
messageType: string;
|
|
115
115
|
inResponse: boolean;
|
|
116
116
|
}
|
|
117
|
+
export interface SocketMessageMassUpdate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
|
|
118
|
+
messageType: 'event';
|
|
119
|
+
body: {
|
|
120
|
+
itemType: ItemTypeType;
|
|
121
|
+
eventType: 'massUpdate';
|
|
122
|
+
items: Pick<SocketUpdatedItems, ItemTypeType>;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
117
125
|
export interface SocketMessageCreate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
|
|
118
126
|
messageType: 'event';
|
|
119
127
|
body: {
|
|
@@ -155,7 +163,7 @@ export type SocketMessageValuesTuple<ItemTypeType extends ApiItemType, ColumnIds
|
|
|
155
163
|
parent: EntryParent | null;
|
|
156
164
|
values: FieldMap<ItemTypeType, ColumnIds>;
|
|
157
165
|
};
|
|
158
|
-
export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete
|
|
166
|
+
export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete | SocketMessageMassUpdate<ItemTypeType>;
|
|
159
167
|
export type ItemResourcesItemTypeMap = {
|
|
160
168
|
[ItemTypeType in ApiItemType]?: ItemResource<ItemTypeType>[];
|
|
161
169
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rentman/rm-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "65.0.0-RM4-45884",
|
|
4
4
|
"description": "Rentman core functionalities",
|
|
5
5
|
"main": "./dist/rm-core.js",
|
|
6
6
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@angular/core": "^20",
|
|
37
|
-
"@rentman/backend-types": "
|
|
37
|
+
"@rentman/backend-types": "4.853.0-48-gdec0e2bd1e",
|
|
38
38
|
"moment": "^2.30.1",
|
|
39
39
|
"rxjs": "^7"
|
|
40
40
|
},
|