@rentman/rm-core 1.5.5 → 1.5.7-1
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/changelog.md +33 -0
- package/dist/rm-core.js +219 -253
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +20 -21
- package/dist/src/classes/ApiResponseProcessor.d.ts +24 -16
- package/dist/src/classes/ChangesCompilation.d.ts +3 -3
- package/dist/src/classes/ChangesProcessor.d.ts +15 -15
- package/dist/src/classes/CollectionCache.d.ts +9 -9
- package/dist/src/classes/CollectionEntryService.d.ts +4 -7
- package/dist/src/classes/CollectionHandler.d.ts +8 -8
- package/dist/src/classes/CollectionMatcher.d.ts +24 -13
- package/dist/src/classes/CollectionResourceService.d.ts +2 -1
- package/dist/src/classes/ColumnCache.d.ts +4 -4
- package/dist/src/classes/ColumnExpansion.d.ts +5 -4
- package/dist/src/classes/ColumnSet.d.ts +7 -7
- package/dist/src/classes/ColumnUtil.d.ts +36 -22
- package/dist/src/classes/CreateRequest.d.ts +1 -1
- package/dist/src/classes/ItemAdministrator.d.ts +123 -45
- package/dist/src/classes/ItemCache.d.ts +8 -7
- package/dist/src/classes/ItemEntryService.d.ts +2 -2
- package/dist/src/classes/ItemHandler.d.ts +8 -8
- package/dist/src/classes/ItemRequestService.d.ts +2 -2
- package/dist/src/classes/KeyService.d.ts +1 -1
- package/dist/src/classes/LocalCache.d.ts +40 -16
- package/dist/src/classes/LockService.d.ts +22 -13
- package/dist/src/classes/ModuleChangesCompilation.d.ts +4 -4
- package/dist/src/classes/QueryMatcher.d.ts +5 -5
- package/dist/src/classes/QueryParser.d.ts +14 -13
- package/dist/src/classes/QueryService.d.ts +5 -16
- package/dist/src/classes/RequestColumnExpansion.d.ts +5 -3
- package/dist/src/classes/SocketMessageHandler.d.ts +10 -9
- package/dist/src/classes/Util.d.ts +6 -5
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/factories/ChangesCompilationFactory.d.ts +2 -2
- package/dist/src/factories/CollectionResourceFactory.d.ts +12 -2
- package/dist/src/factories/ColumnInfoFactory.d.ts +1 -1
- package/dist/src/factories/ColumnSetFactory.d.ts +1 -1
- package/dist/src/factories/ItemEntryFactory.d.ts +1 -1
- package/dist/src/factories/ItemResourceFactory.d.ts +9 -3
- package/dist/src/factories/QueryParserFactory.d.ts +2 -1
- package/dist/src/interfaces/LocalCacheManagerInterface.d.ts +1 -0
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +19 -9
- package/dist/src/models/CollectionEditResource.d.ts +8 -8
- package/dist/src/models/CollectionEntry.d.ts +37 -23
- package/dist/src/models/CollectionEntryOptions.d.ts +9 -17
- package/dist/src/models/CollectionResource.d.ts +20 -20
- package/dist/src/models/CollectionResourceOptions.d.ts +17 -32
- package/dist/src/models/CollectionViewResource.d.ts +2 -2
- package/dist/src/models/EditResource.d.ts +1 -1
- package/dist/src/models/ItemEntry.d.ts +9 -7
- package/dist/src/models/ItemEntryOptions.d.ts +8 -15
- package/dist/src/models/ItemResource.d.ts +1 -1
- package/dist/src/models/ItemResourceOptions.d.ts +6 -10
- package/dist/src/types/ItemTypesCollection.d.ts +27 -34
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiResponseProcessor, CollectionMatcher, ColumnSet, LocalCache, RequestColumnExpansion } from '../classes';
|
|
2
2
|
import { ENTRY_STATUS } from '../constants';
|
|
3
|
-
import { CollectionEntry, CollectionEntryOptions, CollectionEntryOptionsInterface, CollectionResource, CollectionResourceOptions, CollectionResourceOptionsInterface, ItemEntry, ItemEntryOptionsInterface, ItemResource, ItemResourceOptionsInterface } from '../models';
|
|
3
|
+
import { CollectionEntry, CollectionEntryOptions, CollectionEntryOptionsInterface, CollectionResource, CollectionResourceOptions, CollectionResourceOptionsInterface, CollectionViewResource, ItemEntry, ItemEntryOptionsInterface, ItemResource, ItemResourceOptionsInterface, ViewResource } from '../models';
|
|
4
4
|
export declare type EntryParent = {
|
|
5
5
|
itemType: string;
|
|
6
6
|
itemId: number;
|
|
@@ -9,9 +9,6 @@ export declare type EntryParentNull = EntryParent | null;
|
|
|
9
9
|
export declare type FieldMap = {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
};
|
|
12
|
-
export declare type OptionsInterface = {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
};
|
|
15
12
|
export declare type ItemOptionsInterface = ItemEntryOptionsInterface & ItemResourceOptionsInterface;
|
|
16
13
|
export declare type CollectionOptionsInterface = CollectionEntryOptionsInterface & CollectionResourceOptionsInterface;
|
|
17
14
|
export declare type CollectionDefinition = {
|
|
@@ -31,10 +28,10 @@ export declare type LinkCollectionDefinition = {
|
|
|
31
28
|
resource: CollectionResourceOptions;
|
|
32
29
|
};
|
|
33
30
|
};
|
|
34
|
-
export declare type OnChangeFunction = (itemResource: ItemResource, previous
|
|
31
|
+
export declare type OnChangeFunction = (itemResource: ItemResource, previous?: FieldMap) => void;
|
|
35
32
|
export declare const enum StateKeyType {
|
|
36
33
|
New = "new",
|
|
37
|
-
Duplicate = "duplicate"
|
|
34
|
+
Duplicate = "duplicate"
|
|
38
35
|
}
|
|
39
36
|
export declare type StateKey = {
|
|
40
37
|
type: StateKeyType;
|
|
@@ -45,7 +42,7 @@ export declare type OnSaveCallback = (localCache: LocalCache, conversionMap: Ite
|
|
|
45
42
|
export declare enum LocalCacheCallbackCondition {
|
|
46
43
|
Always = "always",
|
|
47
44
|
OnClose = "onClose",
|
|
48
|
-
SkipOnClose = "skipOnClose"
|
|
45
|
+
SkipOnClose = "skipOnClose"
|
|
49
46
|
}
|
|
50
47
|
export declare type LocalCacheCallbacks<T> = {
|
|
51
48
|
always: {
|
|
@@ -88,19 +85,20 @@ export interface FunctionChangesResolveSocketMessage extends SocketMessage {
|
|
|
88
85
|
[key: string]: any;
|
|
89
86
|
};
|
|
90
87
|
}
|
|
91
|
-
export declare type ItemResourceItemIdMap = {
|
|
92
|
-
[itemId: number]:
|
|
88
|
+
export declare type ItemResourceItemIdMap<T extends ItemResource = ViewResource> = {
|
|
89
|
+
[itemId: number]: T;
|
|
93
90
|
};
|
|
94
|
-
export declare type ItemResourcesItemTypeMap = {
|
|
95
|
-
[itemType: string]:
|
|
91
|
+
export declare type ItemResourcesItemTypeMap<T extends ItemResource = ViewResource> = {
|
|
92
|
+
[itemType: string]: T[];
|
|
96
93
|
};
|
|
97
94
|
export declare type ItemId = number;
|
|
98
95
|
export declare type ItemType = string;
|
|
99
|
-
export declare type
|
|
96
|
+
export declare type ItemMap<T> = {
|
|
100
97
|
[itemType: string]: {
|
|
101
|
-
[itemId:
|
|
98
|
+
[itemId: string]: T;
|
|
102
99
|
};
|
|
103
100
|
};
|
|
101
|
+
export declare type ItemEntryMap = ItemMap<ItemEntry>;
|
|
104
102
|
export declare type LinkedItemEntryMap = {
|
|
105
103
|
itemType: string;
|
|
106
104
|
itemEntries: ItemEntry[];
|
|
@@ -112,26 +110,27 @@ export declare type EntryStatusMap<T> = {
|
|
|
112
110
|
export declare type ItemEntryParentIdMap = {
|
|
113
111
|
[parentId: number]: ItemEntry[];
|
|
114
112
|
};
|
|
115
|
-
export declare type
|
|
116
|
-
[
|
|
117
|
-
[itemId: number]: number;
|
|
118
|
-
};
|
|
113
|
+
export declare type ConversionMap = {
|
|
114
|
+
[itemId: number]: number;
|
|
119
115
|
};
|
|
120
|
-
export declare type
|
|
121
|
-
[itemType: string]:
|
|
122
|
-
[itemId: number]: any;
|
|
123
|
-
};
|
|
116
|
+
export declare type ItemIdConversionMap = {
|
|
117
|
+
[itemType: string]: ConversionMap;
|
|
124
118
|
};
|
|
119
|
+
export declare type CreateRequestParameterMap = ItemMap<any>;
|
|
125
120
|
export declare type ItemError = {
|
|
126
121
|
message: string;
|
|
127
122
|
};
|
|
128
123
|
export declare type QueryParams = any;
|
|
124
|
+
export declare type CollectionQuery = {
|
|
125
|
+
object: object;
|
|
126
|
+
string: string;
|
|
127
|
+
};
|
|
129
128
|
export declare type QueryCallback = (queryParams: QueryParams) => QueryParams;
|
|
130
129
|
export declare type CollectionEntryParentIdMap = {
|
|
131
130
|
[parentId: number]: CollectionEntry;
|
|
132
131
|
};
|
|
133
|
-
export declare type CollectionResourceParentIdMap = {
|
|
134
|
-
[parentId: number]:
|
|
132
|
+
export declare type CollectionResourceParentIdMap<T extends CollectionResource = CollectionViewResource> = {
|
|
133
|
+
[parentId: number]: T;
|
|
135
134
|
};
|
|
136
135
|
export declare type CollectionMatchResult = {
|
|
137
136
|
fitting: CollectionEntry[];
|
|
@@ -139,12 +138,10 @@ export declare type CollectionMatchResult = {
|
|
|
139
138
|
maybe: CollectionEntry[];
|
|
140
139
|
};
|
|
141
140
|
export interface ExtendedCollectionMatchResult extends CollectionMatchResult {
|
|
142
|
-
collection:
|
|
141
|
+
collection: CollectionEntry;
|
|
143
142
|
}
|
|
144
143
|
export interface GroupedExtendedCollectionMatchResult {
|
|
145
|
-
[collectionId: number]:
|
|
146
|
-
[status: string]: ExtendedCollectionMatchResult;
|
|
147
|
-
};
|
|
144
|
+
[collectionId: number]: ExtendedCollectionMatchResult;
|
|
148
145
|
}
|
|
149
146
|
export declare type ResponseColumn = any;
|
|
150
147
|
export declare type ResponseColumnMap = {
|
|
@@ -170,8 +167,8 @@ export declare type RootColumnMap = {
|
|
|
170
167
|
};
|
|
171
168
|
};
|
|
172
169
|
export declare type ApiResponse = ApiResponseProcessor;
|
|
173
|
-
export declare type TemplateItemResourceMap = {
|
|
174
|
-
main:
|
|
170
|
+
export declare type TemplateItemResourceMap<T extends ItemResource> = {
|
|
171
|
+
main: T;
|
|
175
172
|
linked: ItemResourcesItemTypeMap;
|
|
176
173
|
};
|
|
177
174
|
export declare type TemplateItemEntryMap = {
|
|
@@ -225,10 +222,6 @@ export declare type CreateRequestEntry = {
|
|
|
225
222
|
columns: ApiRequestColumnMap;
|
|
226
223
|
};
|
|
227
224
|
columns: RequestColumnExpansion;
|
|
228
|
-
items:
|
|
229
|
-
[itemType: string]: {
|
|
230
|
-
[itemId: number]: ItemEntry;
|
|
231
|
-
};
|
|
232
|
-
};
|
|
225
|
+
items: ItemEntryMap;
|
|
233
226
|
collections: CollectionMatcher;
|
|
234
227
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rentman/rm-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7-1",
|
|
4
4
|
"description": "Rentman core functionalities",
|
|
5
5
|
"main": "./dist/rm-core.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"clean-webpack-plugin": "^0.1.19",
|
|
16
16
|
"ts-loader": "^4.4.1",
|
|
17
17
|
"tslint": "^5.12.1",
|
|
18
|
-
"typescript": "3.
|
|
18
|
+
"typescript": "3.3.3",
|
|
19
19
|
"uglifyjs-webpack-plugin": "^1.2.5",
|
|
20
20
|
"webpack": "^4.16.3",
|
|
21
21
|
"webpack-cli": "^3.0.6",
|