@internetarchive/ia-item-navigator 1.0.4-a1 → 1.0.4

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.
Files changed (33) hide show
  1. package/dist/demo/app-root.d.ts +47 -47
  2. package/dist/demo/app-root.js +199 -199
  3. package/dist/index.d.ts +3 -3
  4. package/dist/index.js +3 -3
  5. package/dist/src/interfaces/custom-theater-interface.d.ts +20 -20
  6. package/dist/src/interfaces/custom-theater-interface.js +1 -1
  7. package/dist/src/interfaces/event-interfaces.d.ts +40 -40
  8. package/dist/src/interfaces/event-interfaces.js +1 -1
  9. package/dist/src/interfaces/menu-interfaces.d.ts +22 -22
  10. package/dist/src/interfaces/menu-interfaces.js +1 -1
  11. package/dist/src/item-navigator.d.ts +69 -69
  12. package/dist/src/item-navigator.js +256 -256
  13. package/dist/src/loader.d.ts +13 -13
  14. package/dist/src/loader.js +31 -31
  15. package/dist/src/menu-slider/ia-menu-slider.d.ts +30 -30
  16. package/dist/src/menu-slider/ia-menu-slider.js +112 -112
  17. package/dist/src/menu-slider/menu-button.d.ts +19 -19
  18. package/dist/src/menu-slider/menu-button.js +75 -75
  19. package/dist/src/menu-slider/styles/menu-button.d.ts +2 -2
  20. package/dist/src/menu-slider/styles/menu-button.js +2 -2
  21. package/dist/src/menu-slider/styles/menu-slider.d.ts +2 -2
  22. package/dist/src/menu-slider/styles/menu-slider.js +9 -20
  23. package/dist/src/menu-slider/styles/menu-slider.js.map +1 -1
  24. package/dist/src/no-theater-available.d.ts +9 -9
  25. package/dist/src/no-theater-available.js +35 -35
  26. package/dist/test/ia-item-navigator.test.d.ts +1 -1
  27. package/dist/test/ia-item-navigator.test.js +296 -296
  28. package/dist/test/ia-stub.d.ts +22 -22
  29. package/dist/test/ia-stub.js +34 -34
  30. package/dist/test/no-theater-available.test.d.ts +1 -1
  31. package/dist/test/no-theater-available.test.js +22 -22
  32. package/package.json +1 -1
  33. package/src/menu-slider/styles/menu-slider.ts +4 -15
@@ -1,35 +1,35 @@
1
- import { html } from 'lit';
2
- export class ItemStub {
3
- constructor() {
4
- this.rawResponse = '';
5
- this.created = 1;
6
- this.d1 = 'hello';
7
- this.d2 = 'boop';
8
- this.dir = 'whee';
9
- this.files = [];
10
- this.files_count = 0;
11
- this.item_last_updated = 2020;
12
- this.item_size = 111;
13
- this.metadata = { identifier: 'foo' };
14
- this.server = 'foo-server';
15
- this.uniq = 2;
16
- this.workable_servers = ['abc'];
17
- }
18
- }
19
- export const shortcut = {
20
- id: 'fullscreen',
21
- icon: html `<i class="fas fullscreen-test"></i>`,
22
- };
23
- export const menuProvider = {
24
- ...shortcut,
25
- label: 'foo',
26
- menuDetails: html `<div>foo</div>`,
27
- selected: true,
28
- followable: false,
29
- href: 'https://archive.foo',
30
- item: new ItemStub(),
31
- baseHost: 'https://archive.foo',
32
- subPrefix: 'bar',
33
- updated: () => { },
34
- };
1
+ import { html } from 'lit';
2
+ export class ItemStub {
3
+ constructor() {
4
+ this.rawResponse = '';
5
+ this.created = 1;
6
+ this.d1 = 'hello';
7
+ this.d2 = 'boop';
8
+ this.dir = 'whee';
9
+ this.files = [];
10
+ this.files_count = 0;
11
+ this.item_last_updated = 2020;
12
+ this.item_size = 111;
13
+ this.metadata = { identifier: 'foo' };
14
+ this.server = 'foo-server';
15
+ this.uniq = 2;
16
+ this.workable_servers = ['abc'];
17
+ }
18
+ }
19
+ export const shortcut = {
20
+ id: 'fullscreen',
21
+ icon: html `<i class="fas fullscreen-test"></i>`,
22
+ };
23
+ export const menuProvider = {
24
+ ...shortcut,
25
+ label: 'foo',
26
+ menuDetails: html `<div>foo</div>`,
27
+ selected: true,
28
+ followable: false,
29
+ href: 'https://archive.foo',
30
+ item: new ItemStub(),
31
+ baseHost: 'https://archive.foo',
32
+ subPrefix: 'bar',
33
+ updated: () => { },
34
+ };
35
35
  //# sourceMappingURL=ia-stub.js.map
@@ -1 +1 @@
1
- import '../src/no-theater-available';
1
+ import '../src/no-theater-available';
@@ -1,27 +1,27 @@
1
- import { html, fixture, expect } from '@open-wc/testing';
2
- import '../src/no-theater-available';
3
- describe('IANoTheaterAvailable', () => {
4
- it('Fires `loadingStateUpdated` on identifier change', async () => {
1
+ import { html, fixture, expect } from '@open-wc/testing';
2
+ import '../src/no-theater-available';
3
+ describe('IANoTheaterAvailable', () => {
4
+ it('Fires `loadingStateUpdated` on identifier change', async () => {
5
5
  const el = await fixture(html `<ia-no-theater-available
6
6
  .identifier=${`foo`}
7
- ></ia-no-theater-available>`);
8
- let eventFired = false;
9
- el.addEventListener('loadingStateUpdated', () => {
10
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
- eventFired = true;
12
- });
13
- expect(eventFired).to.be.false;
14
- el.identifier = 'bar';
15
- await el.updateComplete;
16
- expect(eventFired).to.be.true;
17
- });
18
- it('Has link to item download page', async () => {
19
- var _a, _b;
7
+ ></ia-no-theater-available>`);
8
+ let eventFired = false;
9
+ el.addEventListener('loadingStateUpdated', () => {
10
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+ eventFired = true;
12
+ });
13
+ expect(eventFired).to.be.false;
14
+ el.identifier = 'bar';
15
+ await el.updateComplete;
16
+ expect(eventFired).to.be.true;
17
+ });
18
+ it('Has link to item download page', async () => {
19
+ var _a, _b;
20
20
  const el = await fixture(html `<ia-no-theater-available
21
21
  .identifier=${`foo`}
22
- ></ia-no-theater-available>`);
23
- expect(el.downloadUrl).to.equal('/download/foo');
24
- expect((_b = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('a')) === null || _b === void 0 ? void 0 : _b.href).to.contain(el.downloadUrl);
25
- });
26
- });
22
+ ></ia-no-theater-available>`);
23
+ expect(el.downloadUrl).to.equal('/download/foo');
24
+ expect((_b = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('a')) === null || _b === void 0 ? void 0 : _b.href).to.contain(el.downloadUrl);
25
+ });
26
+ });
27
27
  //# sourceMappingURL=no-theater-available.test.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-item-navigator",
3
- "version": "1.0.4-a1",
3
+ "version": "1.0.4",
4
4
  "description": "Internet Archive's Item Navigator, visually explore an item's contents.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -94,6 +94,8 @@ export default css`
94
94
  border-right: 0.2rem solid;
95
95
  border-color: var(--subpanelRightBorderColor);
96
96
  padding: 0.5rem 0 0 0.5rem;
97
+ display: flex;
98
+ flex-direction: column;
97
99
  }
98
100
 
99
101
  .open {
@@ -110,21 +112,8 @@ export default css`
110
112
  margin-bottom: 0.2rem;
111
113
  }
112
114
 
113
- .content section {
114
- height: 100%;
115
- position: relative;
116
- width: 100%;
117
- }
118
-
119
- .content .selected-menu {
115
+ .content > section {
120
116
  overflow: auto;
121
- height: inherit;
122
- position: relative;
123
- }
124
-
125
- .content .selected-menu > * {
126
- display: block;
127
- padding-bottom: 3rem;
128
- position: relative;
117
+ overscroll-behavior: contain;
129
118
  }
130
119
  `;