@bigbinary/neeto-integrations-frontend 1.3.0 → 1.5.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 +1 -0
- package/dist/index.cjs.js +50 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +51 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +19 -10
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ Available components:
|
|
|
20
20
|
- [Connect](./docs/connect/README.md)
|
|
21
21
|
- [Finish](./docs/finish/README.md)
|
|
22
22
|
- [Demo](./docs/demo/README.md)
|
|
23
|
+
- [DisconnectAlert](./docs/DisconnectAlert/README.md)
|
|
23
24
|
|
|
24
25
|
View the [example app](./example/src/App.jsx) to see usage.
|
|
25
26
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -3209,7 +3209,7 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
3209
3209
|
});
|
|
3210
3210
|
}
|
|
3211
3211
|
|
|
3212
|
-
var _excluded$
|
|
3212
|
+
var _excluded$2 = ["format"],
|
|
3213
3213
|
_excluded2 = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
3214
3214
|
function ownKeys$3(object, enumerableOnly) {
|
|
3215
3215
|
var keys = Object.keys(object);
|
|
@@ -3293,7 +3293,7 @@ function nodesToString(children, i18nOptions) {
|
|
|
3293
3293
|
warn("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
3294
3294
|
} else if (_typeof$1(child) === 'object') {
|
|
3295
3295
|
var format = child.format,
|
|
3296
|
-
clone = _objectWithoutProperties$1(child, _excluded$
|
|
3296
|
+
clone = _objectWithoutProperties$1(child, _excluded$2);
|
|
3297
3297
|
var keys = Object.keys(clone);
|
|
3298
3298
|
if (keys.length === 1) {
|
|
3299
3299
|
var value = format ? "".concat(keys[0], ", ").concat(format) : keys[0];
|
|
@@ -3810,11 +3810,11 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
3810
3810
|
return target;
|
|
3811
3811
|
}
|
|
3812
3812
|
|
|
3813
|
-
var _excluded = ["disabled", "children"];
|
|
3813
|
+
var _excluded$1 = ["disabled", "children"];
|
|
3814
3814
|
var TooltipWrapper = function TooltipWrapper(_ref) {
|
|
3815
3815
|
var disabled = _ref.disabled,
|
|
3816
3816
|
children = _ref.children,
|
|
3817
|
-
tooltipProps = _objectWithoutProperties(_ref, _excluded);
|
|
3817
|
+
tooltipProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
3818
3818
|
return disabled ? /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, tooltipProps, children) : children;
|
|
3819
3819
|
};
|
|
3820
3820
|
|
|
@@ -3930,6 +3930,36 @@ var Card = function Card(_ref) {
|
|
|
3930
3930
|
})))));
|
|
3931
3931
|
};
|
|
3932
3932
|
|
|
3933
|
+
var _excluded = ["isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
|
|
3934
|
+
var DisconnectAlert = function DisconnectAlert(_ref) {
|
|
3935
|
+
var _ref$isOpen = _ref.isOpen,
|
|
3936
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
3937
|
+
_ref$isDisconnecting = _ref.isDisconnecting,
|
|
3938
|
+
isDisconnecting = _ref$isDisconnecting === void 0 ? false : _ref$isDisconnecting,
|
|
3939
|
+
_ref$title = _ref.title,
|
|
3940
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
3941
|
+
_ref$message = _ref.message,
|
|
3942
|
+
message = _ref$message === void 0 ? "" : _ref$message,
|
|
3943
|
+
_ref$onClose = _ref.onClose,
|
|
3944
|
+
onClose = _ref$onClose === void 0 ? pure.noop : _ref$onClose,
|
|
3945
|
+
_ref$onDisconnect = _ref.onDisconnect,
|
|
3946
|
+
onDisconnect = _ref$onDisconnect === void 0 ? pure.noop : _ref$onDisconnect,
|
|
3947
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
3948
|
+
var _useTranslation = useTranslation(),
|
|
3949
|
+
t = _useTranslation.t;
|
|
3950
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, _extends$1({
|
|
3951
|
+
closeOnEsc: true,
|
|
3952
|
+
closeOnOutsideClick: true,
|
|
3953
|
+
isOpen: isOpen,
|
|
3954
|
+
isSubmitting: isDisconnecting,
|
|
3955
|
+
message: message,
|
|
3956
|
+
submitButtonLabel: t("common.disconnect"),
|
|
3957
|
+
title: title,
|
|
3958
|
+
onClose: onClose,
|
|
3959
|
+
onSubmit: onDisconnect
|
|
3960
|
+
}, otherProps));
|
|
3961
|
+
};
|
|
3962
|
+
|
|
3933
3963
|
var Stepper = function Stepper(_ref) {
|
|
3934
3964
|
var _ref$steps = _ref.steps,
|
|
3935
3965
|
steps = _ref$steps === void 0 ? {} : _ref$steps;
|
|
@@ -4452,8 +4482,8 @@ var ApiKeysList = function ApiKeysList(_ref) {
|
|
|
4452
4482
|
deleteApiKey = _ref$deleteApiKey === void 0 ? pure.noop : _ref$deleteApiKey,
|
|
4453
4483
|
_ref$isDeleting = _ref.isDeleting,
|
|
4454
4484
|
isDeleting = _ref$isDeleting === void 0 ? false : _ref$isDeleting,
|
|
4455
|
-
_ref$
|
|
4456
|
-
|
|
4485
|
+
_ref$setNewlyCreatedA = _ref.setNewlyCreatedApiKey,
|
|
4486
|
+
setNewlyCreatedApiKey = _ref$setNewlyCreatedA === void 0 ? pure.noop : _ref$setNewlyCreatedA;
|
|
4457
4487
|
var _useState = React.useState(null),
|
|
4458
4488
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4459
4489
|
apiKeyToDelete = _useState2[0],
|
|
@@ -4467,7 +4497,7 @@ var ApiKeysList = function ApiKeysList(_ref) {
|
|
|
4467
4497
|
deleteApiKey(apiKeyToDelete === null || apiKeyToDelete === void 0 ? void 0 : apiKeyToDelete.id, {
|
|
4468
4498
|
onSuccess: function onSuccess() {
|
|
4469
4499
|
closeAlert();
|
|
4470
|
-
|
|
4500
|
+
setNewlyCreatedApiKey("");
|
|
4471
4501
|
}
|
|
4472
4502
|
});
|
|
4473
4503
|
};
|
|
@@ -4541,7 +4571,7 @@ var GenerateKey = function GenerateKey(_ref) {
|
|
|
4541
4571
|
})));
|
|
4542
4572
|
};
|
|
4543
4573
|
|
|
4544
|
-
var
|
|
4574
|
+
var NewApiKeyCallout = function NewApiKeyCallout(_ref) {
|
|
4545
4575
|
var apiKey = _ref.apiKey;
|
|
4546
4576
|
var _useTranslation = useTranslation(),
|
|
4547
4577
|
t = _useTranslation.t;
|
|
@@ -4563,12 +4593,12 @@ var NewZapierApiKey = function NewZapierApiKey(_ref) {
|
|
|
4563
4593
|
};
|
|
4564
4594
|
|
|
4565
4595
|
var ZapierForm = function ZapierForm(_ref) {
|
|
4566
|
-
var _ref$
|
|
4567
|
-
|
|
4596
|
+
var _ref$newlyCreatedApiK = _ref.newlyCreatedApiKey,
|
|
4597
|
+
newlyCreatedApiKey = _ref$newlyCreatedApiK === void 0 ? "" : _ref$newlyCreatedApiK,
|
|
4568
4598
|
_ref$videoUrl = _ref.videoUrl,
|
|
4569
4599
|
videoUrl = _ref$videoUrl === void 0 ? "" : _ref$videoUrl,
|
|
4570
|
-
_ref$
|
|
4571
|
-
|
|
4600
|
+
_ref$apiKeys = _ref.apiKeys,
|
|
4601
|
+
apiKeys = _ref$apiKeys === void 0 ? [] : _ref$apiKeys,
|
|
4572
4602
|
_ref$isGenerating = _ref.isGenerating,
|
|
4573
4603
|
isGenerating = _ref$isGenerating === void 0 ? false : _ref$isGenerating,
|
|
4574
4604
|
_ref$isLoading = _ref.isLoading,
|
|
@@ -4579,8 +4609,8 @@ var ZapierForm = function ZapierForm(_ref) {
|
|
|
4579
4609
|
deleteApiKey = _ref$deleteApiKey === void 0 ? pure.noop : _ref$deleteApiKey,
|
|
4580
4610
|
_ref$handleGenerateAp = _ref.handleGenerateApiKey,
|
|
4581
4611
|
handleGenerateApiKey = _ref$handleGenerateAp === void 0 ? pure.noop : _ref$handleGenerateAp,
|
|
4582
|
-
_ref$
|
|
4583
|
-
|
|
4612
|
+
_ref$setNewlyCreatedA = _ref.setNewlyCreatedApiKey,
|
|
4613
|
+
setNewlyCreatedApiKey = _ref$setNewlyCreatedA === void 0 ? pure.noop : _ref$setNewlyCreatedA,
|
|
4584
4614
|
_ref$setIsDemoModalOp = _ref.setIsDemoModalOpen,
|
|
4585
4615
|
setIsDemoModalOpen = _ref$setIsDemoModalOp === void 0 ? pure.noop : _ref$setIsDemoModalOp;
|
|
4586
4616
|
var _useTranslation = useTranslation(),
|
|
@@ -4588,20 +4618,20 @@ var ZapierForm = function ZapierForm(_ref) {
|
|
|
4588
4618
|
if (isLoading) return /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, null);
|
|
4589
4619
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4590
4620
|
className: "w-full max-w-xl space-y-10 p-10"
|
|
4591
|
-
}, pure.isNotEmpty(
|
|
4592
|
-
apiKey:
|
|
4621
|
+
}, pure.isNotEmpty(newlyCreatedApiKey) && /*#__PURE__*/React__default["default"].createElement(NewApiKeyCallout, {
|
|
4622
|
+
apiKey: newlyCreatedApiKey
|
|
4593
4623
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4594
4624
|
style: "h2"
|
|
4595
|
-
}, t("zapier.apiKeys")), ramda.isEmpty(
|
|
4625
|
+
}, t("zapier.apiKeys")), ramda.isEmpty(apiKeys) && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4596
4626
|
style: "h4"
|
|
4597
4627
|
}, t("zapier.emptyText")), /*#__PURE__*/React__default["default"].createElement(GenerateKey, {
|
|
4598
4628
|
handleSubmit: handleGenerateApiKey,
|
|
4599
4629
|
isLoading: isGenerating
|
|
4600
4630
|
}), /*#__PURE__*/React__default["default"].createElement(ApiKeysList, {
|
|
4601
|
-
apiKeys:
|
|
4631
|
+
apiKeys: apiKeys,
|
|
4602
4632
|
deleteApiKey: deleteApiKey,
|
|
4603
4633
|
isDeleting: isDeleting,
|
|
4604
|
-
|
|
4634
|
+
setNewlyCreatedApiKey: setNewlyCreatedApiKey
|
|
4605
4635
|
}), pure.isNotEmpty(videoUrl) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4606
4636
|
className: "mb-6",
|
|
4607
4637
|
label: t("zapier.walkthroughText"),
|
|
@@ -4640,6 +4670,7 @@ n(css,{});
|
|
|
4640
4670
|
exports.Card = Card;
|
|
4641
4671
|
exports.Connect = Connect;
|
|
4642
4672
|
exports.Demo = Demo;
|
|
4673
|
+
exports.DisconnectAlert = DisconnectAlert;
|
|
4643
4674
|
exports.Finish = Finish;
|
|
4644
4675
|
exports.Modal = Modal;
|
|
4645
4676
|
exports.WalkthroughModal = WalkthroughModal;
|