Skip to content

Commit 2702594

Browse files
authored
[DEV-4322] HelloSign Embedded v2 (#80)
refactor(DEV-4322): HelloSign Embedded v2 BREAKING CHANGE: `HelloSign` is now a class, not a singleton. BREAKING CHANGE: `init()` has been deprecated BREAKING CHANGE: The `url` option is now the first argument of `open()` BREAKING CHANGE: `open()` options are now defined as the second argument BREAKING CHANGE: `userCulture` option is now named `locale` BREAKING CHANGE: `healthCheckoutTimeoutMs` option is now named `timeout` BREAKING CHANGE: `requester` option is now named `requestingEmail` BREAKING CHANGE: `messageListener` option has been removed BREAKING CHANGE: `uxVersion` option has been removed BREAKING CHANGE: `height` option has been removed BREAKING CHANGE: `HelloSign.CULTURES` is now `HelloSign.locales` BREAKING CHANGE: `HelloSign.VERSION` is now `HelloSign.version` Fixes #27, fixes #31, fixes #36, fixes #40, fixes #47, fixes #57, fixes #75.
1 parent 6dad519 commit 2702594

36 files changed

Lines changed: 11348 additions & 24871 deletions

‎.babelrc‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎.eslintrc‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"extends": "@hellosign",
3+
"parser": "babel-eslint",
4+
"env": {
5+
"jest": true
6+
},
7+
"globals": {
8+
"__PKG_NAME__": true,
9+
"__PKG_VERSION__": true
10+
},
11+
"plugins": [
12+
"compat"
13+
],
14+
"rules": {
15+
"arrow-body-style": "off",
16+
"class-methods-use-this": "off",
17+
"compat/compat": "error",
18+
"global-require": "off",
19+
"no-else-return": "off",
20+
"no-underscore-dangle": "off",
21+
"padded-blocks": "off",
22+
"prefer-destructuring": "off"
23+
},
24+
"settings": {
25+
"polyfills": [
26+
"url",
27+
"urlsearchparams"
28+
]
29+
}
30+
}

‎.github/CONTRIBUTING.md‎

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,20 @@
1-
# How to contribute
1+
# How to Contribute
22

3-
We're excited you're considering contributing to `hellosign-embedded`! Your patches are essential to keeping our client library bug free and up-to-date. We want to keep it as easy as possible to contribute. There are only a few guidelines you must follow that will allow us to keep up with pull requests and maintain a high quality code base.
4-
5-
## Getting Started
6-
7-
* Make sure you have a [GitHub account](https://github.com/signup/free)
8-
* Make sure you have a [HelloSign account](http://www.hellosign.com)
9-
* Submit a new [issue ticket](https://github.com/HelloFax/hellosign-embedded/issues), assuming one does not already exist.
10-
* Clearly describe the issue including steps to reproduce when it is a bug.
11-
* Make sure to include the version you are using which has the issue (and confirm that the issue you are having has not been fixed in a later version)
12-
* Fork the repository on GitHub
3+
Welcome! HelloSign Embedded is an open source project which allows HelloSign API customers the ability to embed signature requests and templates from within their external web applications. Bug reports and patches are essential to keeping our library free and up to date.
134

145
## Making Changes
156

16-
* Make commits of logical units.
17-
* Check for unnecessary whitespace with `git diff --check` before committing.
18-
* Make sure your commit messages are in [the proper format](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
7+
* Make sure your commit messages adhere to the [Conventional Commits specification](https://conventionalcommits.org/).
8+
* Make sure your code is written so that is satisfies our [JavaScript style guide](https://github.com/hellosign/javascript).
199
* Make sure you have added any necessary tests for your changes.
20-
* Run all unit tests, if available, to ensure nothing else was accidentally broken.
21-
22-
### Making trivial changes
23-
24-
For changes of a trivial nature to comments and documentation, it is not
25-
always necessary to create a new issue ticket.
10+
* Before submitting for a pull request, run all unit tests to ensure nothing else was accidentally broken.
2611

27-
## Submitting Changes
12+
## Pull Requests
2813

29-
* Push your changes to your fork of the repository.
30-
* Submit a pull request to the repository in the HelloFax organization.
31-
* Update your issue ticket to mark that you have submitted code and are ready for it to be reviewed (Status: Ready for Merge).
32-
* Include a link to the pull request in the ticket.
33-
* The HelloSign dev team looks at Pull Requests on a regular basis.
34-
* After feedback has been given we expect responses within two weeks. After two
35-
weeks we may close the pull request if it isn't showing any activity.
14+
1. Fork the HelloSign Embedded repository.
15+
2. Create a new branch for each feature, fix or improvement.
16+
3. Send a pull request from each feature branch to the **`develop`** branch.
3617

37-
# Additional Resources
18+
## License
3819

39-
* [General GitHub documentation](http://help.github.com/)
40-
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
41-
* [HelloSign API documentation](https://www.hellosign.com/api/documentation)
42-
* [HelloSign API HipChat room](https://www.hipchat.com/gq4BMFKt1)
20+
You must agree that your patch will be licensed under the [HelloSign Embedded License](../LICENSE.md), and if we change the license we will assume that you agreed with the change unless otherwise stated.

‎.gitignore‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
.DS_Store
22

3-
dist
3+
.coverage
44
node_modules
5-
release
65
umd
7-
8-
*.log
9-
*.bak

‎.npmignore‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.travis.yml‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
language: node_js
22
node_js:
33
- "node"
4-
before_script: npm run build
5-
before_deploy: npm run prerelease
4+
before_script:
5+
- npm run build
6+
before_deploy:
7+
- export NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
68
deploy:
79
- provider: s3
810
access_key_id: $S3_ACCESS_KEY_ID
911
secret_access_key: $S3_SECRET_ACCESS_KEY
1012
bucket: $S3_BUCKET
1113
skip_cleanup: true
12-
upload_dir: public/js
13-
local_dir: release
14-
on:
15-
branch: master
16-
- provider: s3
17-
access_key_id: $S3_ACCESS_KEY_ID
18-
secret_access_key: $S3_SECRET_ACCESS_KEY
19-
bucket: $S3_HF_BUCKET
20-
skip_cleanup: true
21-
upload_dir: js
22-
local_dir: release
14+
upload_dir: embedded/${NPM_PACKAGE_VERSION}
15+
local_dir: umd
2316
on:
2417
branch: master
2518
- provider: npm
26-
email: "api@hellosign.com"
19+
email: $NPM_EMAIL_ADDRESS
2720
api_key: $NPM_API_KEY
2821
skip_cleanup: true
2922
tag: latest
3023
on:
3124
branch: master
25+
- provider: releases
26+
api_key: $GITHUB_OAUTH_TOKEN
27+
file_glob: true
28+
file: umd/*
29+
skip_cleanup: true
30+
on:
31+
branch: master

‎CHANGELOG.md‎

Whitespace-only changes.

‎LICENSE‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
The ISC License (ISC)
1+
MIT License
22

33
Copyright (c) 2018 HelloSign
44

5-
Permission to use, copy, modify, and/or distribute this software for any
6-
purpose with or without fee is hereby granted, provided that the above
7-
copyright notice and this permission notice appear in all copies.
8-
9-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15-
PERFORMANCE OF THIS SOFTWARE.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)