@anvilco/anvil-embed-frame
Advanced tools
Comparing version 1.1.0 to 2.0.0-alpha.0
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
## @anvilco/anvil-embed-frame@1.1.0 - 2022-10-05 | ||
### Merged | ||
- Add Typescript support to `AnvilEmbedFrame` [`#13`](https://github.com/anvilco/react-ui/pull/13) | ||
- New `@anvilco/anvil-embed-frame` package [`#12`](https://github.com/anvilco/react-ui/pull/12) | ||
- Update Readme [`#11`](https://github.com/anvilco/react-ui/pull/11) | ||
- [1-min] Fix output path for type defs [`#10`](https://github.com/anvilco/react-ui/pull/10) | ||
- Add Typescript typings [`#9`](https://github.com/anvilco/react-ui/pull/9) | ||
- Update dependencies and peer dependencies [`#7`](https://github.com/anvilco/react-ui/pull/7) | ||
- Add onError handler [`#6`](https://github.com/anvilco/react-ui/pull/6) | ||
- Add onFinishSigning prop & upgrade all minor version deps [`#5`](https://github.com/anvilco/react-ui/pull/5) | ||
- Refactor the Docs [`#3`](https://github.com/anvilco/react-ui/pull/3) | ||
- Review Follow Ups and Refactoring [`#2`](https://github.com/anvilco/react-ui/pull/2) | ||
- Setup Linting [`#1`](https://github.com/anvilco/react-ui/pull/1) | ||
### Commits | ||
- AnvilSignatureFrame and AnvilSignatureModal [`7ab8fc2`](https://github.com/anvilco/react-ui/commit/7ab8fc2026411cbcc0186d9650290ba3d1afcfa5) |
@@ -34,3 +34,3 @@ export default AnvilEmbedFrame; | ||
}) => void; | ||
render(): JSX.Element; | ||
render(): React.JSX.Element; | ||
} | ||
@@ -40,18 +40,16 @@ declare namespace AnvilEmbedFrame { | ||
function onEvent(): void; | ||
const anvilURL: string; | ||
const enableDefaultStyles: boolean; | ||
let anvilURL: string; | ||
} | ||
namespace propTypes { | ||
export const iframeURL: PropTypes.Validator<string>; | ||
const onEvent_1: PropTypes.Requireable<(...args: any[]) => any>; | ||
export let iframeURL: PropTypes.Validator<string>; | ||
export let onLoad: PropTypes.Requireable<(...args: any[]) => any>; | ||
let onEvent_1: PropTypes.Requireable<(...args: any[]) => any>; | ||
export { onEvent_1 as onEvent }; | ||
const anvilURL_1: PropTypes.Requireable<string>; | ||
let anvilURL_1: PropTypes.Requireable<string>; | ||
export { anvilURL_1 as anvilURL }; | ||
const enableDefaultStyles_1: PropTypes.Requireable<boolean>; | ||
export { enableDefaultStyles_1 as enableDefaultStyles }; | ||
export const scroll: PropTypes.Requireable<string>; | ||
export let scroll: PropTypes.Requireable<string>; | ||
} | ||
} | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
(()=>{var e={703:(e,t,r)=>{"use strict";var n=r(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},697:(e,t,r)=>{e.exports=r(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>v});const e=require("react");var t=r.n(e),o=r(697),i=r.n(o),a=["iframeURL","onEvent","anvilURL","enableDefaultStyles","scroll"];function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function s(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(v,e);var r,n,o,i,b=(o=v,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(o);if(i){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return s(this,e)});function v(e){var r,n,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),i=function(e){var t=e.origin,n=e.data,o=r.props,i=o.anvilURL,a=o.onEvent;i===t&&"object"===l(n)&&a(n)},(o="handleEvent")in(n=p(r=b.call(this,e)))?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.iframeRef=t().createRef(),r}return r=v,(n=[{key:"componentDidMount",value:function(){var e=this.props.scroll;e&&this.iframeRef.current.scrollIntoView({behavior:e}),window.addEventListener("message",this.handleEvent)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.handleEvent)}},{key:"render",value:function(){var e=this.props,r=e.iframeURL,n=(e.onEvent,e.anvilURL,e.enableDefaultStyles),o=(e.scroll,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a));return t().createElement("iframe",c({id:"anvil-embed-frame",name:"Anvil Embed Frame",title:"Anvil Embed Frame",style:n?{width:"80vw",height:"85vh",maxWidth:"1200px",borderStyle:"groove"}:void 0},o,{src:r,ref:this.iframeRef}),t().createElement("p",{id:"anvil-iframe-warning"},"Your browser does not support iframes."))}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),v}(t().Component);b.defaultProps={onEvent:function(){},anvilURL:"https://app.useanvil.com",enableDefaultStyles:!0},b.propTypes={iframeURL:i().string.isRequired,onEvent:i().func,anvilURL:i().string,enableDefaultStyles:i().bool,scroll:i().oneOf(["auto","smooth"])};const v=b})(),module.exports=n})(); | ||
(()=>{var e={262:(e,t,r)=>{"use strict";var n=r(586);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},980:(e,t,r)=>{e.exports=r(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>v});const e=require("react");var t=r.n(e),o=r(980),i=r.n(o),a=["iframeURL","onEvent","anvilURL","scroll"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===u(t)?t:String(t)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(v,e);var r,n,o,i,b=(o=v,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(o);if(i){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}(this,e)});function v(e){var r,n,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),n=s(r=b.call(this,e)),i=function(e){var t=e.origin,n=e.data,o=r.props,i=o.anvilURL,a=o.onEvent;i===t&&"object"===u(n)&&a(n)},(o=y(o="handleEvent"))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.iframeRef=t().createRef(),r}return r=v,(n=[{key:"componentDidMount",value:function(){var e=this.props.scroll;e&&this.iframeRef.current.scrollIntoView({behavior:e}),window.addEventListener("message",this.handleEvent)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.handleEvent)}},{key:"render",value:function(){var e=this.props,r=e.iframeURL,n=(e.onEvent,e.anvilURL,e.scroll,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a));return t().createElement("iframe",c({id:"anvil-embed-frame",name:"AnvilEmbedFrame"},n,{src:r,ref:this.iframeRef}),t().createElement("p",{id:"anvil-iframe-warning"},"Your browser does not support iframes."))}}])&&f(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),v}(t().Component);b.defaultProps={onEvent:function(){},anvilURL:"https://app.useanvil.com"},b.propTypes={iframeURL:i().string.isRequired,onLoad:i().func,onEvent:i().func,anvilURL:i().string,scroll:i().oneOf(["auto","smooth"])};const v=b})(),module.exports=n})(); |
{ | ||
"name": "@anvilco/anvil-embed-frame", | ||
"version": "1.1.0", | ||
"version": "2.0.0-alpha.0", | ||
"description": "The AnvilEmbedFrame React component for embedded Etch signatures and Workflows.", | ||
@@ -38,7 +38,7 @@ "author": "Anvil Foundry Inc.", | ||
"devDependencies": { | ||
"@types/react": "^18.0.21", | ||
"@types/react": "^18.2.22", | ||
"prop-types": "^15.8.1", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"typescript": "^4.8.4" | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
@@ -58,3 +58,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "035bb8622a6b89fa10a23be3bc21b81fae1cfd7b" | ||
"gitHead": "4024144e3122e2e2feae8b0a119a413348e47651" | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
18792
180
2
1