@lingk/sync 1.0.79 → 1.0.81
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/build/credentialSections.js.map +1 -1
- package/build/css/lingkStyles.css +3 -0
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +127 -35
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +13 -8
- package/build/loadData.js.map +1 -1
- package/build/main.js +24 -32
- package/build/main.js.map +1 -1
- package/build/metadataDropdown.js.map +1 -1
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
package/build/loadData.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap fe57d0cddc7c2ff502c5?3ce9********","webpack:///./src/lib/wizard/stepTypes/utils/loadData.js?0bc1"],"names":["loadData","savedBundles","savedMapping","sourceProvider","destinationProvider","sourceMetadata","destinationMetadata","isReverse","SM","DM","SP","DP","resourceGroups","bundles","forEach","bundle","index","bundleResource","find","rsc","name","resourceLabel","destinationKeys","__destinationKeys","destinationKeysParents","dk","i","customExternalKeys","deNestedProp","deNest","JSON","parse","push","property","__property","parentsArray","sourceKeys","__sourceKeys","sourceKeysObjects","__sourceKeysObjects","sourceKeysParents","sk","sourceKeyResourceObj","resources","r","resourceName","sourceKeyResourceProvider","provider","replace","toLowerCase","primaryDataSourceMetadata","sourceKeyResource","type","rscIndex","resourceProvider","dataSourceMetadata","rscResource","deNestedJoinKey","joinKeyResourceName","__joinKeyResourceName","joinKeyName","joinKeyIsParameter","joinKeyResource","joinKeyParents","primaryResourceProviderLast_Index","parentNameAndProvider","lastIndexOf","primaryResourceProvider","substr","length","deNestedPrimaryKey","primaryKeyResourceName","__primaryKeyResourceName","primaryKeyName","primaryKeyIsParameter","primaryKeyResource","primaryKeyResourceResource","rscPrimaryResource","primaryKeyParents","__name","__joinKeyName","__joinKeyResource","__primaryKeyName","__primaryKeyResource","joinType","parentRef","parameterFilters","level","mappings","filter","map","bundleIndex","m","isDestinationResource","resourceFromBundle","br","resourceFromName","sourceResource","deNestedSourceProp","propertyFromName","propertyFromParents","deNestedDestProp","propertyToName","propertyToParents","transformations","trans","s","args","split","transConcatResourceName","nestedFields","field","pop","concatRsc","concatRscProvider","concatRscMetadata","transConcatResource","concatLabels","result","p","__resourceFromName","__propertyFromName","resourceToName","__resourceToName","__propertyToName","dataSourceIsDestinationEntity","isExternalKeyMapping","isUnique","lingkSourceKey","__lingkSourceKey","lingkSourceKeyObject","__lingkSourceKeyObject","lingkSourceKeyParents","deleteEnabled","writeMode","prop","parents","nestedRsc","tempParentsArray","pProp","properties","ps","label","object","sourceKeyProperty"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;ACtCA,UAASA,QAAT,CAAkBC,YAAlB,EAAgCC,YAAhC,EAA8CC,cAA9C,EAA8DC,mBAA9D,EAAmFC,cAAnF,EAAmGC,mBAAnG,EAAwHC,SAAxH,EAAmI;;AAEjI,OAAIC,KAAKH,cAAT;AACA,OAAII,KAAKH,mBAAT;AACA,OAAII,KAAKP,cAAT;AACA,OAAIQ,KAAKP,mBAAT;AACA,OAAGG,SAAH,EAAa;AACXC,UAAKF,mBAAL;AACAG,UAAKJ,cAAL;AACAK,UAAKN,mBAAL;AACAO,UAAKR,cAAL;AACD;;AAED,OAAMS,iBAAiB,EAAvB;AACAX,gBAAaY,OAAb,CAAqBC,OAArB,CAA6B,UAACC,MAAD,EAASC,KAAT,EAAiB;AAC5C;AACA,SAAMC,iBAAiBR,GAAGS,IAAH,CAAQ,eAAO;AACpC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AACAC,kBAAaqG,IAAb;AACD;AACD,UAAO,EAACtG,kBAAD,EAAWE,0BAAX,EAAyBD,sBAAzB,EAAP;AACD;;mBAEclC,Q","file":"loadData.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fe57d0cddc7c2ff502c5","function loadData(savedBundles, savedMapping, sourceProvider, destinationProvider, sourceMetadata, destinationMetadata, isReverse) {\n\n let SM = sourceMetadata\n let DM = destinationMetadata\n let SP = sourceProvider\n let DP = destinationProvider\n if(isReverse){\n SM = destinationMetadata\n DM = sourceMetadata\n SP = destinationProvider\n DP = sourceProvider\n }\n\n const resourceGroups = []\n savedBundles.bundles.forEach((bundle, index)=>{\n // get bundle resource\n const bundleResource = DM.find(rsc => {\n return rsc.name === bundle.resourceLabel\n })\n if(bundleResource){\n\n //get bundle destinationKeys\n const destinationKeys = []\n const __destinationKeys = []\n const destinationKeysParents = []\n bundle.destinationKeys.forEach((dk,i)=>{\n if(bundle.customExternalKeys){\n const deNestedProp = deNest(\n dk,\n bundle.destinationKeysParents && JSON.parse(bundle.destinationKeysParents[i]),\n bundleResource\n )\n destinationKeys.push(deNestedProp.property)\n __destinationKeys.push(deNestedProp.__property)\n destinationKeysParents.push(deNestedProp.parentsArray)\n } else {\n destinationKeys.push('Lingk External Id')\n __destinationKeys.push('Lingk_External_Id__c')\n }\n })\n\n //get bundle sourceKeys\n const sourceKeys = []\n const __sourceKeys = []\n const sourceKeysObjects = []\n const __sourceKeysObjects = []\n const sourceKeysParents = []\n bundle.sourceKeys.forEach((sk,i)=>{\n const sourceKeyResourceObj = bundle.resources.find(r => r.resourceName===bundle.sourceKeysObjects[i])\n if(sourceKeyResourceObj){\n const sourceKeyResourceProvider = sourceKeyResourceObj.provider\n .replace('Reader','').toLowerCase()\n const primaryDataSourceMetadata = sourceKeyResourceProvider === \n DP.toLowerCase() ? DM : sourceKeyResourceProvider === \n SP.toLowerCase() ? SM : null\n\n if(primaryDataSourceMetadata){\n const sourceKeyResource = primaryDataSourceMetadata.find(r => \n r.name===sourceKeyResourceObj.resourceLabel && \n r.type===sourceKeyResourceObj.resourceName)\n if(sourceKeyResource){\n sourceKeysObjects.push(sourceKeyResource.name)\n __sourceKeysObjects.push(sourceKeyResource.type) \n const deNestedProp = deNest(\n sk,\n bundle.sourceKeysParents && JSON.parse(bundle.sourceKeysParents[i]),\n sourceKeyResource\n )\n sourceKeys.push(deNestedProp.property)\n __sourceKeys.push(deNestedProp.__property)\n sourceKeysParents.push(deNestedProp.parentsArray)\n }\n }\n\n }\n })\n\n const resources=[]\n bundle.resources && bundle.resources.forEach((rsc,rscIndex)=>{\n\n //get resource and joinKey for bundleResource (check both metadatas)\n const resourceProvider = rsc.provider.replace('Reader','').toLowerCase()\n const dataSourceMetadata = resourceProvider === DP.toLowerCase() ? DM : \n resourceProvider === SP.toLowerCase() ? SM : null\n\n let rscResource = null\n let deNestedJoinKey = {}\n let joinKeyResourceName = null\n let __joinKeyResourceName = null\n if(dataSourceMetadata){\n rscResource = dataSourceMetadata.find(r => {\n return r.name===rsc.resourceLabel\n })\n\n if(rsc.joinKeyName){\n\n if(rsc.joinKeyIsParameter){\n // joinKeyName coming from parameter from another resource\n deNestedJoinKey = {property:rsc.joinKeyName}\n joinKeyResourceName = rsc.joinKeyResource\n __joinKeyResourceName = rsc.joinKeyResource\n } else {\n // joinKeyName coming from field on this resource\n //if(rsc.resourceName===rsc.joinKeyResource){\n const joinKeyResource = dataSourceMetadata\n .find(r => r.type===rsc.resourceName && r.name===rsc.resourceLabel)\n if(joinKeyResource){\n deNestedJoinKey = deNest(\n rsc.joinKeyName, rsc.joinKeyParents, joinKeyResource \n )\n joinKeyResourceName = joinKeyResource.name\n __joinKeyResourceName = joinKeyResource.type\n }\n //}\n }\n }\n } // end if dataSourceMetadata\n \n //get resource and primaryKey for parent resource for join\n const primaryResourceProviderLast_Index = rsc.parentNameAndProvider.lastIndexOf('_')\n const primaryResourceProvider = rsc.parentNameAndProvider\n .substr(primaryResourceProviderLast_Index+1, rsc.parentNameAndProvider.length)\n const primaryDataSourceMetadata = primaryResourceProvider.toLowerCase() === DP.toLowerCase() ? DM : primaryResourceProvider.toLowerCase() === SP.toLowerCase() ? SM : null\n\n let deNestedPrimaryKey = {}\n let primaryKeyResourceName = null\n let __primaryKeyResourceName = null\n if(primaryDataSourceMetadata){\n if(rsc.primaryKeyName){\n\n if(rsc.primaryKeyIsParameter){\n //primaryKeyName coming from parameter (another resource)\n deNestedPrimaryKey = {property: rsc.primaryKeyName}\n primaryKeyResourceName = rsc.primaryKeyResource\n __primaryKeyResourceName = rsc.primaryKeyResource\n } else {\n // primaryKeyName coming from resource IN THIS BUNDLE\n const primaryKeyResourceResource = bundle.resources.find((r)=>{\n return rsc.primaryKeyResource===r.resourceName\n })\n if(primaryKeyResourceResource){\n //if(primaryResourceName===rsc.primaryKeyResource){\n const rscPrimaryResource = primaryDataSourceMetadata\n .find(r => r.name===primaryKeyResourceResource.resourceLabel)\n if(rscPrimaryResource){\n deNestedPrimaryKey = deNest(\n rsc.primaryKeyName, rsc.primaryKeyParents, rscPrimaryResource \n )\n primaryKeyResourceName = rscPrimaryResource.name\n __primaryKeyResourceName = rscPrimaryResource.type\n }\n }\n }\n }\n }\n\n if(rscResource){\n resources.push({\n name: rscResource.name,\n __name: rscResource.type,\n provider: resourceProvider,\n ...deNestedJoinKey.property && {joinKeyName: deNestedJoinKey.property},\n ...deNestedJoinKey.__property && {__joinKeyName: deNestedJoinKey.__property},\n ...joinKeyResourceName && {joinKeyResource: joinKeyResourceName},\n ...__joinKeyResourceName && {__joinKeyResource: __joinKeyResourceName},\n ...(deNestedJoinKey.parentsArray && deNestedJoinKey.parentsArray.length>0) &&\n {joinKeyParents: deNestedJoinKey.parentsArray},\n ...deNestedPrimaryKey.property && {primaryKeyName: deNestedPrimaryKey.property},\n ...deNestedPrimaryKey.__property && {__primaryKeyName: deNestedPrimaryKey.__property},\n // primaryKeyResource is necessary because you can join on parameters\n // so it might be different than the actual primary resource name\n ...primaryKeyResourceName && {primaryKeyResource: primaryKeyResourceName},\n ...__primaryKeyResourceName && {__primaryKeyResource: __primaryKeyResourceName},\n ...(deNestedPrimaryKey.parentsArray && deNestedPrimaryKey.parentsArray.length>0) &&\n {primaryKeyParents: deNestedPrimaryKey.parentsArray},\n joinType: rsc.joinType || 'LEFT JOIN',\n ...rscResource.parentRef && {parentRef: rscResource.parentRef},\n ...rsc.parameterFilters && {parameterFilters: rsc.parameterFilters},\n level: rsc.level || (rscIndex===0 ? 0 : 1),\n parentNameAndProvider: rsc.parentNameAndProvider\n })\n //console.log(resources[resources.length-1])\n }\n }) // end bundle.resource.forEach\n\n const mappings=[]\n savedMapping.mappings && savedMapping.mappings.filter(map=>map.bundleIndex===index)\n .forEach(m=>{\n let dataSourceMetadata = m.isDestinationResource ? DM : SM\n if(isReverse){\n dataSourceMetadata = m.isDestinationResource ? SM : DM\n }\n\n // source key / parents\n const resourceFromBundle = bundle.resources.find(br=>\n br.resourceName===m.resourceFromName)\n const sourceResource = resourceFromBundle && dataSourceMetadata.find(rsc =>\n rsc.name===resourceFromBundle.resourceLabel)\n const deNestedSourceProp = deNest(\n m.propertyFromName, m.propertyFromParents, sourceResource\n )\n\n // destintation key / parents\n const deNestedDestProp = deNest(\n m.propertyToName, m.propertyToParents, bundleResource\n )\n\n let transformations = [{type:'none'}]\n if(m.transformations && m.transformations.length > 0){\n const trans = m.transformations[0]\n if(trans.type==='concat'){\n const s = trans.args[1].split('->')\n const transConcatResourceName = s[s.length-2]\n const nestedFields = s[s.length-1].split('.')\n const field = nestedFields[nestedFields.length-1]\n nestedFields.pop()\n const concatRsc = savedBundles.bundles[m.bundleIndex].resources\n .find(r=>r.resourceLabel===transConcatResourceName)\n if(concatRsc){\n const concatRscProvider = concatRsc.provider.replace('Reader','').toLowerCase()\n const concatRscMetadata = concatRscProvider === DP.toLowerCase() ? DM :concatRscProvider === SP.toLowerCase() ? SM : null\n if(concatRscMetadata){\n const transConcatResource = concatRscMetadata\n .find(r => r.type===concatRsc.resourceName)\n const concatLabels = deNest(\n field, nestedFields, transConcatResource\n )\n let result = transConcatResource.name + '->'\n concatLabels.parentsArray.forEach(p=>result+=`${p}.`)\n result += concatLabels.property\n transformations = [{type:'concat',args:[trans.args[0],result]}]\n }\n }\n } else {\n transformations = m.transformations\n }\n \n }\n \n if(sourceResource && deNestedSourceProp.property && deNestedDestProp.property){\n mappings.push({\n resourceFromName: sourceResource.name,\n __resourceFromName: sourceResource.type,\n propertyFromName: deNestedSourceProp.property,\n __propertyFromName: deNestedSourceProp.__property,\n ...(deNestedSourceProp.parentsArray && deNestedSourceProp.parentsArray.length>0) &&\n {propertyFromParents: deNestedSourceProp.parentsArray},\n resourceToName: bundleResource.name,\n __resourceToName: bundleResource.type,\n propertyToName: deNestedDestProp.property,\n __propertyToName: deNestedDestProp.__property,\n ...(deNestedDestProp.parentsArray && deNestedDestProp.parentsArray.length>0) &&\n {propertyToParents: deNestedDestProp.parentsArray},\n ...m.isDestinationResource && {dataSourceIsDestinationEntity: true},\n ...m.isExternalKeyMapping && {isExternalKeyMapping: true},\n ...m.isUnique && {isUnique: true},\n transformations\n })\n }\n }) // end wizard.savedMappings.forEach\n resourceGroups.push({\n name: bundleResource.name,\n __name: bundleResource.type,\n resources, mappings,\n customExternalKeys: bundle.customExternalKeys || false,\n ...(bundle.customExternalKeys===true) && {\n sourceKeys, __sourceKeys, \n sourceKeysObjects, __sourceKeysObjects, \n sourceKeysParents, \n destinationKeys, __destinationKeys,\n destinationKeysParents\n },\n ...(bundle.customExternalKeys===false) && {\n lingkSourceKey: sourceKeys[0], __lingkSourceKey: __sourceKeys[0],\n lingkSourceKeyObject: sourceKeysObjects[0], \n __lingkSourceKeyObject: __sourceKeysObjects[0],\n lingkSourceKeyParents: sourceKeysParents[0]\n },\n provider: bundle.provider,\n //...bundle.recordTypeId && {recordTypeId: bundle.recordTypeId},\n deleteEnabled: bundle.deleteEnabled || false,\n writeMode: bundle.writeMode || (bundle.deleteEnabled ? 'delete' : 'default')\n }) // end push each bundle (contains resources AND mappings)\n } // end if bundleResource\n\n }) // end forEach over bundles\n\n return resourceGroups\n}\n\nfunction deNest(prop, parents, rsc){\n let property = ''\n let __property = ''\n let parentsArray = []\n if(rsc){\n if(parents && parents.length>0){\n let nestedRsc = rsc\n const tempParentsArray = []\n parents.forEach(ps=>{\n const pProp = nestedRsc.properties && nestedRsc.properties.find(p=>p.name===ps)\n tempParentsArray.push(pProp.label)\n nestedRsc = pProp.object\n })\n parentsArray = tempParentsArray\n const sourceKeyProperty = nestedRsc.properties && nestedRsc.properties\n .find(p => p.name===prop)\n if(sourceKeyProperty){\n property = sourceKeyProperty.label\n __property = sourceKeyProperty.name\n }\n } else {\n const sourceKeyProperty = rsc.properties && rsc.properties\n .find(p => p.name===prop)\n if(sourceKeyProperty){\n property = sourceKeyProperty.label\n __property = sourceKeyProperty.name\n }\n }\n }\n if(prop==='Lingk_External_Id__c') {\n property='Lingk External Id'\n __property = prop\n }\n return {property, parentsArray, __property}\n}\n\nexport default loadData\n\n\n// WEBPACK FOOTER //\n// ./src/lib/wizard/stepTypes/utils/loadData.js"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap 74f409cf16d7aea9f3c3?eaf2********","webpack:///./src/lib/wizard/stepTypes/utils/loadData.js?0bc1"],"names":["loadData","savedBundles","savedMapping","sourceProvider","destinationProvider","sourceMetadata","destinationMetadata","isReverse","SM","DM","SP","DP","resourceGroups","bundles","forEach","bundle","index","bundleResource","find","rsc","name","resourceLabel","destinationKeys","__destinationKeys","destinationKeysParents","dk","i","customExternalKeys","deNestedProp","deNest","JSON","parse","property","push","__property","parentsArray","sourceKeys","__sourceKeys","sourceKeysObjects","__sourceKeysObjects","sourceKeysParents","sk","sourceKeyResourceObj","resources","r","resourceName","sourceKeyResourceProvider","provider","replace","toLowerCase","primaryDataSourceMetadata","sourceKeyResource","type","rscIndex","resourceProvider","dataSourceMetadata","rscResource","deNestedJoinKey","joinKeyResourceName","__joinKeyResourceName","joinKeyName","joinKeyIsParameter","joinKeyResource","joinKeyParents","primaryResourceProviderLast_Index","parentNameAndProvider","lastIndexOf","primaryResourceProvider","substr","length","deNestedPrimaryKey","primaryKeyResourceName","__primaryKeyResourceName","primaryKeyName","primaryKeyIsParameter","primaryKeyResource","primaryKeyResourceResource","rscPrimaryResource","primaryKeyParents","__name","__joinKeyName","__joinKeyResource","__primaryKeyName","__primaryKeyResource","joinType","parentRef","parameterFilters","level","mappings","filter","map","bundleIndex","m","isDestinationResource","resourceFromBundle","br","resourceFromName","sourceResource","deNestedSourceProp","propertyFromName","propertyFromParents","deNestedDestProp","propertyToName","propertyToParents","transformations","trans","s","args","split","transConcatResourceName","nestedFields","field","pop","concatRsc","concatRscProvider","concatRscMetadata","transConcatResource","concatLabels","result","p","__resourceFromName","__propertyFromName","resourceToName","__resourceToName","__propertyToName","dataSourceIsDestinationEntity","isExternalKeyMapping","isUnique","lingkSourceKey","__lingkSourceKey","lingkSourceKeyObject","__lingkSourceKeyObject","lingkSourceKeyParents","deleteEnabled","writeMode","prop","parents","nestedRsc","tempParentsArray","pProp","properties","ps","label","object","sourceKeyProperty"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;ACtCA,UAASA,QAAT,CAAkBC,YAAlB,EAAgCC,YAAhC,EAA8CC,cAA9C,EAA8DC,mBAA9D,EAAmFC,cAAnF,EAAmGC,mBAAnG,EAAwHC,SAAxH,EAAmI;;AAEjI,OAAIC,KAAKH,cAAT;AACA,OAAII,KAAKH,mBAAT;AACA,OAAII,KAAKP,cAAT;AACA,OAAIQ,KAAKP,mBAAT;AACA,OAAGG,SAAH,EAAa;AACXC,UAAKF,mBAAL;AACAG,UAAKJ,cAAL;AACAK,UAAKN,mBAAL;AACAO,UAAKR,cAAL;AACD;;AAED,OAAMS,iBAAiB,EAAvB;AACAX,gBAAaY,OAAb,CAAqBC,OAArB,CAA6B,UAACC,MAAD,EAASC,KAAT,EAAiB;AAC5C;AACA,SAAMC,iBAAiBR,GAAGS,IAAH,CAAQ,eAAO;AACpC,cAAOC,IAAIC,IAAJ,KAAaL,OAAOM,aAA3B;AACD,MAFsB,CAAvB;AAGA,SAAGJ,cAAH,EAAkB;AAAA;;AAEhB;AACA,aAAMK,kBAAkB,EAAxB;AACA,aAAMC,oBAAoB,EAA1B;AACA,aAAMC,yBAAyB,EAA/B;AACAT,gBAAOO,eAAP,CAAuBR,OAAvB,CAA+B,UAACW,EAAD,EAAIC,CAAJ,EAAQ;AACrC,eAAGX,OAAOY,kBAAV,EAA6B;AAC3B,iBAAMC,eAAeC,OACnBJ,EADmB,EAEnBV,OAAOS,sBAAP,IAAiCM,KAAKC,KAAL,CAAWhB,OAAOS,sBAAP,CAA8BE,CAA9B,CAAX,CAFd,EAGnBT,cAHmB,CAArB;AAKA,i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AAClB,eAAM6H,QAAQF,UAAUG,UAAV,IAAwBH,UAAUG,UAAV,CAAqB1H,IAArB,CAA0B;AAAA,oBAAGqG,EAAEnG,IAAF,KAASyH,EAAZ;AAAA,YAA1B,CAAtC;AACAH,4BAAiBzG,IAAjB,CAAsB0G,MAAMG,KAA5B;AACAL,uBAAYE,MAAMI,MAAlB;AACD,UAJD;AAKA5G,wBAAeuG,gBAAf;AACA,aAAMM,oBAAoBP,UAAUG,UAAV,IAAwBH,UAAUG,UAAV,CAC/C1H,IAD+C,CAC1C;AAAA,kBAAKqG,EAAEnG,IAAF,KAASmH,IAAd;AAAA,UAD0C,CAAlD;AAEA,aAAGS,iBAAH,EAAqB;AACnBhH,sBAAWgH,kBAAkBF,KAA7B;AACA5G,wBAAa8G,kBAAkB5H,IAA/B;AACD;AAd4B;AAe9B,MAfD,MAeO;AACL,WAAM4H,oBAAoB7H,IAAIyH,UAAJ,IAAkBzH,IAAIyH,UAAJ,CACzC1H,IADyC,CACpC;AAAA,gBAAKqG,EAAEnG,IAAF,KAASmH,IAAd;AAAA,QADoC,CAA5C;AAEA,WAAGS,iBAAH,EAAqB;AACnBhH,oBAAWgH,kBAAkBF,KAA7B;AACA5G,sBAAa8G,kBAAkB5H,IAA/B;AACD;AACF;AACF;AACD,OAAGmH,SAAO,sBAAV,EAAkC;AAChCvG,gBAAS,mBAAT;AACAE,kBAAaqG,IAAb;AACD;AACD,UAAO,EAACvG,kBAAD,EAAWG,0BAAX,EAAyBD,sBAAzB,EAAP;AACD;;mBAEclC,Q","file":"loadData.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 74f409cf16d7aea9f3c3","function loadData(savedBundles, savedMapping, sourceProvider, destinationProvider, sourceMetadata, destinationMetadata, isReverse) {\n\n let SM = sourceMetadata\n let DM = destinationMetadata\n let SP = sourceProvider\n let DP = destinationProvider\n if(isReverse){\n SM = destinationMetadata\n DM = sourceMetadata\n SP = destinationProvider\n DP = sourceProvider\n }\n\n const resourceGroups = []\n savedBundles.bundles.forEach((bundle, index)=>{\n // get bundle resource\n const bundleResource = DM.find(rsc => {\n return rsc.name === bundle.resourceLabel\n })\n if(bundleResource){\n\n //get bundle destinationKeys\n const destinationKeys = []\n const __destinationKeys = []\n const destinationKeysParents = []\n bundle.destinationKeys.forEach((dk,i)=>{\n if(bundle.customExternalKeys){\n const deNestedProp = deNest(\n dk,\n bundle.destinationKeysParents && JSON.parse(bundle.destinationKeysParents[i]),\n bundleResource\n )\n if(deNestedProp.property){\n destinationKeys.push(deNestedProp.property)\n __destinationKeys.push(deNestedProp.__property)\n destinationKeysParents.push(deNestedProp.parentsArray)\n }\n } else {\n destinationKeys.push('Lingk External Id')\n __destinationKeys.push('Lingk_External_Id__c')\n }\n })\n\n //get bundle sourceKeys\n const sourceKeys = []\n const __sourceKeys = []\n const sourceKeysObjects = []\n const __sourceKeysObjects = []\n const sourceKeysParents = []\n bundle.sourceKeys.forEach((sk,i)=>{\n const sourceKeyResourceObj = bundle.resources.find(r => r.resourceName===bundle.sourceKeysObjects[i])\n if(sourceKeyResourceObj){\n const sourceKeyResourceProvider = sourceKeyResourceObj.provider\n .replace('Reader','').toLowerCase()\n const primaryDataSourceMetadata = sourceKeyResourceProvider === \n DP.toLowerCase() ? DM : sourceKeyResourceProvider === \n SP.toLowerCase() ? SM : null\n\n if(primaryDataSourceMetadata){\n const sourceKeyResource = primaryDataSourceMetadata.find(r => \n r.name===sourceKeyResourceObj.resourceLabel && \n r.type===sourceKeyResourceObj.resourceName)\n if(sourceKeyResource){\n \n const deNestedProp = deNest(\n sk,\n bundle.sourceKeysParents && JSON.parse(bundle.sourceKeysParents[i]),\n sourceKeyResource\n )\n if(deNestedProp.property){\n sourceKeys.push(deNestedProp.property)\n __sourceKeys.push(deNestedProp.__property)\n sourceKeysObjects.push(sourceKeyResource.name)\n __sourceKeysObjects.push(sourceKeyResource.type) \n sourceKeysParents.push(deNestedProp.parentsArray)\n }\n }\n }\n }\n })\n\n const resources=[]\n bundle.resources && bundle.resources.forEach((rsc,rscIndex)=>{\n\n //get resource and joinKey for bundleResource (check both metadatas)\n const resourceProvider = rsc.provider.replace('Reader','').toLowerCase()\n const dataSourceMetadata = resourceProvider === DP.toLowerCase() ? DM : \n resourceProvider === SP.toLowerCase() ? SM : null\n\n let rscResource = null\n let deNestedJoinKey = {}\n let joinKeyResourceName = null\n let __joinKeyResourceName = null\n if(dataSourceMetadata){\n rscResource = dataSourceMetadata.find(r => {\n return r.name===rsc.resourceLabel\n })\n\n if(rsc.joinKeyName){\n\n if(rsc.joinKeyIsParameter){\n // joinKeyName coming from parameter from another resource\n deNestedJoinKey = {property:rsc.joinKeyName}\n joinKeyResourceName = rsc.joinKeyResource\n __joinKeyResourceName = rsc.joinKeyResource\n } else {\n // joinKeyName coming from field on this resource\n //if(rsc.resourceName===rsc.joinKeyResource){\n const joinKeyResource = dataSourceMetadata\n .find(r => r.type===rsc.resourceName && r.name===rsc.resourceLabel)\n if(joinKeyResource){\n deNestedJoinKey = deNest(\n rsc.joinKeyName, rsc.joinKeyParents, joinKeyResource \n )\n joinKeyResourceName = joinKeyResource.name\n __joinKeyResourceName = joinKeyResource.type\n }\n //}\n }\n }\n } // end if dataSourceMetadata\n \n //get resource and primaryKey for parent resource for join\n const primaryResourceProviderLast_Index = rsc.parentNameAndProvider.lastIndexOf('_')\n const primaryResourceProvider = rsc.parentNameAndProvider\n .substr(primaryResourceProviderLast_Index+1, rsc.parentNameAndProvider.length)\n const primaryDataSourceMetadata = primaryResourceProvider.toLowerCase() === DP.toLowerCase() ? DM : primaryResourceProvider.toLowerCase() === SP.toLowerCase() ? SM : null\n\n let deNestedPrimaryKey = {}\n let primaryKeyResourceName = null\n let __primaryKeyResourceName = null\n if(primaryDataSourceMetadata){\n if(rsc.primaryKeyName){\n\n if(rsc.primaryKeyIsParameter){\n //primaryKeyName coming from parameter (another resource)\n deNestedPrimaryKey = {property: rsc.primaryKeyName}\n primaryKeyResourceName = rsc.primaryKeyResource\n __primaryKeyResourceName = rsc.primaryKeyResource\n } else {\n // primaryKeyName coming from resource IN THIS BUNDLE\n const primaryKeyResourceResource = bundle.resources.find((r)=>{\n return rsc.primaryKeyResource===r.resourceName\n })\n if(primaryKeyResourceResource){\n //if(primaryResourceName===rsc.primaryKeyResource){\n const rscPrimaryResource = primaryDataSourceMetadata\n .find(r => r.name===primaryKeyResourceResource.resourceLabel)\n if(rscPrimaryResource){\n deNestedPrimaryKey = deNest(\n rsc.primaryKeyName, rsc.primaryKeyParents, rscPrimaryResource \n )\n primaryKeyResourceName = rscPrimaryResource.name\n __primaryKeyResourceName = rscPrimaryResource.type\n }\n }\n }\n }\n }\n\n if(rscResource){\n resources.push({\n name: rscResource.name,\n __name: rscResource.type,\n provider: resourceProvider,\n ...deNestedJoinKey.property && {joinKeyName: deNestedJoinKey.property},\n ...deNestedJoinKey.__property && {__joinKeyName: deNestedJoinKey.__property},\n ...joinKeyResourceName && {joinKeyResource: joinKeyResourceName},\n ...__joinKeyResourceName && {__joinKeyResource: __joinKeyResourceName},\n ...(deNestedJoinKey.parentsArray && deNestedJoinKey.parentsArray.length>0) &&\n {joinKeyParents: deNestedJoinKey.parentsArray},\n ...deNestedPrimaryKey.property && {primaryKeyName: deNestedPrimaryKey.property},\n ...deNestedPrimaryKey.__property && {__primaryKeyName: deNestedPrimaryKey.__property},\n // primaryKeyResource is necessary because you can join on parameters\n // so it might be different than the actual primary resource name\n ...primaryKeyResourceName && {primaryKeyResource: primaryKeyResourceName},\n ...__primaryKeyResourceName && {__primaryKeyResource: __primaryKeyResourceName},\n ...(deNestedPrimaryKey.parentsArray && deNestedPrimaryKey.parentsArray.length>0) &&\n {primaryKeyParents: deNestedPrimaryKey.parentsArray},\n joinType: rsc.joinType || 'LEFT JOIN',\n ...rscResource.parentRef && {parentRef: rscResource.parentRef},\n ...rsc.parameterFilters && {parameterFilters: rsc.parameterFilters},\n level: rsc.level || (rscIndex===0 ? 0 : 1),\n parentNameAndProvider: rsc.parentNameAndProvider\n })\n //console.log(resources[resources.length-1])\n }\n }) // end bundle.resource.forEach\n\n const mappings=[]\n savedMapping.mappings && savedMapping.mappings.filter(map=>map.bundleIndex===index)\n .forEach(m=>{\n let dataSourceMetadata = m.isDestinationResource ? DM : SM\n if(isReverse){\n dataSourceMetadata = m.isDestinationResource ? SM : DM\n }\n\n // source key / parents\n const resourceFromBundle = bundle.resources.find(br=>\n br.resourceName===m.resourceFromName)\n const sourceResource = resourceFromBundle && dataSourceMetadata.find(rsc =>\n rsc.name===resourceFromBundle.resourceLabel)\n const deNestedSourceProp = deNest(\n m.propertyFromName, m.propertyFromParents, sourceResource\n )\n\n // destintation key / parents\n const deNestedDestProp = deNest(\n m.propertyToName, m.propertyToParents, bundleResource\n )\n\n let transformations = [{type:'none'}]\n if(m.transformations && m.transformations.length > 0){\n const trans = m.transformations[0]\n if(trans.type==='concat'){\n const s = trans.args[1].split('->')\n const transConcatResourceName = s[s.length-2]\n const nestedFields = s[s.length-1].split('.')\n const field = nestedFields[nestedFields.length-1]\n nestedFields.pop()\n const concatRsc = savedBundles.bundles[m.bundleIndex].resources\n .find(r=>r.resourceLabel===transConcatResourceName)\n if(concatRsc){\n const concatRscProvider = concatRsc.provider.replace('Reader','').toLowerCase()\n const concatRscMetadata = concatRscProvider === DP.toLowerCase() ? DM :concatRscProvider === SP.toLowerCase() ? SM : null\n if(concatRscMetadata){\n const transConcatResource = concatRscMetadata\n .find(r => r.type===concatRsc.resourceName)\n const concatLabels = deNest(\n field, nestedFields, transConcatResource\n )\n let result = transConcatResource.name + '->'\n concatLabels.parentsArray.forEach(p=>result+=`${p}.`)\n result += concatLabels.property\n transformations = [{type:'concat',args:[trans.args[0],result]}]\n }\n }\n } else {\n transformations = m.transformations\n }\n \n }\n \n if(sourceResource && deNestedSourceProp.property && deNestedDestProp.property){\n mappings.push({\n resourceFromName: sourceResource.name,\n __resourceFromName: sourceResource.type,\n propertyFromName: deNestedSourceProp.property,\n __propertyFromName: deNestedSourceProp.__property,\n ...(deNestedSourceProp.parentsArray && deNestedSourceProp.parentsArray.length>0) &&\n {propertyFromParents: deNestedSourceProp.parentsArray},\n resourceToName: bundleResource.name,\n __resourceToName: bundleResource.type,\n propertyToName: deNestedDestProp.property,\n __propertyToName: deNestedDestProp.__property,\n ...(deNestedDestProp.parentsArray && deNestedDestProp.parentsArray.length>0) &&\n {propertyToParents: deNestedDestProp.parentsArray},\n ...m.isDestinationResource && {dataSourceIsDestinationEntity: true},\n ...m.isExternalKeyMapping && {isExternalKeyMapping: true},\n ...m.isUnique && {isUnique: true},\n transformations\n })\n }\n }) // end wizard.savedMappings.forEach\n resourceGroups.push({\n name: bundleResource.name,\n __name: bundleResource.type,\n resources, mappings,\n customExternalKeys: bundle.customExternalKeys || false,\n ...(bundle.customExternalKeys===true) && {\n sourceKeys, __sourceKeys, \n sourceKeysObjects, __sourceKeysObjects, \n sourceKeysParents, \n destinationKeys, __destinationKeys,\n destinationKeysParents\n },\n ...(bundle.customExternalKeys===false) && {\n lingkSourceKey: sourceKeys[0], __lingkSourceKey: __sourceKeys[0],\n lingkSourceKeyObject: sourceKeysObjects[0], \n __lingkSourceKeyObject: __sourceKeysObjects[0],\n lingkSourceKeyParents: sourceKeysParents[0]\n },\n provider: bundle.provider,\n //...bundle.recordTypeId && {recordTypeId: bundle.recordTypeId},\n deleteEnabled: bundle.deleteEnabled || false,\n writeMode: bundle.writeMode || (bundle.deleteEnabled ? 'delete' : 'default')\n }) // end push each bundle (contains resources AND mappings)\n } // end if bundleResource\n\n }) // end forEach over bundles\n\n return resourceGroups\n}\n\nfunction deNest(prop, parents, rsc){\n let property = ''\n let __property = ''\n let parentsArray = []\n if(rsc){\n if(parents && parents.length>0){\n let nestedRsc = rsc\n const tempParentsArray = []\n parents.forEach(ps=>{\n const pProp = nestedRsc.properties && nestedRsc.properties.find(p=>p.name===ps)\n tempParentsArray.push(pProp.label)\n nestedRsc = pProp.object\n })\n parentsArray = tempParentsArray\n const sourceKeyProperty = nestedRsc.properties && nestedRsc.properties\n .find(p => p.name===prop)\n if(sourceKeyProperty){\n property = sourceKeyProperty.label\n __property = sourceKeyProperty.name\n }\n } else {\n const sourceKeyProperty = rsc.properties && rsc.properties\n .find(p => p.name===prop)\n if(sourceKeyProperty){\n property = sourceKeyProperty.label\n __property = sourceKeyProperty.name\n }\n }\n }\n if(prop==='Lingk_External_Id__c') {\n property='Lingk External Id'\n __property = prop\n }\n return {property, parentsArray, __property}\n}\n\nexport default loadData\n\n\n// WEBPACK FOOTER //\n// ./src/lib/wizard/stepTypes/utils/loadData.js"],"sourceRoot":""}
|
package/build/main.js
CHANGED
|
@@ -236,7 +236,7 @@ module.exports =
|
|
|
236
236
|
|
|
237
237
|
**************************/
|
|
238
238
|
|
|
239
|
-
function initialize(step, wizard, change, formValues, actions, isReverse) {
|
|
239
|
+
function initialize(step, wizard, change, formValues, actions, isReverse, LOAD_DATA) {
|
|
240
240
|
|
|
241
241
|
var defaults = {
|
|
242
242
|
//sourceEndpoint: 'https://',
|
|
@@ -274,7 +274,8 @@ module.exports =
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
// LOAD_DATA only true on the schema step
|
|
278
|
+
if (LOAD_DATA && (!formValues['resourceGroups'] || formValues['resourceGroups'] && formValues['resourceGroups'].length < 1)) {
|
|
278
279
|
// rgs default to []
|
|
279
280
|
var sourceMetadata = wizard.sourceMetadata,
|
|
280
281
|
destinationMetadata = wizard.destinationMetadata;
|
|
@@ -3432,9 +3433,11 @@ module.exports =
|
|
|
3432
3433
|
bundle.destinationKeys.forEach(function (dk, i) {
|
|
3433
3434
|
if (bundle.customExternalKeys) {
|
|
3434
3435
|
var deNestedProp = deNest(dk, bundle.destinationKeysParents && JSON.parse(bundle.destinationKeysParents[i]), bundleResource);
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3436
|
+
if (deNestedProp.property) {
|
|
3437
|
+
destinationKeys.push(deNestedProp.property);
|
|
3438
|
+
__destinationKeys.push(deNestedProp.__property);
|
|
3439
|
+
destinationKeysParents.push(deNestedProp.parentsArray);
|
|
3440
|
+
}
|
|
3438
3441
|
} else {
|
|
3439
3442
|
destinationKeys.push('Lingk External Id');
|
|
3440
3443
|
__destinationKeys.push('Lingk_External_Id__c');
|
|
@@ -3460,12 +3463,15 @@ module.exports =
|
|
|
3460
3463
|
return r.name === sourceKeyResourceObj.resourceLabel && r.type === sourceKeyResourceObj.resourceName;
|
|
3461
3464
|
});
|
|
3462
3465
|
if (sourceKeyResource) {
|
|
3463
|
-
|
|
3464
|
-
__sourceKeysObjects.push(sourceKeyResource.type);
|
|
3466
|
+
|
|
3465
3467
|
var deNestedProp = deNest(sk, bundle.sourceKeysParents && JSON.parse(bundle.sourceKeysParents[i]), sourceKeyResource);
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3468
|
+
if (deNestedProp.property) {
|
|
3469
|
+
sourceKeys.push(deNestedProp.property);
|
|
3470
|
+
__sourceKeys.push(deNestedProp.__property);
|
|
3471
|
+
sourceKeysObjects.push(sourceKeyResource.name);
|
|
3472
|
+
__sourceKeysObjects.push(sourceKeyResource.type);
|
|
3473
|
+
sourceKeysParents.push(deNestedProp.parentsArray);
|
|
3474
|
+
}
|
|
3469
3475
|
}
|
|
3470
3476
|
}
|
|
3471
3477
|
}
|
|
@@ -18638,20 +18644,18 @@ module.exports =
|
|
|
18638
18644
|
removeResourceGroup = _props.removeResourceGroup,
|
|
18639
18645
|
openConnectionModal = _props.openConnectionModal,
|
|
18640
18646
|
clickTableRow = _props.clickTableRow,
|
|
18641
|
-
step = _props.step
|
|
18642
|
-
mode = _props.mode;
|
|
18647
|
+
step = _props.step;
|
|
18643
18648
|
|
|
18644
18649
|
|
|
18645
18650
|
if (!(resourceGroups && resourceGroups.length > 0)) return _react2.default.createElement('div', null);
|
|
18646
18651
|
|
|
18647
|
-
var isReverse = mode === 'reverse';
|
|
18648
18652
|
var groups = resourceGroups;
|
|
18649
18653
|
|
|
18650
18654
|
if (!groups.length > 0) return _react2.default.createElement('div', null);
|
|
18651
18655
|
|
|
18652
18656
|
var srcLabel = step.sourceConfig.label || step.sourceProvider;
|
|
18653
18657
|
var destLabel = step.destinationConfig.label || step.destinationProvider;
|
|
18654
|
-
var title =
|
|
18658
|
+
var title = srcLabel + ' to ' + destLabel + ' Object Mappings';
|
|
18655
18659
|
|
|
18656
18660
|
return _react2.default.createElement(
|
|
18657
18661
|
'div',
|
|
@@ -18710,14 +18714,8 @@ module.exports =
|
|
|
18710
18714
|
if (_this3.props.showApiNames && group.__name) {
|
|
18711
18715
|
groupName = group.__name;
|
|
18712
18716
|
}
|
|
18713
|
-
if (
|
|
18714
|
-
|
|
18715
|
-
groupName = groupName + ' (' + step.destinationProvider + ')';
|
|
18716
|
-
}
|
|
18717
|
-
} else {
|
|
18718
|
-
if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
18719
|
-
groupName = groupName + ' (' + step.sourceProvider + ')';
|
|
18720
|
-
}
|
|
18717
|
+
if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
18718
|
+
groupName = groupName + ' (' + step.sourceProvider + ')';
|
|
18721
18719
|
}
|
|
18722
18720
|
|
|
18723
18721
|
return _react2.default.createElement(
|
|
@@ -18760,14 +18758,8 @@ module.exports =
|
|
|
18760
18758
|
if (_this3.props.showApiNames && rsc.__name) {
|
|
18761
18759
|
rscName = rsc.__name;
|
|
18762
18760
|
}
|
|
18763
|
-
if (
|
|
18764
|
-
|
|
18765
|
-
rscName = rscName + ' (' + step.sourceProvider + ')';
|
|
18766
|
-
}
|
|
18767
|
-
} else {
|
|
18768
|
-
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
18769
|
-
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
18770
|
-
}
|
|
18761
|
+
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
18762
|
+
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
18771
18763
|
}
|
|
18772
18764
|
return _react2.default.createElement(
|
|
18773
18765
|
'span',
|
|
@@ -24741,7 +24733,8 @@ module.exports =
|
|
|
24741
24733
|
|
|
24742
24734
|
var isReverse = formValues.direction === 'reverse';
|
|
24743
24735
|
if (!wizard.dataLoaded) {
|
|
24744
|
-
|
|
24736
|
+
var LOAD_DATA = true;
|
|
24737
|
+
(0, _initialize2.default)(step, wizard, change, formValues, actions, isReverse, LOAD_DATA);
|
|
24745
24738
|
setTimeout(function () {
|
|
24746
24739
|
if (_this2.props.formValues['resourceGroups']) {
|
|
24747
24740
|
var resourceGroups = [].concat(_toConsumableArray(_this2.props.formValues['resourceGroups']));
|
|
@@ -25163,7 +25156,6 @@ module.exports =
|
|
|
25163
25156
|
selectJoinKey: this.selectJoinKey, change: change,
|
|
25164
25157
|
changeEntityLevel: this.changeEntityLevel }),
|
|
25165
25158
|
_react2.default.createElement(_bundleTable2.default, { openConnectionModal: this.openConnectionModal,
|
|
25166
|
-
mode: formValues.direction,
|
|
25167
25159
|
showApiNames: showApiNames
|
|
25168
25160
|
})
|
|
25169
25161
|
),
|