@panneau/core 3.0.279 → 3.0.282
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/hooks.js +13 -3
- package/package.json +2 -2
package/es/hooks.js
CHANGED
|
@@ -100,12 +100,17 @@ var useActions = function useActions() {
|
|
|
100
100
|
_ref$preferEditModal = _ref.preferEditModal,
|
|
101
101
|
preferEditModal = _ref$preferEditModal === void 0 ? false : _ref$preferEditModal,
|
|
102
102
|
_ref$preferDeleteModa = _ref.preferDeleteModal,
|
|
103
|
-
preferDeleteModal = _ref$preferDeleteModa === void 0 ? false : _ref$preferDeleteModa
|
|
103
|
+
preferDeleteModal = _ref$preferDeleteModa === void 0 ? false : _ref$preferDeleteModa,
|
|
104
|
+
_ref$hasDuplicateRout = _ref.hasDuplicateRoute,
|
|
105
|
+
hasDuplicateRoute = _ref$hasDuplicateRout === void 0 ? false : _ref$hasDuplicateRout;
|
|
104
106
|
var _ref2 = item || {},
|
|
105
107
|
id = _ref2.id,
|
|
106
108
|
_ref2$url = _ref2.url,
|
|
107
109
|
url = _ref2$url === void 0 ? null : _ref2$url;
|
|
108
110
|
var hasCustomShowUrl = showUrl !== null || url !== null;
|
|
111
|
+
console.log(urlGenerator, hasDuplicateRoute, urlGenerator !== null && hasDuplicateRoute ? urlGenerator('duplicate', {
|
|
112
|
+
id: id
|
|
113
|
+
}) : null);
|
|
109
114
|
return (actions || []).map(function (action) {
|
|
110
115
|
if (isString(action)) {
|
|
111
116
|
switch (action) {
|
|
@@ -162,12 +167,17 @@ var useActions = function useActions() {
|
|
|
162
167
|
case 'duplicate':
|
|
163
168
|
return {
|
|
164
169
|
id: 'duplicate',
|
|
165
|
-
component: 'duplicate'
|
|
170
|
+
component: 'duplicate',
|
|
171
|
+
label: null,
|
|
172
|
+
href: urlGenerator !== null && hasDuplicateRoute ? urlGenerator('duplicate', {
|
|
173
|
+
id: id
|
|
174
|
+
}) || null : null
|
|
166
175
|
};
|
|
167
176
|
case 'restore':
|
|
168
177
|
return {
|
|
169
178
|
id: 'restore',
|
|
170
|
-
component: 'restore'
|
|
179
|
+
component: 'restore',
|
|
180
|
+
label: null
|
|
171
181
|
};
|
|
172
182
|
case 'delete':
|
|
173
183
|
return _objectSpread({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.282",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"publishConfig": {
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "0d41e00f810c194b1b0b09e83a4b2f6df05a5d5a"
|
|
114
114
|
}
|