@integry/sdk 4.7.39 → 4.7.41

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 (267) hide show
  1. package/dist/esm/index.csm.js +1 -1
  2. package/dist/umd/index.umd.js +1 -1
  3. package/package.json +6 -1
  4. package/.eslintignore +0 -1
  5. package/.vscode/launch.json +0 -17
  6. package/CHANGELOG_INTERNAL.md +0 -134
  7. package/README_INTERNAL.md +0 -176
  8. package/THIRD_PARTY_LICENSES +0 -525
  9. package/generateTests.js +0 -80
  10. package/jest.config.cjs +0 -10
  11. package/src/components/AddTagButton/index.ts +0 -23
  12. package/src/components/BasicSelect/index.ts +0 -123
  13. package/src/components/BasicSelect/styles.module.scss +0 -44
  14. package/src/components/Button/index.ts +0 -97
  15. package/src/components/Button/styles.module.scss +0 -152
  16. package/src/components/CheckboxGroup/Checkbox.ts +0 -104
  17. package/src/components/CheckboxGroup/index.ts +0 -190
  18. package/src/components/CheckboxGroup/styles.module.scss +0 -63
  19. package/src/components/CollapsedMenu/index.ts +0 -104
  20. package/src/components/CollapsedMenu/styles.module.scss +0 -46
  21. package/src/components/ConfigureFieldWrapper/index.ts +0 -85
  22. package/src/components/ConfigureFieldWrapper/styles.module.scss +0 -57
  23. package/src/components/EditableText/index.ts +0 -121
  24. package/src/components/EditableText/styles.module.scss +0 -38
  25. package/src/components/EditableTextArea/index.ts +0 -143
  26. package/src/components/EditableTextArea/styles.module.scss +0 -91
  27. package/src/components/ErrorMessage/index.ts +0 -16
  28. package/src/components/ErrorMessage/styles.module.scss +0 -19
  29. package/src/components/ErrorPage/index.ts +0 -42
  30. package/src/components/ErrorPage/styles.module.scss +0 -26
  31. package/src/components/Footer/index.ts +0 -41
  32. package/src/components/Footer/styles.module.scss +0 -40
  33. package/src/components/HTMLContent/index.tsx +0 -205
  34. package/src/components/HTMLContent/styles.module.scss +0 -3
  35. package/src/components/InfoBox/index.ts +0 -48
  36. package/src/components/InfoBox/styles.module.scss +0 -21
  37. package/src/components/Input/BaseInput/index.ts +0 -170
  38. package/src/components/Input/BaseInput/styles.module.scss +0 -95
  39. package/src/components/Input/DateInput/index.ts +0 -103
  40. package/src/components/Input/DateInput/styles.module.scss +0 -50
  41. package/src/components/Input/Input/index.ts +0 -225
  42. package/src/components/Input/Input/styles.module.scss +0 -16
  43. package/src/components/Input/PasswordInput/index.ts +0 -164
  44. package/src/components/Input/PasswordInput/styles.module.scss +0 -37
  45. package/src/components/Input/index.ts +0 -7
  46. package/src/components/Label/index.ts +0 -61
  47. package/src/components/Label/styles.module.scss +0 -41
  48. package/src/components/LargeLoader/index.ts +0 -25
  49. package/src/components/LargeLoader/styles.module.scss +0 -16
  50. package/src/components/Listbox/ListBoxItem.ts +0 -57
  51. package/src/components/Listbox/index.ts +0 -488
  52. package/src/components/Listbox/styles.module.scss +0 -197
  53. package/src/components/Loader/index.ts +0 -25
  54. package/src/components/Loader/styles.module.scss +0 -16
  55. package/src/components/MediaGallery/MediaGalleryModal.ts +0 -82
  56. package/src/components/MediaGallery/MediaSlider.ts +0 -76
  57. package/src/components/MediaGallery/index.ts +0 -92
  58. package/src/components/MediaGallery/styles.module.scss +0 -156
  59. package/src/components/MediaUpload/index.ts +0 -233
  60. package/src/components/MediaUpload/styles.module.scss +0 -118
  61. package/src/components/Modal/index.ts +0 -87
  62. package/src/components/Modal/styles.module.scss +0 -441
  63. package/src/components/MultipurposeField/Dropdown/ListBoxItem.tsx +0 -59
  64. package/src/components/MultipurposeField/Dropdown/index.tsx +0 -1202
  65. package/src/components/MultipurposeField/Dropdown/styles.module.scss +0 -215
  66. package/src/components/MultipurposeField/TagMenu/index.ts +0 -536
  67. package/src/components/MultipurposeField/TagMenu/styles.module.scss +0 -175
  68. package/src/components/MultipurposeField/TagOptions/index.tsx +0 -83
  69. package/src/components/MultipurposeField/TagOptions/styles.module.scss +0 -95
  70. package/src/components/MultipurposeField/index.tsx +0 -944
  71. package/src/components/MultipurposeField/styles.module.scss +0 -77
  72. package/src/components/NewModal/index.ts +0 -69
  73. package/src/components/NewModal/styles.module.scss +0 -70
  74. package/src/components/OverflowTooltip/index.tsx +0 -59
  75. package/src/components/PopUp/ConfirmationPopUp/index.ts +0 -58
  76. package/src/components/PopUp/ConfirmationPopUp/styles.module.scss +0 -49
  77. package/src/components/PopUp/SuccessPopUp/index.ts +0 -62
  78. package/src/components/PopUp/SuccessPopUp/styles.module.scss +0 -38
  79. package/src/components/RadioGroup/Radio.ts +0 -128
  80. package/src/components/RadioGroup/index.ts +0 -169
  81. package/src/components/RadioGroup/styles.module.scss +0 -81
  82. package/src/components/Search/index.ts +0 -69
  83. package/src/components/Search/styles.module.scss +0 -149
  84. package/src/components/TabBar/Tab.ts +0 -33
  85. package/src/components/TabBar/index.ts +0 -64
  86. package/src/components/TabBar/styles.module.scss +0 -43
  87. package/src/components/Tag/index.ts +0 -29
  88. package/src/components/Tag/styles.module.scss +0 -57
  89. package/src/components/TagsMenu/index.ts +0 -1697
  90. package/src/components/TagsMenu/styles.module.scss +0 -350
  91. package/src/components/TestComponent/index.ts +0 -71
  92. package/src/components/TestComponent/styles.module.scss +0 -152
  93. package/src/components/TextArea/index.ts +0 -172
  94. package/src/components/TextArea/styles.module.scss +0 -72
  95. package/src/components/TextContent/index.tsx +0 -128
  96. package/src/components/TextContent/styles.module.scss +0 -6
  97. package/src/components/ThreeDotLoader/index.ts +0 -39
  98. package/src/components/ThreeDotLoader/styles.module.scss +0 -41
  99. package/src/components/TimeInput/index.ts +0 -129
  100. package/src/components/TimeInput/styles.module.scss +0 -16
  101. package/src/components/Toggle/index.ts +0 -34
  102. package/src/components/Toggle/styles.module.scss +0 -56
  103. package/src/components/Toggle-v2/index.ts +0 -40
  104. package/src/components/Toggle-v2/styles.module.scss +0 -86
  105. package/src/components/Tooltip/index.ts +0 -271
  106. package/src/components/Tooltip/styles.module.scss +0 -105
  107. package/src/components/form/FunctionField/index.ts +0 -816
  108. package/src/components/form/FunctionField/styles.module.scss +0 -478
  109. package/src/components/form/ObjectField/__snapshots__/index.ts.test.tsx.snap +0 -3
  110. package/src/components/form/ObjectField/index.ts +0 -593
  111. package/src/components/form/ObjectField/index.ts.test.tsx +0 -213
  112. package/src/components/form/ObjectField/styles.module.scss +0 -103
  113. package/src/components/form/index.ts +0 -4
  114. package/src/contexts/AppContext.ts +0 -12
  115. package/src/declaration.d.ts +0 -7
  116. package/src/extensions/HMAC.ts +0 -25
  117. package/src/extensions/IntegryAPIError.ts +0 -19
  118. package/src/features/common/AccountDropdown/index.ts +0 -291
  119. package/src/features/common/AccountDropdown/styles.module.scss +0 -19
  120. package/src/features/common/ActionForm/index.ts +0 -2602
  121. package/src/features/common/ActionForm/styles.module.scss +0 -35
  122. package/src/features/common/AppCard/index.ts +0 -207
  123. package/src/features/common/AppCard/styles.module.scss +0 -117
  124. package/src/features/common/AppCardCompact/index.ts +0 -189
  125. package/src/features/common/AppCardCompact/styles.module.scss +0 -141
  126. package/src/features/common/AuthSelector/index.ts +0 -537
  127. package/src/features/common/AuthSelector/styles.module.scss +0 -161
  128. package/src/features/common/AuthSelectorCompact/index.ts +0 -706
  129. package/src/features/common/AuthSelectorCompact/styles.module.scss +0 -219
  130. package/src/features/common/AuthSelectorDropdown/index.ts +0 -704
  131. package/src/features/common/AuthSelectorDropdown/styles.module.scss +0 -361
  132. package/src/features/common/AuthSelectorV2/index.ts +0 -336
  133. package/src/features/common/AuthSelectorV2/styles.module.scss +0 -235
  134. package/src/features/common/DynamicField/index.ts +0 -402
  135. package/src/features/common/DynamicField/styles.module.scss +0 -266
  136. package/src/features/common/DynamicTypedField/index.ts +0 -504
  137. package/src/features/common/DynamicTypedField/styles.module.scss +0 -135
  138. package/src/features/common/FunctionForm/index.ts +0 -1095
  139. package/src/features/common/FunctionForm/styles.module.scss +0 -225
  140. package/src/features/common/MappingUI/index.ts +0 -649
  141. package/src/features/common/MappingUI/styles.module.scss +0 -121
  142. package/src/features/common/MarketplaceAppCard/index.ts +0 -279
  143. package/src/features/common/MarketplaceAppCard/styles.module.scss +0 -231
  144. package/src/features/common/MarketplaceAppCardCompact/index.ts +0 -283
  145. package/src/features/common/MarketplaceAppCardCompact/styles.module.scss +0 -255
  146. package/src/features/common/NewMappingUI/index.ts +0 -515
  147. package/src/features/common/NewMappingUI/styles.module.scss +0 -113
  148. package/src/features/common/RequestAppWidget/RequestAppModal/index.ts +0 -67
  149. package/src/features/common/RequestAppWidget/RequestAppModal/styles.module.scss +0 -23
  150. package/src/features/common/RequestAppWidget/index.ts +0 -48
  151. package/src/features/common/RequestAppWidget/request-app-form.ts +0 -89
  152. package/src/features/common/RequestAppWidget/styles.module.scss +0 -43
  153. package/src/features/common/SectionField/index.ts +0 -272
  154. package/src/features/common/SectionField/styles.module.scss +0 -67
  155. package/src/features/common/Step/index.ts +0 -827
  156. package/src/features/common/Step/styles.module.scss +0 -12
  157. package/src/features/common/StepNavigation/CollapsedSteps.ts +0 -131
  158. package/src/features/common/StepNavigation/NavItem.ts +0 -111
  159. package/src/features/common/StepNavigation/index.ts +0 -261
  160. package/src/features/common/StepNavigation/styles.module.scss +0 -117
  161. package/src/features/common/Steps/index.ts +0 -1140
  162. package/src/features/common/Steps/styles.module.scss +0 -314
  163. package/src/features/containers/AppFlowContainer/AppFlowListing/compactStyles.module.scss +0 -404
  164. package/src/features/containers/AppFlowContainer/AppFlowListing/flow-instance.tsx +0 -367
  165. package/src/features/containers/AppFlowContainer/AppFlowListing/flowCard.test.tsx +0 -58
  166. package/src/features/containers/AppFlowContainer/AppFlowListing/flowCard.tsx +0 -208
  167. package/src/features/containers/AppFlowContainer/AppFlowListing/flowCardCompact.test.tsx +0 -49
  168. package/src/features/containers/AppFlowContainer/AppFlowListing/flowCardCompact.tsx +0 -421
  169. package/src/features/containers/AppFlowContainer/AppFlowListing/flowInstanceCompact.tsx +0 -577
  170. package/src/features/containers/AppFlowContainer/AppFlowListing/index.tsx +0 -83
  171. package/src/features/containers/AppFlowContainer/AppFlowListing/styles.module.scss +0 -233
  172. package/src/features/containers/AppFlowContainer/AppFlowWrap/app-page-loader.tsx +0 -45
  173. package/src/features/containers/AppFlowContainer/AppFlowWrap/index.tsx +0 -1085
  174. package/src/features/containers/AppFlowContainer/AppFlowWrap/styles.module.scss +0 -465
  175. package/src/features/containers/AppFlowContainer/Authentication/index.ts +0 -610
  176. package/src/features/containers/AppFlowContainer/Authentication/styles.module.scss +0 -468
  177. package/src/features/containers/AppFlowContainer/index.ts +0 -114
  178. package/src/features/containers/AppPageContainer/AppPage/index.tsx +0 -262
  179. package/src/features/containers/AppPageContainer/AppPage/styles.module.scss +0 -120
  180. package/src/features/containers/AppPageContainer/IntegrationCard/index.ts +0 -165
  181. package/src/features/containers/AppPageContainer/IntegrationCard/styles.module.scss +0 -81
  182. package/src/features/containers/AppPageContainer/index.tsx +0 -93
  183. package/src/features/containers/AppPageContainer/styles.module.scss +0 -0
  184. package/src/features/containers/AppsForFlows/index.ts +0 -161
  185. package/src/features/containers/AppsForFlows/styles.module.scss +0 -280
  186. package/src/features/containers/AppsForFlowsCompact/index.ts +0 -161
  187. package/src/features/containers/AppsForFlowsCompact/styles.module.scss +0 -279
  188. package/src/features/containers/AuthSetupContainer/AppSelection.ts +0 -73
  189. package/src/features/containers/AuthSetupContainer/AuthTypeSelection.ts +0 -67
  190. package/src/features/containers/AuthSetupContainer/Footer.ts +0 -32
  191. package/src/features/containers/AuthSetupContainer/Header.ts +0 -39
  192. package/src/features/containers/AuthSetupContainer/PostAdditionPopup.ts +0 -27
  193. package/src/features/containers/AuthSetupContainer/index.ts +0 -349
  194. package/src/features/containers/AuthSetupContainer/styles.module.scss +0 -229
  195. package/src/features/containers/FlowSetupContainer/index.ts +0 -391
  196. package/src/features/containers/FlowSetupContainer/styles.module.scss +0 -18
  197. package/src/features/containers/MarkeplaceApps/index.ts +0 -583
  198. package/src/features/containers/MarkeplaceApps/styles.module.scss +0 -558
  199. package/src/features/containers/MarketplaceAppsCompact/index.ts +0 -585
  200. package/src/features/containers/MarketplaceAppsCompact/styles.module.scss +0 -563
  201. package/src/features/containers/MarketplaceAppsContainer/index.ts +0 -91
  202. package/src/features/containers/MarketplaceContainer/AppCard/index.ts +0 -91
  203. package/src/features/containers/MarketplaceContainer/AppCard/styles.module.scss +0 -66
  204. package/src/features/containers/MarketplaceContainer/AppListing/index.ts +0 -34
  205. package/src/features/containers/MarketplaceContainer/AppListing/styles.module.scss +0 -10
  206. package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/index.ts +0 -132
  207. package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/styles.module.scss +0 -117
  208. package/src/features/containers/MarketplaceContainer/index.ts +0 -242
  209. package/src/features/containers/MarketplaceContainer/styles.module.scss +0 -84
  210. package/src/features/containers/SDKContainer/index.ts +0 -817
  211. package/src/features/containers/SDKContainer/styles.module.scss +0 -266
  212. package/src/features/containers/SDKDebugContainer/index.ts +0 -137
  213. package/src/features/containers/SDKDebugContainer/styles.module.scss +0 -37
  214. package/src/features/containers/SDKFailedContainer/index.ts +0 -117
  215. package/src/features/containers/SDKFailedContainer/styles.module.scss +0 -57
  216. package/src/features/integrations/IntegrationRow/Icons.ts +0 -77
  217. package/src/features/integrations/IntegrationRow/index.ts +0 -129
  218. package/src/features/integrations/IntegrationRow/styles.module.scss +0 -62
  219. package/src/features/integrations/IntegrationsHeader/index.ts +0 -34
  220. package/src/features/integrations/IntegrationsHeader/styles.module.scss +0 -47
  221. package/src/features/integrations/IntegrationsList/index.ts +0 -252
  222. package/src/features/integrations/IntegrationsList/styles.module.scss +0 -67
  223. package/src/features/templates/Template/index.ts +0 -295
  224. package/src/features/templates/Template/styles.module.scss +0 -226
  225. package/src/features/templates/TemplatesView/index.ts +0 -368
  226. package/src/features/templates/TemplatesView/styles.module.scss +0 -71
  227. package/src/features/templates/TemplatesViewCompact/index.ts +0 -364
  228. package/src/features/templates/TemplatesViewCompact/styles.module.scss +0 -141
  229. package/src/hooks/useAutosizeTextArea.ts +0 -22
  230. package/src/hooks/useCustomRef.ts +0 -13
  231. package/src/hooks/useDebounce.ts +0 -17
  232. package/src/hooks/useElementResize.ts +0 -40
  233. package/src/hooks/useEventListener.ts +0 -42
  234. package/src/hooks/useHover.ts +0 -40
  235. package/src/hooks/useOnClickOutside.ts +0 -32
  236. package/src/index.ts +0 -2244
  237. package/src/index.umd.ts +0 -13
  238. package/src/interfaces/index.ts +0 -938
  239. package/src/modules/api/index.ts +0 -1325
  240. package/src/modules/api/responseHandler.ts +0 -38
  241. package/src/modules/event-emitter/index.ts +0 -72
  242. package/src/modules/event-emitter/runners/abstract.ts +0 -21
  243. package/src/modules/event-emitter/runners/default.ts +0 -11
  244. package/src/modules/event-emitter/runners/ntimes.ts +0 -28
  245. package/src/modules/event-emitter/types.ts +0 -34
  246. package/src/store/actionFunctions.ts +0 -1578
  247. package/src/store/index.ts +0 -17
  248. package/src/store/initialState.ts +0 -58
  249. package/src/types/index.ts +0 -320
  250. package/src/types/preact-compat.d.ts +0 -4
  251. package/src/types/store.ts +0 -366
  252. package/src/types/utils.ts +0 -19
  253. package/src/utils/ActivityOutputUtils.ts +0 -176
  254. package/src/utils/common.ts +0 -20
  255. package/src/utils/copyToClipboard.ts +0 -24
  256. package/src/utils/datetime.ts +0 -101
  257. package/src/utils/getUrlParam.ts +0 -11
  258. package/src/utils/isAuthMessage.ts +0 -16
  259. package/src/utils/isBrowser.ts +0 -1
  260. package/src/utils/jsonEncodeDecode.ts +0 -15
  261. package/src/utils/objectUtils.ts +0 -117
  262. package/src/utils/popup.ts +0 -30
  263. package/src/utils/searchJson.ts +0 -51
  264. package/src/utils/stepUtils.ts +0 -45
  265. package/src/utils/truncate.ts +0 -6
  266. package/test/setup.ts +0 -1
  267. package/vitest.config.ts +0 -16
@@ -1,817 +0,0 @@
1
- /* eslint-disable no-nested-ternary */
2
- import { Modal } from '@/components/Modal';
3
- import AppContext from '@/contexts/AppContext';
4
- import TemplatesView from '@/features/templates/TemplatesView';
5
- import TemplatesViewCompact from '@/features/templates/TemplatesViewCompact';
6
- import { Template, TemplateStep, UserConfig } from '@/interfaces';
7
- import { actionFunctions } from '@/store';
8
- import {
9
- TemplateFormRenderModes,
10
- TemplateListingRenderModes,
11
- ViewStyles,
12
- } from '@/types';
13
- import { StoreType } from '@/types/store';
14
- import { html } from 'htm/preact';
15
- import { useContext, useEffect, useRef } from 'preact/hooks';
16
- import { connect } from 'unistore/preact';
17
-
18
- import Authentication from '@/features/containers/AppFlowContainer/Authentication';
19
- import { AuthData, isAuthMessage } from '@/utils/isAuthMessage';
20
- import FlowSetupContainer from '../FlowSetupContainer';
21
- import styles from './styles.module.scss';
22
-
23
- interface ContainerProps extends StoreType {
24
- deploymentId: string;
25
- userConfig?: UserConfig;
26
- layout: TemplateListingRenderModes;
27
- renderMode: TemplateFormRenderModes;
28
- renderFlowsMode?: TemplateFormRenderModes;
29
- flowId?: number;
30
- integrationId?: number;
31
- params?: Record<string, string>;
32
- }
33
-
34
- const SDKContainer = (props: ContainerProps) => {
35
- const context = useContext(AppContext);
36
- const { flowId, integrationId } = props;
37
- const defaultFlowId = flowId || 0;
38
- const defautlIntegrationId = integrationId || 0;
39
- const flowParams = props.params || {};
40
-
41
- const templateListComponent = useRef<typeof TemplatesView | undefined>(
42
- props.genericData.viewStyle === ViewStyles.COMPACT
43
- ? TemplatesViewCompact
44
- : TemplatesView,
45
- );
46
-
47
- const onTemplateClick = (template: Template) => {
48
- const { renderMode } = props;
49
- if (renderMode === TemplateFormRenderModes.DETACHED) {
50
- context?.eventEmitter.emit('should-load-flow', {
51
- templateId: template.id,
52
- flowId: template.id,
53
- });
54
- } else {
55
- props.setStoreState({
56
- showSetupModal: renderMode === TemplateFormRenderModes.MODAL,
57
- showSetupInline: renderMode === TemplateFormRenderModes.INLINE,
58
- genericData: {
59
- ...props.genericData,
60
- templateId: template.id,
61
- name: template.name,
62
- },
63
- });
64
- }
65
-
66
- // switch (renderMode) {
67
- // case TemplateFormRenderModes.MODAL: {
68
- // props.setStoreState({
69
- // showSetupModal: true,
70
- // genericData: {
71
- // ...props.genericData,
72
- // brandingApp: null,
73
- // templateId,
74
- // },
75
- // });
76
- // break;
77
- // }
78
- // case TemplateFormRenderModes.INLINE: {
79
- // props.setStoreState({
80
- // showSetupInline: true,
81
- // genericData: {
82
- // ...props.genericData,
83
- // brandingApp: null,
84
- // templateId,
85
- // },
86
- // });
87
- // break;
88
- // }
89
- // case TemplateFormRenderModes.DETACHED: {
90
- // context?.eventEmitter.emit('should-load-flow', {
91
- // templateId,
92
- // flowId: templateId,
93
- // });
94
- // break;
95
- // }
96
- // default:
97
- // break;
98
- // }
99
- };
100
-
101
- const getContainerName = () => props.genericData.name;
102
- const getSelectedStep = () => {
103
- const { stepState, stepMapping } = props;
104
- const { currentStep, stepIndex, steps } = stepState;
105
- let selectedStep: {
106
- step: TemplateStep;
107
- selectedAuthId: number | null;
108
- } | null = null;
109
- let shouldShowLastStep = false;
110
- let shouldShowBackButton = false;
111
- let isStepValid = false;
112
- let showStepValidation = false;
113
- if (stepIndex > -1 && currentStep?.type !== 'CONFIRMATION') {
114
- selectedStep = stepMapping[Number(currentStep?.stepId)];
115
- shouldShowLastStep = false;
116
- shouldShowBackButton = stepState.stepIndex > 0;
117
- isStepValid = currentStep?.isValid ?? false;
118
- showStepValidation = stepState.showValidation;
119
- } else if (
120
- currentStep?.type === 'CONFIRMATION' &&
121
- stepIndex === steps.length
122
- ) {
123
- shouldShowBackButton = true;
124
- shouldShowLastStep = true;
125
- }
126
- if (
127
- (props.genericData.isTestIntegration &&
128
- Number(selectedStep?.step.id) ===
129
- Number(Object.keys(stepMapping)[0])) ||
130
- props.genericData.customFlowSetupRender
131
- ) {
132
- shouldShowBackButton = false;
133
- }
134
- return {
135
- selectedStep,
136
- isStepValid,
137
- showStepValidation,
138
- shouldShowBackButton,
139
- shouldShowLastStep,
140
- };
141
- };
142
-
143
- const getSelectedStepApp = (step: any) => {
144
- if (step && step.authorization_type) {
145
- return {
146
- id: step.authorization_type.app.id,
147
- name: step.authorization_type.app.name,
148
- icon_url: step.authorization_type.app.icon_url,
149
- authorization_type: step.authorization_type,
150
- };
151
- }
152
- return {};
153
- };
154
-
155
- const getStepAuthorizations = (authorizations: any) => {
156
- const updateAuthorizations: any = [];
157
- authorizations.forEach((auth: any) => {
158
- updateAuthorizations.push({
159
- id: auth.authorizationId,
160
- user_identity: auth.userIdentity,
161
- access_token: auth.accessToken,
162
- });
163
- });
164
- return updateAuthorizations;
165
- };
166
-
167
- const handleAuthSelected = (
168
- authId: number,
169
- stepId: number,
170
- isVerified: boolean,
171
- override: boolean,
172
- ) => {
173
- const { stepState } = props;
174
- const { currentStep } = stepState;
175
- const dependentSteps = props.stepMapping[stepId].step.template_fields
176
- .filter((el) => el.activity_field && el.activity_field.is_dynamic)
177
- .map((el) => el.id);
178
- // reset all dynamic steps if auth changes
179
-
180
- if (props.stepMapping[stepId].selectedAuthId !== authId) {
181
- props.setStepAuthorization(
182
- stepId,
183
- authId,
184
- isVerified,
185
- dependentSteps,
186
- override,
187
- );
188
- }
189
-
190
- const isMainApp =
191
- props.stepMapping[stepId].step.activity.app.id ===
192
- (props.genericData.app_id || -1);
193
- // if (
194
- // props.skipAuth &&
195
- // currentStep?.type === 'AUTH' &&
196
- // isMainApp &&
197
- // isVerified
198
- // ) {
199
- // this.props.gotoNextStep();
200
- // }
201
- };
202
-
203
- const deleteAuth = (authId: number, stepId: number, appId: number) => {
204
- const deletedAuth = props.stepMapping[stepId].authorizations.filter(
205
- (auth: any) => auth.authorizationId === authId,
206
- )[0];
207
- const authorizationId = Number(deletedAuth.authorizationId);
208
-
209
- props.toggleDeleteAuthorizationFlag({
210
- stepId,
211
- authId: deletedAuth.authorizationId,
212
- isDeleting: true,
213
- error: '',
214
- });
215
-
216
- context?.eventEmitter.emit('did-begin-remove-authorization', {
217
- authorizationId: Number(deletedAuth.authorizationId),
218
- });
219
- props.removeAuthorization({
220
- stepId,
221
- authId: deletedAuth.authorizationId,
222
- });
223
- context?.eventEmitter.emit('did-remove-authorization', {
224
- authorizationId,
225
- appId,
226
- });
227
- };
228
-
229
- const onAuthResponseReceived = (
230
- messageEvent: MessageEvent<AuthData>,
231
- stepId: number,
232
- ) => {
233
- if (isAuthMessage(messageEvent) && messageEvent.data.activity_name) {
234
- if (stepId) {
235
- const authId = Number(messageEvent.data.authorization_id);
236
- if (!messageEvent.data.already_exists) {
237
- props.addAuthorization({
238
- stepId,
239
- authData: {
240
- authorizationId: messageEvent.data.authorization_id,
241
- userIdentity: messageEvent.data.user_identity,
242
- disableLink: '',
243
- authType: '',
244
- isVerified: false,
245
- didFetchStatus: false,
246
- isVerifying: false,
247
- isDeleting: false,
248
- error: '',
249
- },
250
- });
251
- } else {
252
- props.setStepAuthId({
253
- stepId,
254
- authId,
255
- });
256
- }
257
- // context?.eventEmitter.emit('did-add-authorization', {
258
- // identity: messageEvent.data.user_identity,
259
- // authorizationId: Number(messageEvent.data.authorization_id),
260
- // flowId: props.genericData.templateId,
261
- // appId: appId || 0,
262
- // appName: authApp?.name,
263
- // appIcon: authApp?.icon_url,
264
- // alreadyExists: messageEvent.data.already_exists,
265
- // externalId: messageEvent.data.external_id,
266
- // });
267
- }
268
- }
269
- };
270
-
271
- useEffect(() => {
272
- const { renderMode } = props;
273
- if (defaultFlowId !== 0) {
274
- if (renderMode === TemplateFormRenderModes.DETACHED) {
275
- context?.eventEmitter.emit('should-load-flow', {
276
- templateId: defaultFlowId,
277
- flowId: defaultFlowId,
278
- });
279
- } else if (defautlIntegrationId !== 0) {
280
- props.setStoreState({
281
- showSetupModal: renderMode === TemplateFormRenderModes.MODAL,
282
- showSetupInline: renderMode === TemplateFormRenderModes.INLINE,
283
- integrationIdToEdit: defautlIntegrationId,
284
- genericData: {
285
- ...props.genericData,
286
- templateId: defaultFlowId,
287
- name: '',
288
- },
289
- });
290
- } else {
291
- props.setStoreState({
292
- showSetupModal: renderMode === TemplateFormRenderModes.MODAL,
293
- showSetupInline: renderMode === TemplateFormRenderModes.INLINE,
294
- genericData: {
295
- ...props.genericData,
296
- templateId: defaultFlowId,
297
- name: '',
298
- },
299
- });
300
- }
301
- }
302
-
303
- if (props.renderFlowsMode === TemplateFormRenderModes.MODAL) {
304
- props.setStoreState({
305
- showFlowsListModal: true,
306
- });
307
- }
308
- }, []);
309
-
310
- const {
311
- renderMode,
312
- renderFlowsMode,
313
- layout,
314
- deploymentId,
315
- showSetupInline,
316
- showSetupModal,
317
- resetTemplateFields,
318
- genericData,
319
- } = props;
320
- const viewStyle = (genericData.viewStyle || 'comfortable').toLowerCase();
321
- const mainViewStyle = `flows-${viewStyle}-view--${renderFlowsMode}`;
322
-
323
- return html`
324
- <div
325
- id="flows-${(genericData.viewStyle || 'comfortable').toLowerCase()}-view"
326
- class="${styles['integry-container']} ${props.genericData.viewStyle ===
327
- ViewStyles.COMPACT
328
- ? styles['compact-view']
329
- : ''} ${styles[mainViewStyle]}"
330
- >
331
- ${renderFlowsMode === TemplateFormRenderModes.MODAL
332
- ? !showSetupModal &&
333
- html`
334
- <${Modal}
335
- isOpen=${props.showFlowsListModal}
336
- isCompact=${genericData.viewStyle === ViewStyles.COMPACT}
337
- onClose=${() => {
338
- props.resetTemplateFields();
339
- if (!props.genericData.isPreviewMode) {
340
- props.setStoreState({
341
- showFlowsListModal: false,
342
- });
343
- }
344
- }}
345
- CustomCloseElement=${() => html` <svg
346
- style="cursor:pointer; position: absolute; right: 25px; top: 25px;"
347
- width="14"
348
- height="14"
349
- viewBox="0 0 14 14"
350
- fill="none"
351
- xmlns="http://www.w3.org/2000/svg"
352
- >
353
- <path
354
- d="M13 1L1 13"
355
- stroke="#4F4F4F"
356
- stroke-width="2"
357
- stroke-linecap="round"
358
- stroke-linejoin="round"
359
- />
360
- <path
361
- d="M1 1L13 13"
362
- stroke="#4F4F4F"
363
- stroke-width="2"
364
- stroke-linecap="round"
365
- stroke-linejoin="round"
366
- />
367
- </svg>`}
368
- >
369
- <div class="integry-container__setup-form--modal" style="height: 100%;">
370
- <div class=${styles.flowName}></div>
371
- <${templateListComponent.current}
372
- layout=${layout}
373
- renderMode=${renderMode}
374
- renderFlowsMode=${renderFlowsMode}
375
- deploymentId=${deploymentId}
376
- apiHandler=${context?.apiHandler}
377
- eventEmitter=${context?.eventEmitter}
378
- onTemplateClick=${onTemplateClick}
379
- >
380
- </${templateListComponent.current}>
381
- </div>
382
- <//>
383
- `
384
- : !showSetupInline &&
385
- html`
386
- <${templateListComponent.current}
387
- layout=${layout}
388
- renderMode=${renderMode}
389
- renderFlowsMode=${renderFlowsMode}
390
- deploymentId=${deploymentId}
391
- apiHandler=${context?.apiHandler}
392
- eventEmitter=${context?.eventEmitter}
393
- onTemplateClick=${onTemplateClick}
394
- >
395
- </${templateListComponent.current}>
396
- `}
397
- ${renderMode === TemplateFormRenderModes.INLINE &&
398
- showSetupInline &&
399
- html`
400
- <div
401
- class="${props.genericData.viewStyle === ViewStyles.COMPACT
402
- ? styles.inlineSetupCompact
403
- : styles.inlineSetup} ${'integry-container__setup-form--inline'}"
404
- >
405
- <div
406
- class=${props.genericData.testMultipurpose
407
- ? styles.flowNameCompact
408
- : styles.flowName}
409
- style="${genericData.viewStyle === ViewStyles.COMPACT
410
- ? 'margin: 0; width: 100%;'
411
- : ''}"
412
- >
413
- ${props.genericData.testMultipurpose &&
414
- html`
415
- ${getSelectedStep().shouldShowBackButton &&
416
- html`<svg
417
- style="cursor: pointer;z-index: 1;"
418
- onclick=${() => {
419
- if (getSelectedStep().shouldShowBackButton) {
420
- const currentSelectedStep =
421
- props.stepState?.steps[props.stepState?.stepIndex - 1];
422
- if (currentSelectedStep.type === 'AUTH') {
423
- props.resetTemplateFields();
424
- } else {
425
- props.gotoPreviousStep();
426
- }
427
- } else {
428
- props.resetTemplateFields();
429
- }
430
- }}
431
- xmlns="http://www.w3.org/2000/svg"
432
- width="32"
433
- height="32"
434
- viewBox="0 0 32 32"
435
- fill="none"
436
- >
437
- <circle
438
- cx="16"
439
- cy="16"
440
- r="15.5"
441
- fill="white"
442
- stroke="#E0E0E0"
443
- />
444
- <path
445
- d="M15.547 11.0504L15.8825 10.7004L15.8825 10.7004L15.547 11.0504ZM15.5614 11.7359L15.2114 11.4004L15.2114 11.4004L15.5614 11.7359ZM14.8614 11.0649L15.2114 11.4004L15.2114 11.4004L14.8614 11.0649ZM10.013 16.1222L9.66297 15.7867L9.66297 15.7867L10.013 16.1222ZM9.69129 16.4578L9.3413 16.1222L9.01962 16.4578L9.3413 16.7933L9.69129 16.4578ZM10.013 16.7933L9.66297 17.1288L10.013 16.7933ZM14.8614 21.8507L15.2114 21.5151L15.2114 21.5151L14.8614 21.8507ZM15.547 21.8651L15.8825 22.2151L15.8825 22.2151L15.547 21.8651ZM15.5614 21.1796L15.9114 20.8441L15.9114 20.8441L15.5614 21.1796ZM11.0346 16.4578L10.6846 16.1222L10.363 16.4578L10.6846 16.7933L11.0346 16.4578ZM15.2114 11.4004L15.2114 11.4004L15.9114 12.0715C16.282 11.6849 16.2691 11.071 15.8825 10.7004L15.2114 11.4004ZM15.2114 11.4004L15.2114 11.4004L15.8825 10.7004C15.4959 10.3298 14.8821 10.3427 14.5115 10.7293L15.2114 11.4004ZM10.363 16.4578L15.2114 11.4004L14.5115 10.7293L9.66297 15.7867L10.363 16.4578ZM10.0413 16.7933L10.363 16.4578L9.66297 15.7867L9.3413 16.1222L10.0413 16.7933ZM10.363 16.4578L10.0413 16.1222L9.3413 16.7933L9.66297 17.1288L10.363 16.4578ZM15.2114 21.5151L10.363 16.4578L9.66297 17.1288L14.5115 22.1862L15.2114 21.5151ZM15.2114 21.5151L15.2114 21.5151L14.5115 22.1862C14.8821 22.5728 15.4959 22.5858 15.8825 22.2151L15.2114 21.5151ZM15.2114 21.5151L15.2114 21.5151L15.8825 22.2151C16.2691 21.8445 16.282 21.2307 15.9114 20.8441L15.2114 21.5151ZM10.6846 16.7933L15.2114 21.5151L15.9114 20.8441L11.3846 16.1222L10.6846 16.7933ZM15.2114 11.4004L10.6846 16.1222L11.3846 16.7933L15.9114 12.0715L15.2114 11.4004ZM21.5152 16.4581L21.5152 17.4278C22.0507 17.4278 22.4848 16.9937 22.4848 16.4581L21.5152 16.4581ZM21.5152 16.4581L22.4848 16.4581C22.4848 15.9226 22.0507 15.4884 21.5152 15.4884L21.5152 16.4581ZM11.8182 16.4581L21.5152 16.4581L21.5152 15.4884L11.8182 15.4884L11.8182 16.4581ZM11.8182 16.4581L11.8182 16.4581L11.8182 15.4884C11.2826 15.4884 10.8485 15.9226 10.8485 16.4581L11.8182 16.4581ZM11.8182 16.4581L11.8182 16.4581L10.8485 16.4581C10.8485 16.9937 11.2826 17.4278 11.8182 17.4278L11.8182 16.4581ZM21.5152 16.4581L11.8182 16.4581L11.8182 17.4278L21.5152 17.4278L21.5152 16.4581Z"
446
- fill="#4250F0"
447
- />
448
- </svg>`}
449
-
450
- <div
451
- class="${props.genericData.viewStyle === ViewStyles.COMPACT
452
- ? styles.flowNameGroupCompact
453
- : styles.flowNameGroup}"
454
- >
455
- <img
456
- src=${props.genericData.brandingApp?.icon_url ||
457
- getSelectedStep().selectedStep?.step.authorization_type.app
458
- .icon_url ||
459
- getSelectedStep().selectedStep?.step.activity.app.icon_url}
460
- />
461
- <span> ${getContainerName()} </span>
462
- </div>
463
- `}
464
- ${!props.genericData.testMultipurpose &&
465
- html` <svg
466
- style="cursor: pointer;"
467
- onclick=${() => {
468
- props.resetTemplateFields();
469
- }}
470
- width="24"
471
- height="24"
472
- viewBox="0 0 33 33"
473
- fill="none"
474
- xmlns="http://www.w3.org/2000/svg"
475
- >
476
- <circle
477
- cx="16.6758"
478
- cy="16.5684"
479
- r="15.5"
480
- fill="white"
481
- stroke="#4250f0"
482
- />
483
- <path
484
- d="M16.8975 11.3777L16.5547 11.7205L16.5547 11.7205L16.8975 11.3777ZM16.8975 12.0634L16.5547 11.7205L16.5547 11.7205L16.8975 12.0634ZM16.2119 11.3777L16.5547 11.7205L16.2119 11.3777ZM11.3634 16.2262L11.0205 15.8833L11.0205 15.8833L11.3634 16.2262ZM11.0205 16.569L10.6777
485
- 16.2262L10.3349 16.569L10.6777 16.9118L11.0205 16.569ZM11.3634 16.9118L11.0205 17.2547L11.0205 17.2547L11.3634 16.9118ZM16.2119 21.7603L16.5547 21.4175L16.5547 21.4175L16.2119 21.7603ZM16.8975 21.7603L16.5547 21.4175L16.5547 21.4175L16.8975 21.7603ZM16.8975 21.0747L16.5547 21.4175L16.5547 21.4175L16.8975 21.0747ZM12.3919 16.569L12.0491 16.2262L11.7062 16.569L12.0491 16.9118L12.3919 16.569ZM22.8574 17.0545L22.8574 17.5394L22.8574 17.0545ZM22.8574 16.0848L22.8574 16.5697L22.8574
486
- 16.0848ZM13.1605 16.0848L13.1605 15.6L13.1605 16.0848ZM13.1605 17.0545L13.1605 16.5697L13.1605 17.0545ZM16.5547 11.7205L16.5547 11.7205L17.2404 12.4062C17.6191 12.0275 17.6191 11.4135 17.2404 11.0348L16.5547 11.7205ZM16.5547 11.7205L17.2404 11.0348C16.8617 10.6562 16.2477 10.6562 15.869 11.0348L16.5547 11.7205ZM11.7062 16.569L16.5547 11.7205L15.869 11.0348L11.0205 15.8833L11.7062 16.569ZM11.3634 16.9118L11.7062 16.569L11.0205 15.8833L10.6777 16.2262L11.3634 16.9118ZM11.7062 16.569L11.3634 16.2262L10.6777
487
- 16.9118L11.0205 17.2547L11.7062 16.569ZM16.5547 21.4175L11.7062 16.569L11.0205 17.2547L15.869 22.1032L16.5547 21.4175ZM16.5547 21.4175L15.869 22.1032C16.2477 22.4819 16.8617 22.4819 17.2404 22.1032L16.5547 21.4175ZM16.5547 21.4175L16.5547
488
- 21.4175L17.2404 22.1032C17.6191 21.7245 17.6191 21.1105 17.2404 20.7318L16.5547 21.4175ZM12.0491 16.9118L16.5547 21.4175L17.2404 20.7318L12.7347 16.2262L12.0491 16.9118ZM16.5547 11.7205L12.0491 16.2262L12.7347 16.9118L17.2404 12.4062L16.5547 11.7205ZM22.8574 16.5697L22.8574 16.5697L22.8574 17.5394C23.393 17.5394 23.8271 17.1052 23.8271 16.5697L22.8574 16.5697ZM22.8574 16.5697L22.8574 16.5697L23.8271 16.5697C23.8271 16.0341 23.393 15.6 22.8574 15.6L22.8574
489
- 16.5697ZM13.1605 16.5697L22.8574 16.5697L22.8574 15.6L13.1605 15.6L13.1605 16.5697ZM13.1605 16.5697L13.1605 15.6C12.6249 15.6 12.1908 16.0341 12.1908 16.5697L13.1605 16.5697ZM13.1605 16.5697L12.1908 16.5697C12.1908 17.1052 12.6249 17.5394 13.1605 17.5394L13.1605 16.5697ZM22.8574 16.5697L13.1605 16.5697L13.1605 17.5394L22.8574 17.5394L22.8574 16.5697Z"
490
- fill="#4250f0"
491
- />
492
- </svg>
493
- ${getContainerName()}`}
494
- </div>
495
- <div class=${styles.flowAccountWrap}>
496
- ${props.stepState.currentStep?.type === 'CONFIGURATION' &&
497
- (props.genericData.selfAppId !==
498
- getSelectedStep().selectedStep?.step.activity.app.id ||
499
- props.genericData.isPreviewMode) &&
500
- getSelectedStep().selectedStep?.step.authorization_type.type !==
501
- 'NO_AUTH' &&
502
- html` <${Authentication}
503
- authorizations=${getStepAuthorizations(
504
- props.stepMapping[props.stepState.currentStep.stepId]
505
- ?.authorizations || [],
506
- )}
507
- appData=${getSelectedStepApp(
508
- getSelectedStep().selectedStep?.step,
509
- )}
510
- onAuthDelete=${(authId: number, appId: number) => {
511
- deleteAuth(
512
- authId,
513
- Number(getSelectedStep().selectedStep?.step.id),
514
- appId,
515
- );
516
- }}
517
- onAuthenticationRecieved=${(
518
- messageEvent: MessageEvent<AuthData>,
519
- ) => {
520
- onAuthResponseReceived(
521
- messageEvent,
522
- Number(getSelectedStep().selectedStep?.step.id),
523
- );
524
- handleAuthSelected(
525
- messageEvent.data.authorization_id,
526
- Number(getSelectedStep().selectedStep?.step.id),
527
- true,
528
- false,
529
- );
530
- }}
531
- onAuthVerify=${(authId: number, status: boolean) => {
532
- handleAuthSelected(
533
- authId,
534
- Number(getSelectedStep().selectedStep?.step.id),
535
- status,
536
- false,
537
- );
538
- }}
539
- hideAuthActions=${true}
540
- stepId=${Number(getSelectedStep().selectedStep?.step.id)}
541
- onAuthSelected=${(authId: number, status: boolean) => {
542
- handleAuthSelected(
543
- authId,
544
- Number(getSelectedStep().selectedStep?.step.id),
545
- status,
546
- false,
547
- );
548
- }}
549
- />`}
550
- </div>
551
- <${FlowSetupContainer}
552
- deploymentId=${props.deploymentId || props.genericData.deploymentId}
553
- flowId=${props.genericData.templateId}
554
- hideStepCount=${props.genericData.testMultipurpose}
555
- hideStepNavigation=${props.genericData.testMultipurpose}
556
- setupContainerStyle="${genericData.viewStyle === ViewStyles.COMPACT
557
- ? ''
558
- : ''}"
559
- stepContainerStyle="${genericData.viewStyle === ViewStyles.COMPACT
560
- ? 'padding: 0;'
561
- : ''}"
562
- params=${flowParams}
563
- />
564
- <div
565
- class=${styles.close}
566
- onclick=${() => {
567
- resetTemplateFields();
568
- }}
569
- >
570
- <svg
571
- width="20"
572
- height="22"
573
- viewBox="0 0 20 22"
574
- fill="none"
575
- xmlns="http://www.w3.org/2000/svg"
576
- >
577
- <path
578
- d="M14.2426 16.1822L5.75732 6.86328"
579
- stroke="#999999"
580
- stroke-width="2"
581
- stroke-linecap="round"
582
- />
583
- <path
584
- d="M14.2426 6.86328L5.75732 16.1822"
585
- stroke="#999999"
586
- stroke-width="2"
587
- stroke-linecap="round"
588
- />
589
- </svg>
590
- </div>
591
- </div>
592
- `}
593
- </div>
594
- ${renderMode === TemplateFormRenderModes.MODAL &&
595
- html`
596
- <${Modal}
597
- isOpen=${props.showSetupModal}
598
- onClose=${() => {
599
- props.resetTemplateFields();
600
- if (!props.genericData.isPreviewMode) {
601
- props.setStoreState({
602
- showFlowsListModal: false,
603
- });
604
- }
605
- }}
606
- isCompact=${genericData.viewStyle === ViewStyles.COMPACT}
607
- CustomCloseElement=${() => html` <svg
608
- style="cursor:pointer; position: absolute; right: 25px; top: 25px;"
609
- width="14"
610
- height="14"
611
- viewBox="0 0 14 14"
612
- fill="none"
613
- xmlns="http://www.w3.org/2000/svg"
614
- >
615
- <path
616
- d="M13 1L1 13"
617
- stroke="#4F4F4F"
618
- stroke-width="2"
619
- stroke-linecap="round"
620
- stroke-linejoin="round"
621
- />
622
- <path
623
- d="M1 1L13 13"
624
- stroke="#4F4F4F"
625
- stroke-width="2"
626
- stroke-linecap="round"
627
- stroke-linejoin="round"
628
- />
629
- </svg>`}
630
- >
631
- <div class="integry-container__setup-form--modal" style="height: calc(100% - 85px);">
632
- <div class=${
633
- props.genericData.testMultipurpose
634
- ? styles.flowNameCompact
635
- : styles.flowName
636
- } style="${
637
- props.genericData.viewStyle === ViewStyles.COMPACT
638
- ? 'padding-top: 16px; width: calc(100% - 60px);'
639
- : props.genericData.testMultipurpose
640
- ? 'padding-top: 16px;'
641
- : ''
642
- }">
643
- ${
644
- props.genericData.testMultipurpose &&
645
- html`
646
- ${getSelectedStep().shouldShowBackButton &&
647
- html`
648
- <svg
649
- style="cursor: pointer; z-index: 1;"
650
- onclick=${() => {
651
- if (getSelectedStep().shouldShowBackButton) {
652
- const currentSelectedStep =
653
- props.stepState?.steps[props.stepState?.stepIndex - 1];
654
- if (currentSelectedStep.type === 'AUTH') {
655
- props.resetTemplateFields();
656
- } else {
657
- props.gotoPreviousStep();
658
- }
659
- } else {
660
- props.resetTemplateFields();
661
- }
662
- }}
663
- xmlns="http://www.w3.org/2000/svg"
664
- width="32"
665
- height="32"
666
- viewBox="0 0 32 32"
667
- fill="none"
668
- >
669
- <circle
670
- cx="16"
671
- cy="16"
672
- r="15.5"
673
- fill="white"
674
- stroke="#E0E0E0"
675
- />
676
- <path
677
- d="M15.547 11.0504L15.8825 10.7004L15.8825 10.7004L15.547 11.0504ZM15.5614 11.7359L15.2114 11.4004L15.2114 11.4004L15.5614 11.7359ZM14.8614 11.0649L15.2114 11.4004L15.2114 11.4004L14.8614 11.0649ZM10.013 16.1222L9.66297 15.7867L9.66297 15.7867L10.013 16.1222ZM9.69129 16.4578L9.3413 16.1222L9.01962 16.4578L9.3413 16.7933L9.69129 16.4578ZM10.013 16.7933L9.66297 17.1288L10.013 16.7933ZM14.8614 21.8507L15.2114 21.5151L15.2114 21.5151L14.8614 21.8507ZM15.547 21.8651L15.8825 22.2151L15.8825 22.2151L15.547 21.8651ZM15.5614 21.1796L15.9114 20.8441L15.9114 20.8441L15.5614 21.1796ZM11.0346 16.4578L10.6846 16.1222L10.363 16.4578L10.6846 16.7933L11.0346 16.4578ZM15.2114 11.4004L15.2114 11.4004L15.9114 12.0715C16.282 11.6849 16.2691 11.071 15.8825 10.7004L15.2114 11.4004ZM15.2114 11.4004L15.2114 11.4004L15.8825 10.7004C15.4959 10.3298 14.8821 10.3427 14.5115 10.7293L15.2114 11.4004ZM10.363 16.4578L15.2114 11.4004L14.5115 10.7293L9.66297 15.7867L10.363 16.4578ZM10.0413 16.7933L10.363 16.4578L9.66297 15.7867L9.3413 16.1222L10.0413 16.7933ZM10.363 16.4578L10.0413 16.1222L9.3413 16.7933L9.66297 17.1288L10.363 16.4578ZM15.2114 21.5151L10.363 16.4578L9.66297 17.1288L14.5115 22.1862L15.2114 21.5151ZM15.2114 21.5151L15.2114 21.5151L14.5115 22.1862C14.8821 22.5728 15.4959 22.5858 15.8825 22.2151L15.2114 21.5151ZM15.2114 21.5151L15.2114 21.5151L15.8825 22.2151C16.2691 21.8445 16.282 21.2307 15.9114 20.8441L15.2114 21.5151ZM10.6846 16.7933L15.2114 21.5151L15.9114 20.8441L11.3846 16.1222L10.6846 16.7933ZM15.2114 11.4004L10.6846 16.1222L11.3846 16.7933L15.9114 12.0715L15.2114 11.4004ZM21.5152 16.4581L21.5152 17.4278C22.0507 17.4278 22.4848 16.9937 22.4848 16.4581L21.5152 16.4581ZM21.5152 16.4581L22.4848 16.4581C22.4848 15.9226 22.0507 15.4884 21.5152 15.4884L21.5152 16.4581ZM11.8182 16.4581L21.5152 16.4581L21.5152 15.4884L11.8182 15.4884L11.8182 16.4581ZM11.8182 16.4581L11.8182 16.4581L11.8182 15.4884C11.2826 15.4884 10.8485 15.9226 10.8485 16.4581L11.8182 16.4581ZM11.8182 16.4581L11.8182 16.4581L10.8485 16.4581C10.8485 16.9937 11.2826 17.4278 11.8182 17.4278L11.8182 16.4581ZM21.5152 16.4581L11.8182 16.4581L11.8182 17.4278L21.5152 17.4278L21.5152 16.4581Z"
678
- fill="#4250F0"
679
- />
680
- </svg>
681
- `}
682
- <div
683
- class="${props.genericData.viewStyle === ViewStyles.COMPACT
684
- ? styles.flowNameGroupCompact
685
- : styles.flowNameGroup}"
686
- >
687
- <img
688
- src=${props.genericData.brandingApp?.icon_url ||
689
- getSelectedStep().selectedStep?.step.authorization_type.app
690
- .icon_url ||
691
- getSelectedStep().selectedStep?.step.activity.app.icon_url}
692
- />
693
- <span>${getContainerName()}</span>
694
- </div>
695
- `
696
- }
697
- ${
698
- !props.genericData.testMultipurpose &&
699
- html` <svg
700
- style="cursor: pointer;"
701
- onclick=${() => {
702
- props.resetTemplateFields();
703
- }}
704
- width="24"
705
- height="24"
706
- viewBox="0 0 33 33"
707
- fill="none"
708
- xmlns="http://www.w3.org/2000/svg"
709
- >
710
- <circle
711
- cx="16.6758"
712
- cy="16.5684"
713
- r="15.5"
714
- fill="white"
715
- stroke="#4250f0"
716
- />
717
- <path
718
- d="M16.8975 11.3777L16.5547 11.7205L16.5547 11.7205L16.8975 11.3777ZM16.8975 12.0634L16.5547 11.7205L16.5547 11.7205L16.8975 12.0634ZM16.2119 11.3777L16.5547 11.7205L16.2119 11.3777ZM11.3634 16.2262L11.0205 15.8833L11.0205 15.8833L11.3634 16.2262ZM11.0205 16.569L10.6777
719
- 16.2262L10.3349 16.569L10.6777 16.9118L11.0205 16.569ZM11.3634 16.9118L11.0205 17.2547L11.0205 17.2547L11.3634 16.9118ZM16.2119 21.7603L16.5547 21.4175L16.5547 21.4175L16.2119 21.7603ZM16.8975 21.7603L16.5547 21.4175L16.5547 21.4175L16.8975 21.7603ZM16.8975 21.0747L16.5547 21.4175L16.5547 21.4175L16.8975 21.0747ZM12.3919 16.569L12.0491 16.2262L11.7062 16.569L12.0491 16.9118L12.3919 16.569ZM22.8574 17.0545L22.8574 17.5394L22.8574 17.0545ZM22.8574 16.0848L22.8574 16.5697L22.8574
720
- 16.0848ZM13.1605 16.0848L13.1605 15.6L13.1605 16.0848ZM13.1605 17.0545L13.1605 16.5697L13.1605 17.0545ZM16.5547 11.7205L16.5547 11.7205L17.2404 12.4062C17.6191 12.0275 17.6191 11.4135 17.2404 11.0348L16.5547 11.7205ZM16.5547 11.7205L17.2404 11.0348C16.8617 10.6562 16.2477 10.6562 15.869 11.0348L16.5547 11.7205ZM11.7062 16.569L16.5547 11.7205L15.869 11.0348L11.0205 15.8833L11.7062 16.569ZM11.3634 16.9118L11.7062 16.569L11.0205 15.8833L10.6777 16.2262L11.3634 16.9118ZM11.7062 16.569L11.3634 16.2262L10.6777
721
- 16.9118L11.0205 17.2547L11.7062 16.569ZM16.5547 21.4175L11.7062 16.569L11.0205 17.2547L15.869 22.1032L16.5547 21.4175ZM16.5547 21.4175L15.869 22.1032C16.2477 22.4819 16.8617 22.4819 17.2404 22.1032L16.5547 21.4175ZM16.5547 21.4175L16.5547
722
- 21.4175L17.2404 22.1032C17.6191 21.7245 17.6191 21.1105 17.2404 20.7318L16.5547 21.4175ZM12.0491 16.9118L16.5547 21.4175L17.2404 20.7318L12.7347 16.2262L12.0491 16.9118ZM16.5547 11.7205L12.0491 16.2262L12.7347 16.9118L17.2404 12.4062L16.5547 11.7205ZM22.8574 16.5697L22.8574 16.5697L22.8574 17.5394C23.393 17.5394 23.8271 17.1052 23.8271 16.5697L22.8574 16.5697ZM22.8574 16.5697L22.8574 16.5697L23.8271 16.5697C23.8271 16.0341 23.393 15.6 22.8574 15.6L22.8574
723
- 16.5697ZM13.1605 16.5697L22.8574 16.5697L22.8574 15.6L13.1605 15.6L13.1605 16.5697ZM13.1605 16.5697L13.1605 15.6C12.6249 15.6 12.1908 16.0341 12.1908 16.5697L13.1605 16.5697ZM13.1605 16.5697L12.1908 16.5697C12.1908 17.1052 12.6249 17.5394 13.1605 17.5394L13.1605 16.5697ZM22.8574 16.5697L13.1605 16.5697L13.1605 17.5394L22.8574 17.5394L22.8574 16.5697Z"
724
- fill="#4250f0"
725
- />
726
- </svg>
727
- ${getContainerName()}`
728
- }
729
- </div>
730
- <div class=${styles.flowAccountWrap}>
731
- ${
732
- props.stepState.currentStep?.type === 'CONFIGURATION' &&
733
- (props.genericData.selfAppId !==
734
- getSelectedStep().selectedStep?.step.activity.app.id ||
735
- props.genericData.isPreviewMode) &&
736
- getSelectedStep().selectedStep?.step.authorization_type.type !==
737
- 'NO_AUTH' &&
738
- html` <${Authentication}
739
- authorizations=${getStepAuthorizations(
740
- props.stepMapping[props.stepState.currentStep.stepId]
741
- ?.authorizations || [],
742
- )}
743
- appData=${getSelectedStepApp(
744
- getSelectedStep().selectedStep?.step,
745
- )}
746
- onAuthDelete=${(authId: number, appId: number) => {
747
- deleteAuth(
748
- authId,
749
- Number(getSelectedStep().selectedStep?.step.id),
750
- appId,
751
- );
752
- }}
753
- onAuthenticationRecieved=${(
754
- messageEvent: MessageEvent<AuthData>,
755
- ) => {
756
- onAuthResponseReceived(
757
- messageEvent,
758
- Number(getSelectedStep().selectedStep?.step.id),
759
- );
760
- handleAuthSelected(
761
- messageEvent.data.authorization_id,
762
- Number(getSelectedStep().selectedStep?.step.id),
763
- true,
764
- false,
765
- );
766
- }}
767
- onAuthVerify=${(authId: number, status: boolean) => {
768
- handleAuthSelected(
769
- authId,
770
- Number(getSelectedStep().selectedStep?.step.id),
771
- status,
772
- false,
773
- );
774
- }}
775
- hideAuthActions=${true}
776
- stepId=${Number(getSelectedStep().selectedStep?.step.id)}
777
- onAuthSelected=${(authId: number, status: boolean) => {
778
- handleAuthSelected(
779
- authId,
780
- Number(getSelectedStep().selectedStep?.step.id),
781
- status,
782
- false,
783
- );
784
- }}
785
- />`
786
- }
787
- </div>
788
- <${FlowSetupContainer}
789
- deploymentId=${props.deploymentId || props.genericData.deploymentId}
790
- flowId=${props.genericData.templateId}
791
- isInModal=${true}
792
- hideStepCount=${props.genericData.testMultipurpose}
793
- hideStepNavigation=${props.genericData.testMultipurpose}
794
- params=${flowParams}
795
- ><//>
796
- <//>
797
- </div>
798
- `}
799
- `;
800
- };
801
-
802
- export default connect<ContainerProps, unknown, StoreType, unknown>(
803
- [
804
- 'userConfig',
805
- 'integrations',
806
- 'templates',
807
- 'showSetupModal',
808
- 'genericData',
809
- 'showSetupInline',
810
- 'integrationIdToEdit',
811
- 'showFlowsListModal',
812
- 'stepMapping',
813
- 'stepState',
814
- 'stepDataMapping',
815
- ],
816
- actionFunctions,
817
- )(SDKContainer);