@internetarchive/ia-book-actions 0.0.7-8 → 0.0.7-9

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
@@ -104,6 +104,13 @@
104
104
  const modalConfig = new ModalConfig();
105
105
  modalConfig.headerColor = '#d9534f';
106
106
 
107
+ let lendingBarPostInit = function lendingBarPostInit() {
108
+ setTimeout(function() {
109
+ console.log('executed');
110
+ // emitLendingActionBarInitEvent();
111
+ // brInit();
112
+ }, 100);
113
+ }
107
114
  // set defaultLendingStatus for unavailable (without borrowables) book
108
115
  iaBookActions.userid = userid;
109
116
  iaBookActions.identifier = identifier;
@@ -112,9 +119,7 @@
112
119
  iaBookActions.bwbPurchaseUrl = '';
113
120
  iaBookActions.barType = '';
114
121
  iaBookActions.modalConfig = modalConfig;
115
- iaBookActions.lendingBarPostInit = (event) => {
116
- console.log('callback executed1!!!');
117
- };
122
+ iaBookActions.lendingBarPostInit = lendingBarPostInit;
118
123
 
119
124
  let lendingStatus1 = iaBookActions.lendingStatus;
120
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-book-actions",
3
- "version": "0.0.7-8",
3
+ "version": "0.0.7-9",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -70,8 +70,7 @@ export class LoanTokenPoller extends LitElement {
70
70
 
71
71
  async handleLoanTokenPoller() {
72
72
  const action = 'create_token';
73
- await new Promise(r => setTimeout(r, 3000));
74
- console.log('here');
73
+ // await new Promise(r => setTimeout(r, 3000));
75
74
  ActionsHandlerService({
76
75
  identifier: this.identifier,
77
76
  action,
@@ -167,7 +167,8 @@ export default class IABookActions extends LoanTokenPoller {
167
167
  * - disptach lenfingFlow::PostInit event
168
168
  * - initialize bookreader using br.init()
169
169
  */
170
- this.lendingBarPostInit();
170
+ console.log(this.lendingBarPostInit);
171
+ this.lendingBarPostInit;
171
172
  }
172
173
 
173
174
  render() {