@internetarchive/ia-book-actions 0.1.11-b8 → 0.1.11-b9

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 CHANGED
@@ -356,5 +356,6 @@
356
356
  </table>
357
357
  </fieldset>
358
358
  </div>
359
+ <modal-manager></modal-manager>
359
360
  </body>
360
361
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-book-actions",
3
- "version": "0.1.11-b8",
3
+ "version": "0.1.11-b9",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -309,13 +309,7 @@ export default class IABookActions extends LitElement {
309
309
 
310
310
  /** @returns HTMLElement */
311
311
  get modal() {
312
- let modalOnDom = document.querySelector('modal-manager');
313
-
314
- if (!modalOnDom) {
315
- const newModal = document.createElement('modal-manager');
316
- document.body.appendChild(newModal);
317
- modalOnDom = newModal;
318
- }
312
+ const modalOnDom = document.querySelector('modal-manager');
319
313
 
320
314
  modalOnDom.id = 'action-bar-modal';
321
315
  return modalOnDom;
@@ -668,8 +662,7 @@ export default class IABookActions extends LitElement {
668
662
 
669
663
  // close the modal
670
664
  this.modal.removeAttribute('id');
671
- this.modal?.remove();
672
- this.modal?.showModal({ config: {}, customModalContent: `` });
665
+ this.modal.closeModal();
673
666
 
674
667
  window?.Sentry?.captureMessage(sentryLogs.bookHasRenewed);
675
668
  }