1.7.24 • Published 10 months ago

@evag/ec-html v1.7.24

Weekly downloads
23
License
GPL-3.0-or-later
Repository
gitlab
Last release
10 months ago

ec-html

evag.io API interaction library using HTML components.

Getting started

Install using npm (or yarn or anything):

$ npm install @evag/ec-html

Create a HTML form with data-evag attributes:

<div data-evag="multiforms">
  <form action="https://api.evag.io/channels/xxx/submit" method="post" data-evag="form">
    <input type="text" name="name" placeholder="Name" />
    <input type="email" name="email" placeholder="E-mail" />
    <input type="tel" name="phone" placeholder="Phone" data-evag="phone" />
    <select name="uf">
      <option disabled="disabled" selected="selected">Select UF...</option>
      <option value="AC">AC</option>
      ...
      <option value="TO">TO</option>
    </select>
    <select name="city">
      <!-- The script will automatically load cities on UF change. -->
    </select>
    <button type="submit">Submit</button>
  </form>

  <div data-evag="form">
    <p>Thank you for submitting the form!</p>
  </div>
</div>

Use @evag/ec-html to handle forms:

import ec from '@evag/ec-html';

window.addEventListener('load', () => {
  document.querySelectorAll('[data-evag="form"]').forEach(ec.forms.setup);
});

Read src/forms.js JSDoc for more information.

1.7.23

10 months ago

1.7.24

10 months ago

1.7.21

1 year ago

1.7.22

1 year ago

1.7.20

3 years ago

1.7.11

3 years ago

1.7.12

3 years ago

1.7.13

3 years ago

1.7.14

3 years ago

1.7.15

3 years ago

1.7.16

3 years ago

1.7.17

3 years ago

1.7.18

3 years ago

1.7.19

3 years ago

1.7.19-alpha0003

3 years ago

1.7.19-alpha0001

3 years ago

1.7.19-alpha0002

3 years ago

1.7.14-alpha0002

3 years ago

1.7.14-alpha0001

3 years ago

1.7.16-alpha3

3 years ago

1.7.16-alpha2

3 years ago

1.7.16-alpha1

3 years ago

1.7.10

3 years ago

1.7.9

3 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.3

4 years ago

1.7.2

4 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago