@singularsystems/neo-core 0.10.50 → 1.0.0-alpha.2

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.
Files changed (93) hide show
  1. package/README.md +7 -13
  2. package/dist/ApiClient/ReadApiClient.d.ts +1 -1
  3. package/dist/ApiClient/ReadApiClient.js +1 -1
  4. package/dist/ApiClient/UpdateableApiClient.js +4 -4
  5. package/dist/AppServices/Config/ConfigModel.js +1 -1
  6. package/dist/AppServices/Config/ConfigService.js +4 -4
  7. package/dist/AppServices/ServiceIdentifier.js +1 -1
  8. package/dist/Components/AnimationHelper.js +1 -1
  9. package/dist/Components/BootstrapTypes.js +1 -0
  10. package/dist/Components/ButtonOptions.js +1 -0
  11. package/dist/Components/ContextMenu/ContextMenu.js +1 -0
  12. package/dist/Components/DatePicker/DatePicker.js +2 -3
  13. package/dist/Components/ErrorHandler.d.ts +1 -1
  14. package/dist/Components/FileManager/FileManager.js +4 -4
  15. package/dist/Components/FileManager/FileUploadBatch.js +3 -3
  16. package/dist/Components/FileManager/IFileManagerOptions.js +1 -0
  17. package/dist/Components/FormOptions.js +1 -0
  18. package/dist/Components/ICollapsableOptions.js +1 -0
  19. package/dist/Components/Modal/ModalHelper.js +4 -4
  20. package/dist/Components/Modal/ModalOptions.d.ts +2 -0
  21. package/dist/Components/Modal/ModalOptions.js +1 -0
  22. package/dist/Components/Notifications/INotificationHelper.js +1 -0
  23. package/dist/Components/Notifications/NotificationHelper.js +1 -1
  24. package/dist/Components/TaskRunner/ProgressState.js +1 -1
  25. package/dist/Components/TaskRunner/TaskRunner.js +10 -11
  26. package/dist/Components/TooltipOptions.js +1 -0
  27. package/dist/Components/index.js +1 -0
  28. package/dist/ConnectionManager.js +2 -2
  29. package/dist/Data/ApiDataSource.js +2 -2
  30. package/dist/Data/AsyncDataSource.js +1 -1
  31. package/dist/Data/DataCacheEntry.js +3 -3
  32. package/dist/Data/DataView.d.ts +1 -10
  33. package/dist/Data/DataView.js +19 -19
  34. package/dist/Data/Deserialiser.js +4 -5
  35. package/dist/Data/Paging/PageManager.js +9 -9
  36. package/dist/Data/Serialiser.js +21 -11
  37. package/dist/Data/StaticDataSource.js +1 -1
  38. package/dist/Data/WindowedDataView.js +1 -1
  39. package/dist/Dates/DateUtils.js +3 -4
  40. package/dist/Dates/TimeSpan.js +4 -4
  41. package/dist/Extensions.d.ts +1 -5
  42. package/dist/Extensions.js +18 -21
  43. package/dist/Globals.js +5 -5
  44. package/dist/JsonSchema/JsonSchemaTypes.js +1 -0
  45. package/dist/JsonSchema/TypeCache.js +2 -2
  46. package/dist/JsonSchema/TypeMetadata.js +4 -4
  47. package/dist/Localisation/ILocalisationService.js +1 -0
  48. package/dist/Localisation/index.js +1 -0
  49. package/dist/Model/BaseModels/UserEvent.js +1 -1
  50. package/dist/Model/Decorators.d.ts +1 -1
  51. package/dist/Model/Decorators.js +1 -1
  52. package/dist/Model/IAutoRunner.js +1 -0
  53. package/dist/Model/IModelBase.js +1 -0
  54. package/dist/Model/IModelCreatorBase.js +1 -0
  55. package/dist/Model/List.d.ts +1 -1
  56. package/dist/Model/List.js +4 -22
  57. package/dist/Model/ModelBase.js +4 -4
  58. package/dist/Model/ModelCreatorBase.js +1 -1
  59. package/dist/Model/ModelGraphTraverser.js +1 -1
  60. package/dist/Model/NeoTypeInfo.js +9 -10
  61. package/dist/Model/ObservableValue.js +1 -1
  62. package/dist/Model/PropertyInfo.js +8 -8
  63. package/dist/Model/PropertyInstance.js +8 -8
  64. package/dist/Routing/IMenuItemProvider.js +1 -0
  65. package/dist/Routing/IMenuRoute.js +1 -0
  66. package/dist/Routing/INavigationHelper.js +1 -0
  67. package/dist/Routing/IRoute.js +1 -0
  68. package/dist/Routing/IRouteSecurityService.js +1 -0
  69. package/dist/Security/IAuthenticationService.js +1 -0
  70. package/dist/Security/IAuthorisationService.js +1 -0
  71. package/dist/Security/ILoginErrorHandler.js +1 -0
  72. package/dist/Security/ISecurityService.js +1 -0
  73. package/dist/Security/IUser.js +1 -0
  74. package/dist/Security/IUserRole.js +1 -0
  75. package/dist/Security/LoginErrorHandler.js +1 -1
  76. package/dist/Security/Oidc/OidcAuthService.js +8 -3
  77. package/dist/Security/Oidc/OidcTypes.js +1 -0
  78. package/dist/Security/Oidc/OidcUser.js +3 -3
  79. package/dist/Security/SecurityService.js +2 -2
  80. package/dist/Security/User.js +2 -2
  81. package/dist/SignalR/HubBase.js +5 -5
  82. package/dist/StringUtils.js +1 -1
  83. package/dist/Utils.js +8 -8
  84. package/dist/Validation/DisplayHelper.js +2 -2
  85. package/dist/Validation/RuleContext.js +2 -3
  86. package/dist/Validation/ValidationHelpers.js +1 -1
  87. package/dist/Validation/ValidationState.js +2 -2
  88. package/dist/Validation/Validators/IModelValidator.js +1 -0
  89. package/dist/Validation/Validators/ModelValidator.js +2 -2
  90. package/dist/Validation/Validators/PropertyValidator.js +2 -2
  91. package/dist/Validation/Validators/RuleValidator.js +2 -2
  92. package/dist/Views/IViewBase.js +1 -0
  93. package/package.json +18 -13
package/README.md CHANGED
@@ -12,20 +12,14 @@ To debug the tests, you need to add the following to .vscode\launch.json
12
12
  {
13
13
  "type": "node",
14
14
  "request": "launch",
15
- "name": "Jest Current File",
16
- "program": "${workspaceFolder}/node_modules/.bin/jest",
17
- "args": [
18
- "${fileBasenameNoExtension}",
19
- "--config",
20
- "jest.config.js"
21
- ],
15
+ "name": "debug tests",
16
+ "cwd": "${workspaceFolder}",
17
+ "runtimeExecutable": "yarn",
18
+ "runtimeArgs": ["run", "--inspect-brk", "test"],
19
+ "args": ["${fileBasename}"],
20
+ "stopOnEntry": true,
22
21
  "console": "integratedTerminal",
23
- "internalConsoleOptions": "neverOpen",
24
- "disableOptimisticBPs": true,
25
- "windows": {
26
- "program": "${workspaceFolder}/node_modules/jest/bin/jest",
27
- }
28
- }
22
+ }
29
23
  ]
30
24
  }
31
25
  ```
@@ -12,5 +12,5 @@ export declare class ReadApiClient<TModel, TKey extends string | number> extends
12
12
  /** Gets a list of entities */
13
13
  get(): AxiosPromise<PlainObject<TModel>[]>;
14
14
  /** Gets a single entity using the provided id. */
15
- getById(id: TKey): AxiosPromise<{ [P_1 in keyof Pick<TModel, Exclude<keyof TModel, "meta" | "update" | "entityIdentifier" | "isSelfDirty" | "isNew" | "isSelfValid" | "isValid" | "isDirty" | "readyToSave" | "isSuspended" | "validator" | "markOld" | "toJSObject" | "toQueryObject" | "toQueryObjectAuto" | "onAnyPropertyChanged" | "getIcon" | "set"> & { [P in keyof TModel]: TModel[P] extends Function ? never : P; }[keyof TModel]>]: Pick<TModel, Exclude<keyof TModel, "meta" | "update" | "entityIdentifier" | "isSelfDirty" | "isNew" | "isSelfValid" | "isValid" | "isDirty" | "readyToSave" | "isSuspended" | "validator" | "markOld" | "toJSObject" | "toQueryObject" | "toQueryObjectAuto" | "onAnyPropertyChanged" | "getIcon" | "set"> & { [P in keyof TModel]: TModel[P] extends Function ? never : P; }[keyof TModel]>[P_1] extends import("..").List<infer I> ? I[] : Pick<TModel, Exclude<keyof TModel, "meta" | "update" | "entityIdentifier" | "isSelfDirty" | "isNew" | "isSelfValid" | "isValid" | "isDirty" | "readyToSave" | "isSuspended" | "validator" | "markOld" | "toJSObject" | "toQueryObject" | "toQueryObjectAuto" | "onAnyPropertyChanged" | "getIcon" | "set"> & { [P in keyof TModel]: TModel[P] extends Function ? never : P; }[keyof TModel]>[P_1]; }>;
15
+ getById(id: TKey): AxiosPromise<PlainObject<TModel>>;
16
16
  }
@@ -17,7 +17,7 @@ var ReadApiClient = /** @class */ (function (_super) {
17
17
  };
18
18
  /** Gets a single entity using the provided id. */
19
19
  ReadApiClient.prototype.getById = function (id) {
20
- return this.axios.get(this.apiPath + "/" + id);
20
+ return this.axios.get("".concat(this.apiPath, "/").concat(id));
21
21
  };
22
22
  return ReadApiClient;
23
23
  }(ApiClientBase));
@@ -10,7 +10,7 @@ var UpdateableApiClient = /** @class */ (function (_super) {
10
10
  }
11
11
  /** Deletes an entity using the provided id. */
12
12
  UpdateableApiClient.prototype.delete = function (id) {
13
- return this.axios.delete(this.apiPath + "/" + id);
13
+ return this.axios.delete("".concat(this.apiPath, "/").concat(id));
14
14
  };
15
15
  /** Inserts the entity. */
16
16
  UpdateableApiClient.prototype.post = function (model) {
@@ -18,15 +18,15 @@ var UpdateableApiClient = /** @class */ (function (_super) {
18
18
  };
19
19
  /** Updates the entity */
20
20
  UpdateableApiClient.prototype.put = function (id, model) {
21
- return this.axios.put(this.apiPath + "/" + id, model);
21
+ return this.axios.put("".concat(this.apiPath, "/").concat(id), model);
22
22
  };
23
23
  /** Saves the entity, using it's tracking state to determine the operation. */
24
24
  UpdateableApiClient.prototype.save = function (model) {
25
- return this.axios.post(this.apiPath + "/Save", model);
25
+ return this.axios.post("".concat(this.apiPath, "/Save"), model);
26
26
  };
27
27
  /** Saves a list of entities, using each entities tracking state to determine the operation. */
28
28
  UpdateableApiClient.prototype.saveList = function (model) {
29
- return this.axios.post(this.apiPath + "/SaveList", model);
29
+ return this.axios.post("".concat(this.apiPath, "/SaveList"), model);
30
30
  };
31
31
  return UpdateableApiClient;
32
32
  }(ReadApiClient));
@@ -7,7 +7,7 @@ var ConfigModel = /** @class */ (function () {
7
7
  get: function () {
8
8
  return this.isDevelopment || this.isTest;
9
9
  },
10
- enumerable: true,
10
+ enumerable: false,
11
11
  configurable: true
12
12
  });
13
13
  ConfigModel.prototype.initialise = function () {
@@ -14,12 +14,12 @@ var ConfigService = /** @class */ (function () {
14
14
  case 0:
15
15
  baseTag = document.getElementsByTagName('base')[0];
16
16
  baseUrl = baseTag ? baseTag.getAttribute("href") || "" : "";
17
- path = (path !== null && path !== void 0 ? path : baseUrl + "/config.json");
17
+ path = path !== null && path !== void 0 ? path : "".concat(baseUrl, "/config.json");
18
18
  _a.label = 1;
19
19
  case 1:
20
20
  _a.trys.push([1, 3, , 4]);
21
21
  timestamp = new Date().getTime();
22
- return [4 /*yield*/, Axios.get(path + "?" + timestamp)];
22
+ return [4 /*yield*/, Axios.get("".concat(path, "?").concat(timestamp))];
23
23
  case 2:
24
24
  response = _a.sent();
25
25
  // The raw parsed json objects properties are copied into the config model.
@@ -30,7 +30,7 @@ var ConfigService = /** @class */ (function () {
30
30
  return [2 /*return*/, this.config];
31
31
  case 3:
32
32
  error_1 = _a.sent();
33
- throw new Error("ConfigService - Error loading configuration: " + error_1);
33
+ throw new Error("ConfigService - Error loading configuration: ".concat(error_1));
34
34
  case 4: return [2 /*return*/];
35
35
  }
36
36
  });
@@ -40,7 +40,7 @@ var ConfigService = /** @class */ (function () {
40
40
  get: function () {
41
41
  return process.env.NODE_ENV === "development";
42
42
  },
43
- enumerable: true,
43
+ enumerable: false,
44
44
  configurable: true
45
45
  });
46
46
  ConfigService = __decorate([
@@ -11,7 +11,7 @@ var ServiceIdentifier = /** @class */ (function () {
11
11
  if (symbol === void 0) { symbol = Symbol(name); }
12
12
  this.symbol = symbol;
13
13
  if (ServiceIdentifier.typeNames.has(name)) {
14
- console.error("Warning: Service type " + name + " has already been registered!");
14
+ console.error("Warning: Service type ".concat(name, " has already been registered!"));
15
15
  }
16
16
  else {
17
17
  ServiceIdentifier.typeNames.add(name);
@@ -117,7 +117,7 @@ var CollapseAnimationHelper = /** @class */ (function () {
117
117
  this.afterTransitionedDelegate = this.afterTransitioned.bind(this);
118
118
  element.addEventListener("transitionend", this.afterTransitionedDelegate);
119
119
  this.afterTransitioned();
120
- this.defaultOverflow = (_a = window.getComputedStyle(element).overflowY, (_a !== null && _a !== void 0 ? _a : "visible"));
120
+ this.defaultOverflow = (_a = window.getComputedStyle(element).overflowY) !== null && _a !== void 0 ? _a : "visible";
121
121
  }
122
122
  /** Restores the element to its normal height. */
123
123
  CollapseAnimationHelper.prototype.restore = function (force) {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -161,7 +161,6 @@ var DatePicker = /** @class */ (function () {
161
161
  * @param options New options.
162
162
  */
163
163
  DatePicker.prototype.update = function (options, bindProperty, isReadOnly) {
164
- var _a, _b;
165
164
  if (bindProperty && bindProperty !== this.bindProperty) {
166
165
  this.bindProperty = bindProperty;
167
166
  }
@@ -170,8 +169,8 @@ var DatePicker = /** @class */ (function () {
170
169
  }
171
170
  this.isReadOnly = isReadOnly;
172
171
  this.today = DateUtils.today();
173
- if (this.currentBindValue !== ((_a = bindProperty) === null || _a === void 0 ? void 0 : _a.value)) {
174
- this.currentBindValue = (_b = bindProperty) === null || _b === void 0 ? void 0 : _b.value;
172
+ if (this.currentBindValue !== (bindProperty === null || bindProperty === void 0 ? void 0 : bindProperty.value)) {
173
+ this.currentBindValue = bindProperty === null || bindProperty === void 0 ? void 0 : bindProperty.value;
175
174
  this.resetCurrentViewDate();
176
175
  if (this.options.alwaysShow) {
177
176
  if (!this.suspendLayout) {
@@ -47,7 +47,7 @@ export declare class ErrorHandler implements IErrorHandler {
47
47
  * @param body Body to include if the responses title is missing.
48
48
  * @param error Axios error.
49
49
  */
50
- parseAxiosError(header: string, body: string, error: AxiosError): IErrorDisplay;
50
+ parseAxiosError(header: string, body: string, error: AxiosError<any>): IErrorDisplay;
51
51
  protected getGeneralError(error: any): IErrorDisplay;
52
52
  protected displayError(displayType: ErrorDisplayType, error: any, errorDisplay: IErrorDisplay): void;
53
53
  protected displayModal(error: any, errorDisplay: IErrorDisplay): void;
@@ -23,7 +23,7 @@ var FileManagerBase = /** @class */ (function () {
23
23
  get: function () {
24
24
  return this.currentUploads.length > 0;
25
25
  },
26
- enumerable: true,
26
+ enumerable: false,
27
27
  configurable: true
28
28
  });
29
29
  Object.defineProperty(FileManagerBase.prototype, "uploadPercent", {
@@ -37,14 +37,14 @@ var FileManagerBase = /** @class */ (function () {
37
37
  }
38
38
  return totalSize === 0 ? 1 : (totalProgress / totalSize);
39
39
  },
40
- enumerable: true,
40
+ enumerable: false,
41
41
  configurable: true
42
42
  });
43
43
  Object.defineProperty(FileManagerBase.prototype, "uploadEndpoint", {
44
44
  get: function () {
45
45
  return this._uploadEndpoint;
46
46
  },
47
- enumerable: true,
47
+ enumerable: false,
48
48
  configurable: true
49
49
  });
50
50
  /**
@@ -116,8 +116,8 @@ var FileManagerBase = /** @class */ (function () {
116
116
  };
117
117
  FileManagerBase.prototype.uploadFiles = function (files, options) {
118
118
  var _this = this;
119
- if (options === void 0) { options = {}; }
120
119
  var _a;
120
+ if (options === void 0) { options = {}; }
121
121
  if (!this.uploadEndpoint) {
122
122
  throw Error("uploadFiles() can only be called if an uploadEndpoint has been specified.");
123
123
  }
@@ -15,7 +15,7 @@ var FileUploadBatch = /** @class */ (function () {
15
15
  get: function () {
16
16
  return this.files.reduce(function (p, c) { return p + c.size; }, 0);
17
17
  },
18
- enumerable: true,
18
+ enumerable: false,
19
19
  configurable: true
20
20
  });
21
21
  /**
@@ -26,7 +26,7 @@ var FileUploadBatch = /** @class */ (function () {
26
26
  * @param options Additional options.
27
27
  */
28
28
  FileUploadBatch.prototype.createRecords = function (recordType, fileDescriptorKey, fileDescriptorType, options) {
29
- options = (options !== null && options !== void 0 ? options : {});
29
+ options = options !== null && options !== void 0 ? options : {};
30
30
  var records = [];
31
31
  for (var _i = 0, _a = this.files; _i < _a.length; _i++) {
32
32
  var file = _a[_i];
@@ -59,7 +59,7 @@ var FileUploadBatch = /** @class */ (function () {
59
59
  }
60
60
  };
61
61
  FileUploadBatch.prototype.toString = function () {
62
- return this.files.length === 1 ? this.files[0].name : this.files.length + " files";
62
+ return this.files.length === 1 ? this.files[0].name : "".concat(this.files.length, " files");
63
63
  };
64
64
  __decorate([
65
65
  Observable(),
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -7,11 +7,11 @@ var ModalHelper = /** @class */ (function () {
7
7
  var _a;
8
8
  this.modals = [];
9
9
  this.rootClassName = "";
10
- this.rootClassName = (_a = props.className, (_a !== null && _a !== void 0 ? _a : ""));
10
+ this.rootClassName = (_a = props.className) !== null && _a !== void 0 ? _a : "";
11
11
  this.rootContainer = document.createElement("div");
12
12
  this.rootContainer.className = this.rootClassName;
13
13
  this.rootContainer.tabIndex = -1;
14
- ((container !== null && container !== void 0 ? container : Misc.Globals.rootElement)).appendChild(this.rootContainer);
14
+ (container !== null && container !== void 0 ? container : Misc.Globals.rootElement).appendChild(this.rootContainer);
15
15
  // Create the container for all the modals
16
16
  var modalsContainer = document.createElement("div");
17
17
  modalsContainer.className = "modal fade";
@@ -42,7 +42,7 @@ var ModalHelper = /** @class */ (function () {
42
42
  }
43
43
  return ModalHelper._instance;
44
44
  },
45
- enumerable: true,
45
+ enumerable: false,
46
46
  configurable: true
47
47
  });
48
48
  ModalHelper.initialise = function (props, container) {
@@ -52,7 +52,7 @@ var ModalHelper = /** @class */ (function () {
52
52
  };
53
53
  ModalHelper.prototype.updateProps = function (props) {
54
54
  var _a;
55
- this.rootClassName = (_a = props.className, (_a !== null && _a !== void 0 ? _a : ""));
55
+ this.rootClassName = (_a = props.className) !== null && _a !== void 0 ? _a : "";
56
56
  };
57
57
  ModalHelper.prototype.addModal = function (modal, options, onDismiss) {
58
58
  modal.className = "modal-container";
@@ -33,6 +33,7 @@ export default interface IModalOptions extends IModalOptionsBase {
33
33
  show: boolean;
34
34
  /** Callback to handle when the modal is closed by the user. This should cause show to become false. */
35
35
  onClose: (event: any) => void;
36
+ children: any;
36
37
  }
37
38
  export interface IModalOptionsAuto extends IModalOptionsBase {
38
39
  /**
@@ -43,6 +44,7 @@ export interface IModalOptionsAuto extends IModalOptionsBase {
43
44
  * null if it is non boolean.
44
45
  * If the value is an object, it will be used as the forms model. */
45
46
  bind: IPropertyInstance;
47
+ children: any;
46
48
  }
47
49
  export interface IModalOptionsModel extends IModalOptionsBase {
48
50
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -18,7 +18,7 @@ var NotificationHelper = /** @class */ (function () {
18
18
  }
19
19
  return this._store;
20
20
  },
21
- enumerable: true,
21
+ enumerable: false,
22
22
  configurable: true
23
23
  });
24
24
  /** Adds a notification using the primary style. See `add` for more details */
@@ -18,7 +18,7 @@ var ProgressState = /** @class */ (function () {
18
18
  this._progress = Math.max(0, Math.min(value, 1));
19
19
  this.stop();
20
20
  },
21
- enumerable: true,
21
+ enumerable: false,
22
22
  configurable: true
23
23
  });
24
24
  /**
@@ -25,7 +25,7 @@ var TaskRunnerOptions = /** @class */ (function () {
25
25
  get: function () {
26
26
  return this.taskRunner.progressState;
27
27
  },
28
- enumerable: true,
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 (_c) {
136
- switch (_c.label) {
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
137
136
  case 0:
138
137
  optionsNoDefault = __assign(__assign({}, options), { defaultReturnValue: undefined });
139
- _c.label = 1;
138
+ _a.label = 1;
140
139
  case 1:
141
- _c.trys.push([1, 3, , 4]);
140
+ _a.trys.push([1, 3, , 4]);
142
141
  return [4 /*yield*/, this.waitFor(task, optionsNoDefault)];
143
142
  case 2:
144
- result = _c.sent();
143
+ result = _a.sent();
145
144
  return [2 /*return*/, result.data];
146
145
  case 3:
147
- e_2 = _c.sent();
148
- if (((_a = options) === null || _a === void 0 ? void 0 : _a.defaultReturnValue) === undefined) {
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*/, (_b = options) === null || _b === void 0 ? void 0 : _b.defaultReturnValue];
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*/];
@@ -190,7 +189,7 @@ var TaskRunner = /** @class */ (function () {
190
189
  if (options.onError !== undefined) {
191
190
  var errorInfo = _this.errorHandler.parseError(e);
192
191
  options.onError(errorInfo);
193
- cancel = (_a = errorInfo.cancelDisplay, (_a !== null && _a !== void 0 ? _a : false));
192
+ cancel = (_a = errorInfo.cancelDisplay) !== null && _a !== void 0 ? _a : false;
194
193
  }
195
194
  if (!cancel && options.errorHandling !== ErrorDisplayType.ThrowError) {
196
195
  _this.errorHandler.showError(e, options.errorHandling);
@@ -0,0 +1 @@
1
+ export {};
@@ -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: true,
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: true,
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, (defaultData !== null && defaultData !== void 0 ? defaultData : [])) || 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, (defaultData !== null && defaultData !== void 0 ? defaultData : [])) || 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;
@@ -13,7 +13,7 @@ var AsyncDataSource = /** @class */ (function () {
13
13
  get: function () {
14
14
  return this.isLoading || !this.hasFetched;
15
15
  },
16
- enumerable: true,
16
+ enumerable: false,
17
17
  configurable: true
18
18
  });
19
19
  AsyncDataSource.prototype.executeFetchAsync = function () {
@@ -8,14 +8,14 @@ var DataCacheEntry = /** @class */ (function () {
8
8
  get: function () {
9
9
  return Date.now() >= this.expiryDate.getTime();
10
10
  },
11
- enumerable: true,
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: true,
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: true,
29
+ enumerable: false,
30
30
  configurable: true
31
31
  });
32
32
  /**
@@ -1,7 +1,6 @@
1
1
  import { IMetaItem } from '../Model/IModelBase';
2
2
  import { SortOperation } from './SortOperation';
3
3
  import PropertyInfo from '../Model/PropertyInfo';
4
- declare type sortValueFn = (c: any) => any;
5
4
  /** A DataView is a container of data with sorting and filtering capability. */
6
5
  export declare abstract class DataViewBase<T> {
7
6
  private originalSource;
@@ -36,17 +35,9 @@ export declare abstract class DataViewBase<T> {
36
35
  private getSortedItems;
37
36
  getItems(): T[];
38
37
  getMetaItem(): IMetaItem | null;
38
+ static unTrackedSort(callback: () => void): void;
39
39
  private static getDefaultSortValueFn;
40
40
  private static getSortValueSortFn;
41
- /**
42
- * Returns true if this object has observable properties. If so, frameworkSortFn will be used for sorting
43
- */
44
- static useFrameworkSortCompareFn: (item: any, propertyKey: string) => boolean;
45
- /**
46
- * Sort function provided by vue / react neo frameworks which know how to access raw field values.
47
- */
48
- static frameworkSortValueFn: sortValueFn;
49
41
  }
50
42
  export declare class DataView<T> extends DataViewBase<T> {
51
43
  }
52
- export {};
@@ -1,4 +1,4 @@
1
- import { __decorate, __extends, __metadata, __spreadArrays } from "tslib";
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 = __spreadArrays(this.sortInfo);
36
+ this.sortInfo = __spreadArray([], this.sortInfo, true);
37
37
  }
38
38
  else {
39
- this.sortInfo = __spreadArrays(this.sortInfo, [new SortOperation(property, (sortAscending !== null && sortAscending !== void 0 ? sortAscending : SortOperation.getDefaultSortAscending(property)))]);
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: true,
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: true,
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: true,
86
+ enumerable: false,
87
87
  configurable: true
88
88
  });
89
89
  DataViewBase.prototype.getSortedItems = function () {
@@ -95,8 +95,8 @@ var DataViewBase = /** @class */ (function () {
95
95
  else {
96
96
  var sortInfo = this.sortInfo;
97
97
  if (sortInfo && sortInfo.length) {
98
- var sortFns = [];
99
- var itemsToSort = filtered.filter(function (c) { return c[_this.noSortSymbol] === undefined; });
98
+ var sortFns_1 = [];
99
+ var itemsToSort_1 = filtered.filter(function (c) { return c[_this.noSortSymbol] === undefined; });
100
100
  var endItems = filtered.filter(function (c) { return c[_this.noSortSymbol] !== undefined; });
101
101
  for (var _i = 0, sortInfo_1 = sortInfo; _i < sortInfo_1.length; _i++) {
102
102
  var sortColumn = sortInfo_1[_i];
@@ -106,19 +106,16 @@ var DataViewBase = /** @class */ (function () {
106
106
  valueFn = DataViewBase.getSortValueSortFn(property.propertyName);
107
107
  }
108
108
  else {
109
- if (DataViewBase.useFrameworkSortCompareFn(filtered[0], property.propertyName)) {
110
- valueFn = DataViewBase.frameworkSortValueFn(property.propertyName);
111
- }
112
- else {
113
- valueFn = DataViewBase.getDefaultSortValueFn(property.propertyName);
114
- }
109
+ valueFn = DataViewBase.getDefaultSortValueFn(property.propertyName);
115
110
  }
116
- sortFns.push({ property: property, valueFn: valueFn, direction: sortColumn.sortAscending ? "asc" : "desc" });
111
+ sortFns_1.push({ property: property, valueFn: valueFn, direction: sortColumn.sortAscending ? "asc" : "desc" });
117
112
  }
118
- for (var i = sortFns.length - 1; i >= 0; i--) {
119
- itemsToSort.sortBy(sortFns[i].valueFn, sortFns[i].direction, sortFns[i].property.propertyType);
120
- }
121
- return __spreadArrays(itemsToSort, endItems);
113
+ DataViewBase.unTrackedSort(function () {
114
+ for (var i = sortFns_1.length - 1; i >= 0; i--) {
115
+ itemsToSort_1.sortBy(sortFns_1[i].valueFn, sortFns_1[i].direction, sortFns_1[i].property.propertyType);
116
+ }
117
+ });
118
+ return __spreadArray(__spreadArray([], itemsToSort_1, true), endItems, true);
122
119
  }
123
120
  return filtered;
124
121
  }
@@ -138,6 +135,9 @@ var DataViewBase = /** @class */ (function () {
138
135
  return null;
139
136
  }
140
137
  };
138
+ DataViewBase.unTrackedSort = function (callback) {
139
+ callback();
140
+ };
141
141
  DataViewBase.getDefaultSortValueFn = function (propertyName) {
142
142
  return function (c) { return c[propertyName]; };
143
143
  };
@@ -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 = (_a = neoTypeInfo) === null || _a === void 0 ? void 0 : _a.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. " + 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 '" + key + "' on type '" + typeName + "': " + error;
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: " + id + ".";
249
+ throw "Cannot find $id: ".concat(id, ".");
251
250
  }
252
251
  return found.to;
253
252
  };