@singularsystems/neo-core 1.0.0-beta.9 → 1.0.0
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 +15 -0
- package/README.md +4 -0
- package/dist/AppServices/Config/ConfigService.js +2 -1
- package/dist/AppServices/NeoTypes.d.ts +6 -0
- package/dist/AppServices/NeoTypes.js +7 -1
- package/dist/AppServices/ServiceIdentifier.js +2 -1
- package/dist/AxiosUtils.js +8 -9
- package/dist/Components/ErrorHandler.d.ts +1 -5
- package/dist/Components/ErrorHandler.js +5 -6
- package/dist/Components/FileManager/FileManager.js +5 -4
- package/dist/Components/FileManager/FileUploadBatch.js +2 -1
- package/dist/Components/Notifications/Notification.js +2 -1
- package/dist/Components/Notifications/NotificationHelper.js +2 -1
- package/dist/Components/Notifications/NotificationStore.js +2 -1
- package/dist/Components/TaskRunner/ProgressState.js +2 -1
- package/dist/Components/TaskRunner/TaskRunner.js +2 -1
- package/dist/ConnectionManager.js +2 -1
- package/dist/Data/ApiDataSource.d.ts +25 -26
- package/dist/Data/ApiDataSource.js +87 -97
- package/dist/Data/AsyncDataSource.d.ts +6 -2
- package/dist/Data/AsyncDataSource.js +22 -2
- package/dist/Data/CacheService.d.ts +4 -7
- package/dist/Data/CacheService.js +7 -5
- package/dist/Data/DataCacheEntry.d.ts +0 -4
- package/dist/Data/DataCacheEntry.js +0 -6
- package/dist/Data/DataView.js +4 -2
- package/dist/Data/Paging/PageManager.js +9 -8
- package/dist/Data/Paging/PageRequest.js +2 -1
- package/dist/Data/Serialiser.js +1 -0
- package/dist/Data/StaticDataSource.d.ts +1 -2
- package/dist/Data/StaticDataSource.js +0 -3
- package/dist/Data/WindowedDataView.js +2 -1
- package/dist/Data/index.d.ts +1 -1
- package/dist/Data/index.js +1 -1
- package/dist/Dates/DateUtils.js +2 -1
- package/dist/Extensions.d.ts +0 -4
- package/dist/Extensions.js +1 -1
- package/dist/IndexDb/IDbSet.d.ts +2 -0
- package/dist/JsonSchema/JsonSchemaTypes.d.ts +1 -0
- package/dist/Model/BaseModels/AuditValues.js +4 -2
- package/dist/Model/BaseModels/CriteriaBase.js +2 -1
- package/dist/Model/BaseModels/ReasonedUserEvent.js +2 -1
- package/dist/Model/BaseModels/UserEvent.js +4 -2
- package/dist/Model/BindableBase.js +2 -1
- package/dist/Model/IModelBase.d.ts +3 -3
- package/dist/Model/ModelCreatorBase.js +2 -1
- package/dist/Model/ModelFieldInfo.js +2 -1
- package/dist/Model/ObservableValue.js +2 -1
- package/dist/NumberUtils.d.ts +3 -1
- package/dist/NumberUtils.js +2 -2
- package/dist/Routing/MenuItemProvider.js +2 -1
- package/dist/Routing/RouteSecurityService.js +2 -1
- package/dist/Security/LoginErrorHandler.js +2 -1
- package/dist/Security/SecurityService.js +2 -1
- package/dist/SignalR/IServerMessageSubscriber.d.ts +4 -0
- package/dist/SignalR/index.d.ts +1 -0
- package/dist/Validation/DisplayHelper.d.ts +3 -1
- package/dist/Validation/RuleContext.d.ts +4 -0
- package/dist/Validation/RuleContext.js +4 -0
- package/package.json +9 -7
- package/dist/Decimal/DecimalService.d.ts +0 -23
- package/dist/Decimal/DecimalService.js +0 -38
- package/dist/Decimal/IDecimal.d.ts +0 -25
- package/dist/Numeric/IDecimal.d.ts +0 -25
- package/dist/Numeric/IDecimal.js +0 -1
- /package/dist/{Decimal/IDecimal.js → SignalR/IServerMessageSubscriber.js} +0 -0
|
@@ -17,7 +17,6 @@ export interface IAsyncDataSource<T> {
|
|
|
17
17
|
readonly fetchError: string | null;
|
|
18
18
|
/** Current promise created as a result of fetchData being called. */
|
|
19
19
|
readonly promise: Promise<T> | null;
|
|
20
|
-
copy(): IAsyncDataSource<T>;
|
|
21
20
|
}
|
|
22
21
|
export declare abstract class AsyncDataSource<T> implements IAsyncDataSource<T> {
|
|
23
22
|
isLoading: boolean;
|
|
@@ -31,5 +30,10 @@ export declare abstract class AsyncDataSource<T> implements IAsyncDataSource<T>
|
|
|
31
30
|
private executeFetchAsync;
|
|
32
31
|
fetchDataAsync(clearPreviousError?: boolean): Promise<T>;
|
|
33
32
|
fetchInitial(): Promise<T>;
|
|
34
|
-
|
|
33
|
+
}
|
|
34
|
+
export declare class CallbackDataSource<T> extends AsyncDataSource<T> {
|
|
35
|
+
private callBack;
|
|
36
|
+
private defaultData;
|
|
37
|
+
constructor(callBack: () => Promise<any>, defaultData: T);
|
|
38
|
+
protected getDataAsync(): Promise<any>;
|
|
35
39
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __generator, __metadata } from "tslib";
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator, __metadata } from "tslib";
|
|
2
2
|
import { Utils } from '../Utils';
|
|
3
3
|
import { Observable } from '../Model/Decorators';
|
|
4
|
-
|
|
4
|
+
import NeoModel from "../Model/NeoModel";
|
|
5
|
+
var AsyncDataSource = /** @class */ (function () {
|
|
5
6
|
function AsyncDataSource(defaultData) {
|
|
6
7
|
this.isLoading = false;
|
|
7
8
|
this.fetchError = null;
|
|
@@ -77,3 +78,22 @@ export var AsyncDataSource = /** @class */ (function () {
|
|
|
77
78
|
], AsyncDataSource.prototype, "fetchError", void 0);
|
|
78
79
|
return AsyncDataSource;
|
|
79
80
|
}());
|
|
81
|
+
export { AsyncDataSource };
|
|
82
|
+
var CallbackDataSource = /** @class */ (function (_super) {
|
|
83
|
+
__extends(CallbackDataSource, _super);
|
|
84
|
+
function CallbackDataSource(callBack, defaultData) {
|
|
85
|
+
var _this = _super.call(this, defaultData) || this;
|
|
86
|
+
_this.callBack = callBack;
|
|
87
|
+
_this.defaultData = defaultData;
|
|
88
|
+
return _this;
|
|
89
|
+
}
|
|
90
|
+
CallbackDataSource.prototype.getDataAsync = function () {
|
|
91
|
+
return this.callBack();
|
|
92
|
+
};
|
|
93
|
+
CallbackDataSource = __decorate([
|
|
94
|
+
NeoModel,
|
|
95
|
+
__metadata("design:paramtypes", [Function, Object])
|
|
96
|
+
], CallbackDataSource);
|
|
97
|
+
return CallbackDataSource;
|
|
98
|
+
}(AsyncDataSource));
|
|
99
|
+
export { CallbackDataSource };
|
|
@@ -2,6 +2,8 @@ import { IAsyncDataSource } from './AsyncDataSource';
|
|
|
2
2
|
import { AxiosPromise } from 'axios';
|
|
3
3
|
import { DataCacheEntry } from './DataCacheEntry';
|
|
4
4
|
import { PlainObject } from '../Model/IModelBase';
|
|
5
|
+
import { BindableBase } from "../Model/BindableBase";
|
|
6
|
+
import { IDbSet } from "../IndexDb/IDbSet";
|
|
5
7
|
export interface ICachedDataService {
|
|
6
8
|
expireAll(expireDescendants?: boolean): void;
|
|
7
9
|
}
|
|
@@ -10,12 +12,6 @@ export declare class CachedDataService implements ICachedDataService {
|
|
|
10
12
|
private dataSources;
|
|
11
13
|
private children;
|
|
12
14
|
constructor(base?: CachedDataService);
|
|
13
|
-
/**
|
|
14
|
-
* Registers an api datasource.
|
|
15
|
-
* @param apiEndpoint Api endpoint from which to get data.
|
|
16
|
-
* @param lifeTimeMinutes No of minutes from the data retrieval time that the cache is valid for.
|
|
17
|
-
*/
|
|
18
|
-
protected register<T>(apiEndpoint: string, lifeTimeMinutes: number, defaultData?: T): DataCacheEntry<T>;
|
|
19
15
|
/**
|
|
20
16
|
* Registers an api datasource.
|
|
21
17
|
* @param apiEndpoint ClientApi method from which to get data.
|
|
@@ -33,8 +29,9 @@ export declare class CachedDataService implements ICachedDataService {
|
|
|
33
29
|
* @param childType Child type to create when deserialising data.
|
|
34
30
|
* @param apiMethod Api client method from which to get data.
|
|
35
31
|
* @param lifeTimeMinutes No of minutes from the data retrieval time that the cache is valid for.
|
|
32
|
+
* @param dbSet DbSet for offline storage.
|
|
36
33
|
*/
|
|
37
|
-
protected registerList<T>(childType: (new () => T), apiMethod: () => AxiosPromise<PlainObject<T>[]>, lifeTimeMinutes: number): DataCacheEntry<T[]>;
|
|
34
|
+
protected registerList<T extends BindableBase>(childType: (new () => T), apiMethod: () => AxiosPromise<PlainObject<T>[]>, lifeTimeMinutes: number, dbSet?: IDbSet<PlainObject<T>>): DataCacheEntry<T[]>;
|
|
38
35
|
/** Expires all data */
|
|
39
36
|
expireAll(expireDescendants?: boolean): void;
|
|
40
37
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiClientDataSource, ApiClientLookupDataSource } from './ApiDataSource';
|
|
3
3
|
import { injectable } from 'inversify';
|
|
4
4
|
import { DataCacheEntry } from './DataCacheEntry';
|
|
5
5
|
/** Service for managing cached data. */
|
|
6
|
-
|
|
6
|
+
var CachedDataService = /** @class */ (function () {
|
|
7
7
|
function CachedDataService(base) {
|
|
8
8
|
this.dataSources = [];
|
|
9
9
|
this.children = [];
|
|
@@ -21,7 +21,7 @@ export var CachedDataService = /** @class */ (function () {
|
|
|
21
21
|
apiSource = new ApiClientDataSource(apiEndpointOrDataSource, defaultData);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
|
|
24
|
+
throw Error("Unknown data source");
|
|
25
25
|
}
|
|
26
26
|
var cacheEntry = new DataCacheEntry(apiSource, lifeTimeMinutes);
|
|
27
27
|
;
|
|
@@ -33,9 +33,10 @@ export var CachedDataService = /** @class */ (function () {
|
|
|
33
33
|
* @param childType Child type to create when deserialising data.
|
|
34
34
|
* @param apiMethod Api client method from which to get data.
|
|
35
35
|
* @param lifeTimeMinutes No of minutes from the data retrieval time that the cache is valid for.
|
|
36
|
+
* @param dbSet DbSet for offline storage.
|
|
36
37
|
*/
|
|
37
|
-
CachedDataService.prototype.registerList = function (childType, apiMethod, lifeTimeMinutes) {
|
|
38
|
-
var dataSource = new ApiClientLookupDataSource(apiMethod, childType);
|
|
38
|
+
CachedDataService.prototype.registerList = function (childType, apiMethod, lifeTimeMinutes, dbSet) {
|
|
39
|
+
var dataSource = new ApiClientLookupDataSource(apiMethod, childType, undefined, dbSet);
|
|
39
40
|
var cacheEntry = new DataCacheEntry(dataSource, lifeTimeMinutes);
|
|
40
41
|
;
|
|
41
42
|
this.dataSources.push(cacheEntry);
|
|
@@ -61,3 +62,4 @@ export var CachedDataService = /** @class */ (function () {
|
|
|
61
62
|
], CachedDataService);
|
|
62
63
|
return CachedDataService;
|
|
63
64
|
}());
|
|
65
|
+
export { CachedDataService };
|
|
@@ -28,10 +28,6 @@ export declare class DataCacheEntry<T> implements IDataCacheEntry {
|
|
|
28
28
|
* Returns a promise from which data can be obtained. Data will be re-fetched if the lifetime has been exceeded.
|
|
29
29
|
*/
|
|
30
30
|
getDataAsync(): Promise<T>;
|
|
31
|
-
/**
|
|
32
|
-
* Returns a new instance of the api datasource which is not cached. Fetch will not be initiated.
|
|
33
|
-
*/
|
|
34
|
-
getNew(): IAsyncDataSource<T>;
|
|
35
31
|
/**
|
|
36
32
|
* Expires the datasource.
|
|
37
33
|
* @param refetch True if the datasource must be refetched. This will cause any consumers of this datasource to rebind to the updated data.
|
|
@@ -43,12 +43,6 @@ var DataCacheEntry = /** @class */ (function () {
|
|
|
43
43
|
DataCacheEntry.prototype.getDataAsync = function () {
|
|
44
44
|
return this.get(true).promise;
|
|
45
45
|
};
|
|
46
|
-
/**
|
|
47
|
-
* Returns a new instance of the api datasource which is not cached. Fetch will not be initiated.
|
|
48
|
-
*/
|
|
49
|
-
DataCacheEntry.prototype.getNew = function () {
|
|
50
|
-
return this.dataSource.copy();
|
|
51
|
-
};
|
|
52
46
|
/**
|
|
53
47
|
* Expires the datasource.
|
|
54
48
|
* @param refetch True if the datasource must be refetched. This will cause any consumers of this datasource to rebind to the updated data.
|
package/dist/Data/DataView.js
CHANGED
|
@@ -3,7 +3,7 @@ import NeoModel from '../Model/NeoModel';
|
|
|
3
3
|
import { Observable, Computed } from '../Model/Decorators';
|
|
4
4
|
import { SortOperation } from './SortOperation';
|
|
5
5
|
/** A DataView is a container of data with sorting and filtering capability. */
|
|
6
|
-
|
|
6
|
+
var DataViewBase = /** @class */ (function () {
|
|
7
7
|
function DataViewBase(originalSource) {
|
|
8
8
|
this.originalSource = originalSource;
|
|
9
9
|
this.sortInfo = [];
|
|
@@ -161,7 +161,8 @@ export var DataViewBase = /** @class */ (function () {
|
|
|
161
161
|
], DataViewBase.prototype, "sortedItems", null);
|
|
162
162
|
return DataViewBase;
|
|
163
163
|
}());
|
|
164
|
-
export
|
|
164
|
+
export { DataViewBase };
|
|
165
|
+
var DataView = /** @class */ (function (_super) {
|
|
165
166
|
__extends(DataView, _super);
|
|
166
167
|
function DataView() {
|
|
167
168
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -171,3 +172,4 @@ export var DataView = /** @class */ (function (_super) {
|
|
|
171
172
|
], DataView);
|
|
172
173
|
return DataView;
|
|
173
174
|
}(DataViewBase));
|
|
175
|
+
export { DataView };
|
|
@@ -6,7 +6,7 @@ import { Misc, AppServices } from '../../';
|
|
|
6
6
|
import { Observable } from '../../Model/Decorators';
|
|
7
7
|
import { SortOperation } from '../SortOperation';
|
|
8
8
|
import List from '../../Model/List';
|
|
9
|
-
|
|
9
|
+
var PageManager = /** @class */ (function (_super) {
|
|
10
10
|
__extends(PageManager, _super);
|
|
11
11
|
function PageManager(criteria, modelType, dataSource, options) {
|
|
12
12
|
var _this = _super.call(this, []) || this;
|
|
@@ -150,10 +150,10 @@ export var PageManager = /** @class */ (function (_super) {
|
|
|
150
150
|
* @param getCount True if criteria has changed, and the total number of records needs to be refetched.
|
|
151
151
|
* @param taskRunner Optional alternate task runner to use.
|
|
152
152
|
*/
|
|
153
|
-
PageManager.prototype.refreshData = function (
|
|
154
|
-
|
|
155
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
153
|
+
PageManager.prototype.refreshData = function () {
|
|
154
|
+
return __awaiter(this, arguments, void 0, function (getCount, taskRunner) {
|
|
156
155
|
var request;
|
|
156
|
+
if (getCount === void 0) { getCount = true; }
|
|
157
157
|
return __generator(this, function (_a) {
|
|
158
158
|
switch (_a.label) {
|
|
159
159
|
case 0:
|
|
@@ -208,9 +208,9 @@ export var PageManager = /** @class */ (function (_super) {
|
|
|
208
208
|
});
|
|
209
209
|
};
|
|
210
210
|
PageManager.prototype.fetchAndSetData = function (request) {
|
|
211
|
-
var _a;
|
|
212
211
|
return __awaiter(this, void 0, void 0, function () {
|
|
213
212
|
var response, data;
|
|
213
|
+
var _a;
|
|
214
214
|
return __generator(this, function (_b) {
|
|
215
215
|
switch (_b.label) {
|
|
216
216
|
case 0: return [4 /*yield*/, this.dataSource(request)];
|
|
@@ -231,10 +231,10 @@ export var PageManager = /** @class */ (function (_super) {
|
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
233
|
/* Will set the data to the provided list. This will still invoke the `afterFetch` */
|
|
234
|
-
PageManager.prototype.setData = function (
|
|
235
|
-
|
|
236
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
234
|
+
PageManager.prototype.setData = function (pageRecords_1) {
|
|
235
|
+
return __awaiter(this, arguments, void 0, function (pageRecords, totalRecords) {
|
|
237
236
|
var newData, task;
|
|
237
|
+
if (totalRecords === void 0) { totalRecords = 0; }
|
|
238
238
|
return __generator(this, function (_a) {
|
|
239
239
|
switch (_a.label) {
|
|
240
240
|
case 0:
|
|
@@ -370,3 +370,4 @@ export var PageManager = /** @class */ (function (_super) {
|
|
|
370
370
|
], PageManager);
|
|
371
371
|
return PageManager;
|
|
372
372
|
}(DataViewBase));
|
|
373
|
+
export { PageManager };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
2
|
import NeoModel from '../../Model/NeoModel';
|
|
3
3
|
import ValueObject from '../../Model/ValueObject';
|
|
4
|
-
|
|
4
|
+
var PageRequest = /** @class */ (function (_super) {
|
|
5
5
|
__extends(PageRequest, _super);
|
|
6
6
|
function PageRequest(criteria) {
|
|
7
7
|
var _this = _super.call(this) || this;
|
|
@@ -36,3 +36,4 @@ export var PageRequest = /** @class */ (function (_super) {
|
|
|
36
36
|
], PageRequest);
|
|
37
37
|
return PageRequest;
|
|
38
38
|
}(ValueObject));
|
|
39
|
+
export { PageRequest };
|
package/dist/Data/Serialiser.js
CHANGED
|
@@ -115,6 +115,7 @@ var Serialiser = /** @class */ (function () {
|
|
|
115
115
|
propertyInfo.serialise !== SerialiseType.Never &&
|
|
116
116
|
propertyInfo.serialise !== SerialiseType.MappingOnly &&
|
|
117
117
|
(propertyInfo.serialise !== SerialiseType.FullOnly || this.options.includeClean)) {
|
|
118
|
+
//@ts-ignore
|
|
118
119
|
var fromValue = from[key];
|
|
119
120
|
var isChildObject = (fromValue && fromValue instanceof Object && !(fromValue instanceof Date) && !(NumberUtils.decimalService.isDecimal(fromValue))) || propertyInfo.relationType === RelationType.ChildObject;
|
|
120
121
|
if (fromValue instanceof Array) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AsyncDataSource
|
|
1
|
+
import { AsyncDataSource } from './AsyncDataSource';
|
|
2
2
|
import { IEnumItem } from '../Model/EnumHelper';
|
|
3
3
|
export declare class StaticDataSource<T> extends AsyncDataSource<T> {
|
|
4
4
|
constructor(staticData: T);
|
|
5
5
|
static fromEnum(enumObject: any): StaticDataSource<IEnumItem[]>;
|
|
6
6
|
getDataAsync(): Promise<Awaited<T>>;
|
|
7
7
|
get willLoad(): boolean;
|
|
8
|
-
copy(): IAsyncDataSource<T>;
|
|
9
8
|
}
|
|
@@ -19,9 +19,6 @@ var StaticDataSource = /** @class */ (function (_super) {
|
|
|
19
19
|
enumerable: false,
|
|
20
20
|
configurable: true
|
|
21
21
|
});
|
|
22
|
-
StaticDataSource.prototype.copy = function () {
|
|
23
|
-
return new StaticDataSource(this.data);
|
|
24
|
-
};
|
|
25
22
|
return StaticDataSource;
|
|
26
23
|
}(AsyncDataSource));
|
|
27
24
|
export { StaticDataSource };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __extends, __metadata } from "tslib";
|
|
|
2
2
|
import { DataViewBase } from './DataView';
|
|
3
3
|
import { Observable } from '../Model/Decorators';
|
|
4
4
|
import NeoModel from '../Model/NeoModel';
|
|
5
|
-
|
|
5
|
+
var WindowedDataView = /** @class */ (function (_super) {
|
|
6
6
|
__extends(WindowedDataView, _super);
|
|
7
7
|
function WindowedDataView() {
|
|
8
8
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -47,3 +47,4 @@ export var WindowedDataView = /** @class */ (function (_super) {
|
|
|
47
47
|
], WindowedDataView);
|
|
48
48
|
return WindowedDataView;
|
|
49
49
|
}(DataViewBase));
|
|
50
|
+
export { WindowedDataView };
|
package/dist/Data/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './AsyncDataSource';
|
|
2
|
-
export { ApiClientDataSource, ApiClientLookupDataSource,
|
|
2
|
+
export { ApiClientDataSource, ApiClientLookupDataSource, ApiClientSingleLookupDataSource } from './ApiDataSource';
|
|
3
3
|
export { IDataCacheEntry, DataCacheEntry, IArrayCacheEntry } from './DataCacheEntry';
|
|
4
4
|
export * from './CacheService';
|
|
5
5
|
export * from './DataView';
|
package/dist/Data/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './AsyncDataSource';
|
|
2
|
-
export { ApiClientDataSource, ApiClientLookupDataSource,
|
|
2
|
+
export { ApiClientDataSource, ApiClientLookupDataSource, ApiClientSingleLookupDataSource } from './ApiDataSource';
|
|
3
3
|
export { DataCacheEntry } from './DataCacheEntry';
|
|
4
4
|
export * from './CacheService';
|
|
5
5
|
export * from './DataView';
|
package/dist/Dates/DateUtils.js
CHANGED
|
@@ -191,7 +191,8 @@ var DateUtils = /** @class */ (function () {
|
|
|
191
191
|
// 31 May - 1 month == 31 April == 1 May, this will fix that:
|
|
192
192
|
var newMonth = newDate.getMonth();
|
|
193
193
|
var oldMonth = date.getMonth();
|
|
194
|
-
|
|
194
|
+
// JS % operator gives remainder, not mod
|
|
195
|
+
if (newMonth !== ((oldMonth + (timeSpan.months % 12) + 12) % 12)) {
|
|
195
196
|
newDate.setDate(0);
|
|
196
197
|
}
|
|
197
198
|
}
|
package/dist/Extensions.d.ts
CHANGED
|
@@ -35,10 +35,6 @@ declare global {
|
|
|
35
35
|
* Returns the sum for a given property.
|
|
36
36
|
*/
|
|
37
37
|
sum<V extends number | IDecimal = number>(propertyName: keyof T | IPropertyInstance<V> | PropertyInfo | ((item: T) => V)): V;
|
|
38
|
-
/**
|
|
39
|
-
* Returns the sum for a given property.
|
|
40
|
-
*/
|
|
41
|
-
sumDecimal(propertyName: keyof T | IPropertyInstance<IDecimal> | PropertyInfo | ((item: T) => IDecimal)): IDecimal;
|
|
42
38
|
/**
|
|
43
39
|
* Returns the average for a given property.
|
|
44
40
|
*/
|
package/dist/Extensions.js
CHANGED
|
@@ -84,7 +84,7 @@ Array.prototype.sortBy = function (valueFnOrKey, direction, dataType) {
|
|
|
84
84
|
return delta;
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
return NumberUtils.decimalService.compare(aValue, bValue) * delta;
|
|
87
|
+
return NumberUtils.decimalService.compare(aValue, bValue) * -delta;
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
}
|
package/dist/IndexDb/IDbSet.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export interface IDbSet<T> {
|
|
3
3
|
/** Gets the first item matching the key, or key range. */
|
|
4
4
|
getAsync(key: IDBValidKey | IDBKeyRange): Promise<T | undefined>;
|
|
5
|
+
/** Gets all items matching the key or key range. */
|
|
6
|
+
getAllAsync(key?: IDBKeyRange, maxCount?: number): Promise<T[]>;
|
|
5
7
|
/** Adds or updates an item. */
|
|
6
8
|
putAsync(value: T, keyValue?: IDBValidKey): Promise<void>;
|
|
7
9
|
/** Adds or updates multiple items in a transaction. */
|
|
@@ -2,7 +2,7 @@ import { __decorate, __extends, __metadata } from "tslib";
|
|
|
2
2
|
import ValueObject from '../ValueObject';
|
|
3
3
|
import { Date as DateAttribute } from '../Decorators';
|
|
4
4
|
import NeoModel from '../NeoModel';
|
|
5
|
-
|
|
5
|
+
var AuditValuesBase = /** @class */ (function (_super) {
|
|
6
6
|
__extends(AuditValuesBase, _super);
|
|
7
7
|
function AuditValuesBase() {
|
|
8
8
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -34,7 +34,8 @@ export var AuditValuesBase = /** @class */ (function (_super) {
|
|
|
34
34
|
], AuditValuesBase.prototype, "modifiedOn", void 0);
|
|
35
35
|
return AuditValuesBase;
|
|
36
36
|
}(ValueObject));
|
|
37
|
-
export
|
|
37
|
+
export { AuditValuesBase };
|
|
38
|
+
var AuditValues = /** @class */ (function (_super) {
|
|
38
39
|
__extends(AuditValues, _super);
|
|
39
40
|
function AuditValues() {
|
|
40
41
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -44,3 +45,4 @@ export var AuditValues = /** @class */ (function (_super) {
|
|
|
44
45
|
], AuditValues);
|
|
45
46
|
return AuditValues;
|
|
46
47
|
}(AuditValuesBase));
|
|
48
|
+
export { AuditValues };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __extends, __metadata } from "tslib";
|
|
|
2
2
|
import { Dictionary } from "../Decorators";
|
|
3
3
|
import { ModelFieldInfo } from "../ModelFieldInfo";
|
|
4
4
|
import ValueObject from "../ValueObject";
|
|
5
|
-
|
|
5
|
+
var CriteriaBase = /** @class */ (function (_super) {
|
|
6
6
|
__extends(CriteriaBase, _super);
|
|
7
7
|
function CriteriaBase() {
|
|
8
8
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -43,3 +43,4 @@ export var CriteriaBase = /** @class */ (function (_super) {
|
|
|
43
43
|
], CriteriaBase.prototype, "fieldInfo", void 0);
|
|
44
44
|
return CriteriaBase;
|
|
45
45
|
}(ValueObject));
|
|
46
|
+
export { CriteriaBase };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __extends, __metadata } from "tslib";
|
|
|
2
2
|
import { UserEventBase } from './UserEvent';
|
|
3
3
|
import NeoModel from '../NeoModel';
|
|
4
4
|
import { StringLength } from '../../Validation/Decorators';
|
|
5
|
-
|
|
5
|
+
var ReasonedUserEvent = /** @class */ (function (_super) {
|
|
6
6
|
__extends(ReasonedUserEvent, _super);
|
|
7
7
|
function ReasonedUserEvent() {
|
|
8
8
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -21,3 +21,4 @@ export var ReasonedUserEvent = /** @class */ (function (_super) {
|
|
|
21
21
|
], ReasonedUserEvent);
|
|
22
22
|
return ReasonedUserEvent;
|
|
23
23
|
}(UserEventBase));
|
|
24
|
+
export { ReasonedUserEvent };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __extends, __metadata } from "tslib";
|
|
|
2
2
|
import ValueObject from '../ValueObject';
|
|
3
3
|
import { Date as DateAttribute } from '../Decorators';
|
|
4
4
|
import NeoModel from '../NeoModel';
|
|
5
|
-
|
|
5
|
+
var UserEventBase = /** @class */ (function (_super) {
|
|
6
6
|
__extends(UserEventBase, _super);
|
|
7
7
|
function UserEventBase() {
|
|
8
8
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23,7 +23,8 @@ export var UserEventBase = /** @class */ (function (_super) {
|
|
|
23
23
|
], UserEventBase.prototype, "on", void 0);
|
|
24
24
|
return UserEventBase;
|
|
25
25
|
}(ValueObject));
|
|
26
|
-
export
|
|
26
|
+
export { UserEventBase };
|
|
27
|
+
var UserEvent = /** @class */ (function (_super) {
|
|
27
28
|
__extends(UserEvent, _super);
|
|
28
29
|
function UserEvent() {
|
|
29
30
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -38,3 +39,4 @@ export var UserEvent = /** @class */ (function (_super) {
|
|
|
38
39
|
], UserEvent);
|
|
39
40
|
return UserEvent;
|
|
40
41
|
}(UserEventBase));
|
|
42
|
+
export { UserEvent };
|
|
@@ -4,7 +4,7 @@ import { JSFormatter } from '../Data/Serialiser';
|
|
|
4
4
|
import { NeoTypeInfo } from './NeoTypeInfo';
|
|
5
5
|
import { Utils } from '../Utils';
|
|
6
6
|
import { SerialiseType } from './Misc';
|
|
7
|
-
|
|
7
|
+
var BindableBase = /** @class */ (function () {
|
|
8
8
|
function BindableBase() {
|
|
9
9
|
this.entityIdentifier = Utils.uuidv4();
|
|
10
10
|
}
|
|
@@ -80,3 +80,4 @@ export var BindableBase = /** @class */ (function () {
|
|
|
80
80
|
], BindableBase.prototype, "entityIdentifier", void 0);
|
|
81
81
|
return BindableBase;
|
|
82
82
|
}());
|
|
83
|
+
export { BindableBase };
|
|
@@ -55,11 +55,11 @@ export interface IMakeBindableOptions {
|
|
|
55
55
|
*/
|
|
56
56
|
makeObservable?: boolean;
|
|
57
57
|
/**
|
|
58
|
-
* Specifies whether methods should be converted to mobx actions.
|
|
58
|
+
* Specifies whether methods should be converted to mobx actions.
|
|
59
59
|
* Use `Attributes.Action()` to override this per method. */
|
|
60
60
|
autoActions?: boolean;
|
|
61
61
|
/**
|
|
62
|
-
* If `true`, this instance will not be converted. In
|
|
62
|
+
* If `true`, this instance will not be converted. In inheritance hierarchies, use this to ensure only the last derived type converts the instance.
|
|
63
63
|
*/
|
|
64
64
|
skipConversion?: boolean;
|
|
65
65
|
}
|
|
@@ -68,7 +68,7 @@ export interface IDebounceOptions {
|
|
|
68
68
|
}
|
|
69
69
|
export interface IBindableBase {
|
|
70
70
|
meta: {
|
|
71
|
-
[
|
|
71
|
+
[key: string]: IPropertyInstance;
|
|
72
72
|
};
|
|
73
73
|
set(jsObject: any): void;
|
|
74
74
|
}
|
|
@@ -6,7 +6,7 @@ import { ChildList, ChildObject } from './Decorators';
|
|
|
6
6
|
import ValueObject from './ValueObject';
|
|
7
7
|
import { BindableBase } from './BindableBase';
|
|
8
8
|
var nonActionMethods = ["addBusinessRules", "toString"];
|
|
9
|
-
|
|
9
|
+
var ModelCreatorBase = /** @class */ (function () {
|
|
10
10
|
function ModelCreatorBase() {
|
|
11
11
|
this.alwaysInitialiseMembers = false;
|
|
12
12
|
}
|
|
@@ -89,3 +89,4 @@ export var ModelCreatorBase = /** @class */ (function () {
|
|
|
89
89
|
], ModelCreatorBase);
|
|
90
90
|
return ModelCreatorBase;
|
|
91
91
|
}());
|
|
92
|
+
export { ModelCreatorBase };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
2
|
import ValueObject from "./ValueObject";
|
|
3
3
|
import NeoModel from './NeoModel';
|
|
4
|
-
|
|
4
|
+
var ModelFieldInfo = /** @class */ (function (_super) {
|
|
5
5
|
__extends(ModelFieldInfo, _super);
|
|
6
6
|
function ModelFieldInfo(displayName, valueString) {
|
|
7
7
|
var _this = _super.call(this) || this;
|
|
@@ -33,3 +33,4 @@ export var ModelFieldInfo = /** @class */ (function (_super) {
|
|
|
33
33
|
], ModelFieldInfo);
|
|
34
34
|
return ModelFieldInfo;
|
|
35
35
|
}(ValueObject));
|
|
36
|
+
export { ModelFieldInfo };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import NeoModel from './NeoModel';
|
|
3
3
|
import { Observable } from './Decorators';
|
|
4
4
|
import { Utils } from '../Utils';
|
|
5
|
-
|
|
5
|
+
var ObservableValue = /** @class */ (function () {
|
|
6
6
|
function ObservableValue(initialValue) {
|
|
7
7
|
this.value = initialValue;
|
|
8
8
|
}
|
|
@@ -23,3 +23,4 @@ export var ObservableValue = /** @class */ (function () {
|
|
|
23
23
|
], ObservableValue);
|
|
24
24
|
return ObservableValue;
|
|
25
25
|
}());
|
|
26
|
+
export { ObservableValue };
|
package/dist/NumberUtils.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ export default class NumberUtils {
|
|
|
18
18
|
/** Set this to `","` if you want to allow a comma as a decimal separator when parsing string input. */
|
|
19
19
|
static allowAsDecimalSeparator?: string;
|
|
20
20
|
static defaultCurrencySymbol: string;
|
|
21
|
-
static numberFormats: {
|
|
21
|
+
static numberFormats: {
|
|
22
|
+
[key: number]: string;
|
|
23
|
+
};
|
|
22
24
|
/** If values typed into numeric editors should be divided by 100 when stored. */
|
|
23
25
|
static transformPercent: boolean;
|
|
24
26
|
static initialise(): void;
|
package/dist/NumberUtils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Globals from "./Globals";
|
|
2
2
|
import { NeoTypes } from "./AppServices";
|
|
3
3
|
import { DataType } from "./Model/Misc";
|
|
4
4
|
export var NumberFormat;
|
|
@@ -19,7 +19,7 @@ var NumberUtils = /** @class */ (function () {
|
|
|
19
19
|
/** Decimal service used internally by neo. Project code should use the chosen decimal package directly. */
|
|
20
20
|
get: function () {
|
|
21
21
|
if (!this._decimalService) {
|
|
22
|
-
this._decimalService =
|
|
22
|
+
this._decimalService = Globals.appService.get(NeoTypes.Core.DecimalService);
|
|
23
23
|
}
|
|
24
24
|
return this._decimalService;
|
|
25
25
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { injectable, inject } from 'inversify';
|
|
3
3
|
import NeoTypes from '../AppServices/NeoTypes';
|
|
4
|
-
|
|
4
|
+
var MenuItemProvider = /** @class */ (function () {
|
|
5
5
|
function MenuItemProvider(routeSecurityService) {
|
|
6
6
|
this.routeSecurityService = routeSecurityService;
|
|
7
7
|
}
|
|
@@ -51,3 +51,4 @@ export var MenuItemProvider = /** @class */ (function () {
|
|
|
51
51
|
], MenuItemProvider);
|
|
52
52
|
return MenuItemProvider;
|
|
53
53
|
}());
|
|
54
|
+
export { MenuItemProvider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { inject, injectable } from "inversify";
|
|
3
3
|
import NeoTypes from '../AppServices/NeoTypes';
|
|
4
|
-
|
|
4
|
+
var RouteSecurityService = /** @class */ (function () {
|
|
5
5
|
function RouteSecurityService(authorisationService) {
|
|
6
6
|
this.authorisationService = authorisationService;
|
|
7
7
|
}
|
|
@@ -33,3 +33,4 @@ export var RouteSecurityService = /** @class */ (function () {
|
|
|
33
33
|
], RouteSecurityService);
|
|
34
34
|
return RouteSecurityService;
|
|
35
35
|
}());
|
|
36
|
+
export { RouteSecurityService };
|
|
@@ -3,7 +3,7 @@ import { Utils } from "../Utils";
|
|
|
3
3
|
import { ModalUtils } from "../Components/Modal/ModalUtils";
|
|
4
4
|
import { inject, injectable } from "inversify";
|
|
5
5
|
import NeoTypes from "../AppServices/NeoTypes";
|
|
6
|
-
|
|
6
|
+
var NeoLoginErrorHandler = /** @class */ (function () {
|
|
7
7
|
function NeoLoginErrorHandler(authenticationService, navigationHelper) {
|
|
8
8
|
this.authenticationService = authenticationService;
|
|
9
9
|
this.navigationHelper = navigationHelper;
|
|
@@ -95,3 +95,4 @@ export var NeoLoginErrorHandler = /** @class */ (function () {
|
|
|
95
95
|
], NeoLoginErrorHandler);
|
|
96
96
|
return NeoLoginErrorHandler;
|
|
97
97
|
}());
|
|
98
|
+
export { NeoLoginErrorHandler };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { injectable, inject } from 'inversify';
|
|
3
3
|
import NeoTypes from '../AppServices/NeoTypes';
|
|
4
|
-
|
|
4
|
+
var SecurityService = /** @class */ (function () {
|
|
5
5
|
function SecurityService(authentication, authorisation) {
|
|
6
6
|
this.authentication = authentication;
|
|
7
7
|
this.authorisation = authorisation;
|
|
@@ -31,3 +31,4 @@ export var SecurityService = /** @class */ (function () {
|
|
|
31
31
|
], SecurityService);
|
|
32
32
|
return SecurityService;
|
|
33
33
|
}());
|
|
34
|
+
export { SecurityService };
|
package/dist/SignalR/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export declare class ValidationDisplayInfo {
|
|
|
12
12
|
variant: variant;
|
|
13
13
|
get displayText(): string;
|
|
14
14
|
get editorClassName(): string;
|
|
15
|
-
applyToDom(elementProps: React.HTMLProps<HTMLElement
|
|
15
|
+
applyToDom(elementProps: React.HTMLProps<HTMLElement> & {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}, addTooltip: boolean): void;
|
|
16
18
|
}
|
|
17
19
|
export default class ValidationDisplayHelper {
|
|
18
20
|
static getDisplayInfo(ruleState: ValidationState, canDisplayAll: boolean): ValidationDisplayInfo;
|