@internetarchive/ia-book-actions 1.1.1 → 1.3.0

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": "1.1.1",
3
+ "version": "1.3.0",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -133,9 +133,9 @@ export class CollapsibleActionGroup extends ActionsHandler {
133
133
  return html`
134
134
  <div
135
135
  class="${classMap({
136
- actiongroup: true,
137
- disabled: this.disabled,
138
- })}"
136
+ actiongroup: true,
137
+ disabled: this.disabled,
138
+ })}"
139
139
  >
140
140
  ${this.getLoaderIcon}
141
141
  <section class="action-buttons primary">
@@ -194,12 +194,12 @@ export class CollapsibleActionGroup extends ActionsHandler {
194
194
  href="${action.url}"
195
195
  target=${action.target}
196
196
  @click=${() => {
197
- this.clickHandler(
198
- action.id,
199
- action.analyticsEvent,
200
- action?.borrowType
201
- );
202
- }}
197
+ this.clickHandler(
198
+ action.id,
199
+ action.analyticsEvent,
200
+ action?.borrowType
201
+ );
202
+ }}
203
203
  >
204
204
  ${action.id === 'purchaseBook' ? purchaseIcon : ''} ${action.text}
205
205
  <small>${action.subText}</small>
@@ -280,9 +280,9 @@ export class CollapsibleActionGroup extends ActionsHandler {
280
280
  get getLoaderIcon() {
281
281
  return html`<img
282
282
  class="${classMap({
283
- actionloader: true,
284
- disabled: this.disabled,
285
- })}"
283
+ actionloader: true,
284
+ disabled: this.disabled,
285
+ })}"
286
286
  alt=""
287
287
  src="${this.loaderIcon}"
288
288
  />`;
@@ -36,7 +36,7 @@ export default class ActionsConfig {
36
36
  firstBrowseConfig() {
37
37
  return {
38
38
  id: 'browseBook',
39
- text: 'Borrow (auto-renewing)',
39
+ text: 'Borrow',
40
40
  className: 'primary',
41
41
  analyticsEvent: {
42
42
  category: this.analyticsCategories.preview,
@@ -149,12 +149,12 @@ describe('Primary Actions data', () => {
149
149
  const expectedPrimaryActions = [
150
150
  {
151
151
  text: 'Borrow', // changed from 'Borrow for 1 hour'
152
- callback: () => {},
152
+ callback: () => { },
153
153
  className: 'ia-button primary',
154
154
  },
155
155
  {
156
156
  text: 'Borrow for 14 days',
157
- callback: () => {},
157
+ callback: () => { },
158
158
  className: 'ia-button primary',
159
159
  disabled: false,
160
160
  },
@@ -244,7 +244,7 @@ describe('Borrow status actions', () => {
244
244
  const expectedPrimaryActions = [
245
245
  {
246
246
  text: 'Log In and Borrow',
247
- callback: () => {},
247
+ callback: () => { },
248
248
  className: 'ia-button danger',
249
249
  },
250
250
  ];