react-bootstrap-front 3.7.6 → 3.9.0
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/CHANGELOG +19 -0
- package/dist/react-bootstrap-front.js +7 -7
- package/package.json +1 -1
- package/src/features/advanced/DefaultQuickSearch.js +17 -3
- package/src/features/advanced/DropdownWrapper.js +5 -8
- package/src/features/advanced/ResponsiveModalInner.scss +0 -1
- package/src/features/basic/CalmButton.js +2 -2
- package/src/features/basic/InputMonetary.js +3 -1
- package/src/features/filter/DefaultPanel.jsx +11 -1
- package/src/features/filter/Filter.js +5 -1
- package/src/features/filter/FilterBuilder.jsx +29 -26
- package/src/features/filter/FilterBuilder.scss +3 -0
- package/src/features/filter/FilterHeader.jsx +1 -1
- package/src/features/inline-list/DefaultLineBreak.js +20 -0
- package/src/features/inline-list/DefaultLineBreak.scss +0 -0
- package/src/features/inline-list/DefaultList.jsx +37 -11
- package/src/features/inline-list/index.js +1 -0
- package/src/features/inline-list/style.scss +1 -0
- package/src/features/list/ActionButton.js +3 -3
- package/src/features/list/DefaultHeader.jsx +1 -1
- package/src/features/list/DefaultLine.jsx +5 -1
- package/src/features/page/DefaultContent.jsx +23 -1
- package/src/features/page/DefaultContent.scss +23 -2
package/package.json
CHANGED
|
@@ -8,10 +8,14 @@ export default class DefaultQuickSearch extends Component {
|
|
|
8
8
|
name: PropTypes.string.isRequired,
|
|
9
9
|
label: PropTypes.string,
|
|
10
10
|
icon: PropTypes.element.isRequired,
|
|
11
|
+
plus: PropTypes.element,
|
|
12
|
+
reset: PropTypes.element,
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
static defaultProps = {
|
|
14
16
|
label: '',
|
|
17
|
+
plus: null,
|
|
18
|
+
reset: null,
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -38,11 +42,11 @@ export default class DefaultQuickSearch extends Component {
|
|
|
38
42
|
this.setState({ search: event.target.value });
|
|
39
43
|
}
|
|
40
44
|
|
|
41
|
-
onSubmit(event) {
|
|
45
|
+
onSubmit(event, mode) {
|
|
42
46
|
if (event) {
|
|
43
47
|
event.preventDefault();
|
|
44
48
|
}
|
|
45
|
-
this.props.onSubmit(this.state.search);
|
|
49
|
+
this.props.onSubmit(this.state.search, mode);
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
render() {
|
|
@@ -58,9 +62,19 @@ export default class DefaultQuickSearch extends Component {
|
|
|
58
62
|
onChange={this.onChange}
|
|
59
63
|
/>
|
|
60
64
|
<div className="input-group-append">
|
|
61
|
-
<button type="button" className="btn btn-outline-secondary bg-light" onClick={this.onSubmit}>
|
|
65
|
+
<button type="button" title="Recherche simple" className="btn btn-outline-secondary bg-light" onClick={(ev) => this.onSubmit(ev, "simple")}>
|
|
62
66
|
{this.props.icon}
|
|
63
67
|
</button>
|
|
68
|
+
{this.props.plus &&
|
|
69
|
+
<button type="button" title="Recherche mois stricte" className="btn btn-outline-secondary bg-light" onClick={(ev) => this.onSubmit(ev, "plus")}>
|
|
70
|
+
{this.props.plus}
|
|
71
|
+
</button>
|
|
72
|
+
}
|
|
73
|
+
{this.props.reset &&
|
|
74
|
+
<button type="button" title="Initialiser la recherche" className="btn btn-outline-secondary bg-light text-warning" onClick={(ev) => this.onSubmit(ev, "reset")}>
|
|
75
|
+
{this.props.reset}
|
|
76
|
+
</button>
|
|
77
|
+
}
|
|
64
78
|
</div>
|
|
65
79
|
</div>
|
|
66
80
|
</form>
|
|
@@ -39,16 +39,13 @@ export default class DropdownWrapper extends Component {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
render() {
|
|
42
|
+
const clonedTrigger = React.cloneElement(
|
|
43
|
+
this.props.trigger,
|
|
44
|
+
{ref: this.state.ref, onClick: this.onClick, title: this.props.tooltip}
|
|
45
|
+
)
|
|
42
46
|
return (
|
|
43
47
|
<>
|
|
44
|
-
|
|
45
|
-
ref={this.state.ref}
|
|
46
|
-
className={classnames('advanced-dropdown-wrapper', this.props.className)}
|
|
47
|
-
onClick={this.onClick}
|
|
48
|
-
title={this.props.tooltip}
|
|
49
|
-
>
|
|
50
|
-
{this.props.trigger}
|
|
51
|
-
</div>
|
|
48
|
+
{clonedTrigger}
|
|
52
49
|
{this.state.open && (
|
|
53
50
|
<Dropdown align={this.props.align} myRef={this.state.ref} onClose={this.onClose}>
|
|
54
51
|
<div onClick={this.onClose}>{this.props.children}</div>
|
|
@@ -99,13 +99,13 @@ export default class CalmButton extends Component {
|
|
|
99
99
|
{this.props.options.map(option => {
|
|
100
100
|
return (
|
|
101
101
|
<DropdownMenuOption
|
|
102
|
-
key={`text-${option.
|
|
102
|
+
key={`text-${option.value}`}
|
|
103
103
|
label={option.label}
|
|
104
104
|
onClick={ev => {
|
|
105
105
|
if (ev) {
|
|
106
106
|
ev.preventDefault();
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
this.props.onClick(option.value);
|
|
109
109
|
this.onOptionsMenuClose();
|
|
110
110
|
}}
|
|
111
111
|
/>
|
|
@@ -12,7 +12,7 @@ export default function InputMonetary(props) {
|
|
|
12
12
|
const rnd = getRandomInt(10000, 99999);
|
|
13
13
|
myId = `${myId}-${rnd}`;
|
|
14
14
|
}
|
|
15
|
-
const value = props.value || 0;
|
|
15
|
+
const value = props.value || (props.allowNull ? '' : 0);
|
|
16
16
|
return (
|
|
17
17
|
<InputGroup {...props} id={myId}>
|
|
18
18
|
{props.prepend && props.prepend !== '' && (
|
|
@@ -94,6 +94,7 @@ export default function InputMonetary(props) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
InputMonetary.propTypes = {
|
|
97
|
+
allowNull: PropTypes.bool,
|
|
97
98
|
autoComplete: PropTypes.string,
|
|
98
99
|
disabled: PropTypes.bool,
|
|
99
100
|
error: PropTypes.element,
|
|
@@ -125,6 +126,7 @@ InputMonetary.propTypes = {
|
|
|
125
126
|
};
|
|
126
127
|
|
|
127
128
|
InputMonetary.defaultProps = {
|
|
129
|
+
allowNull: false,
|
|
128
130
|
autoComplete: 'off',
|
|
129
131
|
disabled: false,
|
|
130
132
|
error: false,
|
|
@@ -73,6 +73,7 @@ export default class DefaultPanel extends Component {
|
|
|
73
73
|
validPanelIcon: PropTypes.element.isRequired,
|
|
74
74
|
cancelPanelIcon: PropTypes.element.isRequired,
|
|
75
75
|
onToggleFilter: PropTypes.func.isRequired,
|
|
76
|
+
clearIcon: PropTypes.element.isRequired,
|
|
76
77
|
sortNoneIcon: PropTypes.element,
|
|
77
78
|
sortUpIcon: PropTypes.element,
|
|
78
79
|
sortDownIcon: PropTypes.element,
|
|
@@ -178,7 +179,11 @@ export default class DefaultPanel extends Component {
|
|
|
178
179
|
let { filter } = this.state;
|
|
179
180
|
const col = event.target.name;
|
|
180
181
|
const oper = event.target.value;
|
|
181
|
-
|
|
182
|
+
if (oper !== '') {
|
|
183
|
+
filter.updateFilterOperator(col.replace('oper-', ''), oper);
|
|
184
|
+
} else {
|
|
185
|
+
filter.removeFilter(col.replace('oper-', ''));
|
|
186
|
+
}
|
|
182
187
|
this.setState({ filter, local: true });
|
|
183
188
|
}
|
|
184
189
|
|
|
@@ -253,6 +258,11 @@ export default class DefaultPanel extends Component {
|
|
|
253
258
|
{this.props.cancelPanelIcon}
|
|
254
259
|
</button>
|
|
255
260
|
)}
|
|
261
|
+
{this.props.onClearFilter &&
|
|
262
|
+
<button className="btn btn-warning text-light" onClick={this.props.onClearFilter}>
|
|
263
|
+
{this.props.clearIcon}
|
|
264
|
+
</button>
|
|
265
|
+
}
|
|
256
266
|
<button className="btn btn-primary text-light" onClick={this.onValid}>
|
|
257
267
|
{this.props.validPanelIcon}
|
|
258
268
|
</button>
|
|
@@ -192,7 +192,11 @@ export default class Filter {
|
|
|
192
192
|
removeFilter(name, action = 'default') {
|
|
193
193
|
let elem = this.data.filters.find(elt => elt.getFilterName() === name);
|
|
194
194
|
if (elem) {
|
|
195
|
-
|
|
195
|
+
if (action === 'default') {
|
|
196
|
+
this.data.filters = this.data.filters.filter(elt => elt.getFilterName() !== name)
|
|
197
|
+
} else {
|
|
198
|
+
elem.removeFilterCrit(action);
|
|
199
|
+
}
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
|
|
@@ -27,33 +27,33 @@ import { InputAutocomplete, FilterHeader } from './';
|
|
|
27
27
|
const getOptionsForType = (type, update = false) => {
|
|
28
28
|
let options = [
|
|
29
29
|
{value: '', label: ''},
|
|
30
|
-
{value: FILTER_OPER_EQUAL, label: '
|
|
31
|
-
{value: FILTER_OPER_NOT_EQUAL, label: '
|
|
32
|
-
{value: FILTER_OPER_EMPTY, label: '
|
|
33
|
-
{value: FILTER_OPER_NOT_EMPTY, label: '
|
|
30
|
+
{value: FILTER_OPER_EQUAL, label: 'Est égal à'},
|
|
31
|
+
{value: FILTER_OPER_NOT_EQUAL, label: 'Est différenrt de'},
|
|
32
|
+
{value: FILTER_OPER_EMPTY, label: 'Est vide'},
|
|
33
|
+
{value: FILTER_OPER_NOT_EMPTY, label: 'N\'est pas vide'},
|
|
34
34
|
];
|
|
35
35
|
if (type !== 'date' && type !== 'datetime' && type !== 'picker' && type !== 'select') {
|
|
36
36
|
options.push(
|
|
37
|
-
{value: FILTER_OPER_LIKE, label: '
|
|
38
|
-
{value: FILTER_OPER_NOT_LIKE, label: '
|
|
39
|
-
{value: FILTER_OPER_START_WITH, label: '
|
|
40
|
-
{value: FILTER_OPER_END_WITH, label: '
|
|
41
|
-
{value: FILTER_OPER_SOUND_LIKE, label: '
|
|
37
|
+
{value: FILTER_OPER_LIKE, label: 'Contient'},
|
|
38
|
+
{value: FILTER_OPER_NOT_LIKE, label: 'Ne contient pas'},
|
|
39
|
+
{value: FILTER_OPER_START_WITH, label: 'Commence par'},
|
|
40
|
+
{value: FILTER_OPER_END_WITH, label: 'Termine par'},
|
|
41
|
+
{value: FILTER_OPER_SOUND_LIKE, label: 'Ressemble à'}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
if (type !== 'picker' && type !== 'select') {
|
|
45
45
|
options.push(
|
|
46
|
-
{value: FILTER_OPER_GREATER, label: '
|
|
47
|
-
{value: FILTER_OPER_GREATER_OR_EQUAL, label: '
|
|
48
|
-
{value: FILTER_OPER_GREATER_OR_EQUAL_OR_NULL, label: '
|
|
49
|
-
{value: FILTER_OPER_LOWER, label: '
|
|
50
|
-
{value: FILTER_OPER_LOWER_OR_EQUAL, label: '
|
|
51
|
-
{value: FILTER_OPER_LOWER_OR_EQUAL_OR_NULL, label: '
|
|
46
|
+
{value: FILTER_OPER_GREATER, label: 'Supérieur à'},
|
|
47
|
+
{value: FILTER_OPER_GREATER_OR_EQUAL, label: 'Supérieur ou égal à'},
|
|
48
|
+
{value: FILTER_OPER_GREATER_OR_EQUAL_OR_NULL, label: 'Vide ou supérieur et égal à'},
|
|
49
|
+
{value: FILTER_OPER_LOWER, label: 'Inférieur à'},
|
|
50
|
+
{value: FILTER_OPER_LOWER_OR_EQUAL, label: 'Inférieur ou égal à'},
|
|
51
|
+
{value: FILTER_OPER_LOWER_OR_EQUAL_OR_NULL, label: 'Vide ou inférieur et égal à'},
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
|
-
if (update && (type === 'date' || type === 'datetime' || type === 'monetary')) {
|
|
54
|
+
if (update && (type === 'date' || type === 'datetime' || type === 'monetary' || type === 'number')) {
|
|
55
55
|
options.push(
|
|
56
|
-
{value: FILTER_OPER_BETWEEN, label: '
|
|
56
|
+
{value: FILTER_OPER_BETWEEN, label: 'Compris entre'}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
return options;
|
|
@@ -71,7 +71,6 @@ export default class FilterBuilder extends Component {
|
|
|
71
71
|
delIcon: PropTypes.element.isRequired,
|
|
72
72
|
calIcon: PropTypes.element.isRequired,
|
|
73
73
|
className: PropTypes.string,
|
|
74
|
-
clearIcon: PropTypes.element.isRequired,
|
|
75
74
|
withHeader: PropTypes.bool,
|
|
76
75
|
};
|
|
77
76
|
static defaultProps = {
|
|
@@ -118,6 +117,9 @@ export default class FilterBuilder extends Component {
|
|
|
118
117
|
colOper = FILTER_OPER_EQUAL;
|
|
119
118
|
}
|
|
120
119
|
}
|
|
120
|
+
if (value === null) {
|
|
121
|
+
value = '';
|
|
122
|
+
}
|
|
121
123
|
const prepend = (
|
|
122
124
|
<select
|
|
123
125
|
id={`oper-${colFilterable}`}
|
|
@@ -155,7 +157,7 @@ export default class FilterBuilder extends Component {
|
|
|
155
157
|
display={col.filterable.display}
|
|
156
158
|
value={value}
|
|
157
159
|
size={this.props.size}
|
|
158
|
-
clearIcon={this.props.
|
|
160
|
+
clearIcon={this.props.delIcon}
|
|
159
161
|
onSearch={col.filterable.onSearch}
|
|
160
162
|
onSelect={this.props.onChange}
|
|
161
163
|
/>
|
|
@@ -176,7 +178,7 @@ export default class FilterBuilder extends Component {
|
|
|
176
178
|
value={value}
|
|
177
179
|
onChange={this.props.onChange}
|
|
178
180
|
calIcon={this.props.calIcon}
|
|
179
|
-
delIcon={this.props.
|
|
181
|
+
delIcon={this.props.delIcon}
|
|
180
182
|
/>
|
|
181
183
|
</div>
|
|
182
184
|
{colOper === FILTER_OPER_BETWEEN && this.props.onUpdate &&
|
|
@@ -189,7 +191,7 @@ export default class FilterBuilder extends Component {
|
|
|
189
191
|
value={elem.getFilterCrit('between')}
|
|
190
192
|
onChange={this.props.onUpdate}
|
|
191
193
|
calIcon={this.props.calIcon}
|
|
192
|
-
delIcon={this.props.
|
|
194
|
+
delIcon={this.props.delIcon}
|
|
193
195
|
/>
|
|
194
196
|
</div>
|
|
195
197
|
}
|
|
@@ -210,7 +212,8 @@ export default class FilterBuilder extends Component {
|
|
|
210
212
|
value={value}
|
|
211
213
|
onChange={this.props.onChange}
|
|
212
214
|
calIcon={this.props.calIcon}
|
|
213
|
-
delIcon={this.props.
|
|
215
|
+
delIcon={this.props.delIcon}
|
|
216
|
+
allowNull={true}
|
|
214
217
|
/>
|
|
215
218
|
</div>
|
|
216
219
|
{colOper === FILTER_OPER_BETWEEN && this.props.onUpdate &&
|
|
@@ -223,7 +226,7 @@ export default class FilterBuilder extends Component {
|
|
|
223
226
|
value={elem.getFilterCrit('between')}
|
|
224
227
|
onChange={this.props.onUpdate}
|
|
225
228
|
calIcon={this.props.calIcon}
|
|
226
|
-
delIcon={this.props.
|
|
229
|
+
delIcon={this.props.delIcon}
|
|
227
230
|
/>
|
|
228
231
|
</div>
|
|
229
232
|
}
|
|
@@ -365,7 +368,7 @@ export default class FilterBuilder extends Component {
|
|
|
365
368
|
this.props.onRemove(ev);
|
|
366
369
|
}}
|
|
367
370
|
>
|
|
368
|
-
{this.props.
|
|
371
|
+
{this.props.delIcon}
|
|
369
372
|
</button>
|
|
370
373
|
</div>
|
|
371
374
|
</div>
|
|
@@ -411,7 +414,7 @@ export default class FilterBuilder extends Component {
|
|
|
411
414
|
this.props.onChange(ev);
|
|
412
415
|
}}
|
|
413
416
|
>
|
|
414
|
-
{this.props.
|
|
417
|
+
{this.props.delIcon}
|
|
415
418
|
</button>
|
|
416
419
|
<button
|
|
417
420
|
type="button"
|
|
@@ -466,7 +469,7 @@ export default class FilterBuilder extends Component {
|
|
|
466
469
|
this.props.onRemove(ev);
|
|
467
470
|
}}
|
|
468
471
|
>
|
|
469
|
-
{this.props.
|
|
472
|
+
{this.props.delIcon}
|
|
470
473
|
</button>
|
|
471
474
|
</div>
|
|
472
475
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.filter-filter-builder {
|
|
2
2
|
.input-group-prepend {
|
|
3
|
+
width: 180px;
|
|
3
4
|
label, select, span {
|
|
4
5
|
height: 100%;
|
|
5
6
|
background-color: theme-color('light') !important;
|
|
@@ -9,6 +10,8 @@
|
|
|
9
10
|
min-width: 50px;
|
|
10
11
|
select{
|
|
11
12
|
padding: 0px;
|
|
13
|
+
padding-right: 20px;
|
|
14
|
+
color: theme-color('dark') !important;
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
@@ -40,7 +40,7 @@ export default function FilterHeader(props) {
|
|
|
40
40
|
borderColor="secondary-light"
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
43
|
-
<div className="col-xxs-
|
|
43
|
+
<div className="col-xxs-none form-group">
|
|
44
44
|
<label htmlFor="filter-oper" className="text-secondary">
|
|
45
45
|
<span>Condition</span>
|
|
46
46
|
</label>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
|
|
4
|
+
export default class DefaultLineBreak extends Component {
|
|
5
|
+
render() {
|
|
6
|
+
let rowOddEven = '';
|
|
7
|
+
if (this.props.counter) {
|
|
8
|
+
rowOddEven = this.props.counter % 2 === 0 ? 'row-even' : 'row-odd';
|
|
9
|
+
}
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
className={classnames("inline-default-list-wrapper row row-line no-gutters", rowOddEven)}
|
|
13
|
+
>
|
|
14
|
+
<div class="col col-xs-w36">
|
|
15
|
+
{this.props.label}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
File without changes
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { DefaultHeader, DefaultLine, DefaultLineAction } from './';
|
|
3
|
+
import { DefaultHeader, DefaultLine, DefaultLineAction, DefaultLineBreak } from './';
|
|
4
4
|
import { rbfIntl } from '../intl';
|
|
5
5
|
|
|
6
6
|
export const DefaultList = props => {
|
|
7
|
-
let counter
|
|
7
|
+
let counter = 1;
|
|
8
|
+
let previous = null;
|
|
8
9
|
return (
|
|
9
10
|
<div className="ui-inline-list-default-list">
|
|
10
11
|
<div className="inline-list">
|
|
@@ -12,15 +13,38 @@ export const DefaultList = props => {
|
|
|
12
13
|
{props.lines && (
|
|
13
14
|
<div className="ui-inline-list-default-list-content">
|
|
14
15
|
{Array.isArray(props.items) &&
|
|
15
|
-
props.items.map(item =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
props.items.map(item => {
|
|
17
|
+
let myBreak = false;
|
|
18
|
+
if (props.breakpoint) {
|
|
19
|
+
myBreak = props.breakpoint(previous, item);
|
|
20
|
+
}
|
|
21
|
+
previous = item;
|
|
22
|
+
if (myBreak !== false) {
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<DefaultLineBreak label={myBreak} counter={props.oddEven ? counter++ : 0}/>
|
|
26
|
+
<DefaultLine
|
|
27
|
+
{...props}
|
|
28
|
+
key={item.id}
|
|
29
|
+
id={item.id}
|
|
30
|
+
item={item}
|
|
31
|
+
counter={props.oddEven ? counter++ : 0}
|
|
32
|
+
/>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
} else {
|
|
36
|
+
return (
|
|
37
|
+
<DefaultLine
|
|
38
|
+
{...props}
|
|
39
|
+
key={item.id}
|
|
40
|
+
id={item.id}
|
|
41
|
+
item={item}
|
|
42
|
+
counter={props.oddEven ? counter++ : 0}
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
}
|
|
24
48
|
</div>
|
|
25
49
|
)}
|
|
26
50
|
{props.lines &&
|
|
@@ -47,6 +71,7 @@ export const DefaultList = props => {
|
|
|
47
71
|
};
|
|
48
72
|
|
|
49
73
|
DefaultList.propTypes = {
|
|
74
|
+
breakpoint: PropTypes.func,
|
|
50
75
|
title: PropTypes.bool,
|
|
51
76
|
lines: PropTypes.bool,
|
|
52
77
|
oddEven: PropTypes.bool,
|
|
@@ -54,6 +79,7 @@ DefaultList.propTypes = {
|
|
|
54
79
|
t: PropTypes.func,
|
|
55
80
|
};
|
|
56
81
|
DefaultList.defaultProps = {
|
|
82
|
+
breakpoint: false,
|
|
57
83
|
title: true,
|
|
58
84
|
lines: true,
|
|
59
85
|
oddEven: true,
|
|
@@ -2,6 +2,7 @@ export * from './ColLink';
|
|
|
2
2
|
export { default as DefaultLine } from './DefaultLine';
|
|
3
3
|
export * from './InlineEmpty';
|
|
4
4
|
export { default as MobileLineAction } from './MobileLineAction';
|
|
5
|
+
export { default as DefaultLineBreak } from './DefaultLineBreak';
|
|
5
6
|
export { default as DefaultLineAction } from './DefaultLineAction';
|
|
6
7
|
export { default as MobileLineText } from './MobileLineText';
|
|
7
8
|
export * from './ResponsiveInlineList.jsx';
|
|
@@ -124,7 +124,7 @@ export default class ActionButton extends Component {
|
|
|
124
124
|
if (elem) {
|
|
125
125
|
return (
|
|
126
126
|
<DropdownMenuOption
|
|
127
|
-
key={`elem-${
|
|
127
|
+
key={`elem-${elem.label}`}
|
|
128
128
|
label={elem.label}
|
|
129
129
|
onClick={ev => {
|
|
130
130
|
if (ev) {
|
|
@@ -149,7 +149,7 @@ export default class ActionButton extends Component {
|
|
|
149
149
|
);
|
|
150
150
|
} else {
|
|
151
151
|
if (this.state.options && Array.isArray(this.state.options)) {
|
|
152
|
-
if (this.state.options.length
|
|
152
|
+
if (this.state.options.length >= 1) {
|
|
153
153
|
const trigger = (
|
|
154
154
|
<button
|
|
155
155
|
type="button"
|
|
@@ -166,7 +166,7 @@ export default class ActionButton extends Component {
|
|
|
166
166
|
{this.state.options.map(elem => {
|
|
167
167
|
return (
|
|
168
168
|
<DropdownMenuOption
|
|
169
|
-
key={`elem-${
|
|
169
|
+
key={`elem-${elem.label}`}
|
|
170
170
|
label={elem.label}
|
|
171
171
|
onClick={ev => {
|
|
172
172
|
if (ev) {
|
|
@@ -194,7 +194,7 @@ export default class DefaultHeader extends Component {
|
|
|
194
194
|
'default-list-header text-secondary overflow-hidden',
|
|
195
195
|
this.props.className,
|
|
196
196
|
'bg-' + this.props.headerBackgroundTheme,
|
|
197
|
-
'text' + this.props.headerTextTheme
|
|
197
|
+
'text-' + this.props.headerTextTheme
|
|
198
198
|
)}
|
|
199
199
|
>
|
|
200
200
|
<Row>
|
|
@@ -74,7 +74,11 @@ export default class DesktopListLine extends Component {
|
|
|
74
74
|
}
|
|
75
75
|
this.props.inlineActions.forEach(action => {
|
|
76
76
|
if (action.role === 'MODIFY') {
|
|
77
|
-
action.
|
|
77
|
+
if (action.param === 'object') {
|
|
78
|
+
action.onClick(this.props.item);
|
|
79
|
+
} else {
|
|
80
|
+
action.onClick(this.props.id);
|
|
81
|
+
}
|
|
78
82
|
}
|
|
79
83
|
});
|
|
80
84
|
return false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
+
import { Row, Col } from '../grid';
|
|
4
5
|
|
|
5
6
|
const myLocalStyle = {
|
|
6
7
|
position: 'absolute',
|
|
@@ -24,7 +25,26 @@ export const DefaultContent = props => {
|
|
|
24
25
|
}
|
|
25
26
|
return (
|
|
26
27
|
<>
|
|
27
|
-
{props.header &&
|
|
28
|
+
{props.header &&
|
|
29
|
+
<div className="rbf-responsive-content-header" style={headerStyle}>
|
|
30
|
+
<div className="default-page-header text-secondary overflow-hidden">
|
|
31
|
+
<Row>
|
|
32
|
+
<Col size={{ xsxs: 36 }}>
|
|
33
|
+
<div className="pl-2" style={{ display: 'inline-block', float: 'left' }}>
|
|
34
|
+
<span className={classnames('header-icon', 'no-selector', 'text-' + props.headerTextTheme)}>
|
|
35
|
+
{props.icon && props.icon}
|
|
36
|
+
</span>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="pl-2" style={{ display: 'inline-block', float: 'left' }}>
|
|
39
|
+
<span className="header-title">
|
|
40
|
+
{props.headerContent}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
</Col>
|
|
44
|
+
</Row>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
}
|
|
28
48
|
<div style={inlineStyle}>
|
|
29
49
|
<div className="custom-scrollbar" style={{ height: '100%', overflowY: 'auto', overflowX: 'hidden' }}>
|
|
30
50
|
<div className={classnames(props.className)}>
|
|
@@ -40,10 +60,12 @@ DefaultContent.propTypes = {
|
|
|
40
60
|
className: PropTypes.string,
|
|
41
61
|
children: PropTypes.element,
|
|
42
62
|
header: PropTypes.bool,
|
|
63
|
+
headerContent: PropTypes.element,
|
|
43
64
|
};
|
|
44
65
|
|
|
45
66
|
DefaultContent.defaultProps = {
|
|
46
67
|
children: null,
|
|
47
68
|
className: '',
|
|
48
69
|
header: true,
|
|
70
|
+
headerContent: null,
|
|
49
71
|
};
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
.rbf-responsive-content-header {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
background-color: theme-color('light');
|
|
3
|
+
border-bottom: 1px solid theme-color('secondary-light');
|
|
4
|
+
|
|
5
|
+
.default-page-header {
|
|
6
|
+
line-height: 50px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.header-icon {
|
|
10
|
+
font-size: 1.1rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
padding-left: 5px;
|
|
13
|
+
padding-right: 10px;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
height: 26px;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.header-title {
|
|
20
|
+
font-size: 1.1rem;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
padding-left: 5px;
|
|
23
|
+
padding-right: 10px;
|
|
24
|
+
}
|
|
4
25
|
}
|