@integry/sdk 4.7.39 → 4.7.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.csm.js +1 -1
- package/dist/umd/index.umd.js +1 -1
- package/package.json +6 -1
- package/.eslintignore +0 -1
- package/.vscode/launch.json +0 -17
- package/CHANGELOG_INTERNAL.md +0 -134
- package/README_INTERNAL.md +0 -176
- package/THIRD_PARTY_LICENSES +0 -525
- package/generateTests.js +0 -80
- package/jest.config.cjs +0 -10
- package/src/components/AddTagButton/index.ts +0 -23
- package/src/components/BasicSelect/index.ts +0 -123
- package/src/components/BasicSelect/styles.module.scss +0 -44
- package/src/components/Button/index.ts +0 -97
- package/src/components/Button/styles.module.scss +0 -152
- package/src/components/CheckboxGroup/Checkbox.ts +0 -104
- package/src/components/CheckboxGroup/index.ts +0 -190
- package/src/components/CheckboxGroup/styles.module.scss +0 -63
- package/src/components/CollapsedMenu/index.ts +0 -104
- package/src/components/CollapsedMenu/styles.module.scss +0 -46
- package/src/components/ConfigureFieldWrapper/index.ts +0 -85
- package/src/components/ConfigureFieldWrapper/styles.module.scss +0 -57
- package/src/components/EditableText/index.ts +0 -121
- package/src/components/EditableText/styles.module.scss +0 -38
- package/src/components/EditableTextArea/index.ts +0 -143
- package/src/components/EditableTextArea/styles.module.scss +0 -91
- package/src/components/ErrorMessage/index.ts +0 -16
- package/src/components/ErrorMessage/styles.module.scss +0 -19
- package/src/components/ErrorPage/index.ts +0 -42
- package/src/components/ErrorPage/styles.module.scss +0 -26
- package/src/components/Footer/index.ts +0 -41
- package/src/components/Footer/styles.module.scss +0 -40
- package/src/components/HTMLContent/index.tsx +0 -205
- package/src/components/HTMLContent/styles.module.scss +0 -3
- package/src/components/InfoBox/index.ts +0 -48
- package/src/components/InfoBox/styles.module.scss +0 -21
- package/src/components/Input/BaseInput/index.ts +0 -170
- package/src/components/Input/BaseInput/styles.module.scss +0 -95
- package/src/components/Input/DateInput/index.ts +0 -103
- package/src/components/Input/DateInput/styles.module.scss +0 -50
- package/src/components/Input/Input/index.ts +0 -225
- package/src/components/Input/Input/styles.module.scss +0 -16
- package/src/components/Input/PasswordInput/index.ts +0 -164
- package/src/components/Input/PasswordInput/styles.module.scss +0 -37
- package/src/components/Input/index.ts +0 -7
- package/src/components/Label/index.ts +0 -61
- package/src/components/Label/styles.module.scss +0 -41
- package/src/components/LargeLoader/index.ts +0 -25
- package/src/components/LargeLoader/styles.module.scss +0 -16
- package/src/components/Listbox/ListBoxItem.ts +0 -57
- package/src/components/Listbox/index.ts +0 -488
- package/src/components/Listbox/styles.module.scss +0 -197
- package/src/components/Loader/index.ts +0 -25
- package/src/components/Loader/styles.module.scss +0 -16
- package/src/components/MediaGallery/MediaGalleryModal.ts +0 -82
- package/src/components/MediaGallery/MediaSlider.ts +0 -76
- package/src/components/MediaGallery/index.ts +0 -92
- package/src/components/MediaGallery/styles.module.scss +0 -156
- package/src/components/MediaUpload/index.ts +0 -233
- package/src/components/MediaUpload/styles.module.scss +0 -118
- package/src/components/Modal/index.ts +0 -87
- package/src/components/Modal/styles.module.scss +0 -441
- package/src/components/MultipurposeField/Dropdown/ListBoxItem.tsx +0 -59
- package/src/components/MultipurposeField/Dropdown/index.tsx +0 -1202
- package/src/components/MultipurposeField/Dropdown/styles.module.scss +0 -215
- package/src/components/MultipurposeField/TagMenu/index.ts +0 -536
- package/src/components/MultipurposeField/TagMenu/styles.module.scss +0 -175
- package/src/components/MultipurposeField/TagOptions/index.tsx +0 -83
- package/src/components/MultipurposeField/TagOptions/styles.module.scss +0 -95
- package/src/components/MultipurposeField/index.tsx +0 -944
- package/src/components/MultipurposeField/styles.module.scss +0 -77
- package/src/components/NewModal/index.ts +0 -69
- package/src/components/NewModal/styles.module.scss +0 -70
- package/src/components/OverflowTooltip/index.tsx +0 -59
- package/src/components/PopUp/ConfirmationPopUp/index.ts +0 -58
- package/src/components/PopUp/ConfirmationPopUp/styles.module.scss +0 -49
- package/src/components/PopUp/SuccessPopUp/index.ts +0 -62
- package/src/components/PopUp/SuccessPopUp/styles.module.scss +0 -38
- package/src/components/RadioGroup/Radio.ts +0 -128
- package/src/components/RadioGroup/index.ts +0 -169
- package/src/components/RadioGroup/styles.module.scss +0 -81
- package/src/components/Search/index.ts +0 -69
- package/src/components/Search/styles.module.scss +0 -149
- package/src/components/TabBar/Tab.ts +0 -33
- package/src/components/TabBar/index.ts +0 -64
- package/src/components/TabBar/styles.module.scss +0 -43
- package/src/components/Tag/index.ts +0 -29
- package/src/components/Tag/styles.module.scss +0 -57
- package/src/components/TagsMenu/index.ts +0 -1697
- package/src/components/TagsMenu/styles.module.scss +0 -350
- package/src/components/TestComponent/index.ts +0 -71
- package/src/components/TestComponent/styles.module.scss +0 -152
- package/src/components/TextArea/index.ts +0 -172
- package/src/components/TextArea/styles.module.scss +0 -72
- package/src/components/TextContent/index.tsx +0 -128
- package/src/components/TextContent/styles.module.scss +0 -6
- package/src/components/ThreeDotLoader/index.ts +0 -39
- package/src/components/ThreeDotLoader/styles.module.scss +0 -41
- package/src/components/TimeInput/index.ts +0 -129
- package/src/components/TimeInput/styles.module.scss +0 -16
- package/src/components/Toggle/index.ts +0 -34
- package/src/components/Toggle/styles.module.scss +0 -56
- package/src/components/Toggle-v2/index.ts +0 -40
- package/src/components/Toggle-v2/styles.module.scss +0 -86
- package/src/components/Tooltip/index.ts +0 -271
- package/src/components/Tooltip/styles.module.scss +0 -105
- package/src/components/form/FunctionField/index.ts +0 -816
- package/src/components/form/FunctionField/styles.module.scss +0 -478
- package/src/components/form/ObjectField/__snapshots__/index.ts.test.tsx.snap +0 -3
- package/src/components/form/ObjectField/index.ts +0 -593
- package/src/components/form/ObjectField/index.ts.test.tsx +0 -213
- package/src/components/form/ObjectField/styles.module.scss +0 -103
- package/src/components/form/index.ts +0 -4
- package/src/contexts/AppContext.ts +0 -12
- package/src/declaration.d.ts +0 -7
- package/src/extensions/HMAC.ts +0 -25
- package/src/extensions/IntegryAPIError.ts +0 -19
- package/src/features/common/AccountDropdown/index.ts +0 -291
- package/src/features/common/AccountDropdown/styles.module.scss +0 -19
- package/src/features/common/ActionForm/index.ts +0 -2602
- package/src/features/common/ActionForm/styles.module.scss +0 -35
- package/src/features/common/AppCard/index.ts +0 -207
- package/src/features/common/AppCard/styles.module.scss +0 -117
- package/src/features/common/AppCardCompact/index.ts +0 -189
- package/src/features/common/AppCardCompact/styles.module.scss +0 -141
- package/src/features/common/AuthSelector/index.ts +0 -537
- package/src/features/common/AuthSelector/styles.module.scss +0 -161
- package/src/features/common/AuthSelectorCompact/index.ts +0 -706
- package/src/features/common/AuthSelectorCompact/styles.module.scss +0 -219
- package/src/features/common/AuthSelectorDropdown/index.ts +0 -704
- package/src/features/common/AuthSelectorDropdown/styles.module.scss +0 -361
- package/src/features/common/AuthSelectorV2/index.ts +0 -336
- package/src/features/common/AuthSelectorV2/styles.module.scss +0 -235
- package/src/features/common/DynamicField/index.ts +0 -402
- package/src/features/common/DynamicField/styles.module.scss +0 -266
- package/src/features/common/DynamicTypedField/index.ts +0 -504
- package/src/features/common/DynamicTypedField/styles.module.scss +0 -135
- package/src/features/common/FunctionForm/index.ts +0 -1095
- package/src/features/common/FunctionForm/styles.module.scss +0 -225
- package/src/features/common/MappingUI/index.ts +0 -649
- package/src/features/common/MappingUI/styles.module.scss +0 -121
- package/src/features/common/MarketplaceAppCard/index.ts +0 -279
- package/src/features/common/MarketplaceAppCard/styles.module.scss +0 -231
- package/src/features/common/MarketplaceAppCardCompact/index.ts +0 -283
- package/src/features/common/MarketplaceAppCardCompact/styles.module.scss +0 -255
- package/src/features/common/NewMappingUI/index.ts +0 -515
- package/src/features/common/NewMappingUI/styles.module.scss +0 -113
- package/src/features/common/RequestAppWidget/RequestAppModal/index.ts +0 -67
- package/src/features/common/RequestAppWidget/RequestAppModal/styles.module.scss +0 -23
- package/src/features/common/RequestAppWidget/index.ts +0 -48
- package/src/features/common/RequestAppWidget/request-app-form.ts +0 -89
- package/src/features/common/RequestAppWidget/styles.module.scss +0 -43
- package/src/features/common/SectionField/index.ts +0 -272
- package/src/features/common/SectionField/styles.module.scss +0 -67
- package/src/features/common/Step/index.ts +0 -827
- package/src/features/common/Step/styles.module.scss +0 -12
- package/src/features/common/StepNavigation/CollapsedSteps.ts +0 -131
- package/src/features/common/StepNavigation/NavItem.ts +0 -111
- package/src/features/common/StepNavigation/index.ts +0 -261
- package/src/features/common/StepNavigation/styles.module.scss +0 -117
- package/src/features/common/Steps/index.ts +0 -1140
- package/src/features/common/Steps/styles.module.scss +0 -314
- package/src/features/containers/AppFlowContainer/AppFlowListing/compactStyles.module.scss +0 -404
- package/src/features/containers/AppFlowContainer/AppFlowListing/flow-instance.tsx +0 -367
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCard.test.tsx +0 -58
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCard.tsx +0 -208
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCardCompact.test.tsx +0 -49
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCardCompact.tsx +0 -421
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowInstanceCompact.tsx +0 -577
- package/src/features/containers/AppFlowContainer/AppFlowListing/index.tsx +0 -83
- package/src/features/containers/AppFlowContainer/AppFlowListing/styles.module.scss +0 -233
- package/src/features/containers/AppFlowContainer/AppFlowWrap/app-page-loader.tsx +0 -45
- package/src/features/containers/AppFlowContainer/AppFlowWrap/index.tsx +0 -1085
- package/src/features/containers/AppFlowContainer/AppFlowWrap/styles.module.scss +0 -465
- package/src/features/containers/AppFlowContainer/Authentication/index.ts +0 -610
- package/src/features/containers/AppFlowContainer/Authentication/styles.module.scss +0 -468
- package/src/features/containers/AppFlowContainer/index.ts +0 -114
- package/src/features/containers/AppPageContainer/AppPage/index.tsx +0 -262
- package/src/features/containers/AppPageContainer/AppPage/styles.module.scss +0 -120
- package/src/features/containers/AppPageContainer/IntegrationCard/index.ts +0 -165
- package/src/features/containers/AppPageContainer/IntegrationCard/styles.module.scss +0 -81
- package/src/features/containers/AppPageContainer/index.tsx +0 -93
- package/src/features/containers/AppPageContainer/styles.module.scss +0 -0
- package/src/features/containers/AppsForFlows/index.ts +0 -161
- package/src/features/containers/AppsForFlows/styles.module.scss +0 -280
- package/src/features/containers/AppsForFlowsCompact/index.ts +0 -161
- package/src/features/containers/AppsForFlowsCompact/styles.module.scss +0 -279
- package/src/features/containers/AuthSetupContainer/AppSelection.ts +0 -73
- package/src/features/containers/AuthSetupContainer/AuthTypeSelection.ts +0 -67
- package/src/features/containers/AuthSetupContainer/Footer.ts +0 -32
- package/src/features/containers/AuthSetupContainer/Header.ts +0 -39
- package/src/features/containers/AuthSetupContainer/PostAdditionPopup.ts +0 -27
- package/src/features/containers/AuthSetupContainer/index.ts +0 -349
- package/src/features/containers/AuthSetupContainer/styles.module.scss +0 -229
- package/src/features/containers/FlowSetupContainer/index.ts +0 -391
- package/src/features/containers/FlowSetupContainer/styles.module.scss +0 -18
- package/src/features/containers/MarkeplaceApps/index.ts +0 -583
- package/src/features/containers/MarkeplaceApps/styles.module.scss +0 -558
- package/src/features/containers/MarketplaceAppsCompact/index.ts +0 -585
- package/src/features/containers/MarketplaceAppsCompact/styles.module.scss +0 -563
- package/src/features/containers/MarketplaceAppsContainer/index.ts +0 -91
- package/src/features/containers/MarketplaceContainer/AppCard/index.ts +0 -91
- package/src/features/containers/MarketplaceContainer/AppCard/styles.module.scss +0 -66
- package/src/features/containers/MarketplaceContainer/AppListing/index.ts +0 -34
- package/src/features/containers/MarketplaceContainer/AppListing/styles.module.scss +0 -10
- package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/index.ts +0 -132
- package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/styles.module.scss +0 -117
- package/src/features/containers/MarketplaceContainer/index.ts +0 -242
- package/src/features/containers/MarketplaceContainer/styles.module.scss +0 -84
- package/src/features/containers/SDKContainer/index.ts +0 -817
- package/src/features/containers/SDKContainer/styles.module.scss +0 -266
- package/src/features/containers/SDKDebugContainer/index.ts +0 -137
- package/src/features/containers/SDKDebugContainer/styles.module.scss +0 -37
- package/src/features/containers/SDKFailedContainer/index.ts +0 -117
- package/src/features/containers/SDKFailedContainer/styles.module.scss +0 -57
- package/src/features/integrations/IntegrationRow/Icons.ts +0 -77
- package/src/features/integrations/IntegrationRow/index.ts +0 -129
- package/src/features/integrations/IntegrationRow/styles.module.scss +0 -62
- package/src/features/integrations/IntegrationsHeader/index.ts +0 -34
- package/src/features/integrations/IntegrationsHeader/styles.module.scss +0 -47
- package/src/features/integrations/IntegrationsList/index.ts +0 -252
- package/src/features/integrations/IntegrationsList/styles.module.scss +0 -67
- package/src/features/templates/Template/index.ts +0 -295
- package/src/features/templates/Template/styles.module.scss +0 -226
- package/src/features/templates/TemplatesView/index.ts +0 -368
- package/src/features/templates/TemplatesView/styles.module.scss +0 -71
- package/src/features/templates/TemplatesViewCompact/index.ts +0 -364
- package/src/features/templates/TemplatesViewCompact/styles.module.scss +0 -141
- package/src/hooks/useAutosizeTextArea.ts +0 -22
- package/src/hooks/useCustomRef.ts +0 -13
- package/src/hooks/useDebounce.ts +0 -17
- package/src/hooks/useElementResize.ts +0 -40
- package/src/hooks/useEventListener.ts +0 -42
- package/src/hooks/useHover.ts +0 -40
- package/src/hooks/useOnClickOutside.ts +0 -32
- package/src/index.ts +0 -2244
- package/src/index.umd.ts +0 -13
- package/src/interfaces/index.ts +0 -938
- package/src/modules/api/index.ts +0 -1325
- package/src/modules/api/responseHandler.ts +0 -38
- package/src/modules/event-emitter/index.ts +0 -72
- package/src/modules/event-emitter/runners/abstract.ts +0 -21
- package/src/modules/event-emitter/runners/default.ts +0 -11
- package/src/modules/event-emitter/runners/ntimes.ts +0 -28
- package/src/modules/event-emitter/types.ts +0 -34
- package/src/store/actionFunctions.ts +0 -1578
- package/src/store/index.ts +0 -17
- package/src/store/initialState.ts +0 -58
- package/src/types/index.ts +0 -320
- package/src/types/preact-compat.d.ts +0 -4
- package/src/types/store.ts +0 -366
- package/src/types/utils.ts +0 -19
- package/src/utils/ActivityOutputUtils.ts +0 -176
- package/src/utils/common.ts +0 -20
- package/src/utils/copyToClipboard.ts +0 -24
- package/src/utils/datetime.ts +0 -101
- package/src/utils/getUrlParam.ts +0 -11
- package/src/utils/isAuthMessage.ts +0 -16
- package/src/utils/isBrowser.ts +0 -1
- package/src/utils/jsonEncodeDecode.ts +0 -15
- package/src/utils/objectUtils.ts +0 -117
- package/src/utils/popup.ts +0 -30
- package/src/utils/searchJson.ts +0 -51
- package/src/utils/stepUtils.ts +0 -45
- package/src/utils/truncate.ts +0 -6
- package/test/setup.ts +0 -1
- package/vitest.config.ts +0 -16
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { html } from 'htm/preact';
|
|
2
|
-
import { useEffect, useContext } from 'preact/hooks';
|
|
3
|
-
import { connect } from 'unistore/preact';
|
|
4
|
-
import { Modal } from '@/components/Modal';
|
|
5
|
-
import { MarketplaceRenderModes, ViewStyles } from '@/types';
|
|
6
|
-
import { actionFunctions } from '@/store';
|
|
7
|
-
import AppContext from '@/contexts/AppContext';
|
|
8
|
-
import { StoreType } from '@/types/store';
|
|
9
|
-
import { UserConfig } from '@/interfaces';
|
|
10
|
-
import { AppPage } from './AppPage';
|
|
11
|
-
import styles from './styles.module.scss';
|
|
12
|
-
|
|
13
|
-
interface ContainerProps extends StoreType {
|
|
14
|
-
marketplaceId: string;
|
|
15
|
-
appId: string;
|
|
16
|
-
userConfig?: UserConfig;
|
|
17
|
-
renderMode: MarketplaceRenderModes;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const AppPageContainer = (props: ContainerProps) => {
|
|
21
|
-
const {
|
|
22
|
-
renderMode,
|
|
23
|
-
marketplaceId,
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
-
appId,
|
|
26
|
-
userConfig,
|
|
27
|
-
genericData,
|
|
28
|
-
} = props;
|
|
29
|
-
const context = useContext(AppContext);
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (marketplaceId) {
|
|
33
|
-
context?.apiHandler
|
|
34
|
-
.getMarketplaceDetails({ marketplaceId })
|
|
35
|
-
.then((data) => {
|
|
36
|
-
if (data) {
|
|
37
|
-
props.setGenericData({
|
|
38
|
-
marketplaceDetail: data.meta
|
|
39
|
-
})
|
|
40
|
-
} else {
|
|
41
|
-
console.error(`Failed to fetch marketplace details`);
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
}
|
|
45
|
-
}, [marketplaceId]);
|
|
46
|
-
|
|
47
|
-
const handleCloseMarketplaceModal = () => {
|
|
48
|
-
props.setStoreState({
|
|
49
|
-
showMarketplaceModal: false,
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return html`
|
|
55
|
-
<div class="${styles['integry-container']} ${'integry-container'}">
|
|
56
|
-
${renderMode === MarketplaceRenderModes.INLINE &&
|
|
57
|
-
html`
|
|
58
|
-
<div
|
|
59
|
-
class="${styles.inlineSetup} ${'integry-container__marketplace--inline'}"
|
|
60
|
-
>
|
|
61
|
-
<${AppPage} />
|
|
62
|
-
</div>
|
|
63
|
-
`}
|
|
64
|
-
</div>
|
|
65
|
-
${renderMode === MarketplaceRenderModes.MODAL &&
|
|
66
|
-
html`
|
|
67
|
-
<${Modal}
|
|
68
|
-
isOpen=${props.showMarketplaceModal}
|
|
69
|
-
onClose=${handleCloseMarketplaceModal}
|
|
70
|
-
className="marketplace-modal"
|
|
71
|
-
isCompact=${genericData.viewStyle === ViewStyles.COMPACT}
|
|
72
|
-
>
|
|
73
|
-
<div class="${styles.modalSetup} ${'integry-container__marketplace--modal'}">
|
|
74
|
-
<div class=${styles.modalHeader}>
|
|
75
|
-
<div class="${styles.modalTitle}">${userConfig?.marketplaceModalTitle || 'Marketplace'}</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="${styles.modalContentWrap}">
|
|
78
|
-
<${AppPage} />
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<//>
|
|
82
|
-
`}
|
|
83
|
-
`;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export default connect<ContainerProps, unknown, StoreType, unknown>(
|
|
87
|
-
[
|
|
88
|
-
'userConfig',
|
|
89
|
-
'genericData',
|
|
90
|
-
'showMarketplaceModal',
|
|
91
|
-
],
|
|
92
|
-
actionFunctions,
|
|
93
|
-
)(AppPageContainer);
|
|
File without changes
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { html } from 'htm/preact';
|
|
2
|
-
import {
|
|
3
|
-
useEffect,
|
|
4
|
-
useState,
|
|
5
|
-
useContext
|
|
6
|
-
} from 'preact/hooks';
|
|
7
|
-
|
|
8
|
-
import { Loader } from '@/components/Loader';
|
|
9
|
-
import AppCard from '@/features/common/AppCard';
|
|
10
|
-
import AppCardCompact from '@/features/common/AppCardCompact';
|
|
11
|
-
import Footer from '@/components/Footer';
|
|
12
|
-
|
|
13
|
-
import { connect } from 'unistore/preact';
|
|
14
|
-
import { StoreType } from '@/types/store';
|
|
15
|
-
import { actionFunctions } from '@/store';
|
|
16
|
-
import AppContext from '@/contexts/AppContext';
|
|
17
|
-
import { ViewStyles } from '@/types';
|
|
18
|
-
|
|
19
|
-
import styles from './styles.module.scss';
|
|
20
|
-
|
|
21
|
-
const AppsForFlows = (props: any) => {
|
|
22
|
-
const { genericData, renderMode, userConfig } = props;
|
|
23
|
-
const context = useContext(AppContext);
|
|
24
|
-
const [apps, setApps] = useState<any[]>([]);
|
|
25
|
-
const [isFetchingApps, setIsFetchingApps] = useState<boolean>(true);
|
|
26
|
-
const [searchText, setSearchText] = useState<string>('');
|
|
27
|
-
const [totalApps, setTotalApps] = useState<number>(0);
|
|
28
|
-
const getApps = ({
|
|
29
|
-
nextURL = null,
|
|
30
|
-
currentApps = <any>[],
|
|
31
|
-
}) => {
|
|
32
|
-
setIsFetchingApps(true);
|
|
33
|
-
if(genericData.deploymentId && genericData.showTemplates) {
|
|
34
|
-
context?.apiHandler.getAdminApps({
|
|
35
|
-
bundleId: genericData.deploymentId,
|
|
36
|
-
nextURL,
|
|
37
|
-
}).then((appsResponse) => {
|
|
38
|
-
const { links } = appsResponse;
|
|
39
|
-
const tempApps = appsResponse.results.map((app: any) => ({
|
|
40
|
-
...app,
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
if (links.next) {
|
|
44
|
-
getApps({
|
|
45
|
-
nextURL: links.next,
|
|
46
|
-
currentApps: [...currentApps, ...tempApps],
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
setTotalApps(appsResponse.count || (tempApps || []).length);
|
|
50
|
-
setApps([...currentApps, ...tempApps]);
|
|
51
|
-
setIsFetchingApps(false);
|
|
52
|
-
}
|
|
53
|
-
}).catch((error) => {
|
|
54
|
-
// eslint-disable-next-line no-console
|
|
55
|
-
console.log('error', {error});
|
|
56
|
-
setIsFetchingApps(false);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
context?.apiHandler.getApps({
|
|
61
|
-
tags: userConfig.tags || [],
|
|
62
|
-
nextURL,
|
|
63
|
-
}).then((appsResponse) => {
|
|
64
|
-
const { links } = appsResponse;
|
|
65
|
-
const tempApps = appsResponse.results.map((app: any) => ({
|
|
66
|
-
...app,
|
|
67
|
-
}));
|
|
68
|
-
|
|
69
|
-
if (links.next) {
|
|
70
|
-
getApps({
|
|
71
|
-
nextURL: links.next,
|
|
72
|
-
currentApps: [...currentApps, ...tempApps],
|
|
73
|
-
});
|
|
74
|
-
} else {
|
|
75
|
-
setTotalApps(appsResponse.count || (tempApps || []).length);
|
|
76
|
-
setApps([...currentApps, ...tempApps]);
|
|
77
|
-
setIsFetchingApps(false);
|
|
78
|
-
}
|
|
79
|
-
}).catch((error) => {
|
|
80
|
-
// eslint-disable-next-line no-console
|
|
81
|
-
console.log('error', {error});
|
|
82
|
-
setIsFetchingApps(false);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const filterApps = (inputString: string, items: any) => {
|
|
87
|
-
const cleanedInput = inputString.trim(); // Remove trailing spaces
|
|
88
|
-
|
|
89
|
-
if (cleanedInput === '') {
|
|
90
|
-
return items; // Return all items if cleanedInput is empty
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const filteredItems = items.filter((item: any) =>
|
|
94
|
-
item.name.toLowerCase().includes(cleanedInput.toLowerCase())
|
|
95
|
-
);
|
|
96
|
-
return filteredItems;
|
|
97
|
-
}
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
getApps({
|
|
100
|
-
currentApps: apps,
|
|
101
|
-
});
|
|
102
|
-
}, []);
|
|
103
|
-
return html`
|
|
104
|
-
<div id="embed--appsContainer" class="${renderMode === 'INLINE' ?
|
|
105
|
-
styles.appsContainerInline :
|
|
106
|
-
styles.appsContainer}
|
|
107
|
-
${genericData.viewStyle === ViewStyles.COMPACT ? styles['compact-view'] : ''}"
|
|
108
|
-
style="${renderMode === 'INLINE' && props.showMarketplaceModal ? 'display: flex;' : ''}">
|
|
109
|
-
<div id="apps-header" class=${styles.appsHeader}>
|
|
110
|
-
<p id="appsHeaderTitle" class=${styles.appsHeaderTitle}>${userConfig.title || 'Apps'}${' '}${isFetchingApps ? html`<${Loader} />` : html`(${totalApps || apps.length})`}</p>
|
|
111
|
-
<div id="search-container" class=${styles.searchContainer}>
|
|
112
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none">
|
|
113
|
-
<path d="M14.7706 13.6638L11.148 10.0407C13.0421 7.59989 12.8712 4.06416 10.6303 1.82385C9.45395 0.647448 7.89024 0 6.2271 0C4.56335 0 2.99953 0.647997 1.82385 1.82385C0.647448 2.99965 0 4.56335 0 6.2271C0 7.89084 0.647996 9.45466 1.82385 10.6303C3.00025 11.8067 4.56396 12.4542 6.2271 12.4542C7.62663 12.4542 8.95411 11.9942 10.0413 11.1481L13.6638 14.7706C13.8168 14.9236 14.0167 14.9997 14.2172 14.9997C14.4172 14.9997 14.6177 14.9236 14.7706 14.7706C15.0765 14.4654 15.0765 13.9697 14.7706 13.6639L14.7706 13.6638ZM2.93043 9.52291C2.05038 8.64226 1.56482 7.47179 1.56482 6.22694C1.56482 4.98153 2.04978 3.81114 2.93043 2.93037C3.81049 2.04972 4.98156 1.56476 6.2264 1.56476C7.47124 1.56476 8.6422 2.04972 9.52297 2.93037C11.3409 4.74767 11.3409 7.705 9.52297 9.52276C8.64232 10.4034 7.47124 10.8884 6.2264 10.8884C4.98156 10.8884 3.8112 10.4034 2.93043 9.52276V9.52291Z" fill="#BDBDBD"/>
|
|
114
|
-
</svg>
|
|
115
|
-
<input
|
|
116
|
-
id="search-apps-flow-lifecycle"
|
|
117
|
-
class=${styles.searchInput}
|
|
118
|
-
placeholder="${userConfig.searchPlaceholder || 'Search for apps'}"
|
|
119
|
-
value=${searchText}
|
|
120
|
-
oninput=${(e: any) => {
|
|
121
|
-
setSearchText(e.target.value);
|
|
122
|
-
}}
|
|
123
|
-
/>
|
|
124
|
-
${searchText !== '' && html`
|
|
125
|
-
<svg class=${styles.clearCta} onclick=${() => {
|
|
126
|
-
setSearchText('');
|
|
127
|
-
}} xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
128
|
-
<path d="M10.2426 10.2425L1.75732 1.75732" stroke="#333333" stroke-width="1.33333" stroke-linecap="round"/>
|
|
129
|
-
<path d="M10.2426 1.75732L1.75732 10.2425" stroke="#333333" stroke-width="1.33333" stroke-linecap="round"/>
|
|
130
|
-
</svg>`}
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
${isFetchingApps && html`<div style="height: 300px;" />`}
|
|
134
|
-
${!isFetchingApps && filterApps(searchText ,apps || []).length < 1 && html`
|
|
135
|
-
<div id="appsForFlowsCardsNoAppFound" class=${styles.appsForFlowsCardsNoAppFound}>
|
|
136
|
-
<svg width="100" height="100" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity="0.5"><path d="M52 100.38C77.9574 100.38 99 79.3378 99 53.3804C99 27.423 77.9574 6.38037 52 6.38037C26.0426 6.38037 5 27.423 5 53.3804C5 79.3378 26.0426 100.38 52 100.38Z" fill="#F9F9F9"></path><path d="M46.3186 16.7539V7.87435C46.3186 3.51833 42.7943 0 38.431 0H7.88758C3.52423 0 0 3.51833 0 7.87435V37.4451C0 41.8011 3.52423 45.3194 7.88758 45.3194H16.9499C19.0477 30.2409 31.1308 18.4293 46.3186 16.7539Z" fill="#EEEEEE"></path><path d="M16.9499 54.5339H7.88758C3.52423 54.5339 0 58.0523 0 62.4083V91.979C0 96.335 3.52423 99.8533 7.88758 99.8533H22.4041H38.431C42.7943 99.8533 46.3186 96.335 46.3186 91.979V83.0156C31.1308 81.3402 19.0477 69.5287 16.9499 54.5339Z" fill="#EEEEEE"></path><path d="M96.6648 80.2514L80.3023 63.9163C82.3161 59.6441 83.407 54.8692 83.407 49.9268C83.407 31.4974 68.4709 16.5864 50.0106 16.5864C48.7519 16.5864 47.5772 16.6702 46.3186 16.8377V22.3665V37.5289C46.3186 41.8849 42.7943 45.4032 38.431 45.4032H22.4041H16.9499C16.6982 46.9111 16.6143 48.4189 16.6143 50.0105C16.6143 51.6022 16.7821 53.11 16.9499 54.6179H38.431C42.7943 54.6179 46.3186 58.1362 46.3186 62.4922V76.9006V83.1833C47.4933 83.3509 48.7519 83.4346 50.0106 83.4346C55.0452 83.4346 59.7442 82.2619 64.0237 80.3352L80.3862 96.6703C84.8335 101.11 92.2176 101.11 96.6648 96.6703C101.112 91.9792 101.112 84.6912 96.6648 80.2514Z" fill="#E2E2E2"></path><path d="M38.4308 45.3194C42.7941 45.3194 46.3184 41.801 46.3184 37.445V22.2827V16.7539C31.1306 18.4293 19.0475 30.2408 16.9497 45.3194H22.4039H38.4308Z" fill="#C9C9C9"></path><path d="M46.3184 62.4083C46.3184 58.0523 42.7941 54.5339 38.4308 54.5339H16.9497C19.0475 69.6125 31.1306 81.424 46.3184 83.0994V76.8167V62.4083Z" fill="#C9C9C9"></path></g></svg>
|
|
137
|
-
${searchText !== '' && html`<p>Sorry, we can't find the app you're looking for. Please try again with a different search term.</p>`}
|
|
138
|
-
${searchText === '' && html`<p>Sorry, no apps found.</p>`}
|
|
139
|
-
</div>`}
|
|
140
|
-
${!isFetchingApps && filterApps(searchText ,apps || []).length > 0 && html`
|
|
141
|
-
<div id="${`embed--appsForFlowsCardsComfortable__${renderMode}`}"
|
|
142
|
-
class="${props.genericData.viewStyle === ViewStyles.COMPACT ? styles.appsForFlowsCardsCompact : styles.appsForFlowsCards}">
|
|
143
|
-
${filterApps(searchText ,apps || []).map((app: any) =>
|
|
144
|
-
html`
|
|
145
|
-
<${genericData.viewStyle === ViewStyles.COMPACT ? AppCardCompact : AppCard} key=${app.id} app=${app} onAppClick=${(e: any) => {
|
|
146
|
-
props.setGenericData({
|
|
147
|
-
app_id: e.id,
|
|
148
|
-
})
|
|
149
|
-
}} />
|
|
150
|
-
`)}
|
|
151
|
-
</div>`}
|
|
152
|
-
${!isFetchingApps && html`<${Footer} style=${renderMode === 'INLINE' ? 'padding-top: 12px;' : 'padding-top: 12px; box-shadow: 0px -6px 10px 0px rgba(255, 255, 255, 0.8);'} />`}
|
|
153
|
-
</div>
|
|
154
|
-
`;
|
|
155
|
-
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
export default connect<StoreType, unknown, StoreType, unknown>(
|
|
159
|
-
['genericData', 'userConfig', 'showMarketplaceModal'],
|
|
160
|
-
actionFunctions,
|
|
161
|
-
)(AppsForFlows);
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
.appsContainer {
|
|
2
|
-
* {
|
|
3
|
-
user-select: none;
|
|
4
|
-
}
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: flex-start;
|
|
8
|
-
justify-content: flex-start;
|
|
9
|
-
border-radius: 8px;
|
|
10
|
-
height: calc(100%);
|
|
11
|
-
padding-bottom: 0px;
|
|
12
|
-
min-height: 615px;
|
|
13
|
-
// min-height: 605px;
|
|
14
|
-
max-height: calc(100vh - 140px);
|
|
15
|
-
width: 100%;
|
|
16
|
-
|
|
17
|
-
.appsForFlowsCards {
|
|
18
|
-
height: calc(100vh - 272px);
|
|
19
|
-
max-height: 465px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.appsHeader {
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.appsForFlowsCardsNoAppFound {
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: flex-start;
|
|
32
|
-
width: 100%;
|
|
33
|
-
margin-top: 24px;
|
|
34
|
-
flex: 1;
|
|
35
|
-
|
|
36
|
-
p {
|
|
37
|
-
font-weight: 400;
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
line-height: 24px;
|
|
40
|
-
text-align: center;
|
|
41
|
-
color: #999999;
|
|
42
|
-
max-width: 318px;
|
|
43
|
-
margin: 0px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.appsContainerInline {
|
|
48
|
-
* {
|
|
49
|
-
user-select: none;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
display: block;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
justify-content: flex-start;
|
|
56
|
-
border-radius: 8px;
|
|
57
|
-
height: calc(100%);
|
|
58
|
-
margin: auto;
|
|
59
|
-
min-height: 100%;
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: flex-start;
|
|
63
|
-
justify-content: flex-start;
|
|
64
|
-
max-width: 730px;
|
|
65
|
-
border: 1px solid #eeeeee;
|
|
66
|
-
|
|
67
|
-
.appsHeader {
|
|
68
|
-
width: 100%;
|
|
69
|
-
box-shadow: none;
|
|
70
|
-
|
|
71
|
-
.searchContainer {
|
|
72
|
-
width: calc(100% - 75px);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.appsForFlowsCards {
|
|
77
|
-
width: calc(100% - 40px);
|
|
78
|
-
// height: 100%;
|
|
79
|
-
display: grid;
|
|
80
|
-
--auto-grid-min-size: 268px;
|
|
81
|
-
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
|
|
82
|
-
grid-gap: 8px;
|
|
83
|
-
grid-template-rows: repeat(auto-fill, 83px);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.appsHeader {
|
|
88
|
-
// box-shadow: 0px 1px 0px 0px #EFEFEF;
|
|
89
|
-
box-shadow: none;
|
|
90
|
-
width: 100%;
|
|
91
|
-
|
|
92
|
-
.appsHeaderTitle {
|
|
93
|
-
color: var(--black-and-grey-title-and-desc, #333);
|
|
94
|
-
font-family: Inter;
|
|
95
|
-
font-size: 16px;
|
|
96
|
-
font-style: normal;
|
|
97
|
-
font-weight: 500;
|
|
98
|
-
line-height: normal;
|
|
99
|
-
width: calc(100% - 26px);
|
|
100
|
-
margin-left: 26px;
|
|
101
|
-
margin-top: 16px;
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: row;
|
|
104
|
-
align-items: center;
|
|
105
|
-
justify-content: flex-start;
|
|
106
|
-
gap: 4px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.searchContainer {
|
|
110
|
-
// margin: auto;
|
|
111
|
-
margin-left: 24px;
|
|
112
|
-
margin-top: 17px;
|
|
113
|
-
margin-bottom: 8px;
|
|
114
|
-
border-radius: 8px;
|
|
115
|
-
border: 1px solid #F2F2F2;
|
|
116
|
-
background: #FFF;
|
|
117
|
-
padding: 12px;
|
|
118
|
-
width: calc(100% - 72px);
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-direction: row;
|
|
121
|
-
align-items: center;
|
|
122
|
-
justify-content: flex-start;
|
|
123
|
-
gap: 10px;
|
|
124
|
-
|
|
125
|
-
input {
|
|
126
|
-
width: 100%;
|
|
127
|
-
outline: none;
|
|
128
|
-
border: none;
|
|
129
|
-
font-family: Inter;
|
|
130
|
-
font-size: 12px;
|
|
131
|
-
font-style: normal;
|
|
132
|
-
font-weight: 400;
|
|
133
|
-
line-height: normal;
|
|
134
|
-
color: #333;
|
|
135
|
-
|
|
136
|
-
&:focus {
|
|
137
|
-
outline: none;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&::placeholder {
|
|
141
|
-
color: #999;
|
|
142
|
-
font-family: Inter;
|
|
143
|
-
font-size: 12px;
|
|
144
|
-
font-style: normal;
|
|
145
|
-
font-weight: 400;
|
|
146
|
-
line-height: normal;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.clearCta {
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
.appsForFlowsCards {
|
|
158
|
-
gap: 8px;
|
|
159
|
-
overflow: auto;
|
|
160
|
-
padding-top: 12px;
|
|
161
|
-
padding-bottom: 12px;
|
|
162
|
-
padding-left: 10px;
|
|
163
|
-
padding-right: 10px;
|
|
164
|
-
margin-top: 4px;
|
|
165
|
-
width: calc(100% - 46px);
|
|
166
|
-
// padding-right: 6px;
|
|
167
|
-
margin-left: 12px;
|
|
168
|
-
scrollbar-gutter: stable;
|
|
169
|
-
display: grid;
|
|
170
|
-
--auto-grid-min-size: 262px;
|
|
171
|
-
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
|
|
172
|
-
grid-template-rows: repeat(auto-fill, 83px);
|
|
173
|
-
grid-gap: 8px;
|
|
174
|
-
flex: 1;
|
|
175
|
-
|
|
176
|
-
&::-webkit-scrollbar {
|
|
177
|
-
width: 5px;
|
|
178
|
-
}
|
|
179
|
-
/* Track */
|
|
180
|
-
&::-webkit-scrollbar-track {
|
|
181
|
-
background: transparent;
|
|
182
|
-
border-radius: 10px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/* Handle */
|
|
186
|
-
&::-webkit-scrollbar-thumb {
|
|
187
|
-
background: #ededed;
|
|
188
|
-
border: 1px solid #e7e7e7;
|
|
189
|
-
border-radius: 10px;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/* Handle on hover */
|
|
193
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
194
|
-
background: rgb(116, 116, 116);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.appsForFlowsCardsCompact {
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
gap: 0;
|
|
202
|
-
width: calc(100% + 15px);
|
|
203
|
-
overflow-y: auto;
|
|
204
|
-
scrollbar-gutter: stable;
|
|
205
|
-
padding-bottom: 24px;
|
|
206
|
-
flex: 1;
|
|
207
|
-
|
|
208
|
-
&::-webkit-scrollbar {
|
|
209
|
-
width: 5px;
|
|
210
|
-
}
|
|
211
|
-
/* Track */
|
|
212
|
-
&::-webkit-scrollbar-track {
|
|
213
|
-
background: transparent;
|
|
214
|
-
border-radius: 10px;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/* Handle */
|
|
218
|
-
&::-webkit-scrollbar-thumb {
|
|
219
|
-
background: #ededed;
|
|
220
|
-
border: 1px solid #e7e7e7;
|
|
221
|
-
border-radius: 10px;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/* Handle on hover */
|
|
225
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
226
|
-
background: rgb(116, 116, 116);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.compact-view {
|
|
231
|
-
max-width: 342px;
|
|
232
|
-
margin: 0px;
|
|
233
|
-
padding: 0 24px;
|
|
234
|
-
display: flex;
|
|
235
|
-
flex-direction: column;
|
|
236
|
-
align-items: flex-start;
|
|
237
|
-
justify-content: flex-start;
|
|
238
|
-
margin: 0 auto;
|
|
239
|
-
|
|
240
|
-
.appsHeader {
|
|
241
|
-
.appsHeaderTitle {
|
|
242
|
-
color: var(--black-and-grey-title-and-desc, #333);
|
|
243
|
-
font-family: Inter;
|
|
244
|
-
font-size: 16px;
|
|
245
|
-
font-style: normal;
|
|
246
|
-
font-weight: 500;
|
|
247
|
-
line-height: normal;
|
|
248
|
-
margin-left: 0;
|
|
249
|
-
margin-top: 24px;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.searchContainer {
|
|
254
|
-
margin: 0;
|
|
255
|
-
border-radius: 8px;
|
|
256
|
-
border: 1px solid var(--Gray-6, #F2F2F2);
|
|
257
|
-
background: #FFF;
|
|
258
|
-
padding: 0 12px;
|
|
259
|
-
width: calc(100% - 24px) !important;
|
|
260
|
-
height: 40px;
|
|
261
|
-
|
|
262
|
-
.searchInput {
|
|
263
|
-
color: #333;
|
|
264
|
-
font-family: Inter;
|
|
265
|
-
font-size: 12px;
|
|
266
|
-
font-style: normal;
|
|
267
|
-
font-weight: 400;
|
|
268
|
-
line-height: normal;
|
|
269
|
-
|
|
270
|
-
&::placeholder {
|
|
271
|
-
color: var(--black-and-grey-draft-and-tooltip-desc, #999);
|
|
272
|
-
font-family: Inter;
|
|
273
|
-
font-size: 12px;
|
|
274
|
-
font-style: normal;
|
|
275
|
-
font-weight: 400;
|
|
276
|
-
line-height: normal;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|