@stackshift-ui/webriq-form 7.0.0-beta.5 → 7.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import d from"react";import{jsx as c}from"react/jsx-runtime";var n=class extends d.Component{constructor(e){super(e),this.loadWebriQFormScript=this.loadWebriQFormScript.bind(this)}componentDidMount(){var e;window&&!window.isWebriQFormLoaded&&this.loadWebriQFormScript(),window&&window.isWebriQFormLoaded&&((e=window.webriqFormRefresh)==null||e.call(window))}loadWebriQFormScript(){var t;if(!document.getElementById("webriqform")){let r=document.createElement("script");r.type="text/javascript",r.id="webriqform",r.defer=!0,r.src=this.props.scriptSrc||"https://pagebuilderforms.webriq.com/js/initReactForms",document.body.appendChild(r);let o=document.getElementsByTagName("script")[0];(t=o.parentNode)==null||t.insertBefore(r,o)}}componentWillUnmount(){var o,i;let{unmountScript:e}=this.props,t=document.getElementById("webriqform");t&&e&&((o=t.parentNode)==null||o.removeChild(t)),window&&e&&(window.isWebriQFormLoaded=!1);let r=document.getElementById("webriqFormRecaptcha");r&&e&&((i=r.parentNode)==null||i.removeChild(r))}render(){let{id:e,name:t,className:r,...o}=this.props,i=this.props.formId||this.props["data-form-id"],s=this.props.redirectUrl||this.props["data-thankyou-url"]||"/thank-you";return c("form",{name:t,id:e,className:r,method:"POST","data-form-id":i,"data-thankyou-url":s,webriq:"true",...o,children:this.props.children})}};export{n as a};
@@ -0,0 +1 @@
1
+ export * from "./webriq-form";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var l=Object.create;var s=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var u=(t,r)=>{for(var e in r)s(t,e,{get:r[e],enumerable:!0})},c=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of w(r))!f.call(t,i)&&i!==e&&s(t,i,{get:()=>r[i],enumerable:!(o=b(r,i))||o.enumerable});return t};var F=(t,r,e)=>(e=t!=null?l(h(t)):{},c(r||!t||!t.__esModule?s(e,"default",{value:t,enumerable:!0}):e,t)),g=t=>c(s({},"__esModule",{value:!0}),t);var q={};u(q,{WebriQForm:()=>d});module.exports=g(q);var m=F(require("react")),a=require("react/jsx-runtime"),d=class extends m.default.Component{constructor(r){super(r),this.loadWebriQFormScript=this.loadWebriQFormScript.bind(this)}componentDidMount(){var r;window&&!window.isWebriQFormLoaded&&this.loadWebriQFormScript(),window&&window.isWebriQFormLoaded&&((r=window.webriqFormRefresh)==null||r.call(window))}loadWebriQFormScript(){var e;if(!document.getElementById("webriqform")){let o=document.createElement("script");o.type="text/javascript",o.id="webriqform",o.defer=!0,o.src=this.props.scriptSrc||"https://pagebuilderforms.webriq.com/js/initReactForms",document.body.appendChild(o);let i=document.getElementsByTagName("script")[0];(e=i.parentNode)==null||e.insertBefore(o,i)}}componentWillUnmount(){var i,n;let{unmountScript:r}=this.props,e=document.getElementById("webriqform");e&&r&&((i=e.parentNode)==null||i.removeChild(e)),window&&r&&(window.isWebriQFormLoaded=!1);let o=document.getElementById("webriqFormRecaptcha");o&&r&&((n=o.parentNode)==null||n.removeChild(o))}render(){let{id:r,name:e,className:o,...i}=this.props,n=this.props.formId||this.props["data-form-id"],p=this.props.redirectUrl||this.props["data-thankyou-url"]||"/thank-you";return(0,a.jsx)("form",{name:e,id:r,className:o,method:"POST","data-form-id":n,"data-thankyou-url":p,webriq:"true",...i,children:this.props.children})}};0&&(module.exports={WebriQForm});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a as e}from"./chunk-J7CW7QZP.mjs";export{e as WebriQForm};
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ declare global {
3
+ interface Window {
4
+ isWebriQFormLoaded?: boolean;
5
+ webriqFormRefresh?: () => void;
6
+ }
7
+ }
8
+ interface WebriQFormProps {
9
+ id?: string;
10
+ name?: string;
11
+ className?: string;
12
+ formId?: string;
13
+ redirectUrl?: string;
14
+ scriptSrc?: string;
15
+ unmountScript?: boolean;
16
+ children?: React.ReactNode;
17
+ [key: string]: any;
18
+ webriq?: string;
19
+ }
20
+ declare class WebriQForm extends React.Component<WebriQFormProps> {
21
+ constructor(props: WebriQFormProps);
22
+ componentDidMount(): void;
23
+ loadWebriQFormScript(): void;
24
+ componentWillUnmount(): void;
25
+ render(): import("react/jsx-runtime").JSX.Element;
26
+ }
27
+ export { WebriQForm };
@@ -0,0 +1 @@
1
+ "use strict";var l=Object.create;var s=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var u=(t,r)=>{for(var e in r)s(t,e,{get:r[e],enumerable:!0})},c=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of w(r))!f.call(t,i)&&i!==e&&s(t,i,{get:()=>r[i],enumerable:!(o=b(r,i))||o.enumerable});return t};var F=(t,r,e)=>(e=t!=null?l(h(t)):{},c(r||!t||!t.__esModule?s(e,"default",{value:t,enumerable:!0}):e,t)),g=t=>c(s({},"__esModule",{value:!0}),t);var q={};u(q,{WebriQForm:()=>d});module.exports=g(q);var m=F(require("react")),a=require("react/jsx-runtime"),d=class extends m.default.Component{constructor(r){super(r),this.loadWebriQFormScript=this.loadWebriQFormScript.bind(this)}componentDidMount(){var r;window&&!window.isWebriQFormLoaded&&this.loadWebriQFormScript(),window&&window.isWebriQFormLoaded&&((r=window.webriqFormRefresh)==null||r.call(window))}loadWebriQFormScript(){var e;if(!document.getElementById("webriqform")){let o=document.createElement("script");o.type="text/javascript",o.id="webriqform",o.defer=!0,o.src=this.props.scriptSrc||"https://pagebuilderforms.webriq.com/js/initReactForms",document.body.appendChild(o);let i=document.getElementsByTagName("script")[0];(e=i.parentNode)==null||e.insertBefore(o,i)}}componentWillUnmount(){var i,n;let{unmountScript:r}=this.props,e=document.getElementById("webriqform");e&&r&&((i=e.parentNode)==null||i.removeChild(e)),window&&r&&(window.isWebriQFormLoaded=!1);let o=document.getElementById("webriqFormRecaptcha");o&&r&&((n=o.parentNode)==null||n.removeChild(o))}render(){let{id:r,name:e,className:o,...i}=this.props,n=this.props.formId||this.props["data-form-id"],p=this.props.redirectUrl||this.props["data-thankyou-url"]||"/thank-you";return(0,a.jsx)("form",{name:e,id:r,className:o,method:"POST","data-form-id":n,"data-thankyou-url":p,webriq:"true",...i,children:this.props.children})}};0&&(module.exports={WebriQForm});
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-J7CW7QZP.mjs";export{a as WebriQForm};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/webriq-form",
3
3
  "description": "",
4
- "version": "7.0.0-beta.5",
4
+ "version": "7.0.0-beta.7",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -29,19 +29,19 @@
29
29
  "typescript": "^5.6.2",
30
30
  "vite-tsconfig-paths": "^5.0.1",
31
31
  "vitest": "^2.1.1",
32
- "@stackshift-ui/eslint-config": "6.0.10",
33
- "@stackshift-ui/typescript-config": "6.0.10"
32
+ "@stackshift-ui/typescript-config": "6.0.10",
33
+ "@stackshift-ui/eslint-config": "6.0.10"
34
34
  },
35
35
  "dependencies": {
36
- "@stackshift-ui/system": "7.0.0-beta.5",
37
- "@stackshift-ui/scripts": "7.0.0-beta.4"
36
+ "@stackshift-ui/scripts": "7.0.0-beta.6",
37
+ "@stackshift-ui/system": "7.0.0-beta.7"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@types/react": "16.8 - 19",
41
41
  "next": "10 - 14",
42
42
  "react": "16.8 - 19",
43
43
  "react-dom": "16.8 - 19",
44
- "@stackshift-ui/system": ">=7.0.0-beta.5"
44
+ "@stackshift-ui/system": ">=7.0.0-beta.7"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "next": {