Skip to content

Commit e5c09a7

Browse files
authored
Merge pull request #28 from anvilco/df/types
Include types in dist
2 parents 0e0b449 + b9c2f1d commit e5c09a7

File tree

14 files changed

+312
-122
lines changed

14 files changed

+312
-122
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
env:
1111
NODE_ENV: test
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- uses: actions/setup-node@v1
1515
with:
16-
node-version: 18
17-
- uses: actions/cache@v2
16+
node-version: 20
17+
- uses: actions/cache@v4
1818
id: yarn-cache
1919
with:
2020
path: node_modules
@@ -28,11 +28,11 @@ jobs:
2828
runs-on: ubuntu-latest
2929
needs: build
3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v4
3232
- uses: actions/setup-node@v1
3333
with:
34-
node-version: 18
35-
- uses: actions/cache@v2
34+
node-version: 20
35+
- uses: actions/cache@v4
3636
id: yarn-cache
3737
with:
3838
path: node_modules
@@ -46,11 +46,11 @@ jobs:
4646
runs-on: ubuntu-latest
4747
needs: build
4848
steps:
49-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v4
5050
- uses: actions/setup-node@v1
5151
with:
52-
node-version: 18
53-
- uses: actions/cache@v2
52+
node-version: 20
53+
- uses: actions/cache@v4
5454
id: yarn-cache
5555
with:
5656
path: node_modules

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
trailingComma: "es5",
3+
tabWidth: 2,
4+
semi: false,
5+
singleQuote: true,
6+
};

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
],
77
"scripts": {
88
"lint": "yarn eslint 'packages/*/src/**.js'",
9+
"prettify": "prettier 'packages/*/src/**.js'",
10+
"prettify:check": "yarn prettify --check",
11+
"prettify:write": "yarn prettify --write",
912
"test": "yarn lerna run test",
1013
"prebuild": "git clean -fdx packages -e packages/*/node_modules",
1114
"build": "yarn && yarn lerna run build",
@@ -49,10 +52,11 @@
4952
"lerna": "^7.3.0",
5053
"mini-css-extract-plugin": "^2.7.6",
5154
"mocha": "^10.2.0",
55+
"prettier": "3.6.2",
5256
"sinon": "^16.0.0",
5357
"sinon-chai": "^3.7.0",
5458
"style-loader": "^3.3.3",
5559
"webpack": "^5.88.2",
5660
"webpack-cli": "^5.1.4"
5761
}
58-
}
62+
}

packages/anvil-embed-frame/CHANGELOG.md

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,83 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [@anvilco/anvil-embed-frame@2.0.0](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@2.0.0-alpha.0...@anvilco/anvil-embed-frame@2.0.0) - 2023-09-20
5+
## [@anvilco/anvil-embed-frame@2.2.1](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@2.2.0...@anvilco/anvil-embed-frame@2.2.1) - 2025-10-27
66

77
### Merged
88

9-
- [Breaking] Update dependencies [`#16`](https://github.com/anvilco/react-ui/pull/16)
9+
- iframeURL instead of signURL [`#25`](https://github.com/anvilco/react-ui/pull/25)
1010

1111
### Commits
1212

13-
- Update readmes [`c932e4c`](https://github.com/anvilco/react-ui/commit/c932e4c5716c0b113f1840baeb0aa9118facdc26)
13+
- fix up packaging [`74ce1cb`](https://github.com/anvilco/react-ui/commit/74ce1cb7a77295545ef89b6f43777e874ec5ce60)
14+
15+
## [@anvilco/anvil-embed-frame@2.2.0](https://github.com/anvilco/react-ui/compare/v2.1.4...@anvilco/anvil-embed-frame@2.2.0) - 2024-05-02
16+
17+
## [v2.1.4](https://github.com/anvilco/react-ui/compare/v2.1.3...v2.1.4) - 2025-10-28
18+
19+
### Commits
20+
21+
- being extra cautious [`02beb3c`](https://github.com/anvilco/react-ui/commit/02beb3c650dc774a84cf96166e38eaee5f17b0ca)
22+
23+
## [v2.1.3](https://github.com/anvilco/react-ui/compare/v2.1.2...v2.1.3) - 2025-10-28
24+
25+
### Commits
1426

15-
## [@anvilco/anvil-embed-frame@2.0.0-alpha.0](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@1.1.0...@anvilco/anvil-embed-frame@2.0.0-alpha.0) - 2023-09-18
27+
- set document inside component did mount [`5a055ed`](https://github.com/anvilco/react-ui/commit/5a055edfd2d5dcef9d3b6c4b8d6dd4a8fd1def77)
28+
29+
## [v2.1.2](https://github.com/anvilco/react-ui/compare/v2.1.1...v2.1.2) - 2025-10-27
1630

1731
### Merged
1832

19-
- Update readme to fix import error [`#15`](https://github.com/anvilco/react-ui/pull/15)
33+
- iframeURL instead of signURL [`#25`](https://github.com/anvilco/react-ui/pull/25)
34+
- Add className prop and type [`#22`](https://github.com/anvilco/react-ui/pull/22)
35+
- publish better [`#20`](https://github.com/anvilco/react-ui/pull/20)
2036

2137
### Commits
2238

23-
- Update deps [`52a73bd`](https://github.com/anvilco/react-ui/commit/52a73bd5f16d5435f80cd8ae76f20b2834807c40)
39+
- fix up packaging [`74ce1cb`](https://github.com/anvilco/react-ui/commit/74ce1cb7a77295545ef89b6f43777e874ec5ce60)
40+
41+
## [v2.1.1](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@2.0.0...v2.1.1) - 2024-04-17
42+
43+
### Merged
44+
45+
- Add style prop and add postMessage helper [`#19`](https://github.com/anvilco/react-ui/pull/19)
2446

25-
## [@anvilco/anvil-embed-frame@1.1.0](https://github.com/anvilco/react-ui/compare/v0.0.0...@anvilco/anvil-embed-frame@1.1.0) - 2022-10-05
47+
### Commits
48+
49+
- Update changelogs [`73908a8`](https://github.com/anvilco/react-ui/commit/73908a846d6cf7da180303270a4d726335ff881f)
2650

27-
## v0.0.0 - 2024-05-02
51+
## [@anvilco/anvil-embed-frame@2.0.0](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@2.0.0-alpha.0...@anvilco/anvil-embed-frame@2.0.0) - 2023-09-20
2852

2953
### Merged
3054

55+
- [Breaking] Update dependencies [`#16`](https://github.com/anvilco/react-ui/pull/16)
56+
57+
### Commits
58+
59+
- Update readmes [`c932e4c`](https://github.com/anvilco/react-ui/commit/c932e4c5716c0b113f1840baeb0aa9118facdc26)
60+
61+
## [@anvilco/anvil-embed-frame@2.0.0-alpha.0](https://github.com/anvilco/react-ui/compare/v1.9.2...@anvilco/anvil-embed-frame@2.0.0-alpha.0) - 2023-09-18
62+
63+
## [v1.9.2](https://github.com/anvilco/react-ui/compare/@anvilco/anvil-embed-frame@1.1.0...v1.9.2) - 2025-10-30
64+
65+
### Merged
66+
67+
- iframeURL instead of signURL [`#25`](https://github.com/anvilco/react-ui/pull/25)
3168
- Add className prop and type [`#22`](https://github.com/anvilco/react-ui/pull/22)
3269
- publish better [`#20`](https://github.com/anvilco/react-ui/pull/20)
3370
- Add style prop and add postMessage helper [`#19`](https://github.com/anvilco/react-ui/pull/19)
3471
- [Breaking] Update dependencies [`#16`](https://github.com/anvilco/react-ui/pull/16)
3572
- Update readme to fix import error [`#15`](https://github.com/anvilco/react-ui/pull/15)
73+
74+
### Commits
75+
76+
- Update deps [`52a73bd`](https://github.com/anvilco/react-ui/commit/52a73bd5f16d5435f80cd8ae76f20b2834807c40)
77+
78+
## @anvilco/anvil-embed-frame@1.1.0 - 2022-10-05
79+
80+
### Merged
81+
3682
- Add Typescript support to `AnvilEmbedFrame` [`#13`](https://github.com/anvilco/react-ui/pull/13)
3783
- New `@anvilco/anvil-embed-frame` package [`#12`](https://github.com/anvilco/react-ui/pull/12)
3884
- Update Readme [`#11`](https://github.com/anvilco/react-ui/pull/11)

packages/anvil-embed-frame/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@anvilco/anvil-embed-frame",
3-
"version": "2.2.0",
3+
"version": "2.2.2",
44
"description": "The AnvilEmbedFrame React component for embedded Etch signatures and Workflows.",
55
"author": "Anvil Foundry Inc.",
66
"license": "MIT",
@@ -9,7 +9,9 @@
99
"scripts": {
1010
"build": "tsc && webpack --mode production",
1111
"build:changelog": "yarn auto-changelog",
12-
"prepack": "rimraf dist && yarn build",
12+
"clean": "rimraf dist",
13+
"clean:build": "yarn clean && yarn build",
14+
"prepack": "yarn clean:build",
1315
"pack": "yarn pack",
1416
"version": "yarn build:changelog && git add CHANGELOG.md",
1517
"test": "yarn mocha --config ./test/mocha.js",
@@ -41,7 +43,7 @@
4143
"prop-types": "^15.8.1",
4244
"react": "^18.2.0",
4345
"react-dom": "^18.2.0",
44-
"rimraf": "5.0.5",
46+
"rimraf": "6.0.1",
4547
"typescript": "^5.2.2"
4648
},
4749
"peerDependencies": {

packages/anvil-embed-frame/src/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,15 @@ class AnvilEmbedFrame extends React.Component {
4848
}
4949

5050
render () {
51-
const { iframeURL, onEvent, anvilURL, scroll, style, className, ...others } = this.props
51+
const {
52+
iframeURL,
53+
onEvent,
54+
anvilURL,
55+
scroll,
56+
style,
57+
className,
58+
...others
59+
} = this.props
5260
return (
5361
<iframe
5462
id="anvil-embed-frame"

packages/react-signature-frame/CHANGELOG.md

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,56 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [v2.1.4](https://github.com/anvilco/react-ui/compare/v2.1.3...v2.1.4) - 2025-10-28
6+
7+
### Commits
8+
9+
- being extra cautious [`02beb3c`](https://github.com/anvilco/react-ui/commit/02beb3c650dc774a84cf96166e38eaee5f17b0ca)
10+
11+
## [v2.1.3](https://github.com/anvilco/react-ui/compare/v2.1.2...v2.1.3) - 2025-10-28
12+
13+
### Commits
14+
15+
- set document inside component did mount [`5a055ed`](https://github.com/anvilco/react-ui/commit/5a055edfd2d5dcef9d3b6c4b8d6dd4a8fd1def77)
16+
17+
## [v2.1.2](https://github.com/anvilco/react-ui/compare/v2.1.1...v2.1.2) - 2025-10-27
18+
19+
### Merged
20+
21+
- iframeURL instead of signURL [`#25`](https://github.com/anvilco/react-ui/pull/25)
22+
- Add className prop and type [`#22`](https://github.com/anvilco/react-ui/pull/22)
23+
- publish better [`#20`](https://github.com/anvilco/react-ui/pull/20)
24+
25+
### Commits
26+
27+
- fix up packaging [`74ce1cb`](https://github.com/anvilco/react-ui/commit/74ce1cb7a77295545ef89b6f43777e874ec5ce60)
28+
29+
## [v2.1.1](https://github.com/anvilco/react-ui/compare/@anvilco/react-signature-frame@1.9.1...v2.1.1) - 2024-04-17
30+
31+
## [@anvilco/react-signature-frame@1.9.1](https://github.com/anvilco/react-ui/compare/@anvilco/react-signature-frame@1.9.0...@anvilco/react-signature-frame@1.9.1) - 2025-10-27
32+
33+
### Merged
34+
35+
- iframeURL instead of signURL [`#25`](https://github.com/anvilco/react-ui/pull/25)
36+
37+
### Commits
38+
39+
- fix up packaging [`74ce1cb`](https://github.com/anvilco/react-ui/commit/74ce1cb7a77295545ef89b6f43777e874ec5ce60)
40+
41+
## [@anvilco/react-signature-frame@1.9.0](https://github.com/anvilco/react-ui/compare/@anvilco/react-signature-frame@1.8.3...@anvilco/react-signature-frame@1.9.0) - 2024-05-02
42+
43+
### Merged
44+
45+
- Add className prop and type [`#22`](https://github.com/anvilco/react-ui/pull/22)
46+
- publish better [`#20`](https://github.com/anvilco/react-ui/pull/20)
47+
- Add style prop and add postMessage helper [`#19`](https://github.com/anvilco/react-ui/pull/19)
48+
- [Breaking] Update dependencies [`#16`](https://github.com/anvilco/react-ui/pull/16)
49+
- Update readme to fix import error [`#15`](https://github.com/anvilco/react-ui/pull/15)
50+
51+
### Commits
52+
53+
- Update deps [`52a73bd`](https://github.com/anvilco/react-ui/commit/52a73bd5f16d5435f80cd8ae76f20b2834807c40)
54+
555
## [@anvilco/react-signature-frame@1.8.3](https://github.com/anvilco/react-ui/compare/@anvilco/react-signature-frame@1.8.2...@anvilco/react-signature-frame@1.8.3) - 2022-10-05
656

757
### Merged
@@ -165,29 +215,10 @@ All notable changes to this project will be documented in this file.
165215

166216
## [@anvilco/react-signature-frame@1.0.2-alpha.0](https://github.com/anvilco/react-ui/compare/@anvilco/react-signature-frame@1.0.0...@anvilco/react-signature-frame@1.0.2-alpha.0) - 2020-11-11
167217

168-
## [@anvilco/react-signature-frame@1.0.0](https://github.com/anvilco/react-ui/compare/v0.0.0...@anvilco/react-signature-frame@1.0.0) - 2020-11-12
169-
170-
## v0.0.0 - 2024-05-02
171-
172-
### Merged
173-
174-
- Add className prop and type [`#22`](https://github.com/anvilco/react-ui/pull/22)
175-
- publish better [`#20`](https://github.com/anvilco/react-ui/pull/20)
176-
- Add style prop and add postMessage helper [`#19`](https://github.com/anvilco/react-ui/pull/19)
177-
- [Breaking] Update dependencies [`#16`](https://github.com/anvilco/react-ui/pull/16)
178-
- Update readme to fix import error [`#15`](https://github.com/anvilco/react-ui/pull/15)
179-
- Add Typescript support to `AnvilEmbedFrame` [`#13`](https://github.com/anvilco/react-ui/pull/13)
180-
- New `@anvilco/anvil-embed-frame` package [`#12`](https://github.com/anvilco/react-ui/pull/12)
181-
- Update Readme [`#11`](https://github.com/anvilco/react-ui/pull/11)
182-
- [1-min] Fix output path for type defs [`#10`](https://github.com/anvilco/react-ui/pull/10)
183-
- Add Typescript typings [`#9`](https://github.com/anvilco/react-ui/pull/9)
184-
- Update dependencies and peer dependencies [`#7`](https://github.com/anvilco/react-ui/pull/7)
185-
- Add onError handler [`#6`](https://github.com/anvilco/react-ui/pull/6)
186-
- Add onFinishSigning prop & upgrade all minor version deps [`#5`](https://github.com/anvilco/react-ui/pull/5)
187-
- Refactor the Docs [`#3`](https://github.com/anvilco/react-ui/pull/3)
188-
- Review Follow Ups and Refactoring [`#2`](https://github.com/anvilco/react-ui/pull/2)
189-
- Setup Linting [`#1`](https://github.com/anvilco/react-ui/pull/1)
218+
## @anvilco/react-signature-frame@1.0.0 - 2020-11-12
190219

191220
### Commits
192221

193222
- AnvilSignatureFrame and AnvilSignatureModal [`7ab8fc2`](https://github.com/anvilco/react-ui/commit/7ab8fc2026411cbcc0186d9650290ba3d1afcfa5)
223+
- publish config [`c3683cc`](https://github.com/anvilco/react-ui/commit/c3683ccb2dd12523ae85118d26307fc5ab2cd495)
224+
- add babel devDependencies [`51ce830`](https://github.com/anvilco/react-ui/commit/51ce830e44defc0615261f94a42e9b7bc156c4f4)

packages/react-signature-frame/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@anvilco/react-signature-frame",
3-
"version": "1.9.0",
3+
"version": "1.9.2",
44
"description": "The AnvilSignatureFrame React component for embedded Etch signatures",
55
"author": "Anvil Foundry Inc.",
66
"license": "MIT",
@@ -9,6 +9,9 @@
99
"scripts": {
1010
"build": "tsc && webpack --mode production",
1111
"build:changelog": "yarn auto-changelog",
12+
"clean": "rimraf dist",
13+
"clean:build": "yarn clean && yarn build",
14+
"prepack": "yarn clean:build",
1215
"pack": "yarn pack",
1316
"version": "yarn build:changelog && git add CHANGELOG.md",
1417
"test": "yarn mocha --config ./test/mocha.js"
@@ -38,6 +41,7 @@
3841
"prop-types": "^15.8.1",
3942
"react": "^16.0.0",
4043
"react-dom": "^16.0.0",
44+
"rimraf": "6.0.1",
4145
"typescript": "^4.6.3"
4246
},
4347
"peerDependencies": {

packages/react-signature-frame/src/helpers.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ export function parseURLParams (searchStr, options = {}) {
1919
}
2020
} else if (searchStr) {
2121
// IE does not support URLSearchParams, so this
22-
const parsableString = searchStr.indexOf('=') > -1 ? searchStr : searchStr + '='
22+
const parsableString =
23+
searchStr.indexOf('=') > -1 ? searchStr : searchStr + '='
2324
try {
24-
params = JSON.parse('{"' + parsableString.replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') + '"}')
25+
params = JSON.parse(
26+
'{"' +
27+
parsableString
28+
.replace(/"/g, '\\"')
29+
.replace(/&/g, '","')
30+
.replace(/=/g, '":"') +
31+
'"}'
32+
)
2533
} catch (e) {
2634
console.warn(e)
2735
console.warn('Could not parse params from', parsableString)

0 commit comments

Comments
 (0)