@integry/sdk 4.5.30 → 4.5.31

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.
@@ -2302,7 +2302,7 @@ var e,t,n,i,o,s,a,l,r,d,p,c,_={},u=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|n
2302
2302
  </div>`}
2303
2303
  </div>`:j` <div className="${Rs.mappedFieldMenu}">
2304
2304
  ${v?j`<div>
2305
- ${function(e){let t=arguments.length>2?arguments[2]:void 0;const n={...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}};H(us.createElement(e,n),t)}(v,{onSelect:""},Z)}
2305
+ ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var i;H(us.createElement(e,(i=t,JSON.parse(JSON.stringify(i)))),n)}(v,{onSelect:""},Z)}
2306
2306
  </div>`:j`${Object.keys(c?n:Fs(n,L)).length>0?Object.keys(c?n:Fs(n,L)).map(((e,t,i)=>j`
2307
2307
  <${Os}
2308
2308
  objectKey="${e}"
@@ -7012,7 +7012,7 @@ var e,t,n,i,o,s,a,l,r,d,p,c,_={},u=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|n
7012
7012
  </div>
7013
7013
  </div>
7014
7014
  `}
7015
- `}});const Mp={getAuthHash:async function(e,t){const n=e=>new Uint8Array([...unescape(encodeURIComponent(e))].map((e=>e.charCodeAt(0)))),i=n(t),o=n(e),s=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!0,["sign"]),a=await crypto.subtle.sign("HMAC",s,o);return[...new Uint8Array(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}};class Ap{static SDK_VERSION="4.5.30";config;apiHandler;initConfig;eventEmitter=(()=>new se)();static html=(()=>j)();static RenderModes=(()=>pe)();static TemplateFormRenderModes=(()=>re)();static Layouts=(()=>le)();static ViewStyles=(()=>ae)();static MarketplaceRenderModes=(()=>de)();static Helpers;authModalId="";forceRerender=!1;constructor(e){let t;const n=e.baseUrl||"https://app.integry.io",i=e;if(i.user){const{userId:e,apiKey:t,...n}=i.user;"userId"in i||(i.userId=""),"userId"in i&&(i.userId=e.toString()),i.xIntegryConfig||(i.xIntegryConfig={}),i.xIntegryConfig.appAuth||(i.xIntegryConfig.appAuth={}),i.xIntegryConfig.appAuth.extras||(i.xIntegryConfig.appAuth.extras={}),i.xIntegryConfig.appAuth.apiKey=(t||"").toString(),i.xIntegryConfig.appAuth.extras=n}const o={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:n,baseUrlv2:`${n}/v2`,baseAPIUrl:"https://api.integry.io",apiKey:i.xIntegryConfig?.appAuth?.apiKey,authId:i.xIntegryConfig?.appAuth?.authId,extras:i.xIntegryConfig?.appAuth?.extras},s=i.options||i.userConfig||{};if(i.options&&i.payloads&&(i.options.objects=e.payloads),"appKey"in i)t={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId},this.config={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId,deploymentId:i.deploymentId,userConfig:i.deploymentId?{...s,tags:s?.tags?[...s?.tags,`${i.deploymentId}`]:[`${i.deploymentId}`]}:s};else{const e=this.getAuthParamsFromUrl()||{};t={...o,...e},this.config={...o,...e,userConfig:i.userConfig}}this.authModalId=this.getRandomFlowId(6),this.apiHandler=new te(t),this.verifyAuthConfig().then((e=>{e?.config_verified?this.eventEmitter.emit("ready",{isReady:!0}):console.error("IntegrySDK: Auth config verification failed, are your auth parameters correct?")})).catch((e=>console.error(e))),this.initConfig={containerId:"",renderMode:re.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&H(j`
7015
+ `}});const Mp={getAuthHash:async function(e,t){const n=e=>new Uint8Array([...unescape(encodeURIComponent(e))].map((e=>e.charCodeAt(0)))),i=n(t),o=n(e),s=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!0,["sign"]),a=await crypto.subtle.sign("HMAC",s,o);return[...new Uint8Array(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}};class Ap{static SDK_VERSION="4.5.31";config;apiHandler;initConfig;eventEmitter=(()=>new se)();static html=(()=>j)();static RenderModes=(()=>pe)();static TemplateFormRenderModes=(()=>re)();static Layouts=(()=>le)();static ViewStyles=(()=>ae)();static MarketplaceRenderModes=(()=>de)();static Helpers;authModalId="";forceRerender=!1;constructor(e){let t;const n=e.baseUrl||"https://app.integry.io",i=e;if(i.user){const{userId:e,apiKey:t,...n}=i.user;"userId"in i||(i.userId=""),"userId"in i&&(i.userId=e.toString()),i.xIntegryConfig||(i.xIntegryConfig={}),i.xIntegryConfig.appAuth||(i.xIntegryConfig.appAuth={}),i.xIntegryConfig.appAuth.extras||(i.xIntegryConfig.appAuth.extras={}),i.xIntegryConfig.appAuth.apiKey=(t||"").toString(),i.xIntegryConfig.appAuth.extras=n}const o={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:n,baseUrlv2:`${n}/v2`,baseAPIUrl:"https://api.integry.io",apiKey:i.xIntegryConfig?.appAuth?.apiKey,authId:i.xIntegryConfig?.appAuth?.authId,extras:i.xIntegryConfig?.appAuth?.extras},s=i.options||i.userConfig||{};if(i.options&&i.payloads&&(i.options.objects=e.payloads),"appKey"in i)t={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId},this.config={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId,deploymentId:i.deploymentId,userConfig:i.deploymentId?{...s,tags:s?.tags?[...s?.tags,`${i.deploymentId}`]:[`${i.deploymentId}`]}:s};else{const e=this.getAuthParamsFromUrl()||{};t={...o,...e},this.config={...o,...e,userConfig:i.userConfig}}this.authModalId=this.getRandomFlowId(6),this.apiHandler=new te(t),this.verifyAuthConfig().then((e=>{e?.config_verified?this.eventEmitter.emit("ready",{isReady:!0}):console.error("IntegrySDK: Auth config verification failed, are your auth parameters correct?")})).catch((e=>console.error(e))),this.initConfig={containerId:"",renderMode:re.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&H(j`
7016
7016
  <${ql}
7017
7017
  message="SDK failed to load"
7018
7018
  debug=${n.debug}
@@ -2302,7 +2302,7 @@
2302
2302
  </div>`}
2303
2303
  </div>`:j` <div className="${Rs.mappedFieldMenu}">
2304
2304
  ${v?j`<div>
2305
- ${function(e){let t=arguments.length>2?arguments[2]:void 0;const n={...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}};H(us.createElement(e,n),t)}(v,{onSelect:""},Z)}
2305
+ ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var i;H(us.createElement(e,(i=t,JSON.parse(JSON.stringify(i)))),n)}(v,{onSelect:""},Z)}
2306
2306
  </div>`:j`${Object.keys(c?n:Fs(n,L)).length>0?Object.keys(c?n:Fs(n,L)).map(((e,t,i)=>j`
2307
2307
  <${Os}
2308
2308
  objectKey="${e}"
@@ -7012,7 +7012,7 @@
7012
7012
  </div>
7013
7013
  </div>
7014
7014
  `}
7015
- `}});class Mp{static SDK_VERSION="4.5.30";config;apiHandler;initConfig;eventEmitter=(()=>new se)();static html=(()=>j)();static RenderModes=(()=>pe)();static TemplateFormRenderModes=(()=>re)();static Layouts=(()=>le)();static ViewStyles=(()=>ae)();static MarketplaceRenderModes=(()=>de)();static Helpers;authModalId="";forceRerender=!1;constructor(e){let t;const n=e.baseUrl||"https://app.integry.io",i=e;if(i.user){const{userId:e,apiKey:t,...n}=i.user;"userId"in i||(i.userId=""),"userId"in i&&(i.userId=e.toString()),i.xIntegryConfig||(i.xIntegryConfig={}),i.xIntegryConfig.appAuth||(i.xIntegryConfig.appAuth={}),i.xIntegryConfig.appAuth.extras||(i.xIntegryConfig.appAuth.extras={}),i.xIntegryConfig.appAuth.apiKey=(t||"").toString(),i.xIntegryConfig.appAuth.extras=n}const o={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:n,baseUrlv2:`${n}/v2`,baseAPIUrl:"https://api.integry.io",apiKey:i.xIntegryConfig?.appAuth?.apiKey,authId:i.xIntegryConfig?.appAuth?.authId,extras:i.xIntegryConfig?.appAuth?.extras},s=i.options||i.userConfig||{};if(i.options&&i.payloads&&(i.options.objects=e.payloads),"appKey"in i)t={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId},this.config={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId,deploymentId:i.deploymentId,userConfig:i.deploymentId?{...s,tags:s?.tags?[...s?.tags,`${i.deploymentId}`]:[`${i.deploymentId}`]}:s};else{const e=this.getAuthParamsFromUrl()||{};t={...o,...e},this.config={...o,...e,userConfig:i.userConfig}}this.authModalId=this.getRandomFlowId(6),this.apiHandler=new te(t),this.verifyAuthConfig().then((e=>{e?.config_verified?this.eventEmitter.emit("ready",{isReady:!0}):console.error("IntegrySDK: Auth config verification failed, are your auth parameters correct?")})).catch((e=>console.error(e))),this.initConfig={containerId:"",renderMode:re.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&H(j`
7015
+ `}});class Mp{static SDK_VERSION="4.5.31";config;apiHandler;initConfig;eventEmitter=(()=>new se)();static html=(()=>j)();static RenderModes=(()=>pe)();static TemplateFormRenderModes=(()=>re)();static Layouts=(()=>le)();static ViewStyles=(()=>ae)();static MarketplaceRenderModes=(()=>de)();static Helpers;authModalId="";forceRerender=!1;constructor(e){let t;const n=e.baseUrl||"https://app.integry.io",i=e;if(i.user){const{userId:e,apiKey:t,...n}=i.user;"userId"in i||(i.userId=""),"userId"in i&&(i.userId=e.toString()),i.xIntegryConfig||(i.xIntegryConfig={}),i.xIntegryConfig.appAuth||(i.xIntegryConfig.appAuth={}),i.xIntegryConfig.appAuth.extras||(i.xIntegryConfig.appAuth.extras={}),i.xIntegryConfig.appAuth.apiKey=(t||"").toString(),i.xIntegryConfig.appAuth.extras=n}const o={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:n,baseUrlv2:`${n}/v2`,baseAPIUrl:"https://api.integry.io",apiKey:i.xIntegryConfig?.appAuth?.apiKey,authId:i.xIntegryConfig?.appAuth?.authId,extras:i.xIntegryConfig?.appAuth?.extras},s=i.options||i.userConfig||{};if(i.options&&i.payloads&&(i.options.objects=e.payloads),"appKey"in i)t={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId},this.config={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId,deploymentId:i.deploymentId,userConfig:i.deploymentId?{...s,tags:s?.tags?[...s?.tags,`${i.deploymentId}`]:[`${i.deploymentId}`]}:s};else{const e=this.getAuthParamsFromUrl()||{};t={...o,...e},this.config={...o,...e,userConfig:i.userConfig}}this.authModalId=this.getRandomFlowId(6),this.apiHandler=new te(t),this.verifyAuthConfig().then((e=>{e?.config_verified?this.eventEmitter.emit("ready",{isReady:!0}):console.error("IntegrySDK: Auth config verification failed, are your auth parameters correct?")})).catch((e=>console.error(e))),this.initConfig={containerId:"",renderMode:re.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&H(j`
7016
7016
  <${ql}
7017
7017
  message="SDK failed to load"
7018
7018
  debug=${n.debug}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.5.30",
3
+ "version": "4.5.31",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -213,19 +213,17 @@ const FieldDropdown = (props: FieldMenuProps) => {
213
213
  }
214
214
  }
215
215
 
216
+ const deepClone = (obj: any) => JSON.parse(JSON.stringify(obj));
217
+
216
218
  const convertReactToPreact = (
217
219
  ReactComponent: any,
218
220
  propsLocal = {},
219
221
  mountNode: any,
220
222
  ) => {
221
- // Ensure props are mutable
222
- const mutableProps = { ...propsLocal };
223
-
224
223
  const PreactComponent = ReactCompat.createElement(
225
224
  ReactComponent,
226
- mutableProps,
225
+ deepClone(propsLocal),
227
226
  );
228
-
229
227
  render(PreactComponent, mountNode);
230
228
  };
231
229