@bigbinary/neeto-integrations-frontend 1.5.0 → 2.1.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/README.md CHANGED
@@ -55,7 +55,44 @@ will run the example app using webpack.
55
55
  webpack-dev-server in host if changes are not applied.
56
56
  8. Video explanation on how to use yalc: https://vimeo.com/722958162/9e931b640c
57
57
 
58
- # Building and releasing.
58
+ ## Exports and Types
59
+
60
+ The **neeto-integrations-frontend** JavaScript library offers two types of
61
+ exports: the common bundle and the per-component bundle.
62
+
63
+ ### Common Bundle
64
+
65
+ The common bundle includes components such as `Card`, `Modal`, and `Connect`.
66
+ You can import them using the following syntax:
67
+
68
+ ```js
69
+ import { Card, Modal, Connect } from "@bigbinary/neeto-integrations-frontend";
70
+ ```
71
+
72
+ To add a component to the common bundle, follow these steps:
73
+
74
+ 1. Place the component inside the `components` folder
75
+ 2. Add the necessary types for the component in the `types.d.ts` file located in
76
+ the library's root directory
77
+ 3. Export the component in the `index.js` file located in the library's root
78
+ directory
79
+
80
+ ### Per-Component Bundle
81
+
82
+ Each component inside the `components/Integrations` folder has its own bundle.
83
+ For example, the `ZapierForm` component can be imported using the following
84
+ syntax:
85
+
86
+ ```js
87
+ import ZapierForm from "@bigbinary/neeto-integrations-frontend/ZapierForm";
88
+ ```
89
+
90
+ To export a component as its own bundle, follow these steps:
91
+
92
+ 1. Place the component strictly inside the `components/Integrations` folder.
93
+ 2. Add the necessary types for the component in the `types` folder.
94
+
95
+ ## Building and releasing.
59
96
 
60
97
  The `@bigbinary/neeto-integrations-frontend` package gets published to NPM when
61
98
  we merge a PR with `patch`, `minor` or `major` label to the `main` branch. The
@@ -0,0 +1,370 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var pure = require('@bigbinary/neeto-commons-frontend/pure');
5
+ var neetoui = require('@bigbinary/neetoui');
6
+ var ramda = require('ramda');
7
+ var reactI18next = require('react-i18next');
8
+ var i18next = require('i18next');
9
+ var utils = require('@bigbinary/neeto-commons-frontend/utils');
10
+ var neetoIcons = require('@bigbinary/neeto-icons');
11
+ var formik = require('@bigbinary/neetoui/formik');
12
+ var Yup = require('yup');
13
+
14
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
+
16
+ function _interopNamespace(e) {
17
+ if (e && e.__esModule) return e;
18
+ var n = Object.create(null);
19
+ if (e) {
20
+ Object.keys(e).forEach(function (k) {
21
+ if (k !== 'default') {
22
+ var d = Object.getOwnPropertyDescriptor(e, k);
23
+ Object.defineProperty(n, k, d.get ? d : {
24
+ enumerable: true,
25
+ get: function () { return e[k]; }
26
+ });
27
+ }
28
+ });
29
+ }
30
+ n["default"] = e;
31
+ return Object.freeze(n);
32
+ }
33
+
34
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
35
+ var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
36
+ var Yup__namespace = /*#__PURE__*/_interopNamespace(Yup);
37
+
38
+ function _arrayWithHoles(arr) {
39
+ if (Array.isArray(arr)) return arr;
40
+ }
41
+
42
+ function _iterableToArrayLimit(arr, i) {
43
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
44
+ if (null != _i) {
45
+ var _s,
46
+ _e,
47
+ _x,
48
+ _r,
49
+ _arr = [],
50
+ _n = !0,
51
+ _d = !1;
52
+ try {
53
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
54
+ if (Object(_i) !== _i) return;
55
+ _n = !1;
56
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
57
+ } catch (err) {
58
+ _d = !0, _e = err;
59
+ } finally {
60
+ try {
61
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
62
+ } finally {
63
+ if (_d) throw _e;
64
+ }
65
+ }
66
+ return _arr;
67
+ }
68
+ }
69
+
70
+ function _arrayLikeToArray(arr, len) {
71
+ if (len == null || len > arr.length) len = arr.length;
72
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
73
+ return arr2;
74
+ }
75
+
76
+ function _unsupportedIterableToArray(o, minLen) {
77
+ if (!o) return;
78
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
79
+ var n = Object.prototype.toString.call(o).slice(8, -1);
80
+ if (n === "Object" && o.constructor) n = o.constructor.name;
81
+ if (n === "Map" || n === "Set") return Array.from(o);
82
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
83
+ }
84
+
85
+ function _nonIterableRest() {
86
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
87
+ }
88
+
89
+ function _slicedToArray(arr, i) {
90
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
91
+ }
92
+
93
+ function _typeof(obj) {
94
+ "@babel/helpers - typeof";
95
+
96
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
97
+ return typeof obj;
98
+ } : function (obj) {
99
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
100
+ }, _typeof(obj);
101
+ }
102
+
103
+ function _toPrimitive(input, hint) {
104
+ if (_typeof(input) !== "object" || input === null) return input;
105
+ var prim = input[Symbol.toPrimitive];
106
+ if (prim !== undefined) {
107
+ var res = prim.call(input, hint || "default");
108
+ if (_typeof(res) !== "object") return res;
109
+ throw new TypeError("@@toPrimitive must return a primitive value.");
110
+ }
111
+ return (hint === "string" ? String : Number)(input);
112
+ }
113
+
114
+ function _toPropertyKey(arg) {
115
+ var key = _toPrimitive(arg, "string");
116
+ return _typeof(key) === "symbol" ? key : String(key);
117
+ }
118
+
119
+ function _defineProperty(obj, key, value) {
120
+ key = _toPropertyKey(key);
121
+ if (key in obj) {
122
+ Object.defineProperty(obj, key, {
123
+ value: value,
124
+ enumerable: true,
125
+ configurable: true,
126
+ writable: true
127
+ });
128
+ } else {
129
+ obj[key] = value;
130
+ }
131
+ return obj;
132
+ }
133
+
134
+ var Menu = neetoui.Dropdown.Menu,
135
+ MenuItem = neetoui.Dropdown.MenuItem;
136
+ var Actions = function Actions(_ref) {
137
+ var apiKey = _ref.apiKey,
138
+ setApiKeyToDelete = _ref.setApiKeyToDelete;
139
+ var _useTranslation = reactI18next.useTranslation(),
140
+ t = _useTranslation.t;
141
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
142
+ buttonStyle: "text",
143
+ icon: neetoIcons.MenuHorizontal,
144
+ strategy: "fixed"
145
+ }, /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
146
+ "data-cy": "delete-apikey-button",
147
+ onClick: function onClick() {
148
+ return setApiKeyToDelete(apiKey);
149
+ }
150
+ }, t("neetoIntegrations.common.delete"))));
151
+ };
152
+
153
+ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
154
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
155
+ var getApiKeysTableColumnData = function getApiKeysTableColumnData() {
156
+ return [{
157
+ title: i18next__default["default"].t("neetoIntegrations.zapier.tableColumns.label"),
158
+ dataIndex: "options",
159
+ key: "options",
160
+ width: 272,
161
+ render: function render(options, _ref) {
162
+ var actions = _ref.actions;
163
+ return /*#__PURE__*/React__default["default"].createElement("div", {
164
+ className: "flex items-center justify-between gap-x-3"
165
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
166
+ className: "w-4/5",
167
+ style: "body2"
168
+ }, options === null || options === void 0 ? void 0 : options.label), actions);
169
+ }
170
+ }, {
171
+ title: i18next__default["default"].t("neetoIntegrations.zapier.tableColumns.createdAt"),
172
+ dataIndex: "createdAt",
173
+ key: "createdAt"
174
+ }];
175
+ };
176
+ var getApiKeysTableRowData = function getApiKeysTableRowData(_ref2) {
177
+ var apiKeys = _ref2.apiKeys,
178
+ setApiKeyToDelete = _ref2.setApiKeyToDelete;
179
+ return apiKeys.map(function (apiKey) {
180
+ return _objectSpread$1(_objectSpread$1({}, apiKey), {}, {
181
+ createdAt: utils.timeFormat.fromNow(apiKey.createdAt),
182
+ actions: /*#__PURE__*/React__default["default"].createElement(Actions, {
183
+ apiKey: apiKey,
184
+ setApiKeyToDelete: setApiKeyToDelete
185
+ })
186
+ });
187
+ });
188
+ };
189
+
190
+ var ApiKeysList = function ApiKeysList(_ref) {
191
+ var _apiKeyToDelete$optio;
192
+ var _ref$apiKeys = _ref.apiKeys,
193
+ apiKeys = _ref$apiKeys === void 0 ? [] : _ref$apiKeys,
194
+ _ref$deleteApiKey = _ref.deleteApiKey,
195
+ deleteApiKey = _ref$deleteApiKey === void 0 ? pure.noop : _ref$deleteApiKey,
196
+ _ref$isDeleting = _ref.isDeleting,
197
+ isDeleting = _ref$isDeleting === void 0 ? false : _ref$isDeleting,
198
+ _ref$setNewlyCreatedA = _ref.setNewlyCreatedApiKey,
199
+ setNewlyCreatedApiKey = _ref$setNewlyCreatedA === void 0 ? pure.noop : _ref$setNewlyCreatedA;
200
+ var _useState = React.useState(null),
201
+ _useState2 = _slicedToArray(_useState, 2),
202
+ apiKeyToDelete = _useState2[0],
203
+ setApiKeyToDelete = _useState2[1];
204
+ var _useTranslation = reactI18next.useTranslation(),
205
+ t = _useTranslation.t;
206
+ var closeAlert = function closeAlert() {
207
+ return setApiKeyToDelete(null);
208
+ };
209
+ var handleSubmit = function handleSubmit() {
210
+ deleteApiKey(apiKeyToDelete === null || apiKeyToDelete === void 0 ? void 0 : apiKeyToDelete.id, {
211
+ onSuccess: function onSuccess() {
212
+ closeAlert();
213
+ setNewlyCreatedApiKey("");
214
+ }
215
+ });
216
+ };
217
+ if (ramda.isEmpty(apiKeys)) return null;
218
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
219
+ className: "space-y-2"
220
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
221
+ style: "h3"
222
+ }, t("neetoIntegrations.zapier.tableTitle")), /*#__PURE__*/React__default["default"].createElement(neetoui.Table, {
223
+ fixedHeight: true,
224
+ allowRowClick: false,
225
+ columnData: getApiKeysTableColumnData(),
226
+ rowData: getApiKeysTableRowData({
227
+ apiKeys: apiKeys,
228
+ setApiKeyToDelete: setApiKeyToDelete
229
+ })
230
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
231
+ backdropClassName: "zapier-delete-alert",
232
+ isOpen: ramda.isNotNil(apiKeyToDelete),
233
+ isSubmitting: isDeleting,
234
+ submitButtonLabel: t("neetoIntegrations.common.delete"),
235
+ title: t("neetoIntegrations.zapier.deleteApiKey.title"),
236
+ message: /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
237
+ i18nKey: "neetoIntegrations.zapier.deleteApiKey.message",
238
+ values: {
239
+ key: apiKeyToDelete === null || apiKeyToDelete === void 0 ? void 0 : (_apiKeyToDelete$optio = apiKeyToDelete.options) === null || _apiKeyToDelete$optio === void 0 ? void 0 : _apiKeyToDelete$optio.label
240
+ }
241
+ }),
242
+ onClose: closeAlert,
243
+ onSubmit: handleSubmit
244
+ }));
245
+ };
246
+
247
+ var GENERATE_API_KEY_VALIDATION = Yup__namespace.object({
248
+ label: Yup__namespace.string().required(i18next__default["default"].t("neetoIntegrations.common.required"))
249
+ });
250
+ var GENERATE_API_KEY_FORMIK_PROPS = {
251
+ initialValues: {
252
+ label: ""
253
+ },
254
+ validationSchema: GENERATE_API_KEY_VALIDATION
255
+ };
256
+
257
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
258
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
259
+ var GenerateKey = function GenerateKey(_ref) {
260
+ var handleSubmit = _ref.handleSubmit,
261
+ isLoading = _ref.isLoading;
262
+ var _useTranslation = reactI18next.useTranslation(),
263
+ t = _useTranslation.t;
264
+ var inputRef = React.useRef(null);
265
+ React.useEffect(function () {
266
+ if (inputRef.current) {
267
+ inputRef.current.focus();
268
+ }
269
+ }, []);
270
+ return /*#__PURE__*/React__default["default"].createElement(formik.Form, {
271
+ formikProps: _objectSpread(_objectSpread({}, GENERATE_API_KEY_FORMIK_PROPS), {}, {
272
+ onSubmit: handleSubmit
273
+ })
274
+ }, function (_ref2) {
275
+ var dirty = _ref2.dirty;
276
+ return /*#__PURE__*/React__default["default"].createElement("div", {
277
+ className: "space-y-4"
278
+ }, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
279
+ name: "label",
280
+ placeholder: t("neetoIntegrations.zapier.labelInputPlaceholder"),
281
+ ref: inputRef
282
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
283
+ disabled: !dirty,
284
+ label: t("neetoIntegrations.zapier.generateApiKey"),
285
+ loading: isLoading,
286
+ type: "submit"
287
+ }));
288
+ });
289
+ };
290
+
291
+ var NewApiKeyCallout = function NewApiKeyCallout(_ref) {
292
+ var apiKey = _ref.apiKey;
293
+ var _useTranslation = reactI18next.useTranslation(),
294
+ t = _useTranslation.t;
295
+ return /*#__PURE__*/React__default["default"].createElement("div", {
296
+ className: "mb-8 space-y-2"
297
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, null, t("neetoIntegrations.zapier.newApiKeyInstruction")), /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
298
+ className: "flex justify-between",
299
+ style: "success"
300
+ }, apiKey, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
301
+ icon: neetoIcons.Copy,
302
+ style: "text",
303
+ tooltipProps: {
304
+ content: t("neetoIntegrations.zapier.copyApiKey")
305
+ },
306
+ onClick: function onClick() {
307
+ return utils.copyToClipboard(apiKey);
308
+ }
309
+ })));
310
+ };
311
+
312
+ var ZapierForm = function ZapierForm(_ref) {
313
+ var _ref$newlyCreatedApiK = _ref.newlyCreatedApiKey,
314
+ newlyCreatedApiKey = _ref$newlyCreatedApiK === void 0 ? "" : _ref$newlyCreatedApiK,
315
+ _ref$videoUrl = _ref.videoUrl,
316
+ videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
317
+ _ref$helpDocUrl = _ref.helpDocUrl,
318
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
319
+ _ref$apiKeys = _ref.apiKeys,
320
+ apiKeys = _ref$apiKeys === void 0 ? [] : _ref$apiKeys,
321
+ _ref$isGenerating = _ref.isGenerating,
322
+ isGenerating = _ref$isGenerating === void 0 ? false : _ref$isGenerating,
323
+ _ref$isLoading = _ref.isLoading,
324
+ isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
325
+ _ref$isDeleting = _ref.isDeleting,
326
+ isDeleting = _ref$isDeleting === void 0 ? false : _ref$isDeleting,
327
+ _ref$deleteApiKey = _ref.deleteApiKey,
328
+ deleteApiKey = _ref$deleteApiKey === void 0 ? pure.noop : _ref$deleteApiKey,
329
+ _ref$handleGenerateAp = _ref.handleGenerateApiKey,
330
+ handleGenerateApiKey = _ref$handleGenerateAp === void 0 ? pure.noop : _ref$handleGenerateAp,
331
+ _ref$setNewlyCreatedA = _ref.setNewlyCreatedApiKey,
332
+ setNewlyCreatedApiKey = _ref$setNewlyCreatedA === void 0 ? pure.noop : _ref$setNewlyCreatedA,
333
+ _ref$setIsDemoModalOp = _ref.setIsDemoModalOpen,
334
+ setIsDemoModalOpen = _ref$setIsDemoModalOp === void 0 ? pure.noop : _ref$setIsDemoModalOp;
335
+ var _useTranslation = reactI18next.useTranslation(),
336
+ t = _useTranslation.t;
337
+ if (isLoading) return /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null);
338
+ return /*#__PURE__*/React__default["default"].createElement("div", {
339
+ className: "w-full max-w-xl space-y-6 p-10"
340
+ }, pure.isNotEmpty(newlyCreatedApiKey) && /*#__PURE__*/React__default["default"].createElement(NewApiKeyCallout, {
341
+ apiKey: newlyCreatedApiKey
342
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
343
+ style: "h2"
344
+ }, t("neetoIntegrations.zapier.apiKeys")), ramda.isEmpty(apiKeys) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
345
+ style: "h4"
346
+ }, t("neetoIntegrations.zapier.emptyText")), /*#__PURE__*/React__default["default"].createElement(GenerateKey, {
347
+ handleSubmit: handleGenerateApiKey,
348
+ isLoading: isGenerating
349
+ }), pure.isNotEmpty(helpDocUrl) && /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
350
+ href: helpDocUrl,
351
+ label: t("neetoIntegrations.zapier.helpDoc"),
352
+ style: "link",
353
+ target: "_blank"
354
+ })), /*#__PURE__*/React__default["default"].createElement(ApiKeysList, {
355
+ apiKeys: apiKeys,
356
+ deleteApiKey: deleteApiKey,
357
+ isDeleting: isDeleting,
358
+ setNewlyCreatedApiKey: setNewlyCreatedApiKey
359
+ }), pure.isNotEmpty(videoUrl) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
360
+ className: "mb-6",
361
+ label: t("neetoIntegrations.zapier.walkthroughText"),
362
+ style: "link",
363
+ onClick: function onClick() {
364
+ return setIsDemoModalOpen(true);
365
+ }
366
+ }));
367
+ };
368
+
369
+ module.exports = ZapierForm;
370
+ //# sourceMappingURL=ZapierForm.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZapierForm.cjs.js","sources":["../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../src/components/Integrations/ZapierForm/Actions.jsx","../src/components/Integrations/ZapierForm/utils.jsx","../src/components/Integrations/ZapierForm/ApiKeysList.jsx","../src/components/Integrations/ZapierForm/constants.js","../src/components/Integrations/ZapierForm/GenerateKey.jsx","../src/components/Integrations/ZapierForm/NewApiKeyCallout.jsx","../src/components/Integrations/ZapierForm/index.jsx"],"sourcesContent":["export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import React from \"react\";\n\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Dropdown } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst Actions = ({ apiKey, setApiKeyToDelete }) => {\n const { t } = useTranslation();\n\n return (\n <Dropdown buttonStyle=\"text\" icon={MenuHorizontal} strategy=\"fixed\">\n <Menu>\n <MenuItem.Button\n data-cy=\"delete-apikey-button\"\n onClick={() => setApiKeyToDelete(apiKey)}\n >\n {t(\"neetoIntegrations.common.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n );\n};\n\nexport default Actions;\n","import React from \"react\";\n\nimport i18next from \"i18next\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport { Typography } from \"neetoui\";\n\nimport Actions from \"./Actions\";\n\nexport const getApiKeysTableColumnData = () => [\n {\n title: i18next.t(\"neetoIntegrations.zapier.tableColumns.label\"),\n dataIndex: \"options\",\n key: \"options\",\n width: 272,\n render: (options, { actions }) => (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography className=\"w-4/5\" style=\"body2\">\n {options?.label}\n </Typography>\n {actions}\n </div>\n ),\n },\n {\n title: i18next.t(\"neetoIntegrations.zapier.tableColumns.createdAt\"),\n dataIndex: \"createdAt\",\n key: \"createdAt\",\n },\n];\n\nexport const getApiKeysTableRowData = ({ apiKeys, setApiKeyToDelete }) =>\n apiKeys.map(apiKey => ({\n ...apiKey,\n createdAt: timeFormat.fromNow(apiKey.createdAt),\n actions: <Actions apiKey={apiKey} setApiKeyToDelete={setApiKeyToDelete} />,\n }));\n","import React, { useState } from \"react\";\n\nimport { noop } from \"neetocommons/pure\";\nimport { Alert, Table, Typography } from \"neetoui\";\nimport { isNotNil, isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { getApiKeysTableColumnData, getApiKeysTableRowData } from \"./utils\";\n\nconst ApiKeysList = ({\n apiKeys = [],\n deleteApiKey = noop,\n isDeleting = false,\n setNewlyCreatedApiKey = noop,\n}) => {\n const [apiKeyToDelete, setApiKeyToDelete] = useState(null);\n\n const { t } = useTranslation();\n\n const closeAlert = () => setApiKeyToDelete(null);\n\n const handleSubmit = () => {\n deleteApiKey(apiKeyToDelete?.id, {\n onSuccess: () => {\n closeAlert();\n setNewlyCreatedApiKey(\"\");\n },\n });\n };\n\n if (isEmpty(apiKeys)) return null;\n\n return (\n <>\n <div className=\"space-y-2\">\n <Typography style=\"h3\">\n {t(\"neetoIntegrations.zapier.tableTitle\")}\n </Typography>\n <Table\n fixedHeight\n allowRowClick={false}\n columnData={getApiKeysTableColumnData()}\n rowData={getApiKeysTableRowData({ apiKeys, setApiKeyToDelete })}\n />\n </div>\n <Alert\n backdropClassName=\"zapier-delete-alert\"\n isOpen={isNotNil(apiKeyToDelete)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoIntegrations.common.delete\")}\n title={t(\"neetoIntegrations.zapier.deleteApiKey.title\")}\n message={\n <Trans\n i18nKey=\"neetoIntegrations.zapier.deleteApiKey.message\"\n values={{ key: apiKeyToDelete?.options?.label }}\n />\n }\n onClose={closeAlert}\n onSubmit={handleSubmit}\n />\n </>\n );\n};\n\nexport default ApiKeysList;\n","import i18next from \"i18next\";\nimport * as Yup from \"yup\";\n\nconst GENERATE_API_KEY_VALIDATION = Yup.object({\n label: Yup.string().required(i18next.t(\"neetoIntegrations.common.required\")),\n});\n\nexport const GENERATE_API_KEY_FORMIK_PROPS = {\n initialValues: { label: \"\" },\n validationSchema: GENERATE_API_KEY_VALIDATION,\n};\n","import React, { useEffect, useRef } from \"react\";\n\nimport { Button } from \"neetoui\";\nimport { Form, Input } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { GENERATE_API_KEY_FORMIK_PROPS } from \"./constants\";\n\nconst GenerateKey = ({ handleSubmit, isLoading }) => {\n const { t } = useTranslation();\n const inputRef = useRef(null);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, []);\n\n return (\n <Form\n formikProps={{\n ...GENERATE_API_KEY_FORMIK_PROPS,\n onSubmit: handleSubmit,\n }}\n >\n {({ dirty }) => (\n <div className=\"space-y-4\">\n <Input\n name=\"label\"\n placeholder={t(\"neetoIntegrations.zapier.labelInputPlaceholder\")}\n ref={inputRef}\n />\n <Button\n disabled={!dirty}\n label={t(\"neetoIntegrations.zapier.generateApiKey\")}\n loading={isLoading}\n type=\"submit\"\n />\n </div>\n )}\n </Form>\n );\n};\n\nexport default GenerateKey;\n","import React from \"react\";\n\nimport { copyToClipboard } from \"neetocommons/utils\";\nimport { Copy } from \"neetoicons\";\nimport { Button, Callout } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst NewApiKeyCallout = ({ apiKey }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"mb-8 space-y-2\">\n <Callout>{t(\"neetoIntegrations.zapier.newApiKeyInstruction\")}</Callout>\n <Callout className=\"flex justify-between\" style=\"success\">\n {apiKey}\n <Button\n icon={Copy}\n style=\"text\"\n tooltipProps={{ content: t(\"neetoIntegrations.zapier.copyApiKey\") }}\n onClick={() => copyToClipboard(apiKey)}\n />\n </Callout>\n </div>\n );\n};\n\nexport default NewApiKeyCallout;\n","import React from \"react\";\n\nimport { isNotEmpty, noop } from \"neetocommons/pure\";\nimport { Button, Spinner, Typography } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ApiKeysList from \"./ApiKeysList\";\nimport GenerateKey from \"./GenerateKey\";\nimport NewApiKeyCallout from \"./NewApiKeyCallout\";\n\nconst ZapierForm = ({\n newlyCreatedApiKey = \"\",\n videoUrl = \"\",\n helpDocUrl = \"\",\n apiKeys = [],\n isGenerating = false,\n isLoading = true,\n isDeleting = false,\n deleteApiKey = noop,\n handleGenerateApiKey = noop,\n setNewlyCreatedApiKey = noop,\n setIsDemoModalOpen = noop,\n}) => {\n const { t } = useTranslation();\n\n if (isLoading) return <Spinner />;\n\n return (\n <div className=\"w-full max-w-xl space-y-6 p-10\">\n {isNotEmpty(newlyCreatedApiKey) && (\n <NewApiKeyCallout apiKey={newlyCreatedApiKey} />\n )}\n <Typography style=\"h2\">\n {t(\"neetoIntegrations.zapier.apiKeys\")}\n </Typography>\n {isEmpty(apiKeys) && (\n <Typography style=\"h4\">\n {t(\"neetoIntegrations.zapier.emptyText\")}\n </Typography>\n )}\n <GenerateKey\n handleSubmit={handleGenerateApiKey}\n isLoading={isGenerating}\n />\n {isNotEmpty(helpDocUrl) && (\n <div>\n <Button\n href={helpDocUrl}\n label={t(\"neetoIntegrations.zapier.helpDoc\")}\n style=\"link\"\n target=\"_blank\"\n />\n </div>\n )}\n <ApiKeysList\n apiKeys={apiKeys}\n deleteApiKey={deleteApiKey}\n isDeleting={isDeleting}\n setNewlyCreatedApiKey={setNewlyCreatedApiKey}\n />\n {isNotEmpty(videoUrl) && (\n <Button\n className=\"mb-6\"\n label={t(\"neetoIntegrations.zapier.walkthroughText\")}\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n )}\n </div>\n );\n};\n\nexport default ZapierForm;\n"],"names":["_arrayWithHoles","arr","Array","isArray","_iterableToArrayLimit","i","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","call","next","Object","done","push","value","length","err","_arrayLikeToArray","len","arr2","_unsupportedIterableToArray","o","minLen","arrayLikeToArray","n","prototype","toString","slice","constructor","name","from","test","_nonIterableRest","TypeError","_slicedToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","_typeof","obj","_toPrimitive","input","hint","prim","toPrimitive","undefined","res","String","Number","_toPropertyKey","arg","key","_defineProperty","toPropertyKey","defineProperty","enumerable","configurable","writable","Menu","Dropdown","MenuItem","Actions","_ref","apiKey","setApiKeyToDelete","_useTranslation","useTranslation","t","React","createElement","buttonStyle","icon","MenuHorizontal","strategy","Button","onClick","getApiKeysTableColumnData","title","i18next","dataIndex","width","render","options","actions","className","Typography","style","label","getApiKeysTableRowData","_ref2","apiKeys","map","_objectSpread","createdAt","timeFormat","fromNow","ApiKeysList","_apiKeyToDelete$optio","_ref$apiKeys","_ref$deleteApiKey","deleteApiKey","noop","_ref$isDeleting","isDeleting","_ref$setNewlyCreatedA","setNewlyCreatedApiKey","_useState","useState","_useState2","apiKeyToDelete","closeAlert","handleSubmit","id","onSuccess","isEmpty","Fragment","Table","fixedHeight","allowRowClick","columnData","rowData","Alert","backdropClassName","isOpen","isNotNil","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","onClose","onSubmit","GENERATE_API_KEY_VALIDATION","Yup","object","string","required","GENERATE_API_KEY_FORMIK_PROPS","initialValues","validationSchema","GenerateKey","isLoading","inputRef","useRef","useEffect","current","focus","Form","formikProps","dirty","Input","placeholder","ref","disabled","loading","type","NewApiKeyCallout","Callout","Copy","tooltipProps","content","copyToClipboard","ZapierForm","_ref$newlyCreatedApiK","newlyCreatedApiKey","_ref$videoUrl","videoUrl","_ref$helpDocUrl","helpDocUrl","_ref$isGenerating","isGenerating","_ref$isLoading","_ref$handleGenerateAp","handleGenerateApiKey","_ref$setIsDemoModalOp","setIsDemoModalOpen","Spinner","isNotEmpty","href","target"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAe,SAASA,eAAeA,CAACC,GAAG,EAAE;EAC3C,IAAIC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE,OAAOA,GAAG,CAAA;AACpC;;ACFe,SAASG,qBAAqBA,CAACH,GAAG,EAAEI,CAAC,EAAE;EACpD,IAAIC,EAAE,GAAG,IAAI,IAAIL,GAAG,GAAG,IAAI,GAAG,WAAW,IAAI,OAAOM,MAAM,IAAIN,GAAG,CAACM,MAAM,CAACC,QAAQ,CAAC,IAAIP,GAAG,CAAC,YAAY,CAAC,CAAA;EACvG,IAAI,IAAI,IAAIK,EAAE,EAAE;AACd,IAAA,IAAIG,EAAE;MACJC,EAAE;MACFC,EAAE;MACFC,EAAE;AACFC,MAAAA,IAAI,GAAG,EAAE;MACTC,EAAE,GAAG,CAAC,CAAC;MACPC,EAAE,GAAG,CAAC,CAAC,CAAA;IACT,IAAI;AACF,MAAA,IAAIJ,EAAE,GAAG,CAACL,EAAE,GAAGA,EAAE,CAACU,IAAI,CAACf,GAAG,CAAC,EAAEgB,IAAI,EAAE,CAAC,KAAKZ,CAAC,EAAE;AAC1C,QAAA,IAAIa,MAAM,CAACZ,EAAE,CAAC,KAAKA,EAAE,EAAE,OAAA;QACvBQ,EAAE,GAAG,CAAC,CAAC,CAAA;AACT,OAAC,MAAM,OAAO,EAAEA,EAAE,GAAG,CAACL,EAAE,GAAGE,EAAE,CAACK,IAAI,CAACV,EAAE,CAAC,EAAEa,IAAI,CAAC,KAAKN,IAAI,CAACO,IAAI,CAACX,EAAE,CAACY,KAAK,CAAC,EAAER,IAAI,CAACS,MAAM,KAAKjB,CAAC,CAAC,EAAES,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;KACpG,CAAC,OAAOS,GAAG,EA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