@panneau/medias 3.0.149 → 3.0.150

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 CHANGED
@@ -828,6 +828,7 @@ var propTypes$5 = {
828
828
  tableProps: PropTypes.bool,
829
829
  onSelectItem: PropTypes.func,
830
830
  onItemsChange: PropTypes.func,
831
+ onLayoutChange: PropTypes.func,
831
832
  selectedCount: PropTypes.number,
832
833
  onClearSelected: PropTypes.func,
833
834
  className: PropTypes.string
@@ -856,6 +857,7 @@ var defaultProps$5 = {
856
857
  tableProps: null,
857
858
  onSelectItem: null,
858
859
  onItemsChange: null,
860
+ onLayoutChange: null,
859
861
  selectedCount: null,
860
862
  onClearSelected: null,
861
863
  className: null
@@ -873,6 +875,7 @@ function MediasBrowser(_ref) {
873
875
  tableProps = _ref.tableProps,
874
876
  onSelectItem = _ref.onSelectItem,
875
877
  onItemsChange = _ref.onItemsChange,
878
+ onLayoutChange = _ref.onLayoutChange,
876
879
  selectedCount = _ref.selectedCount,
877
880
  onClearSelected = _ref.onClearSelected,
878
881
  className = _ref.className;
@@ -922,8 +925,11 @@ function MediasBrowser(_ref) {
922
925
  var hasLayouts = useMemo(function () {
923
926
  return layouts !== null && layouts.length > 1;
924
927
  }, [layouts]);
925
- var onClickLayout = useCallback(function (lay) {
926
- setLayout(lay);
928
+ var onClickLayout = useCallback(function (newLayout) {
929
+ setLayout(newLayout);
930
+ if (onLayoutChange !== null) {
931
+ onLayoutChange(newLayout);
932
+ }
927
933
  }, [setLayout]);
928
934
  var _useState3 = useState(null),
929
935
  _useState4 = _slicedToArray(_useState3, 2),
package/lib/index.js CHANGED
@@ -830,6 +830,7 @@ var propTypes$5 = {
830
830
  tableProps: PropTypes.bool,
831
831
  onSelectItem: PropTypes.func,
832
832
  onItemsChange: PropTypes.func,
833
+ onLayoutChange: PropTypes.func,
833
834
  selectedCount: PropTypes.number,
834
835
  onClearSelected: PropTypes.func,
835
836
  className: PropTypes.string
@@ -858,6 +859,7 @@ var defaultProps$5 = {
858
859
  tableProps: null,
859
860
  onSelectItem: null,
860
861
  onItemsChange: null,
862
+ onLayoutChange: null,
861
863
  selectedCount: null,
862
864
  onClearSelected: null,
863
865
  className: null
@@ -875,6 +877,7 @@ function MediasBrowser(_ref) {
875
877
  tableProps = _ref.tableProps,
876
878
  onSelectItem = _ref.onSelectItem,
877
879
  onItemsChange = _ref.onItemsChange,
880
+ onLayoutChange = _ref.onLayoutChange,
878
881
  selectedCount = _ref.selectedCount,
879
882
  onClearSelected = _ref.onClearSelected,
880
883
  className = _ref.className;
@@ -924,8 +927,11 @@ function MediasBrowser(_ref) {
924
927
  var hasLayouts = React.useMemo(function () {
925
928
  return layouts !== null && layouts.length > 1;
926
929
  }, [layouts]);
927
- var onClickLayout = React.useCallback(function (lay) {
928
- setLayout(lay);
930
+ var onClickLayout = React.useCallback(function (newLayout) {
931
+ setLayout(newLayout);
932
+ if (onLayoutChange !== null) {
933
+ onLayoutChange(newLayout);
934
+ }
929
935
  }, [setLayout]);
930
936
  var _useState3 = React.useState(null),
931
937
  _useState4 = _slicedToArray(_useState3, 2),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/medias",
3
- "version": "3.0.149",
3
+ "version": "3.0.150",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -46,19 +46,19 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.12.5",
49
- "@panneau/core": "^3.0.146",
50
- "@panneau/data": "^3.0.146",
51
- "@panneau/element-button": "^3.0.146",
52
- "@panneau/element-buttons": "^3.0.146",
53
- "@panneau/element-form": "^3.0.146",
54
- "@panneau/element-grid": "^3.0.146",
55
- "@panneau/element-icon": "^3.0.146",
56
- "@panneau/element-media-card": "^3.0.146",
57
- "@panneau/element-media-player": "^3.0.146",
58
- "@panneau/element-media-preview": "^3.0.146",
59
- "@panneau/element-pagination": "^3.0.146",
60
- "@panneau/element-table": "^3.0.146",
61
- "@panneau/filter-filters": "^3.0.146",
49
+ "@panneau/core": "^3.0.150",
50
+ "@panneau/data": "^3.0.150",
51
+ "@panneau/element-button": "^3.0.150",
52
+ "@panneau/element-buttons": "^3.0.150",
53
+ "@panneau/element-form": "^3.0.150",
54
+ "@panneau/element-grid": "^3.0.150",
55
+ "@panneau/element-icon": "^3.0.150",
56
+ "@panneau/element-media-card": "^3.0.150",
57
+ "@panneau/element-media-player": "^3.0.150",
58
+ "@panneau/element-media-preview": "^3.0.150",
59
+ "@panneau/element-pagination": "^3.0.150",
60
+ "@panneau/element-table": "^3.0.150",
61
+ "@panneau/filter-filters": "^3.0.150",
62
62
  "classnames": "^2.5.1",
63
63
  "lodash": "^4.17.21",
64
64
  "prop-types": "^15.7.2",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "a78f4ff7c15fb1d37b37a0b1391dca0616023dfc"
70
+ "gitHead": "a871528cf4f2a9a04e62f7920d9ac288e95e6104"
71
71
  }