@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,91 +0,0 @@
1
- import { html } from 'htm/preact';
2
- // import { useEffect, useContext, useState } from 'preact/hooks';
3
- import { Tag } from '@/components/Tag';
4
- import { AppConnectionStatus, MarketplaceAppBundle } from '@/interfaces';
5
- // import AppContext from '@/contexts/AppContext';
6
-
7
- import { Loader } from '@/components/Loader';
8
- import styles from './styles.module.scss';
9
-
10
- enum ConnectionTagType {
11
- CONNECTED = 'success',
12
- ERROR = 'fail',
13
- VERIFYING = '',
14
- '' = '',
15
- }
16
-
17
- interface AppCardProps {
18
- marketplaceApp: MarketplaceAppBundle;
19
- handleCardClick?: (marketplaceApp: MarketplaceAppBundle) => void;
20
- }
21
-
22
- const AppCard = (props: AppCardProps) => {
23
- const {
24
- marketplaceApp,
25
- handleCardClick
26
- } = props;
27
- // const context = useContext(AppContext);
28
- // const [connectionStatus, setConnectionStatus] = useState<AppConnectionStatus>(AppConnectionStatus.NONE);
29
- const { app, connectionStatus = AppConnectionStatus.NONE } = marketplaceApp;
30
-
31
- // useEffect(() => {
32
- // const authorizationType = marketplaceApp.app.authorization_type;
33
- // if (authorizationType.authorizations.length > 0 && authorizationType.default_authorization) {
34
- // setConnectionStatus(AppConnectionStatus.VERIFYING);
35
- // context?.apiHandler
36
- // .verifyOAuth(authorizationType.default_authorization)
37
- // .then((res) => {
38
- // if (res) {;
39
- // setConnectionStatus(AppConnectionStatus.CONNECTED);
40
- // } else {
41
- // setConnectionStatus(AppConnectionStatus.ERROR);
42
- // }
43
- // })
44
- // }
45
- // }, []);
46
-
47
- const getConnectionStatus = () => {
48
- if (connectionStatus === AppConnectionStatus.CONNECTED) {
49
- return 'Connected';
50
- }
51
- if (connectionStatus === AppConnectionStatus.ERROR) {
52
- return html`
53
- <span class="${styles['app-card-tag__inner-span']}">Error <span style="height: 9px; top: 1px; position: relative; left: 1px;"><svg
54
- style="width: 1em; height: 1em;"
55
- width="9" height="9" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
56
- <path d="M4.99777 0.978142C5.06552 0.978142 5.23363 0.998713 5.32647 1.18386L8.80166 8.09071C8.88697 8.26043 8.82173 8.407 8.78912 8.461C8.7565 8.515 8.66115 8.64357 8.47296 8.64357H1.52258C1.33439 8.64357 1.23904 8.51757 1.20642 8.461C1.1738 8.407 1.10857 8.26043 1.19388 8.09071L4.66907 1.18386C4.76191 0.998713 4.93002 0.978142 4.99777 0.978142ZM4.99777 0.30957C4.63896 0.30957 4.28015 0.497285 4.08945 0.875285L0.614261 7.78214C0.262978 8.479 0.757283 9.30957 1.52258 9.30957H8.47547C9.24076 9.30957 9.73507 8.479 9.38379 7.78214L5.90609 0.875285C5.71539 0.497285 5.35658 0.30957 4.99777 0.30957Z" fill="#F05C42"/>
57
- <path d="M4.99547 6.84888C4.87503 6.84888 4.77467 6.89259 4.69186 6.97745C4.60906 7.06231 4.56641 7.16516 4.56641 7.28602C4.56641 7.42488 4.60906 7.53288 4.69688 7.61002C4.7847 7.68716 4.88507 7.72573 5.00049 7.72573C5.11591 7.72573 5.21377 7.68716 5.30159 7.60745C5.3869 7.53031 5.42956 7.42231 5.42956 7.28602C5.42956 7.16516 5.3869 7.06231 5.30159 6.97745C5.21879 6.89002 5.11591 6.84888 4.99547 6.84888Z" fill="#F05C42"/>
58
- <path d="M4.99795 3.28467C4.76209 3.28467 4.5714 3.48524 4.58143 3.72695L4.65671 5.99238C4.66173 6.18267 4.81479 6.33438 5.00046 6.33438C5.18614 6.33438 5.3392 6.18267 5.34422 5.99238L5.41698 3.72695C5.42451 3.48524 5.23382 3.28467 4.99795 3.28467Z" fill="#F05C42"/>
59
- </svg></span>
60
- </span>
61
- `;
62
- }
63
- return '';
64
- };
65
-
66
- const onCardClick = (): void => {
67
- if (handleCardClick) {
68
- handleCardClick(marketplaceApp);
69
- }
70
- }
71
-
72
- return html`
73
- <div class="${styles.appCard} integry-container__app-card" onclick="${onCardClick || ''}">
74
- <div class="${styles.leftSection}">
75
- <img src="${app.icon_url}" class="${styles.appLogo}" alt="app-logo" />
76
- </div>
77
- <div class="${styles.rightSection}">
78
- <div class="${styles.appTitleSection}">
79
- <span class="${styles.appName}">${app.name}</span> ${connectionStatus === AppConnectionStatus.VERIFYING && html`<${Loader} />`}
80
- ${app.authorization_type.authorizations.length > 0 && html`
81
- <${Tag} label="${getConnectionStatus()}" type="${ConnectionTagType[connectionStatus]}" className="app-card-tag" />`}
82
- </div>
83
- <div class="${styles.appDescription}">
84
- ${marketplaceApp.long_description || ''}
85
- </div>
86
- </div>
87
- </div>
88
- `;
89
- };
90
-
91
- export { AppCard };
@@ -1,66 +0,0 @@
1
- .appCard {
2
- background: #FFFFFF;
3
- border: 1px solid #E0E0E0;
4
- border-radius: 8px;
5
- display: flex;
6
- flex-direction: row;
7
- width: 350px;
8
- height: 88px;
9
- padding: 16px;
10
- cursor: pointer;
11
- filter: drop-shadow(0px 0px 12px rgba(0, 0, 0, 0.06));
12
- .leftSection {
13
- .appLogo {
14
- height: 56px;
15
- width: 56px;
16
- object-fit: contain;
17
- border-radius: 50%;
18
- }
19
- margin-right: 16px;
20
- }
21
- .rightSection {
22
- display: flex;
23
- flex-direction: column;
24
- justify-content: center;
25
- .appTitleSection {
26
- font-family: inherit;
27
- font-style: normal;
28
- font-weight: 600;
29
- font-size: 16px;
30
- line-height: 19px;
31
- color: #333333;
32
- display: flex;
33
- flex-wrap: nowrap;
34
- margin-bottom: 8px;
35
- align-items: center;
36
- .appName {
37
- margin-right: 8px;
38
- max-width: 160px;
39
- white-space: nowrap;
40
- overflow: hidden;
41
- text-overflow: ellipsis;
42
- }
43
- }
44
- .appDescription {
45
- font-family: inherit;
46
- font-style: normal;
47
- font-weight: 400;
48
- font-size: 14px;
49
- line-height: 17px;
50
- color: #4F4F4F;
51
- max-width: 242px;
52
- white-space: nowrap;
53
- overflow: hidden;
54
- text-overflow: ellipsis;
55
- margin-left: 1px;
56
- }
57
- }
58
- &:hover {
59
- border: 1px solid #4250f0;
60
- }
61
- }
62
-
63
- .app-card-tag__inner-span {
64
- display: flex;
65
- align-items: baseline;
66
- }
@@ -1,34 +0,0 @@
1
- import { html } from 'htm/preact';
2
- import { connect } from 'unistore/preact';
3
- import { actionFunctions } from '@/store';
4
- import { StoreType } from '@/types/store';
5
- import { MarketplaceAppBundle } from '@/interfaces';
6
- import { AppCard } from '@/features/containers/MarketplaceContainer/AppCard';
7
- import styles from './styles.module.scss';
8
-
9
- interface AppListingProps extends StoreType {
10
- marketplaceApps: MarketplaceAppBundle[];
11
- }
12
-
13
- const AppListing = (props: AppListingProps) => {
14
- const {
15
- marketplaceApps
16
- } = props;
17
-
18
- const handleCardClick = (marketplaceApp: MarketplaceAppBundle): void => {
19
- props.setStoreState({
20
- showMarketplaceAppPageId: marketplaceApp.id,
21
- })
22
- };
23
-
24
- return html`
25
- <div class="${styles.appListing} integry-container__app-listing">
26
- ${marketplaceApps.map((marketplaceApp) => html`<${AppCard} handleCardClick=${handleCardClick} key=${marketplaceApp.id} marketplaceApp=${marketplaceApp} />`)}
27
- </div>
28
- `;
29
- };
30
-
31
- export default connect<AppListingProps, unknown, StoreType, unknown>(
32
- [],
33
- actionFunctions,
34
- )(AppListing);
@@ -1,10 +0,0 @@
1
- .appListing {
2
- // display: grid;
3
- // grid-template-columns: repeat(3, 350px);
4
- // grid-column-gap: 30px;
5
- // grid-row-gap: 32px;
6
- display: flex;
7
- flex-wrap: wrap;
8
- row-gap: 24px;
9
- column-gap: 30px;
10
- }
@@ -1,132 +0,0 @@
1
- /* eslint-disable no-nested-ternary */
2
- import { html } from 'htm/preact';
3
- import { useEffect, useRef, useState } from 'preact/hooks';
4
- import { connect } from 'unistore/preact';
5
- import { actionFunctions } from '@/store';
6
- import { StoreType } from '@/types/store';
7
- import { Search } from '@/components/Search';
8
- import AppListing from '@/features/containers/MarketplaceContainer/AppListing';
9
- import { MarketplaceAppBundle } from '@/interfaces';
10
-
11
- import { LargeLoader } from '@/components/LargeLoader';
12
- import { ErrorMessage } from '@/components/ErrorMessage';
13
- import RequestAppWidget from '@/features/common/RequestAppWidget';
14
- import styles from './styles.module.scss';
15
-
16
-
17
- interface MarketplaceContentWrapProps extends StoreType {
18
- marketplaceApps: MarketplaceAppBundle[];
19
- loadingAppsStatus: string;
20
- className?: string;
21
- handleCloseMarketplaceModal?: () => void;
22
- }
23
-
24
- const MarketplaceContentWrap = (props: MarketplaceContentWrapProps) => {
25
- const { marketplaceApps, loadingAppsStatus, className, handleCloseMarketplaceModal } = props;
26
- const [filteredApps, setFilteredApps] = useState<MarketplaceAppBundle[]>(marketplaceApps);
27
- const searchValueRef = useRef('');
28
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
- const [resetSearch, setResetSearch] = useState(false);
30
-
31
- useEffect(() => {
32
- if (searchValueRef.current) {
33
- // eslint-disable-next-line no-use-before-define
34
- searchApps(searchValueRef.current);
35
- } else {
36
- setFilteredApps(marketplaceApps);
37
- }
38
- }, [marketplaceApps]);
39
-
40
- const connectedApps: MarketplaceAppBundle[] = [];
41
- const discoverApps: MarketplaceAppBundle[] = [];
42
- filteredApps.forEach((marketplaceApp: MarketplaceAppBundle) => {
43
- if (marketplaceApp.app.authorization_type.authorizations.length > 0) {
44
- connectedApps.push(marketplaceApp);
45
- } else {
46
- discoverApps.push(marketplaceApp);
47
- }
48
- });
49
-
50
- const searchApps = (searchValue: string) => {
51
- if (searchValue) {
52
- searchValueRef.current = searchValue;
53
- const searchedApps = marketplaceApps.filter((marketplaceApp) => {
54
- if (marketplaceApp.app.name.toLowerCase().includes(searchValue.toLowerCase())) {
55
- return true;
56
- }
57
- return false;
58
- });
59
- setFilteredApps(searchedApps);
60
- } else {
61
- searchValueRef.current = '';
62
- setFilteredApps(marketplaceApps);
63
- }
64
- };
65
-
66
- const onClickTellButtonSearchPopUp = () => {
67
- if (handleCloseMarketplaceModal) {
68
- handleCloseMarketplaceModal();
69
- }
70
- props.setStoreState({
71
- requestAppFormData: {
72
- appField: searchValueRef.current,
73
- }
74
- });
75
- // setResetSearch((prev) => !prev);
76
- }
77
-
78
- return html`
79
- ${loadingAppsStatus === 'LOADING' ? html`<div class="${styles.marketplaceLoader}"><${LargeLoader} /></div>` : html`
80
- <div class="${styles[className || '']}">
81
- <div class="${styles.searchWrap}">
82
- <${Search} reset=${resetSearch} onChange=${searchApps} disabled className="search-marketplace" placeholder="Search by app name"/>
83
- ${searchValueRef.current && filteredApps.length === 0 && html`
84
- <div class="${styles.searchAppPopUp}">
85
- <p class="${styles.searchText}">No results for “${searchValueRef.current}”</p>
86
- <${RequestAppWidget} buttonWidth="107px" buttonHeight="32px" className="search-pop-up" onClickTellButton=${onClickTellButtonSearchPopUp}/>
87
- </div>`
88
- }
89
- </div>
90
- <div class="${styles.appListingWrap}">
91
- ${connectedApps.length > 0 && html`
92
- <div class="${styles.marketplaceSection} ${'integry-container__marketplace-section'}">
93
- <h3 class="${styles.sectionTitle} ${'integry-container__marketplace-section__title'}">Connected apps</h3>
94
- <${AppListing} marketplaceApps="${connectedApps}" />
95
- </div>
96
- `}
97
- ${discoverApps.length > 0 && html`
98
- <div class="${styles.marketplaceSection} ${styles.discoverApps} ${'integry-container__marketplace-section'}">
99
- <h3 class="${styles.sectionTitle} ${'integry-container__marketplace-section__title'}">Discover apps</h3>
100
- <${AppListing} marketplaceApps="${discoverApps}" />
101
- </div>
102
- `}
103
- ${connectedApps.length === 0 && discoverApps.length === 0 && html`
104
- <div class="${styles.marketplaceSection} ${'integry-container__marketplace-section'}">
105
- <h3 class="${styles.sectionTitle} ${'integry-container__marketplace-section__title'}">
106
- ${marketplaceApps.length === 0 ? 'No apps added in marketplace'
107
- : filteredApps.length === 0 ? `No results for “${searchValueRef.current}”` : 'Discover apps'}
108
- </h3>
109
- ${loadingAppsStatus ? html`
110
- <div class="${styles.errorMessageWrap}">
111
- <${ErrorMessage}><p>${loadingAppsStatus}</p><//>
112
- </div>
113
- ` : html`
114
- <p class="${styles.infoMessage}">
115
- </p>
116
- `}
117
- </div>
118
- `}
119
- </div>
120
- </div>
121
- <${RequestAppWidget} className="marketplace-apps" onClickTellButton=${handleCloseMarketplaceModal} />
122
- `
123
- }
124
- `;
125
- }
126
-
127
- export default connect<MarketplaceContentWrapProps, unknown, StoreType, unknown>(
128
- [
129
- 'genericData',
130
- ],
131
- actionFunctions,
132
- )(MarketplaceContentWrap);
@@ -1,117 +0,0 @@
1
- .marketplaceSection {
2
- margin-bottom: 40px;
3
- .sectionTitle {
4
- font-family: inherit;
5
- font-style: normal;
6
- font-weight: 500;
7
- font-size: 18px;
8
- line-height: 22px;
9
- color: #333333;
10
- margin: 0px;
11
- margin-bottom: 24px;
12
- margin-top: 0px;
13
- }
14
- .errorMessageWrap {
15
- margin-left: 2px;
16
- }
17
- .infoMessage{
18
- margin-left: 2px;
19
- font-family: inherit;
20
- font-style: normal;
21
- font-weight: normal;
22
- font-size: 16px;
23
- line-height: 19px;
24
- color: #333333;
25
- }
26
- }
27
- .searchWrap {
28
- position: relative;
29
- .searchAppPopUp {
30
- position: absolute;
31
- top: 42px;
32
- left: 0px;
33
- background: #FFFFFF;
34
- border: 1px solid rgba(0, 0, 0, 0.2);
35
- box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.12);;
36
- border-radius: 4px;
37
- padding: 16px 22px;
38
- width: 445px;
39
- .searchText {
40
- font-family: inherit;
41
- font-style: normal;
42
- font-weight: 500;
43
- font-size: 14px;
44
- line-height: 17px;
45
- color: #7E7A8F;
46
- margin: 0px;
47
- margin-bottom: 6px;
48
- }
49
- @media (min-width: 320px) {
50
- max-width: 353px;
51
- }
52
- @media (min-width: 875px) {
53
- max-width: 445px;
54
- }
55
- }
56
- }
57
- .marketplaceLoader {
58
- position: relative;
59
- left: calc(100% - 26px - 50%);
60
- top: 30%;
61
- width: fit-content;
62
- }
63
- .modal-marketplace-content {
64
- min-height: calc(100vh - 100px - 186px - 30px);
65
- margin-bottom: 30px;
66
- .marketplaceSection {
67
- .sectionTitle {
68
- font-family: inherit;
69
- font-style: normal;
70
- font-weight: 500;
71
- font-size: 18px;
72
- line-height: 22px;
73
- color: #000000;
74
- margin: 0px;
75
- margin-bottom: 24px;
76
- margin-top: 0px;
77
- }
78
- }
79
- @media (min-height: 1152px) {
80
- min-height: calc(1000px - 186px - 30px);
81
- }
82
- }
83
- .inline-marketplace-content {
84
- height: calc(100% - 40px);
85
- margin-bottom: 30px;
86
- .marketplaceSection {
87
- &.discoverApps {
88
- margin-bottom: 0px;
89
- }
90
- }
91
- .appListingWrap {
92
- overflow-y: auto;
93
- max-height: calc(100% - 68px);
94
- &::-webkit-scrollbar {
95
- width: 7px;
96
- }
97
-
98
- /* Track */
99
- &::-webkit-scrollbar-track {
100
- // background: #f1f1f1;
101
- background: transparent;
102
- border-radius: 8px;
103
- }
104
-
105
- /* Handle */
106
- &::-webkit-scrollbar-thumb {
107
- background: #BDBDBD;
108
- border: 1px solid #BDBDBD;
109
- border-radius: 8px;
110
- }
111
-
112
- /* Handle on hover */
113
- &::-webkit-scrollbar-thumb:hover {
114
- background: rgb(116, 116, 116);
115
- }
116
- }
117
- }