@internetarchive/ia-book-actions 0.1.11-b13 → 0.1.11-b14

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.1.11-b13",
3
+ "version": "0.1.11-b14",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -322,6 +322,7 @@ export default class IABookActions extends LitElement {
322
322
  console.log('****** showWarningModal ******');
323
323
  // clear modal
324
324
  this.modal?.showModal(new ModalConfig({ customModalContent: nothing }));
325
+ this.modal.removeChild(this.modal.querySelector('#book-action-bar-custom-buttons'));
325
326
  this.modal?.closeModal();
326
327
 
327
328
  // if secondsLeft < 60, consider it 1 minute
@@ -343,7 +344,7 @@ export default class IABookActions extends LitElement {
343
344
  });
344
345
 
345
346
  const customModalContent = html`<br />
346
- <div id="custom-buttons" style="display:flex;justify-content:center;">
347
+ <div id="book-action-bar-custom-buttons" style="display:flex;justify-content:center;">
347
348
  <button
348
349
  style="${modalButtonStyle.iaButton} ${modalButtonStyle.renew}"
349
350
  @click=${event => this.patronWantsToRenewBook(event)}
@@ -421,14 +422,6 @@ export default class IABookActions extends LitElement {
421
422
  this.modal?.showModal({ config, customModalContent });
422
423
  }
423
424
 
424
- /**
425
- * close/hide modal-manager
426
- */
427
- async closeModalManager() {
428
- this.modal = document.querySelector('modal-manager');
429
- this.modal?.closeModal();
430
- }
431
-
432
425
  /**
433
426
  * @deprecated
434
427
  * create / select the toast-template component on DOM
@@ -665,7 +658,7 @@ export default class IABookActions extends LitElement {
665
658
 
666
659
  // close the modal
667
660
  this.modal.removeAttribute('id');
668
- this.modal?.showModal(new ModalConfig({ customModalContent: nothing }));
661
+ this.modal.removeChild(this.modal.querySelector('#book-action-bar-custom-buttons'));
669
662
  this.modal?.closeModal();
670
663
 
671
664
  window?.Sentry?.captureMessage(sentryLogs.bookHasRenewed);