@internetarchive/ia-book-actions 0.0.29-alpha42 → 0.0.29-alpha50
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetarchive/ia-book-actions",
|
|
3
|
-
"version": "0.0.29-
|
|
3
|
+
"version": "0.0.29-alpha50",
|
|
4
4
|
"description": "Bookreader actions for borrowable book",
|
|
5
5
|
"author": "Internet Archive",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@internetarchive/icon-info": "^1.2.6",
|
|
22
|
-
"@internetarchive/local-cache": "^0.2.
|
|
22
|
+
"@internetarchive/local-cache": "^0.2.1",
|
|
23
23
|
"@internetarchive/modal-manager": "^0.2.8",
|
|
24
24
|
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
25
25
|
"@internetarchive/toast-manager": "0.1.0",
|
|
@@ -44,12 +44,6 @@
|
|
|
44
44
|
"sinon": "^13.0.2"
|
|
45
45
|
},
|
|
46
46
|
"eslintConfig": {
|
|
47
|
-
"rules": {
|
|
48
|
-
"no-console": "warn",
|
|
49
|
-
"no-unused-expressions": "warn",
|
|
50
|
-
"class-methods-use-this": "warn",
|
|
51
|
-
"lit-a11y/click-events-have-key-events": "warn"
|
|
52
|
-
},
|
|
53
47
|
"extends": [
|
|
54
48
|
"@open-wc/eslint-config",
|
|
55
49
|
"eslint-config-prettier"
|
|
@@ -74,7 +74,6 @@ export default class TimerCountdown extends LitElement {
|
|
|
74
74
|
if (secondsLeft <= 1) {
|
|
75
75
|
clearInterval(this.timerInterval);
|
|
76
76
|
window?.Sentry?.captureMessage(sentryLogs.clearOneHourTimer);
|
|
77
|
-
console.log(sentryLogs.clearOneHourTimer);
|
|
78
77
|
}
|
|
79
78
|
}, timerIntervalSeconds * 1000);
|
|
80
79
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable class-methods-use-this */
|
|
2
|
+
|
|
1
3
|
import { nothing } from 'lit';
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -60,7 +62,6 @@ export class LoanRenewHelper {
|
|
|
60
62
|
if (lastTimeFrame !== null && currentTime >= lastTimeFrame) {
|
|
61
63
|
this.result.texts = this.loanRenewMessage;
|
|
62
64
|
this.result.renewNow = true;
|
|
63
|
-
console.log('manually renewed by page click!');
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
this.setPageChangedTime();
|
|
@@ -95,7 +96,6 @@ export class LoanRenewHelper {
|
|
|
95
96
|
} else if (pageChangedTime >= pageChangeTimeFrame) {
|
|
96
97
|
this.result.texts = '';
|
|
97
98
|
this.result.renewNow = true; // viewed in last time frame
|
|
98
|
-
console.log('silently renewed!');
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
return this.result;
|
package/src/ia-book-actions.js
CHANGED
|
@@ -258,7 +258,7 @@ export default class IABookActions extends LitElement {
|
|
|
258
258
|
*/
|
|
259
259
|
window.addEventListener('BookReader:userAction', () => {
|
|
260
260
|
if (this.borrowType === 'browsed') {
|
|
261
|
-
|
|
261
|
+
this.suppressToast = false;
|
|
262
262
|
this.autoLoanRenewChecker(true);
|
|
263
263
|
}
|
|
264
264
|
|
|
@@ -270,7 +270,6 @@ export default class IABookActions extends LitElement {
|
|
|
270
270
|
*/
|
|
271
271
|
document.addEventListener('click', e => {
|
|
272
272
|
if (this.loanRenewHelper && this.loanRenewResult.secondsLeft > 0) {
|
|
273
|
-
console.log('clicked-outside');
|
|
274
273
|
this.suppressToast = true;
|
|
275
274
|
}
|
|
276
275
|
|
|
@@ -401,7 +400,6 @@ export default class IABookActions extends LitElement {
|
|
|
401
400
|
this.showToastMessage();
|
|
402
401
|
|
|
403
402
|
window?.Sentry?.captureMessage(sentryLogs.browseHasExpired);
|
|
404
|
-
console.log(sentryLogs.browseHasExpired);
|
|
405
403
|
}
|
|
406
404
|
|
|
407
405
|
/**
|
|
@@ -502,7 +500,7 @@ export default class IABookActions extends LitElement {
|
|
|
502
500
|
await this.resetTimerCountState();
|
|
503
501
|
|
|
504
502
|
window?.Sentry?.captureMessage(`${sentryLogs.bookHasRenewed}`);
|
|
505
|
-
// analytics?? for consecutive renew.....
|
|
503
|
+
// TODO: analytics?? for consecutive renew.....
|
|
506
504
|
|
|
507
505
|
// testing console....
|
|
508
506
|
console.log(sentryLogs.bookHasRenewed, {
|