@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.
Files changed (104) 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.d.ts +5 -0
  11. package/dist/Components/ButtonOptions.js +1 -0
  12. package/dist/Components/ContextMenu/ContextMenu.js +1 -0
  13. package/dist/Components/DatePicker/DatePicker.js +2 -3
  14. package/dist/Components/ErrorHandler.d.ts +4 -1
  15. package/dist/Components/FileManager/FileManager.d.ts +6 -3
  16. package/dist/Components/FileManager/FileManager.js +32 -22
  17. package/dist/Components/FileManager/FileUploadBatch.js +3 -3
  18. package/dist/Components/FileManager/IFileManagerOptions.js +1 -0
  19. package/dist/Components/FormOptions.js +1 -0
  20. package/dist/Components/ICollapsableOptions.js +1 -0
  21. package/dist/Components/Modal/ModalHelper.js +4 -4
  22. package/dist/Components/Modal/ModalOptions.d.ts +2 -0
  23. package/dist/Components/Modal/ModalOptions.js +1 -0
  24. package/dist/Components/Notifications/INotificationHelper.js +1 -0
  25. package/dist/Components/Notifications/NotificationHelper.js +1 -1
  26. package/dist/Components/TaskRunner/Decorators.d.ts +6 -0
  27. package/dist/Components/TaskRunner/Decorators.js +24 -0
  28. package/dist/Components/TaskRunner/ProgressState.js +1 -1
  29. package/dist/Components/TaskRunner/TaskRunner.d.ts +13 -4
  30. package/dist/Components/TaskRunner/TaskRunner.js +17 -11
  31. package/dist/Components/TooltipOptions.js +1 -0
  32. package/dist/Components/index.js +1 -0
  33. package/dist/ConnectionManager.js +2 -2
  34. package/dist/Data/ApiDataSource.js +2 -2
  35. package/dist/Data/AsyncDataSource.js +1 -1
  36. package/dist/Data/DataCacheEntry.js +3 -3
  37. package/dist/Data/DataView.js +7 -7
  38. package/dist/Data/Deserialiser.js +4 -5
  39. package/dist/Data/Paging/PageManager.js +9 -9
  40. package/dist/Data/Serialiser.js +21 -11
  41. package/dist/Data/StaticDataSource.js +1 -1
  42. package/dist/Data/WindowedDataView.js +1 -1
  43. package/dist/Dates/DateUtils.js +3 -4
  44. package/dist/Dates/TimeSpan.js +4 -4
  45. package/dist/Extensions.d.ts +1 -5
  46. package/dist/Extensions.js +18 -21
  47. package/dist/Globals.js +5 -5
  48. package/dist/JsonSchema/JsonSchemaTypes.js +1 -0
  49. package/dist/JsonSchema/TypeCache.js +2 -2
  50. package/dist/JsonSchema/TypeMetadata.js +4 -4
  51. package/dist/Localisation/ILocalisationService.js +1 -0
  52. package/dist/Localisation/index.js +1 -0
  53. package/dist/Model/BaseModels/UserEvent.js +1 -1
  54. package/dist/Model/Decorators.d.ts +1 -1
  55. package/dist/Model/Decorators.js +1 -1
  56. package/dist/Model/EnumHelper.d.ts +7 -0
  57. package/dist/Model/EnumHelper.js +18 -3
  58. package/dist/Model/IAutoRunner.d.ts +1 -1
  59. package/dist/Model/IAutoRunner.js +1 -0
  60. package/dist/Model/IModelBase.d.ts +1 -1
  61. package/dist/Model/IModelBase.js +1 -0
  62. package/dist/Model/IModelCreatorBase.js +1 -0
  63. package/dist/Model/List.js +4 -4
  64. package/dist/Model/Misc.d.ts +5 -1
  65. package/dist/Model/ModelBase.d.ts +1 -1
  66. package/dist/Model/ModelBase.js +4 -4
  67. package/dist/Model/ModelCreatorBase.js +1 -1
  68. package/dist/Model/ModelGraphTraverser.js +1 -1
  69. package/dist/Model/NeoTypeInfo.js +9 -10
  70. package/dist/Model/ObservableValue.js +1 -1
  71. package/dist/Model/PropertyInfo.js +8 -8
  72. package/dist/Model/PropertyInstance.js +8 -8
  73. package/dist/Routing/IMenuItemProvider.js +1 -0
  74. package/dist/Routing/IMenuRoute.js +1 -0
  75. package/dist/Routing/INavigationHelper.js +1 -0
  76. package/dist/Routing/IRoute.js +1 -0
  77. package/dist/Routing/IRouteSecurityService.js +1 -0
  78. package/dist/Security/IAuthenticationService.js +1 -0
  79. package/dist/Security/IAuthorisationService.js +1 -0
  80. package/dist/Security/ILoginErrorHandler.js +1 -0
  81. package/dist/Security/ISecurityService.js +1 -0
  82. package/dist/Security/IUser.js +1 -0
  83. package/dist/Security/IUserRole.js +1 -0
  84. package/dist/Security/LoginErrorHandler.js +1 -1
  85. package/dist/Security/Oidc/OidcAuthService.js +8 -3
  86. package/dist/Security/Oidc/OidcTypes.js +1 -0
  87. package/dist/Security/Oidc/OidcUser.js +3 -3
  88. package/dist/Security/SecurityService.js +2 -2
  89. package/dist/Security/User.js +2 -2
  90. package/dist/SignalR/HubBase.js +5 -5
  91. package/dist/StringUtils.js +1 -1
  92. package/dist/Utils.js +8 -8
  93. package/dist/Validation/DisplayHelper.js +2 -2
  94. package/dist/Validation/RuleContext.js +2 -3
  95. package/dist/Validation/ValidationHelpers.js +1 -1
  96. package/dist/Validation/ValidationState.js +2 -2
  97. package/dist/Validation/Validators/IModelValidator.js +1 -0
  98. package/dist/Validation/Validators/ModelValidator.js +2 -2
  99. package/dist/Validation/Validators/PropertyValidator.js +2 -2
  100. package/dist/Validation/Validators/RuleValidator.js +2 -2
  101. package/dist/Views/IViewBase.js +1 -0
  102. package/dist/index.d.ts +2 -0
  103. package/dist/index.js +4 -0
  104. package/package.json +18 -13
package/dist/Utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { __spreadArrays } from "tslib";
1
+ import { __spreadArray } from "tslib";
2
2
  import { DebounceHelper } from './DebounceHelper';
3
3
  var lut = [];
4
4
  for (var i = 0; i < 256; i++) {
@@ -77,10 +77,10 @@ var Utils = /** @class */ (function () {
77
77
  args[_i - 1] = arguments[_i];
78
78
  }
79
79
  if (type.prototype.constructor.neo) {
80
- return new ((_a = (type.prototype.constructor.neo.getOverrideConstructor())).bind.apply(_a, __spreadArrays([void 0], args)))();
80
+ return new ((_a = (type.prototype.constructor.neo.getOverrideConstructor())).bind.apply(_a, __spreadArray([void 0], args, false)))();
81
81
  }
82
82
  else {
83
- throw "Cannot instantiate '" + type.name + "' because it does not have an @NeoModel attribute.";
83
+ throw "Cannot instantiate '".concat(type.name, "' because it does not have an @NeoModel attribute.");
84
84
  }
85
85
  };
86
86
  /**
@@ -174,7 +174,7 @@ var Utils = /** @class */ (function () {
174
174
  var propertyKey = propertyNames_1[_a];
175
175
  var value = plainObject[propertyKey];
176
176
  if (value !== undefined && value !== null && value !== "") {
177
- var name_1 = prefix ? prefix + "." + propertyKey : propertyKey;
177
+ var name_1 = prefix ? "".concat(prefix, ".").concat(propertyKey) : propertyKey;
178
178
  var append = "";
179
179
  if (value instanceof Date) {
180
180
  value = value.toISOString();
@@ -182,19 +182,19 @@ var Utils = /** @class */ (function () {
182
182
  else if (value instanceof Array && value.length) {
183
183
  if (value[0] instanceof Date) {
184
184
  for (var i_1 = 0; i_1 < value.length; i_1++) {
185
- append += (i_1 === 0 ? "" : "&") + (name_1 + "=" + value[i_1].toISOString());
185
+ append += (i_1 === 0 ? "" : "&") + "".concat(name_1, "=").concat(value[i_1].toISOString());
186
186
  }
187
187
  }
188
188
  else if (value[0] instanceof Object) {
189
189
  // Object arrays are in the form: sortColumns[0].columnName=Prop1&sortColumns[1].columnName=Prop4
190
190
  for (var i_2 = 0; i_2 < value.length; i_2++) {
191
- append += (i_2 === 0 ? "" : "&") + buildQueryString(value[i_2], name_1 + "[" + i_2 + "]");
191
+ append += (i_2 === 0 ? "" : "&") + buildQueryString(value[i_2], "".concat(name_1, "[").concat(i_2, "]"));
192
192
  }
193
193
  }
194
194
  else {
195
195
  // Plain arrays are in the form: values=1&values=2
196
196
  for (var i_3 = 0; i_3 < value.length; i_3++) {
197
- append += (i_3 === 0 ? "" : "&") + (name_1 + "=" + encodeURIComponent(value[i_3]));
197
+ append += (i_3 === 0 ? "" : "&") + "".concat(name_1, "=").concat(encodeURIComponent(value[i_3]));
198
198
  }
199
199
  }
200
200
  }
@@ -211,7 +211,7 @@ var Utils = /** @class */ (function () {
211
211
  }
212
212
  return queryString;
213
213
  }
214
- return buildQueryString.apply(void 0, __spreadArrays([plainObject, ""], properties));
214
+ return buildQueryString.apply(void 0, __spreadArray([plainObject, ""], properties, false));
215
215
  };
216
216
  return Utils;
217
217
  }());
@@ -21,7 +21,7 @@ var ValidationDisplayInfo = /** @class */ (function () {
21
21
  }
22
22
  return "";
23
23
  },
24
- enumerable: true,
24
+ enumerable: false,
25
25
  configurable: true
26
26
  });
27
27
  Object.defineProperty(ValidationDisplayInfo.prototype, "editorClassName", {
@@ -31,7 +31,7 @@ var ValidationDisplayInfo = /** @class */ (function () {
31
31
  }
32
32
  return "";
33
33
  },
34
- enumerable: true,
34
+ enumerable: false,
35
35
  configurable: true
36
36
  });
37
37
  ValidationDisplayInfo.prototype.applyToDom = function (elementProps, addTooltip) {
@@ -56,7 +56,7 @@ var RuleContextBase = /** @class */ (function (_super) {
56
56
  get: function () {
57
57
  return this.messages.length > 0 || this.warnings.length > 0 || this.errors.length > 0 || this.asyncBusyText.length > 0;
58
58
  },
59
- enumerable: true,
59
+ enumerable: false,
60
60
  configurable: true
61
61
  });
62
62
  return RuleContextBase;
@@ -77,7 +77,6 @@ var RuleContext = /** @class */ (function (_super) {
77
77
  */
78
78
  RuleContext.prototype.beginAsync = function (loadingText, onReady, options) {
79
79
  var _this = this;
80
- var _a;
81
80
  var model = this.ruleValidator.propertyInstance.attachedTo;
82
81
  if (!model.isSuspended && ((options && options.checkWhenClean) || model.meta.isSelfDirty.peek) && this.ruleValidator.asyncStage !== AsyncStage.Completing) {
83
82
  this.asyncBusyText = loadingText;
@@ -99,7 +98,7 @@ var RuleContext = /** @class */ (function (_super) {
99
98
  asyncContext.endAsync();
100
99
  });
101
100
  }
102
- }, (((_a = options) === null || _a === void 0 ? void 0 : _a.delayMs) !== undefined ? options.delayMs : 500));
101
+ }, ((options === null || options === void 0 ? void 0 : options.delayMs) !== undefined ? options.delayMs : 500));
103
102
  }
104
103
  };
105
104
  return RuleContext;
@@ -53,5 +53,5 @@ export function getValidationSummary(model, displayMode) {
53
53
  }
54
54
  });
55
55
  }
56
- return isArray ? root.childLists : (_a = root.childLists[0], (_a !== null && _a !== void 0 ? _a : null));
56
+ return isArray ? root.childLists : ((_a = root.childLists[0]) !== null && _a !== void 0 ? _a : null);
57
57
  }
@@ -19,7 +19,7 @@ var ValidationState = /** @class */ (function () {
19
19
  get: function () {
20
20
  return this.severity < RuleSeverity.AsyncBusy;
21
21
  },
22
- enumerable: true,
22
+ enumerable: false,
23
23
  configurable: true
24
24
  });
25
25
  /**
@@ -43,7 +43,7 @@ var ContainerValidationState = /** @class */ (function (_super) {
43
43
  get: function () {
44
44
  return this.brokenRules.length > 0;
45
45
  },
46
- enumerable: true,
46
+ enumerable: false,
47
47
  configurable: true
48
48
  });
49
49
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -52,14 +52,14 @@ var ModelValidator = /** @class */ (function () {
52
52
  this.checkRules();
53
53
  return this._ruleState;
54
54
  },
55
- enumerable: true,
55
+ enumerable: false,
56
56
  configurable: true
57
57
  });
58
58
  Object.defineProperty(ModelValidator.prototype, "isValid", {
59
59
  get: function () {
60
60
  return this.ruleState.isValid;
61
61
  },
62
- enumerable: true,
62
+ enumerable: false,
63
63
  configurable: true
64
64
  });
65
65
  ModelValidator.prototype.checkRules = function () {
@@ -16,14 +16,14 @@ var PropertyValidator = /** @class */ (function () {
16
16
  this.checkRules();
17
17
  return this._ruleState;
18
18
  },
19
- enumerable: true,
19
+ enumerable: false,
20
20
  configurable: true
21
21
  });
22
22
  Object.defineProperty(PropertyValidator.prototype, "isValid", {
23
23
  get: function () {
24
24
  return this.ruleState.isValid;
25
25
  },
26
- enumerable: true,
26
+ enumerable: false,
27
27
  configurable: true
28
28
  });
29
29
  PropertyValidator.prototype.checkRules = function () {
@@ -18,7 +18,7 @@ var RuleValidator = /** @class */ (function () {
18
18
  get: function () {
19
19
  return this.rule.ruleId;
20
20
  },
21
- enumerable: true,
21
+ enumerable: false,
22
22
  configurable: true
23
23
  });
24
24
  Object.defineProperty(RuleValidator.prototype, "ruleContext", {
@@ -34,7 +34,7 @@ var RuleValidator = /** @class */ (function () {
34
34
  }
35
35
  return ruleContext;
36
36
  },
37
- enumerable: true,
37
+ enumerable: false,
38
38
  configurable: true
39
39
  });
40
40
  __decorate([
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import { DebounceHelper } from './DebounceHelper';
10
10
  import { EnumHelper } from './Model/EnumHelper';
11
11
  import { MenuUtils } from './Components/ContextMenu/MenuUtils';
12
12
  import FileUtils from "./FileUtils";
13
+ import { runInTask } from './Components/TaskRunner/Decorators';
13
14
  import * as Attributes from './Model/Decorators';
14
15
  import * as Rules from './Validation/Decorators';
15
16
  import * as AppServices from './AppServices';
@@ -27,6 +28,7 @@ import * as Validation from './Validation';
27
28
  import * as Views from './Views/IViewBase';
28
29
  declare const NotifyUtils: Components.INotificationHelper;
29
30
  export { AppServices, Attributes, Components, Data, DateUtils, DebounceHelper, EnumHelper, FileUtils, JsonSchema, Localisation, List, MenuUtils, Misc, ModalUtils, Model, NeoModel, Network, NotifyUtils, NumberUtils, Routing, Rules, Security, SignalR, StringUtils, Validation, Views, };
31
+ export { runInTask };
30
32
  export { default as ModelBase } from './Model/ModelBase';
31
33
  export { default as ValueObject } from './Model/ValueObject';
32
34
  export { LookupBase } from './Model/LookupBase';
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import { DebounceHelper } from './DebounceHelper';
11
11
  import { EnumHelper } from './Model/EnumHelper';
12
12
  import { MenuUtils } from './Components/ContextMenu/MenuUtils';
13
13
  import FileUtils from "./FileUtils";
14
+ import { runInTask } from './Components/TaskRunner/Decorators';
14
15
  // Namespaced exports from 1 file
15
16
  import * as Attributes from './Model/Decorators';
16
17
  import * as Rules from './Validation/Decorators';
@@ -30,7 +31,10 @@ import * as Validation from './Validation';
30
31
  import * as Views from './Views/IViewBase';
31
32
  import { NotificationHelper } from './Components/Notifications/NotificationHelper';
32
33
  var NotifyUtils = new NotificationHelper();
34
+ // Types
33
35
  export { AppServices, Attributes, Components, Data, DateUtils, DebounceHelper, EnumHelper, FileUtils, JsonSchema, Localisation, List, MenuUtils, Misc, ModalUtils, Model, NeoModel, Network, NotifyUtils, NumberUtils, Routing, Rules, Security, SignalR, StringUtils, Validation, Views, };
36
+ // Functions
37
+ export { runInTask };
34
38
  export { default as ModelBase } from './Model/ModelBase';
35
39
  export { default as ValueObject } from './Model/ValueObject';
36
40
  export { LookupBase } from './Model/LookupBase';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-core",
3
- "version": "0.10.49",
3
+ "version": "1.0.0-alpha.1",
4
4
  "description": "Core functionality for the Neo client library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,23 +9,28 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "build": "tsc",
12
- "test": "jest"
12
+ "test": "jest --runInBand"
13
13
  },
14
14
  "author": "Singular Systems",
15
15
  "license": "ISC",
16
16
  "devDependencies": {
17
- "@types/jest": "^24.0.15",
18
- "@types/node": "12.0.8",
19
- "jest": "24.8.0",
20
- "ts-jest": "24.0.2",
21
- "typescript": "3.7.5"
17
+ "@types/jest": "^28.1.1",
18
+ "@types/node": "17.0.13",
19
+ "jest": "^28.1.1",
20
+ "ts-jest": "28.0.4",
21
+ "typescript": "4.7.3"
22
22
  },
23
23
  "dependencies": {
24
- "@microsoft/signalr": "^3.0.1",
25
- "axios": "^0.21.1",
26
- "decimal.js-light": "2.5.1",
27
- "inversify": "5.0.1",
24
+ "@microsoft/signalr": "^6.0.1",
25
+ "axios": "^0.27.2",
26
+ "decimal.js-light": "^2.5.1",
27
+ "inversify": "^6.0.1",
28
28
  "reflect-metadata": "0.1.13",
29
- "tslib": "2.3.1"
30
- }
29
+ "tslib": "2.4.0"
30
+ },
31
+ "peerDependencies": {
32
+ "axios": ">=0.21.1",
33
+ "inversify": ">=5.0.1"
34
+ },
35
+ "packageManager": "yarn@3.2.1"
31
36
  }