@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.
- package/build/amp-react.cjs.js +2 -0
- package/build/amp-react.es.js +7854 -0
- package/build/index.d.ts +51 -0
- package/package.json +22 -9
- package/build/generated-sources/api/src/apis/APIKeyApi.d.ts +0 -158
- package/build/generated-sources/api/src/apis/APIKeyApi.js +0 -188
- package/build/generated-sources/api/src/apis/ConnectionApi.d.ts +0 -82
- package/build/generated-sources/api/src/apis/ConnectionApi.js +0 -107
- package/build/generated-sources/api/src/apis/ConsumerApi.d.ts +0 -52
- package/build/generated-sources/api/src/apis/ConsumerApi.js +0 -75
- package/build/generated-sources/api/src/apis/DestinationApi.d.ts +0 -156
- package/build/generated-sources/api/src/apis/DestinationApi.js +0 -185
- package/build/generated-sources/api/src/apis/GroupApi.d.ts +0 -52
- package/build/generated-sources/api/src/apis/GroupApi.js +0 -75
- package/build/generated-sources/api/src/apis/InstallationApi.d.ts +0 -196
- package/build/generated-sources/api/src/apis/InstallationApi.js +0 -235
- package/build/generated-sources/api/src/apis/IntegrationApi.d.ts +0 -128
- package/build/generated-sources/api/src/apis/IntegrationApi.js +0 -151
- package/build/generated-sources/api/src/apis/OAuthApi.d.ts +0 -76
- package/build/generated-sources/api/src/apis/OAuthApi.js +0 -102
- package/build/generated-sources/api/src/apis/OperationApi.d.ts +0 -106
- package/build/generated-sources/api/src/apis/OperationApi.js +0 -131
- package/build/generated-sources/api/src/apis/OperationEventApi.d.ts +0 -112
- package/build/generated-sources/api/src/apis/OperationEventApi.js +0 -140
- package/build/generated-sources/api/src/apis/OrgApi.d.ts +0 -226
- package/build/generated-sources/api/src/apis/OrgApi.js +0 -253
- package/build/generated-sources/api/src/apis/ProjectApi.d.ts +0 -144
- package/build/generated-sources/api/src/apis/ProjectApi.js +0 -170
- package/build/generated-sources/api/src/apis/ProviderApi.d.ts +0 -78
- package/build/generated-sources/api/src/apis/ProviderApi.js +0 -92
- package/build/generated-sources/api/src/apis/ProviderAppApi.d.ts +0 -130
- package/build/generated-sources/api/src/apis/ProviderAppApi.js +0 -158
- package/build/generated-sources/api/src/apis/RevisionApi.d.ts +0 -87
- package/build/generated-sources/api/src/apis/RevisionApi.js +0 -113
- package/build/generated-sources/api/src/apis/UploadURLApi.d.ts +0 -46
- package/build/generated-sources/api/src/apis/UploadURLApi.js +0 -68
- package/build/generated-sources/api/src/apis/UserApi.d.ts +0 -70
- package/build/generated-sources/api/src/apis/UserApi.js +0 -94
- package/build/generated-sources/api/src/apis/index.d.ts +0 -17
- package/build/generated-sources/api/src/apis/index.js +0 -35
- package/build/generated-sources/api/src/index.d.ts +0 -3
- package/build/generated-sources/api/src/index.js +0 -21
- package/build/generated-sources/api/src/models/AcceptInviteRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/AcceptInviteRequest.js +0 -50
- package/build/generated-sources/api/src/models/ApiKey.d.ts +0 -49
- package/build/generated-sources/api/src/models/ApiKey.js +0 -59
- package/build/generated-sources/api/src/models/ApiKeyOpts.d.ts +0 -63
- package/build/generated-sources/api/src/models/ApiKeyOpts.js +0 -66
- package/build/generated-sources/api/src/models/ApiKeyRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/ApiKeyRequest.js +0 -50
- package/build/generated-sources/api/src/models/ApiProblem.d.ts +0 -130
- package/build/generated-sources/api/src/models/ApiProblem.js +0 -82
- package/build/generated-sources/api/src/models/AuthType.d.ts +0 -25
- package/build/generated-sources/api/src/models/AuthType.js +0 -38
- package/build/generated-sources/api/src/models/BaseConfigContent.d.ts +0 -52
- package/build/generated-sources/api/src/models/BaseConfigContent.js +0 -59
- package/build/generated-sources/api/src/models/BaseProxyConfig.d.ts +0 -31
- package/build/generated-sources/api/src/models/BaseProxyConfig.js +0 -50
- package/build/generated-sources/api/src/models/BaseReadConfig.d.ts +0 -34
- package/build/generated-sources/api/src/models/BaseReadConfig.js +0 -51
- package/build/generated-sources/api/src/models/BaseReadConfigObject.d.ts +0 -65
- package/build/generated-sources/api/src/models/BaseReadConfigObject.js +0 -60
- package/build/generated-sources/api/src/models/BaseWriteConfig.d.ts +0 -34
- package/build/generated-sources/api/src/models/BaseWriteConfig.js +0 -51
- package/build/generated-sources/api/src/models/BaseWriteConfigObject.d.ts +0 -31
- package/build/generated-sources/api/src/models/BaseWriteConfigObject.js +0 -50
- package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.js +0 -50
- package/build/generated-sources/api/src/models/Builder.d.ts +0 -73
- package/build/generated-sources/api/src/models/Builder.js +0 -68
- package/build/generated-sources/api/src/models/BuilderInfo.d.ts +0 -48
- package/build/generated-sources/api/src/models/BuilderInfo.js +0 -59
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.d.ts +0 -58
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.js +0 -67
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.d.ts +0 -58
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.js +0 -67
- package/build/generated-sources/api/src/models/BulkWriteSupport.d.ts +0 -49
- package/build/generated-sources/api/src/models/BulkWriteSupport.js +0 -59
- package/build/generated-sources/api/src/models/Config.d.ts +0 -56
- package/build/generated-sources/api/src/models/Config.js +0 -63
- package/build/generated-sources/api/src/models/ConfigContent.d.ts +0 -50
- package/build/generated-sources/api/src/models/ConfigContent.js +0 -58
- package/build/generated-sources/api/src/models/ConfigContentAllOf.d.ts +0 -37
- package/build/generated-sources/api/src/models/ConfigContentAllOf.js +0 -52
- package/build/generated-sources/api/src/models/Connection.d.ts +0 -82
- package/build/generated-sources/api/src/models/Connection.js +0 -76
- package/build/generated-sources/api/src/models/Consumer.d.ts +0 -55
- package/build/generated-sources/api/src/models/Consumer.js +0 -62
- package/build/generated-sources/api/src/models/CreateConsumerRequest.d.ts +0 -37
- package/build/generated-sources/api/src/models/CreateConsumerRequest.js +0 -53
- package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateDestinationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +0 -39
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.js +0 -52
- package/build/generated-sources/api/src/models/CreateGroupRequest.d.ts +0 -37
- package/build/generated-sources/api/src/models/CreateGroupRequest.js +0 -53
- package/build/generated-sources/api/src/models/CreateInstallationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateInstallationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.js +0 -56
- package/build/generated-sources/api/src/models/CreateIntegrationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateIntegrationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.js +0 -50
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.js +0 -50
- package/build/generated-sources/api/src/models/CreateOrgRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateOrgRequest.js +0 -50
- package/build/generated-sources/api/src/models/CreateProjectRequest.d.ts +0 -43
- package/build/generated-sources/api/src/models/CreateProjectRequest.js +0 -56
- package/build/generated-sources/api/src/models/CreateProviderAppRequest.d.ts +0 -55
- package/build/generated-sources/api/src/models/CreateProviderAppRequest.js +0 -61
- package/build/generated-sources/api/src/models/Destination.d.ts +0 -62
- package/build/generated-sources/api/src/models/Destination.js +0 -66
- package/build/generated-sources/api/src/models/Group.d.ts +0 -55
- package/build/generated-sources/api/src/models/Group.js +0 -62
- package/build/generated-sources/api/src/models/HydratedIntegration.d.ts +0 -64
- package/build/generated-sources/api/src/models/HydratedIntegration.js +0 -65
- package/build/generated-sources/api/src/models/HydratedIntegrationField.d.ts +0 -22
- package/build/generated-sources/api/src/models/HydratedIntegrationField.js +0 -45
- package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.d.ts +0 -37
- package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.js +0 -53
- package/build/generated-sources/api/src/models/HydratedIntegrationObject.d.ts +0 -75
- package/build/generated-sources/api/src/models/HydratedIntegrationObject.js +0 -70
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.d.ts +0 -31
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.js +0 -50
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.d.ts +0 -32
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.js +0 -51
- package/build/generated-sources/api/src/models/HydratedIntegrationWrite.d.ts +0 -32
- package/build/generated-sources/api/src/models/HydratedIntegrationWrite.js +0 -51
- package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.d.ts +0 -37
- package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.js +0 -53
- package/build/generated-sources/api/src/models/HydratedRevision.d.ts +0 -50
- package/build/generated-sources/api/src/models/HydratedRevision.js +0 -60
- package/build/generated-sources/api/src/models/ImportConnectionRequest.d.ts +0 -79
- package/build/generated-sources/api/src/models/ImportConnectionRequest.js +0 -72
- package/build/generated-sources/api/src/models/ImportInstallationRequest.d.ts +0 -45
- package/build/generated-sources/api/src/models/ImportInstallationRequest.js +0 -58
- package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.d.ts +0 -38
- package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.js +0 -54
- package/build/generated-sources/api/src/models/InputValidationIssue.d.ts +0 -89
- package/build/generated-sources/api/src/models/InputValidationIssue.js +0 -75
- package/build/generated-sources/api/src/models/InputValidationProblem.d.ts +0 -68
- package/build/generated-sources/api/src/models/InputValidationProblem.js +0 -63
- package/build/generated-sources/api/src/models/Installation.d.ts +0 -88
- package/build/generated-sources/api/src/models/Installation.js +0 -79
- package/build/generated-sources/api/src/models/Integration.d.ts +0 -68
- package/build/generated-sources/api/src/models/Integration.js +0 -69
- package/build/generated-sources/api/src/models/Integration1.d.ts +0 -64
- package/build/generated-sources/api/src/models/Integration1.js +0 -65
- package/build/generated-sources/api/src/models/IntegrationField.d.ts +0 -22
- package/build/generated-sources/api/src/models/IntegrationField.js +0 -45
- package/build/generated-sources/api/src/models/IntegrationFieldExistent.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationFieldExistent.js +0 -50
- package/build/generated-sources/api/src/models/IntegrationFieldMapping.d.ts +0 -49
- package/build/generated-sources/api/src/models/IntegrationFieldMapping.js +0 -57
- package/build/generated-sources/api/src/models/IntegrationObject.d.ts +0 -63
- package/build/generated-sources/api/src/models/IntegrationObject.js +0 -65
- package/build/generated-sources/api/src/models/IntegrationProxy.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationProxy.js +0 -50
- package/build/generated-sources/api/src/models/IntegrationRead.d.ts +0 -32
- package/build/generated-sources/api/src/models/IntegrationRead.js +0 -51
- package/build/generated-sources/api/src/models/IntegrationWrite.d.ts +0 -32
- package/build/generated-sources/api/src/models/IntegrationWrite.js +0 -51
- package/build/generated-sources/api/src/models/IntegrationWriteObject.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationWriteObject.js +0 -50
- package/build/generated-sources/api/src/models/Invite.d.ts +0 -84
- package/build/generated-sources/api/src/models/Invite.js +0 -83
- package/build/generated-sources/api/src/models/Log.d.ts +0 -44
- package/build/generated-sources/api/src/models/Log.js +0 -57
- package/build/generated-sources/api/src/models/LogMessage.d.ts +0 -43
- package/build/generated-sources/api/src/models/LogMessage.js +0 -55
- package/build/generated-sources/api/src/models/Oauth2Opts.d.ts +0 -77
- package/build/generated-sources/api/src/models/Oauth2Opts.js +0 -76
- package/build/generated-sources/api/src/models/OauthConnectRequest.d.ts +0 -73
- package/build/generated-sources/api/src/models/OauthConnectRequest.js +0 -68
- package/build/generated-sources/api/src/models/Operation.d.ts +0 -91
- package/build/generated-sources/api/src/models/Operation.js +0 -77
- package/build/generated-sources/api/src/models/OperationEvent.d.ts +0 -61
- package/build/generated-sources/api/src/models/OperationEvent.js +0 -64
- package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.d.ts +0 -22
- package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.js +0 -35
- package/build/generated-sources/api/src/models/Org.d.ts +0 -55
- package/build/generated-sources/api/src/models/Org.js +0 -62
- package/build/generated-sources/api/src/models/PatchApiKeyRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/PatchApiKeyRequest.js +0 -54
- package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.d.ts +0 -37
- package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.js +0 -52
- package/build/generated-sources/api/src/models/Problem.d.ts +0 -63
- package/build/generated-sources/api/src/models/Problem.js +0 -60
- package/build/generated-sources/api/src/models/Project.d.ts +0 -61
- package/build/generated-sources/api/src/models/Project.js +0 -64
- package/build/generated-sources/api/src/models/ProviderApp.d.ts +0 -73
- package/build/generated-sources/api/src/models/ProviderApp.js +0 -69
- package/build/generated-sources/api/src/models/ProviderInfo.d.ts +0 -85
- package/build/generated-sources/api/src/models/ProviderInfo.js +0 -75
- package/build/generated-sources/api/src/models/Revision.d.ts +0 -50
- package/build/generated-sources/api/src/models/Revision.js +0 -60
- package/build/generated-sources/api/src/models/SignedUrl.d.ts +0 -43
- package/build/generated-sources/api/src/models/SignedUrl.js +0 -56
- package/build/generated-sources/api/src/models/Support.d.ts +0 -56
- package/build/generated-sources/api/src/models/Support.js +0 -63
- package/build/generated-sources/api/src/models/TokenMetadataFields.d.ts +0 -43
- package/build/generated-sources/api/src/models/TokenMetadataFields.js +0 -54
- package/build/generated-sources/api/src/models/UpdateDestinationRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateDestinationRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.js +0 -53
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts +0 -39
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.js +0 -52
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.d.ts +0 -52
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.js +0 -59
- package/build/generated-sources/api/src/models/UpdateInstallationRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateInstallationRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.js +0 -53
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.d.ts +0 -44
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.js +0 -55
- package/build/generated-sources/api/src/models/UpdateOrgRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateOrgRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.d.ts +0 -31
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.js +0 -50
- package/build/generated-sources/api/src/models/UpdateProjectRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateProjectRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateProjectRequestProject.d.ts +0 -37
- package/build/generated-sources/api/src/models/UpdateProjectRequestProject.js +0 -52
- package/build/generated-sources/api/src/models/UpdateProviderAppRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateProviderAppRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.d.ts +0 -55
- package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.js +0 -58
- package/build/generated-sources/api/src/models/index.d.ts +0 -94
- package/build/generated-sources/api/src/models/index.js +0 -112
- package/build/generated-sources/api/src/runtime.d.ts +0 -182
- package/build/generated-sources/api/src/runtime.js +0 -317
- package/build/src/assets/LoadingIcon.d.ts +0 -5
- package/build/src/assets/LoadingIcon.js +0 -9
- package/build/src/assets/NavIcon.d.ts +0 -2
- package/build/src/assets/NavIcon.js +0 -24
- package/build/src/assets/SuccessIcon.d.ts +0 -1
- package/build/src/assets/SuccessIcon.js +0 -8
- package/build/src/assets/TrashIcon.d.ts +0 -1
- package/build/src/assets/TrashIcon.js +0 -11
- package/build/src/components/Configure/InstallIntegration.d.ts +0 -12
- package/build/src/components/Configure/InstallIntegration.js +0 -27
- package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.d.ts +0 -15
- package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.js +0 -30
- package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.d.ts +0 -15
- package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js +0 -33
- package/build/src/components/Configure/actions/proxy/isProxyEnabled.d.ts +0 -2
- package/build/src/components/Configure/actions/proxy/isProxyEnabled.js +0 -8
- package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.d.ts +0 -8
- package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.js +0 -44
- package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.js +0 -84
- package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.js +0 -71
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.d.ts +0 -26
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.js +0 -41
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +0 -79
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.js +0 -68
- package/build/src/components/Configure/content/ConfigureInstallationBase.d.ts +0 -9
- package/build/src/components/Configure/content/ConfigureInstallationBase.js +0 -36
- package/build/src/components/Configure/content/CreateInstallation.d.ts +0 -1
- package/build/src/components/Configure/content/CreateInstallation.js +0 -83
- package/build/src/components/Configure/content/InstallationContent.d.ts +0 -1
- package/build/src/components/Configure/content/InstallationContent.js +0 -20
- package/build/src/components/Configure/content/UninstallContent.d.ts +0 -1
- package/build/src/components/Configure/content/UninstallContent.js +0 -45
- package/build/src/components/Configure/content/UpdateInstallation.d.ts +0 -7
- package/build/src/components/Configure/content/UpdateInstallation.js +0 -90
- package/build/src/components/Configure/content/fields/FieldHeader.d.ts +0 -5
- package/build/src/components/Configure/content/fields/FieldHeader.js +0 -9
- package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.d.ts +0 -9
- package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.js +0 -26
- package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.d.ts +0 -1
- package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.js +0 -39
- package/build/src/components/Configure/content/fields/FieldMappings/index.d.ts +0 -3
- package/build/src/components/Configure/content/fields/FieldMappings/index.js +0 -7
- package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.d.ts +0 -3
- package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.js +0 -21
- package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.js +0 -41
- package/build/src/components/Configure/content/fields/OptionalFields/index.d.ts +0 -2
- package/build/src/components/Configure/content/fields/OptionalFields/index.js +0 -5
- package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.d.ts +0 -3
- package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.js +0 -27
- package/build/src/components/Configure/content/fields/ReadFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/ReadFields.js +0 -11
- package/build/src/components/Configure/content/fields/RequiredFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/RequiredFields.js +0 -23
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.js +0 -34
- package/build/src/components/Configure/content/fields/WriteFields/index.d.ts +0 -2
- package/build/src/components/Configure/content/fields/WriteFields/index.js +0 -5
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts +0 -3
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js +0 -32
- package/build/src/components/Configure/content/useMutateInstallation.d.ts +0 -23
- package/build/src/components/Configure/content/useMutateInstallation.js +0 -47
- package/build/src/components/Configure/content/useSelectedConfigureState.d.ts +0 -72
- package/build/src/components/Configure/content/useSelectedConfigureState.js +0 -24
- package/build/src/components/Configure/index.d.ts +0 -1
- package/build/src/components/Configure/index.js +0 -5
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.d.ts +0 -11
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +0 -68
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.d.ts +0 -5
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.js +0 -11
- package/build/src/components/Configure/layout/ProtectedConnectionLayout.d.ts +0 -12
- package/build/src/components/Configure/layout/ProtectedConnectionLayout.js +0 -29
- package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.d.ts +0 -9
- package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.js +0 -14
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.d.ts +0 -7
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.js +0 -11
- package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.d.ts +0 -7
- package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.js +0 -15
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.d.ts +0 -1
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.js +0 -4
- package/build/src/components/Configure/nav/ObjectManagementNav/index.d.ts +0 -10
- package/build/src/components/Configure/nav/ObjectManagementNav/index.js +0 -61
- package/build/src/components/Configure/state/ConfigurationStateProvider.d.ts +0 -87
- package/build/src/components/Configure/state/ConfigurationStateProvider.js +0 -98
- package/build/src/components/Configure/state/HydratedRevisionContext.d.ts +0 -14
- package/build/src/components/Configure/state/HydratedRevisionContext.js +0 -81
- package/build/src/components/Configure/state/utils.d.ts +0 -22
- package/build/src/components/Configure/state/utils.js +0 -137
- package/build/src/components/Configure/types.d.ts +0 -44
- package/build/src/components/Configure/types.js +0 -2
- package/build/src/components/Configure/utils.d.ts +0 -34
- package/build/src/components/Configure/utils.js +0 -110
- package/build/src/components/Connect/ConnectProvider.d.ts +0 -11
- package/build/src/components/Connect/ConnectProvider.js +0 -12
- package/build/src/components/Connect/ConnectedSuccessBox.d.ts +0 -5
- package/build/src/components/Connect/ConnectedSuccessBox.js +0 -13
- package/build/src/components/Connect/useConnectionHandler.d.ts +0 -10
- package/build/src/components/Connect/useConnectionHandler.js +0 -24
- package/build/src/components/ErrorTextBox.d.ts +0 -5
- package/build/src/components/ErrorTextBox.js +0 -11
- package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.d.ts +0 -8
- package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.js +0 -12
- package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.d.ts +0 -16
- package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.js +0 -43
- package/build/src/components/Oauth/OAuthErrorAlert.d.ts +0 -5
- package/build/src/components/Oauth/OAuthErrorAlert.js +0 -12
- package/build/src/components/Oauth/OAuthWindow/OAuthWindow.d.ts +0 -14
- package/build/src/components/Oauth/OAuthWindow/OAuthWindow.js +0 -65
- package/build/src/components/Oauth/OAuthWindow/windowHelpers.d.ts +0 -24
- package/build/src/components/Oauth/OAuthWindow/windowHelpers.js +0 -77
- package/build/src/components/Oauth/OauthCardLayout.d.ts +0 -6
- package/build/src/components/Oauth/OauthCardLayout.js +0 -9
- package/build/src/components/Oauth/OauthFlow/OauthFlow.d.ts +0 -9
- package/build/src/components/Oauth/OauthFlow/OauthFlow.js +0 -33
- package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.d.ts +0 -13
- package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.js +0 -18
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.d.ts +0 -9
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.js +0 -12
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.d.ts +0 -14
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.js +0 -53
- package/build/src/components/Oauth/fetchOAuthPopupURL.d.ts +0 -1
- package/build/src/components/Oauth/fetchOAuthPopupURL.js +0 -29
- package/build/src/components/RedirectHandler/RedirectHandler.d.ts +0 -15
- package/build/src/components/RedirectHandler/RedirectHandler.js +0 -31
- package/build/src/components/RedirectHandler/index.d.ts +0 -1
- package/build/src/components/RedirectHandler/index.js +0 -5
- package/build/src/components/SuccessTextBox.d.ts +0 -5
- package/build/src/components/SuccessTextBox.js +0 -10
- package/build/src/components/ThemeProvider/Button/buttonTheme.d.ts +0 -13
- package/build/src/components/ThemeProvider/Button/buttonTheme.js +0 -17
- package/build/src/components/ThemeProvider/Button/index.d.ts +0 -2
- package/build/src/components/ThemeProvider/Button/index.js +0 -5
- package/build/src/components/ThemeProvider/index.d.ts +0 -6
- package/build/src/components/ThemeProvider/index.js +0 -58
- package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.d.ts +0 -19
- package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.js +0 -31
- package/build/src/context/AmpersandContextProvider/index.d.ts +0 -1
- package/build/src/context/AmpersandContextProvider/index.js +0 -17
- package/build/src/context/ApiKeyContextProvider.d.ts +0 -4
- package/build/src/context/ApiKeyContextProvider.js +0 -14
- package/build/src/context/ConnectionsContextProvider.d.ts +0 -17
- package/build/src/context/ConnectionsContextProvider.js +0 -66
- package/build/src/context/ErrorContextProvider.d.ts +0 -37
- package/build/src/context/ErrorContextProvider.js +0 -72
- package/build/src/context/InstallIntegrationContextProvider.d.ts +0 -30
- package/build/src/context/InstallIntegrationContextProvider.js +0 -110
- package/build/src/context/IntegrationListContextProvider.d.ts +0 -13
- package/build/src/context/IntegrationListContextProvider.js +0 -48
- package/build/src/context/ProjectContextProvider.d.ts +0 -15
- package/build/src/context/ProjectContextProvider.js +0 -50
- package/build/src/hooks/index.d.ts +0 -1
- package/build/src/hooks/index.js +0 -17
- package/build/src/hooks/useIsIntegrationInstalled.d.ts +0 -6
- package/build/src/hooks/useIsIntegrationInstalled.js +0 -48
- package/build/src/index.d.ts +0 -1
- package/build/src/index.js +0 -17
- package/build/src/public/index.d.ts +0 -7
- package/build/src/public/index.js +0 -23
- package/build/src/services/ApiService.d.ts +0 -25
- package/build/src/services/ApiService.js +0 -32
- package/build/src/services/api.d.ts +0 -10
- package/build/src/services/api.js +0 -76
- package/build/src/services/version.d.ts +0 -1
- package/build/src/services/version.js +0 -4
- package/build/src/utils/index.d.ts +0 -10
- package/build/src/utils/index.js +0 -21
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InstallationContent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
|
|
6
|
-
const ErrorTextBox_1 = require("../../ErrorTextBox");
|
|
7
|
-
const CreateInstallation_1 = require("./CreateInstallation");
|
|
8
|
-
const UpdateInstallation_1 = require("./UpdateInstallation");
|
|
9
|
-
function InstallationContent() {
|
|
10
|
-
const { integrationObj, installation } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
|
|
11
|
-
if (!integrationObj) {
|
|
12
|
-
return (0, jsx_runtime_1.jsx)(ErrorTextBox_1.ErrorTextBox, { message: "We can't load the integration" });
|
|
13
|
-
}
|
|
14
|
-
return installation && integrationObj ? (
|
|
15
|
-
// If installation exists, render update installation flow
|
|
16
|
-
(0, jsx_runtime_1.jsx)(UpdateInstallation_1.UpdateInstallation, { installation: installation, integrationObj: integrationObj })) : (
|
|
17
|
-
// No installation, render create installation flow
|
|
18
|
-
(0, jsx_runtime_1.jsx)(CreateInstallation_1.CreateInstallation, {}));
|
|
19
|
-
}
|
|
20
|
-
exports.InstallationContent = InstallationContent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function UninstallContent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UninstallContent = 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 ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
|
|
8
|
-
const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
|
|
9
|
-
const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
|
|
10
|
-
const api_1 = require("../../../services/api");
|
|
11
|
-
function UninstallContent() {
|
|
12
|
-
const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
|
|
13
|
-
const { projectId, appName } = (0, ProjectContextProvider_1.useProject)();
|
|
14
|
-
const { integrationId, installation, resetInstallations } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
|
|
15
|
-
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
16
|
-
const isDisabled = !projectId || !integrationId || !(installation === null || installation === void 0 ? void 0 : installation.id) || loading;
|
|
17
|
-
const onDelete = async () => {
|
|
18
|
-
if (!isDisabled) {
|
|
19
|
-
setLoading(true);
|
|
20
|
-
console.warn('uninstalling installation', { projectId, integrationId, installationId: installation.id });
|
|
21
|
-
try {
|
|
22
|
-
await (0, api_1.api)().installationApi.deleteInstallation({ projectId, integrationId, installationId: installation.id }, {
|
|
23
|
-
headers: {
|
|
24
|
-
'X-Api-Key': apiKey,
|
|
25
|
-
'Content-Type': 'application/json',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
resetInstallations();
|
|
29
|
-
console.warn('successfully uninstalled installation: ', installation.id);
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
console.error('error uninstalling installation', e);
|
|
33
|
-
}
|
|
34
|
-
finally {
|
|
35
|
-
setLoading(false);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const buttonContent = loading ? 'Uninstalling...' : 'Yes, uninstall';
|
|
40
|
-
const content = (installation === null || installation === void 0 ? void 0 : installation.id)
|
|
41
|
-
? `Once you uninstall this integration, all your configuration will be lost, and "${appName}" may stop working.`
|
|
42
|
-
: "You've successfully uninstalled the integration.";
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Stack, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { paddingBottom: 3, children: content }), (installation === null || installation === void 0 ? void 0 : installation.id) && ((0, jsx_runtime_1.jsx)(react_2.Button, { onClick: onDelete, variant: "warning", isDisabled: isDisabled, children: buttonContent }))] }));
|
|
44
|
-
}
|
|
45
|
-
exports.UninstallContent = UninstallContent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Installation, Integration } from '../../../services/api';
|
|
2
|
-
interface UpdateInstallationProps {
|
|
3
|
-
installation: Installation;
|
|
4
|
-
integrationObj: Integration;
|
|
5
|
-
}
|
|
6
|
-
export declare function UpdateInstallation({ installation, integrationObj }: UpdateInstallationProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateInstallation = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const ErrorContextProvider_1 = require("../../../context/ErrorContextProvider");
|
|
7
|
-
const onSaveReadUpdateInstallation_1 = require("../actions/read/onSaveReadUpdateInstallation");
|
|
8
|
-
const onSaveWriteUpdateInstallation_1 = require("../actions/write/onSaveWriteUpdateInstallation");
|
|
9
|
-
const constant_1 = require("../nav/ObjectManagementNav/constant");
|
|
10
|
-
const utils_1 = require("../state/utils");
|
|
11
|
-
const utils_2 = require("../utils");
|
|
12
|
-
const ConfigureInstallationBase_1 = require("./ConfigureInstallationBase");
|
|
13
|
-
const useMutateInstallation_1 = require("./useMutateInstallation");
|
|
14
|
-
// Update Installation Flow
|
|
15
|
-
function UpdateInstallation({ installation, integrationObj }) {
|
|
16
|
-
const { setInstallation, hydratedRevision, loading, selectedObjectName, apiKey, projectId, resetBoundary, setErrors, resetConfigureState, resetPendingConfigurationState, configureState, onUpdateSuccess, } = (0, useMutateInstallation_1.useMutateInstallation)();
|
|
17
|
-
const [isLoading, setLoadingState] = (0, react_1.useState)(false);
|
|
18
|
-
// is other selected?
|
|
19
|
-
const isOtherSelected = selectedObjectName === constant_1.OTHER_CONST;
|
|
20
|
-
// when no installation or config exists, render create flow
|
|
21
|
-
const { config } = installation;
|
|
22
|
-
// 1. get config from installations (contains form selection state)
|
|
23
|
-
// 2. get the hydrated revision (contains full form)
|
|
24
|
-
// 3. generate the configuration state from the hydrated revision and config
|
|
25
|
-
const resetState = (0, react_1.useCallback)(() => {
|
|
26
|
-
resetBoundary(ErrorContextProvider_1.ErrorBoundary.MAPPING);
|
|
27
|
-
// set configurationState when hydratedRevision is loaded
|
|
28
|
-
if ((hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) && !loading && selectedObjectName) {
|
|
29
|
-
(0, utils_1.setHydrateConfigState)(hydratedRevision, config, selectedObjectName, resetConfigureState);
|
|
30
|
-
}
|
|
31
|
-
}, [resetBoundary, hydratedRevision, loading, selectedObjectName, config, resetConfigureState]);
|
|
32
|
-
(0, react_1.useEffect)(() => {
|
|
33
|
-
if (!configureState) {
|
|
34
|
-
resetState();
|
|
35
|
-
}
|
|
36
|
-
}, [configureState, resetState]);
|
|
37
|
-
// reset state when installation (i.e. config) is reloaded.
|
|
38
|
-
(0, react_1.useEffect)(() => {
|
|
39
|
-
if (installation)
|
|
40
|
-
resetState();
|
|
41
|
-
}, [installation, resetState]);
|
|
42
|
-
const hydratedObject = (0, react_1.useMemo)(() => {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
-
const hydrated = (_c = (_b = (_a = hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.find((obj) => (obj === null || obj === void 0 ? void 0 : obj.objectName) === selectedObjectName);
|
|
45
|
-
return hydrated;
|
|
46
|
-
}, [hydratedRevision, selectedObjectName]);
|
|
47
|
-
const onSaveRead = () => {
|
|
48
|
-
// check if fields with requirements are met
|
|
49
|
-
const { requiredMapFields, selectedFieldMappings } = (configureState === null || configureState === void 0 ? void 0 : configureState.read) || {};
|
|
50
|
-
const { errorList } = (0, utils_2.validateFieldMappings)(requiredMapFields, selectedFieldMappings, setErrors);
|
|
51
|
-
if (errorList.length > 0) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (hydratedRevision && installation && selectedObjectName && apiKey && projectId && hydratedObject) {
|
|
55
|
-
setLoadingState(true);
|
|
56
|
-
const res = (0, onSaveReadUpdateInstallation_1.onSaveReadUpdateInstallation)(projectId, integrationObj.id, installation.id, selectedObjectName, apiKey, configureState, setInstallation, hydratedObject, hydratedRevision, onUpdateSuccess);
|
|
57
|
-
res.finally(() => {
|
|
58
|
-
setLoadingState(false);
|
|
59
|
-
resetPendingConfigurationState(selectedObjectName);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
console.error('UpdateInstallation - onSaveUpdate missing required props');
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
const onSaveWrite = () => {
|
|
67
|
-
if (installation && selectedObjectName && apiKey && projectId && hydratedRevision) {
|
|
68
|
-
setLoadingState(true);
|
|
69
|
-
const res = (0, onSaveWriteUpdateInstallation_1.onSaveWriteUpdateInstallation)(projectId, integrationObj.id, installation.id, apiKey, configureState, hydratedRevision, setInstallation, onUpdateSuccess);
|
|
70
|
-
res.finally(() => {
|
|
71
|
-
setLoadingState(false);
|
|
72
|
-
resetPendingConfigurationState(selectedObjectName);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
console.error('UpdateInstallation - onSaveUpdate missing required props');
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const onSave = (e) => {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
if (!isOtherSelected) {
|
|
82
|
-
onSaveRead();
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
onSaveWrite();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(ConfigureInstallationBase_1.ConfigureInstallationBase, { onSave: onSave, onReset: resetState, isLoading: isLoading }));
|
|
89
|
-
}
|
|
90
|
-
exports.UpdateInstallation = UpdateInstallation;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldHeader = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
function FieldHeader({ string }) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { position: "relative", paddingTop: 8, paddingBottom: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Heading, { color: "gray.500", as: "h3", fontSize: 16, fontWeight: "500", children: string }), (0, jsx_runtime_1.jsx)(react_1.Flex, { flex: "1", justifyContent: "flex-end", alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_1.Divider, { marginLeft: 2 }) })] }));
|
|
8
|
-
}
|
|
9
|
-
exports.FieldHeader = FieldHeader;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HydratedIntegrationFieldExistent, IntegrationFieldMapping } from '../../../../../services/api';
|
|
3
|
-
interface FieldMappingProps {
|
|
4
|
-
field: IntegrationFieldMapping;
|
|
5
|
-
onSelectChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
6
|
-
allFields: HydratedIntegrationFieldExistent[];
|
|
7
|
-
}
|
|
8
|
-
export declare function FieldMapping({ field, onSelectChange, allFields }: FieldMappingProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldMapping = 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 useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
|
|
8
|
-
const setFieldMapping_1 = require("./setFieldMapping");
|
|
9
|
-
function FieldMapping({ field, onSelectChange, allFields }) {
|
|
10
|
-
var _a;
|
|
11
|
-
const { configureState, selectedObjectName, setConfigureState } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
12
|
-
const [disabled, setDisabled] = (0, react_1.useState)(true);
|
|
13
|
-
const selectedRequiredMapFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.selectedFieldMappings;
|
|
14
|
-
const fieldValue = selectedRequiredMapFields === null || selectedRequiredMapFields === void 0 ? void 0 : selectedRequiredMapFields[field.mapToName];
|
|
15
|
-
(0, react_1.useEffect)(() => {
|
|
16
|
-
/* eslint no-underscore-dangle: ["error", { "allow": ["_default"] }] */
|
|
17
|
-
if (!!field._default && !fieldValue && selectedObjectName && !!configureState) {
|
|
18
|
-
// set field mapping default value if no value exists
|
|
19
|
-
(0, setFieldMapping_1.setFieldMapping)(selectedObjectName, setConfigureState, field.mapToName, field._default);
|
|
20
|
-
}
|
|
21
|
-
setDisabled(false);
|
|
22
|
-
}, [field, setConfigureState, selectedObjectName, fieldValue, configureState]);
|
|
23
|
-
const options = (0, react_1.useMemo)(() => allFields === null || allFields === void 0 ? void 0 : allFields.map((f) => (0, jsx_runtime_1.jsx)("option", { value: f.fieldName, children: f.displayName }, f.fieldName)), [allFields]);
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Stack, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "500", children: field.mapToDisplayName }), (0, jsx_runtime_1.jsx)(react_2.Text, { marginBottom: "5px", fontSize: 14, children: field === null || field === void 0 ? void 0 : field.prompt }), (0, jsx_runtime_1.jsx)(react_2.Select, { name: field.mapToName, variant: "flushed", value: fieldValue || undefined, onChange: onSelectChange, placeholder: !fieldValue ? 'Please select one' : undefined, disabled: disabled, children: options })] }, field.mapToName));
|
|
25
|
-
}
|
|
26
|
-
exports.FieldMapping = FieldMapping;
|
package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function RequiredFieldMappings(): import("react/jsx-runtime").JSX.Element | null;
|
package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequiredFieldMappings = 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 ErrorContextProvider_1 = require("../../../../../context/ErrorContextProvider");
|
|
8
|
-
const utils_1 = require("../../../utils");
|
|
9
|
-
const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
|
|
10
|
-
const FieldHeader_1 = require("../FieldHeader");
|
|
11
|
-
const FieldMapping_1 = require("./FieldMapping");
|
|
12
|
-
const setFieldMapping_1 = require("./setFieldMapping");
|
|
13
|
-
function RequiredFieldMappings() {
|
|
14
|
-
const { selectedObjectName, configureState, setConfigureState } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
15
|
-
const { isError, removeError } = (0, ErrorContextProvider_1.useErrorState)();
|
|
16
|
-
const onSelectChange = (e) => {
|
|
17
|
-
const { value, name } = e.target;
|
|
18
|
-
if (!value) {
|
|
19
|
-
// if place holder value is chosen, we don't change state
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (selectedObjectName) {
|
|
23
|
-
(0, setFieldMapping_1.setFieldMapping)(selectedObjectName, setConfigureState, name, value);
|
|
24
|
-
}
|
|
25
|
-
if (isError(ErrorContextProvider_1.ErrorBoundary.MAPPING, name)) {
|
|
26
|
-
removeError(ErrorContextProvider_1.ErrorBoundary.MAPPING, name);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const integrationFieldMappings = (0, react_1.useMemo)(() => {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
return ((_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.requiredMapFields) === null || _b === void 0 ? void 0 : _b.filter(utils_1.isIntegrationFieldMapping)) || [];
|
|
32
|
-
}, [configureState]);
|
|
33
|
-
return (integrationFieldMappings.length ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: "Map the following fields (required)" }), (0, jsx_runtime_1.jsx)(react_2.Stack, { children: integrationFieldMappings.map((field) => {
|
|
34
|
-
var _a;
|
|
35
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: isError(ErrorContextProvider_1.ErrorBoundary.MAPPING, field.mapToName), children: [(0, jsx_runtime_1.jsx)(FieldMapping_1.FieldMapping, { allFields: ((_a = configureState.read) === null || _a === void 0 ? void 0 : _a.allFields) || [], field: field, onSelectChange: onSelectChange }), (0, jsx_runtime_1.jsx)(react_2.FormErrorMessage, { children: " * required" })] }, field.mapToName));
|
|
36
|
-
}) })] }))
|
|
37
|
-
: null);
|
|
38
|
-
}
|
|
39
|
-
exports.RequiredFieldMappings = RequiredFieldMappings;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequiredFieldMappings = exports.FieldMapping = void 0;
|
|
4
|
-
const FieldMapping_1 = require("./FieldMapping");
|
|
5
|
-
Object.defineProperty(exports, "FieldMapping", { enumerable: true, get: function () { return FieldMapping_1.FieldMapping; } });
|
|
6
|
-
const RequiredFieldMappings_1 = require("./RequiredFieldMappings");
|
|
7
|
-
Object.defineProperty(exports, "RequiredFieldMappings", { enumerable: true, get: function () { return RequiredFieldMappings_1.RequiredFieldMappings; } });
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Draft } from 'immer';
|
|
2
|
-
import { ConfigureState } from '../../../types';
|
|
3
|
-
export declare function setFieldMapping(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, newValue: string): void;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setFieldMapping = void 0;
|
|
4
|
-
const utils_1 = require("../../../state/utils");
|
|
5
|
-
function setFieldMappingProducer(draft, fieldKey, newValue) {
|
|
6
|
-
var _a;
|
|
7
|
-
const draftRequiredMapFields = ((_a = draft === null || draft === void 0 ? void 0 : draft.read) === null || _a === void 0 ? void 0 : _a.selectedFieldMappings) || {};
|
|
8
|
-
draftRequiredMapFields[fieldKey] = newValue;
|
|
9
|
-
if (draft === null || draft === void 0 ? void 0 : draft.read) {
|
|
10
|
-
const savedFields = draft.read.savedConfig.requiredMapFields;
|
|
11
|
-
const updatedFields = draftRequiredMapFields;
|
|
12
|
-
const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
|
|
13
|
-
// immer exception if we try to set a value
|
|
14
|
-
// eslint-disable-next-line no-param-reassign
|
|
15
|
-
draft.read.isRequiredMapFieldsModified = isModified;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function setFieldMapping(selectedObjectName, setConfigureState, fieldKey, newValue) {
|
|
19
|
-
setConfigureState(selectedObjectName, (draft) => setFieldMappingProducer(draft, fieldKey, newValue));
|
|
20
|
-
}
|
|
21
|
-
exports.setFieldMapping = setFieldMapping;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function OptionalFields(): false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OptionalFields = 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 useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
|
|
8
|
-
const FieldHeader_1 = require("../FieldHeader");
|
|
9
|
-
const setOptionalField_1 = require("./setOptionalField");
|
|
10
|
-
function OptionalFields() {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const { appName, configureState, setConfigureState, selectedObjectName, } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
13
|
-
const selectedOptionalFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.selectedOptionalFields;
|
|
14
|
-
const onCheckboxChange = (e) => {
|
|
15
|
-
const { name, checked } = e.target;
|
|
16
|
-
if (selectedObjectName && configureState) {
|
|
17
|
-
(0, setOptionalField_1.setOptionalField)(selectedObjectName, setConfigureState, name, checked);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const readOptionalFields = (_b = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _b === void 0 ? void 0 : _b.optionalFields;
|
|
21
|
-
const onSelectAllCheckboxChange = (e) => {
|
|
22
|
-
const { checked } = e.target;
|
|
23
|
-
if (selectedObjectName && readOptionalFields) {
|
|
24
|
-
readOptionalFields.forEach((field) => {
|
|
25
|
-
if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
|
|
26
|
-
(0, setOptionalField_1.setOptionalField)(selectedObjectName, setConfigureState, field.fieldName, checked);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
const shouldRender = !!(readOptionalFields && readOptionalFields.length > 0);
|
|
32
|
-
const isAllChecked = Object.keys(selectedOptionalFields || {}).length === (readOptionalFields === null || readOptionalFields === void 0 ? void 0 : readOptionalFields.length);
|
|
33
|
-
const isIndeterminate = !isAllChecked && Object.keys(selectedOptionalFields || {}).length > 0;
|
|
34
|
-
return (shouldRender && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `${appName} reads the following optional fields` }), (0, jsx_runtime_1.jsxs)(react_1.Stack, { marginBottom: 10, maxHeight: 300, overflowY: "scroll", border: "2px solid #EFEFEF", borderRadius: 8, gap: 0, children: [((readOptionalFields === null || readOptionalFields === void 0 ? void 0 : readOptionalFields.length) || 0) >= 2 && ((0, jsx_runtime_1.jsx)(react_1.Box, { backgroundColor: "gray.50", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: "selectAll", id: "selectAll", onChange: onSelectAllCheckboxChange, isIndeterminate: isIndeterminate, isChecked: isAllChecked, children: "Select all" }) })), readOptionalFields.map((field) => {
|
|
35
|
-
if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Box, { paddingX: 4, paddingY: 2, borderBottom: "1px", borderColor: "gray.100", children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: field.fieldName, id: field.fieldName, isChecked: !!(selectedOptionalFields === null || selectedOptionalFields === void 0 ? void 0 : selectedOptionalFields[field === null || field === void 0 ? void 0 : field.fieldName]), onChange: onCheckboxChange, children: field.displayName }) }, field.fieldName));
|
|
37
|
-
}
|
|
38
|
-
return null; // fallback for customed mapped fields
|
|
39
|
-
})] })] })));
|
|
40
|
-
}
|
|
41
|
-
exports.OptionalFields = OptionalFields;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OptionalFields = void 0;
|
|
4
|
-
const OptionalFields_1 = require("./OptionalFields");
|
|
5
|
-
Object.defineProperty(exports, "OptionalFields", { enumerable: true, get: function () { return OptionalFields_1.OptionalFields; } });
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Draft } from 'immer';
|
|
2
|
-
import { ConfigureState } from '../../../types';
|
|
3
|
-
export declare function setOptionalField(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, checked: boolean): void;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setOptionalField = void 0;
|
|
4
|
-
const utils_1 = require("../../../state/utils");
|
|
5
|
-
function setOptionalFieldProducer(draft, fieldKey, checked) {
|
|
6
|
-
var _a, _b;
|
|
7
|
-
const draftSelectedOptionalFields = ((_a = draft === null || draft === void 0 ? void 0 : draft.read) === null || _a === void 0 ? void 0 : _a.selectedOptionalFields) || {};
|
|
8
|
-
draftSelectedOptionalFields[fieldKey] = checked;
|
|
9
|
-
if (!checked) {
|
|
10
|
-
delete draftSelectedOptionalFields[fieldKey];
|
|
11
|
-
}
|
|
12
|
-
if ((_b = draft.read) === null || _b === void 0 ? void 0 : _b.savedConfig.optionalFields) {
|
|
13
|
-
const savedFields = draft.read.savedConfig.optionalFields;
|
|
14
|
-
const updatedFields = draftSelectedOptionalFields;
|
|
15
|
-
const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
|
|
16
|
-
// immer exception if we try to set a value
|
|
17
|
-
// eslint-disable-next-line no-param-reassign
|
|
18
|
-
draft.read.isOptionalFieldsModified = isModified;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
console.warn('read.savedConfig.optionalFields is undefined');
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function setOptionalField(selectedObjectName, setConfigureState, fieldKey, checked) {
|
|
25
|
-
setConfigureState(selectedObjectName, (draft) => setOptionalFieldProducer(draft, fieldKey, checked));
|
|
26
|
-
}
|
|
27
|
-
exports.setOptionalField = setOptionalField;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ReadFields(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReadFields = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const FieldMappings_1 = require("./FieldMappings");
|
|
6
|
-
const OptionalFields_1 = require("./OptionalFields");
|
|
7
|
-
const RequiredFields_1 = require("./RequiredFields");
|
|
8
|
-
function ReadFields() {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RequiredFields_1.RequiredFields, {}), (0, jsx_runtime_1.jsx)(FieldMappings_1.RequiredFieldMappings, {}), (0, jsx_runtime_1.jsx)(OptionalFields_1.OptionalFields, {})] }));
|
|
10
|
-
}
|
|
11
|
-
exports.ReadFields = ReadFields;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function RequiredFields(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequiredFields = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
const ProjectContextProvider_1 = require("../../../../context/ProjectContextProvider");
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
const useSelectedConfigureState_1 = require("../useSelectedConfigureState");
|
|
9
|
-
const FieldHeader_1 = require("./FieldHeader");
|
|
10
|
-
function RequiredFields() {
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
const { configureState, selectedObjectName } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
13
|
-
const { appName } = (0, ProjectContextProvider_1.useProject)();
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `${appName} reads the following ${selectedObjectName} fields` }), (0, jsx_runtime_1.jsx)(react_1.Box, { marginBottom: "20px", display: "flex", gap: 1, children: ((_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.requiredFields) === null || _b === void 0 ? void 0 : _b.length)
|
|
15
|
-
? ((_c = configureState.read) === null || _c === void 0 ? void 0 : _c.requiredFields.map((field) => {
|
|
16
|
-
if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
|
|
17
|
-
return (0, jsx_runtime_1.jsx)(react_1.Tag, { children: field.displayName }, field.fieldName);
|
|
18
|
-
}
|
|
19
|
-
return null; // fallback for customed mapped fields
|
|
20
|
-
}))
|
|
21
|
-
: 'There are no required fields.' })] }));
|
|
22
|
-
}
|
|
23
|
-
exports.RequiredFields = RequiredFields;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function WriteFields(): false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WriteFields = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
|
|
7
|
-
const FieldHeader_1 = require("../FieldHeader");
|
|
8
|
-
const setNonConfigurableWriteField_1 = require("./setNonConfigurableWriteField");
|
|
9
|
-
function WriteFields() {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
11
|
-
const { appName, selectedObjectName, configureState, setConfigureState, } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
12
|
-
const selectedWriteFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _a === void 0 ? void 0 : _a.selectedNonConfigurableWriteFields;
|
|
13
|
-
const writeObjects = (_b = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _b === void 0 ? void 0 : _b.writeObjects;
|
|
14
|
-
const onCheckboxChange = (e) => {
|
|
15
|
-
const { name, checked } = e.target;
|
|
16
|
-
if (selectedObjectName && configureState) {
|
|
17
|
-
(0, setNonConfigurableWriteField_1.setNonConfigurableWriteField)(selectedObjectName, setConfigureState, name, checked);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const onSelectAllCheckboxChange = (e) => {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
const { checked } = e.target;
|
|
23
|
-
if (selectedObjectName && configureState) {
|
|
24
|
-
(_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _a === void 0 ? void 0 : _a.writeObjects) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
|
|
25
|
-
(0, setNonConfigurableWriteField_1.setNonConfigurableWriteField)(selectedObjectName, setConfigureState, field.objectName, checked);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const shouldRender = !!(writeObjects);
|
|
30
|
-
const isAllChecked = Object.keys(selectedWriteFields || {}).length === ((_d = (_c = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _c === void 0 ? void 0 : _c.writeObjects) === null || _d === void 0 ? void 0 : _d.length);
|
|
31
|
-
const isIndeterminate = !isAllChecked && Object.keys(selectedWriteFields || {}).length > 0;
|
|
32
|
-
return (shouldRender && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `Allow ${appName} to write to these object` }), (0, jsx_runtime_1.jsxs)(react_1.Stack, { marginBottom: 10, maxHeight: 300, overflowY: "scroll", border: "2px solid #EFEFEF", borderRadius: 8, gap: 0, children: [((writeObjects === null || writeObjects === void 0 ? void 0 : writeObjects.length) || 0) >= 2 && ((0, jsx_runtime_1.jsx)(react_1.Box, { backgroundColor: "gray.50", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: "selectAll", id: "selectAll", onChange: onSelectAllCheckboxChange, isIndeterminate: isIndeterminate, isChecked: isAllChecked, children: "Select all" }) })), writeObjects.map((field) => ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", borderBottom: "1px", borderColor: "gray.100", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: field.objectName, id: field.objectName, onChange: onCheckboxChange, isChecked: !!(selectedWriteFields === null || selectedWriteFields === void 0 ? void 0 : selectedWriteFields[field.objectName]), children: field.displayName }) }, field.objectName)))] })] })));
|
|
33
|
-
}
|
|
34
|
-
exports.WriteFields = WriteFields;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WriteFields = void 0;
|
|
4
|
-
const WriteFields_1 = require("./WriteFields");
|
|
5
|
-
Object.defineProperty(exports, "WriteFields", { enumerable: true, get: function () { return WriteFields_1.WriteFields; } });
|
package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Draft } from 'immer';
|
|
2
|
-
import { ConfigureState } from '../../../types';
|
|
3
|
-
export declare function setNonConfigurableWriteField(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, checked: boolean): void;
|
package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setNonConfigurableWriteField = void 0;
|
|
4
|
-
const utils_1 = require("../../../state/utils");
|
|
5
|
-
function setNonConfigurableWriteFieldProducer(draft, fieldKey, checked) {
|
|
6
|
-
var _a, _b, _c;
|
|
7
|
-
if (((_a = draft === null || draft === void 0 ? void 0 : draft.write) === null || _a === void 0 ? void 0 : _a.selectedNonConfigurableWriteFields) === null) {
|
|
8
|
-
// immer syntax to set a value
|
|
9
|
-
// eslint-disable-next-line no-param-reassign
|
|
10
|
-
draft.write.selectedNonConfigurableWriteFields = {};
|
|
11
|
-
}
|
|
12
|
-
if (draft === null || draft === void 0 ? void 0 : draft.write) {
|
|
13
|
-
const draftSelectedWriteFields = draft.write.selectedNonConfigurableWriteFields;
|
|
14
|
-
draftSelectedWriteFields[fieldKey] = checked;
|
|
15
|
-
if (!checked) {
|
|
16
|
-
delete draftSelectedWriteFields[fieldKey];
|
|
17
|
-
}
|
|
18
|
-
// check is modified
|
|
19
|
-
if ((_c = (_b = draft === null || draft === void 0 ? void 0 : draft.write) === null || _b === void 0 ? void 0 : _b.savedConfig) === null || _c === void 0 ? void 0 : _c.selectedNonConfigurableWriteFields) {
|
|
20
|
-
const savedFields = draft.write.savedConfig.selectedNonConfigurableWriteFields;
|
|
21
|
-
const updatedFields = draftSelectedWriteFields;
|
|
22
|
-
const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
|
|
23
|
-
// immer syntax to set a value
|
|
24
|
-
// eslint-disable-next-line no-param-reassign
|
|
25
|
-
draft.write.isWriteModified = isModified;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function setNonConfigurableWriteField(selectedObjectName, setConfigureState, fieldKey, checked) {
|
|
30
|
-
setConfigureState(selectedObjectName, (draft) => { setNonConfigurableWriteFieldProducer(draft, fieldKey, checked); });
|
|
31
|
-
}
|
|
32
|
-
exports.setNonConfigurableWriteField = setNonConfigurableWriteField;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* state hook for installation flows (Create/Update)
|
|
3
|
-
* */
|
|
4
|
-
export declare const useMutateInstallation: () => {
|
|
5
|
-
integrationId: string;
|
|
6
|
-
groupRef: string;
|
|
7
|
-
consumerRef: string;
|
|
8
|
-
setInstallation: (installationObj: import("../../../services/api").Installation) => void;
|
|
9
|
-
hydratedRevision: import("../../../services/api").HydratedRevision | null;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
selectedObjectName: string | undefined;
|
|
12
|
-
selectedConnection: import("../../../services/api").Connection | null;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
resetBoundary: (boundary: import("../../../context/ErrorContextProvider").ErrorBoundary) => void;
|
|
16
|
-
setErrors: (boundary: import("../../../context/ErrorContextProvider").ErrorBoundary, keys: string[]) => void;
|
|
17
|
-
resetConfigureState: (objectName: string, configureState: import("../types").ConfigureState) => void;
|
|
18
|
-
objectConfigurationsState: import("../types").ObjectConfigurationsState;
|
|
19
|
-
resetPendingConfigurationState: (objectName: string) => void;
|
|
20
|
-
configureState: import("../types").ConfigureState;
|
|
21
|
-
onInstallSuccess: ((installationId: string, config: import("../../../services/api").Config) => void) | undefined;
|
|
22
|
-
onUpdateSuccess: ((installationId: string, config: import("../../../services/api").Config) => void) | undefined;
|
|
23
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMutateInstallation = void 0;
|
|
4
|
-
const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
|
|
5
|
-
const ConnectionsContextProvider_1 = require("../../../context/ConnectionsContextProvider");
|
|
6
|
-
const ErrorContextProvider_1 = require("../../../context/ErrorContextProvider");
|
|
7
|
-
const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
|
|
8
|
-
const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
|
|
9
|
-
const ObjectManagementNav_1 = require("../nav/ObjectManagementNav");
|
|
10
|
-
const ConfigurationStateProvider_1 = require("../state/ConfigurationStateProvider");
|
|
11
|
-
const HydratedRevisionContext_1 = require("../state/HydratedRevisionContext");
|
|
12
|
-
const utils_1 = require("../state/utils");
|
|
13
|
-
/**
|
|
14
|
-
* state hook for installation flows (Create/Update)
|
|
15
|
-
* */
|
|
16
|
-
const useMutateInstallation = () => {
|
|
17
|
-
const { integrationId, groupRef, consumerRef, setInstallation, onInstallSuccess, onUpdateSuccess, } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
|
|
18
|
-
const { hydratedRevision, loading } = (0, HydratedRevisionContext_1.useHydratedRevision)();
|
|
19
|
-
const { selectedObjectName } = (0, ObjectManagementNav_1.useSelectedObjectName)();
|
|
20
|
-
const { selectedConnection } = (0, ConnectionsContextProvider_1.useConnections)();
|
|
21
|
-
const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
|
|
22
|
-
const { projectId } = (0, ProjectContextProvider_1.useProject)();
|
|
23
|
-
const { resetBoundary, setErrors } = (0, ErrorContextProvider_1.useErrorState)();
|
|
24
|
-
const { resetConfigureState, objectConfigurationsState, resetPendingConfigurationState, } = (0, ConfigurationStateProvider_1.useObjectsConfigureState)();
|
|
25
|
-
const configureState = (0, utils_1.getConfigureState)(selectedObjectName || '', objectConfigurationsState);
|
|
26
|
-
return {
|
|
27
|
-
integrationId,
|
|
28
|
-
groupRef,
|
|
29
|
-
consumerRef,
|
|
30
|
-
setInstallation,
|
|
31
|
-
hydratedRevision,
|
|
32
|
-
loading,
|
|
33
|
-
selectedObjectName,
|
|
34
|
-
selectedConnection,
|
|
35
|
-
apiKey,
|
|
36
|
-
projectId,
|
|
37
|
-
resetBoundary,
|
|
38
|
-
setErrors,
|
|
39
|
-
resetConfigureState,
|
|
40
|
-
objectConfigurationsState,
|
|
41
|
-
resetPendingConfigurationState,
|
|
42
|
-
configureState,
|
|
43
|
-
onInstallSuccess,
|
|
44
|
-
onUpdateSuccess,
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
exports.useMutateInstallation = useMutateInstallation;
|