scichart 2.2.2396 → 2.2.2404
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +1 -0
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +4 -0
- package/Charting/Model/BaseDataSeries.js +3 -0
- package/Charting/Visuals/Annotations/AnnotationBase.js +1 -1
- package/Charting/Visuals/Axis/AxisBase2D.js +1 -1
- package/Charting/Visuals/Axis/DateTimeNumericAxis.js +1 -1
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.d.ts +5 -3
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +11 -6
- package/Charting/Visuals/licenseManager2D.d.ts +1 -1
- package/Charting/Visuals/licenseManager2D.js +44 -41
- package/Charting3D/Visuals/licenseManager3D.js +1 -1
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/README.md +3 -2
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +95 -95
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +95 -95
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
|
@@ -124,6 +124,7 @@ export declare class SeriesSelectionModifier extends ChartModifierBase2D {
|
|
|
124
124
|
type: string;
|
|
125
125
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
126
126
|
};
|
|
127
|
+
getAllSeries(): IRenderableSeries[];
|
|
127
128
|
/**
|
|
128
129
|
* This function called when the user sets series.isSelected = true elsewhere in code and we want to sync the modifier
|
|
129
130
|
*/
|
|
@@ -270,6 +270,10 @@ var SeriesSelectionModifier = /** @class */ (function (_super) {
|
|
|
270
270
|
Object.assign(json.options, options);
|
|
271
271
|
return json;
|
|
272
272
|
};
|
|
273
|
+
SeriesSelectionModifier.prototype.getAllSeries = function () {
|
|
274
|
+
// Series Selection should only operate on visible series
|
|
275
|
+
return _super.prototype.getAllSeries.call(this).filter(function (rs) { return rs.isVisible; });
|
|
276
|
+
};
|
|
273
277
|
/**
|
|
274
278
|
* This function called when the user sets series.isSelected = true elsewhere in code and we want to sync the modifier
|
|
275
279
|
*/
|
|
@@ -541,6 +541,9 @@ isSorted) {
|
|
|
541
541
|
if (!(0, isRealNumber_1.isRealNumber)(minMax.minD) || !(0, isRealNumber_1.isRealNumber)(minMax.maxD)) {
|
|
542
542
|
return undefined;
|
|
543
543
|
}
|
|
544
|
+
if (minMax.minD === minMax.maxD) {
|
|
545
|
+
return new NumberRange_1.NumberRange(minMax.minD - 1, minMax.minD + 1);
|
|
546
|
+
}
|
|
544
547
|
return new NumberRange_1.NumberRange(minMax.minD, minMax.maxD);
|
|
545
548
|
}
|
|
546
549
|
finally {
|
|
@@ -665,7 +665,7 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
665
665
|
AnnotationBase.prototype.getXYCoordinatesFromValues = function (xyDataPoint) {
|
|
666
666
|
var viewRect = this.parentSurface.seriesViewRect;
|
|
667
667
|
var pointWithAbsoluteCoordinates = this.getAbsoluteCoordinates(xyDataPoint);
|
|
668
|
-
var translatedPoint = (0, translate_1.translateFromSeriesViewRectToCanvas)(pointWithAbsoluteCoordinates, viewRect);
|
|
668
|
+
var translatedPoint = (0, translate_1.translateFromSeriesViewRectToCanvas)(pointWithAbsoluteCoordinates, viewRect, true);
|
|
669
669
|
if (!translatedPoint) {
|
|
670
670
|
return undefined;
|
|
671
671
|
}
|
|
@@ -645,12 +645,12 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
645
645
|
// nativeTitleRect = createNativeRect(this.webAssemblyContext2D, 0, 0 - shift, viewTitleRect.width, viewTitleRect.height + additionalSize);
|
|
646
646
|
// }
|
|
647
647
|
nativeAxisRect = (0, createNativeRect_1.createNativeRect)(_this.webAssemblyContext2D, 0, 0, viewAxisRect.width, viewAxisRect.height);
|
|
648
|
-
nativeTitleRect = (0, createNativeRect_1.createNativeRect)(_this.webAssemblyContext2D, 0, 0, viewTitleRect.width, viewTitleRect.height);
|
|
649
648
|
if (nativeAxisRect) {
|
|
650
649
|
var vecRects = (0, NativeObject_1.getVectorRectVertex)(_this.webAssemblyContext2D);
|
|
651
650
|
vecRects.push_back(nativeAxisRect);
|
|
652
651
|
renderContext.drawRects(vecRects, brush, viewAxisRect.left, viewAxisRect.top);
|
|
653
652
|
}
|
|
653
|
+
nativeTitleRect = (0, createNativeRect_1.createNativeRect)(_this.webAssemblyContext2D, 0, 0, viewTitleRect.width, viewTitleRect.height);
|
|
654
654
|
if (nativeTitleRect) {
|
|
655
655
|
var vecRects = (0, NativeObject_1.getVectorRectVertex)(_this.webAssemblyContext2D);
|
|
656
656
|
vecRects.push_back(nativeTitleRect);
|
|
@@ -25,7 +25,7 @@ var DateTimeNumericAxis = /** @class */ (function (_super) {
|
|
|
25
25
|
var _a;
|
|
26
26
|
var _this = _super.call(this, webAssemblyContext, options) || this;
|
|
27
27
|
_this.labelProvider = (_a = options === null || options === void 0 ? void 0 : options.labelProvider) !== null && _a !== void 0 ? _a : new SmartDateLabelProvider_1.SmartDateLabelProvider();
|
|
28
|
-
_this.deltaCalculator = new DateTimeDeltaCalculator_1.DateTimeDeltaCalculator({
|
|
28
|
+
_this.deltaCalculator = new DateTimeDeltaCalculator_1.DateTimeDeltaCalculator(webAssemblyContext, {
|
|
29
29
|
possibleDeltas: options === null || options === void 0 ? void 0 : options.possibleDeltas,
|
|
30
30
|
minTicks: options === null || options === void 0 ? void 0 : options.minTicks
|
|
31
31
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { NumberRange } from "../../../../Core/NumberRange";
|
|
2
|
-
import {
|
|
2
|
+
import { TSciChart } from "../../../../types/TSciChart";
|
|
3
|
+
import { TSciChart3D } from "../../../../types/TSciChart3D";
|
|
4
|
+
import { NumericDeltaCalculator } from "./NumericDeltaCalculator";
|
|
3
5
|
export interface IDeltaCalculatorOptions {
|
|
4
6
|
possibleDeltas?: number[];
|
|
5
7
|
minTicks?: number;
|
|
@@ -8,12 +10,12 @@ export interface IDeltaCalculatorOptions {
|
|
|
8
10
|
* The DateTimeDeltaCalculator is respinsible for calculating {@link AxisCore.minorDelta} and {@link AxisCore.majorDelta} on
|
|
9
11
|
* {@link NumericAxis} types.
|
|
10
12
|
*/
|
|
11
|
-
export declare class DateTimeDeltaCalculator extends
|
|
13
|
+
export declare class DateTimeDeltaCalculator extends NumericDeltaCalculator {
|
|
12
14
|
private possibleDeltasProperty;
|
|
13
15
|
private minTicksProperty;
|
|
14
16
|
private prevIndex;
|
|
15
17
|
private currIndex;
|
|
16
|
-
constructor(options?: IDeltaCalculatorOptions);
|
|
18
|
+
constructor(webAssemblyContext: TSciChart | TSciChart3D, options?: IDeltaCalculatorOptions);
|
|
17
19
|
/**
|
|
18
20
|
* Gets or sets deltas array
|
|
19
21
|
*/
|
|
@@ -17,16 +17,16 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.DateTimeDeltaCalculator = void 0;
|
|
19
19
|
var NumberRange_1 = require("../../../../Core/NumberRange");
|
|
20
|
-
var
|
|
20
|
+
var NumericDeltaCalculator_1 = require("./NumericDeltaCalculator");
|
|
21
21
|
/**
|
|
22
22
|
* The DateTimeDeltaCalculator is respinsible for calculating {@link AxisCore.minorDelta} and {@link AxisCore.majorDelta} on
|
|
23
23
|
* {@link NumericAxis} types.
|
|
24
24
|
*/
|
|
25
25
|
var DateTimeDeltaCalculator = /** @class */ (function (_super) {
|
|
26
26
|
__extends(DateTimeDeltaCalculator, _super);
|
|
27
|
-
function DateTimeDeltaCalculator(options) {
|
|
27
|
+
function DateTimeDeltaCalculator(webAssemblyContext, options) {
|
|
28
28
|
var _a;
|
|
29
|
-
var _this = _super.call(this) || this;
|
|
29
|
+
var _this = _super.call(this, webAssemblyContext) || this;
|
|
30
30
|
_this.possibleDeltasProperty = [
|
|
31
31
|
1,
|
|
32
32
|
2,
|
|
@@ -55,7 +55,8 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
|
|
|
55
55
|
2 * 30 * 24 * 60 * 60,
|
|
56
56
|
4 * 30 * 24 * 60 * 60,
|
|
57
57
|
6 * 30 * 24 * 60 * 60,
|
|
58
|
-
|
|
58
|
+
365.25 * 24 * 60 * 60
|
|
59
|
+
// Years also need special handling
|
|
59
60
|
];
|
|
60
61
|
_this.currIndex = 12;
|
|
61
62
|
_this.possibleDeltasProperty = (_a = options === null || options === void 0 ? void 0 : options.possibleDeltas) !== null && _a !== void 0 ? _a : _this.possibleDeltasProperty;
|
|
@@ -105,11 +106,15 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
|
|
|
105
106
|
_this.prevIndex = index;
|
|
106
107
|
return calculateDelta(deltas, index - 1);
|
|
107
108
|
}
|
|
108
|
-
if (ticksCount > maxTicks && index < deltas.length && index !== _this.prevIndex) {
|
|
109
|
+
if (ticksCount > maxTicks && index < deltas.length - 1 && index !== _this.prevIndex) {
|
|
109
110
|
if (!_this.prevIndex)
|
|
110
111
|
_this.prevIndex = index;
|
|
111
112
|
return calculateDelta(deltas, index + 1);
|
|
112
113
|
}
|
|
114
|
+
else if (ticksCount > maxTicks && index === deltas.length - 1) {
|
|
115
|
+
var yearDelta = _super.prototype.getDeltaFromRange.call(_this, min / delta, max / delta, minorsPerMajor, maxTicks);
|
|
116
|
+
return yearDelta.max * delta;
|
|
117
|
+
}
|
|
113
118
|
else {
|
|
114
119
|
if (_this.currIndex !== index) {
|
|
115
120
|
_this.currIndex = index;
|
|
@@ -121,5 +126,5 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
|
|
|
121
126
|
return new NumberRange_1.NumberRange(delta / minorsPerMajor, delta);
|
|
122
127
|
};
|
|
123
128
|
return DateTimeDeltaCalculator;
|
|
124
|
-
}(
|
|
129
|
+
}(NumericDeltaCalculator_1.NumericDeltaCalculator));
|
|
125
130
|
exports.DateTimeDeltaCalculator = DateTimeDeltaCalculator;
|
|
@@ -34,7 +34,7 @@ interface ILicenseCookie {
|
|
|
34
34
|
lastValidated: Date;
|
|
35
35
|
}
|
|
36
36
|
export declare const getLicenseCookie: () => ILicenseCookie;
|
|
37
|
-
export declare const applyLicense: (licenseContext: TLicenseContext) => void;
|
|
37
|
+
export declare const applyLicense: (licenseContext: TLicenseContext, sciChartSurface: SciChartSurfaceBase) => void;
|
|
38
38
|
export declare type TLicenseContext = {
|
|
39
39
|
SCRTCredentials: {
|
|
40
40
|
GetLicenseType: () => SCRTLicenseType;
|
|
@@ -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 (
|
|
221
|
-
(0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(
|
|
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 (
|
|
255
|
-
expirySeconds =
|
|
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 (
|
|
279
|
-
challenge =
|
|
280
|
-
orderId =
|
|
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
|
-
|
|
353
|
+
licenseContext.SCRTCredentials.ResetRuntimeLicense();
|
|
354
354
|
isRuntimeKey = false;
|
|
355
|
-
(0, exports.applyLicense)(
|
|
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 (
|
|
385
|
-
(0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(
|
|
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
|
-
|
|
400
|
-
|
|
399
|
+
if (shouldApplyLicense2D) {
|
|
400
|
+
sciChartSurface2D = sciChartSurface;
|
|
401
401
|
licenseContext2D = licenseContext;
|
|
402
|
-
|
|
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
|
-
|
|
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 (
|
|
545
|
-
(0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(
|
|
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 (
|
|
563
|
-
|
|
564
|
-
requiresValidation =
|
|
565
|
+
if (licenseContext !== undefined) {
|
|
566
|
+
licenseContext.SCRTCredentials.SetRuntimeLicenseKeyW(keyCode);
|
|
567
|
+
requiresValidation = licenseContext.SCRTCredentials.RequiresValidation();
|
|
565
568
|
trialExpired =
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
(0, exports.updateLicenseDisplay)((0, exports.getLicenseInfo)(
|
|
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);
|
package/Core/BuildStamp.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
export declare const libraryVersion = "2.2.2404";
|
|
4
4
|
export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
|
package/Core/BuildStamp.js
CHANGED
|
@@ -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-
|
|
4
|
+
var buildStamp = "2022-07-26T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "2.2.
|
|
7
|
+
exports.libraryVersion = "2.2.2404";
|
|
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.
|
|
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');
|