1.0.0 • Published 7 months ago
@internetarchive/ia-wayback-search v1.0.0
Wayback Search Form Component
Usage
<ia-wayback-search
waybackPagesArchived="32 trillion pages"
></ia-wayback-search>document.querySelector('ia-wayback-search').locationHandler = {
submitCallback: (query) => {
window.location = `https://web.archive.org/web/*/${query}`;
}
};Properties:
locationHandler: { type: Function }, // function called when form submitted. @param url string
waybackPagesArchived: { type: String }, // Pages archived message, e.g. "428 billion pages"Events
waybackSearchSubmitted: form element onsubmit waybackMachineStatsLinkClicked: stats link onclick * waybackMachineLogoLink: Wayback logo link onclick
Testing
Unit tests are placed in the ./test directory with the suffix and extension .test.js.
Run the tests with npm run test.
We use web-test-runner: https://modern-web.dev/docs/test-runner/overview/
Structure
- index.js - main component export
- Demo app is in another directory:
/www/index.htmlnpm run start- runs local server in Demo directory which is in/wwwfolder- you can also just use your preferred server
- open demo:
http://localhost:8000/www/index.html
- /src/wayback-search.js - main component definition
- /stories - Storybook setup
- /test - unit tests
1.0.0
7 months ago
0.2.6-webdev-7393.6
9 months ago
0.2.6-webdev-7393.5
9 months ago
0.2.6-webdev-7393.2
9 months ago
0.2.6-webdev-7393.1
9 months ago
0.2.6-webdev-7393.4
9 months ago
0.2.6-webdev-7393.3
9 months ago
0.2.6-webdev-7393.0
9 months ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.3
3 years ago
0.2.2-alpha.1
4 years ago
0.2.2
4 years ago
0.2.2-slot1
4 years ago
0.2.1
5 years ago
0.2.0-alpha3
5 years ago
0.2.0-alpha2
5 years ago
0.2.0-alpha1
5 years ago
0.1.1-2570e1a
5 years ago
0.2.0
5 years ago
0.2.0-alpha.5a3f7d8
5 years ago
0.1.1
5 years ago
0.1.1-alpha-ba5fc02
5 years ago
0.1.0
6 years ago