@panneau/core 3.0.314 → 3.0.319

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.
Files changed (2) hide show
  1. package/es/hooks.js +6 -3
  2. package/package.json +2 -2
package/es/hooks.js CHANGED
@@ -2,6 +2,7 @@ import get from 'lodash-es/get';
2
2
  import isArray from 'lodash-es/isArray';
3
3
  import { useMemo, useRef, useEffect, useCallback, useState } from 'react';
4
4
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
5
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
5
6
  import isObject from 'lodash-es/isObject';
6
7
  import isString from 'lodash-es/isString';
7
8
  import { EventsManager, MediasParser } from '@panneau/core';
@@ -9,7 +10,6 @@ import { createUseEvent, loadPackage } from '@panneau/core/utils';
9
10
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
10
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
11
12
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
12
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
13
13
  import { getCsrfToken, postJSON, getCSRFHeaders } from '@folklore/fetch';
14
14
  import { useFieldsManager, usePanneauResources, useResource, useUrlGenerator } from '@panneau/core/contexts';
15
15
  import dayjs from 'dayjs';
@@ -65,6 +65,8 @@ var useActionProps = function useActionProps(action, value) {
65
65
  };
66
66
  };
67
67
 
68
+ var _excluded$2 = ["iconsOnly", "showLabel", "editLabel", "deleteLabel", "onClickShow", "onClickEdit", "onClickDelete", "getShowPropsFromItem", "getEditPropsFromItem", "getDeletePropsFromItem", "showUrl", "withoutItemShowUrl", "preferEditModal", "preferDeleteModal", "hasDuplicateRoute"];
69
+
68
70
  // For backwards compatibility with the old actions element
69
71
 
70
72
  var useActions = function useActions() {
@@ -101,7 +103,8 @@ var useActions = function useActions() {
101
103
  _ref$preferDeleteModa = _ref.preferDeleteModal,
102
104
  preferDeleteModal = _ref$preferDeleteModa === void 0 ? false : _ref$preferDeleteModa,
103
105
  _ref$hasDuplicateRout = _ref.hasDuplicateRoute,
104
- hasDuplicateRoute = _ref$hasDuplicateRout === void 0 ? false : _ref$hasDuplicateRout;
106
+ hasDuplicateRoute = _ref$hasDuplicateRout === void 0 ? false : _ref$hasDuplicateRout,
107
+ otherProps = _objectWithoutProperties(_ref, _excluded$2);
105
108
  var _ref2 = item || {},
106
109
  id = _ref2.id,
107
110
  _ref2$url = _ref2.url,
@@ -173,7 +176,7 @@ var useActions = function useActions() {
173
176
  var _ref3 = action || {},
174
177
  _ref3$itemLinkProp = _ref3.itemLinkProp,
175
178
  itemLinkProp = _ref3$itemLinkProp === void 0 ? null : _ref3$itemLinkProp;
176
- return _objectSpread(_objectSpread({}, action), itemLinkProp !== null && isObject(item) && typeof item[itemLinkProp] !== 'undefined' ? {
179
+ return _objectSpread(_objectSpread(_objectSpread({}, otherProps), action), itemLinkProp !== null && isObject(item) && typeof item[itemLinkProp] !== 'undefined' ? {
177
180
  href: item[itemLinkProp]
178
181
  } : null);
179
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "3.0.314",
3
+ "version": "3.0.319",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -110,5 +110,5 @@
110
110
  "publishConfig": {
111
111
  "access": "public"
112
112
  },
113
- "gitHead": "4f73f877d9d2468145fe1173106b08e6ecdc24a5"
113
+ "gitHead": "7f46c3b50ec01e9fb354bca846eb2cd29ca999b9"
114
114
  }