@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
|
@@ -81,6 +81,10 @@ export declare class RuleContext extends RuleContextBase implements IRuleContext
|
|
|
81
81
|
export declare class AsyncRuleContext extends RuleContextBase implements IAsyncRuleContext {
|
|
82
82
|
private initiator;
|
|
83
83
|
constructor(initiator: RuleContext, ruleValidator: RuleValidator);
|
|
84
|
+
/**
|
|
85
|
+
* Indicates that the async operation has completed.
|
|
86
|
+
* This does not need to be called if the method returns a promise (or uses the async keyword).
|
|
87
|
+
*/
|
|
84
88
|
endAsync(): void;
|
|
85
89
|
}
|
|
86
90
|
export {};
|
|
@@ -111,6 +111,10 @@ var AsyncRuleContext = /** @class */ (function (_super) {
|
|
|
111
111
|
_this.initiator = initiator;
|
|
112
112
|
return _this;
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Indicates that the async operation has completed.
|
|
116
|
+
* This does not need to be called if the method returns a promise (or uses the async keyword).
|
|
117
|
+
*/
|
|
114
118
|
AsyncRuleContext.prototype.endAsync = function () {
|
|
115
119
|
var _this = this;
|
|
116
120
|
if (this.ruleValidator.asyncContext && this.ruleValidator.asyncContext === this.initiator && this.ruleValidator.asyncStage === AsyncStage.Busy) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@singularsystems/neo-core",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Core functionality for the Neo client library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"CHANGELOG.md"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"build": "tsc",
|
|
@@ -15,16 +16,17 @@
|
|
|
15
16
|
"license": "ISC",
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@types/jest": "29.5.1",
|
|
18
|
-
"@types/node": "
|
|
19
|
+
"@types/node": "20.11.24",
|
|
19
20
|
"@types/react": "18.2.4",
|
|
21
|
+
"decimal.js-light": "2.5.1",
|
|
20
22
|
"jest": "29.5.0",
|
|
21
23
|
"ts-jest": "29.1.0",
|
|
22
|
-
"typescript": "5.
|
|
24
|
+
"typescript": "5.4.2"
|
|
23
25
|
},
|
|
24
26
|
"dependencies": {
|
|
25
27
|
"@microsoft/signalr": "^6.0.1",
|
|
26
|
-
"axios": "1.
|
|
27
|
-
"inversify": "^6.0.
|
|
28
|
+
"axios": "1.6.7",
|
|
29
|
+
"inversify": "^6.0.2",
|
|
28
30
|
"reflect-metadata": "0.1.13",
|
|
29
31
|
"tslib": "2.5.0"
|
|
30
32
|
},
|
|
@@ -32,5 +34,5 @@
|
|
|
32
34
|
"axios": ">=1.4.0",
|
|
33
35
|
"inversify": ">=5.0.1"
|
|
34
36
|
},
|
|
35
|
-
"packageManager": "yarn@
|
|
37
|
+
"packageManager": "yarn@4.1.1"
|
|
36
38
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IDecimal, IDecimalService } from "./IDecimal";
|
|
2
|
-
interface IMikeMCLDecimal extends IDecimal {
|
|
3
|
-
toNumber(): number;
|
|
4
|
-
round(precision: number, roundingType: number): IMikeMCLDecimal;
|
|
5
|
-
cmp(to: IMikeMCLDecimal): 0 | 1 | -1;
|
|
6
|
-
plus(number: IMikeMCLDecimal): IMikeMCLDecimal;
|
|
7
|
-
div(number: IMikeMCLDecimal | number): IMikeMCLDecimal;
|
|
8
|
-
}
|
|
9
|
-
export declare class DecimalService<T extends IMikeMCLDecimal> implements IDecimalService<T> {
|
|
10
|
-
private decimalType;
|
|
11
|
-
private roundHalfUpValue;
|
|
12
|
-
private roundDownValue;
|
|
13
|
-
constructor(decimalType: T, roundHalfUpValue: number, roundDownValue: number);
|
|
14
|
-
isDecimal(value: any): value is IMikeMCLDecimal;
|
|
15
|
-
createDecimal(value: number | string): T;
|
|
16
|
-
toNumber(value: number | T): number;
|
|
17
|
-
round(value: T, precision: number): T;
|
|
18
|
-
truncate(value: T): T;
|
|
19
|
-
compare(value1: T, value2: T): 0 | 1 | -1;
|
|
20
|
-
sum(values: T[]): T;
|
|
21
|
-
divideBy(value: T, divisor: number | T): T;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var DecimalService = /** @class */ (function () {
|
|
2
|
-
function DecimalService(decimalType, roundHalfUpValue, roundDownValue) {
|
|
3
|
-
this.decimalType = decimalType;
|
|
4
|
-
this.roundHalfUpValue = roundHalfUpValue;
|
|
5
|
-
this.roundDownValue = roundDownValue;
|
|
6
|
-
}
|
|
7
|
-
DecimalService.prototype.isDecimal = function (value) {
|
|
8
|
-
return value instanceof this.decimalType;
|
|
9
|
-
};
|
|
10
|
-
DecimalService.prototype.createDecimal = function (value) {
|
|
11
|
-
return new this.decimalType(value);
|
|
12
|
-
};
|
|
13
|
-
DecimalService.prototype.toNumber = function (value) {
|
|
14
|
-
if (this.isDecimal(value)) {
|
|
15
|
-
return value.toNumber();
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
DecimalService.prototype.round = function (value, precision) {
|
|
22
|
-
return value.round(precision, this.roundHalfUpValue);
|
|
23
|
-
};
|
|
24
|
-
DecimalService.prototype.truncate = function (value) {
|
|
25
|
-
return value.round(0, this.roundDownValue);
|
|
26
|
-
};
|
|
27
|
-
DecimalService.prototype.compare = function (value1, value2) {
|
|
28
|
-
return value1.cmp(value2);
|
|
29
|
-
};
|
|
30
|
-
DecimalService.prototype.sum = function (values) {
|
|
31
|
-
return values.reduce(function (total, item) { return total.plus(item); }, this.createDecimal(0));
|
|
32
|
-
};
|
|
33
|
-
DecimalService.prototype.divideBy = function (value, divisor) {
|
|
34
|
-
return value.div(divisor);
|
|
35
|
-
};
|
|
36
|
-
return DecimalService;
|
|
37
|
-
}());
|
|
38
|
-
export { DecimalService };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface IDecimal {
|
|
2
|
-
new (value: number | string): IDecimal;
|
|
3
|
-
}
|
|
4
|
-
export interface IDecimalService<T extends IDecimal = IDecimal> {
|
|
5
|
-
/** Returns true if the provided value is a decimal instance. */
|
|
6
|
-
isDecimal(value: any): value is IDecimal;
|
|
7
|
-
/** Creates a decimal instance from a javascript number. */
|
|
8
|
-
createDecimal(value: number | string): T;
|
|
9
|
-
/** If the provided value is a decimal, converts it to a number, otherwise returns the number passed in. */
|
|
10
|
-
toNumber(value: number | T): number;
|
|
11
|
-
/** Rounds a number. */
|
|
12
|
-
round(value: T, precision: number): T;
|
|
13
|
-
/** Removes decimal places from the value. Equivalent to round down with zero decimal places. */
|
|
14
|
-
truncate(value: T): T;
|
|
15
|
-
/** Compares 2 decimals.
|
|
16
|
-
* Returns 1 if value1 > value2
|
|
17
|
-
* Returns -1 if value1 < value2
|
|
18
|
-
* Returns 0 if equal
|
|
19
|
-
*/
|
|
20
|
-
compare(value1: T, value2: T): 0 | 1 | -1;
|
|
21
|
-
/** Sums a list of decimals and returns the total as a decimal. */
|
|
22
|
-
sum(values: T[]): T;
|
|
23
|
-
/** Divides value by divisor and returns the result. */
|
|
24
|
-
divideBy(value: T, divisor: number | T): T;
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface IDecimal {
|
|
2
|
-
toNumber(): number;
|
|
3
|
-
}
|
|
4
|
-
export interface IDecimalService<T = IDecimal> {
|
|
5
|
-
/** Returns true if the provided value is a decimal instance. */
|
|
6
|
-
isDecimal(value: any): value is IDecimal;
|
|
7
|
-
/** Creates a decimal instance from a javascript number. */
|
|
8
|
-
createDecimal(value: number | string): T;
|
|
9
|
-
/** If the provided value is a decimal, converts it to a number, otherwise returns the number passed in. */
|
|
10
|
-
toNumber(value: number | T): number;
|
|
11
|
-
/** Rounds a number using .net like midpoint away from zero rounding. */
|
|
12
|
-
round(value: T, precision: number): T;
|
|
13
|
-
/** Removes decimal places from the value. Equivalent to round down with zero decimal places. */
|
|
14
|
-
truncate(value: T): T;
|
|
15
|
-
/** Compares 2 decimals.
|
|
16
|
-
* Returns 1 if value1 > value2
|
|
17
|
-
* Returns -1 if value1 < value2
|
|
18
|
-
* Returns 0 if equal
|
|
19
|
-
*/
|
|
20
|
-
compare(value1: T, value2: T): 0 | 1 | -1;
|
|
21
|
-
/** Sums a list of decimals and returns the total as a decimal. */
|
|
22
|
-
sum(values: T[]): T;
|
|
23
|
-
/** Divides value by divisor and returns the result. */
|
|
24
|
-
divideBy(value: T, divisor: number | T): T;
|
|
25
|
-
}
|
package/dist/Numeric/IDecimal.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|