@integry/sdk 4.5.11 → 4.5.13

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.
@@ -2298,8 +2298,9 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
2298
2298
  </span>
2299
2299
  </div>`}
2300
2300
  </div>`:R` <div className="${Zo.mappedFieldMenu}">
2301
- ${v?R`<${v} tags=${n} onSelect=${a}>
2302
- <//>`:R`${Object.keys(c?n:Po(n,L)).length>0?Object.keys(c?n:Po(n,L)).map(((e,t,i)=>R`
2301
+ ${v?R`<div
2302
+ dangerouslySetInnerHTML=${{__html:v}}
2303
+ />`:R`${Object.keys(c?n:Po(n,L)).length>0?Object.keys(c?n:Po(n,L)).map(((e,t,i)=>R`
2303
2304
  <${Vo}
2304
2305
  objectKey="${e}"
2305
2306
  keyValue="${e}"
@@ -3532,8 +3533,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
3532
3533
  stepId=${l.id}
3533
3534
  dynamicField=${t}
3534
3535
  endpointData=${JSON.stringify({authorization_id:this.props.stepMapping&&this.props.stepMapping[this.props.step.id]?.selectedAuthId||this.props.selectedAuthId,...this.fieldDynamicData(t),...this.state.dynamicFieldsData})}
3535
- activityOutputData=${this.arrayToNestedJSONWithFirstValue(this.props.activityOutputData,this.props.dynamicFieldData||this.state.dynamicFieldDataState||{})}
3536
- activityOutputDataRaw=${this.props.activityOutputData}
3536
+ activityOutputData=${this.arrayToNestedJSONWithFirstValue(this.props.activityOutputData||Yo(this.props.tagsTree||{}),this.props.dynamicFieldData||this.state.dynamicFieldDataState||{})}
3537
+ activityOutputDataRaw=${this.props.activityOutputData||Yo(this.props.tagsTree||{})}
3537
3538
  placeHolder=${this.getPlaceholder(t)}
3538
3539
  appName=${this.props.step.activity.app.name}
3539
3540
  selectedAuthId=${`${this.props.stepMapping[this.props.step.id]?.selectedAuthId||this.props.selectedAuthId||""}`}
@@ -7005,7 +7006,7 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
7005
7006
  </div>
7006
7007
  </div>
7007
7008
  `}
7008
- `}});const Rd={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 Wd{static SDK_VERSION="4.5.11";config;apiHandler;initConfig;eventEmitter=(()=>new G)();static html=(()=>R)();static RenderModes=(()=>ee)();static TemplateFormRenderModes=(()=>Y)();static Layouts=(()=>X)();static ViewStyles=(()=>J)();static MarketplaceRenderModes=(()=>Q)();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 j(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:Y.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&T(R`
7009
+ `}});const Rd={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 Wd{static SDK_VERSION="4.5.13";config;apiHandler;initConfig;eventEmitter=(()=>new G)();static html=(()=>R)();static RenderModes=(()=>ee)();static TemplateFormRenderModes=(()=>Y)();static Layouts=(()=>X)();static ViewStyles=(()=>J)();static MarketplaceRenderModes=(()=>Q)();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 j(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:Y.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&T(R`
7009
7010
  <${nl}
7010
7011
  message="SDK failed to load"
7011
7012
  debug=${n.debug}
@@ -2298,8 +2298,9 @@
2298
2298
  </span>
2299
2299
  </div>`}
2300
2300
  </div>`:R` <div className="${Zo.mappedFieldMenu}">
2301
- ${v?R`<${v} tags=${n} onSelect=${a}>
2302
- <//>`:R`${Object.keys(c?n:Po(n,L)).length>0?Object.keys(c?n:Po(n,L)).map(((e,t,i)=>R`
2301
+ ${v?R`<div
2302
+ dangerouslySetInnerHTML=${{__html:v}}
2303
+ />`:R`${Object.keys(c?n:Po(n,L)).length>0?Object.keys(c?n:Po(n,L)).map(((e,t,i)=>R`
2303
2304
  <${Vo}
2304
2305
  objectKey="${e}"
2305
2306
  keyValue="${e}"
@@ -3532,8 +3533,8 @@
3532
3533
  stepId=${l.id}
3533
3534
  dynamicField=${t}
3534
3535
  endpointData=${JSON.stringify({authorization_id:this.props.stepMapping&&this.props.stepMapping[this.props.step.id]?.selectedAuthId||this.props.selectedAuthId,...this.fieldDynamicData(t),...this.state.dynamicFieldsData})}
3535
- activityOutputData=${this.arrayToNestedJSONWithFirstValue(this.props.activityOutputData,this.props.dynamicFieldData||this.state.dynamicFieldDataState||{})}
3536
- activityOutputDataRaw=${this.props.activityOutputData}
3536
+ activityOutputData=${this.arrayToNestedJSONWithFirstValue(this.props.activityOutputData||Yo(this.props.tagsTree||{}),this.props.dynamicFieldData||this.state.dynamicFieldDataState||{})}
3537
+ activityOutputDataRaw=${this.props.activityOutputData||Yo(this.props.tagsTree||{})}
3537
3538
  placeHolder=${this.getPlaceholder(t)}
3538
3539
  appName=${this.props.step.activity.app.name}
3539
3540
  selectedAuthId=${`${this.props.stepMapping[this.props.step.id]?.selectedAuthId||this.props.selectedAuthId||""}`}
@@ -7005,7 +7006,7 @@
7005
7006
  </div>
7006
7007
  </div>
7007
7008
  `}
7008
- `}});class Rd{static SDK_VERSION="4.5.11";config;apiHandler;initConfig;eventEmitter=(()=>new G)();static html=(()=>R)();static RenderModes=(()=>ee)();static TemplateFormRenderModes=(()=>Y)();static Layouts=(()=>X)();static ViewStyles=(()=>J)();static MarketplaceRenderModes=(()=>Q)();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 j(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:Y.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&T(R`
7009
+ `}});class Rd{static SDK_VERSION="4.5.13";config;apiHandler;initConfig;eventEmitter=(()=>new G)();static html=(()=>R)();static RenderModes=(()=>ee)();static TemplateFormRenderModes=(()=>Y)();static Layouts=(()=>X)();static ViewStyles=(()=>J)();static MarketplaceRenderModes=(()=>Q)();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 j(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:Y.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&T(R`
7009
7010
  <${nl}
7010
7011
  message="SDK failed to load"
7011
7012
  debug=${n.debug}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.5.11",
3
+ "version": "4.5.13",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -330,8 +330,9 @@ const FieldDropdown = (props: FieldMenuProps) => {
330
330
  </div>`
331
331
  : html` <div className="${styles.mappedFieldMenu}">
332
332
  ${tagsComponent
333
- ? html`<${tagsComponent} tags=${tags} onSelect=${onTagClick}>
334
- <//>`
333
+ ? html`<div
334
+ dangerouslySetInnerHTML=${{ __html: tagsComponent }}
335
+ />`
335
336
  : html`${Object.keys(
336
337
  !isEditable ? searchJSON(tags, searchValue) : tags,
337
338
  ).length > 0
@@ -1642,13 +1642,19 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1642
1642
  ...this.state.dynamicFieldsData,
1643
1643
  })}
1644
1644
  activityOutputData=${this.arrayToNestedJSONWithFirstValue(
1645
- this.props.activityOutputData,
1645
+ this.props.activityOutputData ||
1646
+ JSONToActivityOutputData(
1647
+ this.props.tagsTree || {},
1648
+ ),
1646
1649
  this.props.dynamicFieldData ||
1647
1650
  this.state.dynamicFieldDataState ||
1648
1651
  {},
1649
1652
  )}
1650
1653
  activityOutputDataRaw=${this.props
1651
- .activityOutputData}
1654
+ .activityOutputData ||
1655
+ JSONToActivityOutputData(
1656
+ this.props.tagsTree || {},
1657
+ )}
1652
1658
  placeHolder=${this.getPlaceholder(el)}
1653
1659
  appName=${this.props.step.activity.app
1654
1660
  .name}