@bigbinary/neeto-slack-frontend 2.2.0 → 2.2.2
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 +71 -60
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +71 -60
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -3634,43 +3634,44 @@ function useTranslation(ns) {
|
|
|
3634
3634
|
});
|
|
3635
3635
|
}
|
|
3636
3636
|
|
|
3637
|
-
var
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
}
|
|
3644
|
-
var slack = {
|
|
3645
|
-
placeholder: "Notification Channel",
|
|
3646
|
-
channelName: "Channel Name",
|
|
3647
|
-
editPane: "Edit slack integration",
|
|
3648
|
-
channelListRefreshToastr: "Slack channels list is updated",
|
|
3649
|
-
channelListRefreshButton: "Refresh channels list",
|
|
3650
|
-
steps: {
|
|
3651
|
-
finish: "Finish"
|
|
3652
|
-
},
|
|
3653
|
-
connect: {
|
|
3654
|
-
title: "Connect your Slack account",
|
|
3655
|
-
description: "There’s no linked Slack account yet",
|
|
3656
|
-
loginButton: "Login to Slack"
|
|
3657
|
-
},
|
|
3658
|
-
configure: {
|
|
3659
|
-
title: "You are connecting to <br/><strong>{{teamName}}</strong> workspace <br/>({{slackUrl}}).",
|
|
3660
|
-
sendTo: "Send to",
|
|
3661
|
-
sendToDescription: "Choose a Slack channel that will receive notifications",
|
|
3662
|
-
refreshSlackChannelList: "Refresh Slack channel list"
|
|
3637
|
+
var neetoSlack = {
|
|
3638
|
+
common: {
|
|
3639
|
+
"continue": "Continue",
|
|
3640
|
+
save: "Save",
|
|
3641
|
+
edit: "Edit",
|
|
3642
|
+
done: "Done",
|
|
3643
|
+
required: "{{entity}} is required"
|
|
3663
3644
|
},
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3645
|
+
slack: {
|
|
3646
|
+
placeholder: "Notification Channel",
|
|
3647
|
+
channelName: "Channel Name",
|
|
3648
|
+
editPane: "Edit slack integration",
|
|
3649
|
+
channelListRefreshToastr: "Slack channels list is updated",
|
|
3650
|
+
channelListRefreshButton: "Refresh channels list",
|
|
3651
|
+
steps: {
|
|
3652
|
+
finish: "Finish"
|
|
3653
|
+
},
|
|
3654
|
+
connect: {
|
|
3655
|
+
title: "Connect your Slack account",
|
|
3656
|
+
description: "There’s no linked Slack account yet",
|
|
3657
|
+
loginButton: "Login to Slack"
|
|
3658
|
+
},
|
|
3659
|
+
configure: {
|
|
3660
|
+
title: "You are connecting to <a><strong>{{teamName}}</strong></a> workspace.",
|
|
3661
|
+
sendTo: "Send to",
|
|
3662
|
+
sendToDescription: "Choose a Slack channel that will receive notifications",
|
|
3663
|
+
refreshSlackChannelList: "Refresh Slack channel list"
|
|
3664
|
+
},
|
|
3665
|
+
finish: {
|
|
3666
|
+
title: "You are successfully connected to the <strong>{{teamName}}</strong> workspace."
|
|
3667
|
+
},
|
|
3668
|
+
settings: {
|
|
3669
|
+
title: "You are connected to <a><strong>{{teamName}}</strong></a> workspace."
|
|
3670
|
+
}
|
|
3669
3671
|
}
|
|
3670
3672
|
};
|
|
3671
3673
|
var en = {
|
|
3672
|
-
|
|
3673
|
-
slack: slack
|
|
3674
|
+
neetoSlack: neetoSlack
|
|
3674
3675
|
};
|
|
3675
3676
|
|
|
3676
3677
|
instance.use(initReactI18next).init({
|
|
@@ -3749,8 +3750,8 @@ function _defineProperty(obj, key, value) {
|
|
|
3749
3750
|
var CHANNEL_NAME_VALIDAITON_SCHEMA = {
|
|
3750
3751
|
selectedChannel: yup__namespace.object().shape({
|
|
3751
3752
|
label: yup__namespace.string(),
|
|
3752
|
-
value: yup__namespace.string().required(t$2("common.required", {
|
|
3753
|
-
entity: t$2("slack.channelName")
|
|
3753
|
+
value: yup__namespace.string().required(t$2("neetoSlack.common.required", {
|
|
3754
|
+
entity: t$2("neetoSlack.slack.channelName")
|
|
3754
3755
|
}))
|
|
3755
3756
|
}).required().nullable()
|
|
3756
3757
|
};
|
|
@@ -3765,7 +3766,7 @@ var toSlackUrl = function toSlackUrl(teamName) {
|
|
|
3765
3766
|
};
|
|
3766
3767
|
var slackChannelRefresh = function slackChannelRefresh(channelRefreshHandler) {
|
|
3767
3768
|
channelRefreshHandler();
|
|
3768
|
-
neetoui.Toastr.success(t$2("slack.channelListRefreshToastr"));
|
|
3769
|
+
neetoui.Toastr.success(t$2("neetoSlack.slack.channelListRefreshToastr"));
|
|
3769
3770
|
};
|
|
3770
3771
|
|
|
3771
3772
|
function _extends$1() {
|
|
@@ -3793,7 +3794,7 @@ var SlackRefreshChannelListButton = function SlackRefreshChannelListButton(_ref)
|
|
|
3793
3794
|
className: "relative top-0 flex justify-center"
|
|
3794
3795
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3795
3796
|
className: className,
|
|
3796
|
-
label: t("slack.channelListRefreshButton"),
|
|
3797
|
+
label: t("neetoSlack.slack.channelListRefreshButton"),
|
|
3797
3798
|
style: "link",
|
|
3798
3799
|
onClick: function onClick() {
|
|
3799
3800
|
return slackChannelRefresh(channelRefreshHandler);
|
|
@@ -3835,7 +3836,7 @@ var EditPane = function EditPane(_ref) {
|
|
|
3835
3836
|
}, paneProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3836
3837
|
style: "h2",
|
|
3837
3838
|
weight: "semibold"
|
|
3838
|
-
}, ramda.isEmpty(title) ? t("slack.editPane") : title)), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
3839
|
+
}, ramda.isEmpty(title) ? t("neetoSlack.slack.editPane") : title)), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
3839
3840
|
className: "neeto-ui-w-full",
|
|
3840
3841
|
formikProps: {
|
|
3841
3842
|
enableReinitialize: true,
|
|
@@ -3850,20 +3851,20 @@ var EditPane = function EditPane(_ref) {
|
|
|
3850
3851
|
className: "neeto-ui-text-gray-700 neeto-ui-mb-2",
|
|
3851
3852
|
style: "body2",
|
|
3852
3853
|
weight: "bold"
|
|
3853
|
-
}, t("slack.configure.sendToDescription"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3854
|
+
}, t("neetoSlack.slack.configure.sendToDescription"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3854
3855
|
className: "relative flex flex-col items-start gap-y-3"
|
|
3855
3856
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Select, {
|
|
3856
3857
|
isSearchable: true,
|
|
3857
3858
|
className: "w-full",
|
|
3858
3859
|
name: "selectedChannel",
|
|
3859
3860
|
options: formikProps.values.channels,
|
|
3860
|
-
placeholder: t("slack.placeholder"),
|
|
3861
|
+
placeholder: t("neetoSlack.slack.placeholder"),
|
|
3861
3862
|
size: "large"
|
|
3862
3863
|
}), /*#__PURE__*/React__default["default"].createElement(SlackRefreshChannelListButton$1, {
|
|
3863
3864
|
channelRefreshHandler: channelRefreshHandler
|
|
3864
3865
|
}))), ramda.is(Function, children) ? children(_objectSpread$1({}, formikProps)) : children), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3865
3866
|
disabled: isSubmitting || formikProps.isSubmitting,
|
|
3866
|
-
label: t("common.save"),
|
|
3867
|
+
label: t("neetoSlack.common.save"),
|
|
3867
3868
|
loading: isSubmitting || formikProps.isSubmitting,
|
|
3868
3869
|
type: "submit"
|
|
3869
3870
|
})));
|
|
@@ -3884,14 +3885,19 @@ var Settings = function Settings(_ref) {
|
|
|
3884
3885
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3885
3886
|
className: classNames__default["default"]("neeto-ui-w-full neeto-ui-space-y-6", className)
|
|
3886
3887
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3887
|
-
className: "neeto-ui-
|
|
3888
|
+
className: "neeto-ui-mb-6"
|
|
3888
3889
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3889
3890
|
style: "h3"
|
|
3890
3891
|
}, /*#__PURE__*/React__default["default"].createElement(Trans, {
|
|
3891
|
-
i18nKey: "slack.settings.title",
|
|
3892
|
+
i18nKey: "neetoSlack.slack.settings.title",
|
|
3892
3893
|
values: {
|
|
3893
|
-
teamName: teamName
|
|
3894
|
-
|
|
3894
|
+
teamName: teamName
|
|
3895
|
+
},
|
|
3896
|
+
components: {
|
|
3897
|
+
a: /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3898
|
+
className: "neeto-ui-text-primary-800",
|
|
3899
|
+
href: toSlackUrl(teamName)
|
|
3900
|
+
})
|
|
3895
3901
|
}
|
|
3896
3902
|
}))), fields.map(function (field, index) {
|
|
3897
3903
|
return /*#__PURE__*/React__default["default"].createElement(Field, {
|
|
@@ -3904,7 +3910,7 @@ var Settings = function Settings(_ref) {
|
|
|
3904
3910
|
});
|
|
3905
3911
|
}), children, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3906
3912
|
className: "my-4 mr-auto",
|
|
3907
|
-
label: t("common.edit"),
|
|
3913
|
+
label: t("neetoSlack.common.edit"),
|
|
3908
3914
|
onClick: onEdit
|
|
3909
3915
|
}));
|
|
3910
3916
|
};
|
|
@@ -3926,19 +3932,24 @@ var Configure = function Configure(_ref) {
|
|
|
3926
3932
|
var _useTranslation = useTranslation(),
|
|
3927
3933
|
t = _useTranslation.t;
|
|
3928
3934
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3929
|
-
className: classNames__default["default"]("neeto-ui-w-full neeto-ui-space-y-6 mx-auto max-w-
|
|
3935
|
+
className: classNames__default["default"]("neeto-ui-w-full neeto-ui-space-y-6 mx-auto max-w-lg", className)
|
|
3930
3936
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3931
3937
|
className: "neeto-ui-mb-6 neeto-ui-w-full"
|
|
3932
3938
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3933
3939
|
style: "h3"
|
|
3934
3940
|
}, /*#__PURE__*/React__default["default"].createElement(Trans, {
|
|
3935
|
-
i18nKey: "slack.configure.title",
|
|
3941
|
+
i18nKey: "neetoSlack.slack.configure.title",
|
|
3936
3942
|
values: {
|
|
3937
|
-
teamName: teamName
|
|
3938
|
-
|
|
3943
|
+
teamName: teamName
|
|
3944
|
+
},
|
|
3945
|
+
components: {
|
|
3946
|
+
a: /*#__PURE__*/React__default["default"].createElement("a", {
|
|
3947
|
+
className: "neeto-ui-text-primary-800",
|
|
3948
|
+
href: ramda.isEmpty(slackUrl) ? toSlackUrl(teamName) : slackUrl
|
|
3949
|
+
})
|
|
3939
3950
|
}
|
|
3940
3951
|
}))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
3941
|
-
className: "neeto-ui-w-full",
|
|
3952
|
+
className: "neeto-ui-w-full max-w-md",
|
|
3942
3953
|
formikProps: {
|
|
3943
3954
|
enableReinitialize: true,
|
|
3944
3955
|
initialValues: initialFormValues,
|
|
@@ -3952,19 +3963,19 @@ var Configure = function Configure(_ref) {
|
|
|
3952
3963
|
className: "neeto-ui-text-gray-700 neeto-ui-mb-3",
|
|
3953
3964
|
style: "body2",
|
|
3954
3965
|
weight: "normal"
|
|
3955
|
-
}, ramda.isEmpty(channelSelectLabel) ? t("slack.configure.sendToDescription") : channelSelectLabel), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3966
|
+
}, ramda.isEmpty(channelSelectLabel) ? t("neetoSlack.slack.configure.sendToDescription") : channelSelectLabel), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3956
3967
|
className: "relative flex flex-col items-start gap-y-3"
|
|
3957
3968
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Select, {
|
|
3958
3969
|
isSearchable: true,
|
|
3959
3970
|
className: "w-full",
|
|
3960
3971
|
name: "selectedChannel",
|
|
3961
3972
|
options: formikProps.values.channels,
|
|
3962
|
-
placeholder: t("slack.placeholder"),
|
|
3973
|
+
placeholder: t("neetoSlack.slack.placeholder"),
|
|
3963
3974
|
size: "large"
|
|
3964
3975
|
}), /*#__PURE__*/React__default["default"].createElement(SlackRefreshChannelListButton$1, {
|
|
3965
3976
|
channelRefreshHandler: channelRefreshHandler
|
|
3966
3977
|
}))), ramda.is(Function, children) ? children(formikProps) : children, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3967
|
-
label: t("common.continue"),
|
|
3978
|
+
label: t("neetoSlack.common.continue"),
|
|
3968
3979
|
loading: isSubmitting,
|
|
3969
3980
|
type: "submit"
|
|
3970
3981
|
}));
|
|
@@ -3984,12 +3995,12 @@ var Connect = function Connect(_ref) {
|
|
|
3984
3995
|
className: "neeto-ui-text-gray-800 neeto-ui-mb-0.5 neeto-ui-mt-6",
|
|
3985
3996
|
style: "h2",
|
|
3986
3997
|
weight: "semibold"
|
|
3987
|
-
}, t("slack.connect.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3998
|
+
}, t("neetoSlack.slack.connect.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3988
3999
|
className: "neeto-ui-text-gray-700 neeto-ui-mb-4",
|
|
3989
4000
|
style: "body1",
|
|
3990
4001
|
weight: "normal"
|
|
3991
|
-
}, t("slack.connect.description")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3992
|
-
label: t("slack.connect.loginButton"),
|
|
4002
|
+
}, t("neetoSlack.slack.connect.description")), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4003
|
+
label: t("neetoSlack.slack.connect.loginButton"),
|
|
3993
4004
|
loading: isAuthorizeUrlFetching,
|
|
3994
4005
|
onClick: handleRedirectToSlack
|
|
3995
4006
|
}));
|
|
@@ -4044,7 +4055,7 @@ var Finish = function Finish(_ref) {
|
|
|
4044
4055
|
style: "h3",
|
|
4045
4056
|
weight: "bold"
|
|
4046
4057
|
}, /*#__PURE__*/React__default["default"].createElement(Trans, {
|
|
4047
|
-
i18nKey: "slack.finish.title",
|
|
4058
|
+
i18nKey: "neetoSlack.slack.finish.title",
|
|
4048
4059
|
values: {
|
|
4049
4060
|
teamName: teamName
|
|
4050
4061
|
}
|
|
@@ -4061,11 +4072,11 @@ var Finish = function Finish(_ref) {
|
|
|
4061
4072
|
className: "neeto-ui-flex neeto-ui-w-full neeto-ui-flex-row neeto-ui-mt-6"
|
|
4062
4073
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$1({
|
|
4063
4074
|
className: "neeto-ui-my-1",
|
|
4064
|
-
label: t("common.done"),
|
|
4075
|
+
label: t("neetoSlack.common.done"),
|
|
4065
4076
|
onClick: onSuccess
|
|
4066
4077
|
}, buttonProps)), pure.isNotEmpty(secondaryButtonProps) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$1({
|
|
4067
4078
|
className: "neeto-ui-my-1 neeto-ui-ml-2",
|
|
4068
|
-
label: t("common.edit"),
|
|
4079
|
+
label: t("neetoSlack.common.edit"),
|
|
4069
4080
|
style: "secondary",
|
|
4070
4081
|
onClick: onBack
|
|
4071
4082
|
}, secondaryButtonProps))));
|