@singularsystems/neo-core 0.10.46 → 0.10.49

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 (300) hide show
  1. package/dist/ApiClient/ApiClientBase.js +0 -1
  2. package/dist/ApiClient/ReadApiClient.d.ts +1 -1
  3. package/dist/ApiClient/ReadApiClient.js +0 -1
  4. package/dist/ApiClient/UpdateableApiClient.js +0 -1
  5. package/dist/AppServices/AppService.js +0 -1
  6. package/dist/AppServices/Config/ConfigModel.js +0 -1
  7. package/dist/AppServices/Config/ConfigService.js +0 -1
  8. package/dist/AppServices/Module.js +0 -1
  9. package/dist/AppServices/NeoContainer.js +0 -1
  10. package/dist/AppServices/NeoModule.js +0 -1
  11. package/dist/AppServices/NeoTypes.d.ts +4 -0
  12. package/dist/AppServices/NeoTypes.js +3 -1
  13. package/dist/AppServices/ServiceIdentifier.js +0 -1
  14. package/dist/AppServices/index.js +0 -1
  15. package/dist/Components/AnimationHelper.js +0 -1
  16. package/dist/Components/BootstrapHelpers.js +0 -1
  17. package/dist/Components/BootstrapTypes.js +0 -1
  18. package/dist/Components/ButtonOptions.js +0 -1
  19. package/dist/Components/ContextMenu/ContextMenu.js +0 -1
  20. package/dist/Components/ContextMenu/MenuUtils.js +0 -1
  21. package/dist/Components/DatePicker/DatePicker.js +0 -1
  22. package/dist/Components/DatePicker/DatePickerOptions.js +0 -1
  23. package/dist/Components/ErrorHandler.js +0 -1
  24. package/dist/Components/FileManager/BoundFileManager.js +0 -1
  25. package/dist/Components/FileManager/FileManager.js +0 -1
  26. package/dist/Components/FileManager/FileUploadBatch.js +0 -1
  27. package/dist/Components/FileManager/IFileManagerOptions.js +0 -1
  28. package/dist/Components/FormOptions.js +0 -1
  29. package/dist/Components/ICollapsableOptions.js +0 -1
  30. package/dist/Components/Modal/ModalHelper.d.ts +2 -0
  31. package/dist/Components/Modal/ModalHelper.js +21 -7
  32. package/dist/Components/Modal/ModalOptions.d.ts +2 -0
  33. package/dist/Components/Modal/ModalOptions.js +0 -1
  34. package/dist/Components/Modal/ModalStore.js +0 -1
  35. package/dist/Components/Modal/ModalUtils.js +0 -1
  36. package/dist/Components/Notifications/INotificationHelper.js +0 -1
  37. package/dist/Components/Notifications/Notification.js +0 -1
  38. package/dist/Components/Notifications/NotificationHelper.js +0 -1
  39. package/dist/Components/Notifications/NotificationStore.js +0 -1
  40. package/dist/Components/PositionHelper.js +0 -1
  41. package/dist/Components/TaskRunner/ProgressState.js +0 -1
  42. package/dist/Components/TaskRunner/TaskRunner.js +0 -1
  43. package/dist/Components/TooltipOptions.js +0 -1
  44. package/dist/Components/index.js +0 -1
  45. package/dist/ConnectionManager.js +0 -1
  46. package/dist/Data/ApiDataSource.js +0 -1
  47. package/dist/Data/AsyncDataSource.js +0 -1
  48. package/dist/Data/CacheService.js +0 -1
  49. package/dist/Data/DataCacheEntry.js +0 -1
  50. package/dist/Data/DataView.js +0 -1
  51. package/dist/Data/Deserialiser.js +9 -7
  52. package/dist/Data/Paging/PageManager.js +0 -1
  53. package/dist/Data/Paging/PageRequest.js +0 -1
  54. package/dist/Data/Paging/PageResult.js +0 -1
  55. package/dist/Data/Serialiser.js +3 -3
  56. package/dist/Data/SortOperation.js +0 -1
  57. package/dist/Data/StaticDataSource.js +0 -1
  58. package/dist/Data/WindowedDataView.js +0 -1
  59. package/dist/Data/index.js +0 -1
  60. package/dist/Dates/DateUtils.js +0 -1
  61. package/dist/Dates/TimeSpan.js +0 -1
  62. package/dist/DebounceHelper.d.ts +38 -0
  63. package/dist/DebounceHelper.js +95 -0
  64. package/dist/Extensions.js +0 -1
  65. package/dist/FileUtils.js +0 -1
  66. package/dist/Globals.d.ts +3 -0
  67. package/dist/Globals.js +11 -1
  68. package/dist/JsonSchema/ClassMetadata.js +0 -1
  69. package/dist/JsonSchema/JsonData.js +0 -1
  70. package/dist/JsonSchema/JsonSchemaTypes.js +0 -1
  71. package/dist/JsonSchema/PropertyMetadata.js +0 -1
  72. package/dist/JsonSchema/TypeCache.js +0 -1
  73. package/dist/JsonSchema/TypeMetadata.js +0 -1
  74. package/dist/JsonSchema/index.js +0 -1
  75. package/dist/Localisation/ILocalisationService.js +0 -1
  76. package/dist/Localisation/LocalisationService.js +0 -1
  77. package/dist/Localisation/index.js +0 -1
  78. package/dist/Misc.js +0 -1
  79. package/dist/Model/BaseModels/AuditValues.js +0 -1
  80. package/dist/Model/BaseModels/CriteriaBase.js +0 -1
  81. package/dist/Model/BaseModels/FileDescriptorBase.js +0 -1
  82. package/dist/Model/BaseModels/ReasonedUserEvent.js +0 -1
  83. package/dist/Model/BaseModels/UserEvent.js +0 -1
  84. package/dist/Model/BindableBase.js +0 -1
  85. package/dist/Model/Decorators.js +0 -1
  86. package/dist/Model/EnumHelper.js +0 -1
  87. package/dist/Model/IAutoRunner.js +0 -1
  88. package/dist/Model/IModelBase.js +0 -1
  89. package/dist/Model/IModelCreatorBase.js +0 -1
  90. package/dist/Model/List.js +0 -1
  91. package/dist/Model/LookupBase.js +0 -1
  92. package/dist/Model/Misc.js +0 -1
  93. package/dist/Model/ModelBase.js +0 -1
  94. package/dist/Model/ModelCreatorBase.js +0 -1
  95. package/dist/Model/ModelFieldInfo.js +0 -1
  96. package/dist/Model/ModelGraphTraverser.js +10 -6
  97. package/dist/Model/NeoModel.js +0 -1
  98. package/dist/Model/NeoTypeInfo.js +0 -1
  99. package/dist/Model/ObservableProperty.js +0 -1
  100. package/dist/Model/ObservableValue.js +0 -1
  101. package/dist/Model/PropertyInfo.js +2 -3
  102. package/dist/Model/PropertyInstance.js +0 -1
  103. package/dist/Model/ValueObject.js +0 -1
  104. package/dist/Model/index.js +0 -1
  105. package/dist/NumberUtils.js +3 -3
  106. package/dist/Routing/IMenuItemProvider.js +0 -1
  107. package/dist/Routing/IMenuRoute.js +0 -1
  108. package/dist/Routing/INavigationHelper.js +0 -1
  109. package/dist/Routing/IPageLeaveHandler.js +0 -1
  110. package/dist/Routing/IRoute.js +0 -1
  111. package/dist/Routing/IRouteSecurityService.js +0 -1
  112. package/dist/Routing/MenuItemProvider.js +0 -1
  113. package/dist/Routing/RouteSecurityService.js +0 -1
  114. package/dist/Routing/index.js +0 -1
  115. package/dist/Security/IAuthenticationService.js +0 -1
  116. package/dist/Security/IAuthorisationService.js +0 -1
  117. package/dist/Security/ILoginErrorHandler.js +0 -1
  118. package/dist/Security/ISecurityService.js +0 -1
  119. package/dist/Security/IUser.js +0 -1
  120. package/dist/Security/IUserRole.js +0 -1
  121. package/dist/Security/LoginErrorHandler.js +0 -1
  122. package/dist/Security/Oidc/OidcAuthService.js +0 -1
  123. package/dist/Security/Oidc/OidcTypes.js +0 -1
  124. package/dist/Security/Oidc/OidcUser.js +0 -1
  125. package/dist/Security/SecurityService.js +0 -1
  126. package/dist/Security/SignInResult.js +0 -1
  127. package/dist/Security/User.js +0 -1
  128. package/dist/Security/index.js +0 -1
  129. package/dist/Settings.js +0 -1
  130. package/dist/SignalR/HubBase.js +0 -1
  131. package/dist/SignalR/HubReceiver.js +0 -1
  132. package/dist/SignalR/HubSubscription.js +0 -1
  133. package/dist/SignalR/index.js +0 -1
  134. package/dist/StringUtils.js +0 -1
  135. package/dist/Utils.d.ts +3 -7
  136. package/dist/Utils.js +4 -18
  137. package/dist/Validation/Decorators.js +0 -1
  138. package/dist/Validation/DisplayHelper.js +0 -1
  139. package/dist/Validation/Misc.js +0 -1
  140. package/dist/Validation/ModelProxy.js +0 -1
  141. package/dist/Validation/RuleContext.js +0 -1
  142. package/dist/Validation/Rules.js +0 -1
  143. package/dist/Validation/ValidationHelpers.js +0 -1
  144. package/dist/Validation/ValidationRules.js +0 -1
  145. package/dist/Validation/ValidationState.js +0 -1
  146. package/dist/Validation/Validators/IModelValidator.js +0 -1
  147. package/dist/Validation/Validators/IPropertyValidator.js +0 -1
  148. package/dist/Validation/Validators/ModelValidator.js +0 -1
  149. package/dist/Validation/Validators/PropertyValidator.js +0 -1
  150. package/dist/Validation/Validators/RuleValidator.js +0 -1
  151. package/dist/Validation/index.js +0 -1
  152. package/dist/Views/IViewBase.js +0 -1
  153. package/dist/index.d.ts +2 -1
  154. package/dist/index.js +2 -2
  155. package/package.json +1 -1
  156. package/dist/ApiClient/ApiClientBase.js.map +0 -1
  157. package/dist/ApiClient/ReadApiClient.js.map +0 -1
  158. package/dist/ApiClient/UpdateableApiClient.js.map +0 -1
  159. package/dist/AppServices/AppService.js.map +0 -1
  160. package/dist/AppServices/Config/ConfigModel.js.map +0 -1
  161. package/dist/AppServices/Config/ConfigService.js.map +0 -1
  162. package/dist/AppServices/Module.js.map +0 -1
  163. package/dist/AppServices/NeoContainer.js.map +0 -1
  164. package/dist/AppServices/NeoModule.js.map +0 -1
  165. package/dist/AppServices/NeoTypes.js.map +0 -1
  166. package/dist/AppServices/ServiceIdentifier.js.map +0 -1
  167. package/dist/AppServices/index.js.map +0 -1
  168. package/dist/Components/AnimationHelper.js.map +0 -1
  169. package/dist/Components/BootstrapHelpers.js.map +0 -1
  170. package/dist/Components/BootstrapTypes.js.map +0 -1
  171. package/dist/Components/ButtonOptions.js.map +0 -1
  172. package/dist/Components/ContextMenu/ContextMenu.js.map +0 -1
  173. package/dist/Components/ContextMenu/MenuUtils.js.map +0 -1
  174. package/dist/Components/DatePicker/DatePicker.js.map +0 -1
  175. package/dist/Components/DatePicker/DatePickerOptions.js.map +0 -1
  176. package/dist/Components/ErrorHandler.js.map +0 -1
  177. package/dist/Components/FileManager/BoundFileManager.js.map +0 -1
  178. package/dist/Components/FileManager/FileManager.js.map +0 -1
  179. package/dist/Components/FileManager/FileUploadBatch.js.map +0 -1
  180. package/dist/Components/FileManager/IFileManagerOptions.js.map +0 -1
  181. package/dist/Components/FormOptions.js.map +0 -1
  182. package/dist/Components/ICollapsableOptions.js.map +0 -1
  183. package/dist/Components/Modal/ModalHelper.js.map +0 -1
  184. package/dist/Components/Modal/ModalOptions.js.map +0 -1
  185. package/dist/Components/Modal/ModalStore.js.map +0 -1
  186. package/dist/Components/Modal/ModalUtils.js.map +0 -1
  187. package/dist/Components/Notifications/INotificationHelper.js.map +0 -1
  188. package/dist/Components/Notifications/Notification.js.map +0 -1
  189. package/dist/Components/Notifications/NotificationHelper.js.map +0 -1
  190. package/dist/Components/Notifications/NotificationStore.js.map +0 -1
  191. package/dist/Components/PositionHelper.js.map +0 -1
  192. package/dist/Components/TaskRunner/ProgressState.js.map +0 -1
  193. package/dist/Components/TaskRunner/TaskRunner.js.map +0 -1
  194. package/dist/Components/TooltipOptions.js.map +0 -1
  195. package/dist/Components/index.js.map +0 -1
  196. package/dist/ConnectionManager.js.map +0 -1
  197. package/dist/Data/ApiDataSource.js.map +0 -1
  198. package/dist/Data/AsyncDataSource.js.map +0 -1
  199. package/dist/Data/CacheService.js.map +0 -1
  200. package/dist/Data/DataCacheEntry.js.map +0 -1
  201. package/dist/Data/DataView.js.map +0 -1
  202. package/dist/Data/Deserialiser.js.map +0 -1
  203. package/dist/Data/Paging/PageManager.js.map +0 -1
  204. package/dist/Data/Paging/PageRequest.js.map +0 -1
  205. package/dist/Data/Paging/PageResult.js.map +0 -1
  206. package/dist/Data/Serialiser.js.map +0 -1
  207. package/dist/Data/SortOperation.js.map +0 -1
  208. package/dist/Data/StaticDataSource.js.map +0 -1
  209. package/dist/Data/WindowedDataView.js.map +0 -1
  210. package/dist/Data/index.js.map +0 -1
  211. package/dist/Dates/DateUtils.js.map +0 -1
  212. package/dist/Dates/TimeSpan.js.map +0 -1
  213. package/dist/Extensions.js.map +0 -1
  214. package/dist/FileUtils.js.map +0 -1
  215. package/dist/Globals.js.map +0 -1
  216. package/dist/JsonSchema/ClassMetadata.js.map +0 -1
  217. package/dist/JsonSchema/JsonData.js.map +0 -1
  218. package/dist/JsonSchema/JsonSchemaTypes.js.map +0 -1
  219. package/dist/JsonSchema/PropertyMetadata.js.map +0 -1
  220. package/dist/JsonSchema/TypeCache.js.map +0 -1
  221. package/dist/JsonSchema/TypeMetadata.js.map +0 -1
  222. package/dist/JsonSchema/index.js.map +0 -1
  223. package/dist/Localisation/ILocalisationService.js.map +0 -1
  224. package/dist/Localisation/LocalisationService.js.map +0 -1
  225. package/dist/Localisation/index.js.map +0 -1
  226. package/dist/Misc.js.map +0 -1
  227. package/dist/Model/BaseModels/AuditValues.js.map +0 -1
  228. package/dist/Model/BaseModels/CriteriaBase.js.map +0 -1
  229. package/dist/Model/BaseModels/FileDescriptorBase.js.map +0 -1
  230. package/dist/Model/BaseModels/ReasonedUserEvent.js.map +0 -1
  231. package/dist/Model/BaseModels/UserEvent.js.map +0 -1
  232. package/dist/Model/BindableBase.js.map +0 -1
  233. package/dist/Model/Decorators.js.map +0 -1
  234. package/dist/Model/EnumHelper.js.map +0 -1
  235. package/dist/Model/IAutoRunner.js.map +0 -1
  236. package/dist/Model/IModelBase.js.map +0 -1
  237. package/dist/Model/IModelCreatorBase.js.map +0 -1
  238. package/dist/Model/List.js.map +0 -1
  239. package/dist/Model/LookupBase.js.map +0 -1
  240. package/dist/Model/Misc.js.map +0 -1
  241. package/dist/Model/ModelBase.js.map +0 -1
  242. package/dist/Model/ModelCreatorBase.js.map +0 -1
  243. package/dist/Model/ModelFieldInfo.js.map +0 -1
  244. package/dist/Model/ModelGraphTraverser.js.map +0 -1
  245. package/dist/Model/NeoModel.js.map +0 -1
  246. package/dist/Model/NeoTypeInfo.js.map +0 -1
  247. package/dist/Model/ObservableProperty.js.map +0 -1
  248. package/dist/Model/ObservableValue.js.map +0 -1
  249. package/dist/Model/PropertyInfo.js.map +0 -1
  250. package/dist/Model/PropertyInstance.js.map +0 -1
  251. package/dist/Model/ValueObject.js.map +0 -1
  252. package/dist/Model/index.js.map +0 -1
  253. package/dist/NumberUtils.js.map +0 -1
  254. package/dist/Routing/IMenuItemProvider.js.map +0 -1
  255. package/dist/Routing/IMenuRoute.js.map +0 -1
  256. package/dist/Routing/INavigationHelper.js.map +0 -1
  257. package/dist/Routing/IPageLeaveHandler.js.map +0 -1
  258. package/dist/Routing/IRoute.js.map +0 -1
  259. package/dist/Routing/IRouteSecurityService.js.map +0 -1
  260. package/dist/Routing/MenuItemProvider.js.map +0 -1
  261. package/dist/Routing/RouteSecurityService.js.map +0 -1
  262. package/dist/Routing/index.js.map +0 -1
  263. package/dist/Security/IAuthenticationService.js.map +0 -1
  264. package/dist/Security/IAuthorisationService.js.map +0 -1
  265. package/dist/Security/ILoginErrorHandler.js.map +0 -1
  266. package/dist/Security/ISecurityService.js.map +0 -1
  267. package/dist/Security/IUser.js.map +0 -1
  268. package/dist/Security/IUserRole.js.map +0 -1
  269. package/dist/Security/LoginErrorHandler.js.map +0 -1
  270. package/dist/Security/Oidc/OidcAuthService.js.map +0 -1
  271. package/dist/Security/Oidc/OidcTypes.js.map +0 -1
  272. package/dist/Security/Oidc/OidcUser.js.map +0 -1
  273. package/dist/Security/SecurityService.js.map +0 -1
  274. package/dist/Security/SignInResult.js.map +0 -1
  275. package/dist/Security/User.js.map +0 -1
  276. package/dist/Security/index.js.map +0 -1
  277. package/dist/Settings.js.map +0 -1
  278. package/dist/SignalR/HubBase.js.map +0 -1
  279. package/dist/SignalR/HubReceiver.js.map +0 -1
  280. package/dist/SignalR/HubSubscription.js.map +0 -1
  281. package/dist/SignalR/index.js.map +0 -1
  282. package/dist/StringUtils.js.map +0 -1
  283. package/dist/Utils.js.map +0 -1
  284. package/dist/Validation/Decorators.js.map +0 -1
  285. package/dist/Validation/DisplayHelper.js.map +0 -1
  286. package/dist/Validation/Misc.js.map +0 -1
  287. package/dist/Validation/ModelProxy.js.map +0 -1
  288. package/dist/Validation/RuleContext.js.map +0 -1
  289. package/dist/Validation/Rules.js.map +0 -1
  290. package/dist/Validation/ValidationHelpers.js.map +0 -1
  291. package/dist/Validation/ValidationRules.js.map +0 -1
  292. package/dist/Validation/ValidationState.js.map +0 -1
  293. package/dist/Validation/Validators/IModelValidator.js.map +0 -1
  294. package/dist/Validation/Validators/IPropertyValidator.js.map +0 -1
  295. package/dist/Validation/Validators/ModelValidator.js.map +0 -1
  296. package/dist/Validation/Validators/PropertyValidator.js.map +0 -1
  297. package/dist/Validation/Validators/RuleValidator.js.map +0 -1
  298. package/dist/Validation/index.js.map +0 -1
  299. package/dist/Views/IViewBase.js.map +0 -1
  300. package/dist/index.js.map +0 -1
@@ -0,0 +1,95 @@
1
+ import { __awaiter, __generator } from "tslib";
2
+ var stateSymbol = Symbol("neo.debounce.helper");
3
+ var DebounceHelper = /** @class */ (function () {
4
+ /**
5
+ * Creates a debounce helper instance.
6
+ * @param callback Callback function to run. All state passed to the execute method from current and previous calls will be passed to the callback.
7
+ * @param delayMs Delay in milliseconds.
8
+ */
9
+ function DebounceHelper(callback, delayMs) {
10
+ if (delayMs === void 0) { delayMs = 0; }
11
+ this.callback = callback;
12
+ this.delayMs = delayMs;
13
+ this.state = [];
14
+ }
15
+ /**
16
+ * Debounce a function so that it is only called after a period of inactivity.
17
+ * @param syncInstance The instance to synchronize against.
18
+ * This should always be the same object for the function you are debouncing.
19
+ * Do not debounce different functions on the same sync instance. Rather create a DebounceHelper instance for each function.
20
+ * @param fn Function to call when the delay has elapsed.
21
+ * @param delayMs Delay in milliseconds.
22
+ * @param state State to pass to debounced method as an array of values for each time debounce was called.
23
+ */
24
+ DebounceHelper.debounce = function (syncInstance, callback, delayMs, state) {
25
+ var helper = syncInstance[stateSymbol];
26
+ if (!helper) {
27
+ helper = new DebounceHelper(callback, delayMs);
28
+ syncInstance[stateSymbol] = helper;
29
+ }
30
+ helper.callback = callback;
31
+ helper.delayMs = delayMs;
32
+ return helper.execute(state);
33
+ };
34
+ /** Cancels pending execution of the callback. Any pending promises will be resolved with cancelled: true. */
35
+ DebounceHelper.cancelPending = function (syncInstance) {
36
+ var helper = syncInstance[stateSymbol];
37
+ if (helper) {
38
+ return helper.cancelPending();
39
+ }
40
+ else {
41
+ return [];
42
+ }
43
+ };
44
+ /**
45
+ * Waits the interval defined in the constructor, then executes the callback.
46
+ * The callback will not execute if execute is called again within the interval.
47
+ * @param state State to pass to the callback.
48
+ */
49
+ DebounceHelper.prototype.execute = function (state) {
50
+ var _this = this;
51
+ this.cancelPending();
52
+ if (state !== undefined)
53
+ this.state.push(state);
54
+ return new Promise(function (resolve, reject) {
55
+ _this.currentResolver = resolve;
56
+ _this.timer = setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
57
+ var returnValue, e_1;
58
+ return __generator(this, function (_a) {
59
+ switch (_a.label) {
60
+ case 0:
61
+ _a.trys.push([0, 2, 3, 4]);
62
+ return [4 /*yield*/, Promise.resolve(this.callback(this.state))];
63
+ case 1:
64
+ returnValue = _a.sent();
65
+ resolve({ cancelled: false, value: returnValue });
66
+ return [3 /*break*/, 4];
67
+ case 2:
68
+ e_1 = _a.sent();
69
+ reject(e_1);
70
+ return [3 /*break*/, 4];
71
+ case 3:
72
+ this.currentResolver = undefined;
73
+ this.state = [];
74
+ return [7 /*endfinally*/];
75
+ case 4: return [2 /*return*/];
76
+ }
77
+ });
78
+ }); }, _this.delayMs);
79
+ });
80
+ };
81
+ /** Cancels pending execution of the callback. Any pending promises will be resolved with cancelled: true. */
82
+ DebounceHelper.prototype.cancelPending = function () {
83
+ if (this.timer)
84
+ clearTimeout(this.timer);
85
+ var state = this.state;
86
+ if (this.currentResolver) {
87
+ this.currentResolver({ cancelled: true });
88
+ this.currentResolver = undefined;
89
+ this.state = [];
90
+ }
91
+ return state;
92
+ };
93
+ return DebounceHelper;
94
+ }());
95
+ export { DebounceHelper };
@@ -183,4 +183,3 @@ Map.prototype.getOrAdd = function (key, valueCallback) {
183
183
  }
184
184
  return value;
185
185
  };
186
- //# sourceMappingURL=Extensions.js.map
package/dist/FileUtils.js CHANGED
@@ -35,4 +35,3 @@ var FileUtils = /** @class */ (function () {
35
35
  return FileUtils;
36
36
  }());
37
37
  export default FileUtils;
38
- //# sourceMappingURL=FileUtils.js.map
package/dist/Globals.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { IAppService } from './AppServices/AppService';
2
+ import Decimal from 'decimal.js-light';
2
3
  export default class Globals {
3
4
  /** Global app service which hosts the DI container. */
4
5
  static appService: IAppService;
@@ -13,4 +14,6 @@ export default class Globals {
13
14
  * Use this for adding elements to the root level.
14
15
  */
15
16
  static get rootElement(): HTMLElement | ShadowRoot;
17
+ private static _decimalType;
18
+ static get decimalType(): typeof Decimal;
16
19
  }
package/dist/Globals.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { NeoTypes } from './AppServices';
1
2
  var Globals = /** @class */ (function () {
2
3
  function Globals() {
3
4
  }
@@ -25,7 +26,16 @@ var Globals = /** @class */ (function () {
25
26
  enumerable: true,
26
27
  configurable: true
27
28
  });
29
+ Object.defineProperty(Globals, "decimalType", {
30
+ get: function () {
31
+ if (this._decimalType === undefined) {
32
+ this._decimalType = this.appService.get(NeoTypes.Misc.DecimalType);
33
+ }
34
+ return this._decimalType;
35
+ },
36
+ enumerable: true,
37
+ configurable: true
38
+ });
28
39
  return Globals;
29
40
  }());
30
41
  export default Globals;
31
- //# sourceMappingURL=Globals.js.map
@@ -51,4 +51,3 @@ var ClassMetadata = /** @class */ (function () {
51
51
  return ClassMetadata;
52
52
  }());
53
53
  export { ClassMetadata };
54
- //# sourceMappingURL=ClassMetadata.js.map
@@ -95,4 +95,3 @@ var JsonDereferencer = /** @class */ (function () {
95
95
  };
96
96
  return JsonDereferencer;
97
97
  }());
98
- //# sourceMappingURL=JsonData.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=JsonSchemaTypes.js.map
@@ -6,4 +6,3 @@ var PropertyMetadata = /** @class */ (function () {
6
6
  return PropertyMetadata;
7
7
  }());
8
8
  export { PropertyMetadata };
9
- //# sourceMappingURL=PropertyMetadata.js.map
@@ -42,4 +42,3 @@ var TypeCache = /** @class */ (function () {
42
42
  return TypeCache;
43
43
  }());
44
44
  export { TypeCache };
45
- //# sourceMappingURL=TypeCache.js.map
@@ -168,4 +168,3 @@ var TypeMetadata = /** @class */ (function () {
168
168
  return TypeMetadata;
169
169
  }());
170
170
  export { TypeMetadata };
171
- //# sourceMappingURL=TypeMetadata.js.map
@@ -4,4 +4,3 @@ import { TypeCache } from './TypeCache';
4
4
  import { TypeMetadata } from './TypeMetadata';
5
5
  import { JsonDataWithSchema } from './JsonData';
6
6
  export { ClassMetadata, PropertyMetadata, TypeCache, TypeMetadata, JsonDataWithSchema };
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=ILocalisationService.js.map
@@ -15,4 +15,3 @@ var LocalisationService = /** @class */ (function () {
15
15
  return LocalisationService;
16
16
  }());
17
17
  export default LocalisationService;
18
- //# sourceMappingURL=LocalisationService.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
package/dist/Misc.js CHANGED
@@ -4,4 +4,3 @@ export { NumberFormat } from './NumberUtils';
4
4
  export { Settings } from './Settings';
5
5
  export { ErrorDisplayType } from './Components/ErrorHandler';
6
6
  export { ModalResult } from './Components/Modal/ModalUtils';
7
- //# sourceMappingURL=Misc.js.map
@@ -46,4 +46,3 @@ var AuditValues = /** @class */ (function (_super) {
46
46
  return AuditValues;
47
47
  }(AuditValuesBase));
48
48
  export { AuditValues };
49
- //# sourceMappingURL=AuditValues.js.map
@@ -32,4 +32,3 @@ var CriteriaBase = /** @class */ (function (_super) {
32
32
  return CriteriaBase;
33
33
  }(ValueObject));
34
34
  export { CriteriaBase };
35
- //# sourceMappingURL=CriteriaBase.js.map
@@ -20,4 +20,3 @@ var FileDescriptorBase = /** @class */ (function (_super) {
20
20
  return FileDescriptorBase;
21
21
  }(ModelBase));
22
22
  export { FileDescriptorBase };
23
- //# sourceMappingURL=FileDescriptorBase.js.map
@@ -17,4 +17,3 @@ var ReasonedUserEvent = /** @class */ (function (_super) {
17
17
  return ReasonedUserEvent;
18
18
  }(UserEventBase));
19
19
  export { ReasonedUserEvent };
20
- //# sourceMappingURL=ReasonedUserEvent.js.map
@@ -30,4 +30,3 @@ var UserEvent = /** @class */ (function (_super) {
30
30
  return UserEvent;
31
31
  }(UserEventBase));
32
32
  export { UserEvent };
33
- //# sourceMappingURL=UserEvent.js.map
@@ -74,4 +74,3 @@ var BindableBase = /** @class */ (function () {
74
74
  return BindableBase;
75
75
  }());
76
76
  export { BindableBase };
77
- //# sourceMappingURL=BindableBase.js.map
@@ -175,4 +175,3 @@ export function DisplayMember() {
175
175
  type.constructor.neo.displayMember = pi;
176
176
  };
177
177
  }
178
- //# sourceMappingURL=Decorators.js.map
@@ -83,4 +83,3 @@ var EnumHelper = /** @class */ (function () {
83
83
  return EnumHelper;
84
84
  }());
85
85
  export { EnumHelper };
86
- //# sourceMappingURL=EnumHelper.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IAutoRunner.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IModelBase.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IModelCreatorBase.js.map
@@ -214,4 +214,3 @@ var List = /** @class */ (function (_super) {
214
214
  return List;
215
215
  }(Array));
216
216
  export default List;
217
- //# sourceMappingURL=List.js.map
@@ -8,4 +8,3 @@ var LookupBase = /** @class */ (function (_super) {
8
8
  return LookupBase;
9
9
  }(BindableBase));
10
10
  export { LookupBase };
11
- //# sourceMappingURL=LookupBase.js.map
@@ -57,4 +57,3 @@ export var TrackingState;
57
57
  TrackingState[TrackingState["Modified"] = 2] = "Modified";
58
58
  TrackingState[TrackingState["Deleted"] = 3] = "Deleted";
59
59
  })(TrackingState || (TrackingState = {}));
60
- //# sourceMappingURL=Misc.js.map
@@ -178,4 +178,3 @@ var ModelBase = /** @class */ (function (_super) {
178
178
  return ModelBase;
179
179
  }(BindableBase));
180
180
  export default ModelBase;
181
- //# sourceMappingURL=ModelBase.js.map
@@ -90,4 +90,3 @@ var ModelCreatorBase = /** @class */ (function () {
90
90
  return ModelCreatorBase;
91
91
  }());
92
92
  export { ModelCreatorBase };
93
- //# sourceMappingURL=ModelCreatorBase.js.map
@@ -24,4 +24,3 @@ var ModelFieldInfo = /** @class */ (function (_super) {
24
24
  return ModelFieldInfo;
25
25
  }(ValueObject));
26
26
  export { ModelFieldInfo };
27
- //# sourceMappingURL=ModelFieldInfo.js.map
@@ -80,11 +80,16 @@ function invokeOnSelfAndChildren(model, state, callback, listCallback, relationT
80
80
  return state;
81
81
  }
82
82
  else {
83
- var child = model[cpi.propertyName];
84
- if (child) {
85
- state.pushState();
86
- invokeOnSelfAndChildren(child, state, callback, listCallback, cpi.relationType);
87
- state.popState();
83
+ try {
84
+ var child = model[cpi.propertyName];
85
+ if (child) {
86
+ state.pushState();
87
+ invokeOnSelfAndChildren(child, state, callback, listCallback, cpi.relationType);
88
+ state.popState();
89
+ }
90
+ }
91
+ catch (error) {
92
+ throw "Error on property '" + cpi.propertyName + "' on type '" + model.constructor.name + "': " + error;
88
93
  }
89
94
  }
90
95
  }
@@ -92,4 +97,3 @@ function invokeOnSelfAndChildren(model, state, callback, listCallback, relationT
92
97
  }
93
98
  return state;
94
99
  }
95
- //# sourceMappingURL=ModelGraphTraverser.js.map
@@ -11,4 +11,3 @@ export default function NeoModel(target) {
11
11
  var newConstructor = ctor.neo.getOverrideConstructor();
12
12
  return newConstructor;
13
13
  }
14
- //# sourceMappingURL=NeoModel.js.map
@@ -249,4 +249,3 @@ function populateMetaItem(item, level) {
249
249
  }
250
250
  }
251
251
  }
252
- //# sourceMappingURL=NeoTypeInfo.js.map
@@ -39,4 +39,3 @@ var ObservableProperty = /** @class */ (function () {
39
39
  return ObservableProperty;
40
40
  }());
41
41
  export { ObservableProperty };
42
- //# sourceMappingURL=ObservableProperty.js.map
@@ -24,4 +24,3 @@ var ObservableValue = /** @class */ (function () {
24
24
  return ObservableValue;
25
25
  }());
26
26
  export { ObservableValue };
27
- //# sourceMappingURL=ObservableValue.js.map
@@ -1,6 +1,6 @@
1
1
  import { __spreadArrays } from "tslib";
2
2
  import { SerialiseType, RelationType, DataType } from './Misc';
3
- import Decimal from 'decimal.js-light';
3
+ import Globals from '../Globals';
4
4
  var PropertyInfo = /** @class */ (function () {
5
5
  function PropertyInfo(propertyName) {
6
6
  this.propertyName = propertyName;
@@ -127,7 +127,7 @@ var PropertyInfo = /** @class */ (function () {
127
127
  PropertyInfo.prototype.setupFromInstance = function (instance) {
128
128
  var value = instance[this.propertyName];
129
129
  if (value) {
130
- if (value instanceof Decimal) {
130
+ if (value instanceof Globals.decimalType) {
131
131
  this.propertyType = DataType.Decimal;
132
132
  }
133
133
  }
@@ -135,4 +135,3 @@ var PropertyInfo = /** @class */ (function () {
135
135
  return PropertyInfo;
136
136
  }());
137
137
  export default PropertyInfo;
138
- //# sourceMappingURL=PropertyInfo.js.map
@@ -111,4 +111,3 @@ var PropertyAccessor = /** @class */ (function () {
111
111
  return PropertyAccessor;
112
112
  }());
113
113
  export { PropertyAccessor };
114
- //# sourceMappingURL=PropertyInstance.js.map
@@ -8,4 +8,3 @@ var ValueObject = /** @class */ (function (_super) {
8
8
  return ValueObject;
9
9
  }(ModelBase));
10
10
  export default ValueObject;
11
- //# sourceMappingURL=ValueObject.js.map
@@ -10,4 +10,3 @@ export { FileDescriptorBase } from './BaseModels/FileDescriptorBase';
10
10
  export { ReasonedUserEvent } from './BaseModels/ReasonedUserEvent';
11
11
  export { UserEventBase, UserEvent } from './BaseModels/UserEvent';
12
12
  export { CriteriaBase } from './BaseModels/CriteriaBase';
13
- //# sourceMappingURL=index.js.map
@@ -1,5 +1,6 @@
1
1
  import Decimal from "decimal.js-light";
2
2
  import { DataType } from "./Model/Misc";
3
+ import Globals from './Globals';
3
4
  export var NumberFormat;
4
5
  (function (NumberFormat) {
5
6
  // Mask is [Thousands Seperator, Decimals (2 places), Percent, Currency Symbol]
@@ -52,7 +53,7 @@ var NumberUtils = /** @class */ (function () {
52
53
  var parts = formatString.split(";");
53
54
  var part = number > 0 || parts.length == 1 ? parts[0] : parts[1];
54
55
  var decimals = Math.max(0, NumberUtils.getDecimals(part, part.indexOf("%") >= 0 || hasExternalPercentSymbol).length - 1);
55
- if (number instanceof Decimal) {
56
+ if (number instanceof Globals.decimalType) {
56
57
  // Round away from zero.
57
58
  return number.toDecimalPlaces(decimals, Decimal.ROUND_HALF_UP);
58
59
  }
@@ -77,7 +78,7 @@ var NumberUtils = /** @class */ (function () {
77
78
  return "" + (isPercent ? ".##" : "");
78
79
  };
79
80
  NumberUtils.format = function (number, format, currencySymbol) {
80
- if (number instanceof Decimal) {
81
+ if (number instanceof Globals.decimalType) {
81
82
  number = number.toNumber();
82
83
  }
83
84
  if (number !== null && typeof number === "object") {
@@ -194,4 +195,3 @@ var NumberUtils = /** @class */ (function () {
194
195
  }());
195
196
  export default NumberUtils;
196
197
  NumberUtils.initialise();
197
- //# sourceMappingURL=NumberUtils.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IMenuItemProvider.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IMenuRoute.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=INavigationHelper.js.map
@@ -5,4 +5,3 @@ export var NavigateLocation;
5
5
  /** Navigating to another site / closing the browser. */
6
6
  NavigateLocation[NavigateLocation["External"] = 1] = "External";
7
7
  })(NavigateLocation || (NavigateLocation = {}));
8
- //# sourceMappingURL=IPageLeaveHandler.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IRoute.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IRouteSecurityService.js.map
@@ -52,4 +52,3 @@ var MenuItemProvider = /** @class */ (function () {
52
52
  return MenuItemProvider;
53
53
  }());
54
54
  export { MenuItemProvider };
55
- //# sourceMappingURL=MenuItemProvider.js.map
@@ -34,4 +34,3 @@ var RouteSecurityService = /** @class */ (function () {
34
34
  return RouteSecurityService;
35
35
  }());
36
36
  export { RouteSecurityService };
37
- //# sourceMappingURL=RouteSecurityService.js.map
@@ -1,4 +1,3 @@
1
1
  export { MenuItemProvider } from './MenuItemProvider';
2
2
  export { NavigateLocation } from './IPageLeaveHandler';
3
3
  export { RouteSecurityService } from './RouteSecurityService';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IAuthenticationService.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IAuthorisationService.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=ILoginErrorHandler.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=ISecurityService.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IUser.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=IUserRole.js.map
@@ -96,4 +96,3 @@ var NeoLoginErrorHandler = /** @class */ (function () {
96
96
  return NeoLoginErrorHandler;
97
97
  }());
98
98
  export { NeoLoginErrorHandler };
99
- //# sourceMappingURL=LoginErrorHandler.js.map
@@ -182,4 +182,3 @@ var OidcAuthService = /** @class */ (function () {
182
182
  return OidcAuthService;
183
183
  }());
184
184
  export default OidcAuthService;
185
- //# sourceMappingURL=OidcAuthService.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=OidcTypes.js.map
@@ -31,4 +31,3 @@ var OidcUser = /** @class */ (function (_super) {
31
31
  return OidcUser;
32
32
  }(User));
33
33
  export default OidcUser;
34
- //# sourceMappingURL=OidcUser.js.map
@@ -32,4 +32,3 @@ var SecurityService = /** @class */ (function () {
32
32
  return SecurityService;
33
33
  }());
34
34
  export { SecurityService };
35
- //# sourceMappingURL=SecurityService.js.map
@@ -6,4 +6,3 @@ var SignInResult = /** @class */ (function () {
6
6
  return SignInResult;
7
7
  }());
8
8
  export { SignInResult };
9
- //# sourceMappingURL=SignInResult.js.map
@@ -22,4 +22,3 @@ var User = /** @class */ (function () {
22
22
  return User;
23
23
  }());
24
24
  export { User };
25
- //# sourceMappingURL=User.js.map
@@ -3,4 +3,3 @@ export { default as OidcAuthService } from './Oidc/OidcAuthService';
3
3
  export { User } from './User';
4
4
  export { default as OidcUser } from './Oidc/OidcUser';
5
5
  export { NeoLoginErrorHandler } from './LoginErrorHandler';
6
- //# sourceMappingURL=index.js.map
package/dist/Settings.js CHANGED
@@ -85,4 +85,3 @@ export var Settings = {
85
85
  /** Data types which must sort by descending when first sorted. */
86
86
  sortDescendingTypes: [DataType.Float, DataType.Int, DataType.Decimal]
87
87
  };
88
- //# sourceMappingURL=Settings.js.map
@@ -162,4 +162,3 @@ var HubBase = /** @class */ (function () {
162
162
  return HubBase;
163
163
  }());
164
164
  export { HubBase };
165
- //# sourceMappingURL=HubBase.js.map
@@ -23,4 +23,3 @@ var HubReceiver = /** @class */ (function () {
23
23
  return HubReceiver;
24
24
  }());
25
25
  export default HubReceiver;
26
- //# sourceMappingURL=HubReceiver.js.map
@@ -12,4 +12,3 @@ var HubSubscription = /** @class */ (function () {
12
12
  return HubSubscription;
13
13
  }());
14
14
  export default HubSubscription;
15
- //# sourceMappingURL=HubSubscription.js.map
@@ -1,2 +1 @@
1
1
  export { HubBase } from './HubBase';
2
- //# sourceMappingURL=index.js.map
@@ -22,4 +22,3 @@ var StringUtils = /** @class */ (function () {
22
22
  return StringUtils;
23
23
  }());
24
24
  export default StringUtils;
25
- //# sourceMappingURL=StringUtils.js.map
package/dist/Utils.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PartialPlainNonTrackedObject } from './Model/IModelBase';
2
+ import { IDebounceResult } from './DebounceHelper';
2
3
  export declare type Nullable<T> = T | null;
3
4
  export declare type Without<T, U> = {
4
5
  [P in Exclude<keyof T, keyof U>]?: never;
@@ -8,10 +9,6 @@ export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
8
9
  export declare type RemoveMethods<T> = Pick<T, {
9
10
  [P in keyof T]: T[P] extends Function ? never : P;
10
11
  }[keyof T]>;
11
- interface IDebounceState<T> {
12
- timer?: any;
13
- state: T[];
14
- }
15
12
  export declare class Utils {
16
13
  /**
17
14
  * Calls the supplied function once all computeds have been evaluated.
@@ -73,12 +70,11 @@ export declare class Utils {
73
70
  * @param delayMs Delay in milliseconds.
74
71
  * @param state State to pass to debounced method as an array of values for each time debounce was called.
75
72
  */
76
- static debounce<T = any>(syncInstance: any, fn: (state: T[]) => void, delayMs: number, state?: T): void;
77
- static clearDebounce(syncInstance: any): IDebounceState<any> | undefined;
73
+ static debounce<T = any, TState = any>(syncInstance: any, callback: (state: TState[]) => T | Promise<T>, delayMs: number, state?: TState): Promise<IDebounceResult<T>>;
74
+ static clearDebounce<TState = any>(syncInstance: any): TState[];
78
75
  /**
79
76
  * Gets a list of property values in query string format. Does not include the leading ?.
80
77
  * @param properties Optional list of property names to include in the query string.
81
78
  */
82
79
  static getQueryString<T extends PartialPlainNonTrackedObject<T>>(plainObject: T, ...properties: Array<(keyof T)>): string;
83
80
  }
84
- export {};