@panneau/medias 3.0.202 → 3.0.204
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/es/index.js +16 -5
- package/lib/index.js +16 -5
- package/package.json +4 -4
package/es/index.js
CHANGED
@@ -1126,13 +1126,13 @@ function MediasBrowser(_ref) {
|
|
1126
1126
|
}) : columns;
|
1127
1127
|
}, [columns, withTrash, showTrashed]);
|
1128
1128
|
var finalItems = useMemo(function () {
|
1129
|
-
if (withStickySelection && (extraItems !== null || uploadedMedias !== null || uploadProcessing === true)) {
|
1129
|
+
if (withStickySelection && (extraItems !== null || selectedItems !== null || uploadedMedias !== null || uploadProcessing === true)) {
|
1130
1130
|
return uniqBy([].concat(_toConsumableArray(uploadProcessing ? [{
|
1131
1131
|
id: '-',
|
1132
1132
|
loading: true,
|
1133
1133
|
actionsDisabled: true,
|
1134
1134
|
selectionDisabled: true
|
1135
|
-
}] : []), _toConsumableArray(page === 1 ? uploadedMedias || [] : []), _toConsumableArray((
|
1135
|
+
}] : []), _toConsumableArray(page === 1 ? uploadedMedias || [] : []), _toConsumableArray(page === 1 ? (selectedItems || []).map(function (item) {
|
1136
1136
|
var _item$id = item.id,
|
1137
1137
|
itemId = _item$id === void 0 ? null : _item$id;
|
1138
1138
|
return (allItems || []).find(function () {
|
@@ -1143,6 +1143,17 @@ function MediasBrowser(_ref) {
|
|
1143
1143
|
}) || item || null;
|
1144
1144
|
}).filter(function (it) {
|
1145
1145
|
return it !== null;
|
1146
|
+
}) || [] : []), _toConsumableArray((extraItems || []).map(function (item) {
|
1147
|
+
var _item$id2 = item.id,
|
1148
|
+
itemId = _item$id2 === void 0 ? null : _item$id2;
|
1149
|
+
return (allItems || []).find(function () {
|
1150
|
+
var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1151
|
+
_ref10$id = _ref10.id,
|
1152
|
+
otherId = _ref10$id === void 0 ? null : _ref10$id;
|
1153
|
+
return otherId === itemId;
|
1154
|
+
}) || item || null;
|
1155
|
+
}).filter(function (it) {
|
1156
|
+
return it !== null;
|
1146
1157
|
})), _toConsumableArray(items || [])), function (it) {
|
1147
1158
|
return it === null || it === void 0 ? void 0 : it.id;
|
1148
1159
|
});
|
@@ -1242,9 +1253,9 @@ function MediasBrowser(_ref) {
|
|
1242
1253
|
loaded: loaded,
|
1243
1254
|
actionsProps: {
|
1244
1255
|
getDeletePropsFromItem: function getDeletePropsFromItem() {
|
1245
|
-
var
|
1246
|
-
|
1247
|
-
id =
|
1256
|
+
var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1257
|
+
_ref11$id = _ref11.id,
|
1258
|
+
id = _ref11$id === void 0 ? null : _ref11$id;
|
1248
1259
|
return {
|
1249
1260
|
href: null,
|
1250
1261
|
onClick: function onClick() {
|
package/lib/index.js
CHANGED
@@ -1128,13 +1128,13 @@ function MediasBrowser(_ref) {
|
|
1128
1128
|
}) : columns;
|
1129
1129
|
}, [columns, withTrash, showTrashed]);
|
1130
1130
|
var finalItems = React.useMemo(function () {
|
1131
|
-
if (withStickySelection && (extraItems !== null || uploadedMedias !== null || uploadProcessing === true)) {
|
1131
|
+
if (withStickySelection && (extraItems !== null || selectedItems !== null || uploadedMedias !== null || uploadProcessing === true)) {
|
1132
1132
|
return uniqBy([].concat(_toConsumableArray(uploadProcessing ? [{
|
1133
1133
|
id: '-',
|
1134
1134
|
loading: true,
|
1135
1135
|
actionsDisabled: true,
|
1136
1136
|
selectionDisabled: true
|
1137
|
-
}] : []), _toConsumableArray(page === 1 ? uploadedMedias || [] : []), _toConsumableArray((
|
1137
|
+
}] : []), _toConsumableArray(page === 1 ? uploadedMedias || [] : []), _toConsumableArray(page === 1 ? (selectedItems || []).map(function (item) {
|
1138
1138
|
var _item$id = item.id,
|
1139
1139
|
itemId = _item$id === void 0 ? null : _item$id;
|
1140
1140
|
return (allItems || []).find(function () {
|
@@ -1145,6 +1145,17 @@ function MediasBrowser(_ref) {
|
|
1145
1145
|
}) || item || null;
|
1146
1146
|
}).filter(function (it) {
|
1147
1147
|
return it !== null;
|
1148
|
+
}) || [] : []), _toConsumableArray((extraItems || []).map(function (item) {
|
1149
|
+
var _item$id2 = item.id,
|
1150
|
+
itemId = _item$id2 === void 0 ? null : _item$id2;
|
1151
|
+
return (allItems || []).find(function () {
|
1152
|
+
var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1153
|
+
_ref10$id = _ref10.id,
|
1154
|
+
otherId = _ref10$id === void 0 ? null : _ref10$id;
|
1155
|
+
return otherId === itemId;
|
1156
|
+
}) || item || null;
|
1157
|
+
}).filter(function (it) {
|
1158
|
+
return it !== null;
|
1148
1159
|
})), _toConsumableArray(items || [])), function (it) {
|
1149
1160
|
return it === null || it === void 0 ? void 0 : it.id;
|
1150
1161
|
});
|
@@ -1244,9 +1255,9 @@ function MediasBrowser(_ref) {
|
|
1244
1255
|
loaded: loaded,
|
1245
1256
|
actionsProps: {
|
1246
1257
|
getDeletePropsFromItem: function getDeletePropsFromItem() {
|
1247
|
-
var
|
1248
|
-
|
1249
|
-
id =
|
1258
|
+
var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1259
|
+
_ref11$id = _ref11.id,
|
1260
|
+
id = _ref11$id === void 0 ? null : _ref11$id;
|
1250
1261
|
return {
|
1251
1262
|
href: null,
|
1252
1263
|
onClick: function onClick() {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@panneau/medias",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.204",
|
4
4
|
"description": "",
|
5
5
|
"keywords": [
|
6
6
|
"javascript"
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"dependencies": {
|
48
48
|
"@babel/runtime": "^7.12.5",
|
49
49
|
"@panneau/core": "^3.0.194",
|
50
|
-
"@panneau/data": "^3.0.
|
50
|
+
"@panneau/data": "^3.0.203",
|
51
51
|
"@panneau/display-image": "^3.0.201",
|
52
52
|
"@panneau/element-button": "^3.0.194",
|
53
53
|
"@panneau/element-buttons": "^3.0.194",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"@panneau/element-media-player": "^3.0.199",
|
60
60
|
"@panneau/element-pagination": "^3.0.194",
|
61
61
|
"@panneau/element-table": "^3.0.200",
|
62
|
-
"@panneau/field-upload": "^3.0.
|
62
|
+
"@panneau/field-upload": "^3.0.203",
|
63
63
|
"@panneau/filter-filters": "^3.0.194",
|
64
64
|
"classnames": "^2.5.1",
|
65
65
|
"lodash": "^4.17.21",
|
@@ -69,5 +69,5 @@
|
|
69
69
|
"publishConfig": {
|
70
70
|
"access": "public"
|
71
71
|
},
|
72
|
-
"gitHead": "
|
72
|
+
"gitHead": "d9693b3e1d6112feb97a0752590c2715024b6789"
|
73
73
|
}
|