cozy-bar 19.1.0 → 20.0.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 +9 -9
- package/dist/components/AppsMenu/AppsMenuContent.js +2 -1
- package/dist/components/AppsMenu/components/AppItem.js +6 -4
- package/dist/components/BarComponent.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/apps-menu.styl +15 -4
- package/dist/stylesheet.css +19 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -98,9 +98,9 @@ You also need to disable the internal store onto the `BarComponent` with the pro
|
|
|
98
98
|
<BarComponent disableInternalStore />
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
##
|
|
101
|
+
## Search and AI assistant
|
|
102
102
|
|
|
103
|
-
Search and AI assistant is now proposed by the cozy-bar.
|
|
103
|
+
Search and AI assistant is now proposed by the cozy-bar. They are enabled by default so you need to:
|
|
104
104
|
|
|
105
105
|
1. Setup the search
|
|
106
106
|
|
|
@@ -109,13 +109,7 @@ In the app using the cozy-bar :
|
|
|
109
109
|
- DataProxyProvider must be added before BarProvider
|
|
110
110
|
- If you want to use the AI assistant, you need to add [the following permissions](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-search#prerequisite-for-ai-components)
|
|
111
111
|
|
|
112
|
-
2.
|
|
113
|
-
|
|
114
|
-
```jsx
|
|
115
|
-
`<BarComponent searchOptions={{ enabled: true }} />`
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
3. Add the routes
|
|
112
|
+
2. Add the routes
|
|
119
113
|
|
|
120
114
|
These routes allow to display the search and AI assistant dialogs.
|
|
121
115
|
|
|
@@ -130,6 +124,12 @@ import { BarRoutes } from 'cozy-bar'
|
|
|
130
124
|
</Routes>
|
|
131
125
|
```
|
|
132
126
|
|
|
127
|
+
3. You can still disabled the search
|
|
128
|
+
|
|
129
|
+
```jsx
|
|
130
|
+
`<BarComponent searchOptions={{ enabled: false }} />`
|
|
131
|
+
```
|
|
132
|
+
|
|
133
133
|
## Change theme bar
|
|
134
134
|
|
|
135
135
|
It's possible to update theme on the cozy-bar with `setTheme` function using the bar context
|
|
@@ -17,7 +17,8 @@ var _reducers = require("../../lib/reducers");
|
|
|
17
17
|
var styles = {
|
|
18
18
|
"apps-menu-grid": "apps-menu-grid",
|
|
19
19
|
"apps-menu-grid-item-wrapper": "apps-menu-grid-item-wrapper",
|
|
20
|
-
"apps-menu-grid-item": "apps-menu-grid-item"
|
|
20
|
+
"apps-menu-grid-item": "apps-menu-grid-item",
|
|
21
|
+
"apps-menu-grid-item-icon": "apps-menu-grid-item-icon"
|
|
21
22
|
};
|
|
22
23
|
var sorter = function sorter(fn) {
|
|
23
24
|
return function (itemA, itemB) {
|
|
@@ -18,7 +18,8 @@ var _stack = _interopRequireDefault(require("../../../lib/stack"));
|
|
|
18
18
|
var styles = {
|
|
19
19
|
"apps-menu-grid": "apps-menu-grid",
|
|
20
20
|
"apps-menu-grid-item-wrapper": "apps-menu-grid-item-wrapper",
|
|
21
|
-
"apps-menu-grid-item": "apps-menu-grid-item"
|
|
21
|
+
"apps-menu-grid-item": "apps-menu-grid-item",
|
|
22
|
+
"apps-menu-grid-item-icon": "apps-menu-grid-item-icon"
|
|
22
23
|
};
|
|
23
24
|
var AppItem = exports.AppItem = function AppItem(_ref) {
|
|
24
25
|
var app = _ref.app;
|
|
@@ -39,13 +40,14 @@ var AppItem = exports.AppItem = function AppItem(_ref) {
|
|
|
39
40
|
className: (0, _classnames.default)(styles['apps-menu-grid-item-wrapper'], 'u-bdrs-5'),
|
|
40
41
|
label: /*#__PURE__*/_react.default.createElement("div", {
|
|
41
42
|
className: styles['apps-menu-grid-item']
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: styles['apps-menu-grid-item-icon']
|
|
42
45
|
}, /*#__PURE__*/_react.default.createElement(_AppIcon.default, (0, _extends2.default)({
|
|
43
46
|
app: app,
|
|
44
47
|
key: app.slug
|
|
45
|
-
}, _stack.default.get.iconProps())), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
48
|
+
}, _stack.default.get.iconProps()))), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
46
49
|
variant: "subtitle1",
|
|
47
|
-
noWrap: true
|
|
48
|
-
className: "u-mt-half"
|
|
50
|
+
noWrap: true
|
|
49
51
|
}, appName))
|
|
50
52
|
});
|
|
51
53
|
});
|
|
@@ -86,7 +86,7 @@ var BarComponent = exports.BarComponent = function BarComponent(_ref2) {
|
|
|
86
86
|
disableInternalStore = _ref2$disableInternal === void 0 ? false : _ref2$disableInternal,
|
|
87
87
|
_ref2$searchOptions = _ref2.searchOptions,
|
|
88
88
|
searchOptions = _ref2$searchOptions === void 0 ? {
|
|
89
|
-
enabled:
|
|
89
|
+
enabled: true
|
|
90
90
|
} : _ref2$searchOptions,
|
|
91
91
|
_ref2$componentsProps = _ref2.componentsProps,
|
|
92
92
|
componentsProps = _ref2$componentsProps === void 0 ? {} : _ref2$componentsProps;
|
package/dist/index.js
CHANGED
|
@@ -4,21 +4,32 @@
|
|
|
4
4
|
display flex
|
|
5
5
|
flex-wrap wrap
|
|
6
6
|
width 100%
|
|
7
|
-
box-sizing border-box
|
|
8
7
|
|
|
9
8
|
+desktop()
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
width 15rem
|
|
10
|
+
margin-left .5rem
|
|
11
|
+
margin-right .5rem
|
|
12
12
|
|
|
13
13
|
.apps-menu-grid-item-wrapper
|
|
14
14
|
width 33%
|
|
15
15
|
aspect-ratio 1 // @stylint ignore Property is valid but unknown by stylint which is old and should be replaced
|
|
16
16
|
|
|
17
|
+
+desktop()
|
|
18
|
+
width 5rem
|
|
19
|
+
height 5rem
|
|
20
|
+
|
|
17
21
|
.apps-menu-grid-item
|
|
18
22
|
display flex
|
|
19
23
|
flex-direction column
|
|
20
24
|
justify-content center
|
|
21
25
|
align-items center
|
|
22
26
|
text-decoration none
|
|
27
|
+
gap .2rem // @stylint ignore Property is valid but unknown by stylint which is old and should be replaced
|
|
28
|
+
width 100%
|
|
29
|
+
|
|
30
|
+
.apps-menu-grid-item-icon
|
|
23
31
|
width 60%
|
|
24
|
-
|
|
32
|
+
|
|
33
|
+
+desktop()
|
|
34
|
+
width 2.625rem
|
|
35
|
+
height 2.625rem
|
package/dist/stylesheet.css
CHANGED
|
@@ -4,26 +4,41 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
width: 100%;
|
|
7
|
-
box-sizing: border-box;
|
|
8
7
|
}
|
|
9
8
|
@media (min-width: 64rem) {
|
|
10
9
|
.apps-menu-grid {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
width: 15rem;
|
|
11
|
+
margin-left: 0.5rem;
|
|
12
|
+
margin-right: 0.5rem;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
.apps-menu-grid-item-wrapper {
|
|
16
16
|
width: 33%;
|
|
17
17
|
aspect-ratio: 1;
|
|
18
18
|
}
|
|
19
|
+
@media (min-width: 64rem) {
|
|
20
|
+
.apps-menu-grid-item-wrapper {
|
|
21
|
+
width: 5rem;
|
|
22
|
+
height: 5rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
.apps-menu-grid-item {
|
|
20
26
|
display: flex;
|
|
21
27
|
flex-direction: column;
|
|
22
28
|
justify-content: center;
|
|
23
29
|
align-items: center;
|
|
24
30
|
text-decoration: none;
|
|
31
|
+
gap: 0.2rem;
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
.apps-menu-grid-item-icon {
|
|
25
35
|
width: 60%;
|
|
26
|
-
|
|
36
|
+
}
|
|
37
|
+
@media (min-width: 64rem) {
|
|
38
|
+
.apps-menu-grid-item-icon {
|
|
39
|
+
width: 2.625rem;
|
|
40
|
+
height: 2.625rem;
|
|
41
|
+
}
|
|
27
42
|
}
|
|
28
43
|
/* imported from user-menu.styl */
|
|
29
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-bar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.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/)",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"cozy-interapp": "0.4.9",
|
|
51
51
|
"cozy-logger": "1.9.1",
|
|
52
52
|
"cozy-realtime": "^4.0.5",
|
|
53
|
+
"cozy-search": "^0.4.0",
|
|
53
54
|
"cozy-ui": "^122.0.1",
|
|
54
55
|
"eslint-config-cozy-app": "2.0.0",
|
|
55
56
|
"identity-obj-proxy": "3.0.0",
|
|
@@ -64,7 +65,6 @@
|
|
|
64
65
|
"stylus-config-cozy-app": "^0.1.0"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"cozy-search": "0.3.0",
|
|
68
68
|
"hammerjs": "2.0.8",
|
|
69
69
|
"lodash.debounce": "4.0.8",
|
|
70
70
|
"lodash.set": "^4.3.2",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"cozy-intent": ">=2.29.1",
|
|
86
86
|
"cozy-interapp": ">=0.4.9",
|
|
87
87
|
"cozy-realtime": ">=4.0.5",
|
|
88
|
+
"cozy-search": ">=0.4.0",
|
|
88
89
|
"cozy-ui": ">=122.0.1",
|
|
89
90
|
"react": ">=16.10.1",
|
|
90
91
|
"react-dom": ">=16.10.1",
|