react-wufoo-embed
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -93,3 +93,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ReactWufooEmbed = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
componentWillMount: function componentWillMount() { | ||
componentDidMount: function componentDidMount() { | ||
this.runScript(); | ||
@@ -96,0 +96,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.ReactWufooEmbed=e()}}(function(){return function e(t,o,n){function r(f,u){if(!o[f]){if(!t[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var a=o[f]={exports:{}};t[f][0].call(a.exports,function(e){var o=t[f][1][e];return r(o?o:e)},a,a.exports,e,t,o,n)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<n.length;f++)r(n[f]);return r}({1:[function(e,t,o){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,i=n(r),f=i["default"].PropTypes,u=i["default"].createClass,s=u({propTypes:{async:f.bool,autoResize:f.bool,embedJs:f.string,formHash:f.string.isRequired,header:f.oneOf(["show","hide"]),height:f.string,host:f.string,ssl:f.bool,userName:f.string.isRequired},getDefaultProps:function(){return{async:!0,autoResize:!0,embedJs:"/scripts/embed/form.js",formHash:"",header:"show",height:"0",host:"wufoo.com",ssl:!0,userName:""}},getSrc:function(){return"https://www."+this.props.host+this.props.embedJs},embedForm:function(){var e=this,t=void 0,o=this.readyState;if(!o||"complete"===o||"loaded"===o)try{t=new window.WufooForm,t.initialize(e.props),t.display()}catch(n){}},runScript:function(){return"function"!=typeof window.WufooForm?this.createScript():this.embedForm()},createScript:function(){var e=this,t=document.createElement("script");t.src=this.getSrc(),t.onload=t.onreadystatechange=function(){return e.embedForm()};var o=document.getElementsByTagName("script")[0],n=o.parentNode;return n.insertBefore(t,o),o},componentDidUpdate:function(){this.runScript()},componentWillMount:function(){this.runScript()},render:function(){return i["default"].createElement("div",{id:"wufoo-"+this.props.formHash})}});o["default"]=s,t.exports=o["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.ReactWufooEmbed=e()}}(function(){return function e(t,o,n){function r(f,u){if(!o[f]){if(!t[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var a=o[f]={exports:{}};t[f][0].call(a.exports,function(e){var o=t[f][1][e];return r(o?o:e)},a,a.exports,e,t,o,n)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<n.length;f++)r(n[f]);return r}({1:[function(e,t,o){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,i=n(r),f=i["default"].PropTypes,u=i["default"].createClass,s=u({propTypes:{async:f.bool,autoResize:f.bool,embedJs:f.string,formHash:f.string.isRequired,header:f.oneOf(["show","hide"]),height:f.string,host:f.string,ssl:f.bool,userName:f.string.isRequired},getDefaultProps:function(){return{async:!0,autoResize:!0,embedJs:"/scripts/embed/form.js",formHash:"",header:"show",height:"0",host:"wufoo.com",ssl:!0,userName:""}},getSrc:function(){return"https://www."+this.props.host+this.props.embedJs},embedForm:function(){var e=this,t=void 0,o=this.readyState;if(!o||"complete"===o||"loaded"===o)try{t=new window.WufooForm,t.initialize(e.props),t.display()}catch(n){}},runScript:function(){return"function"!=typeof window.WufooForm?this.createScript():this.embedForm()},createScript:function(){var e=this,t=document.createElement("script");t.src=this.getSrc(),t.onload=t.onreadystatechange=function(){return e.embedForm()};var o=document.getElementsByTagName("script")[0],n=o.parentNode;return n.insertBefore(t,o),o},componentDidUpdate:function(){this.runScript()},componentDidMount:function(){this.runScript()},render:function(){return i["default"].createElement("div",{id:"wufoo-"+this.props.formHash})}});o["default"]=s,t.exports=o["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); |
@@ -91,3 +91,3 @@ 'use strict'; | ||
componentWillMount: function componentWillMount() { | ||
componentDidMount: function componentDidMount() { | ||
this.runScript(); | ||
@@ -94,0 +94,0 @@ }, |
{ | ||
"name": "react-wufoo-embed", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "React Wufoo Embed", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactWufooEmbed.js", |
@@ -81,3 +81,3 @@ import React from 'react'; | ||
componentWillMount() { | ||
componentDidMount() { | ||
this.runScript(); | ||
@@ -84,0 +84,0 @@ }, |
23974