@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,361 +0,0 @@
1
- .authSelectorDropdownContainer {
2
- .label {
3
- font-weight: 400;
4
- font-size: 12px;
5
- line-height: 15px;
6
- color: #333333;
7
- margin-bottom: 5px;
8
-
9
- span {
10
- color: #ff4d34;
11
- margin-left: 2px;
12
- font-size: 16px;
13
- }
14
- }
15
-
16
- .title {
17
- font-family: inherit;
18
- font-style: normal;
19
- font-weight: 500;
20
- font-size: 16px;
21
- line-height: 19px;
22
- color: #333333;
23
- }
24
-
25
- .confirmation {
26
- display: flex;
27
- flex-direction: column;
28
- align-items: flex-start;
29
- justify-content: flex-start;
30
- font-style: normal;
31
- font-weight: 400;
32
- font-size: 12px;
33
- line-height: 15px;
34
- padding: 40px;
35
- padding-right: 21px;
36
- height: 100%;
37
- div {
38
- width: max-content;
39
- }
40
-
41
- button {
42
- cursor: pointer;
43
- -webkit-appearance: button;
44
- font-weight: 500;
45
- font-size: 11px;
46
- line-height: 14px;
47
- padding: 0px 6px;
48
- text-align: center;
49
- border-radius: 12px;
50
- border: 0;
51
- outline: none;
52
- color: #7e7a8f;
53
- background-color: #f1f1f1;
54
- height: 18px;
55
-
56
- &:nth-child(2) {
57
- color: #ffffff;
58
- margin-left: 10px;
59
- margin-right: 10px;
60
- background-color: #f05c42;
61
- }
62
- }
63
-
64
- .confirmationHeading {
65
- color: #333;
66
- font-family: Inter;
67
- font-size: 24px;
68
- font-style: normal;
69
- font-weight: 500;
70
- line-height: 30px;
71
- margin-bottom: 16px;
72
- display: flex;
73
- flex-direction: row;
74
- align-items: center;
75
- justify-content: flex-start;
76
- gap: 8px;
77
- }
78
-
79
- .confirmationDescription {
80
- width: 100%;
81
-
82
- p {
83
- color: #666666;
84
- font-family: Inter;
85
- font-size: 16px;
86
- font-style: normal;
87
- font-weight: 400;
88
- line-height: 24px;
89
- margin: 0;
90
- margin-bottom: 24px;
91
- display: block;
92
- text-wrap: wrap;
93
- }
94
- }
95
-
96
- .confirmationActions {
97
- display: flex;
98
- flex-direction: row;
99
- align-items: center;
100
- justify-content: flex-start;
101
- gap: 16px;
102
-
103
- .primaryCTA {
104
- height: 40px;
105
- padding: 10px 15px;
106
- margin: 0px;
107
- justify-content: center;
108
- align-items: center;
109
- border-radius: 5px;
110
- background: #F05C42;
111
- color: #FFFFFF;
112
- font-family: Inter;
113
- font-size: 13px;
114
- font-style: normal;
115
- font-weight: 400;
116
- line-height: normal;
117
- }
118
-
119
- .secondaryCTA {
120
- height: 40px;
121
- padding: 10px 15px;
122
- justify-content: center;
123
- align-items: center;
124
- border-radius: 5px;
125
- border: 1px solid #F0F0F0;
126
- background: #F0F0F0;
127
- color: #333333;
128
- font-family: Inter;
129
- font-size: 13px;
130
- font-style: normal;
131
- font-weight: 400;
132
- line-height: normal;
133
- }
134
- }
135
- }
136
-
137
- .rows {
138
- display: flex;
139
- flex-direction: column;
140
- align-items: flex-start;
141
- justify-content: center;
142
-
143
- #integry-modal-content-wrap {
144
- height: 286px;
145
- }
146
- }
147
-
148
- .row {
149
- display: flex;
150
- flex-direction: row;
151
- align-items: center;
152
- justify-content: space-between;
153
- cursor: pointer;
154
- width: 100%;
155
- max-height: 39px;
156
- min-height: 39px;
157
-
158
- .checkboxRow {
159
- width: 100%;
160
- flex-direction: row;
161
- justify-content: space-between;
162
- min-height: 39px;
163
- padding: 0 12px;
164
- }
165
-
166
- .rowLabel {
167
- margin: 0;
168
- color: #4F4F4F;
169
- font-family: Inter;
170
- font-size: 12px;
171
- font-style: normal;
172
- font-weight: 500;
173
- line-height: normal;
174
- white-space: nowrap;
175
- overflow: hidden;
176
- text-overflow: ellipsis;
177
- }
178
-
179
- &:hover {
180
- background: rgba(233, 236, 239, 0.5);
181
-
182
- .deleteIcon svg {
183
- visibility: visible;
184
- user-select: auto;
185
- }
186
- }
187
- }
188
-
189
- .rowSelected {
190
- background: rgba(66, 80, 240, 0.10000000149011612);
191
-
192
- &:hover {
193
- background: rgba(66, 80, 240, 0.10000000149011612);
194
- }
195
- }
196
-
197
- .rowItem {
198
- width: 100%;
199
- }
200
-
201
- .error {
202
- color: #f05c42;
203
- button {
204
- color: #f05c42;
205
- border-color: #f05c42;
206
- }
207
- }
208
-
209
- .verify {
210
- font-family: inherit;
211
- font-style: normal;
212
- font-weight: 400;
213
- font-size: 12px;
214
- line-height: 15px;
215
- color: #4250F0;
216
- cursor: pointer;
217
- &:hover {
218
- color: #252e91;
219
- }
220
- }
221
-
222
- .errorMessage {
223
- margin-top: 4px;
224
- font-size: 12px;
225
- line-height: 15px;
226
- letter-spacing: -0.2px;
227
- color: #f05c42;
228
- }
229
-
230
- .description {
231
- font-size: 14px;
232
- line-height: 20px;
233
- color: #8c8c8c;
234
- margin-bottom: 10px;
235
- }
236
-
237
- .checkboxRowWrap {
238
- width: 100%;
239
- }
240
- .checkboxRow {
241
- display: flex;
242
- align-items: center;
243
- justify-content: flex-start;
244
- gap: 5px;
245
- .radio {
246
- width: 100%;
247
- max-width: 250px;
248
- overflow: hidden;
249
- text-overflow: ellipsis;
250
- white-space: nowrap;
251
- &.readonly {
252
- width: 70%;
253
- }
254
- }
255
- .deleteIcon {
256
- display: flex;
257
- align-items: center;
258
- cursor: pointer;
259
- svg {
260
- cursor: pointer;
261
- visibility: hidden;
262
- user-select: none;
263
- }
264
- }
265
- .statusWrap {
266
- display: flex;
267
- align-items: center;
268
- font-size: 12px;
269
- width: auto;
270
- &.readonly {
271
- width: 30%;
272
- }
273
- .status {
274
- position: relative;
275
- width: auto;
276
- div {
277
- display: flex;
278
- align-items: center;
279
- }
280
- svg {
281
- margin-left: 8px;
282
- }
283
- .statusRed,
284
- .statusOrange,
285
- .statusGreen {
286
- width: 5px;
287
- height: 5px;
288
- border-radius: 9999px;
289
- margin: 0px;
290
- margin-right: 8px;
291
- }
292
- .statusRed {
293
- background: #e26154;
294
- }
295
- .statusOrange {
296
- background: #fcc700;
297
- }
298
-
299
- .statusGreen {
300
- background: #2ecc71;
301
- }
302
-
303
- span {
304
- margin-left: 10px;
305
- }
306
- .resend {
307
- cursor: pointer;
308
- }
309
- }
310
- }
311
- &:hover {
312
- .deleteIcon svg {
313
- visibility: visible;
314
- user-select: auto;
315
- }
316
- }
317
- .readonlyHint {
318
- position: absolute;
319
- width: 40%;
320
- height: -webkit-fill-available;
321
- z-index: 99;
322
- margin: 10px 0px;
323
- }
324
- }
325
-
326
- .addAccount {
327
- font-family: inherit;
328
- font-style: normal;
329
- cursor: pointer;
330
- padding: 11px 10px;
331
-
332
- span {
333
- font-weight: 500;
334
- font-size: 12px;
335
- line-height: 15px;
336
- color: #4250F0;
337
- visibility: visible;
338
- }
339
-
340
- &:hover {
341
- background: rgba(233, 236, 239, 0.5);
342
- }
343
- }
344
- .buttonWrap {
345
- display: flex;
346
- align-items: center;
347
- justify-content: flex-end;
348
- button {
349
- padding: 10px 15px !important;
350
- }
351
- }
352
-
353
- .noAccountsPrompt {
354
- margin: 16px 0px 24px 0px;
355
- font-style: normal;
356
- font-weight: 400;
357
- font-size: 12px;
358
- line-height: 15px;
359
- color: #999999;
360
- }
361
- }
@@ -1,336 +0,0 @@
1
- import { html, Component } from 'htm/preact';
2
- import { connect } from 'unistore/preact';
3
-
4
- import { Loader } from '@/components/Loader';
5
- import { IntegryAPI } from '@/modules/api';
6
- import { Radio } from '@/components/RadioGroup/Radio';
7
- import { Label } from '@/components/Label';
8
- import { Hint } from '@/components/Tooltip';
9
- import { StoreType } from '@/types/store';
10
- import { actionFunctions } from '@/store';
11
- import isBrowser from '@/utils/isBrowser';
12
- import AppContext from '@/contexts/AppContext';
13
-
14
- import { openPopupWindow } from '@/utils/popup';
15
- import { AuthData, isAuthMessage } from '@/utils/isAuthMessage';
16
-
17
- import styles from './styles.module.scss';
18
-
19
- type Authorization = {
20
- id: number;
21
- display_name: string;
22
- };
23
-
24
- interface AuthSelectorPropsType extends StoreType {
25
- authorizations: Authorization[];
26
- selectedAuthId?: number | null;
27
- onAuthSelected(authId: number | null): void;
28
- apiHandler: IntegryAPI;
29
- loginUrl?: string;
30
- appName?: string;
31
- onAuthCreated?(auth: Authorization): void;
32
- onAuthDeleted?(authId: number): void;
33
- isReadOnly?: boolean;
34
- }
35
-
36
- interface AuthSelectorStateType {
37
- isLoading: boolean;
38
- fetched: boolean;
39
- willDeleteAuthWithIndex: number | null;
40
- isDeleting: boolean;
41
- }
42
-
43
- const Confirmation = (props: { callback(shouldDelete: boolean): void }) => {
44
- const { callback } = props;
45
- return html`
46
- <div class=${styles.confirmation}>
47
- <div class=${styles.confirmationText}>Are you sure?</div>
48
- <button onclick=${() => callback(false)}>No</button>
49
- <button onclick=${() => callback(true)}>Yes</button>
50
- </div>
51
- `;
52
- };
53
-
54
- const AuthorizationRow = (props: {
55
- id: string;
56
- value: string;
57
- isChecked?: boolean;
58
- isLoading: boolean;
59
- willDelete?: boolean;
60
- isDeleting?: boolean;
61
- error?: string;
62
- status: 'VERIFYING' | 'CONNECTED' | 'ERROR' | 'IDLE' | null;
63
- handleChange?: (id: string) => void;
64
- handleReverify?: () => void;
65
- handleDelete?: (shouldDelete: boolean) => void;
66
- handleWillDelete?: () => void;
67
- isReadOnly?: boolean;
68
- forcedLoading?: boolean;
69
- }) => {
70
- const {
71
- id,
72
- value,
73
- isChecked,
74
- status = 'IDLE',
75
- isDeleting = false,
76
- willDelete = false,
77
- handleChange,
78
- handleReverify,
79
- handleDelete = () => null,
80
- handleWillDelete = () => null,
81
- error,
82
- isReadOnly,
83
- } = props;
84
- return html`
85
- <${Hint} dismissOnClick=${false} position="top" deltaY=${0}>
86
- <div
87
- class="${styles.checkboxRow} ${isChecked
88
- ? styles.isCheckBoxSelected
89
- : ''}"
90
- >
91
- ${isReadOnly && html`<span class=${styles.readonlyHint}></span>`}
92
- <div class=${`${styles.radio} ${isReadOnly ? styles.readonly : ''}`}>
93
- <${Radio}
94
- id=${id}
95
- value=${value}
96
- isChecked=${isChecked}
97
- onChange=${handleChange}
98
- isDisabled=${isReadOnly}
99
- isReadOnly=${isReadOnly}
100
- className="authRadio"
101
- />
102
- </div>
103
-
104
- ${willDelete &&
105
- !isDeleting &&
106
- html` <${Confirmation} callback=${handleDelete} /> `}
107
- ${!(status === 'VERIFYING' || isDeleting || willDelete) &&
108
- !isReadOnly &&
109
- html`
110
- <div class=${styles.deleteIcon} onclick=${handleWillDelete}>
111
- <svg
112
- width="15"
113
- height="15"
114
- viewBox="0 0 15 15"
115
- fill="none"
116
- xmlns="http://www.w3.org/2000/svg"
117
- >
118
- <path d="M1.5 4.1999H13.65" stroke="#F05C42" />
119
- <path
120
- d="M11.6254 5.5498V6.2248L10.9504 13.6498H4.20039L3.52539 6.2248V5.5498"
121
- stroke="#F05C42"
122
- stroke-linejoin="round"
123
- />
124
- <path
125
- d="M5.55078 3.525V2.175C5.55078 1.80221 5.85299 1.5 6.22578 1.5H8.92578C9.29857 1.5 9.60078 1.80221 9.60078 2.175V3.525"
126
- stroke="#F05C42"
127
- />
128
- </svg>
129
- </div>
130
- `}
131
- ${isDeleting &&
132
- html`
133
- <div class=${styles.deletingIcon}>
134
- <${Loader} size="small" />
135
- </div>
136
- `}
137
- </div>
138
- <//>
139
- `;
140
- };
141
-
142
- class AuthSelectorV2 extends Component<
143
- AuthSelectorPropsType,
144
- AuthSelectorStateType
145
- > {
146
- static contextType = AppContext;
147
-
148
- constructor(props: AuthSelectorPropsType) {
149
- super(props);
150
- this.state = {
151
- isLoading: false,
152
- fetched: false,
153
- willDeleteAuthWithIndex: null,
154
- isDeleting: false,
155
- };
156
- }
157
-
158
- componentDidMount() {
159
- if (isBrowser())
160
- window.addEventListener('message', this.onAuthResponseReceived);
161
-
162
- let { selectedAuthId } = this.props;
163
- const { authorizations } = this.props;
164
-
165
- if (!selectedAuthId && authorizations.length > 0) {
166
- selectedAuthId = authorizations[0].id;
167
- }
168
- let authIndex = authorizations.findIndex((el) => el.id === selectedAuthId);
169
- if (authorizations.length > 0 && authIndex === -1) {
170
- authIndex = 0;
171
- }
172
- }
173
-
174
- componentDidUpdate(prevProps: AuthSelectorPropsType) {
175
- const { selectedAuthId, authorizations } = this.props;
176
-
177
- const authIndex = authorizations.findIndex(
178
- (el) => el.id === selectedAuthId,
179
- );
180
- }
181
-
182
- componentWillUnmount() {
183
- if (isBrowser())
184
- window.removeEventListener('message', this.onAuthResponseReceived);
185
- }
186
-
187
- private willDelete = (authIndex: number) => {
188
- this.setState({
189
- willDeleteAuthWithIndex: authIndex,
190
- });
191
- };
192
-
193
- private deleteAuth = (authIndex: number) => {
194
- const { authorizations } = this.props;
195
- const auth = authorizations[authIndex];
196
- this.setState({ isDeleting: true });
197
-
198
- this.props.apiHandler
199
- .deleteAuth(auth.id)
200
- .then((res) => {
201
- if (res?.status === 200) {
202
- this.context.eventEmitter.emit('did-remove-authorization', {
203
- authorizationId: Number(auth.id),
204
- appId: this.props.genericData.app_id || '',
205
- });
206
- if (this.props.onAuthDeleted) {
207
- this.props.onAuthDeleted(auth.id);
208
- }
209
- }
210
- this.setState({ isDeleting: false });
211
- })
212
- .catch((err) => {
213
- console.error(err);
214
- })
215
- .finally(() =>
216
- this.setState({ willDeleteAuthWithIndex: null, isDeleting: false }),
217
- );
218
- };
219
-
220
- private onAuthResponseReceived = (messageEvent: MessageEvent<AuthData>) => {
221
- if (isAuthMessage(messageEvent) && messageEvent.data.activity_name) {
222
- if (this.props.onAuthCreated) {
223
- this.props.onAuthCreated({
224
- id: Number(messageEvent.data.authorization_id),
225
- display_name: messageEvent.data.user_identity,
226
- });
227
- }
228
- this.context.eventEmitter.emit('did-add-authorization', {
229
- identity: messageEvent.data.user_identity,
230
- authorizationId: Number(messageEvent.data.authorization_id),
231
- flowId: this.props.genericData.templateId,
232
- alreadyExists: messageEvent.data.already_exists,
233
- externalId: messageEvent.data.external_id,
234
- });
235
- }
236
- };
237
-
238
- public openAuthWindow = () => {
239
- if (this.props.loginUrl) {
240
- const { loginUrl } = this.props;
241
- openPopupWindow(loginUrl, 'Auth Window', window, 800, 600);
242
- }
243
- };
244
-
245
- render() {
246
- const { authorizations, appName } = this.props;
247
-
248
- return html`
249
- <div
250
- class="${styles.authSelectorWrapV2} integry-container__auth-selector"
251
- >
252
- <div class="${styles.authSelectorHeader}">
253
- <${Label}
254
- title="Connect account"
255
- description=${`Select your ${appName || ''} account`}
256
- isRequired=${true}
257
- />
258
- </div>
259
- <div class=${styles.rows}>
260
- ${authorizations.map(
261
- (el, index) => html`<${AuthorizationRow}
262
- id=${el.id}
263
- value=${el.display_name}
264
- status=${`CONNECTED`}
265
- isChecked=${el.id === this.props.selectedAuthId}
266
- willDelete=${this.state.willDeleteAuthWithIndex === index}
267
- handleChange=${(id: string) => {
268
- this.props.onAuthSelected(Number(id));
269
- }}
270
- handleDelete=${(shouldDelete: boolean) =>
271
- shouldDelete
272
- ? this.deleteAuth(index)
273
- : this.setState({ willDeleteAuthWithIndex: null })}
274
- handleWillDelete=${() => this.willDelete(index)}
275
- isDeleting=${this.state.isDeleting}
276
- isReadOnly=${this.props.isReadOnly}
277
- />`,
278
- )}
279
- </div>
280
- ${true &&
281
- html`
282
- <div>
283
- <${Hint}
284
- dismissOnClick=${false}
285
- position="bottom-right"
286
- deltaY=${0}
287
- >
288
- ${!this.props.isReadOnly &&
289
- html`<div
290
- data-hint=${this.props.genericData.isPreviewMode &&
291
- 'New accounts cannot be added in preview mode'}
292
- class=${styles.addAccountCTA}
293
- onClick=${() => {
294
- if (
295
- !this.props.genericData.isPreviewMode &&
296
- !(
297
- this.state.isLoading ||
298
- this.props.genericData.isPreviewMode
299
- )
300
- ) {
301
- this.openAuthWindow();
302
- }
303
- }}
304
- >
305
- <svg
306
- xmlns="http://www.w3.org/2000/svg"
307
- width="16"
308
- height="16"
309
- viewBox="0 0 16 16"
310
- fill="none"
311
- >
312
- <path
313
- d="M7.94453 7.94417V8.44417H8.44453V7.94417H7.94453ZM7.94453 8.44417H8.44453V7.94417H7.94453V8.44417ZM8.44453 8.44417V7.94417H7.94453V8.44417H8.44453ZM8.44453 7.94417H7.94453V8.44417H8.44453V7.94417ZM8.19453 3.64417C8.05646 3.64417 7.94453 3.53224 7.94453 3.39417H8.94453C8.94453 2.97995 8.60874 2.64417 8.19453 2.64417V3.64417ZM8.44453 3.39417C8.44453 3.53224 8.3326 3.64417 8.19453 3.64417V2.64417C7.78032 2.64417 7.44453 2.97995 7.44453 3.39417H8.44453ZM8.44453 7.94417V3.39417H7.44453V7.94417H8.44453ZM3.39453 8.44417H7.94453V7.44417H3.39453V8.44417ZM3.64453 8.19417C3.64453 8.33224 3.5326 8.44417 3.39453 8.44417V7.44417C2.98032 7.44417 2.64453 7.77995 2.64453 8.19417H3.64453ZM3.39453 7.94417C3.5326 7.94417 3.64453 8.05609 3.64453 8.19417H2.64453C2.64453 8.60838 2.98032 8.94417 3.39453 8.94417V7.94417ZM7.94453 7.94417H3.39453V8.94417H7.94453V7.94417ZM8.44453 12.9942V8.44417H7.44453V12.9942H8.44453ZM8.19453 12.7442C8.3326 12.7442 8.44453 12.8561 8.44453 12.9942H7.44453C7.44453 13.4084 7.78032 13.7442 8.19453 13.7442V12.7442ZM7.94453 12.9942C7.94453 12.8561 8.05646 12.7442 8.19453 12.7442V13.7442C8.60874 13.7442 8.94453 13.4084 8.94453 12.9942H7.94453ZM7.94453 8.44417V12.9942H8.94453V8.44417H7.94453ZM12.9945 7.94417H8.44453V8.94417H12.9945V7.94417ZM12.7445 8.19417C12.7445 8.05609 12.8565 7.94417 12.9945 7.94417V8.94417C13.4087 8.94417 13.7445 8.60838 13.7445 8.19417H12.7445ZM12.9945 8.44417C12.8565 8.44417 12.7445 8.33224 12.7445 8.19417H13.7445C13.7445 7.77995 13.4087 7.44417 12.9945 7.44417V8.44417ZM8.44453 8.44417H12.9945V7.44417H8.44453V8.44417ZM7.94453 3.39417V7.94417H8.94453V3.39417H7.94453Z"
314
- fill="#333333"
315
- />
316
- </svg>
317
-
318
- <span>${`Add account`}</span>
319
- </div>`}
320
- <//>
321
- </div>
322
- `}
323
- </div>
324
- `;
325
- }
326
- }
327
-
328
- export default connect<
329
- AuthSelectorPropsType,
330
- AuthSelectorStateType,
331
- StoreType,
332
- unknown
333
- >(
334
- ['stepMapping', 'genericData'],
335
- actionFunctions,
336
- )(AuthSelectorV2);