@singularsystems/neo-core 0.10.63 → 0.10.65
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/dist/ApiClient/ReadApiClient.d.ts +1 -1
- package/dist/ApiClient/ReadApiClient.js +1 -1
- package/dist/ApiClient/UpdateableApiClient.js +4 -4
- package/dist/AppServices/Config/ConfigModel.js +1 -1
- package/dist/AppServices/Config/ConfigService.js +4 -4
- package/dist/AppServices/ServiceIdentifier.js +1 -1
- package/dist/Components/AnimationHelper.js +1 -1
- package/dist/Components/BootstrapTypes.js +1 -0
- package/dist/Components/ButtonOptions.js +1 -0
- package/dist/Components/ContextMenu/ContextMenu.js +1 -0
- package/dist/Components/DatePicker/DatePicker.js +3 -5
- package/dist/Components/ErrorHandler.d.ts +13 -9
- package/dist/Components/ErrorHandler.js +134 -62
- package/dist/Components/FileManager/FileManager.js +7 -7
- package/dist/Components/FileManager/FileUploadBatch.js +3 -3
- package/dist/Components/FileManager/IFileManagerOptions.js +1 -0
- package/dist/Components/FormOptions.js +1 -0
- package/dist/Components/ICollapsableOptions.js +1 -0
- package/dist/Components/Modal/ModalHelper.js +4 -4
- package/dist/Components/Modal/ModalOptions.js +1 -0
- package/dist/Components/Notifications/INotificationHelper.js +1 -0
- package/dist/Components/Notifications/NotificationHelper.js +1 -1
- package/dist/Components/TaskRunner/ProgressState.js +1 -1
- package/dist/Components/TaskRunner/TaskRunner.js +36 -27
- package/dist/Components/TooltipOptions.js +1 -0
- package/dist/Components/index.js +1 -0
- package/dist/ConnectionManager.js +2 -2
- package/dist/Data/ApiDataSource.js +2 -2
- package/dist/Data/AsyncDataSource.js +1 -1
- package/dist/Data/DataCacheEntry.js +3 -3
- package/dist/Data/DataView.js +7 -7
- package/dist/Data/Deserialiser.js +4 -5
- package/dist/Data/Paging/PageManager.js +9 -9
- package/dist/Data/Serialiser.js +1 -1
- package/dist/Data/StaticDataSource.js +1 -1
- package/dist/Data/WindowedDataView.js +1 -1
- package/dist/Dates/DateUtils.js +3 -4
- package/dist/Dates/TimeSpan.js +4 -4
- package/dist/Extensions.js +5 -5
- package/dist/Globals.js +5 -5
- package/dist/JsonSchema/JsonSchemaTypes.js +1 -0
- package/dist/JsonSchema/TypeCache.js +2 -2
- package/dist/JsonSchema/TypeMetadata.js +4 -4
- package/dist/Localisation/ILocalisationService.js +1 -0
- package/dist/Localisation/index.js +1 -0
- package/dist/Model/BaseModels/UserEvent.js +1 -1
- package/dist/Model/Decorators.d.ts +1 -1
- package/dist/Model/Decorators.js +1 -1
- package/dist/Model/IAutoRunner.js +1 -0
- package/dist/Model/IModelBase.js +1 -0
- package/dist/Model/IModelCreatorBase.js +1 -0
- package/dist/Model/List.js +5 -5
- package/dist/Model/ModelBase.js +4 -4
- package/dist/Model/ModelCreatorBase.js +1 -1
- package/dist/Model/ModelGraphTraverser.js +1 -1
- package/dist/Model/NeoTypeInfo.d.ts +1 -0
- package/dist/Model/NeoTypeInfo.js +24 -18
- package/dist/Model/ObservableValue.js +1 -1
- package/dist/Model/PropertyInfo.js +8 -8
- package/dist/Model/PropertyInstance.js +8 -8
- package/dist/Routing/IMenuItemProvider.js +1 -0
- package/dist/Routing/IMenuRoute.js +1 -0
- package/dist/Routing/INavigationHelper.js +1 -0
- package/dist/Routing/IRoute.js +1 -0
- package/dist/Routing/IRouteSecurityService.js +1 -0
- package/dist/Security/IAuthenticationService.js +1 -0
- package/dist/Security/IAuthorisationService.js +1 -0
- package/dist/Security/ILoginErrorHandler.js +1 -0
- package/dist/Security/ISecurityService.js +1 -0
- package/dist/Security/IUser.js +1 -0
- package/dist/Security/IUserRole.js +1 -0
- package/dist/Security/LoginErrorHandler.js +1 -1
- package/dist/Security/Oidc/OidcAuthService.js +2 -2
- package/dist/Security/Oidc/OidcTypes.js +1 -0
- package/dist/Security/Oidc/OidcUser.js +3 -3
- package/dist/Security/SecurityService.js +2 -2
- package/dist/Security/User.js +2 -2
- package/dist/SignalR/HubBase.js +5 -5
- package/dist/StringUtils.js +1 -1
- package/dist/Utils.js +8 -9
- package/dist/Validation/DisplayHelper.js +2 -2
- package/dist/Validation/RuleContext.js +2 -3
- package/dist/Validation/ValidationHelpers.js +1 -1
- package/dist/Validation/ValidationState.js +2 -2
- package/dist/Validation/Validators/IModelValidator.js +1 -0
- package/dist/Validation/Validators/ModelValidator.js +2 -2
- package/dist/Validation/Validators/PropertyValidator.js +2 -2
- package/dist/Validation/Validators/RuleValidator.js +2 -2
- package/dist/Views/IViewBase.js +1 -0
- package/package.json +2 -2
|
@@ -25,7 +25,7 @@ var TaskRunnerOptions = /** @class */ (function () {
|
|
|
25
25
|
get: function () {
|
|
26
26
|
return this.taskRunner.progressState;
|
|
27
27
|
},
|
|
28
|
-
enumerable:
|
|
28
|
+
enumerable: false,
|
|
29
29
|
configurable: true
|
|
30
30
|
});
|
|
31
31
|
__decorate([
|
|
@@ -129,27 +129,26 @@ var TaskRunner = /** @class */ (function () {
|
|
|
129
129
|
});
|
|
130
130
|
};
|
|
131
131
|
TaskRunner.prototype.waitForData = function (task, options) {
|
|
132
|
-
var _a, _b;
|
|
133
132
|
return __awaiter(this, void 0, void 0, function () {
|
|
134
133
|
var optionsNoDefault, result, e_2;
|
|
135
|
-
return __generator(this, function (
|
|
136
|
-
switch (
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
137
136
|
case 0:
|
|
138
137
|
optionsNoDefault = __assign(__assign({}, options), { defaultReturnValue: undefined });
|
|
139
|
-
|
|
138
|
+
_a.label = 1;
|
|
140
139
|
case 1:
|
|
141
|
-
|
|
140
|
+
_a.trys.push([1, 3, , 4]);
|
|
142
141
|
return [4 /*yield*/, this.waitFor(task, optionsNoDefault)];
|
|
143
142
|
case 2:
|
|
144
|
-
result =
|
|
143
|
+
result = _a.sent();
|
|
145
144
|
return [2 /*return*/, result.data];
|
|
146
145
|
case 3:
|
|
147
|
-
e_2 =
|
|
148
|
-
if ((
|
|
146
|
+
e_2 = _a.sent();
|
|
147
|
+
if ((options === null || options === void 0 ? void 0 : options.defaultReturnValue) === undefined) {
|
|
149
148
|
throw e_2;
|
|
150
149
|
}
|
|
151
150
|
else {
|
|
152
|
-
return [2 /*return*/,
|
|
151
|
+
return [2 /*return*/, options === null || options === void 0 ? void 0 : options.defaultReturnValue];
|
|
153
152
|
}
|
|
154
153
|
return [3 /*break*/, 4];
|
|
155
154
|
case 4: return [2 /*return*/];
|
|
@@ -184,24 +183,34 @@ var TaskRunner = /** @class */ (function () {
|
|
|
184
183
|
}
|
|
185
184
|
resolve(value);
|
|
186
185
|
})
|
|
187
|
-
.catch(function (e) {
|
|
186
|
+
.catch(function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
187
|
+
var cancel, errorInfo;
|
|
188
188
|
var _a;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
189
|
+
return __generator(this, function (_b) {
|
|
190
|
+
switch (_b.label) {
|
|
191
|
+
case 0:
|
|
192
|
+
cancel = false;
|
|
193
|
+
if (!(options.onError !== undefined)) return [3 /*break*/, 2];
|
|
194
|
+
return [4 /*yield*/, this.errorHandler.parseError(e)];
|
|
195
|
+
case 1:
|
|
196
|
+
errorInfo = _b.sent();
|
|
197
|
+
options.onError(errorInfo);
|
|
198
|
+
cancel = (_a = errorInfo.cancelDisplay) !== null && _a !== void 0 ? _a : false;
|
|
199
|
+
_b.label = 2;
|
|
200
|
+
case 2:
|
|
201
|
+
if (!cancel && options.errorHandling !== ErrorDisplayType.ThrowError) {
|
|
202
|
+
this.errorHandler.showError(e, options.errorHandling);
|
|
203
|
+
}
|
|
204
|
+
if (options.defaultReturnValue === undefined) {
|
|
205
|
+
reject(e);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
resolve(options.defaultReturnValue);
|
|
209
|
+
}
|
|
210
|
+
return [2 /*return*/];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}); }).finally(function () {
|
|
205
214
|
var task = _this.runningTasks.find(function (c) { return c.promise === runningTask; });
|
|
206
215
|
if (_this.runningTasks.length === 1) {
|
|
207
216
|
// This was the last task to finish.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Components/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as AnimationHelper, CollapseAnimationHelper } from './AnimationHelper';
|
|
2
2
|
export { default as BootstrapHelpers } from './BootstrapHelpers';
|
|
3
|
+
export * from "./BootstrapTypes";
|
|
3
4
|
export { default as DatePicker } from './DatePicker/DatePicker';
|
|
4
5
|
export { default as DatePickerOptions, YearsInYearView } from './DatePicker/DatePickerOptions';
|
|
5
6
|
export { ErrorHandler, ErrorDisplayType } from './ErrorHandler';
|
|
@@ -38,14 +38,14 @@ var ConnectionManager = /** @class */ (function () {
|
|
|
38
38
|
get: function () {
|
|
39
39
|
return this.connections.reduce(function (p, c) { return Math.max(p, c.connection.connectionState); }, ConnectionState.NotStarted);
|
|
40
40
|
},
|
|
41
|
-
enumerable:
|
|
41
|
+
enumerable: false,
|
|
42
42
|
configurable: true
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(ConnectionManager.prototype, "connections", {
|
|
45
45
|
get: function () {
|
|
46
46
|
return Array.from(this._connections.values());
|
|
47
47
|
},
|
|
48
|
-
enumerable:
|
|
48
|
+
enumerable: false,
|
|
49
49
|
configurable: true
|
|
50
50
|
});
|
|
51
51
|
__decorate([
|
|
@@ -56,7 +56,7 @@ function unwrapAxiosPromise(axiosPromise) {
|
|
|
56
56
|
var ApiClientDataSource = /** @class */ (function (_super) {
|
|
57
57
|
__extends(ApiClientDataSource, _super);
|
|
58
58
|
function ApiClientDataSource(getMethod, defaultData) {
|
|
59
|
-
var _this = _super.call(this,
|
|
59
|
+
var _this = _super.call(this, defaultData !== null && defaultData !== void 0 ? defaultData : []) || this;
|
|
60
60
|
_this.getMethod = getMethod;
|
|
61
61
|
_this.defaultData = defaultData;
|
|
62
62
|
return _this;
|
|
@@ -84,7 +84,7 @@ export { ApiClientDataSource };
|
|
|
84
84
|
var ApiClientLookupDataSource = /** @class */ (function (_super) {
|
|
85
85
|
__extends(ApiClientLookupDataSource, _super);
|
|
86
86
|
function ApiClientLookupDataSource(getMethod, deserialiseType, defaultData) {
|
|
87
|
-
var _this = _super.call(this,
|
|
87
|
+
var _this = _super.call(this, defaultData !== null && defaultData !== void 0 ? defaultData : []) || this;
|
|
88
88
|
_this.getMethod = getMethod;
|
|
89
89
|
_this.deserialiseType = deserialiseType;
|
|
90
90
|
_this.defaultData = defaultData;
|
|
@@ -8,14 +8,14 @@ var DataCacheEntry = /** @class */ (function () {
|
|
|
8
8
|
get: function () {
|
|
9
9
|
return Date.now() >= this.expiryDate.getTime();
|
|
10
10
|
},
|
|
11
|
-
enumerable:
|
|
11
|
+
enumerable: false,
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(DataCacheEntry.prototype, "willLoad", {
|
|
15
15
|
get: function () {
|
|
16
16
|
return this.dataSource.willLoad || this.isExpired;
|
|
17
17
|
},
|
|
18
|
-
enumerable:
|
|
18
|
+
enumerable: false,
|
|
19
19
|
configurable: true
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(DataCacheEntry.prototype, "currentData", {
|
|
@@ -26,7 +26,7 @@ var DataCacheEntry = /** @class */ (function () {
|
|
|
26
26
|
get: function () {
|
|
27
27
|
return this.dataSource.data;
|
|
28
28
|
},
|
|
29
|
-
enumerable:
|
|
29
|
+
enumerable: false,
|
|
30
30
|
configurable: true
|
|
31
31
|
});
|
|
32
32
|
/**
|
package/dist/Data/DataView.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate, __extends, __metadata,
|
|
1
|
+
import { __decorate, __extends, __metadata, __spreadArray } from "tslib";
|
|
2
2
|
import NeoModel from '../Model/NeoModel';
|
|
3
3
|
import { Observable, Computed } from '../Model/Decorators';
|
|
4
4
|
import { SortOperation } from './SortOperation';
|
|
@@ -33,10 +33,10 @@ var DataViewBase = /** @class */ (function () {
|
|
|
33
33
|
var existing = this.sortInfo.find(function (c) { return c.column === property; });
|
|
34
34
|
if (existing) {
|
|
35
35
|
existing.sortAscending = !existing.sortAscending;
|
|
36
|
-
this.sortInfo =
|
|
36
|
+
this.sortInfo = __spreadArray([], this.sortInfo, true);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
|
-
this.sortInfo =
|
|
39
|
+
this.sortInfo = __spreadArray(__spreadArray([], this.sortInfo, true), [new SortOperation(property, sortAscending !== null && sortAscending !== void 0 ? sortAscending : SortOperation.getDefaultSortAscending(property))], false);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(DataViewBase.prototype, "rawItems", {
|
|
@@ -44,7 +44,7 @@ var DataViewBase = /** @class */ (function () {
|
|
|
44
44
|
get: function () {
|
|
45
45
|
return this.originalSource;
|
|
46
46
|
},
|
|
47
|
-
enumerable:
|
|
47
|
+
enumerable: false,
|
|
48
48
|
configurable: true
|
|
49
49
|
});
|
|
50
50
|
/**
|
|
@@ -76,14 +76,14 @@ var DataViewBase = /** @class */ (function () {
|
|
|
76
76
|
get: function () {
|
|
77
77
|
return this.getFilteredItems();
|
|
78
78
|
},
|
|
79
|
-
enumerable:
|
|
79
|
+
enumerable: false,
|
|
80
80
|
configurable: true
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(DataViewBase.prototype, "sortedItems", {
|
|
83
83
|
get: function () {
|
|
84
84
|
return this.getSortedItems();
|
|
85
85
|
},
|
|
86
|
-
enumerable:
|
|
86
|
+
enumerable: false,
|
|
87
87
|
configurable: true
|
|
88
88
|
});
|
|
89
89
|
DataViewBase.prototype.getSortedItems = function () {
|
|
@@ -118,7 +118,7 @@ var DataViewBase = /** @class */ (function () {
|
|
|
118
118
|
for (var i = sortFns.length - 1; i >= 0; i--) {
|
|
119
119
|
itemsToSort.sortBy(sortFns[i].valueFn, sortFns[i].direction, sortFns[i].property.propertyType);
|
|
120
120
|
}
|
|
121
|
-
return
|
|
121
|
+
return __spreadArray(__spreadArray([], itemsToSort, true), endItems, true);
|
|
122
122
|
}
|
|
123
123
|
return filtered;
|
|
124
124
|
}
|
|
@@ -11,12 +11,11 @@ var Deserialiser = /** @class */ (function () {
|
|
|
11
11
|
* Called before an object is deserialised. Object tracking should be suspended here. Must return the property info list.
|
|
12
12
|
*/
|
|
13
13
|
Deserialiser.prototype.beginObjectDeserialise = function (object) {
|
|
14
|
-
var _a;
|
|
15
14
|
var neoTypeInfo = object.constructor.neo;
|
|
16
15
|
if (!neoTypeInfo) {
|
|
17
16
|
throw "Tried to deserialise into an object without @NeoModel decorator.";
|
|
18
17
|
}
|
|
19
|
-
var propertyMap =
|
|
18
|
+
var propertyMap = neoTypeInfo === null || neoTypeInfo === void 0 ? void 0 : neoTypeInfo.propertyMap;
|
|
20
19
|
if (propertyMap && object.isSuspended !== undefined) {
|
|
21
20
|
object.isSuspended = true;
|
|
22
21
|
this.suspendedObjects.push(object);
|
|
@@ -49,7 +48,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
49
48
|
});
|
|
50
49
|
}
|
|
51
50
|
catch (error) {
|
|
52
|
-
throw "Deserialise error. "
|
|
51
|
+
throw "Deserialise error. ".concat(error);
|
|
53
52
|
}
|
|
54
53
|
finally {
|
|
55
54
|
this.cleanUp();
|
|
@@ -216,7 +215,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
217
|
catch (error) {
|
|
219
|
-
throw "Error deserialising property '"
|
|
218
|
+
throw "Error deserialising property '".concat(key, "' on type '").concat(typeName, "': ").concat(error);
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
221
|
}
|
|
@@ -247,7 +246,7 @@ var Deserialiser = /** @class */ (function () {
|
|
|
247
246
|
Deserialiser.prototype.getReferencedObject = function (id) {
|
|
248
247
|
var found = this.objectRefs[id];
|
|
249
248
|
if (!found) {
|
|
250
|
-
throw "Cannot find $id: "
|
|
249
|
+
throw "Cannot find $id: ".concat(id, ".");
|
|
251
250
|
}
|
|
252
251
|
return found.to;
|
|
253
252
|
};
|
|
@@ -47,7 +47,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
47
47
|
set: function (value) {
|
|
48
48
|
this.pageRequest.criteria = value;
|
|
49
49
|
},
|
|
50
|
-
enumerable:
|
|
50
|
+
enumerable: false,
|
|
51
51
|
configurable: true
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(PageManager.prototype, "hasFetched", {
|
|
@@ -61,7 +61,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
61
61
|
}
|
|
62
62
|
return this.initialFetchState === "complete";
|
|
63
63
|
},
|
|
64
|
-
enumerable:
|
|
64
|
+
enumerable: false,
|
|
65
65
|
configurable: true
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(PageManager.prototype, "pageNo", {
|
|
@@ -78,7 +78,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
78
78
|
this.refreshData(false);
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
enumerable:
|
|
81
|
+
enumerable: false,
|
|
82
82
|
configurable: true
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(PageManager.prototype, "pageSize", {
|
|
@@ -97,14 +97,14 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
enumerable:
|
|
100
|
+
enumerable: false,
|
|
101
101
|
configurable: true
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(PageManager.prototype, "totalRecords", {
|
|
104
104
|
get: function () {
|
|
105
105
|
return this._totalRecords;
|
|
106
106
|
},
|
|
107
|
-
enumerable:
|
|
107
|
+
enumerable: false,
|
|
108
108
|
configurable: true
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(PageManager.prototype, "totalPages", {
|
|
@@ -117,7 +117,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
117
117
|
return Math.ceil(this.totalRecords / this.pageRequest.pageSize);
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
enumerable:
|
|
120
|
+
enumerable: false,
|
|
121
121
|
configurable: true
|
|
122
122
|
});
|
|
123
123
|
/**
|
|
@@ -265,7 +265,7 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
265
265
|
get: function () {
|
|
266
266
|
return this.currentData;
|
|
267
267
|
},
|
|
268
|
-
enumerable:
|
|
268
|
+
enumerable: false,
|
|
269
269
|
configurable: true
|
|
270
270
|
});
|
|
271
271
|
PageManager.prototype.getItems = function () {
|
|
@@ -278,14 +278,14 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
278
278
|
get: function () {
|
|
279
279
|
return this.currentData;
|
|
280
280
|
},
|
|
281
|
-
enumerable:
|
|
281
|
+
enumerable: false,
|
|
282
282
|
configurable: true
|
|
283
283
|
});
|
|
284
284
|
Object.defineProperty(PageManager.prototype, "pageSizeOptions", {
|
|
285
285
|
get: function () {
|
|
286
286
|
return this.options.pageSizeOptions;
|
|
287
287
|
},
|
|
288
|
-
enumerable:
|
|
288
|
+
enumerable: false,
|
|
289
289
|
configurable: true
|
|
290
290
|
});
|
|
291
291
|
PageManager.prototype.getMetaItem = function () {
|
package/dist/Data/Serialiser.js
CHANGED
|
@@ -157,7 +157,7 @@ var Serialiser = /** @class */ (function () {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
catch (error) {
|
|
160
|
-
throw "Error serialising property '"
|
|
160
|
+
throw "Error serialising property '".concat(key, "' on type '").concat(from.constructor.name, "': ").concat(error);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -17,7 +17,7 @@ var WindowedDataView = /** @class */ (function (_super) {
|
|
|
17
17
|
set: function (value) {
|
|
18
18
|
this._position = Math.max(0, Math.min(value, this.sortedItems.length - this.maxItems));
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
WindowedDataView.prototype.getItems = function () {
|
package/dist/Dates/DateUtils.js
CHANGED
|
@@ -5,10 +5,9 @@ var DateUtils = /** @class */ (function () {
|
|
|
5
5
|
}
|
|
6
6
|
DateUtils.format = function (dateOrDateProperty, formatString, utc) {
|
|
7
7
|
if (utc === void 0) { utc = false; }
|
|
8
|
-
var _a;
|
|
9
8
|
var date = dateOrDateProperty;
|
|
10
9
|
var dateProperty = dateOrDateProperty;
|
|
11
|
-
if (
|
|
10
|
+
if (dateProperty === null || dateProperty === void 0 ? void 0 : dateProperty.propertyInfo) {
|
|
12
11
|
date = dateProperty.value;
|
|
13
12
|
formatString = dateProperty.propertyInfo.timeZoneSerialisation === Misc.TimeZoneFormat.None ? DateUtils.defaultFormatString : DateUtils.defaultFormatStringWithTime;
|
|
14
13
|
}
|
|
@@ -186,8 +185,8 @@ var DateUtils = /** @class */ (function () {
|
|
|
186
185
|
DateUtils.add = function (date, timeSpan) {
|
|
187
186
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
188
187
|
var newDate = new Date();
|
|
189
|
-
newDate.setFullYear(date.getFullYear() + (_a = timeSpan.years
|
|
190
|
-
newDate.setHours(date.getHours() + (_d = timeSpan.hours
|
|
188
|
+
newDate.setFullYear(date.getFullYear() + ((_a = timeSpan.years) !== null && _a !== void 0 ? _a : 0), date.getMonth() + ((_b = timeSpan.months) !== null && _b !== void 0 ? _b : 0), date.getDate() + ((_c = timeSpan.days) !== null && _c !== void 0 ? _c : 0));
|
|
189
|
+
newDate.setHours(date.getHours() + ((_d = timeSpan.hours) !== null && _d !== void 0 ? _d : 0), date.getMinutes() + ((_e = timeSpan.minutes) !== null && _e !== void 0 ? _e : 0), date.getSeconds() + ((_f = timeSpan.seconds) !== null && _f !== void 0 ? _f : 0), date.getMilliseconds() + ((_g = timeSpan.milliseconds) !== null && _g !== void 0 ? _g : 0));
|
|
191
190
|
return newDate;
|
|
192
191
|
};
|
|
193
192
|
/**
|
package/dist/Dates/TimeSpan.js
CHANGED
|
@@ -17,28 +17,28 @@ var TimeSpan = /** @class */ (function () {
|
|
|
17
17
|
get: function () {
|
|
18
18
|
return Math.floor(this.totalMilliseconds / msPerSecond);
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(TimeSpan.prototype, "totalMinutes", {
|
|
24
24
|
get: function () {
|
|
25
25
|
return Math.floor(this.totalMilliseconds / msPerMinute);
|
|
26
26
|
},
|
|
27
|
-
enumerable:
|
|
27
|
+
enumerable: false,
|
|
28
28
|
configurable: true
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(TimeSpan.prototype, "totalHours", {
|
|
31
31
|
get: function () {
|
|
32
32
|
return Math.floor(this.totalMilliseconds / msPerHour);
|
|
33
33
|
},
|
|
34
|
-
enumerable:
|
|
34
|
+
enumerable: false,
|
|
35
35
|
configurable: true
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(TimeSpan.prototype, "totalDays", {
|
|
38
38
|
get: function () {
|
|
39
39
|
return Math.floor(this.totalMilliseconds / msPerDay);
|
|
40
40
|
},
|
|
41
|
-
enumerable:
|
|
41
|
+
enumerable: false,
|
|
42
42
|
configurable: true
|
|
43
43
|
});
|
|
44
44
|
return TimeSpan;
|
package/dist/Extensions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __spreadArray } from "tslib";
|
|
2
2
|
import { DataType } from './Misc';
|
|
3
3
|
import Decimal from 'decimal.js-light';
|
|
4
4
|
//#region Strings
|
|
@@ -162,16 +162,16 @@ Array.prototype.groupBy = function (key, selector) {
|
|
|
162
162
|
};
|
|
163
163
|
Array.prototype.toDictionary = function (keyFn, valueFn) {
|
|
164
164
|
if (valueFn) {
|
|
165
|
-
return Object.assign.apply(Object,
|
|
165
|
+
return Object.assign.apply(Object, __spreadArray([{}], this.map(function (item) {
|
|
166
166
|
var _a;
|
|
167
167
|
return (_a = {}, _a[keyFn(item)] = valueFn(item), _a);
|
|
168
|
-
})));
|
|
168
|
+
}), false));
|
|
169
169
|
}
|
|
170
170
|
else {
|
|
171
|
-
return Object.assign.apply(Object,
|
|
171
|
+
return Object.assign.apply(Object, __spreadArray([{}], this.map(function (item) {
|
|
172
172
|
var _a;
|
|
173
173
|
return (_a = {}, _a[keyFn(item)] = item, _a);
|
|
174
|
-
})));
|
|
174
|
+
}), false));
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
//#endregion
|
package/dist/Globals.js
CHANGED
|
@@ -9,9 +9,9 @@ var Globals = /** @class */ (function () {
|
|
|
9
9
|
*/
|
|
10
10
|
get: function () {
|
|
11
11
|
var _a;
|
|
12
|
-
return _a = this.shadowRoot
|
|
12
|
+
return (_a = this.shadowRoot) !== null && _a !== void 0 ? _a : window.document;
|
|
13
13
|
},
|
|
14
|
-
enumerable:
|
|
14
|
+
enumerable: false,
|
|
15
15
|
configurable: true
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(Globals, "rootElement", {
|
|
@@ -21,9 +21,9 @@ var Globals = /** @class */ (function () {
|
|
|
21
21
|
*/
|
|
22
22
|
get: function () {
|
|
23
23
|
var _a;
|
|
24
|
-
return _a = this.shadowRoot
|
|
24
|
+
return (_a = this.shadowRoot) !== null && _a !== void 0 ? _a : window.document.body;
|
|
25
25
|
},
|
|
26
|
-
enumerable:
|
|
26
|
+
enumerable: false,
|
|
27
27
|
configurable: true
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(Globals, "decimalType", {
|
|
@@ -33,7 +33,7 @@ var Globals = /** @class */ (function () {
|
|
|
33
33
|
}
|
|
34
34
|
return this._decimalType;
|
|
35
35
|
},
|
|
36
|
-
enumerable:
|
|
36
|
+
enumerable: false,
|
|
37
37
|
configurable: true
|
|
38
38
|
});
|
|
39
39
|
return Globals;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,14 +10,14 @@ var TypeCache = /** @class */ (function () {
|
|
|
10
10
|
get: function () {
|
|
11
11
|
return this._root;
|
|
12
12
|
},
|
|
13
|
-
enumerable:
|
|
13
|
+
enumerable: false,
|
|
14
14
|
configurable: true
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(TypeCache.prototype, "objects", {
|
|
17
17
|
get: function () {
|
|
18
18
|
return this._objects;
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
TypeCache.prototype.getOrAddType = function (name) {
|
|
@@ -29,7 +29,7 @@ var TypeMetadata = /** @class */ (function () {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
TypeMetadata.prototype.parse = function (schema, cache) {
|
|
32
|
-
var _a
|
|
32
|
+
var _a;
|
|
33
33
|
if (schema.items) {
|
|
34
34
|
var innerType = TypeMetadata.create(schema.items, cache);
|
|
35
35
|
if (innerType.basicType !== "unknown") {
|
|
@@ -48,7 +48,7 @@ var TypeMetadata = /** @class */ (function () {
|
|
|
48
48
|
var types = schema.oneOf;
|
|
49
49
|
var basicType = types.find(function (c) { return c.type; });
|
|
50
50
|
var refType = types.find(function (c) { return c.$ref; });
|
|
51
|
-
if ((
|
|
51
|
+
if ((basicType === null || basicType === void 0 ? void 0 : basicType.type) === "null" && refType) {
|
|
52
52
|
this.parse(refType, cache);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -56,10 +56,10 @@ var TypeMetadata = /** @class */ (function () {
|
|
|
56
56
|
var types = schema.allOf;
|
|
57
57
|
var basicType = types.find(function (c) { return c.type; });
|
|
58
58
|
var refType = types.find(function (c) { return c.$ref; });
|
|
59
|
-
if ((
|
|
59
|
+
if ((basicType === null || basicType === void 0 ? void 0 : basicType.type) === "object" && refType) {
|
|
60
60
|
this.parse(refType, cache);
|
|
61
61
|
this.customType = this.customType.clone();
|
|
62
|
-
(
|
|
62
|
+
(_a = this.customType) === null || _a === void 0 ? void 0 : _a.loadMetaData(basicType, cache);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
else if (schema.type) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SerialiseType, DataType, TimeZoneFormat } from './Misc';
|
|
2
2
|
export declare function Display(name: string): (type: any, propertyKey: string) => void;
|
|
3
3
|
/** Indicates that this is a date property. Json strings will be converted to date objects on deserialisation. */
|
|
4
|
-
export declare function Date(timeZoneSerialisation?: TimeZoneFormat): (type: any, propertyKey: string, descriptor?: PropertyDescriptor
|
|
4
|
+
export declare function Date(timeZoneSerialisation?: TimeZoneFormat): (type: any, propertyKey: string, descriptor?: PropertyDescriptor) => void;
|
|
5
5
|
/** Indicates that this is an integer number property. Editors will be restricted to integer numeric input. */
|
|
6
6
|
export declare function Integer(): (type: any, propertyKey: string) => void;
|
|
7
7
|
/** Indicates that this is a float number property. Editors will be restricted to float numeric input. */
|
package/dist/Model/Decorators.js
CHANGED
|
@@ -94,7 +94,7 @@ export function ChildObject(childType, isValueObject) {
|
|
|
94
94
|
return function (type, propertyKey) {
|
|
95
95
|
var pi = getOrAddPropertyInfo(type, propertyKey);
|
|
96
96
|
if (childType === undefined) {
|
|
97
|
-
throw Error("Unknown child type on "
|
|
97
|
+
throw Error("Unknown child type on ".concat(type.constructor.name, ".").concat(propertyKey, ", you may have a circular dependency. Try use @Attributes.ChildObject(() => Type)"));
|
|
98
98
|
}
|
|
99
99
|
pi.setPropertyType(childType);
|
|
100
100
|
if (pi.relationType === RelationType.None) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Model/IModelBase.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|