react-bootstrap-front 3.9.6 → 3.9.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-bootstrap-front",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
4
4
  "description": "React Bootstrap Components",
5
5
  "keywords": [
6
6
  "Bootstrap 4",
@@ -65,6 +65,9 @@
65
65
  .container-xxs .modal-content .modal-footer,
66
66
  .container-xs .modal-content .modal-footer {
67
67
  background-color: theme-color('secondary');
68
+ height: 60px;
69
+ min-height: 60px;
70
+ padding-bottom: 10px;
68
71
  }
69
72
 
70
73
  .modal-help {
@@ -41,7 +41,7 @@ const getOptionsForType = (type, update = false) => {
41
41
  {value: FILTER_OPER_SOUND_LIKE, label: 'Ressemble à'}
42
42
  );
43
43
  }
44
- if (type !== 'picker' && type !== 'select') {
44
+ if (type !== 'picker' && type !== 'select' && type !== 'date' && type !== 'datetime') {
45
45
  options.push(
46
46
  {value: FILTER_OPER_GREATER, label: 'Supérieur à'},
47
47
  {value: FILTER_OPER_GREATER_OR_EQUAL, label: 'Supérieur ou égal à'},
@@ -51,6 +51,16 @@ const getOptionsForType = (type, update = false) => {
51
51
  {value: FILTER_OPER_LOWER_OR_EQUAL_OR_NULL, label: 'Vide ou inférieur et égal à'},
52
52
  );
53
53
  };
54
+ if (type === 'date' || type === 'datetime') {
55
+ options.push(
56
+ {value: FILTER_OPER_GREATER, label: 'Postérieur à'},
57
+ {value: FILTER_OPER_GREATER_OR_EQUAL, label: 'Postérieur ou égal à'},
58
+ {value: FILTER_OPER_GREATER_OR_EQUAL_OR_NULL, label: 'Vide ou postérieur et égal à'},
59
+ {value: FILTER_OPER_LOWER, label: 'Antérieur à'},
60
+ {value: FILTER_OPER_LOWER_OR_EQUAL, label: 'Antérieur ou égal à'},
61
+ {value: FILTER_OPER_LOWER_OR_EQUAL_OR_NULL, label: 'Vide ou antérieur et égal à'},
62
+ );
63
+ };
54
64
  if (update && (type === 'date' || type === 'datetime' || type === 'monetary' || type === 'number')) {
55
65
  options.push(
56
66
  {value: FILTER_OPER_BETWEEN, label: 'Compris entre'}
@@ -48,6 +48,18 @@ class MobileList extends Component {
48
48
  let counter = 1;
49
49
  return (
50
50
  <div className="text-left">
51
+ {!this.props.loading && this.props.onAddOne && (
52
+ <MobileLineAction
53
+ className="btn btn-primary text-white font-weight-bold mb-1"
54
+ label={this.props.t({ id: 'rbf.inline-list.list.add', defaultMessage: 'Ajouter' })}
55
+ onClick={ev => {
56
+ if (ev) {
57
+ ev.stopPropagation();
58
+ }
59
+ this.props.onAddOne();
60
+ }}
61
+ />
62
+ )}
51
63
  {Array.isArray(this.props.items) &&
52
64
  this.props.items.map(item => (
53
65
  <MobileLine
@@ -0,0 +1,3 @@
1
+ .form-inline-list {
2
+ border: 0px;
3
+ }
@@ -196,6 +196,30 @@ export class MobileLine extends Component {
196
196
  <span className="rbf-list-mobile-line-header-title">
197
197
  {getCardTitle(this.props.cols, this.props.item)}
198
198
  </span>
199
+ {(this.props.mobile || isMobileDevice()) && (!this.state.flipped || this.props.item.id != this.props.currentFlipped) && (
200
+ <div className="nav btn-group rbf-list-mobile-line-header-nav" style={{right: '0px'}}>
201
+ <button
202
+ key="openclose"
203
+ type="button"
204
+ disabled={false}
205
+ title=""
206
+ className={classnames('btn btn-inline btn-light')}
207
+ onClick={ev => {
208
+ if (ev) {
209
+ ev.preventDefault();
210
+ ev.stopPropagation();
211
+ }
212
+ this.openMenu(ev);
213
+ }}
214
+ >
215
+ <span className="rbf-list-mobile-line-3dots text-secondary">
216
+ <svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-three-dots">
217
+ <path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
218
+ </svg>
219
+ </span>
220
+ </button>
221
+ </div>
222
+ )}
199
223
  {(this.props.mobile || isMobileDevice()) && (
200
224
  <CSSTransition
201
225
  in={this.state.flipped && this.props.item.id === this.props.currentFlipped}
@@ -208,9 +232,14 @@ export class MobileLine extends Component {
208
232
  >
209
233
  {this.props.inlineActions &&
210
234
  this.props.inlineActions.map(action => {
211
- if (action.role === 'DETAIL' || action.role === 'SUMMARY') {
235
+ if (action.role === 'DETAIL' || action.role === 'SUMMARY' || action.role === 'OTHER') {
212
236
  return null;
213
237
  }
238
+ if (typeof action.fShow === 'function') {
239
+ if (!action.fShow(this.props.item)) {
240
+ return null;
241
+ }
242
+ }
214
243
  if (action.component) {
215
244
  const clonedElementWithMoreProps = React.cloneElement(action.component, {
216
245
  item: this.props.item,
@@ -227,36 +256,6 @@ export class MobileLine extends Component {
227
256
  );
228
257
  }
229
258
  })}
230
- {false && !this.props.hideMenu && (
231
- <button
232
- key="openclose"
233
- type="button"
234
- disabled={false}
235
- title=""
236
- className={classnames('btn btn-inline btn-light')}
237
- onClick={ev => {
238
- if (ev) {
239
- ev.preventDefault();
240
- ev.stopPropagation();
241
- }
242
- this.setState({ flipped: !this.state.flipped });
243
- }}
244
- >
245
- <span className="rbf-list-mobile-line-3dots text-secondary">
246
- <svg
247
- xmlns="http://www.w3.org/2000/svg"
248
- role="img"
249
- style={{ verticalAlign: '-0.125em' }}
250
- width="1em"
251
- height="1em"
252
- preserveAspectRatio="xMidYMid meet"
253
- viewBox="0 0 1000 1000"
254
- >
255
- <path d="M654 501l346 346l-154 154l-346-346l-346 346L0 847l346-346L0 155L154 1l346 346L846 1l154 154z" />
256
- </svg>
257
- </span>
258
- </button>
259
- )}
260
259
  </div>
261
260
  )}
262
261
  </CSSTransition>
@@ -43,7 +43,7 @@
43
43
  .card-header {
44
44
  position: relative;
45
45
  border: none;
46
- padding: 0.7rem 0.25rem;
46
+ padding: 0.65rem 0.25rem;
47
47
  border-radius: 0px;
48
48
  }
49
49
  .card-header span {
@@ -1,3 +1,3 @@
1
1
  .display-mobile, .page-root-mobile-content {
2
- background-color: theme-color('light');
2
+ /*background-color: theme-color('light');*/
3
3
  }