@panneau/medias 3.0.136 → 3.0.139

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 (3) hide show
  1. package/es/index.js +35 -11
  2. package/lib/index.js +35 -11
  3. package/package.json +5 -5
package/es/index.js CHANGED
@@ -324,7 +324,8 @@ var defaultFilters = [{
324
324
  }]
325
325
  }),
326
326
  value: 'audio'
327
- }]
327
+ }],
328
+ multiple: true
328
329
  }, {
329
330
  id: 'author',
330
331
  component: 'select',
@@ -336,7 +337,8 @@ var defaultFilters = [{
336
337
  "value": "Author"
337
338
  }]
338
339
  }),
339
- options: []
340
+ options: [],
341
+ multiple: true
340
342
  }, {
341
343
  id: 'tag',
342
344
  component: 'select',
@@ -348,7 +350,8 @@ var defaultFilters = [{
348
350
  "value": "Tag"
349
351
  }]
350
352
  }),
351
- options: []
353
+ options: [],
354
+ multiple: true
352
355
  }, {
353
356
  id: 'search',
354
357
  component: 'search',
@@ -471,7 +474,8 @@ function MediasBrowser(_ref) {
471
474
  active: layout === lay.id,
472
475
  onClick: function onClick() {
473
476
  return onClickLayout(lay.id);
474
- }
477
+ },
478
+ className: 'px-3'
475
479
  });
476
480
  })
477
481
  }) : null, /*#__PURE__*/React.createElement(Pagination, {
@@ -494,7 +498,10 @@ function MediasBrowser(_ref) {
494
498
  }
495
499
  })) : /*#__PURE__*/React.createElement(Table, Object.assign({}, tableProps, {
496
500
  columns: columns,
497
- items: items
501
+ items: items,
502
+ displayPlaceholder: /*#__PURE__*/React.createElement("span", {
503
+ className: "text-secondary text-opacity-75"
504
+ }, "\u2014")
498
505
  })), /*#__PURE__*/React.createElement("div", {
499
506
  className: classNames(['d-flex', 'mt-3', 'mb-1', 'justify-content-end'])
500
507
  }, /*#__PURE__*/React.createElement(Pagination, {
@@ -530,17 +537,19 @@ function MediasBrowserContainer(_ref) {
530
537
  MediasBrowserContainer.propTypes = propTypes$3;
531
538
  MediasBrowserContainer.defaultProps = defaultProps$3;
532
539
 
533
- var _excluded$2 = ["value", "onChange", "onConfirm", "multiple", "className"];
540
+ var _excluded$2 = ["value", "onChange", "onConfirm", "onClose", "multiple", "className"];
534
541
  var propTypes$2 = {
535
542
  // eslint-disable-next-line react/forbid-prop-types
536
543
  value: PropTypes.any,
537
544
  onChange: PropTypes.func.isRequired,
538
545
  onConfirm: PropTypes.func.isRequired,
546
+ onClose: PropTypes.func,
539
547
  multiple: PropTypes.bool,
540
548
  className: PropTypes.string
541
549
  };
542
550
  var defaultProps$2 = {
543
551
  value: null,
552
+ onClose: null,
544
553
  multiple: false,
545
554
  className: null
546
555
  };
@@ -548,6 +557,7 @@ function MediasPicker(_ref) {
548
557
  var value = _ref.value,
549
558
  onChange = _ref.onChange,
550
559
  onConfirm = _ref.onConfirm,
560
+ onClose = _ref.onClose,
551
561
  multiple = _ref.multiple,
552
562
  className = _ref.className,
553
563
  props = _objectWithoutProperties(_ref, _excluded$2);
@@ -565,19 +575,33 @@ function MediasPicker(_ref) {
565
575
  multipleSelection: multiple,
566
576
  onSelectionChange: onSelectionChange
567
577
  }
568
- }, props)), multiple ? /*#__PURE__*/React.createElement(Button, {
569
- className: "mt-2",
578
+ }, props)), multiple ? /*#__PURE__*/React.createElement("div", {
579
+ className: "d-flex w-100 align-items-end justify-content-end mt-3"
580
+ }, onClose !== null ? /*#__PURE__*/React.createElement(Button, {
581
+ type: "button",
582
+ theme: "secondary",
583
+ onClick: onClose,
584
+ className: "d-block me-2"
585
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
586
+ id: "PyxZY2",
587
+ defaultMessage: [{
588
+ "type": 0,
589
+ "value": "Cancel"
590
+ }]
591
+ })) : null, /*#__PURE__*/React.createElement(Button, {
592
+ type: "button",
593
+ theme: "primary",
570
594
  onClick: onConfirm,
571
- theme: "info",
572
595
  disabled: disabled,
573
- outline: disabled
596
+ outline: disabled,
597
+ className: "d-block"
574
598
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
575
599
  id: "UaVu03",
576
600
  defaultMessage: [{
577
601
  "type": 0,
578
602
  "value": "Confirm"
579
603
  }]
580
- })) : null);
604
+ }))) : null);
581
605
  }
582
606
  MediasPicker.propTypes = propTypes$2;
583
607
  MediasPicker.defaultProps = defaultProps$2;
package/lib/index.js CHANGED
@@ -328,7 +328,8 @@ var defaultFilters = [{
328
328
  }]
329
329
  }),
330
330
  value: 'audio'
331
- }]
331
+ }],
332
+ multiple: true
332
333
  }, {
333
334
  id: 'author',
334
335
  component: 'select',
@@ -340,7 +341,8 @@ var defaultFilters = [{
340
341
  "value": "Author"
341
342
  }]
342
343
  }),
343
- options: []
344
+ options: [],
345
+ multiple: true
344
346
  }, {
345
347
  id: 'tag',
346
348
  component: 'select',
@@ -352,7 +354,8 @@ var defaultFilters = [{
352
354
  "value": "Tag"
353
355
  }]
354
356
  }),
355
- options: []
357
+ options: [],
358
+ multiple: true
356
359
  }, {
357
360
  id: 'search',
358
361
  component: 'search',
@@ -475,7 +478,8 @@ function MediasBrowser(_ref) {
475
478
  active: layout === lay.id,
476
479
  onClick: function onClick() {
477
480
  return onClickLayout(lay.id);
478
- }
481
+ },
482
+ className: 'px-3'
479
483
  });
480
484
  })
481
485
  }) : null, /*#__PURE__*/React.createElement(Pagination, {
@@ -498,7 +502,10 @@ function MediasBrowser(_ref) {
498
502
  }
499
503
  })) : /*#__PURE__*/React.createElement(Table, Object.assign({}, tableProps, {
500
504
  columns: columns,
501
- items: items
505
+ items: items,
506
+ displayPlaceholder: /*#__PURE__*/React.createElement("span", {
507
+ className: "text-secondary text-opacity-75"
508
+ }, "\u2014")
502
509
  })), /*#__PURE__*/React.createElement("div", {
503
510
  className: classNames(['d-flex', 'mt-3', 'mb-1', 'justify-content-end'])
504
511
  }, /*#__PURE__*/React.createElement(Pagination, {
@@ -534,17 +541,19 @@ function MediasBrowserContainer(_ref) {
534
541
  MediasBrowserContainer.propTypes = propTypes$3;
535
542
  MediasBrowserContainer.defaultProps = defaultProps$3;
536
543
 
537
- var _excluded$2 = ["value", "onChange", "onConfirm", "multiple", "className"];
544
+ var _excluded$2 = ["value", "onChange", "onConfirm", "onClose", "multiple", "className"];
538
545
  var propTypes$2 = {
539
546
  // eslint-disable-next-line react/forbid-prop-types
540
547
  value: PropTypes.any,
541
548
  onChange: PropTypes.func.isRequired,
542
549
  onConfirm: PropTypes.func.isRequired,
550
+ onClose: PropTypes.func,
543
551
  multiple: PropTypes.bool,
544
552
  className: PropTypes.string
545
553
  };
546
554
  var defaultProps$2 = {
547
555
  value: null,
556
+ onClose: null,
548
557
  multiple: false,
549
558
  className: null
550
559
  };
@@ -552,6 +561,7 @@ function MediasPicker(_ref) {
552
561
  var value = _ref.value,
553
562
  onChange = _ref.onChange,
554
563
  onConfirm = _ref.onConfirm,
564
+ onClose = _ref.onClose,
555
565
  multiple = _ref.multiple,
556
566
  className = _ref.className,
557
567
  props = _objectWithoutProperties(_ref, _excluded$2);
@@ -569,19 +579,33 @@ function MediasPicker(_ref) {
569
579
  multipleSelection: multiple,
570
580
  onSelectionChange: onSelectionChange
571
581
  }
572
- }, props)), multiple ? /*#__PURE__*/React.createElement(Button, {
573
- className: "mt-2",
582
+ }, props)), multiple ? /*#__PURE__*/React.createElement("div", {
583
+ className: "d-flex w-100 align-items-end justify-content-end mt-3"
584
+ }, onClose !== null ? /*#__PURE__*/React.createElement(Button, {
585
+ type: "button",
586
+ theme: "secondary",
587
+ onClick: onClose,
588
+ className: "d-block me-2"
589
+ }, /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
590
+ id: "PyxZY2",
591
+ defaultMessage: [{
592
+ "type": 0,
593
+ "value": "Cancel"
594
+ }]
595
+ })) : null, /*#__PURE__*/React.createElement(Button, {
596
+ type: "button",
597
+ theme: "primary",
574
598
  onClick: onConfirm,
575
- theme: "info",
576
599
  disabled: disabled,
577
- outline: disabled
600
+ outline: disabled,
601
+ className: "d-block"
578
602
  }, /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
579
603
  id: "UaVu03",
580
604
  defaultMessage: [{
581
605
  "type": 0,
582
606
  "value": "Confirm"
583
607
  }]
584
- })) : null);
608
+ }))) : null);
585
609
  }
586
610
  MediasPicker.propTypes = propTypes$2;
587
611
  MediasPicker.defaultProps = defaultProps$2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/medias",
3
- "version": "3.0.136",
3
+ "version": "3.0.139",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -52,10 +52,10 @@
52
52
  "@panneau/element-buttons": "^3.0.136",
53
53
  "@panneau/element-grid": "^3.0.136",
54
54
  "@panneau/element-icon": "^3.0.136",
55
- "@panneau/element-media-card": "^3.0.136",
55
+ "@panneau/element-media-card": "^3.0.139",
56
56
  "@panneau/element-pagination": "^3.0.136",
57
- "@panneau/element-table": "^3.0.136",
58
- "@panneau/filter-filters": "^3.0.136",
57
+ "@panneau/element-table": "^3.0.137",
58
+ "@panneau/filter-filters": "^3.0.139",
59
59
  "classnames": "^2.5.1",
60
60
  "lodash": "^4.17.21",
61
61
  "prop-types": "^15.7.2",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "c9a3de330286a6cadd73651f1893adbbe090cd0e"
67
+ "gitHead": "76afd9861b4a6ce9792314fcdd471214afca9aeb"
68
68
  }