@internetarchive/ia-item-navigator 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/demo/app-root.d.ts +47 -47
- package/dist/demo/app-root.js +199 -199
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/src/interfaces/custom-theater-interface.d.ts +20 -20
- package/dist/src/interfaces/custom-theater-interface.js +1 -1
- package/dist/src/interfaces/event-interfaces.d.ts +40 -40
- package/dist/src/interfaces/event-interfaces.js +1 -1
- package/dist/src/interfaces/menu-interfaces.d.ts +22 -22
- package/dist/src/interfaces/menu-interfaces.js +1 -1
- package/dist/src/item-navigator.d.ts +69 -69
- package/dist/src/item-navigator.js +256 -256
- package/dist/src/item-navigator.js.map +1 -1
- package/dist/src/loader.d.ts +13 -13
- package/dist/src/loader.js +31 -31
- package/dist/src/menu-slider/ia-menu-slider.d.ts +30 -0
- package/dist/src/menu-slider/ia-menu-slider.js +160 -0
- package/dist/src/menu-slider/ia-menu-slider.js.map +1 -0
- package/dist/src/menu-slider/menu-button.d.ts +19 -0
- package/dist/src/menu-slider/menu-button.js +91 -0
- package/dist/src/menu-slider/menu-button.js.map +1 -0
- package/dist/src/menu-slider/styles/menu-button.d.ts +2 -0
- package/dist/src/menu-slider/styles/menu-button.js +79 -0
- package/dist/src/menu-slider/styles/menu-button.js.map +1 -0
- package/dist/src/menu-slider/styles/menu-slider.d.ts +2 -0
- package/dist/src/menu-slider/styles/menu-slider.js +118 -0
- package/dist/src/menu-slider/styles/menu-slider.js.map +1 -0
- package/dist/src/no-theater-available.d.ts +9 -9
- package/dist/src/no-theater-available.js +35 -35
- package/dist/test/ia-item-navigator.test.d.ts +1 -1
- package/dist/test/ia-item-navigator.test.js +296 -296
- package/dist/test/ia-stub.d.ts +22 -22
- package/dist/test/ia-stub.js +34 -34
- package/dist/test/no-theater-available.test.d.ts +1 -1
- package/dist/test/no-theater-available.test.js +22 -22
- package/index.ts +2 -0
- package/package.json +3 -3
- package/src/item-navigator.ts +2 -2
- package/src/menu-slider/ia-menu-slider.ts +161 -0
- package/src/menu-slider/menu-button.ts +80 -0
- package/src/menu-slider/styles/menu-button.ts +79 -0
- package/src/menu-slider/styles/menu-slider.ts +119 -0
- package/test/ia-menu-slider.test.js +273 -0
- package/dist/src/event-interfaces.d.ts +0 -37
- package/dist/src/event-interfaces.js +0 -2
- package/dist/src/event-interfaces.js.map +0 -1
- package/dist/src/grouped-files-provider.d.ts +0 -0
- package/dist/src/grouped-files-provider.js +0 -2
- package/dist/src/grouped-files-provider.js.map +0 -1
- package/dist/src/interfaces/nav-controller-interface.d.ts +0 -20
- package/dist/src/interfaces/nav-controller-interface.js +0 -2
- package/dist/src/interfaces/nav-controller-interface.js.map +0 -1
- package/dist/src/item-inspector/files-by-type/files-by-type-provider.d.ts +0 -14
- package/dist/src/item-inspector/files-by-type/files-by-type-provider.js +0 -29
- package/dist/src/item-inspector/files-by-type/files-by-type-provider.js.map +0 -1
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.d.ts +0 -16
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.js +0 -95
- package/dist/src/item-inspector/files-by-type/ia-files-by-type.js.map +0 -1
- package/dist/src/item-inspector/files-by-type/ia-grouped-files-by-type.d.ts +0 -0
- package/dist/src/item-inspector/files-by-type/ia-grouped-files-by-type.js +0 -2
- package/dist/src/item-inspector/files-by-type/ia-grouped-files-by-type.js.map +0 -1
- package/dist/src/item-inspector/grouped-files/files-by-type-provider.d.ts +0 -15
- package/dist/src/item-inspector/grouped-files/files-by-type-provider.js +0 -33
- package/dist/src/item-inspector/grouped-files/files-by-type-provider.js.map +0 -1
- package/dist/src/item-inspector/grouped-files/grouped-files-provider.d.ts +0 -15
- package/dist/src/item-inspector/grouped-files/grouped-files-provider.js +0 -33
- package/dist/src/item-inspector/grouped-files/grouped-files-provider.js.map +0 -1
- package/dist/src/item-inspector/grouped-files/ia-grouped-files-by-type.d.ts +0 -0
- package/dist/src/item-inspector/grouped-files/ia-grouped-files-by-type.js +0 -2
- package/dist/src/item-inspector/grouped-files/ia-grouped-files-by-type.js.map +0 -1
- package/dist/src/item-inspector/grouped-files/ia-grouped-files.d.ts +0 -0
- package/dist/src/item-inspector/grouped-files/ia-grouped-files.js +0 -2
- package/dist/src/item-inspector/grouped-files/ia-grouped-files.js.map +0 -1
- package/dist/src/item-inspector/grouped-files-provider.d.ts +0 -15
- package/dist/src/item-inspector/grouped-files-provider.js +0 -33
- package/dist/src/item-inspector/grouped-files-provider.js.map +0 -1
- package/dist/src/item-inspector/item-inspector.d.ts +0 -0
- package/dist/src/item-inspector/item-inspector.js +0 -254
- package/dist/src/item-inspector/item-inspector.js.map +0 -1
- package/dist/src/item-inspector/share-provider.d.ts +0 -15
- package/dist/src/item-inspector/share-provider.js +0 -35
- package/dist/src/item-inspector/share-provider.js.map +0 -1
- package/dist/src/item-inspector/visual-mod-provider.d.ts +0 -19
- package/dist/src/item-inspector/visual-mod-provider.js +0 -46
- package/dist/src/item-inspector/visual-mod-provider.js.map +0 -1
- package/dist/src/item-inspector.d.ts +0 -24
- package/dist/src/item-inspector.js +0 -92
- package/dist/src/item-inspector.js.map +0 -1
- package/dist/src/menu-interfaces.d.ts +0 -16
- package/dist/src/menu-interfaces.js +0 -2
- package/dist/src/menu-interfaces.js.map +0 -1
- package/dist/src/nav-controller-interface.d.ts +0 -9
- package/dist/src/nav-controller-interface.js +0 -2
- package/dist/src/nav-controller-interface.js.map +0 -1
- package/dist/src/your-webcomponent.d.ts +0 -8
- package/dist/src/your-webcomponent.js +0 -37
- package/dist/src/your-webcomponent.js.map +0 -1
- package/dist/test/book-nav-stub.d.ts +0 -22
- package/dist/test/book-nav-stub.js +0 -49
- package/dist/test/book-nav-stub.js.map +0 -1
- package/dist/test/ia-stub-goody.d.ts +0 -210
- package/dist/test/ia-stub-goody.js +0 -276
- package/dist/test/ia-stub-goody.js.map +0 -1
- package/dist/test/your-webcomponent.test.d.ts +0 -0
- package/dist/test/your-webcomponent.test.js +0 -33
- package/dist/test/your-webcomponent.test.js.map +0 -1
@@ -0,0 +1,118 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
const menuButtonWidth = css `42px`;
|
3
|
+
const sliderWidth = css `var(--menuWidth, 320px)`;
|
4
|
+
const transitionTiming = css `var(--animationTiming, 200ms)`;
|
5
|
+
export default css `
|
6
|
+
.main {
|
7
|
+
overflow: hidden;
|
8
|
+
width: 100%;
|
9
|
+
height: 100%;
|
10
|
+
}
|
11
|
+
|
12
|
+
.animate {
|
13
|
+
transition: transform ${transitionTiming} ease-out;
|
14
|
+
}
|
15
|
+
|
16
|
+
.menu {
|
17
|
+
position: absolute;
|
18
|
+
top: 0;
|
19
|
+
left: 0;
|
20
|
+
bottom: 0;
|
21
|
+
width: ${sliderWidth};
|
22
|
+
padding: 0.5rem 0.5rem 0 0;
|
23
|
+
box-sizing: border-box;
|
24
|
+
font-size: 1.4rem;
|
25
|
+
color: var(--primaryTextColor);
|
26
|
+
background: var(--menuSliderBg);
|
27
|
+
transform: translateX(calc(${sliderWidth} * -1));
|
28
|
+
}
|
29
|
+
|
30
|
+
.menu > button.close {
|
31
|
+
right: 0.7rem;
|
32
|
+
}
|
33
|
+
|
34
|
+
button {
|
35
|
+
outline: none;
|
36
|
+
cursor: pointer;
|
37
|
+
}
|
38
|
+
|
39
|
+
header {
|
40
|
+
margin: 0 0 0.5rem 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
header * {
|
44
|
+
margin: 0;
|
45
|
+
display: inline-block;
|
46
|
+
}
|
47
|
+
header button {
|
48
|
+
outline: none;
|
49
|
+
cursor: pointer;
|
50
|
+
}
|
51
|
+
|
52
|
+
header.with-secondary-action .details {
|
53
|
+
width: 80%;
|
54
|
+
}
|
55
|
+
|
56
|
+
header .details {
|
57
|
+
font-weight: bold;
|
58
|
+
width: 88%;
|
59
|
+
}
|
60
|
+
|
61
|
+
header .custom-action > *,
|
62
|
+
button.close {
|
63
|
+
padding: 0;
|
64
|
+
background-color: transparent;
|
65
|
+
border: 0;
|
66
|
+
--iconWidth: var(--menuSliderHeaderIconWidth);
|
67
|
+
--iconHeight: var(--menuSliderHeaderIconHeight);
|
68
|
+
}
|
69
|
+
|
70
|
+
header .custom-action,
|
71
|
+
button.close {
|
72
|
+
position: absolute;
|
73
|
+
}
|
74
|
+
button.close {
|
75
|
+
right: 0.5rem;
|
76
|
+
}
|
77
|
+
|
78
|
+
button.close * {
|
79
|
+
float: right;
|
80
|
+
}
|
81
|
+
|
82
|
+
.content {
|
83
|
+
position: absolute;
|
84
|
+
top: 0;
|
85
|
+
right: 0;
|
86
|
+
bottom: 0;
|
87
|
+
left: ${menuButtonWidth};
|
88
|
+
z-index: 1;
|
89
|
+
transform: translateX(calc(${sliderWidth} * -1));
|
90
|
+
transition: transform ${transitionTiming} ease-out;
|
91
|
+
background: var(--activeButtonBg);
|
92
|
+
border-right: 0.2rem solid;
|
93
|
+
border-color: var(--subpanelRightBorderColor);
|
94
|
+
padding: 0.5rem 0 0 0.5rem;
|
95
|
+
display: flex;
|
96
|
+
flex-direction: column;
|
97
|
+
}
|
98
|
+
|
99
|
+
.open {
|
100
|
+
transform: translateX(0);
|
101
|
+
}
|
102
|
+
|
103
|
+
.menu-list {
|
104
|
+
padding: 0;
|
105
|
+
margin: 0;
|
106
|
+
list-style: none;
|
107
|
+
background: var(--menuSliderBg);
|
108
|
+
}
|
109
|
+
.menu-list li {
|
110
|
+
margin-bottom: 0.2rem;
|
111
|
+
}
|
112
|
+
|
113
|
+
.content > section {
|
114
|
+
overflow: auto;
|
115
|
+
overscroll-behavior: contain;
|
116
|
+
}
|
117
|
+
`;
|
118
|
+
//# sourceMappingURL=menu-slider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"menu-slider.js","sourceRoot":"","sources":["../../../../src/menu-slider/styles/menu-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,eAAe,GAAG,GAAG,CAAA,MAAM,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,CAAA,yBAAyB,CAAC;AACjD,MAAM,gBAAgB,GAAG,GAAG,CAAA,+BAA+B,CAAC;AAE5D,eAAe,GAAG,CAAA;;;;;;;;4BAQU,gBAAgB;;;;;;;;aAQ/B,WAAW;;;;;;iCAMS,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4DhC,eAAe;;iCAEM,WAAW;4BAChB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B3C,CAAC","sourcesContent":["import { css } from 'lit';\n\nconst menuButtonWidth = css`42px`;\nconst sliderWidth = css`var(--menuWidth, 320px)`;\nconst transitionTiming = css`var(--animationTiming, 200ms)`;\n\nexport default css`\n .main {\n overflow: hidden;\n width: 100%;\n height: 100%;\n }\n\n .animate {\n transition: transform ${transitionTiming} ease-out;\n }\n\n .menu {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: ${sliderWidth};\n padding: 0.5rem 0.5rem 0 0;\n box-sizing: border-box;\n font-size: 1.4rem;\n color: var(--primaryTextColor);\n background: var(--menuSliderBg);\n transform: translateX(calc(${sliderWidth} * -1));\n }\n\n .menu > button.close {\n right: 0.7rem;\n }\n\n button {\n outline: none;\n cursor: pointer;\n }\n\n header {\n margin: 0 0 0.5rem 0;\n }\n\n header * {\n margin: 0;\n display: inline-block;\n }\n header button {\n outline: none;\n cursor: pointer;\n }\n\n header.with-secondary-action .details {\n width: 80%;\n }\n\n header .details {\n font-weight: bold;\n width: 88%;\n }\n\n header .custom-action > *,\n button.close {\n padding: 0;\n background-color: transparent;\n border: 0;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n\n header .custom-action,\n button.close {\n position: absolute;\n }\n button.close {\n right: 0.5rem;\n }\n\n button.close * {\n float: right;\n }\n\n .content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: ${menuButtonWidth};\n z-index: 1;\n transform: translateX(calc(${sliderWidth} * -1));\n transition: transform ${transitionTiming} ease-out;\n background: var(--activeButtonBg);\n border-right: 0.2rem solid;\n border-color: var(--subpanelRightBorderColor);\n padding: 0.5rem 0 0 0.5rem;\n display: flex;\n flex-direction: column;\n }\n\n .open {\n transform: translateX(0);\n }\n\n .menu-list {\n padding: 0;\n margin: 0;\n list-style: none;\n background: var(--menuSliderBg);\n }\n .menu-list li {\n margin-bottom: 0.2rem;\n }\n\n .content > section {\n overflow: auto;\n overscroll-behavior: contain;\n }\n`;\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { LitElement, TemplateResult, PropertyValues, CSSResult } from 'lit';
|
2
|
-
export declare class IANoTheaterAvailable extends LitElement {
|
3
|
-
identifier?: string;
|
4
|
-
emitLoaded(): void;
|
5
|
-
updated(changed: PropertyValues): void;
|
6
|
-
get downloadUrl(): string;
|
7
|
-
render(): TemplateResult;
|
8
|
-
static get styles(): CSSResult;
|
9
|
-
}
|
1
|
+
import { LitElement, TemplateResult, PropertyValues, CSSResult } from 'lit';
|
2
|
+
export declare class IANoTheaterAvailable extends LitElement {
|
3
|
+
identifier?: string;
|
4
|
+
emitLoaded(): void;
|
5
|
+
updated(changed: PropertyValues): void;
|
6
|
+
get downloadUrl(): string;
|
7
|
+
render(): TemplateResult;
|
8
|
+
static get styles(): CSSResult;
|
9
|
+
}
|
@@ -1,25 +1,25 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { LitElement, html, css, } from 'lit';
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
4
|
-
let IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {
|
5
|
-
constructor() {
|
6
|
-
super(...arguments);
|
7
|
-
this.identifier = '';
|
8
|
-
}
|
9
|
-
emitLoaded() {
|
10
|
-
this.dispatchEvent(new CustomEvent('loadingStateUpdated', {
|
11
|
-
detail: { loaded: true },
|
12
|
-
}));
|
13
|
-
}
|
14
|
-
updated(changed) {
|
15
|
-
if (changed.has('identifier')) {
|
16
|
-
this.emitLoaded();
|
17
|
-
}
|
18
|
-
}
|
19
|
-
get downloadUrl() {
|
20
|
-
return `/download/${this.identifier}`;
|
21
|
-
}
|
22
|
-
render() {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { LitElement, html, css, } from 'lit';
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
4
|
+
let IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {
|
5
|
+
constructor() {
|
6
|
+
super(...arguments);
|
7
|
+
this.identifier = '';
|
8
|
+
}
|
9
|
+
emitLoaded() {
|
10
|
+
this.dispatchEvent(new CustomEvent('loadingStateUpdated', {
|
11
|
+
detail: { loaded: true },
|
12
|
+
}));
|
13
|
+
}
|
14
|
+
updated(changed) {
|
15
|
+
if (changed.has('identifier')) {
|
16
|
+
this.emitLoaded();
|
17
|
+
}
|
18
|
+
}
|
19
|
+
get downloadUrl() {
|
20
|
+
return `/download/${this.identifier}`;
|
21
|
+
}
|
22
|
+
render() {
|
23
23
|
return html `
|
24
24
|
<section>
|
25
25
|
<h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>
|
@@ -31,9 +31,9 @@ let IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {
|
|
31
31
|
</p>
|
32
32
|
<a href=${this.downloadUrl}>Show all files</a>
|
33
33
|
</section>
|
34
|
-
`;
|
35
|
-
}
|
36
|
-
static get styles() {
|
34
|
+
`;
|
35
|
+
}
|
36
|
+
static get styles() {
|
37
37
|
return css `
|
38
38
|
:host {
|
39
39
|
color: var(--primaryTextColor, #fff);
|
@@ -68,14 +68,14 @@ let IANoTheaterAvailable = class IANoTheaterAvailable extends LitElement {
|
|
68
68
|
user-select: none;
|
69
69
|
text-decoration: none;
|
70
70
|
}
|
71
|
-
`;
|
72
|
-
}
|
73
|
-
};
|
74
|
-
__decorate([
|
75
|
-
property({ type: String })
|
76
|
-
], IANoTheaterAvailable.prototype, "identifier", void 0);
|
77
|
-
IANoTheaterAvailable = __decorate([
|
78
|
-
customElement('ia-no-theater-available')
|
79
|
-
], IANoTheaterAvailable);
|
80
|
-
export { IANoTheaterAvailable };
|
71
|
+
`;
|
72
|
+
}
|
73
|
+
};
|
74
|
+
__decorate([
|
75
|
+
property({ type: String })
|
76
|
+
], IANoTheaterAvailable.prototype, "identifier", void 0);
|
77
|
+
IANoTheaterAvailable = __decorate([
|
78
|
+
customElement('ia-no-theater-available')
|
79
|
+
], IANoTheaterAvailable);
|
80
|
+
export { IANoTheaterAvailable };
|
81
81
|
//# sourceMappingURL=no-theater-available.js.map
|
@@ -1 +1 @@
|
|
1
|
-
import '../src/item-navigator';
|
1
|
+
import '../src/item-navigator';
|