cozy-search 2.0.1 → 2.0.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.
|
@@ -67,7 +67,7 @@ var providers = [{
|
|
|
67
67
|
id: "custom",
|
|
68
68
|
name: "assistant_create.steps.provider_selection.custom.name",
|
|
69
69
|
description: "assistant_create.steps.provider_selection.custom.description",
|
|
70
|
-
icon: "
|
|
70
|
+
icon: "PlusSmall",
|
|
71
71
|
external: true
|
|
72
72
|
}];
|
|
73
73
|
var styles = {
|
|
@@ -57,7 +57,7 @@ var providers = [{
|
|
|
57
57
|
id: "custom",
|
|
58
58
|
name: "assistant_create.steps.provider_selection.custom.name",
|
|
59
59
|
description: "assistant_create.steps.provider_selection.custom.description",
|
|
60
|
-
icon: "
|
|
60
|
+
icon: "PlusSmall",
|
|
61
61
|
external: true
|
|
62
62
|
}];
|
|
63
63
|
/**
|
|
@@ -33,6 +33,8 @@ var _twakeI18n = require("twake-i18n");
|
|
|
33
33
|
|
|
34
34
|
var _locales = require("../../locales");
|
|
35
35
|
|
|
36
|
+
var _AssistantProvider = require("../AssistantProvider");
|
|
37
|
+
|
|
36
38
|
var _AssistantDialogContent = _interopRequireDefault(require("../CreateAssistantSteps/AssistantDialogContent"));
|
|
37
39
|
|
|
38
40
|
var _helpers = require("../CreateAssistantSteps/helpers");
|
|
@@ -81,6 +83,9 @@ var CreateAssistantDialog = function CreateAssistantDialog(_ref) {
|
|
|
81
83
|
var _useBreakpoints = (0, _Breakpoints.useBreakpoints)(),
|
|
82
84
|
isMobile = _useBreakpoints.isMobile;
|
|
83
85
|
|
|
86
|
+
var _useAssistant = (0, _AssistantProvider.useAssistant)(),
|
|
87
|
+
setSelectedAssistantId = _useAssistant.setSelectedAssistantId;
|
|
88
|
+
|
|
84
89
|
var _useAssistantDialog = (0, _useAssistantDialog2.useAssistantDialog)({
|
|
85
90
|
onClose: onClose,
|
|
86
91
|
initialData: {
|
|
@@ -110,6 +115,7 @@ var CreateAssistantDialog = function CreateAssistantDialog(_ref) {
|
|
|
110
115
|
|
|
111
116
|
var onSubmit = /*#__PURE__*/function () {
|
|
112
117
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
118
|
+
var savedAssistant;
|
|
113
119
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
114
120
|
while (1) {
|
|
115
121
|
switch (_context.prev = _context.next) {
|
|
@@ -126,12 +132,18 @@ var CreateAssistantDialog = function CreateAssistantDialog(_ref) {
|
|
|
126
132
|
});
|
|
127
133
|
|
|
128
134
|
case 2:
|
|
135
|
+
savedAssistant = _context.sent;
|
|
136
|
+
|
|
137
|
+
if (savedAssistant !== null && savedAssistant !== void 0 && savedAssistant._id) {
|
|
138
|
+
setSelectedAssistantId(savedAssistant._id);
|
|
139
|
+
}
|
|
140
|
+
|
|
129
141
|
showAlert({
|
|
130
142
|
message: t('assistant_create.success'),
|
|
131
143
|
severity: 'success'
|
|
132
144
|
});
|
|
133
145
|
|
|
134
|
-
case
|
|
146
|
+
case 5:
|
|
135
147
|
case "end":
|
|
136
148
|
return _context.stop();
|
|
137
149
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-search",
|
|
3
3
|
"description": "UI components about search bar and IA assistant",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cozy Cloud",
|
|
7
7
|
"url": "https://github.com/cozy"
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-search"
|
|
95
95
|
},
|
|
96
96
|
"types": "dist/index.d.ts",
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "e72a32948b48ca681a36323eca1e5723c34ce348"
|
|
98
98
|
}
|