@amp-labs/react 1.5.3 → 1.7.0

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.
Files changed (404) hide show
  1. package/build/amp-react.cjs.js +2 -0
  2. package/build/amp-react.es.js +7854 -0
  3. package/build/index.d.ts +51 -0
  4. package/package.json +22 -9
  5. package/build/generated-sources/api/src/apis/APIKeyApi.d.ts +0 -158
  6. package/build/generated-sources/api/src/apis/APIKeyApi.js +0 -188
  7. package/build/generated-sources/api/src/apis/ConnectionApi.d.ts +0 -82
  8. package/build/generated-sources/api/src/apis/ConnectionApi.js +0 -107
  9. package/build/generated-sources/api/src/apis/ConsumerApi.d.ts +0 -52
  10. package/build/generated-sources/api/src/apis/ConsumerApi.js +0 -75
  11. package/build/generated-sources/api/src/apis/DestinationApi.d.ts +0 -156
  12. package/build/generated-sources/api/src/apis/DestinationApi.js +0 -185
  13. package/build/generated-sources/api/src/apis/GroupApi.d.ts +0 -52
  14. package/build/generated-sources/api/src/apis/GroupApi.js +0 -75
  15. package/build/generated-sources/api/src/apis/InstallationApi.d.ts +0 -196
  16. package/build/generated-sources/api/src/apis/InstallationApi.js +0 -235
  17. package/build/generated-sources/api/src/apis/IntegrationApi.d.ts +0 -128
  18. package/build/generated-sources/api/src/apis/IntegrationApi.js +0 -151
  19. package/build/generated-sources/api/src/apis/OAuthApi.d.ts +0 -76
  20. package/build/generated-sources/api/src/apis/OAuthApi.js +0 -102
  21. package/build/generated-sources/api/src/apis/OperationApi.d.ts +0 -106
  22. package/build/generated-sources/api/src/apis/OperationApi.js +0 -131
  23. package/build/generated-sources/api/src/apis/OperationEventApi.d.ts +0 -112
  24. package/build/generated-sources/api/src/apis/OperationEventApi.js +0 -140
  25. package/build/generated-sources/api/src/apis/OrgApi.d.ts +0 -226
  26. package/build/generated-sources/api/src/apis/OrgApi.js +0 -253
  27. package/build/generated-sources/api/src/apis/ProjectApi.d.ts +0 -144
  28. package/build/generated-sources/api/src/apis/ProjectApi.js +0 -170
  29. package/build/generated-sources/api/src/apis/ProviderApi.d.ts +0 -78
  30. package/build/generated-sources/api/src/apis/ProviderApi.js +0 -92
  31. package/build/generated-sources/api/src/apis/ProviderAppApi.d.ts +0 -130
  32. package/build/generated-sources/api/src/apis/ProviderAppApi.js +0 -158
  33. package/build/generated-sources/api/src/apis/RevisionApi.d.ts +0 -87
  34. package/build/generated-sources/api/src/apis/RevisionApi.js +0 -113
  35. package/build/generated-sources/api/src/apis/UploadURLApi.d.ts +0 -46
  36. package/build/generated-sources/api/src/apis/UploadURLApi.js +0 -68
  37. package/build/generated-sources/api/src/apis/UserApi.d.ts +0 -70
  38. package/build/generated-sources/api/src/apis/UserApi.js +0 -94
  39. package/build/generated-sources/api/src/apis/index.d.ts +0 -17
  40. package/build/generated-sources/api/src/apis/index.js +0 -35
  41. package/build/generated-sources/api/src/index.d.ts +0 -3
  42. package/build/generated-sources/api/src/index.js +0 -21
  43. package/build/generated-sources/api/src/models/AcceptInviteRequest.d.ts +0 -31
  44. package/build/generated-sources/api/src/models/AcceptInviteRequest.js +0 -50
  45. package/build/generated-sources/api/src/models/ApiKey.d.ts +0 -49
  46. package/build/generated-sources/api/src/models/ApiKey.js +0 -59
  47. package/build/generated-sources/api/src/models/ApiKeyOpts.d.ts +0 -63
  48. package/build/generated-sources/api/src/models/ApiKeyOpts.js +0 -66
  49. package/build/generated-sources/api/src/models/ApiKeyRequest.d.ts +0 -31
  50. package/build/generated-sources/api/src/models/ApiKeyRequest.js +0 -50
  51. package/build/generated-sources/api/src/models/ApiProblem.d.ts +0 -130
  52. package/build/generated-sources/api/src/models/ApiProblem.js +0 -82
  53. package/build/generated-sources/api/src/models/AuthType.d.ts +0 -25
  54. package/build/generated-sources/api/src/models/AuthType.js +0 -38
  55. package/build/generated-sources/api/src/models/BaseConfigContent.d.ts +0 -52
  56. package/build/generated-sources/api/src/models/BaseConfigContent.js +0 -59
  57. package/build/generated-sources/api/src/models/BaseProxyConfig.d.ts +0 -31
  58. package/build/generated-sources/api/src/models/BaseProxyConfig.js +0 -50
  59. package/build/generated-sources/api/src/models/BaseReadConfig.d.ts +0 -34
  60. package/build/generated-sources/api/src/models/BaseReadConfig.js +0 -51
  61. package/build/generated-sources/api/src/models/BaseReadConfigObject.d.ts +0 -65
  62. package/build/generated-sources/api/src/models/BaseReadConfigObject.js +0 -60
  63. package/build/generated-sources/api/src/models/BaseWriteConfig.d.ts +0 -34
  64. package/build/generated-sources/api/src/models/BaseWriteConfig.js +0 -51
  65. package/build/generated-sources/api/src/models/BaseWriteConfigObject.d.ts +0 -31
  66. package/build/generated-sources/api/src/models/BaseWriteConfigObject.js +0 -50
  67. package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.d.ts +0 -31
  68. package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.js +0 -50
  69. package/build/generated-sources/api/src/models/Builder.d.ts +0 -73
  70. package/build/generated-sources/api/src/models/Builder.js +0 -68
  71. package/build/generated-sources/api/src/models/BuilderInfo.d.ts +0 -48
  72. package/build/generated-sources/api/src/models/BuilderInfo.js +0 -59
  73. package/build/generated-sources/api/src/models/BuilderInfoOrgRole.d.ts +0 -58
  74. package/build/generated-sources/api/src/models/BuilderInfoOrgRole.js +0 -67
  75. package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.d.ts +0 -58
  76. package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.js +0 -67
  77. package/build/generated-sources/api/src/models/BulkWriteSupport.d.ts +0 -49
  78. package/build/generated-sources/api/src/models/BulkWriteSupport.js +0 -59
  79. package/build/generated-sources/api/src/models/Config.d.ts +0 -56
  80. package/build/generated-sources/api/src/models/Config.js +0 -63
  81. package/build/generated-sources/api/src/models/ConfigContent.d.ts +0 -50
  82. package/build/generated-sources/api/src/models/ConfigContent.js +0 -58
  83. package/build/generated-sources/api/src/models/ConfigContentAllOf.d.ts +0 -37
  84. package/build/generated-sources/api/src/models/ConfigContentAllOf.js +0 -52
  85. package/build/generated-sources/api/src/models/Connection.d.ts +0 -82
  86. package/build/generated-sources/api/src/models/Connection.js +0 -76
  87. package/build/generated-sources/api/src/models/Consumer.d.ts +0 -55
  88. package/build/generated-sources/api/src/models/Consumer.js +0 -62
  89. package/build/generated-sources/api/src/models/CreateConsumerRequest.d.ts +0 -37
  90. package/build/generated-sources/api/src/models/CreateConsumerRequest.js +0 -53
  91. package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +0 -44
  92. package/build/generated-sources/api/src/models/CreateDestinationRequest.js +0 -57
  93. package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +0 -39
  94. package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.js +0 -52
  95. package/build/generated-sources/api/src/models/CreateGroupRequest.d.ts +0 -37
  96. package/build/generated-sources/api/src/models/CreateGroupRequest.js +0 -53
  97. package/build/generated-sources/api/src/models/CreateInstallationRequest.d.ts +0 -44
  98. package/build/generated-sources/api/src/models/CreateInstallationRequest.js +0 -57
  99. package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.d.ts +0 -44
  100. package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.js +0 -56
  101. package/build/generated-sources/api/src/models/CreateIntegrationRequest.d.ts +0 -44
  102. package/build/generated-sources/api/src/models/CreateIntegrationRequest.js +0 -57
  103. package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.d.ts +0 -31
  104. package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.js +0 -50
  105. package/build/generated-sources/api/src/models/CreateOrgInviteRequest.d.ts +0 -31
  106. package/build/generated-sources/api/src/models/CreateOrgInviteRequest.js +0 -50
  107. package/build/generated-sources/api/src/models/CreateOrgRequest.d.ts +0 -31
  108. package/build/generated-sources/api/src/models/CreateOrgRequest.js +0 -50
  109. package/build/generated-sources/api/src/models/CreateProjectRequest.d.ts +0 -43
  110. package/build/generated-sources/api/src/models/CreateProjectRequest.js +0 -56
  111. package/build/generated-sources/api/src/models/CreateProviderAppRequest.d.ts +0 -55
  112. package/build/generated-sources/api/src/models/CreateProviderAppRequest.js +0 -61
  113. package/build/generated-sources/api/src/models/Destination.d.ts +0 -62
  114. package/build/generated-sources/api/src/models/Destination.js +0 -66
  115. package/build/generated-sources/api/src/models/Group.d.ts +0 -55
  116. package/build/generated-sources/api/src/models/Group.js +0 -62
  117. package/build/generated-sources/api/src/models/HydratedIntegration.d.ts +0 -64
  118. package/build/generated-sources/api/src/models/HydratedIntegration.js +0 -65
  119. package/build/generated-sources/api/src/models/HydratedIntegrationField.d.ts +0 -22
  120. package/build/generated-sources/api/src/models/HydratedIntegrationField.js +0 -45
  121. package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.d.ts +0 -37
  122. package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.js +0 -53
  123. package/build/generated-sources/api/src/models/HydratedIntegrationObject.d.ts +0 -75
  124. package/build/generated-sources/api/src/models/HydratedIntegrationObject.js +0 -70
  125. package/build/generated-sources/api/src/models/HydratedIntegrationProxy.d.ts +0 -31
  126. package/build/generated-sources/api/src/models/HydratedIntegrationProxy.js +0 -50
  127. package/build/generated-sources/api/src/models/HydratedIntegrationRead.d.ts +0 -32
  128. package/build/generated-sources/api/src/models/HydratedIntegrationRead.js +0 -51
  129. package/build/generated-sources/api/src/models/HydratedIntegrationWrite.d.ts +0 -32
  130. package/build/generated-sources/api/src/models/HydratedIntegrationWrite.js +0 -51
  131. package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.d.ts +0 -37
  132. package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.js +0 -53
  133. package/build/generated-sources/api/src/models/HydratedRevision.d.ts +0 -50
  134. package/build/generated-sources/api/src/models/HydratedRevision.js +0 -60
  135. package/build/generated-sources/api/src/models/ImportConnectionRequest.d.ts +0 -79
  136. package/build/generated-sources/api/src/models/ImportConnectionRequest.js +0 -72
  137. package/build/generated-sources/api/src/models/ImportInstallationRequest.d.ts +0 -45
  138. package/build/generated-sources/api/src/models/ImportInstallationRequest.js +0 -58
  139. package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.d.ts +0 -38
  140. package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.js +0 -54
  141. package/build/generated-sources/api/src/models/InputValidationIssue.d.ts +0 -89
  142. package/build/generated-sources/api/src/models/InputValidationIssue.js +0 -75
  143. package/build/generated-sources/api/src/models/InputValidationProblem.d.ts +0 -68
  144. package/build/generated-sources/api/src/models/InputValidationProblem.js +0 -63
  145. package/build/generated-sources/api/src/models/Installation.d.ts +0 -88
  146. package/build/generated-sources/api/src/models/Installation.js +0 -79
  147. package/build/generated-sources/api/src/models/Integration.d.ts +0 -68
  148. package/build/generated-sources/api/src/models/Integration.js +0 -69
  149. package/build/generated-sources/api/src/models/Integration1.d.ts +0 -64
  150. package/build/generated-sources/api/src/models/Integration1.js +0 -65
  151. package/build/generated-sources/api/src/models/IntegrationField.d.ts +0 -22
  152. package/build/generated-sources/api/src/models/IntegrationField.js +0 -45
  153. package/build/generated-sources/api/src/models/IntegrationFieldExistent.d.ts +0 -31
  154. package/build/generated-sources/api/src/models/IntegrationFieldExistent.js +0 -50
  155. package/build/generated-sources/api/src/models/IntegrationFieldMapping.d.ts +0 -49
  156. package/build/generated-sources/api/src/models/IntegrationFieldMapping.js +0 -57
  157. package/build/generated-sources/api/src/models/IntegrationObject.d.ts +0 -63
  158. package/build/generated-sources/api/src/models/IntegrationObject.js +0 -65
  159. package/build/generated-sources/api/src/models/IntegrationProxy.d.ts +0 -31
  160. package/build/generated-sources/api/src/models/IntegrationProxy.js +0 -50
  161. package/build/generated-sources/api/src/models/IntegrationRead.d.ts +0 -32
  162. package/build/generated-sources/api/src/models/IntegrationRead.js +0 -51
  163. package/build/generated-sources/api/src/models/IntegrationWrite.d.ts +0 -32
  164. package/build/generated-sources/api/src/models/IntegrationWrite.js +0 -51
  165. package/build/generated-sources/api/src/models/IntegrationWriteObject.d.ts +0 -31
  166. package/build/generated-sources/api/src/models/IntegrationWriteObject.js +0 -50
  167. package/build/generated-sources/api/src/models/Invite.d.ts +0 -84
  168. package/build/generated-sources/api/src/models/Invite.js +0 -83
  169. package/build/generated-sources/api/src/models/Log.d.ts +0 -44
  170. package/build/generated-sources/api/src/models/Log.js +0 -57
  171. package/build/generated-sources/api/src/models/LogMessage.d.ts +0 -43
  172. package/build/generated-sources/api/src/models/LogMessage.js +0 -55
  173. package/build/generated-sources/api/src/models/Oauth2Opts.d.ts +0 -77
  174. package/build/generated-sources/api/src/models/Oauth2Opts.js +0 -76
  175. package/build/generated-sources/api/src/models/OauthConnectRequest.d.ts +0 -73
  176. package/build/generated-sources/api/src/models/OauthConnectRequest.js +0 -68
  177. package/build/generated-sources/api/src/models/Operation.d.ts +0 -91
  178. package/build/generated-sources/api/src/models/Operation.js +0 -77
  179. package/build/generated-sources/api/src/models/OperationEvent.d.ts +0 -61
  180. package/build/generated-sources/api/src/models/OperationEvent.js +0 -64
  181. package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.d.ts +0 -22
  182. package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.js +0 -35
  183. package/build/generated-sources/api/src/models/Org.d.ts +0 -55
  184. package/build/generated-sources/api/src/models/Org.js +0 -62
  185. package/build/generated-sources/api/src/models/PatchApiKeyRequest.d.ts +0 -38
  186. package/build/generated-sources/api/src/models/PatchApiKeyRequest.js +0 -54
  187. package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.d.ts +0 -37
  188. package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.js +0 -52
  189. package/build/generated-sources/api/src/models/Problem.d.ts +0 -63
  190. package/build/generated-sources/api/src/models/Problem.js +0 -60
  191. package/build/generated-sources/api/src/models/Project.d.ts +0 -61
  192. package/build/generated-sources/api/src/models/Project.js +0 -64
  193. package/build/generated-sources/api/src/models/ProviderApp.d.ts +0 -73
  194. package/build/generated-sources/api/src/models/ProviderApp.js +0 -69
  195. package/build/generated-sources/api/src/models/ProviderInfo.d.ts +0 -85
  196. package/build/generated-sources/api/src/models/ProviderInfo.js +0 -75
  197. package/build/generated-sources/api/src/models/Revision.d.ts +0 -50
  198. package/build/generated-sources/api/src/models/Revision.js +0 -60
  199. package/build/generated-sources/api/src/models/SignedUrl.d.ts +0 -43
  200. package/build/generated-sources/api/src/models/SignedUrl.js +0 -56
  201. package/build/generated-sources/api/src/models/Support.d.ts +0 -56
  202. package/build/generated-sources/api/src/models/Support.js +0 -63
  203. package/build/generated-sources/api/src/models/TokenMetadataFields.d.ts +0 -43
  204. package/build/generated-sources/api/src/models/TokenMetadataFields.js +0 -54
  205. package/build/generated-sources/api/src/models/UpdateDestinationRequest.d.ts +0 -38
  206. package/build/generated-sources/api/src/models/UpdateDestinationRequest.js +0 -54
  207. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.d.ts +0 -38
  208. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.js +0 -53
  209. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts +0 -39
  210. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.js +0 -52
  211. package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.d.ts +0 -52
  212. package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.js +0 -59
  213. package/build/generated-sources/api/src/models/UpdateInstallationRequest.d.ts +0 -38
  214. package/build/generated-sources/api/src/models/UpdateInstallationRequest.js +0 -54
  215. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.d.ts +0 -38
  216. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.js +0 -53
  217. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.d.ts +0 -44
  218. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.js +0 -55
  219. package/build/generated-sources/api/src/models/UpdateOrgRequest.d.ts +0 -38
  220. package/build/generated-sources/api/src/models/UpdateOrgRequest.js +0 -54
  221. package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.d.ts +0 -31
  222. package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.js +0 -50
  223. package/build/generated-sources/api/src/models/UpdateProjectRequest.d.ts +0 -38
  224. package/build/generated-sources/api/src/models/UpdateProjectRequest.js +0 -54
  225. package/build/generated-sources/api/src/models/UpdateProjectRequestProject.d.ts +0 -37
  226. package/build/generated-sources/api/src/models/UpdateProjectRequestProject.js +0 -52
  227. package/build/generated-sources/api/src/models/UpdateProviderAppRequest.d.ts +0 -38
  228. package/build/generated-sources/api/src/models/UpdateProviderAppRequest.js +0 -54
  229. package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.d.ts +0 -55
  230. package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.js +0 -58
  231. package/build/generated-sources/api/src/models/index.d.ts +0 -94
  232. package/build/generated-sources/api/src/models/index.js +0 -112
  233. package/build/generated-sources/api/src/runtime.d.ts +0 -182
  234. package/build/generated-sources/api/src/runtime.js +0 -317
  235. package/build/src/assets/LoadingIcon.d.ts +0 -5
  236. package/build/src/assets/LoadingIcon.js +0 -9
  237. package/build/src/assets/NavIcon.d.ts +0 -2
  238. package/build/src/assets/NavIcon.js +0 -24
  239. package/build/src/assets/SuccessIcon.d.ts +0 -1
  240. package/build/src/assets/SuccessIcon.js +0 -8
  241. package/build/src/assets/TrashIcon.d.ts +0 -1
  242. package/build/src/assets/TrashIcon.js +0 -11
  243. package/build/src/components/Configure/InstallIntegration.d.ts +0 -12
  244. package/build/src/components/Configure/InstallIntegration.js +0 -27
  245. package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.d.ts +0 -15
  246. package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.js +0 -30
  247. package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.d.ts +0 -15
  248. package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js +0 -33
  249. package/build/src/components/Configure/actions/proxy/isProxyEnabled.d.ts +0 -2
  250. package/build/src/components/Configure/actions/proxy/isProxyEnabled.js +0 -8
  251. package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.d.ts +0 -8
  252. package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.js +0 -44
  253. package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.d.ts +0 -3
  254. package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.js +0 -84
  255. package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.d.ts +0 -3
  256. package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.js +0 -71
  257. package/build/src/components/Configure/actions/write/generateConfigWriteObjects.d.ts +0 -26
  258. package/build/src/components/Configure/actions/write/generateConfigWriteObjects.js +0 -41
  259. package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.d.ts +0 -3
  260. package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +0 -79
  261. package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.d.ts +0 -3
  262. package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.js +0 -68
  263. package/build/src/components/Configure/content/ConfigureInstallationBase.d.ts +0 -9
  264. package/build/src/components/Configure/content/ConfigureInstallationBase.js +0 -36
  265. package/build/src/components/Configure/content/CreateInstallation.d.ts +0 -1
  266. package/build/src/components/Configure/content/CreateInstallation.js +0 -83
  267. package/build/src/components/Configure/content/InstallationContent.d.ts +0 -1
  268. package/build/src/components/Configure/content/InstallationContent.js +0 -20
  269. package/build/src/components/Configure/content/UninstallContent.d.ts +0 -1
  270. package/build/src/components/Configure/content/UninstallContent.js +0 -45
  271. package/build/src/components/Configure/content/UpdateInstallation.d.ts +0 -7
  272. package/build/src/components/Configure/content/UpdateInstallation.js +0 -90
  273. package/build/src/components/Configure/content/fields/FieldHeader.d.ts +0 -5
  274. package/build/src/components/Configure/content/fields/FieldHeader.js +0 -9
  275. package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.d.ts +0 -9
  276. package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.js +0 -26
  277. package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.d.ts +0 -1
  278. package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.js +0 -39
  279. package/build/src/components/Configure/content/fields/FieldMappings/index.d.ts +0 -3
  280. package/build/src/components/Configure/content/fields/FieldMappings/index.js +0 -7
  281. package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.d.ts +0 -3
  282. package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.js +0 -21
  283. package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.d.ts +0 -1
  284. package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.js +0 -41
  285. package/build/src/components/Configure/content/fields/OptionalFields/index.d.ts +0 -2
  286. package/build/src/components/Configure/content/fields/OptionalFields/index.js +0 -5
  287. package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.d.ts +0 -3
  288. package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.js +0 -27
  289. package/build/src/components/Configure/content/fields/ReadFields.d.ts +0 -1
  290. package/build/src/components/Configure/content/fields/ReadFields.js +0 -11
  291. package/build/src/components/Configure/content/fields/RequiredFields.d.ts +0 -1
  292. package/build/src/components/Configure/content/fields/RequiredFields.js +0 -23
  293. package/build/src/components/Configure/content/fields/WriteFields/WriteFields.d.ts +0 -1
  294. package/build/src/components/Configure/content/fields/WriteFields/WriteFields.js +0 -34
  295. package/build/src/components/Configure/content/fields/WriteFields/index.d.ts +0 -2
  296. package/build/src/components/Configure/content/fields/WriteFields/index.js +0 -5
  297. package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts +0 -3
  298. package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js +0 -32
  299. package/build/src/components/Configure/content/useMutateInstallation.d.ts +0 -23
  300. package/build/src/components/Configure/content/useMutateInstallation.js +0 -47
  301. package/build/src/components/Configure/content/useSelectedConfigureState.d.ts +0 -72
  302. package/build/src/components/Configure/content/useSelectedConfigureState.js +0 -24
  303. package/build/src/components/Configure/index.d.ts +0 -1
  304. package/build/src/components/Configure/index.js +0 -5
  305. package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.d.ts +0 -11
  306. package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +0 -68
  307. package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.d.ts +0 -5
  308. package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.js +0 -11
  309. package/build/src/components/Configure/layout/ProtectedConnectionLayout.d.ts +0 -12
  310. package/build/src/components/Configure/layout/ProtectedConnectionLayout.js +0 -29
  311. package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.d.ts +0 -9
  312. package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.js +0 -14
  313. package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.d.ts +0 -7
  314. package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.js +0 -11
  315. package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.d.ts +0 -7
  316. package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.js +0 -15
  317. package/build/src/components/Configure/nav/ObjectManagementNav/constant.d.ts +0 -1
  318. package/build/src/components/Configure/nav/ObjectManagementNav/constant.js +0 -4
  319. package/build/src/components/Configure/nav/ObjectManagementNav/index.d.ts +0 -10
  320. package/build/src/components/Configure/nav/ObjectManagementNav/index.js +0 -61
  321. package/build/src/components/Configure/state/ConfigurationStateProvider.d.ts +0 -87
  322. package/build/src/components/Configure/state/ConfigurationStateProvider.js +0 -98
  323. package/build/src/components/Configure/state/HydratedRevisionContext.d.ts +0 -14
  324. package/build/src/components/Configure/state/HydratedRevisionContext.js +0 -81
  325. package/build/src/components/Configure/state/utils.d.ts +0 -22
  326. package/build/src/components/Configure/state/utils.js +0 -137
  327. package/build/src/components/Configure/types.d.ts +0 -44
  328. package/build/src/components/Configure/types.js +0 -2
  329. package/build/src/components/Configure/utils.d.ts +0 -34
  330. package/build/src/components/Configure/utils.js +0 -110
  331. package/build/src/components/Connect/ConnectProvider.d.ts +0 -11
  332. package/build/src/components/Connect/ConnectProvider.js +0 -12
  333. package/build/src/components/Connect/ConnectedSuccessBox.d.ts +0 -5
  334. package/build/src/components/Connect/ConnectedSuccessBox.js +0 -13
  335. package/build/src/components/Connect/useConnectionHandler.d.ts +0 -10
  336. package/build/src/components/Connect/useConnectionHandler.js +0 -24
  337. package/build/src/components/ErrorTextBox.d.ts +0 -5
  338. package/build/src/components/ErrorTextBox.js +0 -11
  339. package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.d.ts +0 -8
  340. package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.js +0 -12
  341. package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.d.ts +0 -16
  342. package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.js +0 -43
  343. package/build/src/components/Oauth/OAuthErrorAlert.d.ts +0 -5
  344. package/build/src/components/Oauth/OAuthErrorAlert.js +0 -12
  345. package/build/src/components/Oauth/OAuthWindow/OAuthWindow.d.ts +0 -14
  346. package/build/src/components/Oauth/OAuthWindow/OAuthWindow.js +0 -65
  347. package/build/src/components/Oauth/OAuthWindow/windowHelpers.d.ts +0 -24
  348. package/build/src/components/Oauth/OAuthWindow/windowHelpers.js +0 -77
  349. package/build/src/components/Oauth/OauthCardLayout.d.ts +0 -6
  350. package/build/src/components/Oauth/OauthCardLayout.js +0 -9
  351. package/build/src/components/Oauth/OauthFlow/OauthFlow.d.ts +0 -9
  352. package/build/src/components/Oauth/OauthFlow/OauthFlow.js +0 -33
  353. package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.d.ts +0 -13
  354. package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.js +0 -18
  355. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.d.ts +0 -9
  356. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.js +0 -12
  357. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.d.ts +0 -14
  358. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.js +0 -53
  359. package/build/src/components/Oauth/fetchOAuthPopupURL.d.ts +0 -1
  360. package/build/src/components/Oauth/fetchOAuthPopupURL.js +0 -29
  361. package/build/src/components/RedirectHandler/RedirectHandler.d.ts +0 -15
  362. package/build/src/components/RedirectHandler/RedirectHandler.js +0 -31
  363. package/build/src/components/RedirectHandler/index.d.ts +0 -1
  364. package/build/src/components/RedirectHandler/index.js +0 -5
  365. package/build/src/components/SuccessTextBox.d.ts +0 -5
  366. package/build/src/components/SuccessTextBox.js +0 -10
  367. package/build/src/components/ThemeProvider/Button/buttonTheme.d.ts +0 -13
  368. package/build/src/components/ThemeProvider/Button/buttonTheme.js +0 -17
  369. package/build/src/components/ThemeProvider/Button/index.d.ts +0 -2
  370. package/build/src/components/ThemeProvider/Button/index.js +0 -5
  371. package/build/src/components/ThemeProvider/index.d.ts +0 -6
  372. package/build/src/components/ThemeProvider/index.js +0 -58
  373. package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.d.ts +0 -19
  374. package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.js +0 -31
  375. package/build/src/context/AmpersandContextProvider/index.d.ts +0 -1
  376. package/build/src/context/AmpersandContextProvider/index.js +0 -17
  377. package/build/src/context/ApiKeyContextProvider.d.ts +0 -4
  378. package/build/src/context/ApiKeyContextProvider.js +0 -14
  379. package/build/src/context/ConnectionsContextProvider.d.ts +0 -17
  380. package/build/src/context/ConnectionsContextProvider.js +0 -66
  381. package/build/src/context/ErrorContextProvider.d.ts +0 -37
  382. package/build/src/context/ErrorContextProvider.js +0 -72
  383. package/build/src/context/InstallIntegrationContextProvider.d.ts +0 -30
  384. package/build/src/context/InstallIntegrationContextProvider.js +0 -110
  385. package/build/src/context/IntegrationListContextProvider.d.ts +0 -13
  386. package/build/src/context/IntegrationListContextProvider.js +0 -48
  387. package/build/src/context/ProjectContextProvider.d.ts +0 -15
  388. package/build/src/context/ProjectContextProvider.js +0 -50
  389. package/build/src/hooks/index.d.ts +0 -1
  390. package/build/src/hooks/index.js +0 -17
  391. package/build/src/hooks/useIsIntegrationInstalled.d.ts +0 -6
  392. package/build/src/hooks/useIsIntegrationInstalled.js +0 -48
  393. package/build/src/index.d.ts +0 -1
  394. package/build/src/index.js +0 -17
  395. package/build/src/public/index.d.ts +0 -7
  396. package/build/src/public/index.js +0 -23
  397. package/build/src/services/ApiService.d.ts +0 -25
  398. package/build/src/services/ApiService.js +0 -32
  399. package/build/src/services/api.d.ts +0 -10
  400. package/build/src/services/api.js +0 -76
  401. package/build/src/services/version.d.ts +0 -1
  402. package/build/src/services/version.js +0 -4
  403. package/build/src/utils/index.d.ts +0 -10
  404. package/build/src/utils/index.js +0 -21
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OAuthErrorAlert = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- function OAuthErrorAlert({ error }) {
7
- if (error) {
8
- return ((0, jsx_runtime_1.jsxs)(react_1.Alert, { status: "error", marginTop: "2em", children: [(0, jsx_runtime_1.jsx)(react_1.AlertIcon, {}), (0, jsx_runtime_1.jsx)(react_1.AlertDescription, { children: error })] }));
9
- }
10
- return null;
11
- }
12
- exports.OAuthErrorAlert = OAuthErrorAlert;
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- type OAuthWindowProps = {
3
- children: React.ReactNode;
4
- windowTitle: string;
5
- oauthUrl: string | null;
6
- onClose: (err: string | null) => void;
7
- };
8
- /**
9
- * v2 OAuth window to manage OAuth flow
10
- * @param param0
11
- * @returns
12
- */
13
- export declare function OAuthWindow({ children, oauthUrl, windowTitle, onClose, }: OAuthWindowProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OAuthWindow = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
7
- const ConnectionsContextProvider_1 = require("../../../context/ConnectionsContextProvider");
8
- const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
9
- const windowHelpers_1 = require("./windowHelpers");
10
- /**
11
- * v2 OAuth window to manage OAuth flow
12
- * @param param0
13
- * @returns
14
- */
15
- function OAuthWindow({ children, oauthUrl, windowTitle = 'Connect to Provider', onClose, }) {
16
- const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
17
- const { projectId } = (0, ProjectContextProvider_1.useProject)();
18
- const [connectionId, setConnectionId] = (0, react_1.useState)(null);
19
- const [oauthWindow, setOauthWindow] = (0, react_1.useState)(null);
20
- const { setSelectedConnection } = (0, ConnectionsContextProvider_1.useConnections)();
21
- const receiveMessage = (0, windowHelpers_1.getReceiveMessageEventHandler)(setConnectionId);
22
- const openOAuthWindow = (0, windowHelpers_1.getOpenWindowHandler)(windowTitle, setOauthWindow, receiveMessage, oauthUrl);
23
- const refreshConnections = (0, windowHelpers_1.getRefreshConnectionHandler)(projectId, apiKey, setSelectedConnection);
24
- // open the OAuth window on mount and prop change
25
- (0, react_1.useEffect)(() => {
26
- if (oauthUrl && !oauthWindow) {
27
- openOAuthWindow(); // creates new window and adds event listener
28
- }
29
- }, [oauthUrl, oauthWindow, openOAuthWindow, receiveMessage, windowTitle]);
30
- // refresh connections on connectionId change
31
- (0, react_1.useEffect)(() => {
32
- if (connectionId) {
33
- refreshConnections(connectionId)
34
- .then(() => {
35
- oauthWindow === null || oauthWindow === void 0 ? void 0 : oauthWindow.close(); // only close the window if connection is successful
36
- // console.debug('Connection successful');
37
- }).catch((err) => {
38
- var _a;
39
- console.error('Error refreshing connection: ', err);
40
- onClose((_a = err.message) !== null && _a !== void 0 ? _a : 'Unexpected error: not able to refresh connection');
41
- });
42
- }
43
- }, [connectionId, apiKey, setSelectedConnection, refreshConnections, oauthWindow, onClose]);
44
- // check if the window is closed
45
- const interval = oauthWindow && setInterval(() => {
46
- if (((oauthWindow === null || oauthWindow === void 0 ? void 0 : oauthWindow.closed) || !oauthWindow) && !!interval) {
47
- clearInterval(interval);
48
- // cleanup event listener and window reference
49
- window.removeEventListener('message', receiveMessage);
50
- setOauthWindow(null);
51
- if (!connectionId) {
52
- // if connectionId is not set, then set OAuth failed error
53
- console.error('OAuth failed. Please try again.');
54
- if (onClose)
55
- onClose('OAuth failed. Please try again.');
56
- }
57
- else if (connectionId && onClose) {
58
- // if connectionId is set, then set OAuth success -- no error in onClose
59
- onClose(null);
60
- }
61
- }
62
- }, 500);
63
- return (0, jsx_runtime_1.jsx)("div", { children: children });
64
- }
65
- exports.OAuthWindow = OAuthWindow;
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import { Connection } from '../../../services/api';
3
- /**
4
- * returns a function to refresh the connection
5
- * @param projectId
6
- * @param apiKey
7
- * @param setSelectedConnection
8
- * @returns
9
- */
10
- export declare function getRefreshConnectionHandler(projectId: string, apiKey: string, setSelectedConnection: React.Dispatch<React.SetStateAction<Connection | null>>): (_connectionId: string) => Promise<void>;
11
- /**
12
- * opens a new window with the OAuth URL
13
- * side effect: adds a message event listener to the window
14
- * @param oauthUrl
15
- * @param windowTitle
16
- * @param setOauthWindow
17
- * @param receiveMessage
18
- * @returns a function to open the oauth window
19
- */
20
- export declare function getOpenWindowHandler(windowTitle: string, setOauthWindow: React.Dispatch<React.SetStateAction<Window | null>>, receiveMessage: (event: MessageEvent) => void, oauthUrl: string | null): () => void;
21
- /**
22
- * returns a function to handle the message event
23
- */
24
- export declare function getReceiveMessageEventHandler(setConnectionId: React.Dispatch<React.SetStateAction<null>>): (event: MessageEvent) => void;
@@ -1,77 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReceiveMessageEventHandler = exports.getOpenWindowHandler = exports.getRefreshConnectionHandler = void 0;
4
- const react_1 = require("react");
5
- const api_1 = require("../../../services/api");
6
- const DEFAULT_WIDTH = 600; // px
7
- const DEFAULT_HEIGHT = 600; // px
8
- const SUCCESS_EVENT = 'AUTHORIZATION_SUCCEEDED';
9
- const FAILURE_EVENT = 'AUTHORIZATION_FAILED';
10
- /**
11
- * returns a function to refresh the connection
12
- * @param projectId
13
- * @param apiKey
14
- * @param setSelectedConnection
15
- * @returns
16
- */
17
- function getRefreshConnectionHandler(projectId, apiKey, setSelectedConnection) {
18
- return (0, react_1.useCallback)(async (_connectionId) => {
19
- const connection = await (0, api_1.api)().connectionApi.getConnection({ projectId, connectionId: _connectionId }, {
20
- headers: { 'X-Api-Key': apiKey !== null && apiKey !== void 0 ? apiKey : '' },
21
- });
22
- setSelectedConnection(connection);
23
- }, [projectId, apiKey, setSelectedConnection]);
24
- }
25
- exports.getRefreshConnectionHandler = getRefreshConnectionHandler;
26
- /**
27
- * opens a new window with the OAuth URL
28
- * side effect: adds a message event listener to the window
29
- * @param oauthUrl
30
- * @param windowTitle
31
- * @param setOauthWindow
32
- * @param receiveMessage
33
- * @returns a function to open the oauth window
34
- */
35
- function getOpenWindowHandler(windowTitle, setOauthWindow, receiveMessage, oauthUrl) {
36
- return (0, react_1.useCallback)(() => {
37
- if (!oauthUrl)
38
- return;
39
- const left = window.screenX + (window.outerWidth - DEFAULT_WIDTH) / 2;
40
- const top = window.screenY + (window.outerHeight - DEFAULT_HEIGHT) / 2.5;
41
- const windowDimensions = `width=${DEFAULT_WIDTH},height=${DEFAULT_HEIGHT},left=${left},top=${top}`;
42
- // creates a new window
43
- const newWindow = window.open(oauthUrl, windowTitle, windowDimensions);
44
- setOauthWindow(newWindow);
45
- window.addEventListener('message', receiveMessage, false);
46
- }, [oauthUrl, windowTitle, setOauthWindow, receiveMessage]);
47
- }
48
- exports.getOpenWindowHandler = getOpenWindowHandler;
49
- /**
50
- * returns a function to handle the message event
51
- */
52
- function getReceiveMessageEventHandler(setConnectionId) {
53
- return (0, react_1.useCallback)((event) => {
54
- var _a;
55
- // Ignore messages from unexpected origins
56
- if (event.origin !== api_1.AMP_SERVER) {
57
- return;
58
- }
59
- // success case
60
- if (event.data.eventType === SUCCESS_EVENT) {
61
- const connection = (_a = event.data.data) === null || _a === void 0 ? void 0 : _a.connection; // connection id
62
- if (connection) {
63
- setConnectionId(connection);
64
- // do not close the window if connection is successful yet
65
- }
66
- else {
67
- console.error('Connection ID not found in event data: ', { event });
68
- }
69
- }
70
- // failure case
71
- if (event.data.eventType === FAILURE_EVENT) {
72
- console.error('OAuth failed: ', { event });
73
- // do not close the window if error occurs
74
- }
75
- }, [setConnectionId]);
76
- }
77
- exports.getReceiveMessageEventHandler = getReceiveMessageEventHandler;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- type OauthCardLayoutProps = {
3
- children: React.ReactNode;
4
- };
5
- export declare function OauthCardLayout({ children }: OauthCardLayoutProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OauthCardLayout = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- function OauthCardLayout({ children }) {
7
- return ((0, jsx_runtime_1.jsx)(react_1.Container, { children: (0, jsx_runtime_1.jsx)(react_1.Box, { p: 8, maxWidth: "600px", borderWidth: 1, borderRadius: 8, boxShadow: "lg", textAlign: ['left'], margin: "auto", marginTop: "40px", bgColor: "white", color: "gray.800", fontSize: "md", children: children }) }));
8
- }
9
- exports.OauthCardLayout = OauthCardLayout;
@@ -1,9 +0,0 @@
1
- type OauthFlowProps = {
2
- provider: string;
3
- consumerRef: string;
4
- consumerName?: string;
5
- groupRef: string;
6
- groupName?: string;
7
- };
8
- export declare function OauthFlow({ provider, consumerRef, consumerName, groupRef, groupName, }: OauthFlowProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OauthFlow = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
7
- const api_1 = require("../../../services/api");
8
- const NoWorkspaceOauthFlow_1 = require("../NoWorkspaceEntry/NoWorkspaceOauthFlow");
9
- const WorkspaceOauthFlow_1 = require("../WorkspaceEntry/WorkspaceOauthFlow");
10
- function OauthFlow({ provider, consumerRef, consumerName, groupRef, groupName, }) {
11
- var _a, _b;
12
- const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
13
- const [providerInfo, setProviderInfo] = (0, react_1.useState)(null);
14
- (0, react_1.useEffect)(() => {
15
- if (provider && api_1.api) {
16
- (0, api_1.api)().providerApi.getProvider({ provider }, {
17
- headers: { 'X-Api-Key': apiKey !== null && apiKey !== void 0 ? apiKey : '' },
18
- }).then((_providerInfo) => {
19
- setProviderInfo(_providerInfo);
20
- }).catch((err) => {
21
- console.error('Error loading provider info: ', err);
22
- });
23
- }
24
- }, [apiKey, provider]);
25
- const workspaceRequired = (_b = (_a = providerInfo === null || providerInfo === void 0 ? void 0 : providerInfo.oauth2Opts) === null || _a === void 0 ? void 0 : _a.explicitWorkspaceRequired) !== null && _b !== void 0 ? _b : false;
26
- // required workspace
27
- if (workspaceRequired) {
28
- return ((0, jsx_runtime_1.jsx)(WorkspaceOauthFlow_1.WorkspaceOauthFlow, { provider: provider, consumerRef: consumerRef, consumerName: consumerName, groupRef: groupRef, groupName: groupName }));
29
- }
30
- // no workspace required
31
- return ((0, jsx_runtime_1.jsx)(NoWorkspaceOauthFlow_1.NoWorkspaceOauthFlow, { provider: provider, consumerRef: consumerRef, consumerName: consumerName, groupRef: groupRef, groupName: groupName }));
32
- }
33
- exports.OauthFlow = OauthFlow;
@@ -1,13 +0,0 @@
1
- type SubdomainEntryProps = {
2
- handleSubmit: () => void;
3
- setWorkspace: (workspace: string) => void;
4
- error: string | null;
5
- isButtonDisabled?: boolean;
6
- };
7
- /**
8
- * Salesforce specific subdomain entry component, use workspace entry for other providers.
9
- * @param param0
10
- * @returns
11
- */
12
- export declare function SalesforceSubdomainEntry({ handleSubmit, setWorkspace, error, isButtonDisabled, }: SubdomainEntryProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SalesforceSubdomainEntry = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_1 = require("@chakra-ui/icons");
6
- const react_1 = require("@chakra-ui/react");
7
- const OauthCardLayout_1 = require("../OauthCardLayout");
8
- const OAuthErrorAlert_1 = require("../OAuthErrorAlert");
9
- const SALESFORCE_HELP_URL = 'https://help.salesforce.com/s/articleView?id=sf.faq_domain_name_what.htm&type=5';
10
- /**
11
- * Salesforce specific subdomain entry component, use workspace entry for other providers.
12
- * @param param0
13
- * @returns
14
- */
15
- function SalesforceSubdomainEntry({ handleSubmit, setWorkspace, error, isButtonDisabled, }) {
16
- return ((0, jsx_runtime_1.jsx)(OauthCardLayout_1.OauthCardLayout, { children: (0, jsx_runtime_1.jsxs)(react_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(react_1.FormLabel, { marginTop: "16", marginBottom: "0", children: (0, jsx_runtime_1.jsx)(react_1.Heading, { as: "h4", size: "md", children: "Enter your Salesforce subdomain" }) }), (0, jsx_runtime_1.jsxs)(react_1.Link, { href: SALESFORCE_HELP_URL, color: "blackAlpha.600", isExternal: true, children: ["What is my Salesforce subdomain?", (0, jsx_runtime_1.jsx)(icons_1.ExternalLinkIcon, { mx: "2px" })] }), (0, jsx_runtime_1.jsx)(OAuthErrorAlert_1.OAuthErrorAlert, { error: error }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { marginTop: "1em", children: [(0, jsx_runtime_1.jsx)(react_1.Input, { placeholder: "MyDomain", onChange: (event) => setWorkspace(event.currentTarget.value) }), (0, jsx_runtime_1.jsx)(react_1.Text, { lineHeight: "2.2em", marginLeft: "0.4em", children: ".my.salesforce.com" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(react_1.Button, { isDisabled: isButtonDisabled, width: "100%", type: "submit", onClick: handleSubmit, children: "Next" })] }) }));
17
- }
18
- exports.SalesforceSubdomainEntry = SalesforceSubdomainEntry;
@@ -1,9 +0,0 @@
1
- type WorkspaceEntryProps = {
2
- provider: string;
3
- handleSubmit: () => void;
4
- setWorkspace: (workspace: string) => void;
5
- error: string | null;
6
- isButtonDisabled?: boolean;
7
- };
8
- export declare function WorkspaceEntry({ provider, handleSubmit, setWorkspace, error, isButtonDisabled, }: WorkspaceEntryProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkspaceEntry = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const utils_1 = require("../../../utils");
7
- const OauthCardLayout_1 = require("../OauthCardLayout");
8
- const OAuthErrorAlert_1 = require("../OAuthErrorAlert");
9
- function WorkspaceEntry({ provider, handleSubmit, setWorkspace, error, isButtonDisabled, }) {
10
- return ((0, jsx_runtime_1.jsx)(OauthCardLayout_1.OauthCardLayout, { children: (0, jsx_runtime_1.jsxs)(react_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(react_1.FormLabel, { marginTop: "16", marginBottom: "0", children: (0, jsx_runtime_1.jsxs)(react_1.Heading, { as: "h4", size: "md", children: ["Enter your ", (0, utils_1.capitalize)(provider), " workspace"] }) }), (0, jsx_runtime_1.jsx)(OAuthErrorAlert_1.OAuthErrorAlert, { error: error }), (0, jsx_runtime_1.jsx)(react_1.Flex, { marginTop: "1em", children: (0, jsx_runtime_1.jsx)(react_1.Input, { placeholder: "MyWorkspace", onChange: (event) => setWorkspace(event.currentTarget.value) }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(react_1.Button, { isDisabled: isButtonDisabled, width: "100%", type: "submit", onClick: handleSubmit, children: "Next" })] }) }));
11
- }
12
- exports.WorkspaceEntry = WorkspaceEntry;
@@ -1,14 +0,0 @@
1
- interface WorkspaceOauthFlowProps {
2
- provider: string;
3
- consumerRef: string;
4
- consumerName?: string;
5
- groupRef: string;
6
- groupName?: string;
7
- }
8
- /**
9
- * Chooses workspace/subdomain entry component based on provider.
10
- * WorkspaceEntry is generic for any provider that requires a workspace to be entered first,
11
- * then launches a popup with the OAuth flow.
12
- */
13
- export declare function WorkspaceOauthFlow({ provider, consumerRef, consumerName, groupRef, groupName, }: WorkspaceOauthFlowProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkspaceOauthFlow = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
7
- const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
8
- const utils_1 = require("../../../utils");
9
- const fetchOAuthPopupURL_1 = require("../fetchOAuthPopupURL");
10
- const OAuthWindow_1 = require("../OAuthWindow/OAuthWindow");
11
- const SalesforceSubdomainEntry_1 = require("../Salesforce/SalesforceSubdomainEntry");
12
- const WorkspaceEntry_1 = require("./WorkspaceEntry");
13
- const PROVIDER_SALESFORCE = 'salesforce';
14
- /**
15
- * Chooses workspace/subdomain entry component based on provider.
16
- * WorkspaceEntry is generic for any provider that requires a workspace to be entered first,
17
- * then launches a popup with the OAuth flow.
18
- */
19
- function WorkspaceOauthFlow({ provider, consumerRef, consumerName, groupRef, groupName, }) {
20
- const { projectId } = (0, ProjectContextProvider_1.useProject)();
21
- const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
22
- const [workspace, setWorkspace] = (0, react_1.useState)('');
23
- const [oAuthCallbackURL, setOAuthCallbackURL] = (0, react_1.useState)(null);
24
- const [error, setError] = (0, react_1.useState)(null);
25
- // fetch OAuth callback URL from connection so that oath popup can be launched
26
- const handleSubmit = async () => {
27
- var _a;
28
- setError(null);
29
- if (!workspace) {
30
- setError('Workspace is required');
31
- return;
32
- }
33
- try {
34
- const url = await (0, fetchOAuthPopupURL_1.fetchOAuthPopupURL)(projectId, consumerRef, groupRef, apiKey, provider, workspace, consumerName, groupName);
35
- setOAuthCallbackURL(url);
36
- }
37
- catch (err) {
38
- console.error(err);
39
- setError((_a = err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : 'Unexpected error');
40
- }
41
- };
42
- const onClose = (0, react_1.useCallback)((err) => {
43
- setError(err);
44
- setOAuthCallbackURL(null);
45
- }, []);
46
- // custom entry component for Salesforce provider
47
- const workspaceEntryComponent = (provider === PROVIDER_SALESFORCE)
48
- ? ((0, jsx_runtime_1.jsx)(SalesforceSubdomainEntry_1.SalesforceSubdomainEntry, { handleSubmit: handleSubmit, setWorkspace: setWorkspace, error: error, isButtonDisabled: workspace.length === 0 })) : (
49
- // general workspace entry component
50
- (0, jsx_runtime_1.jsx)(WorkspaceEntry_1.WorkspaceEntry, { provider: provider, handleSubmit: handleSubmit, setWorkspace: setWorkspace, error: error, isButtonDisabled: workspace.length === 0 }));
51
- return ((0, jsx_runtime_1.jsx)(OAuthWindow_1.OAuthWindow, { windowTitle: `Connect to ${(0, utils_1.capitalize)(provider)}`, oauthUrl: oAuthCallbackURL, onClose: onClose, children: workspaceEntryComponent }));
52
- }
53
- exports.WorkspaceOauthFlow = WorkspaceOauthFlow;
@@ -1 +0,0 @@
1
- export declare const fetchOAuthPopupURL: (projectId: string, consumerRef: string, groupRef: string, apiKey: string, provider: string, workspace?: string, consumerName?: string, groupName?: string) => Promise<string>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchOAuthPopupURL = void 0;
4
- const api_1 = require("../../services/api");
5
- const utils_1 = require("../../utils");
6
- const fetchOAuthPopupURL = async (projectId, consumerRef, groupRef, apiKey, provider, workspace, consumerName, groupName) => {
7
- const providerApps = await (0, api_1.api)().providerAppApi.listProviderApps({ projectId }, {
8
- headers: { 'X-Api-Key': apiKey !== null && apiKey !== void 0 ? apiKey : '' },
9
- });
10
- const app = providerApps.find((a) => a.provider === provider);
11
- if (!app) {
12
- throw new Error(`You must first set up a ${(0, utils_1.capitalize)(provider)} Provider App using the Ampersand Console.`);
13
- }
14
- const request = {
15
- connectOAuthParams: {
16
- providerWorkspaceRef: workspace,
17
- projectId,
18
- groupRef,
19
- groupName,
20
- consumerRef,
21
- consumerName,
22
- providerAppId: app.id,
23
- provider,
24
- },
25
- };
26
- const url = await (0, api_1.api)().oAuthApi.oauthConnect(request);
27
- return url;
28
- };
29
- exports.fetchOAuthPopupURL = fetchOAuthPopupURL;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- type RedirectHandlerProps = {
3
- redirectURL?: string;
4
- children: React.ReactNode;
5
- };
6
- /**
7
- * RedirectHandler is a component that redirects to a specified URL when mounted or
8
- * will render the children if no redirect URL is present.
9
- *
10
- * @param redirectURL
11
- * @param children
12
- * @returns
13
- */
14
- export declare function RedirectHandler({ redirectURL, children }: RedirectHandlerProps): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
15
- export {};
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedirectHandler = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_2 = require("@chakra-ui/react");
7
- const LoadingIcon_1 = require("../../assets/LoadingIcon");
8
- /**
9
- * RedirectHandler is a component that redirects to a specified URL when mounted or
10
- * will render the children if no redirect URL is present.
11
- *
12
- * @param redirectURL
13
- * @param children
14
- * @returns
15
- */
16
- function RedirectHandler({ redirectURL, children }) {
17
- (0, react_1.useEffect)(() => {
18
- // Check if a redirect URL is present
19
- if (redirectURL) {
20
- // Redirect to the specified URL
21
- window.location.replace(redirectURL);
22
- }
23
- }, [redirectURL]);
24
- // show a loading message if a redirect URL is present
25
- if (redirectURL) {
26
- return ((0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(LoadingIcon_1.LoadingIcon, { message: "Redirecting..." }) }));
27
- }
28
- // render children if no redirect URL is present
29
- return children;
30
- }
31
- exports.RedirectHandler = RedirectHandler;
@@ -1 +0,0 @@
1
- export { RedirectHandler } from './RedirectHandler';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedirectHandler = void 0;
4
- var RedirectHandler_1 = require("./RedirectHandler");
5
- Object.defineProperty(exports, "RedirectHandler", { enumerable: true, get: function () { return RedirectHandler_1.RedirectHandler; } });
@@ -1,5 +0,0 @@
1
- interface ConnectedSuccessBoxProps {
2
- text: string;
3
- }
4
- export declare function SuccessTextBox({ text }: ConnectedSuccessBoxProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuccessTextBox = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const SuccessIcon_1 = require("../assets/SuccessIcon");
7
- function SuccessTextBox({ text }) {
8
- return ((0, jsx_runtime_1.jsx)(react_1.Container, { children: (0, jsx_runtime_1.jsxs)(react_1.Box, { p: 8, maxWidth: "600px", minHeight: "290px", borderWidth: 1, borderRadius: 8, boxShadow: "lg", margin: "auto", marginTop: "40px", bgColor: "white", paddingTop: "100px", color: "gray.800", fontSize: "md", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { width: "100%", display: "flex", alignContent: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(react_1.Box, { margin: "auto", children: (0, jsx_runtime_1.jsx)(SuccessIcon_1.SuccessCheckmarkIcon, {}) }) }), (0, jsx_runtime_1.jsx)(react_1.Box, { textAlign: "center", paddingTop: "25px", children: text })] }) }));
9
- }
10
- exports.SuccessTextBox = SuccessTextBox;
@@ -1,13 +0,0 @@
1
- export declare const buttonVariants: {
2
- warning: {
3
- bg: string;
4
- outlineColor: string;
5
- outline: string;
6
- outlineOffset: string;
7
- borderColor: string;
8
- color: string;
9
- _hover: {
10
- bg: string;
11
- };
12
- };
13
- };
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonVariants = void 0;
4
- // define custom button variants
5
- exports.buttonVariants = {
6
- warning: {
7
- bg: 'red.50', // Background color
8
- outlineColor: 'red.800',
9
- outline: '2px solid',
10
- outlineOffset: '0',
11
- borderColor: 'red.800', // Border color
12
- color: 'red.800', // Text color
13
- _hover: {
14
- bg: 'red.100', // Background color on hover
15
- },
16
- },
17
- };
@@ -1,2 +0,0 @@
1
- import { buttonVariants } from './buttonTheme';
2
- export { buttonVariants };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonVariants = void 0;
4
- const buttonTheme_1 = require("./buttonTheme");
5
- Object.defineProperty(exports, "buttonVariants", { enumerable: true, get: function () { return buttonTheme_1.buttonVariants; } });
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- type ThemeProviderProps = {
3
- children: React.ReactNode;
4
- };
5
- export declare function ThemeProvider({ children }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ThemeProvider = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const Button_1 = require("./Button");
7
- const customTheme = (0, react_1.extendTheme)({
8
- components: {
9
- Tabs: {
10
- baseStyle: {
11
- tab: {
12
- width: '100%',
13
- borderRadius: '4px',
14
- _hover: {
15
- bg: 'gray.300',
16
- },
17
- _selected: {
18
- color: 'black', // Set the color of the selected tab to 'black
19
- fontWeight: '500', // Set the font weight of the selected tab
20
- bg: 'gray.200', // Set the background color of the selected tab
21
- border: 'none',
22
- _hover: {
23
- bg: 'gray.300',
24
- },
25
- },
26
- },
27
- // consider creating a warning variant tab
28
- warningTab: {
29
- width: '100%',
30
- borderRadius: '4px',
31
- _hover: {
32
- bg: 'red.200',
33
- },
34
- _selected: {
35
- color: 'red.800', // Set the color of the selected tab
36
- fontWeight: '500', // Set the font weight of the selected tab
37
- bg: 'red.100', // Set the background color of the selected tab
38
- border: 'none',
39
- _hover: {
40
- bg: 'red.200',
41
- },
42
- },
43
- },
44
- },
45
- },
46
- Button: {
47
- variants: Button_1.buttonVariants,
48
- },
49
- },
50
- });
51
- const theme = (0, react_1.extendTheme)((0, react_1.withDefaultColorScheme)({
52
- colorScheme: 'facebook',
53
- components: ['Button'],
54
- }), customTheme);
55
- function ThemeProvider({ children }) {
56
- return ((0, jsx_runtime_1.jsx)(react_1.ChakraProvider, { theme: theme, children: children }));
57
- }
58
- exports.ThemeProvider = ThemeProvider;
@@ -1,19 +0,0 @@
1
- /**
2
- * AmpersandProvider.tsx
3
- *
4
- * Takes API key and project ID. Fetches source, making it available to all child components.
5
- * Also optionally accepts theme styles object with CSS values.
6
- */
7
- import React from 'react';
8
- interface AmpersandProviderProps {
9
- options: {
10
- apiKey: string;
11
- projectId: string;
12
- styles?: object;
13
- };
14
- children: React.ReactNode;
15
- }
16
- export declare function AmpersandProvider(props: AmpersandProviderProps): import("react/jsx-runtime").JSX.Element;
17
- export declare const AmpersandContext: React.Context<null>;
18
- export declare function useAmpersandProvider(): never;
19
- export {};