scichart 2.2.2397 → 2.2.2407

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 (33) hide show
  1. package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +1 -0
  2. package/Charting/ChartModifiers/SeriesSelectionModifier.js +4 -0
  3. package/Charting/Model/BaseDataSeries.js +3 -0
  4. package/Charting/Visuals/Axis/AxisBase2D.js +1 -1
  5. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +1 -1
  6. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.d.ts +5 -3
  7. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +11 -6
  8. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +9 -0
  9. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +6 -0
  10. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +6 -0
  11. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +6 -0
  12. package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.js +6 -0
  13. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +6 -0
  14. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +6 -0
  15. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +3 -0
  16. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +6 -0
  17. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +6 -0
  18. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +6 -0
  19. package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +6 -0
  20. package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +3 -0
  21. package/Charting/Visuals/licenseManager2D.d.ts +1 -1
  22. package/Charting/Visuals/licenseManager2D.js +44 -41
  23. package/Charting3D/Visuals/licenseManager3D.js +1 -1
  24. package/Core/BuildStamp.d.ts +1 -1
  25. package/Core/BuildStamp.js +2 -2
  26. package/README.md +3 -2
  27. package/_wasm/scichart.browser.js +1 -1
  28. package/_wasm/scichart2d.js +1 -1
  29. package/_wasm/scichart2d.wasm +0 -0
  30. package/_wasm/scichart3d.js +1 -1
  31. package/_wasm/scichart3d.wasm +0 -0
  32. package/package.json +1 -1
  33. package/utils/number.js +2 -0
@@ -134,7 +134,7 @@ var setRuntimeLicenseKey = function (value) {
134
134
  runtimeLicenseKey = value;
135
135
  if (runtimeLicenseKey !== prev && runtimeLicenseKey !== "") {
136
136
  if (licenseContext2D !== undefined) {
137
- (0, exports.applyLicense)(licenseContext2D);
137
+ (0, exports.applyLicense)(licenseContext2D, sciChartSurface2D);
138
138
  }
139
139
  }
140
140
  };
@@ -161,7 +161,7 @@ var callbacks3D = {
161
161
  };
162
162
  var setCallbacks3D = function (callbacks) { return (callbacks3D = callbacks); };
163
163
  exports.setCallbacks3D = setCallbacks3D;
164
- var getlicenseFromWizard = function () { return __awaiter(void 0, void 0, void 0, function () {
164
+ var getlicenseFromWizard = function (licenseContext, sciChartSurface) { return __awaiter(void 0, void 0, void 0, function () {
165
165
  var response, keyCode, _a, requiresValidation, trialExpired, err_3;
166
166
  return __generator(this, function (_b) {
167
167
  switch (_b.label) {
@@ -179,16 +179,16 @@ var getlicenseFromWizard = function () { return __awaiter(void 0, void 0, void 0
179
179
  return [4 /*yield*/, response.text()];
180
180
  case 2:
181
181
  keyCode = _b.sent();
182
- _a = setNewLicense(keyCode), requiresValidation = _a.requiresValidation, trialExpired = _a.trialExpired;
182
+ _a = setNewLicense(keyCode, licenseContext, sciChartSurface), requiresValidation = _a.requiresValidation, trialExpired = _a.trialExpired;
183
183
  if (requiresValidation) {
184
184
  debug("Got a developer license from local license wizard. Validating...");
185
185
  checkStatus = licensingClasses_1.LicenseCheckStatus.ValidatingDeveloperLicense;
186
- dolicenseChallenge();
186
+ dolicenseChallenge(licenseContext, sciChartSurface);
187
187
  }
188
188
  else if (trialExpired) {
189
189
  checkStatus = licensingClasses_1.LicenseCheckStatus.NoLicenseInWizard;
190
190
  debug("No valid license available in licensing wizard. Trying again in ".concat(retryTime, " seconds"));
191
- wizardTimer = setTimeout(function () { return getlicenseFromWizard(); }, retryTime * 1000);
191
+ wizardTimer = setTimeout(function () { return getlicenseFromWizard(licenseContext, sciChartSurface); }, retryTime * 1000);
192
192
  }
193
193
  else {
194
194
  debug("Got a valid license from local license wizard.");
@@ -198,7 +198,7 @@ var getlicenseFromWizard = function () { return __awaiter(void 0, void 0, void 0
198
198
  case 3:
199
199
  checkStatus = licensingClasses_1.LicenseCheckStatus.NoLicenseInWizard;
200
200
  debug("No license available in licensing wizard. Trying again in ".concat(retryTime, " seconds"));
201
- wizardTimer = setTimeout(function () { return getlicenseFromWizard(); }, retryTime * 1000);
201
+ wizardTimer = setTimeout(function () { return getlicenseFromWizard(licenseContext, sciChartSurface); }, retryTime * 1000);
202
202
  _b.label = 4;
203
203
  case 4: return [3 /*break*/, 6];
204
204
  case 5:
@@ -207,7 +207,7 @@ var getlicenseFromWizard = function () { return __awaiter(void 0, void 0, void 0
207
207
  getLicenseFailCounts += 1;
208
208
  if (getLicenseFailCounts < maxretries) {
209
209
  debug("Could not find licensing wizard. Trying again in ".concat(retryTime, " seconds"));
210
- setTimeout(function () { return getlicenseFromWizard(); }, retryTime * 1000);
210
+ setTimeout(function () { return getlicenseFromWizard(licenseContext, sciChartSurface); }, retryTime * 1000);
211
211
  }
212
212
  else {
213
213
  // give up.
@@ -217,8 +217,8 @@ var getlicenseFromWizard = function () { return __awaiter(void 0, void 0, void 0
217
217
  }
218
218
  return [3 /*break*/, 6];
219
219
  case 6:
220
- if (licenseContext2D !== undefined) {
221
- (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext2D), sciChartSurface2D, true, true);
220
+ if (licenseContext !== undefined) {
221
+ (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext), sciChartSurface, true, true);
222
222
  }
223
223
  callbacks3D.updateLicenseDisplay3D();
224
224
  return [2 /*return*/];
@@ -247,12 +247,12 @@ var getLicenseCookie = function () {
247
247
  exports.getLicenseCookie = getLicenseCookie;
248
248
  var refreshLicense = function () {
249
249
  (0, cookie_1.deleteCookie)("scLicense");
250
- (0, exports.applyLicense)(licenseContext2D);
250
+ (0, exports.applyLicense)(licenseContext2D, sciChartSurface2D);
251
251
  };
252
- var setChallengeResponse = function (token) {
252
+ var setChallengeResponse = function (token, licenseContext) {
253
253
  var expirySeconds = -1;
254
- if (licenseContext2D !== undefined) {
255
- expirySeconds = licenseContext2D.SCRTCredentials.ApplyLicenseResponse(token);
254
+ if (licenseContext !== undefined) {
255
+ expirySeconds = licenseContext.SCRTCredentials.ApplyLicenseResponse(token);
256
256
  }
257
257
  var expirySeconds3D = callbacks3D.setChallengeResponse3D(token);
258
258
  if (expirySeconds3D !== undefined)
@@ -260,7 +260,7 @@ var setChallengeResponse = function (token) {
260
260
  return expirySeconds;
261
261
  };
262
262
  var challengeFailCounts = 0;
263
- var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0, function () {
263
+ var dolicenseChallenge = function (licenseContext, sciChartSurface) { return __awaiter(void 0, void 0, void 0, function () {
264
264
  var server, challenge, orderId, response, queryString, url, url, token, expirySeconds, key, timeNow, timeToExpiry, err_4, expiry, msg;
265
265
  var _a;
266
266
  return __generator(this, function (_b) {
@@ -275,9 +275,9 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
275
275
  debug("Attempting to validate license with ".concat(server));
276
276
  challenge = void 0;
277
277
  orderId = void 0;
278
- if (licenseContext2D !== undefined) {
279
- challenge = licenseContext2D.SCRTCredentials.GetLicenseChallenge();
280
- orderId = licenseContext2D.SCRTCredentials.GetOrderId();
278
+ if (licenseContext !== undefined) {
279
+ challenge = licenseContext.SCRTCredentials.GetLicenseChallenge();
280
+ orderId = licenseContext.SCRTCredentials.GetOrderId();
281
281
  }
282
282
  else {
283
283
  (_a = callbacks3D.getLicenseChallenge3D(), challenge = _a.challenge, orderId = _a.orderId);
@@ -308,7 +308,7 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
308
308
  case 8:
309
309
  token = _b.sent();
310
310
  if (!token.startsWith("Error")) {
311
- expirySeconds = setChallengeResponse(token);
311
+ expirySeconds = setChallengeResponse(token, licenseContext);
312
312
  if (expirySeconds > 0) {
313
313
  key = (0, exports.getLicenseCookie)().key;
314
314
  timeNow = Math.floor(new Date().getTime() / 1000);
@@ -317,7 +317,7 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
317
317
  checkStatus = licensingClasses_1.LicenseCheckStatus.LicenseOK;
318
318
  timeToExpiry = expirySeconds - timeNow;
319
319
  challengeFailCounts = 0;
320
- setTimeout(function () { return dolicenseChallenge(); }, Math.floor(timeToExpiry * 0.95 * 1000)); // Allow 5%
320
+ setTimeout(function () { return dolicenseChallenge(licenseContext, sciChartSurface); }, Math.floor(timeToExpiry * 0.95 * 1000)); // Allow 5%
321
321
  }
322
322
  else {
323
323
  // Something went wrong with the apply
@@ -350,9 +350,9 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
350
350
  console.warn("Server license validation failed. Looking for local developer license");
351
351
  runtimeLicenseKey = "";
352
352
  checkStatus = licensingClasses_1.LicenseCheckStatus.NoLicense;
353
- licenseContext2D.SCRTCredentials.ResetRuntimeLicense();
353
+ licenseContext.SCRTCredentials.ResetRuntimeLicense();
354
354
  isRuntimeKey = false;
355
- (0, exports.applyLicense)(licenseContext2D);
355
+ (0, exports.applyLicense)(licenseContext, sciChartSurface);
356
356
  // licenseManager2dState.setIsDev(true);
357
357
  // checkStatus = LicenseCheckStatus.LookingForLicenseWizard;
358
358
  // getlicenseFromWizard();
@@ -366,7 +366,7 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
366
366
  challengeFailCounts += 1;
367
367
  if (challengeFailCounts < maxretries) {
368
368
  debug("Could not find ".concat(server, "/").concat(serverLicenseEndpoint, ". Trying again in ").concat(retryTime, " seconds"));
369
- setTimeout(function () { return dolicenseChallenge(); }, retryTime * 1000);
369
+ setTimeout(function () { return dolicenseChallenge(licenseContext, sciChartSurface); }, retryTime * 1000);
370
370
  }
371
371
  else {
372
372
  expiry = (0, exports.getLicenseCookie)().expiry;
@@ -381,8 +381,8 @@ var dolicenseChallenge = function () { return __awaiter(void 0, void 0, void 0,
381
381
  }
382
382
  return [3 /*break*/, 12];
383
383
  case 12:
384
- if (licenseContext2D !== undefined) {
385
- (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext2D), sciChartSurface2D, true, true);
384
+ if (licenseContext !== undefined) {
385
+ (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext), sciChartSurface, true, true);
386
386
  }
387
387
  callbacks3D.updateLicenseDisplay3D();
388
388
  return [2 /*return*/];
@@ -396,10 +396,12 @@ var sciChartSurface2D;
396
396
  var isRuntimeKey = false;
397
397
  var applyLicense2D = function (licenseContext, sciChartSurface, isSingle) {
398
398
  debug("applyLicense 2D");
399
- sciChartSurface2D = sciChartSurface;
400
- if (isSingle || shouldApplyLicense2D) {
399
+ if (shouldApplyLicense2D) {
400
+ sciChartSurface2D = sciChartSurface;
401
401
  licenseContext2D = licenseContext;
402
- (0, exports.applyLicense)(licenseContext);
402
+ }
403
+ if (isSingle || shouldApplyLicense2D) {
404
+ (0, exports.applyLicense)(licenseContext, sciChartSurface);
403
405
  }
404
406
  else {
405
407
  if (checkStatus !== licensingClasses_1.LicenseCheckStatus.LicenseOK) {
@@ -409,7 +411,7 @@ var applyLicense2D = function (licenseContext, sciChartSurface, isSingle) {
409
411
  if (!isSingle)
410
412
  shouldApplyLicense2D = false;
411
413
  };
412
- var applyLicense = function (licenseContext) {
414
+ var applyLicense = function (licenseContext, sciChartSurface) {
413
415
  var _a;
414
416
  debug("applyLicense running");
415
417
  var licenseKey = "";
@@ -505,7 +507,7 @@ var applyLicense = function (licenseContext) {
505
507
  }
506
508
  else if (licenseCookie.expiry > new Date() && licenseCookie.key === licenseKey) {
507
509
  debug("current token in cookie");
508
- var expirySeconds = setChallengeResponse(licenseCookie.token);
510
+ var expirySeconds = setChallengeResponse(licenseCookie.token, licenseContext);
509
511
  lt = licenseContext.SCRTCredentials.GetLicenseType();
510
512
  if (lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL ||
511
513
  lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL) {
@@ -521,12 +523,13 @@ var applyLicense = function (licenseContext) {
521
523
  if (secondsSinceValidated > validationInterval &&
522
524
  checkStatus !== licensingClasses_1.LicenseCheckStatus.ValidatingDeveloperLicense) {
523
525
  checkStatus = licensingClasses_1.LicenseCheckStatus.ValidatingDeveloperLicense;
524
- dolicenseChallenge();
526
+ dolicenseChallenge(licenseContext, sciChartSurface);
525
527
  }
526
528
  }
527
529
  else if (checkStatus === licensingClasses_1.LicenseCheckStatus.NoLicense) {
528
530
  checkStatus = licensingClasses_1.LicenseCheckStatus.ValidatingDeveloperLicense;
529
- dolicenseChallenge();
531
+ setLicenseCookie(licenseKey, "", 0, 0);
532
+ dolicenseChallenge(licenseContext, sciChartSurface);
530
533
  }
531
534
  }
532
535
  else {
@@ -538,11 +541,11 @@ var applyLicense = function (licenseContext) {
538
541
  if (wizardTimer === undefined) {
539
542
  checkStatus = licensingClasses_1.LicenseCheckStatus.LookingForLicenseWizard;
540
543
  licenseManager2dState_1.licenseManager2dState.setIsDev(true);
541
- getlicenseFromWizard();
544
+ getlicenseFromWizard(licenseContext, sciChartSurface);
542
545
  }
543
546
  }
544
- if (licenseContext2D !== undefined) {
545
- (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext2D), sciChartSurface2D, true, false);
547
+ if (licenseContext !== undefined) {
548
+ (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext), sciChartSurface, true, false);
546
549
  }
547
550
  callbacks3D.updateLicenseDisplay3D();
548
551
  };
@@ -551,7 +554,7 @@ var licenseModal;
551
554
  var openLicenseModal = function () {
552
555
  console.error("Modal not initialized");
553
556
  };
554
- var setNewLicense = function (keyCode) {
557
+ var setNewLicense = function (keyCode, licenseContext, sciChartSurface) {
555
558
  var requiresValidation = false;
556
559
  var trialExpired;
557
560
  if (licenseModal) {
@@ -559,13 +562,13 @@ var setNewLicense = function (keyCode) {
559
562
  }
560
563
  isRuntimeKey = false;
561
564
  setLicenseCookie(keyCode, null, null, null);
562
- if (licenseContext2D !== undefined) {
563
- licenseContext2D.SCRTCredentials.SetRuntimeLicenseKeyW(keyCode);
564
- requiresValidation = licenseContext2D.SCRTCredentials.RequiresValidation();
565
+ if (licenseContext !== undefined) {
566
+ licenseContext.SCRTCredentials.SetRuntimeLicenseKeyW(keyCode);
567
+ requiresValidation = licenseContext.SCRTCredentials.RequiresValidation();
565
568
  trialExpired =
566
- licenseContext2D.SCRTCredentials.GetLicenseType() ===
567
- licenseContext2D.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED;
568
- (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext2D), sciChartSurface2D, true, true);
569
+ licenseContext.SCRTCredentials.GetLicenseType() ===
570
+ licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED;
571
+ (0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(licenseContext), sciChartSurface, true, true);
569
572
  }
570
573
  var result3D = callbacks3D.setNewLicense3D(keyCode);
571
574
  if (result3D !== undefined) {
@@ -32,7 +32,7 @@ var applyLicense3D = function (licenseContext, sciChartSurface, isSingle) {
32
32
  sciChartSurface3D = sciChartSurface;
33
33
  // set up callbacks
34
34
  (0, licenseManager2D_1.setCallbacks3D)(callbacks3D);
35
- (0, licenseManager2D_1.applyLicense)(licenseContext);
35
+ (0, licenseManager2D_1.applyLicense)(licenseContext, sciChartSurface3D);
36
36
  }
37
37
  else {
38
38
  (0, licenseManager2D_1.updateLicenseDisplay)((0, licenseManager2D_1.getLicenseInfo)(licenseContext), sciChartSurface, false, false);
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "2.2.2397";
3
+ export declare const libraryVersion = "2.2.2407";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2022-07-01T00:00:00";
4
+ var buildStamp = "2022-08-09T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.2.2397";
7
+ exports.libraryVersion = "2.2.2407";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
package/README.md CHANGED
@@ -72,7 +72,7 @@ See more at the Release Notes section at bottom of the page.
72
72
  <meta name="viewport" content="width=device-width, initial-scale=1" />
73
73
  <!-- Include SciChart.js -->
74
74
  <script
75
- src="https://cdn.jsdelivr.net/npm/scichart@2.1.2261/_wasm/scichart.browser.js"
75
+ src="https://cdn.jsdelivr.net/npm/scichart@2.2.2401/_wasm/scichart.browser.js"
76
76
  crossorigin="anonymous"
77
77
  ></script>
78
78
  <script src="scichart-example.js" defer></script>
@@ -119,7 +119,8 @@ SciChart.js can be loaded as an ES6 module with Babel or TypeScript transpiler.
119
119
 
120
120
  4. **Add webpack.config.js file**
121
121
 
122
- Use CopyPlugin to copy wasm and data files and serve them by webpack-dev-server. SciChart.js uses WebAssembly and those files must be loaded.
122
+ Use CopyPlugin to copy wasm and data files and serve them by webpack-dev-server. SciChart.js uses WebAssembly and those files must be loaded. You can avoid this by using SciChart.SciChartSurface.useWasmFromCDN() as noted below,
123
+ but in many scenarios it will be important to be able to serve the webassembly files directly.
123
124
 
124
125
  ```
125
126
  const path = require('path');