@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
package/dist/Model/List.js
CHANGED
|
@@ -16,7 +16,7 @@ var List = /** @class */ (function (_super) {
|
|
|
16
16
|
get: function () {
|
|
17
17
|
return this._deletedList.value;
|
|
18
18
|
},
|
|
19
|
-
enumerable:
|
|
19
|
+
enumerable: false,
|
|
20
20
|
configurable: true
|
|
21
21
|
});
|
|
22
22
|
/**
|
|
@@ -60,7 +60,7 @@ var List = /** @class */ (function (_super) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
|
-
throw "Do not assign a plain array to a List property. Either call "
|
|
63
|
+
throw "Do not assign a plain array to a List property. Either call ".concat(propertyKey, ".set(...) or ").concat(propertyKey, ".update(...)");
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
} });
|
|
@@ -193,7 +193,7 @@ var List = /** @class */ (function (_super) {
|
|
|
193
193
|
}
|
|
194
194
|
return true;
|
|
195
195
|
},
|
|
196
|
-
enumerable:
|
|
196
|
+
enumerable: false,
|
|
197
197
|
configurable: true
|
|
198
198
|
});
|
|
199
199
|
Object.defineProperty(List.prototype, "isDirty", {
|
|
@@ -208,7 +208,7 @@ var List = /** @class */ (function (_super) {
|
|
|
208
208
|
}
|
|
209
209
|
return false;
|
|
210
210
|
},
|
|
211
|
-
enumerable:
|
|
211
|
+
enumerable: false,
|
|
212
212
|
configurable: true
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(List.prototype, "readyToSave", {
|
|
@@ -216,7 +216,7 @@ var List = /** @class */ (function (_super) {
|
|
|
216
216
|
get: function () {
|
|
217
217
|
return this.isDirty && this.isValid;
|
|
218
218
|
},
|
|
219
|
-
enumerable:
|
|
219
|
+
enumerable: false,
|
|
220
220
|
configurable: true
|
|
221
221
|
});
|
|
222
222
|
return List;
|
package/dist/Model/ModelBase.js
CHANGED
|
@@ -38,14 +38,14 @@ var ModelBase = /** @class */ (function (_super) {
|
|
|
38
38
|
}
|
|
39
39
|
}).flag;
|
|
40
40
|
},
|
|
41
|
-
enumerable:
|
|
41
|
+
enumerable: false,
|
|
42
42
|
configurable: true
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(ModelBase.prototype, "isSelfValid", {
|
|
45
45
|
get: function () {
|
|
46
46
|
return this.validator.isValid;
|
|
47
47
|
},
|
|
48
|
-
enumerable:
|
|
48
|
+
enumerable: false,
|
|
49
49
|
configurable: true
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(ModelBase.prototype, "isValid", {
|
|
@@ -57,7 +57,7 @@ var ModelBase = /** @class */ (function (_super) {
|
|
|
57
57
|
}
|
|
58
58
|
}).flag;
|
|
59
59
|
},
|
|
60
|
-
enumerable:
|
|
60
|
+
enumerable: false,
|
|
61
61
|
configurable: true
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(ModelBase.prototype, "readyToSave", {
|
|
@@ -67,7 +67,7 @@ var ModelBase = /** @class */ (function (_super) {
|
|
|
67
67
|
get: function () {
|
|
68
68
|
return this.isDirty && this.isValid;
|
|
69
69
|
},
|
|
70
|
-
enumerable:
|
|
70
|
+
enumerable: false,
|
|
71
71
|
configurable: true
|
|
72
72
|
});
|
|
73
73
|
/** Recursively sets isSelfDirty, and isNew to false on this object and its children. */
|
|
@@ -17,7 +17,7 @@ var ModelCreatorBase = /** @class */ (function () {
|
|
|
17
17
|
get: function () {
|
|
18
18
|
return this.typeInfo.inheritsBindableBase || this.alwaysInitialiseMembers;
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
ModelCreatorBase.prototype.isBindableBase = function (type) {
|
|
@@ -89,7 +89,7 @@ function invokeOnSelfAndChildren(model, state, callback, listCallback, relationT
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
catch (error) {
|
|
92
|
-
throw "Error on property '"
|
|
92
|
+
throw "Error on property '".concat(cpi.propertyName, "' on type '").concat(model.constructor.name, "': ").concat(error);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -34,6 +34,7 @@ export declare class NeoTypeInfo {
|
|
|
34
34
|
/** Copy the property info list from each base type into the current type. */
|
|
35
35
|
merge(baseConstructor: NeoModelConstructor): void;
|
|
36
36
|
ensureInitialised(): void;
|
|
37
|
+
createInstance(...args: any): any;
|
|
37
38
|
/** Gets the override constructor which can setup a neo model. */
|
|
38
39
|
getOverrideConstructor(): Function;
|
|
39
40
|
private createWrapperConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __spreadArray } from "tslib";
|
|
2
2
|
import { ExpressionRule, CallbackRule } from '../Validation/Rules';
|
|
3
3
|
import PropertyInstance from './PropertyInstance';
|
|
4
4
|
import PropertyInfo from './PropertyInfo';
|
|
@@ -33,14 +33,14 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
33
33
|
get: function () {
|
|
34
34
|
return this._inheritsBindableBase;
|
|
35
35
|
},
|
|
36
|
-
enumerable:
|
|
36
|
+
enumerable: false,
|
|
37
37
|
configurable: true
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(NeoTypeInfo.prototype, "inheritsModelBase", {
|
|
40
40
|
get: function () {
|
|
41
41
|
return this._inheritsModelBase;
|
|
42
42
|
},
|
|
43
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
44
44
|
configurable: true
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(NeoTypeInfo.prototype, "metaItem", {
|
|
@@ -51,7 +51,7 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
51
51
|
}
|
|
52
52
|
return this._metaItem;
|
|
53
53
|
},
|
|
54
|
-
enumerable:
|
|
54
|
+
enumerable: false,
|
|
55
55
|
configurable: true
|
|
56
56
|
});
|
|
57
57
|
NeoTypeInfo.prototype.initialise = function (objectConstructor) {
|
|
@@ -116,7 +116,7 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
116
116
|
var validationRules = new ValidationRules();
|
|
117
117
|
instance.addBusinessRules(validationRules);
|
|
118
118
|
if (validationRules.rules.some(function (c) { return c instanceof CallbackRule && c.hasBoundFunction; })) {
|
|
119
|
-
console.error("Warning: "
|
|
119
|
+
console.error("Warning: ".concat(this.objectConstructor.name, " has rules which have been added using a bound function, or arrow function."));
|
|
120
120
|
}
|
|
121
121
|
var modelProxy = new ModelProxy(instance);
|
|
122
122
|
for (var _i = 0, _a = validationRules.rules; _i < _a.length; _i++) {
|
|
@@ -165,12 +165,19 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
165
165
|
NeoTypeInfo.prototype.ensureInitialised = function () {
|
|
166
166
|
if (!this.modelCreator) {
|
|
167
167
|
// create a new instance which will cause the type to be setup.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
this.createInstance();
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
NeoTypeInfo.prototype.createInstance = function () {
|
|
172
|
+
var args = [];
|
|
173
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
174
|
+
args[_i] = arguments[_i];
|
|
175
|
+
}
|
|
176
|
+
if (this.wrapperConstructor) {
|
|
177
|
+
return this.wrapperConstructor(args);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
return new this.objectConstructor(args);
|
|
174
181
|
}
|
|
175
182
|
};
|
|
176
183
|
/** Gets the override constructor which can setup a neo model. */
|
|
@@ -181,10 +188,9 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
181
188
|
return this.wrapperConstructor;
|
|
182
189
|
};
|
|
183
190
|
NeoTypeInfo.prototype.createWrapperConstructor = function () {
|
|
184
|
-
var _a;
|
|
185
191
|
var self = this;
|
|
186
192
|
var baseType = Object.getPrototypeOf(self.objectConstructor);
|
|
187
|
-
if ((
|
|
193
|
+
if ((baseType === null || baseType === void 0 ? void 0 : baseType.name) === "neoConstructor") {
|
|
188
194
|
return function () {
|
|
189
195
|
throw Error(self.objectConstructor.name + " cannot inherit from a model decorated with @NeoModel.");
|
|
190
196
|
};
|
|
@@ -195,14 +201,14 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
195
201
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
196
202
|
args[_i] = arguments[_i];
|
|
197
203
|
}
|
|
198
|
-
var instance = new ((_a = self.objectConstructor).bind.apply(_a,
|
|
204
|
+
var instance = new ((_a = self.objectConstructor).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
199
205
|
return self.makeObservable(instance);
|
|
200
206
|
};
|
|
201
207
|
// Copy statics from the original constructor, and all base classes to the new constructor.
|
|
202
208
|
baseType = this.objectConstructor;
|
|
203
209
|
while (baseType && baseType !== Function.prototype) {
|
|
204
|
-
for (var _i = 0,
|
|
205
|
-
var propertyName =
|
|
210
|
+
for (var _i = 0, _a = Object.getOwnPropertyNames(baseType); _i < _a.length; _i++) {
|
|
211
|
+
var propertyName = _a[_i];
|
|
206
212
|
if (propertyName !== "prototype" && propertyName !== "caller" && propertyName !== "arguments" && propertyName !== "neo") {
|
|
207
213
|
if (newConstructor[propertyName] === undefined) {
|
|
208
214
|
var descriptor = Object.getOwnPropertyDescriptor(baseType, propertyName);
|
|
@@ -227,14 +233,14 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
227
233
|
return newConstructor;
|
|
228
234
|
};
|
|
229
235
|
NeoTypeInfo.prototype.makeObservable = function (instance, options) {
|
|
230
|
-
options =
|
|
236
|
+
options = options !== null && options !== void 0 ? options : {};
|
|
231
237
|
if (!options.skipConversion) {
|
|
232
238
|
this.ensureStaticRuntimeInfo(instance);
|
|
233
239
|
if (options.makeObservable === undefined) {
|
|
234
240
|
options.makeObservable = this.inheritsModelBase;
|
|
235
241
|
}
|
|
236
242
|
if (instance[hasConvertedSymbol]) {
|
|
237
|
-
throw Error("makeObservable() or makeBindable() has been called multiple times on type "
|
|
243
|
+
throw Error("makeObservable() or makeBindable() has been called multiple times on type ".concat(this.objectConstructor.name, ". Make sure this is only called on the last derived type."));
|
|
238
244
|
}
|
|
239
245
|
else {
|
|
240
246
|
instance[hasConvertedSymbol] = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __spreadArray } from "tslib";
|
|
2
2
|
import { SerialiseType, RelationType, DataType } from './Misc';
|
|
3
3
|
import Globals from '../Globals';
|
|
4
4
|
var PropertyInfo = /** @class */ (function () {
|
|
@@ -46,7 +46,7 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
46
46
|
}
|
|
47
47
|
return this._readableName;
|
|
48
48
|
},
|
|
49
|
-
enumerable:
|
|
49
|
+
enumerable: false,
|
|
50
50
|
configurable: true
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(PropertyInfo.prototype, "parent", {
|
|
@@ -56,7 +56,7 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
56
56
|
get: function () {
|
|
57
57
|
return this._parent;
|
|
58
58
|
},
|
|
59
|
-
enumerable:
|
|
59
|
+
enumerable: false,
|
|
60
60
|
configurable: true
|
|
61
61
|
});
|
|
62
62
|
PropertyInfo.prototype.addAttributeRule = function (rule) {
|
|
@@ -70,7 +70,7 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
70
70
|
var propertyKey = _b[_i];
|
|
71
71
|
clone[propertyKey] = this[propertyKey];
|
|
72
72
|
}
|
|
73
|
-
(_a = clone.rules).splice.apply(_a,
|
|
73
|
+
(_a = clone.rules).splice.apply(_a, __spreadArray([0, clone.rules.length], clone.attributeRules, false));
|
|
74
74
|
clone._parent = this;
|
|
75
75
|
return clone;
|
|
76
76
|
};
|
|
@@ -98,7 +98,7 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
enumerable:
|
|
101
|
+
enumerable: false,
|
|
102
102
|
configurable: true
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(PropertyInfo.prototype, "typeWithAssert", {
|
|
@@ -109,11 +109,11 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
109
109
|
get: function () {
|
|
110
110
|
var type = this.type;
|
|
111
111
|
if (!type) {
|
|
112
|
-
throw this.propertyName
|
|
112
|
+
throw "".concat(this.propertyName, " has no property type defined. Make sure it is decorated with @Attributes.ChildObject.");
|
|
113
113
|
}
|
|
114
114
|
return type;
|
|
115
115
|
},
|
|
116
|
-
enumerable:
|
|
116
|
+
enumerable: false,
|
|
117
117
|
configurable: true
|
|
118
118
|
});
|
|
119
119
|
PropertyInfo.prototype.createValueInstance = function () {
|
|
@@ -121,7 +121,7 @@ var PropertyInfo = /** @class */ (function () {
|
|
|
121
121
|
return new this.typeWithAssert();
|
|
122
122
|
}
|
|
123
123
|
catch (error) {
|
|
124
|
-
throw "Cannot create instance of property "
|
|
124
|
+
throw "Cannot create instance of property ".concat(this.propertyName, ": ").concat(error);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
PropertyInfo.prototype.setupFromInstance = function (instance) {
|
|
@@ -20,14 +20,14 @@ var PropertyInstance = /** @class */ (function () {
|
|
|
20
20
|
set: function (newVal) {
|
|
21
21
|
this.attachedTo[this.propertyName] = newVal;
|
|
22
22
|
},
|
|
23
|
-
enumerable:
|
|
23
|
+
enumerable: false,
|
|
24
24
|
configurable: true
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(PropertyInstance.prototype, "uniqueID", {
|
|
27
27
|
get: function () {
|
|
28
28
|
return (this.attachedTo ? (this.attachedTo.entityIdentifier + "!") : "") + this.propertyName;
|
|
29
29
|
},
|
|
30
|
-
enumerable:
|
|
30
|
+
enumerable: false,
|
|
31
31
|
configurable: true
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(PropertyInstance.prototype, "peek", {
|
|
@@ -40,7 +40,7 @@ var PropertyInstance = /** @class */ (function () {
|
|
|
40
40
|
return this.value;
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
44
44
|
configurable: true
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(PropertyInstance.prototype, "validator", {
|
|
@@ -55,7 +55,7 @@ var PropertyInstance = /** @class */ (function () {
|
|
|
55
55
|
}
|
|
56
56
|
return this._validator;
|
|
57
57
|
},
|
|
58
|
-
enumerable:
|
|
58
|
+
enumerable: false,
|
|
59
59
|
configurable: true
|
|
60
60
|
});
|
|
61
61
|
return PropertyInstance;
|
|
@@ -75,14 +75,14 @@ var PropertyAccessor = /** @class */ (function () {
|
|
|
75
75
|
get: function () {
|
|
76
76
|
return this.attachedTo[uniqueIdSymbol] + "!" + this.propertyName;
|
|
77
77
|
},
|
|
78
|
-
enumerable:
|
|
78
|
+
enumerable: false,
|
|
79
79
|
configurable: true
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(PropertyAccessor.prototype, "validator", {
|
|
82
82
|
get: function () {
|
|
83
83
|
return EmptyValidator;
|
|
84
84
|
},
|
|
85
|
-
enumerable:
|
|
85
|
+
enumerable: false,
|
|
86
86
|
configurable: true
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(PropertyAccessor.prototype, "value", {
|
|
@@ -92,14 +92,14 @@ var PropertyAccessor = /** @class */ (function () {
|
|
|
92
92
|
set: function (newVal) {
|
|
93
93
|
this.attachedTo[this.propertyName] = newVal;
|
|
94
94
|
},
|
|
95
|
-
enumerable:
|
|
95
|
+
enumerable: false,
|
|
96
96
|
configurable: true
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(PropertyAccessor.prototype, "peek", {
|
|
99
99
|
get: function () {
|
|
100
100
|
return this.attachedTo[this.propertyName];
|
|
101
101
|
},
|
|
102
|
-
enumerable:
|
|
102
|
+
enumerable: false,
|
|
103
103
|
configurable: true
|
|
104
104
|
});
|
|
105
105
|
PropertyAccessor.create = function (model, property) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Routing/IRoute.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Security/IUser.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,7 +34,7 @@ var NeoLoginErrorHandler = /** @class */ (function () {
|
|
|
34
34
|
NeoLoginErrorHandler.prototype.onAlreadyLoggedIn = function () {
|
|
35
35
|
var _this = this;
|
|
36
36
|
var userName = this.authenticationService.user.displayName;
|
|
37
|
-
var displayHtml = Utils.suppressHtmlEncode("<p>You are attempting to login, but are already logged in as "
|
|
37
|
+
var displayHtml = Utils.suppressHtmlEncode("<p>You are attempting to login, but are already logged in as ".concat(userName, ".</p><p>Do you want to continue as ").concat(userName, ", or logout?</p>"));
|
|
38
38
|
ModalUtils.showModal("Login", displayHtml, {
|
|
39
39
|
acceptButton: { text: "Continue", icon: "arrow-right", onClick: function () { return _this.redirectToHome(); } },
|
|
40
40
|
closeButton: { text: "Logout", icon: "sign-out-alt", onClick: function () { _this.authenticationService.beginSignOut(); } },
|
|
@@ -152,14 +152,14 @@ var OidcAuthService = /** @class */ (function () {
|
|
|
152
152
|
get: function () {
|
|
153
153
|
return this._user;
|
|
154
154
|
},
|
|
155
|
-
enumerable:
|
|
155
|
+
enumerable: false,
|
|
156
156
|
configurable: true
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(OidcAuthService.prototype, "isAuthenticated", {
|
|
159
159
|
get: function () {
|
|
160
160
|
return this.user !== null && !this.user.hasExpired;
|
|
161
161
|
},
|
|
162
|
-
enumerable:
|
|
162
|
+
enumerable: false,
|
|
163
163
|
configurable: true
|
|
164
164
|
});
|
|
165
165
|
OidcAuthService.createIdentityServerMetadata = function (identityServerUrl) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,21 +11,21 @@ var OidcUser = /** @class */ (function (_super) {
|
|
|
11
11
|
get: function () {
|
|
12
12
|
return this.userData.expired;
|
|
13
13
|
},
|
|
14
|
-
enumerable:
|
|
14
|
+
enumerable: false,
|
|
15
15
|
configurable: true
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(OidcUser.prototype, "authKey", {
|
|
18
18
|
get: function () {
|
|
19
19
|
return this.userData.token_type + " " + this.userData.access_token;
|
|
20
20
|
},
|
|
21
|
-
enumerable:
|
|
21
|
+
enumerable: false,
|
|
22
22
|
configurable: true
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(OidcUser.prototype, "accessToken", {
|
|
25
25
|
get: function () {
|
|
26
26
|
return this.userData.access_token;
|
|
27
27
|
},
|
|
28
|
-
enumerable:
|
|
28
|
+
enumerable: false,
|
|
29
29
|
configurable: true
|
|
30
30
|
});
|
|
31
31
|
return OidcUser;
|
|
@@ -10,14 +10,14 @@ var SecurityService = /** @class */ (function () {
|
|
|
10
10
|
get: function () {
|
|
11
11
|
return this.authentication.isAuthenticated;
|
|
12
12
|
},
|
|
13
|
-
enumerable:
|
|
13
|
+
enumerable: false,
|
|
14
14
|
configurable: true
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(SecurityService.prototype, "user", {
|
|
17
17
|
get: function () {
|
|
18
18
|
return this.authentication.user;
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
SecurityService.prototype.hasRole = function (roleName) {
|
package/dist/Security/User.js
CHANGED
|
@@ -9,14 +9,14 @@ var User = /** @class */ (function () {
|
|
|
9
9
|
get: function () {
|
|
10
10
|
return this.preferredUserName || this.name;
|
|
11
11
|
},
|
|
12
|
-
enumerable:
|
|
12
|
+
enumerable: false,
|
|
13
13
|
configurable: true
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(User.prototype, "displayName", {
|
|
16
16
|
get: function () {
|
|
17
17
|
return this.givenName;
|
|
18
18
|
},
|
|
19
|
-
enumerable:
|
|
19
|
+
enumerable: false,
|
|
20
20
|
configurable: true
|
|
21
21
|
});
|
|
22
22
|
return User;
|
package/dist/SignalR/HubBase.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __awaiter, __generator,
|
|
1
|
+
import { __awaiter, __generator, __spreadArray } from "tslib";
|
|
2
2
|
import * as signalR from '@microsoft/signalr';
|
|
3
3
|
import HubReceiver from "./HubReceiver";
|
|
4
4
|
import { AppServices, Misc, TaskRunner } from '../';
|
|
@@ -13,9 +13,9 @@ var HubBase = /** @class */ (function () {
|
|
|
13
13
|
* @param authenticationService Optional auth service if you don't want it to get from DI.
|
|
14
14
|
*/
|
|
15
15
|
function HubBase(url, options, configModel, authenticationService) {
|
|
16
|
-
var _this = this;
|
|
17
16
|
if (configModel === void 0) { configModel = Misc.Globals.appService.get(AppServices.NeoTypes.Config.ConfigModel); }
|
|
18
17
|
if (authenticationService === void 0) { authenticationService = Misc.Globals.appService.get(AppServices.NeoTypes.Security.AuthenticationService); }
|
|
18
|
+
var _this = this;
|
|
19
19
|
this.url = url;
|
|
20
20
|
this.authenticationService = authenticationService;
|
|
21
21
|
this.receivers = new Map();
|
|
@@ -58,7 +58,7 @@ var HubBase = /** @class */ (function () {
|
|
|
58
58
|
get: function () {
|
|
59
59
|
return this._connectionState.value;
|
|
60
60
|
},
|
|
61
|
-
enumerable:
|
|
61
|
+
enumerable: false,
|
|
62
62
|
configurable: true
|
|
63
63
|
});
|
|
64
64
|
HubBase.prototype.connect = function () {
|
|
@@ -130,7 +130,7 @@ var HubBase = /** @class */ (function () {
|
|
|
130
130
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
131
131
|
args[_i - 1] = arguments[_i];
|
|
132
132
|
}
|
|
133
|
-
return (_a = this.connection).invoke.apply(_a,
|
|
133
|
+
return (_a = this.connection).invoke.apply(_a, __spreadArray([methodName], args, false));
|
|
134
134
|
};
|
|
135
135
|
/**
|
|
136
136
|
* Invokes a method on the server hub, returning a promise.
|
|
@@ -144,7 +144,7 @@ var HubBase = /** @class */ (function () {
|
|
|
144
144
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
145
145
|
args[_i - 1] = arguments[_i];
|
|
146
146
|
}
|
|
147
|
-
return (_a = this.connection).send.apply(_a,
|
|
147
|
+
return (_a = this.connection).send.apply(_a, __spreadArray([methodName], args, false));
|
|
148
148
|
};
|
|
149
149
|
HubBase.prototype.registerReceiver = function (methodName) {
|
|
150
150
|
var _this = this;
|
package/dist/StringUtils.js
CHANGED
|
@@ -15,7 +15,7 @@ var StringUtils = /** @class */ (function () {
|
|
|
15
15
|
case 1: return words[0];
|
|
16
16
|
default:
|
|
17
17
|
var last2Words = words.slice(words.length - 2);
|
|
18
|
-
var joinWords = words.slice(0, words.length - 2).concat([last2Words[0]
|
|
18
|
+
var joinWords = words.slice(0, words.length - 2).concat(["".concat(last2Words[0], " and ").concat(last2Words[1])]);
|
|
19
19
|
return joinWords.join(", ");
|
|
20
20
|
}
|
|
21
21
|
};
|
package/dist/Utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __spreadArray } from "tslib";
|
|
2
2
|
import { DebounceHelper } from './DebounceHelper';
|
|
3
3
|
var lut = [];
|
|
4
4
|
for (var i = 0; i < 256; i++) {
|
|
@@ -71,16 +71,15 @@ var Utils = /** @class */ (function () {
|
|
|
71
71
|
* @param args Constructor args.
|
|
72
72
|
*/
|
|
73
73
|
Utils.createInstance = function (type) {
|
|
74
|
-
var _a;
|
|
75
74
|
var args = [];
|
|
76
75
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
77
76
|
args[_i - 1] = arguments[_i];
|
|
78
77
|
}
|
|
79
78
|
if (type.prototype.constructor.neo) {
|
|
80
|
-
return
|
|
79
|
+
return type.prototype.constructor.neo.createInstance(args);
|
|
81
80
|
}
|
|
82
81
|
else {
|
|
83
|
-
throw "Cannot instantiate '"
|
|
82
|
+
throw "Cannot instantiate '".concat(type.name, "' because it does not have an @NeoModel attribute.");
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
85
|
/**
|
|
@@ -175,7 +174,7 @@ var Utils = /** @class */ (function () {
|
|
|
175
174
|
var propertyKey = propertyNames_1[_a];
|
|
176
175
|
var value = plainObject[propertyKey];
|
|
177
176
|
if (value !== undefined && value !== null && value !== "") {
|
|
178
|
-
var name_1 = prefix ? prefix
|
|
177
|
+
var name_1 = prefix ? "".concat(prefix, ".").concat(propertyKey) : propertyKey;
|
|
179
178
|
var append = "";
|
|
180
179
|
if (value instanceof Date) {
|
|
181
180
|
value = value.toISOString();
|
|
@@ -183,19 +182,19 @@ var Utils = /** @class */ (function () {
|
|
|
183
182
|
else if (value instanceof Array && value.length) {
|
|
184
183
|
if (value[0] instanceof Date) {
|
|
185
184
|
for (var i_1 = 0; i_1 < value.length; i_1++) {
|
|
186
|
-
append += (i_1 === 0 ? "" : "&") + (name_1
|
|
185
|
+
append += (i_1 === 0 ? "" : "&") + "".concat(name_1, "=").concat(value[i_1].toISOString());
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
else if (value[0] instanceof Object) {
|
|
190
189
|
// Object arrays are in the form: sortColumns[0].columnName=Prop1&sortColumns[1].columnName=Prop4
|
|
191
190
|
for (var i_2 = 0; i_2 < value.length; i_2++) {
|
|
192
|
-
append += (i_2 === 0 ? "" : "&") + buildQueryString(value[i_2], name_1
|
|
191
|
+
append += (i_2 === 0 ? "" : "&") + buildQueryString(value[i_2], "".concat(name_1, "[").concat(i_2, "]"));
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
194
|
else {
|
|
196
195
|
// Plain arrays are in the form: values=1&values=2
|
|
197
196
|
for (var i_3 = 0; i_3 < value.length; i_3++) {
|
|
198
|
-
append += (i_3 === 0 ? "" : "&") + (name_1
|
|
197
|
+
append += (i_3 === 0 ? "" : "&") + "".concat(name_1, "=").concat(encodeURIComponent(value[i_3]));
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
}
|
|
@@ -212,7 +211,7 @@ var Utils = /** @class */ (function () {
|
|
|
212
211
|
}
|
|
213
212
|
return queryString;
|
|
214
213
|
}
|
|
215
|
-
return buildQueryString.apply(void 0,
|
|
214
|
+
return buildQueryString.apply(void 0, __spreadArray([plainObject, ""], properties, false));
|
|
216
215
|
};
|
|
217
216
|
return Utils;
|
|
218
217
|
}());
|
|
@@ -21,7 +21,7 @@ var ValidationDisplayInfo = /** @class */ (function () {
|
|
|
21
21
|
}
|
|
22
22
|
return "";
|
|
23
23
|
},
|
|
24
|
-
enumerable:
|
|
24
|
+
enumerable: false,
|
|
25
25
|
configurable: true
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(ValidationDisplayInfo.prototype, "editorClassName", {
|
|
@@ -31,7 +31,7 @@ var ValidationDisplayInfo = /** @class */ (function () {
|
|
|
31
31
|
}
|
|
32
32
|
return "";
|
|
33
33
|
},
|
|
34
|
-
enumerable:
|
|
34
|
+
enumerable: false,
|
|
35
35
|
configurable: true
|
|
36
36
|
});
|
|
37
37
|
ValidationDisplayInfo.prototype.applyToDom = function (elementProps, addTooltip) {
|