@integry/sdk 4.5.16 → 4.5.18
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.
- package/dist/esm/index.csm.d.ts +1 -0
- package/dist/esm/index.csm.js +27 -27
- package/dist/umd/index.umd.d.ts +1 -0
- package/dist/umd/index.umd.js +27 -27
- package/package.json +1 -1
- package/src/components/MultipurposeField/TagMenu/index.ts +13 -0
- package/src/index.ts +1 -1
- package/src/types/preact-compat.d.ts +4 -0
package/dist/esm/index.csm.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="index.ts" />
|
|
1
2
|
import { html } from 'htm/preact';
|
|
2
3
|
import { VNode } from "preact";
|
|
3
4
|
type IntegrySDKEventType = "authorizations" | "did-add-authorization" | "did-begin-remove-authorization" | "did-change-step" | "did-fail-authorization-verification" | "did-load-flow" | "did-load-flows" | "did-load-integration" | "did-load-integrations" | "did-load-preview" | "did-remove-authorization" | "did-save-integration" | "did-delete-integration" | "did-select-authorization" | "ready" | "should-load-flow" | "did-click-close-button" | "did-app-load" | "did-enable-integration" | "did-disable-integration" | "did-rename-integration" | "did-raise-sdk-embed-warning" | "app-connected" | "app-disconnected" | "modal-closed" | "integration-created";
|
package/dist/esm/index.csm.js
CHANGED
|
@@ -2236,30 +2236,30 @@ 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
|
|
|
2236
2236
|
keyValue="${`${l}.${e}`}"
|
|
2237
2237
|
/>`))}
|
|
2238
2238
|
</div>
|
|
2239
|
-
`};var us,ms={tagMenu:"styles-module_tagMenu__1zL3Y",tagMenuHeader:"styles-module_tagMenuHeader__1xLOJ",tagMenuHeaderItem:"styles-module_tagMenuHeaderItem__118kJ",active:"styles-module_active__q-t6i",tagMenuBody:"styles-module_tagMenuBody__2VhdZ",tagMenuBodyItem:"styles-module_tagMenuBodyItem__36ub0",value:"styles-module_value__Nbjas",selected:"styles-module_selected__3w5uy",noOptions:"styles-module_noOptions__1Dcpu",noOptionsRetry:"styles-module_noOptionsRetry__RVn-i",optionsRefreshProminent:"styles-module_optionsRefreshProminent__lc2Mq",optionsRefresh:"styles-module_optionsRefresh__3w_oH",tagMenuSearch:"styles-module_tagMenuSearch__3r3dc",tagMenuWithSearch:"styles-module_tagMenuWithSearch__C33C2",tagMenuBodyWithSearch:"styles-module_tagMenuBodyWithSearch__1zO00"};fe(".styles-module_tagMenu__1zL3Y {\n width: 100%;\n max-width: 342px;\n max-height: 210px;\n background: #ffffff;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px 0px;\n border: 1px solid #e2e0db;\n border-radius: 4px;\n padding: 12px;\n overflow-y: auto;\n margin-top: 0px;\n position: fixed;\n z-index: 999;\n height: max-content;\n /* Track */\n /* Handle */\n /* Handle on hover */\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar {\n width: 7px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ {\n display: flex;\n justify-content: start;\n align-items: center;\n margin-bottom: 16px;\n gap: 8px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ {\n padding: 6px 12px;\n background: #f2f2f2;\n border-radius: 100px;\n font-weight: 400;\n font-size: 10px;\n line-height: 12px;\n color: #333333;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ.styles-module_active__q-t6i {\n background: #4250f0;\n color: #ffffff;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ {\n min-height: 15px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas {\n box-sizing: border-box;\n height: 31px;\n padding: 8px 0px 8px 12px;\n width: 100%;\n font-size: 12px;\n line-height: 15px;\n color: #333333;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas:hover {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_selected__3w5uy {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu {\n font-weight: 400;\n font-size: 12px;\n line-height: 15px;\n margin-left: 16px;\n color: #999;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu span.styles-module_noOptionsRetry__RVn-i [class^=styles-module_loader_] {\n position: relative;\n top: 5px;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefreshProminent__lc2Mq {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefresh__3w_oH {\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n\n.styles-module_tagMenuSearch__3r3dc {\n position: relative;\n margin-bottom: 5px;\n}\n.styles-module_tagMenuSearch__3r3dc fieldset {\n margin-bottom: 5px;\n}\n\n.styles-module_tagMenuWithSearch__C33C2 {\n padding-top: 0px;\n}\n\n.styles-module_tagMenuBodyWithSearch__1zO00 {\n max-height: 142px;\n overflow-y: auto;\n}\n.styles-module_tagMenuBodyWithSearch__1zO00 span {\n padding-left: 3px !important;\n}"),function(e){e.Values="values",e.AppFields="AppFields"}(us||(us={}));const hs=e=>{const{appName:t="",tags:n={},options:i=[],hideTabs:o=!1,defaultTab:s=us.AppFields,onTagClick:a=()=>null,onOptionClick:l=()=>null,fieldId:r="",value:d,onTabSelect:p,isEditable:c=!1,enableSearch:_=!1,refreshRootStepData:u,handleRefreshClick:m,isErrorOnLoadingOptions:h=!1,isMultiSelect:g=!1,loadingOptions:y=!1,nextPage:
|
|
2239
|
+
`};var us,ms={tagMenu:"styles-module_tagMenu__1zL3Y",tagMenuHeader:"styles-module_tagMenuHeader__1xLOJ",tagMenuHeaderItem:"styles-module_tagMenuHeaderItem__118kJ",active:"styles-module_active__q-t6i",tagMenuBody:"styles-module_tagMenuBody__2VhdZ",tagMenuBodyItem:"styles-module_tagMenuBodyItem__36ub0",value:"styles-module_value__Nbjas",selected:"styles-module_selected__3w5uy",noOptions:"styles-module_noOptions__1Dcpu",noOptionsRetry:"styles-module_noOptionsRetry__RVn-i",optionsRefreshProminent:"styles-module_optionsRefreshProminent__lc2Mq",optionsRefresh:"styles-module_optionsRefresh__3w_oH",tagMenuSearch:"styles-module_tagMenuSearch__3r3dc",tagMenuWithSearch:"styles-module_tagMenuWithSearch__C33C2",tagMenuBodyWithSearch:"styles-module_tagMenuBodyWithSearch__1zO00"};fe(".styles-module_tagMenu__1zL3Y {\n width: 100%;\n max-width: 342px;\n max-height: 210px;\n background: #ffffff;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px 0px;\n border: 1px solid #e2e0db;\n border-radius: 4px;\n padding: 12px;\n overflow-y: auto;\n margin-top: 0px;\n position: fixed;\n z-index: 999;\n height: max-content;\n /* Track */\n /* Handle */\n /* Handle on hover */\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar {\n width: 7px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ {\n display: flex;\n justify-content: start;\n align-items: center;\n margin-bottom: 16px;\n gap: 8px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ {\n padding: 6px 12px;\n background: #f2f2f2;\n border-radius: 100px;\n font-weight: 400;\n font-size: 10px;\n line-height: 12px;\n color: #333333;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ.styles-module_active__q-t6i {\n background: #4250f0;\n color: #ffffff;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ {\n min-height: 15px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas {\n box-sizing: border-box;\n height: 31px;\n padding: 8px 0px 8px 12px;\n width: 100%;\n font-size: 12px;\n line-height: 15px;\n color: #333333;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas:hover {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_selected__3w5uy {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu {\n font-weight: 400;\n font-size: 12px;\n line-height: 15px;\n margin-left: 16px;\n color: #999;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu span.styles-module_noOptionsRetry__RVn-i [class^=styles-module_loader_] {\n position: relative;\n top: 5px;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefreshProminent__lc2Mq {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefresh__3w_oH {\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n\n.styles-module_tagMenuSearch__3r3dc {\n position: relative;\n margin-bottom: 5px;\n}\n.styles-module_tagMenuSearch__3r3dc fieldset {\n margin-bottom: 5px;\n}\n\n.styles-module_tagMenuWithSearch__C33C2 {\n padding-top: 0px;\n}\n\n.styles-module_tagMenuBodyWithSearch__1zO00 {\n max-height: 142px;\n overflow-y: auto;\n}\n.styles-module_tagMenuBodyWithSearch__1zO00 span {\n padding-left: 3px !important;\n}"),function(e){e.Values="values",e.AppFields="AppFields"}(us||(us={}));const hs=e=>{const{appName:t="",tags:n={},options:i=[],hideTabs:o=!1,defaultTab:s=us.AppFields,onTagClick:a=()=>null,onOptionClick:l=()=>null,fieldId:r="",value:d,onTabSelect:p,isEditable:c=!1,enableSearch:_=!1,refreshRootStepData:u,handleRefreshClick:m,isErrorOnLoadingOptions:h=!1,isMultiSelect:g=!1,loadingOptions:y=!1,nextPage:v="",tagsComponent:x=null}=e,[w,b]=Oe(s),$=Re([]),C=Re(null),[I,L]=Oe(!1),[k,S]=Oe(""),[M,A]=Oe(!1),[D,T]=Oe(!1),[F,E]=Oe(y),[O,N]=Oe(!1);Ne((()=>{let e=i;Array.isArray(i)||(e=[]),$.current=(e||[]).map(((e,t)=>$.current[t]??{current:null}))}),[i]);const R=document.getElementById(r),W=()=>{const e=R?R.getBoundingClientRect().bottom:"";let t={top:R?`${e}px`:"",left:R?`${R.getBoundingClientRect().left}px`:"",display:R&&!ds(R,"steps-body-container")?"none":"block",maxWidth:R?`${R.getBoundingClientRect().width}px`:"342px"};return R&&R.getBoundingClientRect().bottom+210>window.innerHeight-8&&(t={bottom:window.innerHeight-R.getBoundingClientRect().top+"px",left:R?`${R.getBoundingClientRect().left}px`:"",display:R&&!ds(R,"steps-body-container")?"none":"block",maxWidth:R?`${R.getBoundingClientRect().width}px`:"342px"}),t};C.current=W();const z=()=>{C.current=W(),L((e=>!e))},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===t.trim().length?e:e.filter((e=>e.value.toLowerCase().includes(t.trim().toLowerCase())))},P=e=>{b(e),p&&p(e)};Ne((()=>(d&&!o&&d.startsWith("{")&&d.endsWith("}")&&P(us.AppFields),window.addEventListener("scroll",z,!0),()=>window.removeEventListener("scroll",z))),[]);const V=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A(!1),T(e)},U=()=>{u&&(A(!0),u(V))};let Z=[];return d&&(Z=g?JSON.parse(d):[d]),x&&f(x,{onSelect:()=>alert("Selected!")}),B` <div
|
|
2240
2240
|
class=${`${ms.tagMenu} ${_?ms.tagMenuWithSearch:""}`}
|
|
2241
|
-
style=${
|
|
2241
|
+
style=${R&&C?.current?C.current:""}
|
|
2242
2242
|
>
|
|
2243
2243
|
${_&&B`
|
|
2244
2244
|
<div class=${ms.tagMenuSearch}>
|
|
2245
2245
|
<${Xo}
|
|
2246
2246
|
id="search_${r}"
|
|
2247
2247
|
placeholder="Search for a field"
|
|
2248
|
-
value="${
|
|
2249
|
-
onChange="${e=>{
|
|
2248
|
+
value="${k}"
|
|
2249
|
+
onChange="${e=>{S(e)}}"
|
|
2250
2250
|
/>
|
|
2251
2251
|
</div>
|
|
2252
2252
|
`}
|
|
2253
2253
|
${!o&&B`<div class=${ms.tagMenuHeader}>
|
|
2254
2254
|
<div
|
|
2255
|
-
class=${`${ms.tagMenuHeaderItem} ${
|
|
2256
|
-
onClick=${()=>
|
|
2255
|
+
class=${`${ms.tagMenuHeaderItem} ${w===us.Values?ms.active:""}`}
|
|
2256
|
+
onClick=${()=>P(us.Values)}
|
|
2257
2257
|
>
|
|
2258
2258
|
Values
|
|
2259
2259
|
</div>
|
|
2260
2260
|
<div
|
|
2261
|
-
class=${`${ms.tagMenuHeaderItem} ${
|
|
2262
|
-
onClick=${()=>
|
|
2261
|
+
class=${`${ms.tagMenuHeaderItem} ${w===us.AppFields?ms.active:""}`}
|
|
2262
|
+
onClick=${()=>P(us.AppFields)}
|
|
2263
2263
|
>
|
|
2264
2264
|
${t?`${t} fields`:"Fields"}
|
|
2265
2265
|
</div>
|
|
@@ -2267,65 +2267,65 @@ 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
|
|
|
2267
2267
|
<div
|
|
2268
2268
|
class=${`${ms.tagMenuBody} ${_?ms.tagMenuBodyWithSearch:""}`}
|
|
2269
2269
|
>
|
|
2270
|
-
${
|
|
2271
|
-
${i.length>0?
|
|
2270
|
+
${w===us.Values?B`<div className=${ms.tagMenuBodyItem} id="tag-menu-body-item">
|
|
2271
|
+
${i.length>0?H(i,k).length>0?H(i,k).map(((e,t,n)=>{return t===n.length-1&&E(!1),B`
|
|
2272
2272
|
<div
|
|
2273
|
-
class=${`${ms.value} ${
|
|
2273
|
+
class=${`${ms.value} ${Z.includes(e.id)?ms.selected:""}`}
|
|
2274
2274
|
onClick=${t=>{t.stopPropagation(),l(e)}}
|
|
2275
|
-
ref=${
|
|
2276
|
-
data-hint=${`${i
|
|
2275
|
+
ref=${$.current[t]}
|
|
2276
|
+
data-hint=${`${i=$.current[t],i&&i.current&&i.current.clientWidth<i.current.scrollWidth?e.value:""}`}
|
|
2277
2277
|
>
|
|
2278
2278
|
${e.value}
|
|
2279
2279
|
</div>
|
|
2280
2280
|
|
|
2281
2281
|
${t!==n.length-1?"":B`<span>
|
|
2282
|
-
${
|
|
2282
|
+
${F||O?B`<${it} color="#999" />`:B` <a
|
|
2283
2283
|
className=${ms.optionsRefreshProminent}
|
|
2284
2284
|
href="#"
|
|
2285
|
-
onclick=${()=>{m&&(
|
|
2286
|
-
>${
|
|
2285
|
+
onclick=${()=>{m&&(N(!0),m((()=>N(!1)),v))}}
|
|
2286
|
+
>${v?"Load more options":"Reload options?"}</a
|
|
2287
2287
|
>`}
|
|
2288
2288
|
</span>`}
|
|
2289
2289
|
`;var i})):B`<div className=${ms.noOptions}>
|
|
2290
2290
|
Your search did not match any values
|
|
2291
2291
|
</div>`:B`<div className=${ms.noOptions}>
|
|
2292
2292
|
<span className=${ms.noOptionsRetry}>
|
|
2293
|
-
${
|
|
2293
|
+
${F?B`<${it} color="#999" />`:B`${h?"Could not load options.":"No options found."}
|
|
2294
2294
|
<a
|
|
2295
2295
|
className=${ms.optionsRefresh}
|
|
2296
2296
|
href="#"
|
|
2297
|
-
onclick=${()=>{m&&(
|
|
2297
|
+
onclick=${()=>{m&&(E(!0),m((()=>E(!1))))}}
|
|
2298
2298
|
>
|
|
2299
2299
|
${" "}Try again?</a
|
|
2300
2300
|
>`}
|
|
2301
2301
|
</span>
|
|
2302
2302
|
</div>`}
|
|
2303
2303
|
</div>`:B` <div className="${ms.mappedFieldMenu}">
|
|
2304
|
-
${
|
|
2305
|
-
<//>`:B`${Object.keys(c?n:ps(n,
|
|
2304
|
+
${x?B`<${x} tags=${n} onSelect=${a}>
|
|
2305
|
+
<//>`:B`${Object.keys(c?n:ps(n,k)).length>0?Object.keys(c?n:ps(n,k)).map(((e,t,i)=>B`
|
|
2306
2306
|
<${_s}
|
|
2307
2307
|
objectKey="${e}"
|
|
2308
2308
|
keyValue="${e}"
|
|
2309
|
-
objectData="${c?n[e]:ps(n,
|
|
2309
|
+
objectData="${c?n[e]:ps(n,k)[e]}"
|
|
2310
2310
|
onSelect=${a}
|
|
2311
2311
|
isRoot="${!0}"
|
|
2312
2312
|
/>
|
|
2313
2313
|
${t!==i.length-1?"":B`<span>
|
|
2314
|
-
${
|
|
2314
|
+
${M?B`<${it} color="#999" />`:B` <a
|
|
2315
2315
|
className=${ms.optionsRefreshProminent}
|
|
2316
2316
|
href="#"
|
|
2317
|
-
onclick=${
|
|
2317
|
+
onclick=${U}
|
|
2318
2318
|
>Reload fields?</a
|
|
2319
2319
|
>`}
|
|
2320
2320
|
</span>`}
|
|
2321
2321
|
`)):B`<div className=${ms.noOptions}>
|
|
2322
|
-
${c||""===
|
|
2322
|
+
${c||""===k?B`
|
|
2323
2323
|
<span className=${ms.noOptionsRetry}>
|
|
2324
|
-
${
|
|
2324
|
+
${M?B`<${it} color="#999" />`:B`${D?"Could not load fields.":"No fields found."}
|
|
2325
2325
|
<a
|
|
2326
2326
|
className=${ms.optionsRefresh}
|
|
2327
2327
|
href="#"
|
|
2328
|
-
onclick=${e=>{e.preventDefault(),e.stopPropagation(),
|
|
2328
|
+
onclick=${e=>{e.preventDefault(),e.stopPropagation(),U()}}
|
|
2329
2329
|
>
|
|
2330
2330
|
${" "}Try again?</a
|
|
2331
2331
|
>`}
|
|
@@ -7011,7 +7011,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
|
|
|
7011
7011
|
</div>
|
|
7012
7012
|
</div>
|
|
7013
7013
|
`}
|
|
7014
|
-
`}});const ap={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 lp{static SDK_VERSION="4.5.
|
|
7014
|
+
`}});const ap={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 lp{static SDK_VERSION="4.5.18";config;apiHandler;initConfig;eventEmitter=(()=>new te)();static html=(()=>B)();static RenderModes=(()=>ae)();static TemplateFormRenderModes=(()=>oe)();static Layouts=(()=>ie)();static ViewStyles=(()=>ne)();static MarketplaceRenderModes=(()=>se)();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 X(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:oe.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&z(B`
|
|
7015
7015
|
<${Il}
|
|
7016
7016
|
message="SDK failed to load"
|
|
7017
7017
|
debug=${n.debug}
|
package/dist/umd/index.umd.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="index.ts" />
|
|
1
2
|
import { VNode } from "preact";
|
|
2
3
|
type IntegrySDKEventType = "authorizations" | "did-add-authorization" | "did-begin-remove-authorization" | "did-change-step" | "did-fail-authorization-verification" | "did-load-flow" | "did-load-flows" | "did-load-integration" | "did-load-integrations" | "did-load-preview" | "did-remove-authorization" | "did-save-integration" | "did-delete-integration" | "did-select-authorization" | "ready" | "should-load-flow" | "did-click-close-button" | "did-app-load" | "did-enable-integration" | "did-disable-integration" | "did-rename-integration" | "did-raise-sdk-embed-warning" | "app-connected" | "app-disconnected" | "modal-closed" | "integration-created";
|
|
3
4
|
type ConnectedAccount = {
|
package/dist/umd/index.umd.js
CHANGED
|
@@ -2236,30 +2236,30 @@
|
|
|
2236
2236
|
keyValue="${`${l}.${e}`}"
|
|
2237
2237
|
/>`))}
|
|
2238
2238
|
</div>
|
|
2239
|
-
`};var us,ms={tagMenu:"styles-module_tagMenu__1zL3Y",tagMenuHeader:"styles-module_tagMenuHeader__1xLOJ",tagMenuHeaderItem:"styles-module_tagMenuHeaderItem__118kJ",active:"styles-module_active__q-t6i",tagMenuBody:"styles-module_tagMenuBody__2VhdZ",tagMenuBodyItem:"styles-module_tagMenuBodyItem__36ub0",value:"styles-module_value__Nbjas",selected:"styles-module_selected__3w5uy",noOptions:"styles-module_noOptions__1Dcpu",noOptionsRetry:"styles-module_noOptionsRetry__RVn-i",optionsRefreshProminent:"styles-module_optionsRefreshProminent__lc2Mq",optionsRefresh:"styles-module_optionsRefresh__3w_oH",tagMenuSearch:"styles-module_tagMenuSearch__3r3dc",tagMenuWithSearch:"styles-module_tagMenuWithSearch__C33C2",tagMenuBodyWithSearch:"styles-module_tagMenuBodyWithSearch__1zO00"};fe(".styles-module_tagMenu__1zL3Y {\n width: 100%;\n max-width: 342px;\n max-height: 210px;\n background: #ffffff;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px 0px;\n border: 1px solid #e2e0db;\n border-radius: 4px;\n padding: 12px;\n overflow-y: auto;\n margin-top: 0px;\n position: fixed;\n z-index: 999;\n height: max-content;\n /* Track */\n /* Handle */\n /* Handle on hover */\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar {\n width: 7px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ {\n display: flex;\n justify-content: start;\n align-items: center;\n margin-bottom: 16px;\n gap: 8px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ {\n padding: 6px 12px;\n background: #f2f2f2;\n border-radius: 100px;\n font-weight: 400;\n font-size: 10px;\n line-height: 12px;\n color: #333333;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ.styles-module_active__q-t6i {\n background: #4250f0;\n color: #ffffff;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ {\n min-height: 15px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas {\n box-sizing: border-box;\n height: 31px;\n padding: 8px 0px 8px 12px;\n width: 100%;\n font-size: 12px;\n line-height: 15px;\n color: #333333;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas:hover {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_selected__3w5uy {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu {\n font-weight: 400;\n font-size: 12px;\n line-height: 15px;\n margin-left: 16px;\n color: #999;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu span.styles-module_noOptionsRetry__RVn-i [class^=styles-module_loader_] {\n position: relative;\n top: 5px;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefreshProminent__lc2Mq {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefresh__3w_oH {\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n\n.styles-module_tagMenuSearch__3r3dc {\n position: relative;\n margin-bottom: 5px;\n}\n.styles-module_tagMenuSearch__3r3dc fieldset {\n margin-bottom: 5px;\n}\n\n.styles-module_tagMenuWithSearch__C33C2 {\n padding-top: 0px;\n}\n\n.styles-module_tagMenuBodyWithSearch__1zO00 {\n max-height: 142px;\n overflow-y: auto;\n}\n.styles-module_tagMenuBodyWithSearch__1zO00 span {\n padding-left: 3px !important;\n}"),function(e){e.Values="values",e.AppFields="AppFields"}(us||(us={}));const hs=e=>{const{appName:t="",tags:n={},options:i=[],hideTabs:o=!1,defaultTab:s=us.AppFields,onTagClick:a=()=>null,onOptionClick:l=()=>null,fieldId:r="",value:d,onTabSelect:p,isEditable:c=!1,enableSearch:_=!1,refreshRootStepData:u,handleRefreshClick:m,isErrorOnLoadingOptions:h=!1,isMultiSelect:g=!1,loadingOptions:y=!1,nextPage:
|
|
2239
|
+
`};var us,ms={tagMenu:"styles-module_tagMenu__1zL3Y",tagMenuHeader:"styles-module_tagMenuHeader__1xLOJ",tagMenuHeaderItem:"styles-module_tagMenuHeaderItem__118kJ",active:"styles-module_active__q-t6i",tagMenuBody:"styles-module_tagMenuBody__2VhdZ",tagMenuBodyItem:"styles-module_tagMenuBodyItem__36ub0",value:"styles-module_value__Nbjas",selected:"styles-module_selected__3w5uy",noOptions:"styles-module_noOptions__1Dcpu",noOptionsRetry:"styles-module_noOptionsRetry__RVn-i",optionsRefreshProminent:"styles-module_optionsRefreshProminent__lc2Mq",optionsRefresh:"styles-module_optionsRefresh__3w_oH",tagMenuSearch:"styles-module_tagMenuSearch__3r3dc",tagMenuWithSearch:"styles-module_tagMenuWithSearch__C33C2",tagMenuBodyWithSearch:"styles-module_tagMenuBodyWithSearch__1zO00"};fe(".styles-module_tagMenu__1zL3Y {\n width: 100%;\n max-width: 342px;\n max-height: 210px;\n background: #ffffff;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px 0px;\n border: 1px solid #e2e0db;\n border-radius: 4px;\n padding: 12px;\n overflow-y: auto;\n margin-top: 0px;\n position: fixed;\n z-index: 999;\n height: max-content;\n /* Track */\n /* Handle */\n /* Handle on hover */\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar {\n width: 7px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n}\n.styles-module_tagMenu__1zL3Y::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ {\n display: flex;\n justify-content: start;\n align-items: center;\n margin-bottom: 16px;\n gap: 8px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ {\n padding: 6px 12px;\n background: #f2f2f2;\n border-radius: 100px;\n font-weight: 400;\n font-size: 10px;\n line-height: 12px;\n color: #333333;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuHeader__1xLOJ .styles-module_tagMenuHeaderItem__118kJ.styles-module_active__q-t6i {\n background: #4250f0;\n color: #ffffff;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ {\n min-height: 15px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas {\n box-sizing: border-box;\n height: 31px;\n padding: 8px 0px 8px 12px;\n width: 100%;\n font-size: 12px;\n line-height: 15px;\n color: #333333;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_value__Nbjas:hover {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_tagMenuBody__2VhdZ .styles-module_tagMenuBodyItem__36ub0 .styles-module_selected__3w5uy {\n background: rgba(66, 80, 240, 0.1);\n border-radius: 100px;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu {\n font-weight: 400;\n font-size: 12px;\n line-height: 15px;\n margin-left: 16px;\n color: #999;\n}\n.styles-module_tagMenu__1zL3Y .styles-module_noOptions__1Dcpu span.styles-module_noOptionsRetry__RVn-i [class^=styles-module_loader_] {\n position: relative;\n top: 5px;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefreshProminent__lc2Mq {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n.styles-module_tagMenu__1zL3Y a.styles-module_optionsRefresh__3w_oH {\n font-size: 12px;\n line-height: 15px;\n color: #4250f0;\n cursor: pointer;\n text-decoration: none;\n}\n\n.styles-module_tagMenuSearch__3r3dc {\n position: relative;\n margin-bottom: 5px;\n}\n.styles-module_tagMenuSearch__3r3dc fieldset {\n margin-bottom: 5px;\n}\n\n.styles-module_tagMenuWithSearch__C33C2 {\n padding-top: 0px;\n}\n\n.styles-module_tagMenuBodyWithSearch__1zO00 {\n max-height: 142px;\n overflow-y: auto;\n}\n.styles-module_tagMenuBodyWithSearch__1zO00 span {\n padding-left: 3px !important;\n}"),function(e){e.Values="values",e.AppFields="AppFields"}(us||(us={}));const hs=e=>{const{appName:t="",tags:n={},options:i=[],hideTabs:o=!1,defaultTab:s=us.AppFields,onTagClick:a=()=>null,onOptionClick:l=()=>null,fieldId:r="",value:d,onTabSelect:p,isEditable:c=!1,enableSearch:_=!1,refreshRootStepData:u,handleRefreshClick:m,isErrorOnLoadingOptions:h=!1,isMultiSelect:g=!1,loadingOptions:y=!1,nextPage:v="",tagsComponent:x=null}=e,[w,b]=Oe(s),$=Re([]),C=Re(null),[I,L]=Oe(!1),[k,S]=Oe(""),[M,A]=Oe(!1),[D,T]=Oe(!1),[F,E]=Oe(y),[O,N]=Oe(!1);Ne((()=>{let e=i;Array.isArray(i)||(e=[]),$.current=(e||[]).map(((e,t)=>$.current[t]??{current:null}))}),[i]);const R=document.getElementById(r),W=()=>{const e=R?R.getBoundingClientRect().bottom:"";let t={top:R?`${e}px`:"",left:R?`${R.getBoundingClientRect().left}px`:"",display:R&&!ds(R,"steps-body-container")?"none":"block",maxWidth:R?`${R.getBoundingClientRect().width}px`:"342px"};return R&&R.getBoundingClientRect().bottom+210>window.innerHeight-8&&(t={bottom:window.innerHeight-R.getBoundingClientRect().top+"px",left:R?`${R.getBoundingClientRect().left}px`:"",display:R&&!ds(R,"steps-body-container")?"none":"block",maxWidth:R?`${R.getBoundingClientRect().width}px`:"342px"}),t};C.current=W();const z=()=>{C.current=W(),L((e=>!e))},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===t.trim().length?e:e.filter((e=>e.value.toLowerCase().includes(t.trim().toLowerCase())))},P=e=>{b(e),p&&p(e)};Ne((()=>(d&&!o&&d.startsWith("{")&&d.endsWith("}")&&P(us.AppFields),window.addEventListener("scroll",z,!0),()=>window.removeEventListener("scroll",z))),[]);const V=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A(!1),T(e)},U=()=>{u&&(A(!0),u(V))};let Z=[];return d&&(Z=g?JSON.parse(d):[d]),x&&f(x,{onSelect:()=>alert("Selected!")}),B` <div
|
|
2240
2240
|
class=${`${ms.tagMenu} ${_?ms.tagMenuWithSearch:""}`}
|
|
2241
|
-
style=${
|
|
2241
|
+
style=${R&&C?.current?C.current:""}
|
|
2242
2242
|
>
|
|
2243
2243
|
${_&&B`
|
|
2244
2244
|
<div class=${ms.tagMenuSearch}>
|
|
2245
2245
|
<${Xo}
|
|
2246
2246
|
id="search_${r}"
|
|
2247
2247
|
placeholder="Search for a field"
|
|
2248
|
-
value="${
|
|
2249
|
-
onChange="${e=>{
|
|
2248
|
+
value="${k}"
|
|
2249
|
+
onChange="${e=>{S(e)}}"
|
|
2250
2250
|
/>
|
|
2251
2251
|
</div>
|
|
2252
2252
|
`}
|
|
2253
2253
|
${!o&&B`<div class=${ms.tagMenuHeader}>
|
|
2254
2254
|
<div
|
|
2255
|
-
class=${`${ms.tagMenuHeaderItem} ${
|
|
2256
|
-
onClick=${()=>
|
|
2255
|
+
class=${`${ms.tagMenuHeaderItem} ${w===us.Values?ms.active:""}`}
|
|
2256
|
+
onClick=${()=>P(us.Values)}
|
|
2257
2257
|
>
|
|
2258
2258
|
Values
|
|
2259
2259
|
</div>
|
|
2260
2260
|
<div
|
|
2261
|
-
class=${`${ms.tagMenuHeaderItem} ${
|
|
2262
|
-
onClick=${()=>
|
|
2261
|
+
class=${`${ms.tagMenuHeaderItem} ${w===us.AppFields?ms.active:""}`}
|
|
2262
|
+
onClick=${()=>P(us.AppFields)}
|
|
2263
2263
|
>
|
|
2264
2264
|
${t?`${t} fields`:"Fields"}
|
|
2265
2265
|
</div>
|
|
@@ -2267,65 +2267,65 @@
|
|
|
2267
2267
|
<div
|
|
2268
2268
|
class=${`${ms.tagMenuBody} ${_?ms.tagMenuBodyWithSearch:""}`}
|
|
2269
2269
|
>
|
|
2270
|
-
${
|
|
2271
|
-
${i.length>0?
|
|
2270
|
+
${w===us.Values?B`<div className=${ms.tagMenuBodyItem} id="tag-menu-body-item">
|
|
2271
|
+
${i.length>0?H(i,k).length>0?H(i,k).map(((e,t,n)=>{return t===n.length-1&&E(!1),B`
|
|
2272
2272
|
<div
|
|
2273
|
-
class=${`${ms.value} ${
|
|
2273
|
+
class=${`${ms.value} ${Z.includes(e.id)?ms.selected:""}`}
|
|
2274
2274
|
onClick=${t=>{t.stopPropagation(),l(e)}}
|
|
2275
|
-
ref=${
|
|
2276
|
-
data-hint=${`${i
|
|
2275
|
+
ref=${$.current[t]}
|
|
2276
|
+
data-hint=${`${i=$.current[t],i&&i.current&&i.current.clientWidth<i.current.scrollWidth?e.value:""}`}
|
|
2277
2277
|
>
|
|
2278
2278
|
${e.value}
|
|
2279
2279
|
</div>
|
|
2280
2280
|
|
|
2281
2281
|
${t!==n.length-1?"":B`<span>
|
|
2282
|
-
${
|
|
2282
|
+
${F||O?B`<${it} color="#999" />`:B` <a
|
|
2283
2283
|
className=${ms.optionsRefreshProminent}
|
|
2284
2284
|
href="#"
|
|
2285
|
-
onclick=${()=>{m&&(
|
|
2286
|
-
>${
|
|
2285
|
+
onclick=${()=>{m&&(N(!0),m((()=>N(!1)),v))}}
|
|
2286
|
+
>${v?"Load more options":"Reload options?"}</a
|
|
2287
2287
|
>`}
|
|
2288
2288
|
</span>`}
|
|
2289
2289
|
`;var i})):B`<div className=${ms.noOptions}>
|
|
2290
2290
|
Your search did not match any values
|
|
2291
2291
|
</div>`:B`<div className=${ms.noOptions}>
|
|
2292
2292
|
<span className=${ms.noOptionsRetry}>
|
|
2293
|
-
${
|
|
2293
|
+
${F?B`<${it} color="#999" />`:B`${h?"Could not load options.":"No options found."}
|
|
2294
2294
|
<a
|
|
2295
2295
|
className=${ms.optionsRefresh}
|
|
2296
2296
|
href="#"
|
|
2297
|
-
onclick=${()=>{m&&(
|
|
2297
|
+
onclick=${()=>{m&&(E(!0),m((()=>E(!1))))}}
|
|
2298
2298
|
>
|
|
2299
2299
|
${" "}Try again?</a
|
|
2300
2300
|
>`}
|
|
2301
2301
|
</span>
|
|
2302
2302
|
</div>`}
|
|
2303
2303
|
</div>`:B` <div className="${ms.mappedFieldMenu}">
|
|
2304
|
-
${
|
|
2305
|
-
<//>`:B`${Object.keys(c?n:ps(n,
|
|
2304
|
+
${x?B`<${x} tags=${n} onSelect=${a}>
|
|
2305
|
+
<//>`:B`${Object.keys(c?n:ps(n,k)).length>0?Object.keys(c?n:ps(n,k)).map(((e,t,i)=>B`
|
|
2306
2306
|
<${_s}
|
|
2307
2307
|
objectKey="${e}"
|
|
2308
2308
|
keyValue="${e}"
|
|
2309
|
-
objectData="${c?n[e]:ps(n,
|
|
2309
|
+
objectData="${c?n[e]:ps(n,k)[e]}"
|
|
2310
2310
|
onSelect=${a}
|
|
2311
2311
|
isRoot="${!0}"
|
|
2312
2312
|
/>
|
|
2313
2313
|
${t!==i.length-1?"":B`<span>
|
|
2314
|
-
${
|
|
2314
|
+
${M?B`<${it} color="#999" />`:B` <a
|
|
2315
2315
|
className=${ms.optionsRefreshProminent}
|
|
2316
2316
|
href="#"
|
|
2317
|
-
onclick=${
|
|
2317
|
+
onclick=${U}
|
|
2318
2318
|
>Reload fields?</a
|
|
2319
2319
|
>`}
|
|
2320
2320
|
</span>`}
|
|
2321
2321
|
`)):B`<div className=${ms.noOptions}>
|
|
2322
|
-
${c||""===
|
|
2322
|
+
${c||""===k?B`
|
|
2323
2323
|
<span className=${ms.noOptionsRetry}>
|
|
2324
|
-
${
|
|
2324
|
+
${M?B`<${it} color="#999" />`:B`${D?"Could not load fields.":"No fields found."}
|
|
2325
2325
|
<a
|
|
2326
2326
|
className=${ms.optionsRefresh}
|
|
2327
2327
|
href="#"
|
|
2328
|
-
onclick=${e=>{e.preventDefault(),e.stopPropagation(),
|
|
2328
|
+
onclick=${e=>{e.preventDefault(),e.stopPropagation(),U()}}
|
|
2329
2329
|
>
|
|
2330
2330
|
${" "}Try again?</a
|
|
2331
2331
|
>`}
|
|
@@ -7011,7 +7011,7 @@
|
|
|
7011
7011
|
</div>
|
|
7012
7012
|
</div>
|
|
7013
7013
|
`}
|
|
7014
|
-
`}});class ap{static SDK_VERSION="4.5.
|
|
7014
|
+
`}});class ap{static SDK_VERSION="4.5.18";config;apiHandler;initConfig;eventEmitter=(()=>new te)();static html=(()=>B)();static RenderModes=(()=>ae)();static TemplateFormRenderModes=(()=>oe)();static Layouts=(()=>ie)();static ViewStyles=(()=>ne)();static MarketplaceRenderModes=(()=>se)();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 X(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:oe.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&z(B`
|
|
7015
7015
|
<${Il}
|
|
7016
7016
|
message="SDK failed to load"
|
|
7017
7017
|
debug=${n.debug}
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import { useEffect, useRef, useState } from 'preact/hooks';
|
|
|
7
7
|
import { isScrolledIntoView } from '@/utils/common';
|
|
8
8
|
import { searchJSON } from '@/utils/searchJson';
|
|
9
9
|
import { Input } from '@/components/Input';
|
|
10
|
+
import { createElement } from 'preact/compat';
|
|
10
11
|
import { TagOptions } from '../TagOptions';
|
|
11
12
|
import { ThreeDotLoader } from '../../ThreeDotLoader';
|
|
12
13
|
import styles from './styles.module.scss';
|
|
@@ -46,6 +47,11 @@ interface FieldMenuProps {
|
|
|
46
47
|
tagsComponent?: any;
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
const customComponent = (props: { element: any }) => {
|
|
51
|
+
const { element } = props;
|
|
52
|
+
return html` <${element} /> `;
|
|
53
|
+
};
|
|
54
|
+
|
|
49
55
|
const FieldDropdown = (props: FieldMenuProps) => {
|
|
50
56
|
const {
|
|
51
57
|
appName = '',
|
|
@@ -205,6 +211,13 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
205
211
|
selectedValues = [value];
|
|
206
212
|
}
|
|
207
213
|
}
|
|
214
|
+
|
|
215
|
+
if (tagsComponent) {
|
|
216
|
+
const tagsComponentRender = createElement(tagsComponent, {
|
|
217
|
+
onSelect: () => alert('Selected!'),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
208
221
|
return html` <div
|
|
209
222
|
class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
|
|
210
223
|
style=${parentContainer && tagMenyStyleRef?.current
|
package/src/index.ts
CHANGED
|
@@ -48,7 +48,7 @@ import FunctionForm from '@/features/common/FunctionForm';
|
|
|
48
48
|
import { openPopupWindow } from '@/utils/popup';
|
|
49
49
|
import { Modal } from '@/components/Modal';
|
|
50
50
|
import { ListBox } from '@/components/MultipurposeField/Dropdown';
|
|
51
|
-
|
|
51
|
+
import { TestComponent } from '@/components/TestComponent';
|
|
52
52
|
import { MultipurposeField } from './components/MultipurposeField';
|
|
53
53
|
import SDKDebugContainer from './features/containers/SDKDebugContainer';
|
|
54
54
|
|