@bigbinary/neeto-slack-frontend 2.0.1 → 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/dist/index.cjs.js +22 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +23 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,6 @@ var neetoui = require('@bigbinary/neetoui');
|
|
|
9
9
|
var yup = require('yup');
|
|
10
10
|
var formik = require('@bigbinary/neetoui/formik');
|
|
11
11
|
var ramda = require('ramda');
|
|
12
|
-
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
13
12
|
var misc = require('@bigbinary/neeto-icons/misc');
|
|
14
13
|
|
|
15
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -3633,21 +3632,19 @@ function useTranslation(ns) {
|
|
|
3633
3632
|
}
|
|
3634
3633
|
|
|
3635
3634
|
var common = {
|
|
3636
|
-
saveChanges: "Save changes",
|
|
3637
|
-
cancel: "Cancel",
|
|
3638
3635
|
"continue": "Continue",
|
|
3639
3636
|
save: "Save",
|
|
3640
3637
|
edit: "Edit",
|
|
3641
|
-
|
|
3638
|
+
done: "Done",
|
|
3642
3639
|
required: "{{entity}} is required"
|
|
3643
3640
|
};
|
|
3644
3641
|
var slack = {
|
|
3645
3642
|
placeholder: "Notification Channel",
|
|
3646
3643
|
channelName: "Channel Name",
|
|
3647
3644
|
editPane: "Edit slack integration",
|
|
3645
|
+
channelListRefreshToastr: "Slack channels list is updated",
|
|
3646
|
+
channelListRefreshButton: "Refresh channels list",
|
|
3648
3647
|
steps: {
|
|
3649
|
-
connect: "Connect",
|
|
3650
|
-
configure: "Configure",
|
|
3651
3648
|
finish: "Finish"
|
|
3652
3649
|
},
|
|
3653
3650
|
connect: {
|
|
@@ -3659,13 +3656,10 @@ var slack = {
|
|
|
3659
3656
|
title: "You are connecting to <br/><strong>{{teamName}}</strong> workspace <br/>({{slackUrl}}).",
|
|
3660
3657
|
sendTo: "Send to",
|
|
3661
3658
|
sendToDescription: "Choose a Slack channel to send the notifications",
|
|
3662
|
-
updateType: "Update type",
|
|
3663
3659
|
refreshSlackChannelList: "Refresh Slack channel list"
|
|
3664
3660
|
},
|
|
3665
3661
|
finish: {
|
|
3666
|
-
title: "
|
|
3667
|
-
account: "Account",
|
|
3668
|
-
channel: "Channel"
|
|
3662
|
+
title: "You are successfully connected to the <strong>{{teamName}}</strong> workspace."
|
|
3669
3663
|
},
|
|
3670
3664
|
settings: {
|
|
3671
3665
|
title: "You are connected to <br/><strong>{{teamName}}</strong> workspace <br/>({{slackUrl}})."
|
|
@@ -3766,6 +3760,10 @@ var buildValidationSchema = function buildValidationSchema(customValidationSchem
|
|
|
3766
3760
|
var toSlackUrl = function toSlackUrl(teamName) {
|
|
3767
3761
|
return "".concat(teamName === null || teamName === void 0 ? void 0 : teamName.replace(/\s/g, "").toLowerCase(), ".slack.com");
|
|
3768
3762
|
};
|
|
3763
|
+
var slackChannelRefresh = function slackChannelRefresh(channelRefreshHandler) {
|
|
3764
|
+
channelRefreshHandler();
|
|
3765
|
+
neetoui.Toastr.success(t$2("slack.channelListRefreshToastr"));
|
|
3766
|
+
};
|
|
3769
3767
|
|
|
3770
3768
|
function _extends$1() {
|
|
3771
3769
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -3785,20 +3783,18 @@ function _extends$1() {
|
|
|
3785
3783
|
var SlackRefreshChannelListButton = function SlackRefreshChannelListButton(_ref) {
|
|
3786
3784
|
var channelRefreshHandler = _ref.channelRefreshHandler,
|
|
3787
3785
|
_ref$className = _ref.className,
|
|
3788
|
-
className = _ref$className === void 0 ? "" : _ref$className;
|
|
3786
|
+
className = _ref$className === void 0 ? "pl-1" : _ref$className;
|
|
3789
3787
|
var _useTranslation = useTranslation(),
|
|
3790
3788
|
t = _useTranslation.t;
|
|
3791
3789
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3792
3790
|
className: "relative top-0 flex justify-center"
|
|
3793
3791
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
},
|
|
3801
|
-
onClick: channelRefreshHandler
|
|
3792
|
+
className: className,
|
|
3793
|
+
label: t("slack.channelListRefreshButton"),
|
|
3794
|
+
style: "link",
|
|
3795
|
+
onClick: function onClick() {
|
|
3796
|
+
return slackChannelRefresh(channelRefreshHandler);
|
|
3797
|
+
}
|
|
3802
3798
|
}));
|
|
3803
3799
|
};
|
|
3804
3800
|
var SlackRefreshChannelListButton$1 = /*#__PURE__*/React__default["default"].memo(SlackRefreshChannelListButton);
|
|
@@ -3852,24 +3848,22 @@ var EditPane = function EditPane(_ref) {
|
|
|
3852
3848
|
style: "body2",
|
|
3853
3849
|
weight: "bold"
|
|
3854
3850
|
}, t("slack.configure.sendToDescription"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3855
|
-
className: "relative flex"
|
|
3851
|
+
className: "relative flex flex-col items-start gap-y-3"
|
|
3856
3852
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Select, {
|
|
3857
3853
|
isSearchable: true,
|
|
3858
|
-
className: "
|
|
3854
|
+
className: "w-full",
|
|
3859
3855
|
name: "selectedChannel",
|
|
3860
3856
|
options: formikProps.values.channels,
|
|
3861
3857
|
placeholder: t("slack.placeholder"),
|
|
3862
3858
|
size: "large"
|
|
3863
3859
|
}), /*#__PURE__*/React__default["default"].createElement(SlackRefreshChannelListButton$1, {
|
|
3864
3860
|
channelRefreshHandler: channelRefreshHandler
|
|
3865
|
-
}))), ramda.is(Function, children) ? children(_objectSpread({}, formikProps)) : children), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, null, /*#__PURE__*/React__default["default"].createElement(
|
|
3866
|
-
className: "neeto-ui-mt-4"
|
|
3867
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3861
|
+
}))), ramda.is(Function, children) ? children(_objectSpread({}, formikProps)) : children), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3868
3862
|
disabled: isSubmitting || formikProps.isSubmitting,
|
|
3869
3863
|
label: t("common.save"),
|
|
3870
3864
|
loading: isSubmitting || formikProps.isSubmitting,
|
|
3871
3865
|
type: "submit"
|
|
3872
|
-
})))
|
|
3866
|
+
})));
|
|
3873
3867
|
}));
|
|
3874
3868
|
};
|
|
3875
3869
|
|
|
@@ -3954,9 +3948,10 @@ var Configure = function Configure(_ref) {
|
|
|
3954
3948
|
style: "body2",
|
|
3955
3949
|
weight: "normal"
|
|
3956
3950
|
}, ramda.isEmpty(channelSelectLabel) ? t("slack.configure.sendToDescription") : channelSelectLabel), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3957
|
-
className: "relative flex"
|
|
3951
|
+
className: "relative flex flex-col items-start gap-y-3"
|
|
3958
3952
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Select, {
|
|
3959
3953
|
isSearchable: true,
|
|
3954
|
+
className: "w-full",
|
|
3960
3955
|
name: "selectedChannel",
|
|
3961
3956
|
options: formikProps.values.channels,
|
|
3962
3957
|
placeholder: t("slack.placeholder"),
|
|
@@ -4061,7 +4056,7 @@ var Finish = function Finish(_ref) {
|
|
|
4061
4056
|
className: "neeto-ui-flex neeto-ui-w-full neeto-ui-flex-row neeto-ui-mt-6"
|
|
4062
4057
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$1({
|
|
4063
4058
|
className: "neeto-ui-my-1",
|
|
4064
|
-
label: t("
|
|
4059
|
+
label: t("common.done"),
|
|
4065
4060
|
onClick: onSuccess
|
|
4066
4061
|
}, buttonProps)), pure.isNotEmpty(secondaryButtonProps) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$1({
|
|
4067
4062
|
className: "neeto-ui-my-1 neeto-ui-ml-2",
|