@internetarchive/bookreader 5.0.0-38 → 5.0.0-39
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.css +8 -0
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +99 -75
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/CHANGELOG.md +5 -0
- package/README.md +13 -0
- package/package.json +14 -14
- package/renovate.json +1 -1
- package/src/BookReader/Mode1UpLit.js +7 -1
- package/src/BookReader/Mode2Up.js +11 -0
- package/src/BookReader/ModeSmoothZoom.js +2 -0
- package/src/BookReader/PageContainer.js +10 -4
- package/src/BookReader/utils/ScrollClassAdder.js +31 -0
- package/src/assets/icons/magnify-minus.svg +3 -7
- package/src/assets/icons/magnify-plus.svg +3 -7
- package/src/css/_TextSelection.scss +13 -0
- package/tests/jest/BookReader/PageContainer.test.js +5 -4
- package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +49 -0
- package/.husky/_/husky.sh +0 -30
- package/stat/BookNavigator/BookModel.js +0 -14
- package/stat/BookNavigator/BookNavigator.js +0 -524
- package/stat/BookNavigator/assets/bookmark-colors.js +0 -15
- package/stat/BookNavigator/assets/button-base.js +0 -61
- package/stat/BookNavigator/assets/ia-logo.js +0 -17
- package/stat/BookNavigator/assets/icon_checkmark.js +0 -6
- package/stat/BookNavigator/assets/icon_close.js +0 -3
- package/stat/BookNavigator/assets/icon_sort_asc.js +0 -5
- package/stat/BookNavigator/assets/icon_sort_desc.js +0 -5
- package/stat/BookNavigator/assets/icon_sort_neutral.js +0 -5
- package/stat/BookNavigator/assets/icon_volumes.js +0 -11
- package/stat/BookNavigator/bookmarks/bookmark-button.js +0 -64
- package/stat/BookNavigator/bookmarks/bookmark-edit.js +0 -215
- package/stat/BookNavigator/bookmarks/bookmarks-list.js +0 -285
- package/stat/BookNavigator/bookmarks/bookmarks-loginCTA.js +0 -28
- package/stat/BookNavigator/bookmarks/bookmarks-provider.js +0 -56
- package/stat/BookNavigator/bookmarks/ia-bookmarks.js +0 -523
- package/stat/BookNavigator/br-fullscreen-mgr.js +0 -82
- package/stat/BookNavigator/delete-modal-actions.js +0 -49
- package/stat/BookNavigator/downloads/downloads-provider.js +0 -72
- package/stat/BookNavigator/downloads/downloads.js +0 -139
- package/stat/BookNavigator/provider-config.js +0 -0
- package/stat/BookNavigator/search/a-search-result.js +0 -55
- package/stat/BookNavigator/search/search-provider.js +0 -180
- package/stat/BookNavigator/search/search-results.js +0 -360
- package/stat/BookNavigator/sharing.js +0 -31
- package/stat/BookNavigator/visual-adjustments/visual-adjustments-provider.js +0 -94
- package/stat/BookNavigator/visual-adjustments/visual-adjustments.js +0 -280
- package/stat/BookNavigator/volumes/volumes-provider.js +0 -83
- package/stat/BookNavigator/volumes/volumes.js +0 -178
- package/stat/BookReader/BookModel.js +0 -518
- package/stat/BookReader/DebugConsole.js +0 -54
- package/stat/BookReader/DragScrollable.js +0 -233
- package/stat/BookReader/ImageCache.js +0 -116
- package/stat/BookReader/Mode1Up.js +0 -102
- package/stat/BookReader/Mode1UpLit.js +0 -434
- package/stat/BookReader/Mode2Up.js +0 -1372
- package/stat/BookReader/ModeSmoothZoom.js +0 -177
- package/stat/BookReader/ModeThumb.js +0 -344
- package/stat/BookReader/Navbar/Navbar.js +0 -310
- package/stat/BookReader/PageContainer.js +0 -120
- package/stat/BookReader/ReduceSet.js +0 -26
- package/stat/BookReader/Toolbar/Toolbar.js +0 -384
- package/stat/BookReader/events.js +0 -20
- package/stat/BookReader/options.js +0 -324
- package/stat/BookReader/utils/HTMLDimensionsCacher.js +0 -44
- package/stat/BookReader/utils/classes.js +0 -36
- package/stat/BookReader/utils.js +0 -240
- package/stat/BookReader.js +0 -2550
- package/stat/BookReaderComponent/BookReaderComponent.js +0 -117
- package/stat/assets/icons/1up.svg +0 -12
- package/stat/assets/icons/2up.svg +0 -15
- package/stat/assets/icons/advance.svg +0 -26
- package/stat/assets/icons/chevron-right.svg +0 -1
- package/stat/assets/icons/close-circle-dark.svg +0 -1
- package/stat/assets/icons/close-circle.svg +0 -1
- package/stat/assets/icons/fullscreen.svg +0 -17
- package/stat/assets/icons/fullscreen_exit.svg +0 -17
- package/stat/assets/icons/hamburger.svg +0 -15
- package/stat/assets/icons/left-arrow.svg +0 -12
- package/stat/assets/icons/magnify-minus.svg +0 -16
- package/stat/assets/icons/magnify-plus.svg +0 -17
- package/stat/assets/icons/magnify.svg +0 -15
- package/stat/assets/icons/pause.svg +0 -23
- package/stat/assets/icons/play.svg +0 -22
- package/stat/assets/icons/playback-speed.svg +0 -34
- package/stat/assets/icons/read-aloud.svg +0 -22
- package/stat/assets/icons/review.svg +0 -22
- package/stat/assets/icons/thumbnails.svg +0 -17
- package/stat/assets/icons/voice.svg +0 -1
- package/stat/assets/icons/volume-full.svg +0 -22
- package/stat/assets/images/BRicons.png +0 -0
- package/stat/assets/images/BRicons.svg +0 -94
- package/stat/assets/images/BRicons_ia.png +0 -0
- package/stat/assets/images/back_pages.png +0 -0
- package/stat/assets/images/book_bottom_icon.png +0 -0
- package/stat/assets/images/book_down_icon.png +0 -0
- package/stat/assets/images/book_left_icon.png +0 -0
- package/stat/assets/images/book_leftmost_icon.png +0 -0
- package/stat/assets/images/book_right_icon.png +0 -0
- package/stat/assets/images/book_rightmost_icon.png +0 -0
- package/stat/assets/images/book_top_icon.png +0 -0
- package/stat/assets/images/book_up_icon.png +0 -0
- package/stat/assets/images/books_graphic.svg +0 -177
- package/stat/assets/images/booksplit.png +0 -0
- package/stat/assets/images/control_pause_icon.png +0 -0
- package/stat/assets/images/control_play_icon.png +0 -0
- package/stat/assets/images/embed_icon.png +0 -0
- package/stat/assets/images/icon-home-ia.png +0 -0
- package/stat/assets/images/icon_OL-logo-xs.png +0 -0
- package/stat/assets/images/icon_alert-xs.png +0 -0
- package/stat/assets/images/icon_book.svg +0 -12
- package/stat/assets/images/icon_bookmark.svg +0 -12
- package/stat/assets/images/icon_close-pop.png +0 -0
- package/stat/assets/images/icon_download.png +0 -0
- package/stat/assets/images/icon_gear.svg +0 -14
- package/stat/assets/images/icon_hamburger.svg +0 -20
- package/stat/assets/images/icon_home.png +0 -0
- package/stat/assets/images/icon_home.svg +0 -21
- package/stat/assets/images/icon_home_ia.png +0 -0
- package/stat/assets/images/icon_indicator.png +0 -0
- package/stat/assets/images/icon_info.svg +0 -11
- package/stat/assets/images/icon_one_page.svg +0 -8
- package/stat/assets/images/icon_pause.svg +0 -1
- package/stat/assets/images/icon_play.svg +0 -1
- package/stat/assets/images/icon_playback-rate.svg +0 -15
- package/stat/assets/images/icon_return.png +0 -0
- package/stat/assets/images/icon_search_button.svg +0 -8
- package/stat/assets/images/icon_share.svg +0 -9
- package/stat/assets/images/icon_skip-ahead.svg +0 -6
- package/stat/assets/images/icon_skip-back.svg +0 -13
- package/stat/assets/images/icon_speaker.svg +0 -18
- package/stat/assets/images/icon_speaker_open.svg +0 -10
- package/stat/assets/images/icon_thumbnails.svg +0 -12
- package/stat/assets/images/icon_toc.svg +0 -5
- package/stat/assets/images/icon_two_pages.svg +0 -9
- package/stat/assets/images/icon_zoomer.png +0 -0
- package/stat/assets/images/loading.gif +0 -0
- package/stat/assets/images/logo_icon.png +0 -0
- package/stat/assets/images/marker_chap-off.png +0 -0
- package/stat/assets/images/marker_chap-off.svg +0 -11
- package/stat/assets/images/marker_chap-off_ia.png +0 -0
- package/stat/assets/images/marker_chap-on.png +0 -0
- package/stat/assets/images/marker_chap-on.svg +0 -11
- package/stat/assets/images/marker_srch-on.svg +0 -11
- package/stat/assets/images/marker_srchchap-off.png +0 -0
- package/stat/assets/images/marker_srchchap-on.png +0 -0
- package/stat/assets/images/nav_control-dn.png +0 -0
- package/stat/assets/images/nav_control-dn_ia.png +0 -0
- package/stat/assets/images/nav_control-up.png +0 -0
- package/stat/assets/images/nav_control-up_ia.png +0 -0
- package/stat/assets/images/nav_control.png +0 -0
- package/stat/assets/images/one_page_mode_icon.png +0 -0
- package/stat/assets/images/paper-badge.png +0 -0
- package/stat/assets/images/print_icon.png +0 -0
- package/stat/assets/images/progressbar.gif +0 -0
- package/stat/assets/images/right_edges.png +0 -0
- package/stat/assets/images/slider.png +0 -0
- package/stat/assets/images/slider_ia.png +0 -0
- package/stat/assets/images/thumbnail_mode_icon.png +0 -0
- package/stat/assets/images/transparent.png +0 -0
- package/stat/assets/images/two_page_mode_icon.png +0 -0
- package/stat/assets/images/zoom_in_icon.png +0 -0
- package/stat/assets/images/zoom_out_icon.png +0 -0
- package/stat/css/BookReader.scss +0 -89
- package/stat/css/_BRBookmarks.scss +0 -29
- package/stat/css/_BRComponent.scss +0 -13
- package/stat/css/_BRfloat.scss +0 -197
- package/stat/css/_BRicon.scss +0 -48
- package/stat/css/_BRmain.scss +0 -251
- package/stat/css/_BRnav.scss +0 -359
- package/stat/css/_BRpages.scss +0 -139
- package/stat/css/_BRsearch.scss +0 -226
- package/stat/css/_BRtoolbar.scss +0 -84
- package/stat/css/_BRvendor.scss +0 -5
- package/stat/css/_MobileNav.scss +0 -194
- package/stat/css/_TextSelection.scss +0 -32
- package/stat/css/_colorbox.scss +0 -52
- package/stat/css/_controls.scss +0 -253
- package/stat/css/_icons.scss +0 -121
- package/stat/jquery-wrapper.js +0 -4
- package/stat/plugins/plugin.archive_analytics.js +0 -86
- package/stat/plugins/plugin.autoplay.js +0 -129
- package/stat/plugins/plugin.chapters.js +0 -248
- package/stat/plugins/plugin.iframe.js +0 -48
- package/stat/plugins/plugin.mobile_nav.js +0 -288
- package/stat/plugins/plugin.resume.js +0 -68
- package/stat/plugins/plugin.text_selection.js +0 -291
- package/stat/plugins/plugin.url.js +0 -198
- package/stat/plugins/plugin.vendor-fullscreen.js +0 -247
- package/stat/plugins/search/plugin.search.js +0 -439
- package/stat/plugins/search/view.js +0 -439
- package/stat/plugins/tts/AbstractTTSEngine.js +0 -249
- package/stat/plugins/tts/FestivalTTSEngine.js +0 -169
- package/stat/plugins/tts/PageChunk.js +0 -107
- package/stat/plugins/tts/PageChunkIterator.js +0 -163
- package/stat/plugins/tts/WebTTSEngine.js +0 -357
- package/stat/plugins/tts/plugin.tts.js +0 -357
- package/stat/plugins/tts/tooltip_dict.js +0 -15
- package/stat/plugins/tts/utils.js +0 -91
- package/stat/util/browserSniffing.js +0 -30
- package/stat/util/debouncer.js +0 -26
- package/stat/util/docCookies.js +0 -67
- package/stat/util/strings.js +0 -34
@@ -1,524 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
<script src="foo-plugin.js"></script>
|
3
|
-
|
4
|
-
foo-plugin.js
|
5
|
-
|
6
|
-
$('#foo-plugin').dataSet('MainController', 'bar');
|
7
|
-
|
8
|
-
<ia-bookreader>
|
9
|
-
<div slot="plugins">
|
10
|
-
<ia-search></ia-search>
|
11
|
-
<book-marks></book-marks>
|
12
|
-
</div>
|
13
|
-
</ia-bookreader>
|
14
|
-
|
15
|
-
iaBookreader.registerPlugin('foo-plugin', Class);
|
16
|
-
|
17
|
-
|
18
|
-
class IABr extends LItElement {
|
19
|
-
|
20
|
-
render() {
|
21
|
-
|
22
|
-
registerPlugins() {
|
23
|
-
this.pluginSlots.map(slot => {
|
24
|
-
.. to slot registry
|
25
|
-
each slot - do handshake
|
26
|
-
|
27
|
-
|
28
|
-
});
|
29
|
-
}
|
30
|
-
|
31
|
-
html`
|
32
|
-
<div slot="plugins" @onslotchange=${() => x}></div>
|
33
|
-
`;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
*/
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
import { css, html, LitElement } from 'lit-element';
|
43
|
-
import { SharedResizeObserver } from '@internetarchive/shared-resize-observer';
|
44
|
-
import SearchProvider from './search/search-provider.js';
|
45
|
-
import DownloadProvider from './downloads/downloads-provider.js';
|
46
|
-
import VisualAdjustmentProvider from './visual-adjustments/visual-adjustments-provider.js';
|
47
|
-
import BookmarksProvider from './bookmarks/bookmarks-provider.js';
|
48
|
-
import SharingProvider from './sharing.js';
|
49
|
-
import VolumesProvider from './volumes/volumes-provider.js';
|
50
|
-
import BRFullscreenMgr from './br-fullscreen-mgr.js';
|
51
|
-
import { Book } from './BookModel.js';
|
52
|
-
import iaLogo from './assets/ia-logo.js';
|
53
|
-
|
54
|
-
const events = {
|
55
|
-
menuUpdated: 'menuUpdated',
|
56
|
-
updateSideMenu: 'updateSideMenu',
|
57
|
-
PostInit: 'PostInit',
|
58
|
-
ViewportInFullScreen: 'ViewportInFullScreen',
|
59
|
-
};
|
60
|
-
export class BookNavigator extends LitElement {
|
61
|
-
static get properties() {
|
62
|
-
return {
|
63
|
-
book: { type: Object },
|
64
|
-
pageContainerSelector: { type: String },
|
65
|
-
brWidth: { type: Number },
|
66
|
-
bookReaderLoaded: { type: Boolean },
|
67
|
-
bookreader: { type: Object },
|
68
|
-
downloadableTypes: { type: Array },
|
69
|
-
isAdmin: { type: Boolean },
|
70
|
-
lendingInitialized: { type: Boolean },
|
71
|
-
lendingStatus: { type: Object },
|
72
|
-
menuProviders: { type: Object },
|
73
|
-
menuShortcuts: { type: Array },
|
74
|
-
sideMenuOpen: { type: Boolean },
|
75
|
-
signedIn: { type: Boolean },
|
76
|
-
sharedObserver: { type: Object },
|
77
|
-
fullscreenBranding: { type: Object },
|
78
|
-
addBranding: { type: Boolean },
|
79
|
-
};
|
80
|
-
}
|
81
|
-
|
82
|
-
constructor() {
|
83
|
-
super();
|
84
|
-
this.book = {};
|
85
|
-
this.pageContainerSelector = '.BRcontainer';
|
86
|
-
this.brWidth = 0;
|
87
|
-
this.bookReaderCannotLoad = false;
|
88
|
-
this.bookReaderLoaded = false;
|
89
|
-
this.bookreader = null;
|
90
|
-
this.downloadableTypes = [];
|
91
|
-
this.isAdmin = false;
|
92
|
-
this.lendingInitialized = false;
|
93
|
-
this.lendingStatus = {};
|
94
|
-
this.menuProviders = {};
|
95
|
-
this.menuShortcuts = [];
|
96
|
-
this.sideMenuOpen = false;
|
97
|
-
this.signedIn = false;
|
98
|
-
this.modal = undefined;
|
99
|
-
this.sharedObserver = undefined;
|
100
|
-
this.fullscreenBranding = iaLogo;
|
101
|
-
this.addBranding = true;
|
102
|
-
// Untracked properties
|
103
|
-
this.fullscreenMgr = null;
|
104
|
-
this.sharedObserver = null;
|
105
|
-
this.model = new Book();
|
106
|
-
this.shortcutOrder = ['fullscreen', 'volumes', 'search', 'bookmarks'];
|
107
|
-
}
|
108
|
-
|
109
|
-
firstUpdated() {
|
110
|
-
this.model.setMetadata(this.book);
|
111
|
-
this.bindEventListeners();
|
112
|
-
this.emitPostInit();
|
113
|
-
}
|
114
|
-
|
115
|
-
updated(changed) {
|
116
|
-
if (!this.bookreader) {
|
117
|
-
return;
|
118
|
-
}
|
119
|
-
if (changed.has('signedIn') || changed.has('isAdmin')) {
|
120
|
-
/** redraw book submenus to propagate property update */
|
121
|
-
this.initializeBookSubmenus();
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
/**
|
126
|
-
* Global event emitter for when Book Navigator loads
|
127
|
-
*/
|
128
|
-
emitPostInit() {
|
129
|
-
// emit global event when book nav has loaded with current bookreader selector
|
130
|
-
this.dispatchEvent(new CustomEvent(`BrBookNav:${events.PostInit}`, {
|
131
|
-
detail: { brSelector: this.bookreader?.el },
|
132
|
-
bubbles: true,
|
133
|
-
composed: true,
|
134
|
-
}));
|
135
|
-
}
|
136
|
-
|
137
|
-
/**
|
138
|
-
* Instantiates books submenus & their update callbacks
|
139
|
-
*
|
140
|
-
* NOTE: we are doing our best to scope bookreader's instance.
|
141
|
-
* If your submenu provider uses a bookreader instance to read, manually
|
142
|
-
* manipulate BookReader, please update the navigator's instance of it
|
143
|
-
* to keep it in sync.
|
144
|
-
*/
|
145
|
-
initializeBookSubmenus() {
|
146
|
-
const isBookProtected = this.bookreader.options.protected;
|
147
|
-
|
148
|
-
// const baseProviderConfig = {
|
149
|
-
// modal: this.modal,
|
150
|
-
// sharedObserver: this.sharedObserver,
|
151
|
-
// bookreader: this.bookreader,
|
152
|
-
// signedIn: this.signedIn,
|
153
|
-
// isAdmin: this.isAdmin,
|
154
|
-
// };
|
155
|
-
|
156
|
-
this.menuProviders = {
|
157
|
-
// if enableSearch ?
|
158
|
-
search: new SearchProvider(
|
159
|
-
/**
|
160
|
-
* Search specific menu updates
|
161
|
-
* @param {BookReader} brInstance
|
162
|
-
* @param {{ searchCanceled: boolean }} searchUpdates
|
163
|
-
*/
|
164
|
-
(brInstance = null, searchUpdates = {}) => {
|
165
|
-
if (brInstance) {
|
166
|
-
/* refresh br instance reference */
|
167
|
-
this.bookreader = brInstance;
|
168
|
-
}
|
169
|
-
this.updateMenuContents();
|
170
|
-
const wideEnoughToOpenMenu = this.brWidth >= 640;
|
171
|
-
if (wideEnoughToOpenMenu && !searchUpdates?.searchCanceled) {
|
172
|
-
/* open side search menu */
|
173
|
-
this.updateSideMenu('search', 'open');
|
174
|
-
}
|
175
|
-
},
|
176
|
-
this.bookreader,
|
177
|
-
),
|
178
|
-
downloads: new DownloadProvider(isBookProtected),
|
179
|
-
visualAdjustments: new VisualAdjustmentProvider({
|
180
|
-
onOptionChange: (event, brInstance = null) => {
|
181
|
-
if (brInstance) {
|
182
|
-
/* refresh br instance reference */
|
183
|
-
this.bookreader = brInstance;
|
184
|
-
}
|
185
|
-
this.updateMenuContents();
|
186
|
-
},
|
187
|
-
bookContainerSelector: this.pageContainerSelector,
|
188
|
-
bookreader: this.bookreader,
|
189
|
-
}),
|
190
|
-
share: new SharingProvider(this.book.metadata, this.baseHost, this.itemType, this.bookreader.options.subPrefix),
|
191
|
-
bookmarks: new BookmarksProvider(this.bookmarksOptions),
|
192
|
-
};
|
193
|
-
|
194
|
-
// add shortcut for volumes if multipleBooksList exists
|
195
|
-
if (this.bookreader.options.enableMultipleBooks) {
|
196
|
-
this.menuProviders.volumes = new VolumesProvider(this.baseHost, this.bookreader, (brInstance) => {
|
197
|
-
if (brInstance) {
|
198
|
-
/* refresh br instance reference */
|
199
|
-
this.bookreader = brInstance;
|
200
|
-
}
|
201
|
-
this.updateMenuContents();
|
202
|
-
this.updateSideMenu('volumes', 'open');
|
203
|
-
});
|
204
|
-
this.addMenuShortcut('volumes');
|
205
|
-
}
|
206
|
-
|
207
|
-
this.addMenuShortcut('search'); /* start with search as a shortcut */
|
208
|
-
this.updateMenuContents();
|
209
|
-
}
|
210
|
-
|
211
|
-
/** gets element that houses the bookreader in light dom */
|
212
|
-
get mainBRContainer() {
|
213
|
-
return document.querySelector(this.bookreader.el);
|
214
|
-
}
|
215
|
-
|
216
|
-
get bookmarksOptions() {
|
217
|
-
const referrerStr = `referer=${encodeURIComponent(location.href)}`;
|
218
|
-
return {
|
219
|
-
loginUrl: `https://${this.baseHost}/account/login?${referrerStr}`,
|
220
|
-
signedIn: this.signedIn,
|
221
|
-
displayMode: this.signedIn ? 'bookmarks' : 'login',
|
222
|
-
isAdmin: this.isAdmin,
|
223
|
-
modal: this.modal,
|
224
|
-
sharedObserver: this.sharedObserver,
|
225
|
-
bookreader: this.bookreader,
|
226
|
-
onBookmarksChanged: (bookmarks, showSidePanel = false) => {
|
227
|
-
console.log('booknav on bkch', bookmarks, showSidePanel);
|
228
|
-
if (showSidePanel) {
|
229
|
-
this.updateSideMenu('bookmarks', 'open');
|
230
|
-
}
|
231
|
-
const method = Object.keys(bookmarks).length ? 'add' : 'remove';
|
232
|
-
this[`${method}MenuShortcut`]('bookmarks');
|
233
|
-
this.updateMenuContents();
|
234
|
-
},
|
235
|
-
};
|
236
|
-
}
|
237
|
-
|
238
|
-
/** Fullscreen Shortcut */
|
239
|
-
addFullscreenShortcut() {
|
240
|
-
const closeFS = {
|
241
|
-
icon: this.fullscreenShortcut,
|
242
|
-
id: 'fullscreen',
|
243
|
-
};
|
244
|
-
this.menuShortcuts.push(closeFS);
|
245
|
-
this.sortMenuShortcuts();
|
246
|
-
this.emitMenuShortcutsUpdated();
|
247
|
-
}
|
248
|
-
|
249
|
-
deleteFullscreenShortcut() {
|
250
|
-
console.log('delete fullscreenshortcut', this.menuShortcuts);
|
251
|
-
const updatedShortcuts = this.menuShortcuts.filter(({ id }) => {
|
252
|
-
return id !== 'fullscreen';
|
253
|
-
});
|
254
|
-
console.log('updatedShortcuts', updatedShortcuts);
|
255
|
-
this.menuShortcuts = updatedShortcuts;
|
256
|
-
this.sortMenuShortcuts();
|
257
|
-
this.emitMenuShortcutsUpdated();
|
258
|
-
}
|
259
|
-
|
260
|
-
closeFullscreen() {
|
261
|
-
this.bookreader.exitFullScreen();
|
262
|
-
}
|
263
|
-
|
264
|
-
get fullscreenShortcut() {
|
265
|
-
return html`
|
266
|
-
<button
|
267
|
-
@click=${() => this.closeFullscreen()}
|
268
|
-
title="Exit fullscreen view"
|
269
|
-
>${this.fullscreenBranding}</button>
|
270
|
-
`;
|
271
|
-
}
|
272
|
-
/** End Fullscreen Shortcut */
|
273
|
-
|
274
|
-
/**
|
275
|
-
* Open side menu
|
276
|
-
* @param {string} menuId
|
277
|
-
* @param {('open'|'close'|'toggle')} action
|
278
|
-
*/
|
279
|
-
updateSideMenu(menuId = '', action = 'open') {
|
280
|
-
if (!menuId || !action) {
|
281
|
-
return;
|
282
|
-
}
|
283
|
-
const event = new CustomEvent(
|
284
|
-
events.updateSideMenu, {
|
285
|
-
detail: { menuId, action },
|
286
|
-
},
|
287
|
-
);
|
288
|
-
this.dispatchEvent(event);
|
289
|
-
}
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Sets order of menu and emits custom event when done
|
293
|
-
*/
|
294
|
-
updateMenuContents() {
|
295
|
-
const {
|
296
|
-
search, downloads, visualAdjustments, share, bookmarks, volumes
|
297
|
-
} = this.menuProviders;
|
298
|
-
const availableMenus = [volumes, search, bookmarks, visualAdjustments, share].filter((menu) => !!menu);
|
299
|
-
|
300
|
-
if (this.shouldShowDownloadsMenu()) {
|
301
|
-
downloads?.update(this.downloadableTypes);
|
302
|
-
availableMenus.splice(1, 0, downloads);
|
303
|
-
}
|
304
|
-
|
305
|
-
const event = new CustomEvent(
|
306
|
-
events.menuUpdated, {
|
307
|
-
detail: availableMenus,
|
308
|
-
},
|
309
|
-
);
|
310
|
-
this.dispatchEvent(event);
|
311
|
-
}
|
312
|
-
|
313
|
-
/**
|
314
|
-
* Confirms if we should show the downloads menu
|
315
|
-
* @returns {bool}
|
316
|
-
*/
|
317
|
-
shouldShowDownloadsMenu() {
|
318
|
-
if (this.model.isRestricted === false) { return true; }
|
319
|
-
if (this.isAdmin) { return true; }
|
320
|
-
const { user_loan_record = {} } = this.lendingStatus;
|
321
|
-
const hasNoLoanRecord = Array.isArray(user_loan_record); /* (bc PHP assoc. arrays) */
|
322
|
-
|
323
|
-
if (hasNoLoanRecord) { return false; }
|
324
|
-
|
325
|
-
const hasValidLoan = user_loan_record.type && (user_loan_record.type !== 'SESSION_LOAN');
|
326
|
-
return hasValidLoan;
|
327
|
-
}
|
328
|
-
|
329
|
-
/**
|
330
|
-
* Adds a provider object to the menuShortcuts array property if it isn't
|
331
|
-
* already added. menuShortcuts are then sorted by shortcutOrder and
|
332
|
-
* a menuShortcutsUpdated event is emitted.
|
333
|
-
*
|
334
|
-
* @param {string} menuId - a string matching the id property of a provider
|
335
|
-
*/
|
336
|
-
addMenuShortcut(menuId) {
|
337
|
-
if (this.menuShortcuts.find((m) => m.id === menuId)) { return; }
|
338
|
-
|
339
|
-
this.menuShortcuts.push(this.menuProviders[menuId]);
|
340
|
-
this.sortMenuShortcuts();
|
341
|
-
this.emitMenuShortcutsUpdated();
|
342
|
-
}
|
343
|
-
|
344
|
-
/**
|
345
|
-
* Removes a provider object from the menuShortcuts array and emits a
|
346
|
-
* menuShortcutsUpdated event.
|
347
|
-
*
|
348
|
-
* @param {string} menuId - a string matching the id property of a provider
|
349
|
-
*/
|
350
|
-
removeMenuShortcut(menuId) {
|
351
|
-
this.menuShortcuts = this.menuShortcuts.filter((m) => m.id !== menuId);
|
352
|
-
this.emitMenuShortcutsUpdated();
|
353
|
-
}
|
354
|
-
|
355
|
-
/**
|
356
|
-
* Sorts the menuShortcuts property by comparing each provider's id to
|
357
|
-
* the id in each iteration over the shortcutOrder array.
|
358
|
-
*/
|
359
|
-
sortMenuShortcuts() {
|
360
|
-
this.menuShortcuts = this.shortcutOrder.reduce((shortcuts, id) => {
|
361
|
-
const menu = this.menuShortcuts.find((m) => m.id === id);
|
362
|
-
if (menu) { shortcuts.push(menu); }
|
363
|
-
return shortcuts;
|
364
|
-
}, []);
|
365
|
-
}
|
366
|
-
|
367
|
-
emitMenuShortcutsUpdated() {
|
368
|
-
const event = new CustomEvent('menuShortcutsUpdated', {
|
369
|
-
detail: this.menuShortcuts,
|
370
|
-
});
|
371
|
-
this.dispatchEvent(event);
|
372
|
-
}
|
373
|
-
|
374
|
-
emitLoadingStatusUpdate(loaded) {
|
375
|
-
const event = new CustomEvent('loadingStateUpdated', {
|
376
|
-
detail: { loaded },
|
377
|
-
});
|
378
|
-
this.dispatchEvent(event);
|
379
|
-
}
|
380
|
-
|
381
|
-
/**
|
382
|
-
* Core bookreader event handler registry
|
383
|
-
*
|
384
|
-
* NOTE: we are trying to keep bookreader's instance in scope
|
385
|
-
* Please update Book Navigator's instance reference of it to keep it current
|
386
|
-
*/
|
387
|
-
bindEventListeners() {
|
388
|
-
window.addEventListener('BookReader:PostInit', (e) => {
|
389
|
-
console.log('BookReader:PostInit');
|
390
|
-
this.bookreader = e.detail.props;
|
391
|
-
this.bookReaderLoaded = true;
|
392
|
-
this.bookReaderCannotLoad = false;
|
393
|
-
this.fullscreenMgr = new BRFullscreenMgr(this.bookreader.el);
|
394
|
-
|
395
|
-
this.initializeBookSubmenus();
|
396
|
-
this.startResizeObserver();
|
397
|
-
this.emitLoadingStatusUpdate(true);
|
398
|
-
});
|
399
|
-
window.addEventListener('BookReader:fullscreenToggled', (event) => {
|
400
|
-
console.log('BookReader:fullscreenToggled');
|
401
|
-
const { detail: { props: brInstance = null } } = event;
|
402
|
-
if (brInstance) {
|
403
|
-
this.bookreader = brInstance;
|
404
|
-
}
|
405
|
-
this.manageFullScreenBehavior(event);
|
406
|
-
if (this.bookreader.isFullscreenActive) {
|
407
|
-
this.addFullscreenShortcut();
|
408
|
-
} else {
|
409
|
-
this.deleteFullscreenShortcut();
|
410
|
-
}
|
411
|
-
}, { passive: true });
|
412
|
-
window.addEventListener('BookReader:ToggleSearchMenu', (event) => {
|
413
|
-
this.dispatchEvent(new CustomEvent(events.updateSideMenu, {
|
414
|
-
detail: { menuId: 'search', action: 'toggle' },
|
415
|
-
}));
|
416
|
-
});
|
417
|
-
window.addEventListener('LendingFlow:PostInit', ({ detail }) => {
|
418
|
-
console.log('LendingFlow:PostInit');
|
419
|
-
const {
|
420
|
-
downloadTypesAvailable, lendingStatus, isAdmin, previewType,
|
421
|
-
} = detail;
|
422
|
-
this.lendingInitialized = true;
|
423
|
-
this.downloadableTypes = downloadTypesAvailable;
|
424
|
-
this.lendingStatus = lendingStatus;
|
425
|
-
this.isAdmin = isAdmin;
|
426
|
-
this.bookReaderCannotLoad = previewType === 'singlePagePreview';
|
427
|
-
});
|
428
|
-
window.addEventListener('BRJSIA:PostInit', ({ detail }) => {
|
429
|
-
console.log('BRJSIA:PostInit');
|
430
|
-
|
431
|
-
const { isRestricted, downloadURLs } = detail;
|
432
|
-
this.bookReaderLoaded = true;
|
433
|
-
this.downloadableTypes = downloadURLs;
|
434
|
-
this.model.setRestriction(isRestricted);
|
435
|
-
});
|
436
|
-
}
|
437
|
-
|
438
|
-
/**
|
439
|
-
* Uses resize observer to fire BookReader's `resize` functionality
|
440
|
-
* We do not want to trigger resize IF:
|
441
|
-
* - book animation is happening
|
442
|
-
* - book is in fullscreen (fullscreen is handled separately)
|
443
|
-
*
|
444
|
-
* @param { target: HTMLElement, contentRect: DOMRectReadOnly } entry
|
445
|
-
*/
|
446
|
-
handleResize({ contentRect, target }) {
|
447
|
-
const startBrWidth = this.brWidth;
|
448
|
-
const { animating } = this.bookreader;
|
449
|
-
|
450
|
-
if (target === this.mainBRContainer) {
|
451
|
-
this.brWidth = contentRect.width;
|
452
|
-
}
|
453
|
-
|
454
|
-
setTimeout(() => {
|
455
|
-
if (startBrWidth && !animating) {
|
456
|
-
this.bookreader.resize();
|
457
|
-
}
|
458
|
-
}, 0);
|
459
|
-
}
|
460
|
-
|
461
|
-
async startResizeObserver() {
|
462
|
-
if (!this.sharedObserver) {
|
463
|
-
this.sharedObserver = new SharedResizeObserver();
|
464
|
-
}
|
465
|
-
|
466
|
-
this.sharedObserver?.addObserver({
|
467
|
-
handler: this,
|
468
|
-
target: this.mainBRContainer,
|
469
|
-
});
|
470
|
-
}
|
471
|
-
|
472
|
-
/**
|
473
|
-
* Manages Fullscreen behavior
|
474
|
-
* This makes sure that controls are _always_ in view
|
475
|
-
* We need this to accommodate LOAN BAR during fullscreen
|
476
|
-
*/
|
477
|
-
manageFullScreenBehavior() {
|
478
|
-
this.emitFullScreenState();
|
479
|
-
if (!this.bookreader.isFullscreen()) {
|
480
|
-
this.fullscreenMgr.teardown();
|
481
|
-
} else {
|
482
|
-
this.fullscreenMgr.setup(this.bookreader);
|
483
|
-
}
|
484
|
-
}
|
485
|
-
|
486
|
-
/**
|
487
|
-
* Intercepts and relays fullscreen toggle events
|
488
|
-
*/
|
489
|
-
emitFullScreenState() {
|
490
|
-
const isFullScreen = this.bookreader.isFullscreen();
|
491
|
-
const event = new CustomEvent('ViewportInFullScreen', {
|
492
|
-
detail: { isFullScreen },
|
493
|
-
});
|
494
|
-
this.dispatchEvent(event);
|
495
|
-
}
|
496
|
-
|
497
|
-
get loadingClass() {
|
498
|
-
return !this.bookReaderLoaded ? 'loading' : '';
|
499
|
-
}
|
500
|
-
|
501
|
-
get itemImage() {
|
502
|
-
const url = `https://${this.baseHost}/services/img/${this.book.metadata.identifier}`;
|
503
|
-
return html`<img class="cover-img" src="${url}" alt="cover image for ${this.book.metadata.identifier}">`;
|
504
|
-
}
|
505
|
-
|
506
|
-
render() {
|
507
|
-
const placeholder = this.bookReaderCannotLoad ? this.itemImage : this.loader;
|
508
|
-
return html`<div id="book-navigator" class="${this.loadingClass}">
|
509
|
-
${placeholder}
|
510
|
-
<slot name="main"></slot>
|
511
|
-
</div>
|
512
|
-
`;
|
513
|
-
}
|
514
|
-
|
515
|
-
static get styles() {
|
516
|
-
return css`
|
517
|
-
.cover-img {
|
518
|
-
max-height: 300px;
|
519
|
-
}
|
520
|
-
`;
|
521
|
-
}
|
522
|
-
}
|
523
|
-
|
524
|
-
customElements.define('book-navigator', BookNavigator);
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { css } from 'lit-element';
|
2
|
-
|
3
|
-
export default css`
|
4
|
-
.blue {
|
5
|
-
--iconFillColor: var(--blueBookmarkColor, #0023f5);
|
6
|
-
}
|
7
|
-
|
8
|
-
.red {
|
9
|
-
--iconFillColor: var(--redBookmarkColor, #eb3223);
|
10
|
-
}
|
11
|
-
|
12
|
-
.green {
|
13
|
-
--iconFillColor: var(--greenBookmarkColor, #75ef4c);
|
14
|
-
}
|
15
|
-
`;
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { css } from 'lit-element';
|
2
|
-
|
3
|
-
export default css`
|
4
|
-
.ia-button {
|
5
|
-
min-height: 3rem;
|
6
|
-
border: none;
|
7
|
-
outline: none;
|
8
|
-
cursor: pointer;
|
9
|
-
color: var(--primaryTextColor);
|
10
|
-
line-height: normal;
|
11
|
-
border-radius: .4rem;
|
12
|
-
text-align: center;
|
13
|
-
vertical-align: middle;
|
14
|
-
font-size: 1.4rem;
|
15
|
-
display: inline-block;
|
16
|
-
padding: .6rem 1.2rem;
|
17
|
-
border: 1px solid transparent;
|
18
|
-
|
19
|
-
white-space: nowrap;
|
20
|
-
-webkit-user-select: none;
|
21
|
-
-moz-user-select: none;
|
22
|
-
-ms-user-select: none;
|
23
|
-
-o-user-select: none;
|
24
|
-
user-select: none;
|
25
|
-
}
|
26
|
-
|
27
|
-
.ia-button.link,
|
28
|
-
.ia-button.external {
|
29
|
-
min-height: unset;
|
30
|
-
text-decoration: none;
|
31
|
-
}
|
32
|
-
|
33
|
-
.ia-button:disabled,
|
34
|
-
.ia-button.disabled {
|
35
|
-
cursor: not-allowed;
|
36
|
-
opacity: 0.5;
|
37
|
-
}
|
38
|
-
|
39
|
-
.ia-button.transparent {
|
40
|
-
background-color: transparent;
|
41
|
-
}
|
42
|
-
|
43
|
-
.ia-button.slim {
|
44
|
-
padding: 0;
|
45
|
-
}
|
46
|
-
|
47
|
-
.ia-button.primary {
|
48
|
-
background-color: var(--primaryCTAFill);
|
49
|
-
border-color: var(--primaryCTABorder);
|
50
|
-
}
|
51
|
-
|
52
|
-
.ia-button.cancel {
|
53
|
-
background-color: var(--primaryErrorCTAFill);
|
54
|
-
border-color: var(--primaryErrorCTABorder);
|
55
|
-
}
|
56
|
-
|
57
|
-
.ia-button.external {
|
58
|
-
background: var(--secondaryCTAFill);
|
59
|
-
border-color: var(--secondaryCTABorder);
|
60
|
-
}
|
61
|
-
`;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { svg } from 'lit-element';
|
2
|
-
|
3
|
-
export default svg`
|
4
|
-
<svg class="ia-logo" width="27" height="30" viewBox="0 0 27 30" xmlns="http://www.w3.org/2000/svg" aria-labelledby="logoTitleID logoDescID">
|
5
|
-
<title id="logoTitleID">Internet Archive logo</title>
|
6
|
-
<desc id="logoDescID">A line drawing of the Internet Archive headquarters building façade.</desc>
|
7
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
-
<mask id="mask-2" fill="white">
|
9
|
-
<path d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z" id="path-1"></path>
|
10
|
-
</mask>
|
11
|
-
<use fill="#FFFFFF" xlink:href="#path-1"></use>
|
12
|
-
<g mask="url(#mask-2)" fill="#FFFFFF">
|
13
|
-
<path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>
|
14
|
-
</g>
|
15
|
-
</g>
|
16
|
-
</svg>
|
17
|
-
`;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { css } from 'lit-element';
|
2
|
-
|
3
|
-
// Original SVG object for reference
|
4
|
-
// <svg height="10" viewBox="0 0 13 10" width="13" xmlns="http://www.w3.org/2000/svg"><path d="m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z" fill="#fff" fill-rule="evenodd"/></svg>
|
5
|
-
|
6
|
-
export default css`data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+`;
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { css } from 'lit-element';
|
2
|
-
|
3
|
-
export default css`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==`;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { html } from 'lit-html';
|
2
|
-
|
3
|
-
export default html`
|
4
|
-
<svg name="sort-asc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538" transform="matrix(1 0 0 -1 0 18.692308)"/></g></svg>
|
5
|
-
`;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { html } from 'lit-html';
|
2
|
-
|
3
|
-
export default html`
|
4
|
-
<svg name="sort-desc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538"/></g></svg>
|
5
|
-
`;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { html } from 'lit-html';
|
2
|
-
|
3
|
-
export default html`
|
4
|
-
<svg name="sort-neutral" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill-rule="nonzero"/><circle cx="13" cy="9" r="2"/></g></svg>
|
5
|
-
`;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { html } from 'lit-html';
|
2
|
-
|
3
|
-
export default html`
|
4
|
-
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" aria-labelledby="volumesTitleID volumesDescID">
|
5
|
-
<title id="volumesTitleID">Volumes icon</title>
|
6
|
-
<desc id="volumesDescID">Three books stacked on each other</desc>
|
7
|
-
<g fill="#ffffff">
|
8
|
-
<path fill="#ffffff" d="m9.83536396 0h10.07241114c.1725502.47117517.3378411.76385809.4958725.87804878.1295523.11419069.3199719.1998337.5712586.25692905.2512868.05709534.4704647.08564301.6575337.08564301h.2806036v15.24362526h-4.3355343v3.8106985h-4.44275v3.7250554h-12.01318261c-.27306495 0-.50313194-.085643-.69020098-.256929-.18706903-.1712861-.30936193-.3425721-.36687867-.5138581l-.06449694-.2785477v-14.2159091c0-.32815965.08627512-.5922949.25882537-.79240577.17255024-.20011086.34510049-.32150776.51765073-.36419068l.25882537-.0640244h3.36472977v-2.54767184c0-.31374722.08627513-.57067627.25882537-.77078714.17255025-.20011086.34510049-.32150776.51765074-.36419068l.25882536-.06402439h3.36472978v-2.56929047c0-.32815964.08627512-.5922949.25882537-.79240576.17255024-.20011087.34510049-.31430156.51765073-.34257207zm10.78355264 15.6294346v-13.53076498c-.2730649-.08536585-.4456152-.16380266-.5176507-.23531042-.1725502-.1424612-.2730649-.27078714-.3015441-.38497783v13.36031043h-9.87808272c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144124-.08962561.006929-.13988296.0640244-.05025735.0570953-.07538603.1427383-.07538603.256929s.02149898.210643.06449694.289357c.04299795.078714.08599591.1322062.12899387.1604767l.06449693.0216187h10.71905571zm-10.2449613-2.4412417h7.98003v-11.60421286h-7.98003zm1.6827837-9.41990022h4.6153002c.1725502 0 .3199718.05349224.4422647.16047672s.1834393.23891353.1834393.39578714c0 .15687362-.0611464.28519956-.1834393.38497783s-.2697145.1496674-.4422647.1496674h-4.6153002c-.1725503 0-.3199719-.04988913-.4422647-.1496674-.1222929-.09977827-.1834394-.22810421-.1834394-.38497783 0-.15687361.0611465-.28880266.1834394-.39578714.1222928-.10698448.2697144-.16047672.4422647-.16047672zm-6.08197737 13.50997782h7.72120467v-.8131929h-3.79610541c-.27306495 0-.49950224-.085643-.67931188-.256929-.17980964-.1712861-.29847284-.3425721-.35598958-.5138581l-.06449694-.2785477v-10.02023282h-2.82530086zm6.77217827-11.36890243h3.2139578c.1295522 0 .240956.05709534.3342113.17128603.0932554.11419069.139883.24972284.139883.40659645 0 .15687362-.0466276.28880267-.139883.39578714-.0932553.10698448-.2046591.16047672-.3342113.16047672h-3.2139578c-.1295523 0-.2373264-.05349224-.3233223-.16047672-.0859959-.10698447-.1289938-.23891352-.1289938-.39578714 0-.15687361.0429979-.29240576.1289938-.40659645s.19377-.17128603.3233223-.17128603zm-11.15043132 15.11557653h7.69942646v-.7491685h-3.79610539c-.25854616 0-.48135376-.0892462-.66842279-.2677384-.18706904-.1784922-.30936193-.3605876-.36687868-.546286l-.06449694-.2569291v-10.04101994h-2.80352266zm14.62237682-4.5606985h-.8191949v2.1410754h-9.89986085s-.04299796.0285477-.12899387.085643c-.08599592.0570954-.12201369.1427384-.10805331.2569291 0 .1141907.01786928.210643.05360784.289357.03573856.0787139.07538603.125.1189424.138858l.06449694.0432373h10.71905575v-2.9542683zm-4.3991936 3.8106985h-.8191949v2.077051h-9.8563045c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144125-.08962561.0105321-.13988296.0748337-.05025735.0643015-.07538603.1607538-.07538603.289357 0 .1141906.02149898.2070399.06449694.2785476.04299795.0715078.08599591.1141907.12899387.1280488l.06449693.0216186h10.69811519v-2.8686252z" />
|
9
|
-
</g>
|
10
|
-
</svg>
|
11
|
-
`;
|