react-bootstrap-front 3.7.8 → 3.9.2
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 +16 -0
- package/dist/react-bootstrap-front.js +7 -7
- package/package.json +1 -1
- package/src/features/advanced/DefaultQuickSearch.js +1 -1
- package/src/features/advanced/ResponsiveModalInner.js +1 -1
- package/src/features/basic/InputJson.js +0 -1
- package/src/features/basic/InputMonetary.js +3 -1
- package/src/features/draft/InputHtml.js +35 -2
- package/src/features/draft/InputHtml.scss +4 -0
- 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/list/ActionButton.js +3 -3
- package/src/features/list/DefaultHeader.jsx +5 -5
- package/src/features/list/DefaultLine.jsx +5 -1
- package/src/features/list/MobileList.jsx +1 -1
- package/src/features/page/DefaultContent.jsx +23 -1
- package/src/features/page/DefaultContent.scss +23 -2
- package/src/features/page/MobilePage.jsx +1 -1
- package/src/styles/mixins/container.scss +22 -1
- package/.project +0 -17
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ export default class DefaultQuickSearch extends Component {
|
|
|
71
71
|
</button>
|
|
72
72
|
}
|
|
73
73
|
{this.props.reset &&
|
|
74
|
-
<button type="button" title="Initialiser la recherche" className="btn btn-outline-secondary bg-light" onClick={(ev) => this.onSubmit(ev, "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
75
|
{this.props.reset}
|
|
76
76
|
</button>
|
|
77
77
|
}
|
|
@@ -298,7 +298,7 @@ export default class ResponsiveModalInner extends Component {
|
|
|
298
298
|
</div>
|
|
299
299
|
}
|
|
300
300
|
</div>
|
|
301
|
-
{this.props.buttons && (
|
|
301
|
+
{(this.props.buttons || this.props.help || this.props.saving) && (
|
|
302
302
|
<div className={classnames('modal-footer', this.props.modalClassName)}>
|
|
303
303
|
{(this.props.help || this.props.saving ) &&
|
|
304
304
|
<div className="modal-left-buttons">
|
|
@@ -8,7 +8,6 @@ import { getFieldId } from '../helpers';
|
|
|
8
8
|
export const InputJson = props => {
|
|
9
9
|
let myId = getFieldId(props.name, props.id);
|
|
10
10
|
const data = JSON.parse(props.value) || {};
|
|
11
|
-
console.log(data, props.value);
|
|
12
11
|
return (
|
|
13
12
|
<InputGroup {...props} id={myId}>
|
|
14
13
|
{props.prepend && props.prepend !== '' && (
|
|
@@ -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,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { EditorState, Modifier } from 'draft-js';
|
|
4
|
+
import { EditorState, Modifier, CompositeDecorator } from 'draft-js';
|
|
5
5
|
import { Editor } from 'react-draft-wysiwyg';
|
|
6
6
|
import { convertToHTML, convertFromHTML } from 'draft-convert';
|
|
7
7
|
import { htmlToString } from '../helpers';
|
|
@@ -52,6 +52,9 @@ const toHtml = {
|
|
|
52
52
|
if (entity.type === 'LINK') {
|
|
53
53
|
return <a href={entity.data.url}>{originalText}</a>;
|
|
54
54
|
}
|
|
55
|
+
if (entity.type === 'MAILMERGE') {
|
|
56
|
+
return <span data-mailmerge="{originalText}">{originalText}</span>;
|
|
57
|
+
}
|
|
55
58
|
return originalText;
|
|
56
59
|
},
|
|
57
60
|
};
|
|
@@ -105,6 +108,9 @@ const fromHtml = {
|
|
|
105
108
|
if (nodeName === 'a') {
|
|
106
109
|
return createEntity('LINK', 'MUTABLE', { url: node.href });
|
|
107
110
|
}
|
|
111
|
+
if (nodeName === 'span' && node.dataset && node.dataset.mailmerge) {
|
|
112
|
+
return createEntity('MAILMERGE', 'IMMUTABLE', { mailmerge: node.dataset.mailmerge });
|
|
113
|
+
}
|
|
108
114
|
},
|
|
109
115
|
textToEntity: (text, createEntity) => {
|
|
110
116
|
const result = [];
|
|
@@ -129,6 +135,27 @@ const fromHtml = {
|
|
|
129
135
|
},
|
|
130
136
|
};
|
|
131
137
|
|
|
138
|
+
function findMailmergeEntities(contentBlock, callback, contentState) {
|
|
139
|
+
console.log(callback);
|
|
140
|
+
contentBlock.findEntityRanges(
|
|
141
|
+
(character) => {
|
|
142
|
+
const entityKey = character.getEntity();
|
|
143
|
+
const found = entityKey !== null && contentState.getEntity(entityKey).getType() === 'MAILMERGE';
|
|
144
|
+
return found;
|
|
145
|
+
},
|
|
146
|
+
callback
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const Mailmerge = (props) => {
|
|
151
|
+
const {mailmerge} = props.contentState.getEntity(props.entityKey).getData();
|
|
152
|
+
return (
|
|
153
|
+
<a href={mailmerge}>
|
|
154
|
+
{props.children}
|
|
155
|
+
</a>
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
|
|
132
159
|
export default class InputTextarea extends Component {
|
|
133
160
|
static propTypes = {
|
|
134
161
|
id: PropTypes.string,
|
|
@@ -169,9 +196,15 @@ export default class InputTextarea extends Component {
|
|
|
169
196
|
} else {
|
|
170
197
|
content = '<p/>';
|
|
171
198
|
}
|
|
199
|
+
const decorator = new CompositeDecorator([
|
|
200
|
+
{
|
|
201
|
+
strategy: findMailmergeEntities,
|
|
202
|
+
component: Mailmerge,
|
|
203
|
+
},
|
|
204
|
+
]);
|
|
172
205
|
const value = convertFromHTML(fromHtml)(content);
|
|
173
206
|
this.state = {
|
|
174
|
-
editorState: EditorState.createWithContent(value),
|
|
207
|
+
editorState: EditorState.createWithContent(value, decorator),
|
|
175
208
|
toolbar: false,
|
|
176
209
|
};
|
|
177
210
|
this.onEditorStateChange = this.onEditorStateChange.bind(this);
|
|
@@ -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>
|
|
@@ -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,17 +194,17 @@ 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>
|
|
201
|
-
<Col size={{ xs: 10, sm:
|
|
201
|
+
<Col size={{ xs: 10, sm: 10, md: 10, lg: 14 }}>
|
|
202
202
|
<div className="pl-2" style={{ display: 'inline-block', float: 'left' }}>
|
|
203
203
|
<span style={iconstyle} className={classnames('no-selector', 'text-' + this.props.headerTextTheme)}>
|
|
204
204
|
{this.props.icon && this.props.icon}
|
|
205
205
|
</span>
|
|
206
206
|
</div>
|
|
207
|
-
<div className="pl-2" style={{ display: 'inline-block', float: 'left' }}>
|
|
207
|
+
<div className="pl-2 col-xs-none col-md-flex" style={{ display: 'inline-block', float: 'left' }}>
|
|
208
208
|
<span style={titlestyle} className={classnames('no-selector', 'text-' + this.props.headerTextTheme)}>
|
|
209
209
|
{this.props.title}
|
|
210
210
|
</span>
|
|
@@ -223,7 +223,7 @@ export default class DefaultHeader extends Component {
|
|
|
223
223
|
</div>
|
|
224
224
|
)}
|
|
225
225
|
</Col>
|
|
226
|
-
<Col size={{ xs:
|
|
226
|
+
<Col size={{ xs: 10, sm: 12, md: 12, lg: 8 }}>
|
|
227
227
|
<Highlight
|
|
228
228
|
className="w-100"
|
|
229
229
|
style={sortStyle}
|
|
@@ -234,7 +234,7 @@ export default class DefaultHeader extends Component {
|
|
|
234
234
|
{this.props.quickSearch}
|
|
235
235
|
</Highlight>
|
|
236
236
|
</Col>
|
|
237
|
-
<Col size={{ xs: 16, sm:
|
|
237
|
+
<Col size={{ xs: 16, sm: 14, md: 14, lg: 14 }} className="text-right">
|
|
238
238
|
<ul className="nav justify-content-end rbf-list-default-header-nav">
|
|
239
239
|
<li className="nav-item">
|
|
240
240
|
<Highlight
|
|
@@ -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;
|
|
@@ -101,7 +101,7 @@ export default class MobileList extends Component {
|
|
|
101
101
|
col.card.position = 99;
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
dispCols = dispCols.filter(col => !col.hidden);
|
|
104
|
+
//dispCols = dispCols.filter(col => !col.hidden);
|
|
105
105
|
let mobileCols = dispCols.filter(col => col.card);
|
|
106
106
|
mobileCols.sort((a, b) => {
|
|
107
107
|
if ((a.card.position && b.card.position && a.card.position > b.card.position) || !a.card.position) {
|
|
@@ -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
|
}
|
|
@@ -113,7 +113,7 @@ export default class MobilePage extends Component {
|
|
|
113
113
|
return (
|
|
114
114
|
<div id="page-root" className="full-page">
|
|
115
115
|
<Container size="xs" className="display-mobile">
|
|
116
|
-
<CSSTransition in={this.state.menuUserOpen} timeout={duration}>
|
|
116
|
+
<CSSTransition in={this.state.menuUserOpen && this.props.authenticated} timeout={duration}>
|
|
117
117
|
{state => (
|
|
118
118
|
<div>
|
|
119
119
|
<div className="bg-white" style={{ ...userMenuDefaultStyles, ...userMenuStyles[state] }}>
|
|
@@ -44,6 +44,26 @@
|
|
|
44
44
|
@return $not;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
@function container-col-show-not($start, $end, $breakpoints: $container-breakpoints, $prefix: 'col') {
|
|
48
|
+
$not: '';
|
|
49
|
+
$started: 0;
|
|
50
|
+
@each $breakpoint in map-keys($breakpoints) {
|
|
51
|
+
@if $breakpoint == $start {
|
|
52
|
+
$started: 1;
|
|
53
|
+
}
|
|
54
|
+
@if $breakpoint == $end {
|
|
55
|
+
$started: 2;
|
|
56
|
+
}
|
|
57
|
+
@if $started >= 1 {
|
|
58
|
+
$not: $not + ':not([class*=\'#{$prefix}-#{$breakpoint}-flex\']):not([class*=\'#{$prefix}-#{$breakpoint}-block\'])';
|
|
59
|
+
@if $started == 2 {
|
|
60
|
+
@return $not;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
@return $not;
|
|
65
|
+
}
|
|
66
|
+
|
|
47
67
|
@function container-d-none-not($start, $end, $breakpoints: $container-breakpoints, $prefix: 'd') {
|
|
48
68
|
$not: '';
|
|
49
69
|
$started: 0;
|
|
@@ -77,8 +97,9 @@
|
|
|
77
97
|
|
|
78
98
|
$infix: container-infix($breakpoint, $breakpoints);
|
|
79
99
|
$notCol: container-col-none-not($breakpoint, $current, $breakpoints);
|
|
100
|
+
$notShow: container-col-show-not($breakpoint, $current, $breakpoints);
|
|
80
101
|
$notD: container-d-none-not($breakpoint, $current, $breakpoints);
|
|
81
|
-
.col#{$infix}-none#{$notCol} {
|
|
102
|
+
.col#{$infix}-none#{$notCol}#{$notShow} {
|
|
82
103
|
display: none !important;
|
|
83
104
|
}
|
|
84
105
|
.col#{$infix}-flex {
|
package/.project
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>react-bootstrap-front</name>
|
|
4
|
-
<comment></comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.wst.validation.validationbuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
|
16
|
-
</natures>
|
|
17
|
-
</projectDescription>
|