1.7.22 • Published 1 month ago

@evag/ec-html v1.7.22

Weekly downloads
23
License
GPL-3.0-or-later
Repository
gitlab
Last release
1 month 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.21

1 month ago

1.7.22

1 month ago

1.7.20

2 years ago

1.7.11

2 years ago

1.7.12

2 years ago

1.7.13

2 years ago

1.7.14

2 years ago

1.7.15

2 years ago

1.7.16

2 years ago

1.7.17

2 years ago

1.7.18

2 years ago

1.7.19

2 years ago

1.7.19-alpha0003

2 years ago

1.7.19-alpha0001

2 years ago

1.7.19-alpha0002

2 years ago

1.7.14-alpha0002

2 years ago

1.7.14-alpha0001

2 years ago

1.7.16-alpha3

2 years ago

1.7.16-alpha2

2 years ago

1.7.16-alpha1

2 years ago

1.7.10

2 years ago

1.7.9

2 years ago

1.7.8

2 years ago

1.7.7

2 years ago

1.7.6

2 years ago

1.7.5

2 years ago

1.7.4

2 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago