@singularsystems/neo-core 0.10.49 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -13
- 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.d.ts +5 -0
- package/dist/Components/ButtonOptions.js +1 -0
- package/dist/Components/ContextMenu/ContextMenu.js +1 -0
- package/dist/Components/DatePicker/DatePicker.js +2 -3
- package/dist/Components/ErrorHandler.d.ts +4 -1
- package/dist/Components/FileManager/FileManager.d.ts +6 -3
- package/dist/Components/FileManager/FileManager.js +32 -22
- 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.d.ts +2 -0
- 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/Decorators.d.ts +6 -0
- package/dist/Components/TaskRunner/Decorators.js +24 -0
- package/dist/Components/TaskRunner/ProgressState.js +1 -1
- package/dist/Components/TaskRunner/TaskRunner.d.ts +13 -4
- package/dist/Components/TaskRunner/TaskRunner.js +17 -11
- 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 +21 -11
- 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.d.ts +1 -5
- package/dist/Extensions.js +18 -21
- 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/EnumHelper.d.ts +7 -0
- package/dist/Model/EnumHelper.js +18 -3
- package/dist/Model/IAutoRunner.d.ts +1 -1
- package/dist/Model/IAutoRunner.js +1 -0
- package/dist/Model/IModelBase.d.ts +1 -1
- package/dist/Model/IModelBase.js +1 -0
- package/dist/Model/IModelCreatorBase.js +1 -0
- package/dist/Model/List.js +4 -4
- package/dist/Model/Misc.d.ts +5 -1
- package/dist/Model/ModelBase.d.ts +1 -1
- 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.js +9 -10
- 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 +8 -3
- 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 -8
- 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/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +18 -13
package/dist/Model/EnumHelper.js
CHANGED
|
@@ -50,18 +50,19 @@ var EnumHelper = /** @class */ (function () {
|
|
|
50
50
|
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
|
|
51
51
|
var key = keys_1[_i];
|
|
52
52
|
var id = enumObject[key];
|
|
53
|
-
var name_1 = void 0;
|
|
53
|
+
var name_1 = void 0, description = void 0;
|
|
54
54
|
var itemDescriptor = descriptorMap[id];
|
|
55
55
|
if (itemDescriptor) {
|
|
56
56
|
name_1 = itemDescriptor.display;
|
|
57
|
+
description = itemDescriptor.description;
|
|
57
58
|
}
|
|
58
59
|
else {
|
|
59
60
|
name_1 = key.readable();
|
|
60
61
|
}
|
|
61
|
-
items.push({ id: id, name: name_1, order: itemDescriptor && itemDescriptor.order !== undefined ? itemDescriptor.order : index });
|
|
62
|
+
items.push({ id: id, name: name_1, description: description, order: itemDescriptor && itemDescriptor.order !== undefined ? itemDescriptor.order : index });
|
|
62
63
|
index += 1;
|
|
63
64
|
}
|
|
64
|
-
return items.sortBy(function (c) { return c.order; }).map(function (item) { return ({ id: item.id, name: item.name }); });
|
|
65
|
+
return items.sortBy(function (c) { return c.order; }).map(function (item) { return ({ id: item.id, name: item.name, description: item.description }); });
|
|
65
66
|
};
|
|
66
67
|
/**
|
|
67
68
|
* Gets the metadata for an enum item.
|
|
@@ -80,6 +81,20 @@ var EnumHelper = /** @class */ (function () {
|
|
|
80
81
|
}
|
|
81
82
|
return itemDescriptor;
|
|
82
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Returns `true` if this item looks like an enum item.
|
|
86
|
+
*
|
|
87
|
+
* E.g. has an `id` and `name` property.
|
|
88
|
+
*/
|
|
89
|
+
EnumHelper.isEnumItem = function (item) {
|
|
90
|
+
if (typeof item === "object") {
|
|
91
|
+
var properties = Object.getOwnPropertyNames(item);
|
|
92
|
+
if (properties.length <= 3 && properties.some(function (c) { return c === "id"; }) && properties.some(function (c) { return c === "name"; })) {
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return false;
|
|
97
|
+
};
|
|
83
98
|
return EnumHelper;
|
|
84
99
|
}());
|
|
85
100
|
export { EnumHelper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IModelBase } from './IModelBase';
|
|
2
2
|
import { IAutoRunner, IAutoRunnerOptions } from './Misc';
|
|
3
3
|
export interface IAutoRunnerFactory {
|
|
4
|
-
create<T extends IModelBase>(model: T, callback: (model: T) => void, options?: IAutoRunnerOptions): IAutoRunner;
|
|
4
|
+
create<T extends IModelBase>(model: T, callback: (model: T) => void, options?: IAutoRunnerOptions<T>): IAutoRunner;
|
|
5
5
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -58,7 +58,7 @@ export interface INonObservableModelBase extends IBindableBase {
|
|
|
58
58
|
update(jsObject: any): void;
|
|
59
59
|
toQueryObject(): PlainFlatObject<this>;
|
|
60
60
|
toQueryObjectAuto(callback: (queryObject: PlainFlatObject<this>) => void, options?: IDebounceOptions): Misc.IAutoRunner;
|
|
61
|
-
onAnyPropertyChanged(callback: () => void, options?: Misc.IAutoRunnerOptions): Misc.IAutoRunner;
|
|
61
|
+
onAnyPropertyChanged(callback: () => void, options?: Misc.IAutoRunnerOptions<this>): Misc.IAutoRunner;
|
|
62
62
|
/** Icon to display next to toString() text. */
|
|
63
63
|
getIcon(): string;
|
|
64
64
|
}
|
package/dist/Model/IModelBase.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Model/List.js
CHANGED
|
@@ -15,7 +15,7 @@ var List = /** @class */ (function (_super) {
|
|
|
15
15
|
get: function () {
|
|
16
16
|
return this._deletedList.value;
|
|
17
17
|
},
|
|
18
|
-
enumerable:
|
|
18
|
+
enumerable: false,
|
|
19
19
|
configurable: true
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
@@ -59,7 +59,7 @@ var List = /** @class */ (function (_super) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
throw "Do not assign a plain array to a List property. Either call "
|
|
62
|
+
throw "Do not assign a plain array to a List property. Either call ".concat(propertyKey, ".set(...) or ").concat(propertyKey, ".update(...)");
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
} });
|
|
@@ -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
|
return List;
|
package/dist/Model/Misc.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export interface IAutoRunner extends IDisposable {
|
|
|
59
59
|
/** Cancels any pending callbacks. */
|
|
60
60
|
cancelPending(): void;
|
|
61
61
|
}
|
|
62
|
-
export interface IAutoRunnerOptions extends IDebounceOptions {
|
|
62
|
+
export interface IAutoRunnerOptions<T> extends IDebounceOptions {
|
|
63
63
|
/**
|
|
64
64
|
* True if child objects should be included in addition to value objects.
|
|
65
65
|
*/
|
|
@@ -70,6 +70,10 @@ export interface IAutoRunnerOptions extends IDebounceOptions {
|
|
|
70
70
|
* Removed items will still be observed, and items added to the list will not be observed.
|
|
71
71
|
*/
|
|
72
72
|
includeChildLists?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* If specified, only these properties will be observed.
|
|
75
|
+
*/
|
|
76
|
+
rootProperties?: (Extract<keyof T, string>)[];
|
|
73
77
|
}
|
|
74
78
|
export interface ISelectedItem {
|
|
75
79
|
id: number | string;
|
|
@@ -58,7 +58,7 @@ export default abstract class ModelBase extends BindableBase implements IModelBa
|
|
|
58
58
|
* This is delayed for string and numeric properties.
|
|
59
59
|
* You must call the disposer when you are done with this object.
|
|
60
60
|
*/
|
|
61
|
-
onAnyPropertyChanged(callback: () => void, options?: Misc.IAutoRunnerOptions): Misc.IAutoRunner;
|
|
61
|
+
onAnyPropertyChanged(callback: () => void, options?: Misc.IAutoRunnerOptions<this>): Misc.IAutoRunner;
|
|
62
62
|
/**
|
|
63
63
|
* Converts a plain javascript object graph to a neo model graph.
|
|
64
64
|
* Updates child lists - Items in the child list, but not in jsArray will remain in the 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
|
}
|
|
@@ -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';
|
|
@@ -32,14 +32,14 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
32
32
|
get: function () {
|
|
33
33
|
return this._inheritsBindableBase;
|
|
34
34
|
},
|
|
35
|
-
enumerable:
|
|
35
|
+
enumerable: false,
|
|
36
36
|
configurable: true
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(NeoTypeInfo.prototype, "inheritsModelBase", {
|
|
39
39
|
get: function () {
|
|
40
40
|
return this._inheritsModelBase;
|
|
41
41
|
},
|
|
42
|
-
enumerable:
|
|
42
|
+
enumerable: false,
|
|
43
43
|
configurable: true
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(NeoTypeInfo.prototype, "metaItem", {
|
|
@@ -50,7 +50,7 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
50
50
|
}
|
|
51
51
|
return this._metaItem;
|
|
52
52
|
},
|
|
53
|
-
enumerable:
|
|
53
|
+
enumerable: false,
|
|
54
54
|
configurable: true
|
|
55
55
|
});
|
|
56
56
|
NeoTypeInfo.prototype.initialise = function (objectConstructor) {
|
|
@@ -115,7 +115,7 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
115
115
|
var validationRules = new ValidationRules();
|
|
116
116
|
instance.addBusinessRules(validationRules);
|
|
117
117
|
if (validationRules.rules.some(function (c) { return c instanceof CallbackRule && c.hasBoundFunction; })) {
|
|
118
|
-
console.error("Warning: "
|
|
118
|
+
console.error("Warning: ".concat(this.objectConstructor.name, " has rules which have been added using a bound function, or arrow function."));
|
|
119
119
|
}
|
|
120
120
|
var modelProxy = new ModelProxy(instance);
|
|
121
121
|
for (var _i = 0, _a = validationRules.rules; _i < _a.length; _i++) {
|
|
@@ -169,10 +169,9 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
169
169
|
};
|
|
170
170
|
/** Gets the override constructor which can setup a neo model. */
|
|
171
171
|
NeoTypeInfo.prototype.getOverrideConstructor = function () {
|
|
172
|
-
var _a;
|
|
173
172
|
var self = this;
|
|
174
173
|
var baseType = Object.getPrototypeOf(self.objectConstructor);
|
|
175
|
-
if ((
|
|
174
|
+
if ((baseType === null || baseType === void 0 ? void 0 : baseType.name) === "neoConstructor") {
|
|
176
175
|
return function () {
|
|
177
176
|
throw Error(self.objectConstructor.name + " cannot inherit from a model decorated with @NeoModel.");
|
|
178
177
|
};
|
|
@@ -183,14 +182,14 @@ var NeoTypeInfo = /** @class */ (function () {
|
|
|
183
182
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
184
183
|
args[_i] = arguments[_i];
|
|
185
184
|
}
|
|
186
|
-
var instance = new ((_a = self.objectConstructor).bind.apply(_a,
|
|
185
|
+
var instance = new ((_a = self.objectConstructor).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
187
186
|
return self.makeObservable(instance);
|
|
188
187
|
};
|
|
189
188
|
// Copy statics from the original constructor, and all base classes to the new constructor.
|
|
190
189
|
baseType = this.objectConstructor;
|
|
191
190
|
while (baseType && baseType !== Function.prototype) {
|
|
192
|
-
for (var _i = 0,
|
|
193
|
-
var propertyName =
|
|
191
|
+
for (var _i = 0, _a = Object.getOwnPropertyNames(baseType); _i < _a.length; _i++) {
|
|
192
|
+
var propertyName = _a[_i];
|
|
194
193
|
if (propertyName !== "prototype" && propertyName !== "caller" && propertyName !== "arguments" && propertyName !== "neo") {
|
|
195
194
|
if (newConstructor[propertyName] === undefined) {
|
|
196
195
|
var descriptor = Object.getOwnPropertyDescriptor(baseType, propertyName);
|
|
@@ -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(); } },
|
|
@@ -127,7 +127,12 @@ var OidcAuthService = /** @class */ (function () {
|
|
|
127
127
|
this.setUser(null);
|
|
128
128
|
};
|
|
129
129
|
OidcAuthService.prototype.setUser = function (user) {
|
|
130
|
-
|
|
130
|
+
if (user) {
|
|
131
|
+
this.axios.defaults.headers.common['Authorization'] = user.authKey;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
delete this.axios.defaults.headers.common['Authorization'];
|
|
135
|
+
}
|
|
131
136
|
this._user = user;
|
|
132
137
|
};
|
|
133
138
|
OidcAuthService.prototype.signinSilent = function () {
|
|
@@ -152,14 +157,14 @@ var OidcAuthService = /** @class */ (function () {
|
|
|
152
157
|
get: function () {
|
|
153
158
|
return this._user;
|
|
154
159
|
},
|
|
155
|
-
enumerable:
|
|
160
|
+
enumerable: false,
|
|
156
161
|
configurable: true
|
|
157
162
|
});
|
|
158
163
|
Object.defineProperty(OidcAuthService.prototype, "isAuthenticated", {
|
|
159
164
|
get: function () {
|
|
160
165
|
return this.user !== null && !this.user.hasExpired;
|
|
161
166
|
},
|
|
162
|
-
enumerable:
|
|
167
|
+
enumerable: false,
|
|
163
168
|
configurable: true
|
|
164
169
|
});
|
|
165
170
|
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
|
};
|