cozy-ui 127.16.0 → 128.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/CHANGELOG.md +19 -0
- package/package.json +6 -4
- package/patches/@fastify+deepmerge+2.0.2.patch +27 -0
- package/react/Table/Readme.md +8 -1
- package/react/Table/Virtualized/RowContent.jsx +1 -1
- package/react/Table/Virtualized/index.jsx +4 -1
- package/transpiled/react/Table/Virtualized/RowContent.js +2 -2
- package/transpiled/react/Table/Virtualized/index.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [128.0.0](https://github.com/cozy/cozy-ui/compare/v127.17.0...v128.0.0) (2025-09-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* upgrade cozy-client ([6dc714d](https://github.com/cozy/cozy-ui/commit/6dc714d))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* You must have `cozy-client >=60.5.0`
|
|
12
|
+
|
|
13
|
+
# [127.17.0](https://github.com/cozy/cozy-ui/compare/v127.16.0...v127.17.0) (2025-08-28)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Implement range selection in list view and grid view :sparkles: ([a9274f2](https://github.com/cozy/cozy-ui/commit/a9274f2))
|
|
19
|
+
|
|
1
20
|
# [127.16.0](https://github.com/cozy/cozy-ui/compare/v127.15.0...v127.16.0) (2025-08-26)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "128.0.0",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"test": "jest",
|
|
51
51
|
"screenshots:server": "nodemon ./scripts/pixelmatch-server/server.js -e js,hbs",
|
|
52
52
|
"postbuild": "postcss transpiled/react/stylesheet.css --replace",
|
|
53
|
+
"postinstall": "patch-package",
|
|
53
54
|
"travis-deploy-once": "travis-deploy-once",
|
|
54
55
|
"start:css:utils": "yarn build:css:utils --watch",
|
|
55
56
|
"start:css": "yarn build:css --watch",
|
|
@@ -93,12 +94,12 @@
|
|
|
93
94
|
"browserslist-config-cozy": "0.4.0",
|
|
94
95
|
"bundlemon": "3.1.0",
|
|
95
96
|
"copyfiles": "2.4.1",
|
|
96
|
-
"cozy-client": "^
|
|
97
|
+
"cozy-client": "^60.5.0",
|
|
97
98
|
"cozy-device-helper": "2.0.0",
|
|
98
99
|
"cozy-flags": "^2.10.1",
|
|
99
100
|
"cozy-intent": "^2.29.1",
|
|
100
101
|
"cozy-logger": "^1.9.0",
|
|
101
|
-
"cozy-stack-client": "^
|
|
102
|
+
"cozy-stack-client": "^60.1.0",
|
|
102
103
|
"css-loader": "0.28.11",
|
|
103
104
|
"cssnano": "4.1.11",
|
|
104
105
|
"cssnano-preset-advanced": "4.0.8",
|
|
@@ -127,6 +128,7 @@
|
|
|
127
128
|
"mini-css-extract-plugin": "0.6.0",
|
|
128
129
|
"nodemon": "1.19.4",
|
|
129
130
|
"npm-run-all": "4.1.5",
|
|
131
|
+
"patch-package": "^8.0.0",
|
|
130
132
|
"postcss-cli": "6.1.3",
|
|
131
133
|
"postcss-loader": "2.1.6",
|
|
132
134
|
"prettier": "2.6.0",
|
|
@@ -186,7 +188,7 @@
|
|
|
186
188
|
"rooks": "7.14.1"
|
|
187
189
|
},
|
|
188
190
|
"peerDependencies": {
|
|
189
|
-
"cozy-client": ">=
|
|
191
|
+
"cozy-client": ">=60.5.0",
|
|
190
192
|
"cozy-device-helper": ">=2.0.0",
|
|
191
193
|
"cozy-flags": ">=2.10.1",
|
|
192
194
|
"cozy-intent": ">=2.29.1",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
diff --git a/node_modules/@fastify/deepmerge/index.js b/node_modules/@fastify/deepmerge/index.js
|
|
2
|
+
index e3ba232..e733358 100644
|
|
3
|
+
--- a/node_modules/@fastify/deepmerge/index.js
|
|
4
|
+
+++ b/node_modules/@fastify/deepmerge/index.js
|
|
5
|
+
@@ -65,11 +65,11 @@ function deepmergeConstructor (options) {
|
|
6
|
+
return result
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
- const getKeys = options?.symbols
|
|
10
|
+
+ const getKeys = (options && options.symbols)
|
|
11
|
+
? getSymbolsAndKeys
|
|
12
|
+
: Object.keys
|
|
13
|
+
|
|
14
|
+
- const cloneProtoObject = typeof options?.cloneProtoObject === 'function'
|
|
15
|
+
+ const cloneProtoObject = (options && typeof options.cloneProtoObject === 'function')
|
|
16
|
+
? options.cloneProtoObject
|
|
17
|
+
: undefined
|
|
18
|
+
|
|
19
|
+
@@ -161,7 +161,7 @@ function deepmergeConstructor (options) {
|
|
20
|
+
return result
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- return options?.all
|
|
24
|
+
+ return (options && options.all)
|
|
25
|
+
? _deepmergeAll
|
|
26
|
+
: _deepmerge
|
|
27
|
+
}
|
package/react/Table/Readme.md
CHANGED
|
@@ -103,7 +103,13 @@ const initialVariants = [{ grouped: false }]
|
|
|
103
103
|
|
|
104
104
|
const makeGroups = () => ({ groupLabels: ['C', 'D', 'Others'], groupCounts: [1,1,12] })
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
/**
|
|
107
|
+
* @param order
|
|
108
|
+
* @param orderBy
|
|
109
|
+
*/
|
|
110
|
+
const onSortChange = ({ order, orderBy }) => {
|
|
111
|
+
setState({ order, orderBy })
|
|
112
|
+
}
|
|
107
113
|
|
|
108
114
|
<Variants initialVariants={initialVariants} screenshotAllVariants>
|
|
109
115
|
{variant => (
|
|
@@ -117,6 +123,7 @@ const makeGroups = () => ({ groupLabels: ['C', 'D', 'Others'], groupCounts: [1,1
|
|
|
117
123
|
isSelectedItem={row => isSelectedItem(row)}
|
|
118
124
|
onSelect={onSelect}
|
|
119
125
|
onSelectAll={onSelectAll}
|
|
126
|
+
onSortChange={onSortChange}
|
|
120
127
|
componentsProps={{
|
|
121
128
|
rowContent: {
|
|
122
129
|
onClick: (row, column) => { console.info(`click on cell. Row ${row['id']}, Column ${column['id']}`) },
|
|
@@ -23,6 +23,7 @@ const VirtualizedTable = forwardRef(
|
|
|
23
23
|
componentsProps,
|
|
24
24
|
context,
|
|
25
25
|
components,
|
|
26
|
+
onSortChange,
|
|
26
27
|
...props
|
|
27
28
|
},
|
|
28
29
|
ref
|
|
@@ -43,8 +44,10 @@ const VirtualizedTable = forwardRef(
|
|
|
43
44
|
|
|
44
45
|
const handleSort = property => {
|
|
45
46
|
const isAsc = orderBy === property && order === 'asc'
|
|
46
|
-
|
|
47
|
+
const newOrder = isAsc ? 'desc' : 'asc'
|
|
48
|
+
setOrder(newOrder)
|
|
47
49
|
setOrderBy(property)
|
|
50
|
+
onSortChange({ order: newOrder, orderBy: property })
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
const handleSelectAll = event => {
|
|
@@ -27,8 +27,8 @@ var RowContent = function RowContent(_ref) {
|
|
|
27
27
|
'aria-labelledby': "enhanced-table-checkbox-".concat(index)
|
|
28
28
|
},
|
|
29
29
|
size: "small",
|
|
30
|
-
|
|
31
|
-
return onSelectClick(row);
|
|
30
|
+
onClick: function onClick(event) {
|
|
31
|
+
return onSelectClick(event, row, index);
|
|
32
32
|
}
|
|
33
33
|
})), columns.map(function (column) {
|
|
34
34
|
return /*#__PURE__*/React.createElement(Cell, {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["rows", "columns", "groups", "defaultOrder", "secondarySort", "selectedItems", "onSelect", "onSelectAll", "isSelectedItem", "componentsProps", "context", "components"];
|
|
5
|
+
var _excluded = ["rows", "columns", "groups", "defaultOrder", "secondarySort", "selectedItems", "onSelect", "onSelectAll", "isSelectedItem", "componentsProps", "context", "components", "onSortChange"];
|
|
6
6
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
@@ -29,6 +29,7 @@ var VirtualizedTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
componentsProps = _ref.componentsProps,
|
|
30
30
|
context = _ref.context,
|
|
31
31
|
components = _ref.components,
|
|
32
|
+
onSortChange = _ref.onSortChange,
|
|
32
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
|
|
34
35
|
var _useState = useState('asc'),
|
|
@@ -60,8 +61,13 @@ var VirtualizedTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
60
61
|
|
|
61
62
|
var handleSort = function handleSort(property) {
|
|
62
63
|
var isAsc = orderBy === property && order === 'asc';
|
|
63
|
-
|
|
64
|
+
var newOrder = isAsc ? 'desc' : 'asc';
|
|
65
|
+
setOrder(newOrder);
|
|
64
66
|
setOrderBy(property);
|
|
67
|
+
onSortChange({
|
|
68
|
+
order: newOrder,
|
|
69
|
+
orderBy: property
|
|
70
|
+
});
|
|
65
71
|
};
|
|
66
72
|
|
|
67
73
|
var handleSelectAll = function handleSelectAll(event) {
|