@internetarchive/ia-item-navigator 0.0.0 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -19
- package/demo/app-root.ts +113 -22
- package/demo/index.html +12 -4
- package/dist/demo/app-root.d.ts +27 -7
- package/dist/demo/app-root.js +98 -23
- package/dist/demo/app-root.js.map +1 -1
- package/dist/src/interfaces/custom-theater-interface.d.ts +20 -0
- package/dist/src/interfaces/custom-theater-interface.js +2 -0
- package/dist/src/interfaces/custom-theater-interface.js.map +1 -0
- package/dist/src/interfaces/event-interfaces.d.ts +13 -23
- package/dist/src/interfaces/event-interfaces.js.map +1 -1
- package/dist/src/interfaces/menu-interfaces.d.ts +7 -7
- package/dist/src/interfaces/menu-interfaces.js.map +1 -1
- package/dist/src/interfaces/nav-controller-interface.d.ts +11 -6
- package/dist/src/interfaces/nav-controller-interface.js.map +1 -1
- package/dist/src/item-inspector/files-by-type/files-by-type-provider.js +5 -3
- package/dist/src/item-inspector/files-by-type/files-by-type-provider.js.map +1 -1
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.d.ts +1 -0
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.js +14 -0
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.js.map +1 -1
- package/dist/src/item-inspector/item-inspector.d.ts +0 -31
- package/dist/src/item-inspector/item-inspector.js +253 -181
- package/dist/src/item-inspector/item-inspector.js.map +1 -1
- package/dist/src/item-inspector/visual-mod-provider.d.ts +19 -0
- package/dist/src/item-inspector/visual-mod-provider.js +46 -0
- package/dist/src/item-inspector/visual-mod-provider.js.map +1 -0
- package/dist/src/item-navigator.d.ts +50 -28
- package/dist/src/item-navigator.js +216 -132
- package/dist/src/item-navigator.js.map +1 -1
- package/dist/src/loader.d.ts +5 -0
- package/dist/src/loader.js +8 -2
- package/dist/src/loader.js.map +1 -1
- package/dist/src/no-theater-available.d.ts +9 -0
- package/dist/src/no-theater-available.js +79 -0
- package/dist/src/no-theater-available.js.map +1 -0
- package/dist/test/book-nav-stub.d.ts +22 -0
- package/dist/test/book-nav-stub.js +49 -0
- package/dist/test/book-nav-stub.js.map +1 -0
- package/dist/test/ia-item-navigator.test.d.ts +2 -0
- package/dist/test/ia-item-navigator.test.js +317 -0
- package/dist/test/ia-item-navigator.test.js.map +1 -0
- package/dist/test/ia-stub-goody.d.ts +210 -0
- package/dist/test/ia-stub-goody.js +276 -0
- package/dist/test/ia-stub-goody.js.map +1 -0
- package/dist/test/ia-stub.d.ts +22 -0
- package/dist/test/ia-stub.js +35 -0
- package/dist/test/ia-stub.js.map +1 -0
- package/dist/test/no-theater-available.test.d.ts +1 -0
- package/dist/test/no-theater-available.test.js +27 -0
- package/dist/test/no-theater-available.test.js.map +1 -0
- package/package.json +14 -5
- package/src/interfaces/custom-theater-interface.ts +28 -0
- package/src/interfaces/event-interfaces.ts +17 -24
- package/src/interfaces/menu-interfaces.ts +10 -9
- package/src/item-navigator.ts +257 -155
- package/src/loader.ts +9 -2
- package/src/no-theater-available.ts +85 -0
- package/test/book-nav-stub.ts +47 -0
- package/test/ia-item-navigator.test.ts +438 -0
- package/test/ia-stub.ts +79 -0
- package/test/no-theater-available.test.ts +32 -0
- package/demo/demo-book-manifest.json +0 -1163
- package/demo/demo-item-md.json +0 -247
- package/src/interfaces/nav-controller-interface.ts +0 -18
- package/src/item-inspector/files-by-type/files-by-type-provider.ts +0 -41
- package/src/item-inspector/files-by-type/ia-files-by-type.ts +0 -84
- package/src/item-inspector/item-inspector.ts +0 -202
- package/src/item-inspector/share-provider.ts +0 -51
- package/src/item-navigator-js.js +0 -372
- package/test/your-webcomponent.test.ts +0 -40
@@ -1,55 +1,48 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import {
|
2
|
+
MenuProviderInterface,
|
3
|
+
MenuShortcutInterface,
|
4
|
+
MenuId,
|
5
|
+
} from './menu-interfaces';
|
4
6
|
|
5
7
|
/** Toggles Menu && Sets open panel */
|
6
|
-
export interface
|
8
|
+
export interface ToggleSideMenuOpenEvent extends CustomEvent {
|
7
9
|
type: 'updateSideMenu';
|
8
10
|
detail: {
|
9
|
-
menuId:
|
11
|
+
menuId: MenuId | undefined | '';
|
10
12
|
action: 'open' | 'toggle' | '';
|
11
13
|
};
|
12
14
|
}
|
13
15
|
|
14
16
|
/** Sets open panel */
|
15
|
-
export interface
|
17
|
+
export interface ToggleSidePanelOpenEvent extends CustomEvent {
|
16
18
|
type: 'menuTypeSelected';
|
17
19
|
detail: {
|
18
|
-
id:
|
20
|
+
id: MenuId | '';
|
19
21
|
};
|
20
22
|
}
|
21
23
|
|
22
24
|
/** Sets menu order that is displayed */
|
23
|
-
export interface
|
25
|
+
export interface SetSideMenuContentsEvent extends CustomEvent {
|
24
26
|
type: 'menuUpdated';
|
25
|
-
detail:
|
27
|
+
detail: MenuProviderInterface[];
|
26
28
|
}
|
27
29
|
|
28
|
-
/**
|
29
|
-
export interface
|
30
|
-
type: '
|
31
|
-
detail:
|
30
|
+
/** Sets menu shortcuts that is displayed */
|
31
|
+
export interface SetSideMenuShortcutsEvent extends CustomEvent {
|
32
|
+
type: 'menuUpdated';
|
33
|
+
detail: MenuShortcutInterface[];
|
32
34
|
}
|
33
35
|
|
34
36
|
/** Toggles fullscreen mode */
|
35
|
-
export interface
|
37
|
+
export interface ManageFullscreenEvent extends CustomEvent {
|
36
38
|
type: 'ViewportInFullScreen';
|
37
39
|
detail: {
|
38
40
|
isFullScreen: boolean;
|
39
41
|
};
|
40
42
|
}
|
41
43
|
|
42
|
-
/** Toggles modal & sets contents */
|
43
|
-
export interface IntOpenModalEvent extends CustomEvent {
|
44
|
-
type: 'showItemNavigatorModal';
|
45
|
-
detail: {
|
46
|
-
config: ModalConfig;
|
47
|
-
customModalContent: TemplateResult;
|
48
|
-
};
|
49
|
-
}
|
50
|
-
|
51
44
|
/** Toggles loading view */
|
52
|
-
export interface
|
45
|
+
export interface loadingStateUpdatedEvent extends CustomEvent {
|
53
46
|
type: 'loadingStateUpdated';
|
54
47
|
detail: {
|
55
48
|
loaded: boolean;
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
2
2
|
import { MetadataResponse } from '@internetarchive/search-service';
|
3
3
|
|
4
|
-
export
|
4
|
+
export type MenuId = string;
|
5
|
+
export interface MenuShortcutInterface {
|
5
6
|
icon: TemplateResult;
|
6
|
-
id:
|
7
|
+
id: MenuId;
|
7
8
|
}
|
8
9
|
|
9
|
-
export interface
|
10
|
-
icon: TemplateResult;
|
11
|
-
id: string;
|
10
|
+
export interface MenuDetailsInterface extends MenuShortcutInterface {
|
12
11
|
label: string;
|
13
12
|
menuDetails?: TemplateResult;
|
14
13
|
selected?: boolean;
|
@@ -16,11 +15,13 @@ export interface IntMenuIconAndDetails extends IntMenuShortcut {
|
|
16
15
|
href?: string;
|
17
16
|
}
|
18
17
|
|
19
|
-
export interface
|
18
|
+
export interface MenuProviderBaseConfigInterface {
|
20
19
|
item: MetadataResponse;
|
21
20
|
baseHost: string;
|
22
21
|
subPrefix: string;
|
22
|
+
updated?: any;
|
23
23
|
}
|
24
|
-
export interface
|
25
|
-
extends
|
26
|
-
|
24
|
+
export interface MenuProviderInterface
|
25
|
+
extends MenuProviderBaseConfigInterface,
|
26
|
+
MenuDetailsInterface,
|
27
|
+
MenuShortcutInterface {}
|