@rentman/rm-core 1.4.0 → 1.5.1-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.
Files changed (54) hide show
  1. package/changelog.md +21 -0
  2. package/dist/rm-core.js +3059 -2805
  3. package/dist/rm-core.min.js +1 -1
  4. package/dist/src/classes/ApiFormatter.d.ts +0 -1
  5. package/dist/src/classes/BatchStatus.d.ts +4 -2
  6. package/dist/src/classes/ChangesCompilation.d.ts +12 -4
  7. package/dist/src/classes/ChangesProcessor.d.ts +11 -11
  8. package/dist/src/classes/CollectionEntryService.d.ts +4 -4
  9. package/dist/src/classes/CollectionHandler.d.ts +5 -4
  10. package/dist/src/classes/CollectionMatcher.d.ts +4 -4
  11. package/dist/src/classes/CollectionResourceService.d.ts +2 -2
  12. package/dist/src/classes/ColumnCache.d.ts +3 -3
  13. package/dist/src/classes/ColumnExpansion.d.ts +3 -2
  14. package/dist/src/classes/ColumnSet.d.ts +7 -7
  15. package/dist/src/classes/ColumnSubsetCache.d.ts +9 -0
  16. package/dist/src/classes/CreateRequest.d.ts +1 -1
  17. package/dist/src/classes/ItemAdministrator.d.ts +29 -67
  18. package/dist/src/classes/ItemCache.d.ts +2 -2
  19. package/dist/src/classes/ItemEntryService.d.ts +4 -4
  20. package/dist/src/classes/ItemHandler.d.ts +29 -46
  21. package/dist/src/classes/ItemRequestService.d.ts +2 -2
  22. package/dist/src/classes/LocalCache.d.ts +13 -12
  23. package/dist/src/classes/ModuleChangesCompilation.d.ts +4 -4
  24. package/dist/src/classes/QueryMatcher.d.ts +4 -4
  25. package/dist/src/classes/QueryParser.d.ts +10 -10
  26. package/dist/src/classes/SocketMessageHandler.d.ts +22 -18
  27. package/dist/src/classes/Util.d.ts +3 -1
  28. package/dist/src/classes/index.d.ts +1 -1
  29. package/dist/src/constants.d.ts +4 -2
  30. package/dist/src/core.d.ts +3 -3
  31. package/dist/src/factories/BatchStatusFactory.d.ts +2 -2
  32. package/dist/src/factories/CollectionEntryFactory.d.ts +9 -6
  33. package/dist/src/factories/CollectionResourceFactory.d.ts +4 -5
  34. package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +7 -0
  35. package/dist/src/factories/ItemResourceFactory.d.ts +5 -6
  36. package/dist/src/factories/LocalCacheFactory.d.ts +2 -3
  37. package/dist/src/factories/index.d.ts +1 -0
  38. package/dist/src/interfaces/PromiseLibraryInterface.d.ts +2 -2
  39. package/dist/src/models/CollectionEditResource.d.ts +2 -2
  40. package/dist/src/models/CollectionEntry.d.ts +13 -10
  41. package/dist/src/models/CollectionEntryOptions.d.ts +20 -0
  42. package/dist/src/models/CollectionResource.d.ts +3 -3
  43. package/dist/src/models/CollectionResourceOptions.d.ts +38 -0
  44. package/dist/src/models/CollectionViewResource.d.ts +2 -2
  45. package/dist/src/models/EditResource.d.ts +2 -2
  46. package/dist/src/models/ItemEntry.d.ts +4 -4
  47. package/dist/src/models/ItemEntryOptions.d.ts +18 -0
  48. package/dist/src/models/ItemResource.d.ts +3 -3
  49. package/dist/src/models/ItemResourceOptions.d.ts +13 -0
  50. package/dist/src/models/ViewResource.d.ts +2 -2
  51. package/dist/src/models/index.d.ts +8 -4
  52. package/dist/src/types/ItemTypesCollection.d.ts +62 -4
  53. package/package.json +35 -35
  54. package/dist/src/classes/ItemResourceService.d.ts +0 -5
@@ -1,6 +1,6 @@
1
1
  import { ApiResponseProcessor, CollectionMatcher, ColumnSet, LocalCache, RequestColumnExpansion } from '../classes';
2
2
  import { ENTRY_STATUS } from '../constants';
3
- import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
3
+ import { CollectionEntry, CollectionEntryOptions, CollectionEntryOptionsInterface, CollectionResource, CollectionResourceOptions, CollectionResourceOptionsInterface, ItemEntry, ItemEntryOptionsInterface, ItemResource, ItemResourceOptionsInterface } from '../models';
4
4
  export declare type EntryParent = {
5
5
  itemType: string;
6
6
  itemId: number;
@@ -9,10 +9,32 @@ export declare type EntryParentNull = EntryParent | null;
9
9
  export declare type FieldMap = {
10
10
  [key: string]: any;
11
11
  };
12
- export declare type ItemOptions = any;
12
+ export declare type OptionsInterface = {
13
+ [key: string]: any;
14
+ };
15
+ export declare type ItemOptionsInterface = ItemEntryOptionsInterface & ItemResourceOptionsInterface;
16
+ export declare type CollectionOptionsInterface = CollectionEntryOptionsInterface & CollectionResourceOptionsInterface;
17
+ export declare type CollectionDefinition = {
18
+ itemType: ItemType;
19
+ options: {
20
+ entry: CollectionEntryOptions;
21
+ resource: CollectionResourceOptions;
22
+ };
23
+ };
24
+ export declare type LinkCollectionDefinition = {
25
+ itemType: ItemType;
26
+ linkType: ItemType;
27
+ linkIdArray: ItemId[] | (() => ItemId[]);
28
+ linkField: string;
29
+ options: {
30
+ entry: CollectionEntryOptions;
31
+ resource: CollectionResourceOptions;
32
+ };
33
+ };
34
+ export declare type OnChangeFunction = (itemResource: ItemResource, previous: FieldMap) => void;
13
35
  export declare const enum StateKeyType {
14
36
  New = "new",
15
- Duplicate = "duplicate",
37
+ Duplicate = "duplicate"
16
38
  }
17
39
  export declare type StateKey = {
18
40
  type: StateKeyType;
@@ -23,7 +45,7 @@ export declare type OnSaveCallback = (localCache: LocalCache, conversionMap: Ite
23
45
  export declare enum LocalCacheCallbackCondition {
24
46
  Always = "always",
25
47
  OnClose = "onClose",
26
- SkipOnClose = "skipOnClose",
48
+ SkipOnClose = "skipOnClose"
27
49
  }
28
50
  export declare type LocalCacheCallbacks<T> = {
29
51
  always: {
@@ -36,6 +58,36 @@ export declare type LocalCacheCallbacks<T> = {
36
58
  [key: string]: T;
37
59
  };
38
60
  };
61
+ export declare type SocketMessageType = 'event' | 'notification';
62
+ export interface SocketMessage {
63
+ header: {
64
+ domain: string;
65
+ account: string;
66
+ sender: {
67
+ displayname: string;
68
+ itemType: 'Medewerker';
69
+ itemId: ItemId;
70
+ authorized: boolean;
71
+ session: string;
72
+ };
73
+ messageId: {
74
+ Id: string;
75
+ sequence: number;
76
+ batch: number;
77
+ request: number;
78
+ };
79
+ sent: string;
80
+ forceEvaluate: boolean;
81
+ };
82
+ body: any;
83
+ messageType: SocketMessageType;
84
+ }
85
+ export interface FunctionChangesResolveSocketMessage extends SocketMessage {
86
+ body: {
87
+ itemType: 'FunctionChangesResolve';
88
+ [key: string]: any;
89
+ };
90
+ }
39
91
  export declare type ItemResourceItemIdMap = {
40
92
  [itemId: number]: ItemResource;
41
93
  };
@@ -70,6 +122,11 @@ export declare type CreateRequestParameterMap = {
70
122
  [itemId: number]: any;
71
123
  };
72
124
  };
125
+ export declare type ItemError = {
126
+ message: string;
127
+ };
128
+ export declare type QueryParams = any;
129
+ export declare type QueryCallback = (queryParams: QueryParams) => QueryParams;
73
130
  export declare type CollectionEntryParentIdMap = {
74
131
  [parentId: number]: CollectionEntry;
75
132
  };
@@ -128,6 +185,7 @@ export declare type EntryStatus<T> = {
128
185
  entry: T;
129
186
  status: ENTRY_STATUS;
130
187
  };
188
+ export declare type ApiQuery = any;
131
189
  export declare type ApiRequestItemValues = {
132
190
  values?: any;
133
191
  links?: {
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "@rentman/rm-core",
3
- "version": "1.4.0",
4
- "description": "Rentman core functionalities",
5
- "main": "./dist/rm-core.js",
6
- "types": "./dist/src/index.d.ts",
7
- "dependencies": {},
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/rentmanpublic/frontend-core"
11
- },
12
- "devDependencies": {
13
- "@types/moment": "^2.13.0",
14
- "@types/q": "^1.5.0",
15
- "clean-webpack-plugin": "^0.1.19",
16
- "ts-loader": "^4.4.1",
17
- "tslint": "^5.10.0",
18
- "typescript": "2.7.1",
19
- "uglifyjs-webpack-plugin": "^1.2.5",
20
- "webpack": "^4.16.3",
21
- "webpack-cli": "^3.0.6",
22
- "webpack-merge": "^4.1.3"
23
- },
24
- "files": [
25
- "dist"
26
- ],
27
- "scripts": {
28
- "prepublishOnly": "npm run bundle",
29
- "bundle-dev": "webpack --config webpack.dev.js",
30
- "bundle": "webpack --config webpack.prod.js",
31
- "type-check": "tsc --noEmit"
32
- },
33
- "author": "Martijn Welker <martijn@rentman.nl>",
34
- "license": "UNLICENSED"
35
- }
1
+ {
2
+ "name": "@rentman/rm-core",
3
+ "version": "1.5.1-1",
4
+ "description": "Rentman core functionalities",
5
+ "main": "./dist/rm-core.js",
6
+ "types": "./dist/src/index.d.ts",
7
+ "dependencies": {},
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/rentmanpublic/frontend-core"
11
+ },
12
+ "devDependencies": {
13
+ "@types/moment": "^2.13.0",
14
+ "@types/q": "^1.5.0",
15
+ "clean-webpack-plugin": "^0.1.19",
16
+ "ts-loader": "^4.4.1",
17
+ "tslint": "^5.12.1",
18
+ "typescript": "3.2.2",
19
+ "uglifyjs-webpack-plugin": "^1.2.5",
20
+ "webpack": "^4.16.3",
21
+ "webpack-cli": "^3.0.6",
22
+ "webpack-merge": "^4.1.3"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "scripts": {
28
+ "prepublishOnly": "npm run bundle",
29
+ "bundle-dev": "webpack --config webpack.dev.js",
30
+ "bundle": "webpack --config webpack.prod.js",
31
+ "type-check": "tsc --noEmit"
32
+ },
33
+ "author": "Martijn Welker <martijn@rentman.nl>",
34
+ "license": "UNLICENSED"
35
+ }
@@ -1,5 +0,0 @@
1
- export declare class ItemResourceService {
2
- constructor();
3
- processOptions(options: any): any;
4
- compareOptions(first: any, second: any): boolean;
5
- }