react-bootstrap-front 3.9.1 → 3.9.6

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.
@@ -0,0 +1,54 @@
1
+ import React, { Component } from 'react';
2
+ import classnames from 'classnames';
3
+ import PropTypes from 'prop-types';
4
+ import { DropdownWrapper } from '../advanced'
5
+ import { DropdownMenu, DropdownMenuOption } from '../basic';
6
+
7
+ export default class MailMerge extends Component {
8
+ static propTypes = {
9
+ onChange: PropTypes.func,
10
+ };
11
+
12
+ constructor(props) {
13
+ super(props);
14
+ this.state = {
15
+ myRef: React.createRef()
16
+ }
17
+ this.onChange = this.onChange.bind(this);
18
+ }
19
+
20
+ stopPropagation = (event) => {
21
+ event.stopPropagation();
22
+ };
23
+
24
+ onChange = (text) => {
25
+ this.props.onChangeText(text);
26
+ }
27
+
28
+ render() {
29
+ const trigger = (
30
+ <button
31
+ type="button"
32
+ className={classnames(this.props.className, 'btn btn-light')}
33
+ >
34
+ {this.props.icon ? this.props.icon : 'MailMerge' }
35
+ </button>
36
+ );
37
+ const options = this.props.options;
38
+ return (
39
+ <DropdownWrapper trigger={trigger} className="ui-inline-wrapper btn-group pl-2" align="bottom-right" myRef={this.state.myRef}>
40
+ <DropdownMenu>
41
+ {options.map((text, index) =>
42
+ (<DropdownMenuOption
43
+ className="rdw-mailmerge-option"
44
+ onClick={() => this.onChange(text.text_content)}
45
+ key={index}
46
+ >
47
+ {text.text_code}
48
+ </DropdownMenuOption>),
49
+ )}
50
+ </DropdownMenu>
51
+ </DropdownWrapper>
52
+ );
53
+ }
54
+ }
File without changes
@@ -1,4 +1,7 @@
1
1
  export { default as ColorPicker } from "./ColorPicker";
2
2
  export { default as FontSize } from "./FontSize";
3
+ export { default as FontFamily } from "./FontFamily";
3
4
  export { default as Inline } from "./Inline";
5
+ export { default as Image } from "./Image";
6
+ export { default as MailMerge } from "./MailMerge";
4
7
  export { default as InputHtml } from "./InputHtml";
@@ -1,4 +1,8 @@
1
+ @import '~react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
1
2
  @import './ColorPicker';
3
+ @import './FontFamily';
2
4
  @import './FontSize';
3
5
  @import './Inline';
6
+ @import './Image';
7
+ @import './MailMerge';
4
8
  @import './InputHtml';
@@ -6,7 +6,7 @@ export const DefaultHeader = props => (
6
6
  <div className="inline-list-default-header bg-secondary-light">
7
7
  <div className="row row-title row-line no-gutters text-secondary" key="inline-list-default-header">
8
8
  {props.cols.map((oneCol, i) => {
9
- return <DefaultTitleCol {...props} col={oneCol} idx={i} />;
9
+ return <DefaultTitleCol key={`herd-${oneCol.name}`} {...props} col={oneCol} idx={i} />;
10
10
  })}
11
11
  {props.onAddOne && (
12
12
  <div className="actions-buttons">
@@ -114,7 +114,7 @@ export default class DefaultLine extends Component {
114
114
  if (!oneCol.hidden) {
115
115
  const line = { ...oneCol, id: this.props.id };
116
116
  const content = getObjectmemberValue(this.props.item, oneCol.col);
117
- return <DefaultCol {...line} content={content} item={this.props.item} selectable={false} />;
117
+ return <DefaultCol key={`col-${oneCol.name}`} {...line} content={content} item={this.props.item} selectable={false} />;
118
118
  }
119
119
  return null;
120
120
  })}
@@ -21,16 +21,15 @@ export const DefaultList = props => {
21
21
  previous = item;
22
22
  if (myBreak !== false) {
23
23
  return (
24
- <>
24
+ <div key={item.id}>
25
25
  <DefaultLineBreak label={myBreak} counter={props.oddEven ? counter++ : 0}/>
26
26
  <DefaultLine
27
- {...props}
28
- key={item.id}
29
- id={item.id}
30
- item={item}
31
- counter={props.oddEven ? counter++ : 0}
32
- />
33
- </>
27
+ {...props}
28
+ id={item.id}
29
+ item={item}
30
+ counter={props.oddEven ? counter++ : 0}
31
+ />
32
+ </div>
34
33
  );
35
34
  } else {
36
35
  return (
@@ -198,13 +198,13 @@ export default class DefaultHeader extends Component {
198
198
  )}
199
199
  >
200
200
  <Row>
201
- <Col size={{ xs: 10, sm: 16, md: 10, lg: 14 }}>
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: 0, md: 12, lg: 8 }}>
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: 20, md: 14, lg: 14 }} className="text-right">
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
@@ -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) {
@@ -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 {