cozy-bar 35.4.13 → 35.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 +8 -0
- package/dist/components/Bar.js +5 -2
- package/dist/components/Elements/BarSearch.js +14 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -105,6 +105,14 @@ To disable search:
|
|
|
105
105
|
<BarComponent searchOptions={{ enabled: false }} />
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
To hide the AI assistant button in the search bar (e.g. when the assistant is already displayed):
|
|
109
|
+
|
|
110
|
+
```jsx
|
|
111
|
+
<BarComponent
|
|
112
|
+
componentsProps={{ BarSearch: { disabledAssistantButton: true } }}
|
|
113
|
+
/>
|
|
114
|
+
```
|
|
115
|
+
|
|
108
116
|
## License
|
|
109
117
|
|
|
110
118
|
Cozy Bar is distributed under the MIT license.
|
package/dist/components/Bar.js
CHANGED
|
@@ -95,9 +95,9 @@ var Bar = function Bar(_ref) {
|
|
|
95
95
|
appTextIcon: appTextIcon
|
|
96
96
|
})), barCenter, /*#__PURE__*/_react.default.createElement("div", {
|
|
97
97
|
className: "u-flex-grow"
|
|
98
|
-
}, barSearch || /*#__PURE__*/_react.default.createElement(_BarSearch.default, {
|
|
98
|
+
}, barSearch || /*#__PURE__*/_react.default.createElement(_BarSearch.default, (0, _extends2.default)({}, componentsProps === null || componentsProps === void 0 ? void 0 : componentsProps.BarSearch, {
|
|
99
99
|
isSearchEnabled: isSearchEnabled
|
|
100
|
-
})), isSearchEnabled && isMobile ? /*#__PURE__*/_react.default.createElement(_SearchButton.default, null) : null, barRight, !isPublic && /*#__PURE__*/_react.default.createElement(_TwakeRight.default, {
|
|
100
|
+
}))), isSearchEnabled && isMobile ? /*#__PURE__*/_react.default.createElement(_SearchButton.default, null) : null, barRight, !isPublic && /*#__PURE__*/_react.default.createElement(_TwakeRight.default, {
|
|
101
101
|
componentsProps: componentsProps,
|
|
102
102
|
apps: apps,
|
|
103
103
|
appSlug: appSlug,
|
|
@@ -119,6 +119,9 @@ Bar.propTypes = {
|
|
|
119
119
|
Wrapper: _propTypes.default.shape({
|
|
120
120
|
className: _propTypes.default.string
|
|
121
121
|
}),
|
|
122
|
+
BarSearch: _propTypes.default.shape({
|
|
123
|
+
disabledAssistantButton: _propTypes.default.bool
|
|
124
|
+
}),
|
|
122
125
|
UserMenu: _propTypes.default.shape({
|
|
123
126
|
showEmailDomainChip: _propTypes.default.bool
|
|
124
127
|
})
|
|
@@ -7,14 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireDefault(require("react"));
|
|
11
15
|
|
|
12
16
|
var _cozySearch = require("cozy-search");
|
|
13
17
|
|
|
14
18
|
var _Breakpoints = require("cozy-ui/transpiled/react/providers/Breakpoints");
|
|
15
19
|
|
|
20
|
+
var _excluded = ["isSearchEnabled"];
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
25
|
+
|
|
16
26
|
var BarSearch = function BarSearch(_ref) {
|
|
17
|
-
var isSearchEnabled = _ref.isSearchEnabled
|
|
27
|
+
var isSearchEnabled = _ref.isSearchEnabled,
|
|
28
|
+
searchBarDesktopProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
29
|
|
|
19
30
|
var _useBreakpoints = (0, _Breakpoints.useBreakpoints)(),
|
|
20
31
|
isMobile = _useBreakpoints.isMobile;
|
|
@@ -24,9 +35,9 @@ var BarSearch = function BarSearch(_ref) {
|
|
|
24
35
|
className: "u-flex-grow u-mh-2"
|
|
25
36
|
}, /*#__PURE__*/_react.default.createElement(_cozySearch.AssistantDesktop, {
|
|
26
37
|
componentsProps: {
|
|
27
|
-
SearchBarDesktop: {
|
|
38
|
+
SearchBarDesktop: _objectSpread({
|
|
28
39
|
size: 'small'
|
|
29
|
-
}
|
|
40
|
+
}, searchBarDesktopProps)
|
|
30
41
|
}
|
|
31
42
|
}));
|
|
32
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-bar",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.5.0",
|
|
4
4
|
"description": "cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy Cloud <contact@cozycloud.cc> (https://cozy.io/)",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-router-dom": ">=6.14.2",
|
|
76
76
|
"twake-i18n": ">=0.3.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "c9329d8ecac473e8ea651a8564987414121698a6"
|
|
79
79
|
}
|