@authme/core 2.4.7 → 2.7.0
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/index.cjs +10 -5
- package/index.js +10 -5
- package/package.json +2 -2
- package/src/lib/features/event-listener/status.enum.d.ts +4 -2
package/index.cjs
CHANGED
|
@@ -49,8 +49,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
var name = "authme/sdk";
|
|
52
|
-
var version$1 = "2.
|
|
53
|
-
var date = "
|
|
52
|
+
var version$1 = "2.7.0";
|
|
53
|
+
var date = "2024-05-30T14:54:23+0000";
|
|
54
54
|
var packageInfo = {
|
|
55
55
|
name: name,
|
|
56
56
|
version: version$1,
|
|
@@ -216,9 +216,12 @@ class TranslateService {
|
|
|
216
216
|
fetchSource(path) {
|
|
217
217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
218
218
|
for (let i = 0; i < this.languageOptions.length; i++) {
|
|
219
|
-
const resp = yield fetch(`${path}/${this.languageOptions[i]}.json`);
|
|
219
|
+
const [resp, oldKeyResp] = yield Promise.all([fetch(`${path}/${this.languageOptions[i]}.json`), fetch(`${path}/old/${this.languageOptions[i]}.json`)]);
|
|
220
|
+
if (oldKeyResp.ok && !localStorage.getItem('local')) {
|
|
221
|
+
this.originalDict[this.languageOptions[i]] = yield oldKeyResp.json();
|
|
222
|
+
}
|
|
220
223
|
if (resp.ok) {
|
|
221
|
-
this.originalDict[this.languageOptions[i]] = yield resp.json();
|
|
224
|
+
this.originalDict[this.languageOptions[i]] = Object.assign(Object.assign({}, this.originalDict[this.languageOptions[i]]), yield resp.json());
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
return true;
|
|
@@ -249,7 +252,7 @@ class TranslateService {
|
|
|
249
252
|
str = str.replace(new RegExp(`{{${key}}}`, 'g'), args[key].toString());
|
|
250
253
|
});
|
|
251
254
|
}
|
|
252
|
-
return str.replace(
|
|
255
|
+
return str.replace(/\n$/, '').replace(/\n/g, '<br>');
|
|
253
256
|
}
|
|
254
257
|
getCurrentLang() {
|
|
255
258
|
return this.currentLang;
|
|
@@ -394,6 +397,7 @@ exports.StatusEvent = void 0;
|
|
|
394
397
|
StatusEvent["Done"] = "Done";
|
|
395
398
|
StatusEvent["Passive"] = "Passive";
|
|
396
399
|
StatusEvent["SelectCardTypeAndCountry"] = "SelectCardTypeAndCountry";
|
|
400
|
+
StatusEvent["CardThicknessFailed"] = "CardThicknessFailed";
|
|
397
401
|
})(exports.StatusEvent || (exports.StatusEvent = {}));
|
|
398
402
|
exports.StatusView = void 0;
|
|
399
403
|
(function (StatusView) {
|
|
@@ -448,6 +452,7 @@ exports.StatusDescription = void 0;
|
|
|
448
452
|
StatusDescription["UploadingStart"] = "UploadingStart";
|
|
449
453
|
StatusDescription["UploadingEnd"] = "UploadingEnd";
|
|
450
454
|
StatusDescription["Complete"] = "Complete";
|
|
455
|
+
StatusDescription["CardThicknessFailed"] = "CardThicknessFailed";
|
|
451
456
|
})(exports.StatusDescription || (exports.StatusDescription = {}));
|
|
452
457
|
|
|
453
458
|
class TrackingEvent {
|
package/index.js
CHANGED
|
@@ -46,8 +46,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
var name = "authme/sdk";
|
|
49
|
-
var version$1 = "2.
|
|
50
|
-
var date = "
|
|
49
|
+
var version$1 = "2.7.0";
|
|
50
|
+
var date = "2024-05-30T14:54:23+0000";
|
|
51
51
|
var packageInfo = {
|
|
52
52
|
name: name,
|
|
53
53
|
version: version$1,
|
|
@@ -213,9 +213,12 @@ class TranslateService {
|
|
|
213
213
|
fetchSource(path) {
|
|
214
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
215
|
for (let i = 0; i < this.languageOptions.length; i++) {
|
|
216
|
-
const resp = yield fetch(`${path}/${this.languageOptions[i]}.json`);
|
|
216
|
+
const [resp, oldKeyResp] = yield Promise.all([fetch(`${path}/${this.languageOptions[i]}.json`), fetch(`${path}/old/${this.languageOptions[i]}.json`)]);
|
|
217
|
+
if (oldKeyResp.ok && !localStorage.getItem('local')) {
|
|
218
|
+
this.originalDict[this.languageOptions[i]] = yield oldKeyResp.json();
|
|
219
|
+
}
|
|
217
220
|
if (resp.ok) {
|
|
218
|
-
this.originalDict[this.languageOptions[i]] = yield resp.json();
|
|
221
|
+
this.originalDict[this.languageOptions[i]] = Object.assign(Object.assign({}, this.originalDict[this.languageOptions[i]]), yield resp.json());
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
return true;
|
|
@@ -246,7 +249,7 @@ class TranslateService {
|
|
|
246
249
|
str = str.replace(new RegExp(`{{${key}}}`, 'g'), args[key].toString());
|
|
247
250
|
});
|
|
248
251
|
}
|
|
249
|
-
return str.replace(
|
|
252
|
+
return str.replace(/\n$/, '').replace(/\n/g, '<br>');
|
|
250
253
|
}
|
|
251
254
|
getCurrentLang() {
|
|
252
255
|
return this.currentLang;
|
|
@@ -391,6 +394,7 @@ var StatusEvent;
|
|
|
391
394
|
StatusEvent["Done"] = "Done";
|
|
392
395
|
StatusEvent["Passive"] = "Passive";
|
|
393
396
|
StatusEvent["SelectCardTypeAndCountry"] = "SelectCardTypeAndCountry";
|
|
397
|
+
StatusEvent["CardThicknessFailed"] = "CardThicknessFailed";
|
|
394
398
|
})(StatusEvent || (StatusEvent = {}));
|
|
395
399
|
var StatusView;
|
|
396
400
|
(function (StatusView) {
|
|
@@ -445,6 +449,7 @@ var StatusDescription;
|
|
|
445
449
|
StatusDescription["UploadingStart"] = "UploadingStart";
|
|
446
450
|
StatusDescription["UploadingEnd"] = "UploadingEnd";
|
|
447
451
|
StatusDescription["Complete"] = "Complete";
|
|
452
|
+
StatusDescription["CardThicknessFailed"] = "CardThicknessFailed";
|
|
448
453
|
})(StatusDescription || (StatusDescription = {}));
|
|
449
454
|
|
|
450
455
|
class TrackingEvent {
|
package/package.json
CHANGED
|
@@ -26,7 +26,8 @@ export declare enum StatusEvent {
|
|
|
26
26
|
Scale = "Scale",
|
|
27
27
|
Done = "Done",
|
|
28
28
|
Passive = "Passive",
|
|
29
|
-
SelectCardTypeAndCountry = "SelectCardTypeAndCountry"
|
|
29
|
+
SelectCardTypeAndCountry = "SelectCardTypeAndCountry",
|
|
30
|
+
CardThicknessFailed = "CardThicknessFailed"
|
|
30
31
|
}
|
|
31
32
|
export declare enum StatusView {
|
|
32
33
|
Info = "Info",
|
|
@@ -77,5 +78,6 @@ export declare enum StatusDescription {
|
|
|
77
78
|
NeedOpenEyes = "NeedOpenEyes",
|
|
78
79
|
UploadingStart = "UploadingStart",
|
|
79
80
|
UploadingEnd = "UploadingEnd",
|
|
80
|
-
Complete = "Complete"
|
|
81
|
+
Complete = "Complete",
|
|
82
|
+
CardThicknessFailed = "CardThicknessFailed"
|
|
81
83
|
}
|