@internetarchive/ia-pic-uploader
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

Build Status codecov

This is the Profile Pic Uploader Component for Internet Archive website.

Installation

yarn add @internetarchive/ia-pic-uploader

Usage of ia-pic-uploader

import '@internetarchive/ia-pic-uploader';


<div id="demo"></div>

<ia-pic-uploader>
</ia-pic-uploader>

<script type="module">
    import { html, render } from 'lit';
    import '../dist/src/ia-pic-uploader.js';

    render(
      html`
        <ia-pic-uploader></ia-pic-uploader>
      `,
      document.querySelector('#demo')
    );

    const iaPicUploader = document.querySelector('ia-pic-uploader');

    iaPicUploader.identifier = 'naturalhistoryof00unse_4111';
    iaPicUploader.endpoint = 'https://www-neeraj.archive.org/services/post-file.php';
    iaPicUploader.picture = './demo/default-preview.jpg' ;
    iaPicUploader.type = 'full'; // full|compact
    iaPicUploader.lookingAtMyAccount = true;
    iaPicUploader.maxFileSizeInMB = 4; //
    iaPicUploader.validFileTypes = ['image/jpeg','image/png','image/gif'];
  </script>

Variants

Attribute

  1. identifier - User identifier.
  2. endpoint - Endpoint of form submition in case of full variant.
  3. picture - User profile picture.
  4. type - Web component type full | compact.
  5. lookingAtMyAccount - User looking at it's own account
  6. maxFilesSizeInMB - File's max-size
  7. validFileTypes - File's valid types

Local Demo with web-dev-server

yarn start

To run a local development server that serves the basic demo located in demo/index.html

Testing with Web Test Runner

To run the suite of Web Test Runner tests, run

yarn run test

To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run

yarn run test:watch

Linting with ESLint, Prettier, and Types

To scan the project for linting errors, run

yarn run lint

You can lint with ESLint and Prettier individually as well

yarn run lint:eslint
yarn run lint:prettier

To automatically fix many linting errors, run

yarn run format

You can format using ESLint and Prettier individually as well

yarn run format:eslint
yarn run format:prettier

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.70canary
0.1.85latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.85
0.1.7-alpha11
0.1.70
0.1.6-alpha160
0.1.6-alpha150
0.1.6-alpha140
0.1.6-alpha130
0.1.6-alpha121
0.1.6-alpha110
0.1.6-alpha100
0.1.6-alpha90
0.1.6-alpha80
0.1.6-alpha70
0.1.6-alpha60
0.1.6-alpha50
0.1.6-alpha40
0.1.6-alpha30
0.1.6-alpha20
0.1.6-alpha10
0.1.60
0.0.1-alpha460
0.0.1-alpha450
0.0.1-alpha440
0.1.50
0.0.1-alpha430
0.0.1-alpha420
0.0.1-alpha410
0.0.1-alpha400
0.0.1-alpha390
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.1-alpha380
0.0.1-alpha370
0.0.1-alpha360
0.0.1-alpha350
0.0.1-alpha340
0.0.1-alpha330
0.0.1-alpha320
0.0.1-alpha310
0.0.1-alpha300
0.0.1-alpha290
0.0.1-alpha280
0.0.1-alpha270
0.0.1-alpha261
0.0.1-alpha240
0.0.1-alpha250
0.0.1-alpha230
0.0.1-alpha220
0.0.1-alpha210
0.0.1-alpha200
0.0.1-alpha190
0.0.1-alpha180
0.0.1-alpha170
0.0.1-alpha160
0.0.1-alpha150
0.0.1-alpha140
0.0.1-alpha130
0.0.1-alpha120
0.0.1-alpha110
0.0.1-alpha100
0.0.1-alpha90
0.0.1-alpha80
0.0.1-alpha70
0.0.1-alpha60
0.0.1-alpha50
0.0.1-alpha40
0.0.1-alpha30
0.0.1-alpha20
0.0.1-alpha10
0.0.10

Package Sidebar

Install

npm i @internetarchive/ia-pic-uploader

Weekly Downloads

8

Version

0.1.8

License

AGPL-3.0-only

Unpacked Size

1.01 MB

Total Files

40

Last publish

Collaborators

  • rebecca-shoptaw
  • jeffwklein
  • jim-at-ia
  • tracey.pooh
  • latonv
  • ibnesayeed
  • bfalling
  • mitraardron
  • vbanos
  • kngenie
  • iisa
  • cdrini
  • nsharma123
  • dualcnhq