@plusscommunities/pluss-core-web 1.3.2-beta.0 → 1.4.1-beta.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/dist/index.cjs.js CHANGED
@@ -28,6 +28,7 @@ var reactRouter = require('react-router');
28
28
  var reactBootstrap = require('react-bootstrap');
29
29
  var reactLottie = require('@crello/react-lottie');
30
30
  var reactCsv = require('react-csv');
31
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
31
32
 
32
33
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
33
34
 
@@ -51,6 +52,7 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
51
52
  var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
52
53
  var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
53
54
  var Dropzone__default = /*#__PURE__*/_interopDefaultLegacy(Dropzone);
55
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
54
56
 
55
57
  var CoreConfig = {
56
58
  env: {
@@ -1635,8 +1637,8 @@ var LINEGREY = COLOUR_BRANDING_INACTIVE; // const BORDER_LINE_GREY = COLOUR_BRAN
1635
1637
  // const COLOUR_BLUE_ALPHA10 = 'rgba(0, 131, 238, 0.1)';
1636
1638
  // const COLOUR_DARKBLUE = '#191e78';
1637
1639
  // const COLOUR_PURPLE = '#6e79c5';
1638
- // const COLOUR_RED = '#c02743';
1639
- // const COLOUR_GREEN = '#00cc9c';
1640
+
1641
+ var COLOUR_RED = '#c02743'; // const COLOUR_GREEN = '#00cc9c';
1640
1642
  // const COLOUR_TANGERINE = '#ff8c75';
1641
1643
  // const COLOUR_CITRON = '#bdbd27';
1642
1644
  // const COLOUR_GRAPEFRUIT = '#ff6363';
@@ -1657,6 +1659,7 @@ var colours = /*#__PURE__*/Object.freeze({
1657
1659
  COLOUR_DUSK_LIGHT: COLOUR_DUSK_LIGHT,
1658
1660
  COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
1659
1661
  LINEGREY: LINEGREY,
1662
+ COLOUR_RED: COLOUR_RED,
1660
1663
  COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
1661
1664
  COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
1662
1665
  COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
@@ -2891,22 +2894,7 @@ var scheduledActionsActions = {
2891
2894
  method: 'GET',
2892
2895
  url: getUrl('scheduledactions', 'get/list', query)
2893
2896
  });
2894
- } // editTemplate: (template) => {
2895
- // template.content = htmlEncode(template.content);
2896
- // return authedFunction({
2897
- // method: 'POST',
2898
- // url: getUrl('templates', 'update/edit'),
2899
- // data: template,
2900
- // });
2901
- // },
2902
- // deleteTemplate: (site, rowId) => {
2903
- // return authedFunction({
2904
- // method: 'POST',
2905
- // url: getUrl('templates', 'update/delete'),
2906
- // data: { site, rowId },
2907
- // });
2908
- // },
2909
-
2897
+ }
2910
2898
  };
2911
2899
 
2912
2900
  var index$2 = /*#__PURE__*/Object.freeze({
@@ -10898,6 +10886,27 @@ var ExportCsvPopup = /*#__PURE__*/function (_Component) {
10898
10886
  return ExportCsvPopup;
10899
10887
  }(React.Component);
10900
10888
 
10889
+ var _excluded = ["id", "label", "help", "showError", "required"];
10890
+
10891
+ function InputGroup(_ref) {
10892
+ var id = _ref.id,
10893
+ label = _ref.label,
10894
+ help = _ref.help,
10895
+ showError = _ref.showError,
10896
+ required = _ref.required,
10897
+ props = _objectWithoutProperties__default['default'](_ref, _excluded);
10898
+
10899
+ return /*#__PURE__*/React__default['default'].createElement(reactBootstrap.FormGroup, {
10900
+ controlId: id,
10901
+ validationState: showError ? 'error' : null
10902
+ }, /*#__PURE__*/React__default['default'].createElement(reactBootstrap.ControlLabel, null, /*#__PURE__*/React__default['default'].createElement("span", null, label), required && /*#__PURE__*/React__default['default'].createElement("span", {
10903
+ style: {
10904
+ color: COLOUR_RED,
10905
+ marginLeft: 5
10906
+ }
10907
+ }, "*")), /*#__PURE__*/React__default['default'].createElement(reactBootstrap.FormControl, props), help && /*#__PURE__*/React__default['default'].createElement(reactBootstrap.HelpBlock, null, help));
10908
+ }
10909
+
10901
10910
  var index = /*#__PURE__*/Object.freeze({
10902
10911
  __proto__: null,
10903
10912
  AddButton: AddButton,
@@ -10937,7 +10946,8 @@ var index = /*#__PURE__*/Object.freeze({
10937
10946
  OptionsSection: OptionsSection,
10938
10947
  DropdownInput: DropdownInput,
10939
10948
  MakerPopup: exportObj,
10940
- ExportCsvPopup: ExportCsvPopup
10949
+ ExportCsvPopup: ExportCsvPopup,
10950
+ InputGroup: InputGroup
10941
10951
  });
10942
10952
 
10943
10953
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
package/dist/index.esm.js CHANGED
@@ -21,9 +21,10 @@ import { connect } from 'react-redux';
21
21
  import Textarea from 'react-textarea-autosize';
22
22
  import Dropzone from 'react-dropzone';
23
23
  import { withRouter } from 'react-router';
24
- import { MenuItem, DropdownButton } from 'react-bootstrap';
24
+ import { MenuItem, DropdownButton, FormGroup, ControlLabel, FormControl, HelpBlock } from 'react-bootstrap';
25
25
  import { Lottie } from '@crello/react-lottie';
26
26
  import { CSVLink } from 'react-csv';
27
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
27
28
 
28
29
  var CoreConfig = {
29
30
  env: {
@@ -1608,8 +1609,8 @@ var LINEGREY = COLOUR_BRANDING_INACTIVE; // const BORDER_LINE_GREY = COLOUR_BRAN
1608
1609
  // const COLOUR_BLUE_ALPHA10 = 'rgba(0, 131, 238, 0.1)';
1609
1610
  // const COLOUR_DARKBLUE = '#191e78';
1610
1611
  // const COLOUR_PURPLE = '#6e79c5';
1611
- // const COLOUR_RED = '#c02743';
1612
- // const COLOUR_GREEN = '#00cc9c';
1612
+
1613
+ var COLOUR_RED = '#c02743'; // const COLOUR_GREEN = '#00cc9c';
1613
1614
  // const COLOUR_TANGERINE = '#ff8c75';
1614
1615
  // const COLOUR_CITRON = '#bdbd27';
1615
1616
  // const COLOUR_GRAPEFRUIT = '#ff6363';
@@ -1630,6 +1631,7 @@ var colours = /*#__PURE__*/Object.freeze({
1630
1631
  COLOUR_DUSK_LIGHT: COLOUR_DUSK_LIGHT,
1631
1632
  COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
1632
1633
  LINEGREY: LINEGREY,
1634
+ COLOUR_RED: COLOUR_RED,
1633
1635
  COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
1634
1636
  COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
1635
1637
  COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
@@ -2864,22 +2866,7 @@ var scheduledActionsActions = {
2864
2866
  method: 'GET',
2865
2867
  url: getUrl('scheduledactions', 'get/list', query)
2866
2868
  });
2867
- } // editTemplate: (template) => {
2868
- // template.content = htmlEncode(template.content);
2869
- // return authedFunction({
2870
- // method: 'POST',
2871
- // url: getUrl('templates', 'update/edit'),
2872
- // data: template,
2873
- // });
2874
- // },
2875
- // deleteTemplate: (site, rowId) => {
2876
- // return authedFunction({
2877
- // method: 'POST',
2878
- // url: getUrl('templates', 'update/delete'),
2879
- // data: { site, rowId },
2880
- // });
2881
- // },
2882
-
2869
+ }
2883
2870
  };
2884
2871
 
2885
2872
  var index$2 = /*#__PURE__*/Object.freeze({
@@ -10871,6 +10858,27 @@ var ExportCsvPopup = /*#__PURE__*/function (_Component) {
10871
10858
  return ExportCsvPopup;
10872
10859
  }(Component);
10873
10860
 
10861
+ var _excluded = ["id", "label", "help", "showError", "required"];
10862
+
10863
+ function InputGroup(_ref) {
10864
+ var id = _ref.id,
10865
+ label = _ref.label,
10866
+ help = _ref.help,
10867
+ showError = _ref.showError,
10868
+ required = _ref.required,
10869
+ props = _objectWithoutProperties(_ref, _excluded);
10870
+
10871
+ return /*#__PURE__*/React.createElement(FormGroup, {
10872
+ controlId: id,
10873
+ validationState: showError ? 'error' : null
10874
+ }, /*#__PURE__*/React.createElement(ControlLabel, null, /*#__PURE__*/React.createElement("span", null, label), required && /*#__PURE__*/React.createElement("span", {
10875
+ style: {
10876
+ color: COLOUR_RED,
10877
+ marginLeft: 5
10878
+ }
10879
+ }, "*")), /*#__PURE__*/React.createElement(FormControl, props), help && /*#__PURE__*/React.createElement(HelpBlock, null, help));
10880
+ }
10881
+
10874
10882
  var index = /*#__PURE__*/Object.freeze({
10875
10883
  __proto__: null,
10876
10884
  AddButton: AddButton,
@@ -10910,7 +10918,8 @@ var index = /*#__PURE__*/Object.freeze({
10910
10918
  OptionsSection: OptionsSection,
10911
10919
  DropdownInput: DropdownInput,
10912
10920
  MakerPopup: exportObj,
10913
- ExportCsvPopup: ExportCsvPopup
10921
+ ExportCsvPopup: ExportCsvPopup,
10922
+ InputGroup: InputGroup
10914
10923
  });
10915
10924
 
10916
10925
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/toConsumableArray'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/regenerator'), require('lodash'), require('axios'), require('aws-amplify'), require('@babel/runtime/helpers/defineProperty'), require('react'), require('jquery'), require('moment'), require('js-cookie'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/inherits'), require('@babel/runtime/helpers/possibleConstructorReturn'), require('@babel/runtime/helpers/getPrototypeOf'), require('react-fontawesome'), require('@babel/runtime/helpers/extends'), require('@babel/runtime/helpers/assertThisInitialized'), require('react-redux'), require('react-textarea-autosize'), require('react-dropzone'), require('react-router'), require('react-bootstrap'), require('@crello/react-lottie'), require('react-csv')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/toConsumableArray', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/regenerator', 'lodash', 'axios', 'aws-amplify', '@babel/runtime/helpers/defineProperty', 'react', 'jquery', 'moment', 'js-cookie', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/inherits', '@babel/runtime/helpers/possibleConstructorReturn', '@babel/runtime/helpers/getPrototypeOf', 'react-fontawesome', '@babel/runtime/helpers/extends', '@babel/runtime/helpers/assertThisInitialized', 'react-redux', 'react-textarea-autosize', 'react-dropzone', 'react-router', 'react-bootstrap', '@crello/react-lottie', 'react-csv'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@plusscommunities/pluss-core-web'] = {}, global._toConsumableArray, global._asyncToGenerator, global._regeneratorRuntime, global._, global.axios, global.awsAmplify, global._defineProperty, global.React, global.$, global.moment, global.Cookies, global._classCallCheck, global._createClass, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global.FontAwesome, global._extends, global._assertThisInitialized, global.reactRedux, global.Textarea, global.Dropzone, global.reactRouter, global.reactBootstrap, global.reactLottie, global.reactCsv));
5
- }(this, (function (exports, _toConsumableArray, _asyncToGenerator, _regeneratorRuntime, _, axios, awsAmplify, _defineProperty, React, $, moment, Cookies, _classCallCheck, _createClass, _inherits, _possibleConstructorReturn, _getPrototypeOf, FontAwesome, _extends, _assertThisInitialized, reactRedux, Textarea, Dropzone, reactRouter, reactBootstrap, reactLottie, reactCsv) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/toConsumableArray'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/regenerator'), require('lodash'), require('axios'), require('aws-amplify'), require('@babel/runtime/helpers/defineProperty'), require('react'), require('jquery'), require('moment'), require('js-cookie'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/inherits'), require('@babel/runtime/helpers/possibleConstructorReturn'), require('@babel/runtime/helpers/getPrototypeOf'), require('react-fontawesome'), require('@babel/runtime/helpers/extends'), require('@babel/runtime/helpers/assertThisInitialized'), require('react-redux'), require('react-textarea-autosize'), require('react-dropzone'), require('react-router'), require('react-bootstrap'), require('@crello/react-lottie'), require('react-csv'), require('@babel/runtime/helpers/objectWithoutProperties')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/toConsumableArray', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/regenerator', 'lodash', 'axios', 'aws-amplify', '@babel/runtime/helpers/defineProperty', 'react', 'jquery', 'moment', 'js-cookie', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/inherits', '@babel/runtime/helpers/possibleConstructorReturn', '@babel/runtime/helpers/getPrototypeOf', 'react-fontawesome', '@babel/runtime/helpers/extends', '@babel/runtime/helpers/assertThisInitialized', 'react-redux', 'react-textarea-autosize', 'react-dropzone', 'react-router', 'react-bootstrap', '@crello/react-lottie', 'react-csv', '@babel/runtime/helpers/objectWithoutProperties'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@plusscommunities/pluss-core-web'] = {}, global._toConsumableArray, global._asyncToGenerator, global._regeneratorRuntime, global._, global.axios, global.awsAmplify, global._defineProperty, global.React, global.$, global.moment, global.Cookies, global._classCallCheck, global._createClass, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global.FontAwesome, global._extends, global._assertThisInitialized, global.reactRedux, global.Textarea, global.Dropzone, global.reactRouter, global.reactBootstrap, global.reactLottie, global.reactCsv, global._objectWithoutProperties));
5
+ }(this, (function (exports, _toConsumableArray, _asyncToGenerator, _regeneratorRuntime, _, axios, awsAmplify, _defineProperty, React, $, moment, Cookies, _classCallCheck, _createClass, _inherits, _possibleConstructorReturn, _getPrototypeOf, FontAwesome, _extends, _assertThisInitialized, reactRedux, Textarea, Dropzone, reactRouter, reactBootstrap, reactLottie, reactCsv, _objectWithoutProperties) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -26,6 +26,7 @@
26
26
  var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
27
27
  var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
28
28
  var Dropzone__default = /*#__PURE__*/_interopDefaultLegacy(Dropzone);
29
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
29
30
 
30
31
  var CoreConfig = {
31
32
  env: {
@@ -1610,8 +1611,8 @@
1610
1611
  // const COLOUR_BLUE_ALPHA10 = 'rgba(0, 131, 238, 0.1)';
1611
1612
  // const COLOUR_DARKBLUE = '#191e78';
1612
1613
  // const COLOUR_PURPLE = '#6e79c5';
1613
- // const COLOUR_RED = '#c02743';
1614
- // const COLOUR_GREEN = '#00cc9c';
1614
+
1615
+ var COLOUR_RED = '#c02743'; // const COLOUR_GREEN = '#00cc9c';
1615
1616
  // const COLOUR_TANGERINE = '#ff8c75';
1616
1617
  // const COLOUR_CITRON = '#bdbd27';
1617
1618
  // const COLOUR_GRAPEFRUIT = '#ff6363';
@@ -1632,6 +1633,7 @@
1632
1633
  COLOUR_DUSK_LIGHT: COLOUR_DUSK_LIGHT,
1633
1634
  COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
1634
1635
  LINEGREY: LINEGREY,
1636
+ COLOUR_RED: COLOUR_RED,
1635
1637
  COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
1636
1638
  COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
1637
1639
  COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
@@ -2866,22 +2868,7 @@
2866
2868
  method: 'GET',
2867
2869
  url: getUrl('scheduledactions', 'get/list', query)
2868
2870
  });
2869
- } // editTemplate: (template) => {
2870
- // template.content = htmlEncode(template.content);
2871
- // return authedFunction({
2872
- // method: 'POST',
2873
- // url: getUrl('templates', 'update/edit'),
2874
- // data: template,
2875
- // });
2876
- // },
2877
- // deleteTemplate: (site, rowId) => {
2878
- // return authedFunction({
2879
- // method: 'POST',
2880
- // url: getUrl('templates', 'update/delete'),
2881
- // data: { site, rowId },
2882
- // });
2883
- // },
2884
-
2871
+ }
2885
2872
  };
2886
2873
 
2887
2874
  var index$2 = /*#__PURE__*/Object.freeze({
@@ -10873,6 +10860,27 @@
10873
10860
  return ExportCsvPopup;
10874
10861
  }(React.Component);
10875
10862
 
10863
+ var _excluded = ["id", "label", "help", "showError", "required"];
10864
+
10865
+ function InputGroup(_ref) {
10866
+ var id = _ref.id,
10867
+ label = _ref.label,
10868
+ help = _ref.help,
10869
+ showError = _ref.showError,
10870
+ required = _ref.required,
10871
+ props = _objectWithoutProperties__default['default'](_ref, _excluded);
10872
+
10873
+ return /*#__PURE__*/React__default['default'].createElement(reactBootstrap.FormGroup, {
10874
+ controlId: id,
10875
+ validationState: showError ? 'error' : null
10876
+ }, /*#__PURE__*/React__default['default'].createElement(reactBootstrap.ControlLabel, null, /*#__PURE__*/React__default['default'].createElement("span", null, label), required && /*#__PURE__*/React__default['default'].createElement("span", {
10877
+ style: {
10878
+ color: COLOUR_RED,
10879
+ marginLeft: 5
10880
+ }
10881
+ }, "*")), /*#__PURE__*/React__default['default'].createElement(reactBootstrap.FormControl, props), help && /*#__PURE__*/React__default['default'].createElement(reactBootstrap.HelpBlock, null, help));
10882
+ }
10883
+
10876
10884
  var index = /*#__PURE__*/Object.freeze({
10877
10885
  __proto__: null,
10878
10886
  AddButton: AddButton,
@@ -10912,7 +10920,8 @@
10912
10920
  OptionsSection: OptionsSection,
10913
10921
  DropdownInput: DropdownInput,
10914
10922
  MakerPopup: exportObj,
10915
- ExportCsvPopup: ExportCsvPopup
10923
+ ExportCsvPopup: ExportCsvPopup,
10924
+ InputGroup: InputGroup
10916
10925
  });
10917
10926
 
10918
10927
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.3.2-beta.0",
3
+ "version": "1.4.1-beta.0",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { getUrl, htmlEncode } from '../helper';
1
+ import { getUrl } from '../helper';
2
2
  import { authedFunction } from '../session';
3
3
 
4
4
  export const scheduledActionsActions = {
@@ -9,19 +9,4 @@ export const scheduledActionsActions = {
9
9
  url: getUrl('scheduledactions', 'get/list', query),
10
10
  });
11
11
  },
12
- // editTemplate: (template) => {
13
- // template.content = htmlEncode(template.content);
14
- // return authedFunction({
15
- // method: 'POST',
16
- // url: getUrl('templates', 'update/edit'),
17
- // data: template,
18
- // });
19
- // },
20
- // deleteTemplate: (site, rowId) => {
21
- // return authedFunction({
22
- // method: 'POST',
23
- // url: getUrl('templates', 'update/delete'),
24
- // data: { site, rowId },
25
- // });
26
- // },
27
12
  };
package/src/colours.js CHANGED
@@ -31,7 +31,7 @@ const LINEGREY = COLOUR_BRANDING_INACTIVE;
31
31
  // const COLOUR_BLUE_ALPHA10 = 'rgba(0, 131, 238, 0.1)';
32
32
  // const COLOUR_DARKBLUE = '#191e78';
33
33
  // const COLOUR_PURPLE = '#6e79c5';
34
- // const COLOUR_RED = '#c02743';
34
+ const COLOUR_RED = '#c02743';
35
35
  // const COLOUR_GREEN = '#00cc9c';
36
36
  // const COLOUR_TANGERINE = '#ff8c75';
37
37
  // const COLOUR_CITRON = '#bdbd27';
@@ -109,7 +109,7 @@ export {
109
109
  // COLOUR_BLUE_ALPHA10,
110
110
  // COLOUR_DARKBLUE,
111
111
  // COLOUR_PURPLE,
112
- // COLOUR_RED,
112
+ COLOUR_RED,
113
113
  // COLOUR_TANGERINE,
114
114
  // COLOUR_CITRON,
115
115
  // COLOUR_GRAPEFRUIT,
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { FormGroup, FormControl, ControlLabel, HelpBlock } from 'react-bootstrap';
3
+ import { COLOUR_RED } from '../colours';
4
+
5
+ function InputGroup({ id, label, help, showError, required, ...props }) {
6
+ return (
7
+ <FormGroup controlId={id} validationState={showError ? 'error' : null}>
8
+ <ControlLabel>
9
+ <span>{label}</span>
10
+ {required && <span style={{ color: COLOUR_RED, marginLeft: 5 }}>*</span>}
11
+ </ControlLabel>
12
+ <FormControl {...props} />
13
+ {help && <HelpBlock>{help}</HelpBlock>}
14
+ </FormGroup>
15
+ );
16
+ }
17
+
18
+ export { InputGroup };
@@ -38,3 +38,4 @@ export * from './OptionsSection';
38
38
  export * from './DropdownInput';
39
39
  export * from './MakerPopup';
40
40
  export * from './ExportCsvPopup';
41
+ export * from './InputGroup';