@internetarchive/ia-book-actions 0.0.29-alpha14 → 0.0.29-alpha15
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/demo/index.html +4 -5
- package/package.json +1 -1
- package/src/components/toast-message.js +0 -2
- package/src/ia-book-actions.js +1 -13
package/demo/index.html
CHANGED
|
@@ -105,10 +105,6 @@
|
|
|
105
105
|
const identifier = 'naturalhistoryof00unse_4111';
|
|
106
106
|
let bwbPurchaseUrl = 'https://www.betterworldbooks.com/product/detail/cambridge-ancient-hist-v04-0521044863';
|
|
107
107
|
|
|
108
|
-
let iaBookActions = document.querySelector('ia-book-actions');
|
|
109
|
-
|
|
110
|
-
// for debugging
|
|
111
|
-
window.iaBookActions = iaBookActions;
|
|
112
108
|
|
|
113
109
|
const modalConfig = new ModalConfig();
|
|
114
110
|
modalConfig.headerColor = '#d9534f';
|
|
@@ -118,6 +114,8 @@
|
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
// set defaultLendingStatus for unavailable (without borrowables) book
|
|
117
|
+
let iaBookActions = document.querySelector('ia-book-actions');
|
|
118
|
+
|
|
121
119
|
iaBookActions.userid = userid;
|
|
122
120
|
iaBookActions.identifier = identifier;
|
|
123
121
|
iaBookActions.bookTitle = 'Contemporary Black biography. Volume 39 : profiles from the interContemporary Black biography. Volume 39';
|
|
@@ -129,6 +127,7 @@
|
|
|
129
127
|
iaBookActions.returnUrl = 'https://openlibrary.org';
|
|
130
128
|
iaBookActions.localCache = localCache;
|
|
131
129
|
iaBookActions.loanRenewConfig = {
|
|
130
|
+
enable: false, // If loan renew is enabled
|
|
132
131
|
totalTime: 10, // 60 second = 1 min
|
|
133
132
|
autoCheckAt: 5, // totalTime - 10th minute
|
|
134
133
|
pageChangedInLast: 15, // within last 15 second/minute
|
|
@@ -302,7 +301,7 @@
|
|
|
302
301
|
<label><input type="checkbox" name="title" value="title" />Title Bar</label>
|
|
303
302
|
</td>
|
|
304
303
|
<td>
|
|
305
|
-
<button class="pageChangedEvent">Page Change</button>
|
|
304
|
+
<button class="pageChangedEvent">Page Change Event</button>
|
|
306
305
|
</td>
|
|
307
306
|
</tr>
|
|
308
307
|
</table>
|
package/package.json
CHANGED
|
@@ -5,14 +5,12 @@ export class ToastMessage extends LitElement {
|
|
|
5
5
|
return {
|
|
6
6
|
texts: { type: String },
|
|
7
7
|
dismisOnClick: { type: Boolean },
|
|
8
|
-
clostAfter: { type: Number },
|
|
9
8
|
};
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
constructor() {
|
|
13
12
|
super();
|
|
14
13
|
this.texts = null;
|
|
15
|
-
this.clostAfter = 0;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
render() {
|
package/src/ia-book-actions.js
CHANGED
|
@@ -120,6 +120,7 @@ export default class IABookActions extends LitElement {
|
|
|
120
120
|
this.executeLoanRenew();
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
console.log(this.loanRenewResult)
|
|
123
124
|
return nothing;
|
|
124
125
|
});
|
|
125
126
|
|
|
@@ -350,7 +351,6 @@ export default class IABookActions extends LitElement {
|
|
|
350
351
|
?renewNow=${this.loanRenewResult.renewNow}
|
|
351
352
|
@lendingActionError=${this.handleLendingActionError}
|
|
352
353
|
@toggleActionGroup=${this.handleToggleActionGroup}
|
|
353
|
-
@BookReader:pageChanged=${() => console.log('dfd')}
|
|
354
354
|
>
|
|
355
355
|
</collapsible-action-group>
|
|
356
356
|
${this.textGroupTemplate} ${this.infoIconTemplate}
|
|
@@ -358,18 +358,6 @@ export default class IABookActions extends LitElement {
|
|
|
358
358
|
`;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
// will move this function to bookreader...
|
|
362
|
-
pageChangedEvent() {
|
|
363
|
-
// dispatch event to say book page has flipped
|
|
364
|
-
document.querySelector('ia-book-actions').dispatchEvent(
|
|
365
|
-
new CustomEvent('BookReader:pageChanged', {
|
|
366
|
-
detail: { isPageChanged: true },
|
|
367
|
-
bubbles: true,
|
|
368
|
-
composed: true,
|
|
369
|
-
})
|
|
370
|
-
);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
361
|
/**
|
|
374
362
|
* enable access of borrowed/browsed books
|
|
375
363
|
*/
|