@internetarchive/ia-topnav 1.1.24 → 1.1.25-alpha1
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/.eslintrc +0 -0
- package/.storybook/.babelrc +0 -0
- package/.storybook/addons.js +0 -0
- package/.storybook/config.js +0 -0
- package/LICENSE +0 -0
- package/README.md +3 -3
- package/index.d.ts +0 -1
- package/index.js +0 -0
- package/package.json +1 -1
- package/src/assets/img/hamburger.js +1 -1
- package/src/assets/img/ia-icon.js +1 -1
- package/src/assets/img/icon-audio.js +1 -1
- package/src/assets/img/icon-close.js +1 -1
- package/src/assets/img/icon-donate.js +1 -1
- package/src/assets/img/icon-ellipses.js +1 -1
- package/src/assets/img/icon-ia-logo.js +1 -1
- package/src/assets/img/icon-images.js +1 -1
- package/src/assets/img/icon-search.js +1 -1
- package/src/assets/img/icon-software.js +1 -1
- package/src/assets/img/icon-texts.js +1 -1
- package/src/assets/img/icon-upload.js +1 -1
- package/src/assets/img/icon-user.js +1 -1
- package/src/assets/img/icon-video.js +1 -1
- package/src/assets/img/icon-web.js +1 -1
- package/src/assets/img/icon.js +1 -1
- package/src/assets/img/user.js +1 -1
- package/src/assets/img/wordmark-stacked.js +1 -1
- package/src/desktop-subnav.js +1 -1
- package/src/dropdown-menu.js +1 -1
- package/src/ia-topnav.js +1 -4
- package/src/lib/location-handler.js +0 -0
- package/src/lib/toSentenceCase.js +0 -0
- package/src/login-button.js +1 -1
- package/src/media-button.js +1 -1
- package/src/media-menu.js +1 -1
- package/src/media-slider.js +1 -1
- package/src/media-subnav.js +1 -1
- package/src/more-slider.js +1 -1
- package/src/nav-search.js +1 -1
- package/src/primary-nav.js +2 -3
- package/src/save-page-form.js +1 -1
- package/src/search-menu.js +1 -1
- package/src/styles/base.js +1 -1
- package/src/styles/desktop-subnav.js +1 -1
- package/src/styles/dropdown-menu.js +2 -2
- package/src/styles/ia-topnav.js +1 -1
- package/src/styles/login-button.js +1 -1
- package/src/styles/media-button.js +1 -1
- package/src/styles/media-menu.js +1 -1
- package/src/styles/media-slider.js +1 -1
- package/src/styles/media-subnav.js +1 -1
- package/src/styles/more-slider.js +1 -1
- package/src/styles/nav-search.js +1 -1
- package/src/styles/primary-nav.js +1 -1
- package/src/styles/save-page-form.js +1 -1
- package/src/styles/search-menu.js +1 -1
- package/src/styles/signed-out-dropdown.js +1 -1
- package/src/styles/user-menu.js +1 -1
- package/src/styles/wayback-search.js +1 -1
- package/src/styles/wayback-slider.js +1 -1
- package/src/tracked-element.js +1 -1
- package/src/user-menu.js +1 -1
- package/src/wayback-slider.js +1 -1
- package/stories/topnav-element.stories.js +0 -0
- package/test/assets/img/hamburger.test.js +0 -0
- package/test/assets/img/user.test.js +0 -0
- package/test/dropdown-menu.test.js +0 -0
- package/test/ia-icon.test.js +0 -0
- package/test/login-button.test.js +0 -0
- package/test/media-button.test.js +0 -0
- package/test/save-page-form.test.js +0 -0
- package/test/wayback-slider.test.js +0 -0
- package/demo.html +0 -41
package/.eslintrc
CHANGED
|
File without changes
|
package/.storybook/.babelrc
CHANGED
|
File without changes
|
package/.storybook/addons.js
CHANGED
|
File without changes
|
package/.storybook/config.js
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@ yarn add @internetarchive/ia-topnav
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
@see [
|
|
13
|
+
@see [www/index.html](www/index.html) for the simplest example with all the defaults
|
|
14
14
|
|
|
15
|
-
`yarn start` => open demo: `http://localhost:8000/
|
|
15
|
+
`yarn start` => open demo: `http://localhost:8000/www/index.html`
|
|
16
16
|
|
|
17
17
|
It shows a dynamic change of the logged in user name -- and how it will re-paint the menus.
|
|
18
18
|
|
|
@@ -123,7 +123,7 @@ yarn install
|
|
|
123
123
|
```bash
|
|
124
124
|
yarn start // start development server and typescript compiler
|
|
125
125
|
```
|
|
126
|
-
then open demo - http://localhost:8000/
|
|
126
|
+
then open demo - http://localhost:8000/www/index.html
|
|
127
127
|
|
|
128
128
|
## Testing
|
|
129
129
|
|
package/index.d.ts
CHANGED
|
@@ -94,7 +94,6 @@ export declare class IATopNav extends LitElement {
|
|
|
94
94
|
selectedMenuOption?: string;
|
|
95
95
|
username?: string;
|
|
96
96
|
userProfileImagePath?: string;
|
|
97
|
-
userProfileLastModified?: string;
|
|
98
97
|
menus: IATopNavMenuConfig;
|
|
99
98
|
/**
|
|
100
99
|
* Copy to display for number of pages archived at the top of the Wayback search form
|
package/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/assets/img/icon.js
CHANGED
package/src/assets/img/user.js
CHANGED
package/src/desktop-subnav.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, nothing } from 'https://offshoot.
|
|
1
|
+
import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import desktopSubnavCSS from './styles/desktop-subnav.js';
|
|
4
4
|
import icons from './assets/img/icons.js';
|
package/src/dropdown-menu.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, nothing } from 'https://offshoot.
|
|
1
|
+
import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import dropdownMenuCSS from './styles/dropdown-menu.js';
|
|
4
4
|
import formatUrl from './lib/formatUrl.js';
|
package/src/ia-topnav.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html, nothing } from 'https://offshoot.
|
|
1
|
+
import { LitElement, html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
|
|
3
3
|
import './primary-nav.js';
|
|
4
4
|
import './user-menu.js';
|
|
@@ -55,7 +55,6 @@ export default class IATopNav extends LitElement {
|
|
|
55
55
|
selectedMenuOption: { type: String },
|
|
56
56
|
username: { type: String },
|
|
57
57
|
userProfileImagePath: { type: String },
|
|
58
|
-
userProfileLastModified: { type: String },
|
|
59
58
|
secondIdentitySlotMode: { type: String },
|
|
60
59
|
};
|
|
61
60
|
}
|
|
@@ -65,7 +64,6 @@ export default class IATopNav extends LitElement {
|
|
|
65
64
|
this.menuSetup();
|
|
66
65
|
this.mediaBaseHost = 'https://archive.org';
|
|
67
66
|
this.userProfileImagePath = '/services/img/user/profile';
|
|
68
|
-
this.userProfileLastModified = '';
|
|
69
67
|
this.config = defaultTopNavConfig;
|
|
70
68
|
this.hideSearch = false;
|
|
71
69
|
this.mediaSliderOpen = false;
|
|
@@ -245,7 +243,6 @@ export default class IATopNav extends LitElement {
|
|
|
245
243
|
.selectedMenuOption=${this.selectedMenuOption}
|
|
246
244
|
.username=${this.username}
|
|
247
245
|
.userProfileImagePath=${this.userProfileImagePath}
|
|
248
|
-
.userProfileLastModified=${this.userProfileLastModified}
|
|
249
246
|
?hideSearch=${this.hideSearch}
|
|
250
247
|
@mediaTypeSelected=${this.mediaTypeSelected}
|
|
251
248
|
@toggleSearchMenu=${this.toggleSearchMenu}
|
|
File without changes
|
|
File without changes
|
package/src/login-button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.
|
|
1
|
+
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import icons from './assets/img/icons.js';
|
|
4
4
|
import loginButtonCSS from './styles/login-button.js';
|
package/src/media-button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.
|
|
1
|
+
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import icons from './assets/img/icons.js';
|
|
4
4
|
import toSentenceCase from './lib/toSentenceCase.js';
|
package/src/media-menu.js
CHANGED
package/src/media-slider.js
CHANGED
package/src/media-subnav.js
CHANGED
package/src/more-slider.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.
|
|
1
|
+
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import toSentenceCase from './lib/toSentenceCase.js';
|
|
4
4
|
import moreSliderCSS from './styles/more-slider.js';
|
package/src/nav-search.js
CHANGED
package/src/primary-nav.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, nothing } from 'https://offshoot.
|
|
1
|
+
import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import icons from './assets/img/icons.js';
|
|
4
4
|
import './assets/img/hamburger.js';
|
|
@@ -31,7 +31,6 @@ class PrimaryNav extends TrackedElement {
|
|
|
31
31
|
userMenuOpen: { type: Boolean },
|
|
32
32
|
username: { type: String },
|
|
33
33
|
userProfileImagePath: { type: String },
|
|
34
|
-
userProfileLastModified: { type: String },
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -99,7 +98,7 @@ class PrimaryNav extends TrackedElement {
|
|
|
99
98
|
data-event-click-tracking="${this.config.eventCategory}|NavUserMenu"
|
|
100
99
|
>
|
|
101
100
|
<img
|
|
102
|
-
src="${this.mediaBaseHost}${this.userProfileImagePath}
|
|
101
|
+
src="${this.mediaBaseHost}${this.userProfileImagePath}"
|
|
103
102
|
alt="${this.username}"
|
|
104
103
|
/>
|
|
105
104
|
<span class="username">${this.truncatedScreenName}</span>
|
package/src/save-page-form.js
CHANGED
package/src/search-menu.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.
|
|
1
|
+
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import searchMenuCSS from './styles/search-menu.js';
|
|
4
4
|
import formatUrl from './lib/formatUrl.js';
|
package/src/styles/base.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from 'https://offshoot.
|
|
1
|
+
import { css } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
.nav-container {
|
|
@@ -8,7 +8,7 @@ export default css`
|
|
|
8
8
|
nav {
|
|
9
9
|
position: absolute;
|
|
10
10
|
right: 0;
|
|
11
|
-
z-index:
|
|
11
|
+
z-index: 3;
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
font-size: 1.6rem;
|
|
14
14
|
background-color: var(--dropdownMenuBg);
|
package/src/styles/ia-topnav.js
CHANGED
package/src/styles/media-menu.js
CHANGED
package/src/styles/nav-search.js
CHANGED
package/src/styles/user-menu.js
CHANGED
package/src/tracked-element.js
CHANGED
package/src/user-menu.js
CHANGED
package/src/wayback-slider.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/ia-icon.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/demo.html
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<link rel="stylesheet" href="https://archive.org/includes/build/css/archive.min.css">
|
|
2
|
-
|
|
3
|
-
<ia-topnav></ia-topnav>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<center>
|
|
7
|
-
|
|
8
|
-
<h1>demo</h1>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<button onclick="document.querySelector('ia-topnav').setAttribute('username', 'brewster')">
|
|
12
|
-
switch username to brewster
|
|
13
|
-
</button>
|
|
14
|
-
<br>
|
|
15
|
-
<button onclick="document.querySelector('ia-topnav').removeAttribute('username')">
|
|
16
|
-
switch to un-logged-in
|
|
17
|
-
</button>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<hr>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<button onclick="document.querySelector('ia-topnav').setAttribute('localLinks', false)">
|
|
24
|
-
switch localLinks false (change to https://archive.org)
|
|
25
|
-
</button>
|
|
26
|
-
<br>
|
|
27
|
-
<button onclick="document.querySelector('ia-topnav').removeAttribute('localLinks')">
|
|
28
|
-
switch to localLinks (default, change links to start with /)
|
|
29
|
-
</button>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<hr>
|
|
33
|
-
<button onclick="document.querySelector('ia-topnav').setAttribute('waybackPagesArchived', 'many, MAAAANNNY')">
|
|
34
|
-
change WB pages count
|
|
35
|
-
</button>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<script type="module" src="./src/ia-topnav.js"></script>
|
|
40
|
-
|
|
41
|
-
</center>
|