@bigbinary/neeto-integrations-frontend 2.10.5 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Daily.cjs.js +30 -14
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +29 -13
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +30 -14
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +29 -13
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Zoom.cjs.js +30 -14
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +29 -13
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +30 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +29 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughM
|
|
|
5
5
|
export { default as WalkthroughModal } from '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
8
|
+
import classnames from 'classnames';
|
|
8
9
|
import i18next, { t as t$1 } from 'i18next';
|
|
9
10
|
import { humanize, noop, isPresent, keysToSnakeCase, _findBy, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
10
11
|
import { withT, useMutationWithInvalidation, withTitle, useQueryParams, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
@@ -19,7 +20,6 @@ import { Form as Form$2, Input, Select, ActionBlock } from '@bigbinary/neetoui/f
|
|
|
19
20
|
import { prop, equals, isEmpty } from 'ramda';
|
|
20
21
|
import * as yup from 'yup';
|
|
21
22
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
22
|
-
import classnames from 'classnames';
|
|
23
23
|
import { Check } from '@bigbinary/neeto-icons';
|
|
24
24
|
|
|
25
25
|
var Manage$1 = withT(function (_ref) {
|
|
@@ -36,6 +36,8 @@ var Manage$1 = withT(function (_ref) {
|
|
|
36
36
|
setIsDisconnectAlertOpen = _ref$setIsDisconnectA === void 0 ? noop : _ref$setIsDisconnectA,
|
|
37
37
|
_ref$isDisconnecting = _ref.isDisconnecting,
|
|
38
38
|
isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
|
|
39
|
+
_ref$onConnect = _ref.onConnect,
|
|
40
|
+
onConnect = _ref$onConnect === void 0 ? undefined : _ref$onConnect,
|
|
39
41
|
_ref$onDisconnect = _ref.onDisconnect,
|
|
40
42
|
onDisconnect = _ref$onDisconnect === void 0 ? undefined : _ref$onDisconnect,
|
|
41
43
|
_ref$onClose = _ref.onClose,
|
|
@@ -52,10 +54,14 @@ var Manage$1 = withT(function (_ref) {
|
|
|
52
54
|
helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
|
|
53
55
|
_ref$managePath = _ref.managePath,
|
|
54
56
|
managePath = _ref$managePath === void 0 ? "" : _ref$managePath,
|
|
57
|
+
_ref$manageUrl = _ref.manageUrl,
|
|
58
|
+
manageUrl = _ref$manageUrl === void 0 ? "" : _ref$manageUrl,
|
|
55
59
|
_ref$integrationName = _ref.integrationName,
|
|
56
60
|
integrationName = _ref$integrationName === void 0 ? "" : _ref$integrationName,
|
|
57
61
|
_ref$disconnectMessag = _ref.disconnectMessage,
|
|
58
62
|
disconnectMessage = _ref$disconnectMessag === void 0 ? "" : _ref$disconnectMessag,
|
|
63
|
+
_ref$disconnectTitle = _ref.disconnectTitle,
|
|
64
|
+
disconnectTitle = _ref$disconnectTitle === void 0 ? "" : _ref$disconnectTitle,
|
|
59
65
|
_ref$isConnectDisable = _ref.isConnectDisabled,
|
|
60
66
|
isConnectDisabled = _ref$isConnectDisable === void 0 ? false : _ref$isConnectDisable,
|
|
61
67
|
_ref$connectTooltipPr = _ref.connectTooltipProps,
|
|
@@ -80,11 +86,13 @@ var Manage$1 = withT(function (_ref) {
|
|
|
80
86
|
}, /*#__PURE__*/React__default.createElement(Check, {
|
|
81
87
|
size: 24
|
|
82
88
|
}))), /*#__PURE__*/React__default.createElement(Typography, {
|
|
83
|
-
className: "neeto-ui-text-gray-800 break-all",
|
|
84
89
|
style: "body1",
|
|
85
|
-
weight: "normal"
|
|
90
|
+
weight: "normal",
|
|
91
|
+
className: classnames("neeto-ui-text-gray-800", {
|
|
92
|
+
"break-all": isConnected
|
|
93
|
+
})
|
|
86
94
|
}, description), helpDocUrl && /*#__PURE__*/React__default.createElement(Typography, {
|
|
87
|
-
className: "neeto-ui-text-gray-800
|
|
95
|
+
className: "neeto-ui-text-gray-800",
|
|
88
96
|
style: "body2",
|
|
89
97
|
weight: "normal"
|
|
90
98
|
}, /*#__PURE__*/React__default.createElement(Trans, {
|
|
@@ -101,8 +109,10 @@ var Manage$1 = withT(function (_ref) {
|
|
|
101
109
|
}
|
|
102
110
|
}))), isConnected ? /*#__PURE__*/React__default.createElement("div", {
|
|
103
111
|
className: "space-x-2"
|
|
104
|
-
}, managePath && /*#__PURE__*/React__default.createElement(Button, {
|
|
112
|
+
}, (managePath || manageUrl) && /*#__PURE__*/React__default.createElement(Button, {
|
|
105
113
|
"data-cy": "manage-button",
|
|
114
|
+
href: manageUrl,
|
|
115
|
+
target: manageUrl ? "_blank" : "_self",
|
|
106
116
|
to: managePath,
|
|
107
117
|
label: t("neetoIntegrations.common.manageIntegration", {
|
|
108
118
|
integration: integrationName || humanize(integration)
|
|
@@ -116,7 +126,7 @@ var Manage$1 = withT(function (_ref) {
|
|
|
116
126
|
onClick: function onClick() {
|
|
117
127
|
return setIsDisconnectAlertOpen(true);
|
|
118
128
|
}
|
|
119
|
-
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
129
|
+
})) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (connectPath || connectUrl || onConnect) && /*#__PURE__*/React__default.createElement(Button, {
|
|
120
130
|
"data-cy": "connect-button",
|
|
121
131
|
disabled: isConnectDisabled,
|
|
122
132
|
href: connectUrl,
|
|
@@ -124,14 +134,15 @@ var Manage$1 = withT(function (_ref) {
|
|
|
124
134
|
tooltipProps: connectTooltipProps,
|
|
125
135
|
label: t("neetoIntegrations.common.connectIntegration", {
|
|
126
136
|
integration: integrationName || humanize(integration)
|
|
127
|
-
})
|
|
128
|
-
|
|
137
|
+
}),
|
|
138
|
+
onClick: onConnect
|
|
139
|
+
})))), /*#__PURE__*/React__default.createElement(DisconnectAlert, {
|
|
129
140
|
isDisconnecting: isDisconnecting,
|
|
130
141
|
onClose: onClose,
|
|
131
142
|
onDisconnect: onDisconnect,
|
|
132
143
|
isOpen: isDisconnectAlertOpen,
|
|
133
|
-
|
|
134
|
-
|
|
144
|
+
message: disconnectMessage || t("settings.integrations.".concat(integration, ".disconnect.message")),
|
|
145
|
+
title: disconnectTitle || t("settings.integrations.".concat(integration, ".disconnect.title"))
|
|
135
146
|
}));
|
|
136
147
|
});
|
|
137
148
|
|
|
@@ -1134,7 +1145,8 @@ var Connect = withT(function (_ref) {
|
|
|
1134
1145
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
1135
1146
|
_ref$onConnect = _ref.onConnect,
|
|
1136
1147
|
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
1137
|
-
children = _ref.children
|
|
1148
|
+
children = _ref.children,
|
|
1149
|
+
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
1138
1150
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1139
1151
|
className: "mx-auto w-full max-w-lg"
|
|
1140
1152
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -1147,10 +1159,14 @@ var Connect = withT(function (_ref) {
|
|
|
1147
1159
|
className: "neeto-ui-text-gray-700 mb-8",
|
|
1148
1160
|
style: "body1",
|
|
1149
1161
|
weight: "normal"
|
|
1150
|
-
}, description), children, /*#__PURE__*/React__default.createElement(
|
|
1162
|
+
}, description), children, /*#__PURE__*/React__default.createElement("div", {
|
|
1163
|
+
className: "flex w-full items-start space-x-4"
|
|
1164
|
+
}, /*#__PURE__*/React__default.createElement(Button, _extends$1({
|
|
1151
1165
|
label: t("neetoIntegrations.common.connect"),
|
|
1152
1166
|
onClick: onConnect
|
|
1153
|
-
}, buttonProps)))
|
|
1167
|
+
}, buttonProps)), isNotEmpty(secondaryButtonProps) && /*#__PURE__*/React__default.createElement(Button, _extends$1({
|
|
1168
|
+
style: "secondary"
|
|
1169
|
+
}, secondaryButtonProps))));
|
|
1154
1170
|
});
|
|
1155
1171
|
Connect.prototypes = {
|
|
1156
1172
|
/**
|