denshobato_chat_panel 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eea5004f950d0d29cd47978c95b089d619a4035
4
- data.tar.gz: d21710259e35a919da41708114689570753c83f4
3
+ metadata.gz: 72ba4ed43737d11dc2c97a6eb1e621e64ea54cc7
4
+ data.tar.gz: f467b0e028c6c0502a9e3bcac7ab9fbf2edd063c
5
5
  SHA512:
6
- metadata.gz: 7f5950ba318c59b5cb00ecb7a2d3edf135a3eaf67ca801cba995e0c5db2f351ea3e9f63064eca948a3be391af0578b0e2ad03f450239b7aed20f29f3550c0796
7
- data.tar.gz: d6eeb16458b851bbec292659f46a37a434987d3c546c96a7fb02c9184f53ce6842538618b368dd0576e426a518b86ea1a11dc45c0b158f6516832c79169fcb16
6
+ metadata.gz: 102a003e9b55695b2d01a69c9d4113fde9a6bff2be067516f0893a506a2dd42101345b9386ecdb12e2d221e7c93a3c082febbd0fb7c4e9eabb08a05eb134c46d
7
+ data.tar.gz: 810c4d7fa70cf9bc47a13559f7ed880e0be3512c9e974dd4597ffb87449a574912bf337481c64f82f687d195dd03b1ec77a9e8f7afb62cf109f4fe136e78b6bd
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # DenshobatoChatPanel
2
+ [![Gem Version](https://badge.fury.io/rb/denshobato_chat_panel.svg)](https://badge.fury.io/rb/denshobato_chat_panel)
3
+ [![Build Status](https://travis-ci.org/ID25/denshobato_chat_panel.svg?branch=master)](https://travis-ci.org/ID25/denshobato_chat_panel)
2
4
 
3
- ![alt text](http://i.imgur.com/0sUUfDl.jpg "Screen")
4
5
  DenshobatoChatPanel, is a official addon for [Denshobato Gem](https://github.com/ID25/denshobato), it provides simple chat panel for you. If you don't need any special customization for dialog panel, or if you want to try messaging quickly, you can use chat panel.
5
6
 
7
+ ![Denshobato Chat Panel](http://i.imgur.com/38cyDTi.png "Denshobato Chat Panel")
8
+
6
9
  ## Installation
7
10
 
8
11
  Add this line to your application's Gemfile:
@@ -29,16 +32,23 @@ rails g denshobato_chat_panel:install
29
32
 
30
33
  This command copies assets to vendor/public/assets
31
34
 
32
- #####1. Copy this line to your `config/initializers/assets.rb`
35
+ #####1. Add method ```denshobato_chat_panel``` to your model
36
+ ```ruby
37
+ class Customer < ActiveRecord::Base
38
+ denshobato_for :customer
39
+ denshobato_chat_panel
40
+ end
41
+ ```
42
+ #####2. Copy this line to your `config/initializers/assets.rb`
33
43
  ```ruby
34
44
  Rails.application.config.assets.precompile += %w( denshobato.js )
35
45
  ```
36
- #####2. In your application.scss import css
46
+ #####3. In your application.scss import css
37
47
  ```scss
38
48
  @import 'denshobato';
39
49
  ```
40
50
 
41
- #####3. In `layouts/application.erb` include javascript file in the bottom
51
+ #####4. In `layouts/application.erb` include javascript file in the bottom
42
52
 
43
53
  ```erb
44
54
  <body>
@@ -50,12 +60,12 @@ This command copies assets to vendor/public/assets
50
60
  <%= javascript_include_tag 'denshobato' %>
51
61
  </body>
52
62
  ```
53
- #####4. Mount API route in your routes.rb
63
+ #####5. Mount API route in your routes.rb
54
64
  ```ruby
55
65
  mount Denshobato::DenshobatoApi => '/'
56
66
  ```
57
67
 
58
- #####5. On the page with your conversation, e.g `localhost:3000/conversation/32`, add this helper with arguments
68
+ #####6. On the page with your conversation, e.g `localhost:3000/conversation/32`, add this helper with arguments
59
69
  ```slim
60
70
  = render_denshobato_messages(@conversation, current_user)
61
71
  // => When @conversation = Denshobato::Conversation.find(params[:id])
@@ -70,15 +80,16 @@ By default, name show a class name of model, e.g Customer, or User, and a gravat
70
80
  Go to your user model and rewrite these methods.
71
81
 
72
82
  ```ruby
73
- class User
83
+ class User < ActiveRecord::Base
74
84
  denshobato_for :user
85
+ denshobato_chat_panel
75
86
 
76
87
  def full_name
77
- "#{self.first_name}, #{self.last_name}"
88
+ "#{first_name}, #{last_name}"
78
89
  end
79
90
 
80
91
  def image
81
- self.avatar.url
92
+ avatar.url
82
93
  end
83
94
  end
84
95
  ```
@@ -91,3 +102,5 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/ID25/d
91
102
  ## License
92
103
 
93
104
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
105
+
106
+ Copyright (c) 2016 Eugene Domosedov (ID25)
@@ -2,8 +2,14 @@ require 'denshobato_chat_panel/version'
2
2
  require 'denshobato_chat_panel/engine' if defined?(Rails)
3
3
 
4
4
  # Helpers for React-Redux
5
+
5
6
  DenshobatoChatPanel.autoload :ReactHelper, 'denshobato_chat_panel/react_helper'
6
7
 
7
8
  module DenshobatoChatPanel
9
+ require 'denshobato_chat_panel/core'
10
+
11
+ DenshobatoChatPanel.autoload :ChatPanelHelper, 'denshobato_chat_panel/chat_panel_helper'
12
+ ActiveRecord::Base.extend DenshobatoChatPanel::Core
13
+
8
14
  ActionView::Base.include DenshobatoChatPanel::ReactHelper if defined?(ActionView::Base)
9
15
  end
@@ -0,0 +1,44 @@
1
+ module DenshobatoChatPanel
2
+ module ChatPanelHelper
3
+ # Default methods only for built-in Chat Panel
4
+ # Overwrite this methods when using Chat Panel
5
+
6
+ # class User < ActiveRecord::Base
7
+ # def full_name
8
+ # "#{first_name}", #{last_name}
9
+ # end
10
+ #
11
+ # def image
12
+ # user_avatar.url
13
+ # end
14
+ # end
15
+
16
+ DEFAULT_EMAIL = 'john.doe@gmail.com'.freeze
17
+
18
+ def full_name
19
+ # Set up default name for chat panel
20
+ # By default class name will be used, e.g => User
21
+
22
+ self.class.name.titleize
23
+ end
24
+
25
+ def image
26
+ # Show gravatar image
27
+
28
+ # Email field is expected by default for gravatar and for messagable model.
29
+ # If a model doesn`t have email field, send to method 'default' email, to show default gravatar
30
+ gravatar_image = Digest::MD5.hexdigest(email.downcase)
31
+ email == DEFAULT_EMAIL ? gravatar(gravatar_image, '?d=mm') : gravatar(gravatar_image)
32
+ end
33
+
34
+ def method_missing(method, *_args)
35
+ DEFAULT_EMAIL if method.to_s == 'email'
36
+ end
37
+
38
+ private
39
+
40
+ def gravatar(email, args = nil)
41
+ "https://secure.gravatar.com/avatar/#{email}/#{args}"
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,15 @@
1
+ module DenshobatoChatPanel
2
+ module Core
3
+ def denshobato_chat_panel
4
+ adds_chat_panel_methods
5
+ end
6
+
7
+ private
8
+
9
+ def adds_chat_panel_methods
10
+ class_eval do
11
+ include DenshobatoChatPanel::ChatPanelHelper
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module DenshobatoChatPanel
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
@@ -20504,13 +20504,11 @@
20504
20504
  * // => true
20505
20505
  */
20506
20506
  function isPlainObject(value) {
20507
- if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
20507
+ if (!isObjectLike(value) ||
20508
+ objectToString.call(value) != objectTag || isHostObject(value)) {
20508
20509
  return false;
20509
20510
  }
20510
- var proto = objectProto;
20511
- if (typeof value.constructor == 'function') {
20512
- proto = getPrototypeOf(value);
20513
- }
20511
+ var proto = getPrototypeOf(value);
20514
20512
  if (proto === null) {
20515
20513
  return true;
20516
20514
  }
@@ -22441,8 +22439,7 @@
22441
22439
  'use strict';
22442
22440
 
22443
22441
  exports.__esModule = true;
22444
-
22445
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22442
+ exports.untouchWithKey = exports.untouch = exports.touchWithKey = exports.touch = exports.swapArrayValues = exports.stopSubmit = exports.stopAsyncValidation = exports.startSubmit = exports.startAsyncValidation = exports.reset = exports.propTypes = exports.initializeWithKey = exports.initialize = exports.getValues = exports.removeArrayValue = exports.reduxForm = exports.reducer = exports.focus = exports.destroy = exports.changeWithKey = exports.change = exports.blur = exports.addArrayValue = exports.actionTypes = undefined;
22446
22443
 
22447
22444
  var _react = __webpack_require__(1);
22448
22445
 
@@ -22454,9 +22451,11 @@
22454
22451
 
22455
22452
  var _createAll3 = _interopRequireDefault(_createAll2);
22456
22453
 
22454
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22455
+
22457
22456
  var isNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative';
22458
22457
 
22459
- var _createAll = _createAll3['default'](isNative, _react2['default'], _reactRedux.connect);
22458
+ var _createAll = (0, _createAll3.default)(isNative, _react2.default, _reactRedux.connect);
22460
22459
 
22461
22460
  var actionTypes = _createAll.actionTypes;
22462
22461
  var addArrayValue = _createAll.addArrayValue;
@@ -22517,11 +22516,7 @@
22517
22516
 
22518
22517
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
22519
22518
 
22520
- exports['default'] = createAll;
22521
-
22522
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
22523
-
22524
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22519
+ exports.default = createAll;
22525
22520
 
22526
22521
  var _reducer = __webpack_require__(205);
22527
22522
 
@@ -22555,41 +22550,45 @@
22555
22550
 
22556
22551
  var _getValuesFromState2 = _interopRequireDefault(_getValuesFromState);
22557
22552
 
22553
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
22554
+
22555
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22556
+
22558
22557
  // bind form as first parameter of action creators
22559
- var boundActions = _extends({}, _mapValues2['default'](_extends({}, actions, {
22558
+ var boundActions = _extends({}, (0, _mapValues2.default)(_extends({}, actions, {
22560
22559
  changeWithKey: function changeWithKey(key) {
22561
22560
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
22562
22561
  args[_key - 1] = arguments[_key];
22563
22562
  }
22564
22563
 
22565
- return _bindActionData2['default'](actions.change, { key: key }).apply(undefined, args);
22564
+ return (0, _bindActionData2.default)(actions.change, { key: key }).apply(undefined, args);
22566
22565
  },
22567
22566
  initializeWithKey: function initializeWithKey(key) {
22568
22567
  for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
22569
22568
  args[_key2 - 1] = arguments[_key2];
22570
22569
  }
22571
22570
 
22572
- return _bindActionData2['default'](actions.initialize, { key: key }).apply(undefined, args);
22571
+ return (0, _bindActionData2.default)(actions.initialize, { key: key }).apply(undefined, args);
22573
22572
  },
22574
22573
  reset: function reset(key) {
22575
- return _bindActionData2['default'](actions.reset, { key: key })();
22574
+ return (0, _bindActionData2.default)(actions.reset, { key: key })();
22576
22575
  },
22577
22576
  touchWithKey: function touchWithKey(key) {
22578
22577
  for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
22579
22578
  args[_key3 - 1] = arguments[_key3];
22580
22579
  }
22581
22580
 
22582
- return _bindActionData2['default'](actions.touch, { key: key }).apply(undefined, args);
22581
+ return (0, _bindActionData2.default)(actions.touch, { key: key }).apply(undefined, args);
22583
22582
  },
22584
22583
  untouchWithKey: function untouchWithKey(key) {
22585
22584
  for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
22586
22585
  args[_key4 - 1] = arguments[_key4];
22587
22586
  }
22588
22587
 
22589
- return _bindActionData2['default'](actions.untouch, { key: key }).apply(undefined, args);
22588
+ return (0, _bindActionData2.default)(actions.untouch, { key: key }).apply(undefined, args);
22590
22589
  },
22591
22590
  destroy: function destroy(key) {
22592
- return _bindActionData2['default'](actions.destroy, { key: key })();
22591
+ return (0, _bindActionData2.default)(actions.destroy, { key: key })();
22593
22592
  }
22594
22593
  }), function (action) {
22595
22594
  return function (form) {
@@ -22597,7 +22596,7 @@
22597
22596
  args[_key5 - 1] = arguments[_key5];
22598
22597
  }
22599
22598
 
22600
- return _bindActionData2['default'](action, { form: form }).apply(undefined, args);
22599
+ return (0, _bindActionData2.default)(action, { form: form }).apply(undefined, args);
22601
22600
  };
22602
22601
  }));
22603
22602
 
@@ -22631,12 +22630,12 @@
22631
22630
  changeWithKey: changeWithKey,
22632
22631
  destroy: destroy,
22633
22632
  focus: focus,
22634
- getValues: _getValuesFromState2['default'],
22633
+ getValues: _getValuesFromState2.default,
22635
22634
  initialize: initialize,
22636
22635
  initializeWithKey: initializeWithKey,
22637
- propTypes: _createPropTypes2['default'](React),
22638
- reduxForm: _createReduxForm2['default'](isReactNative, React, connect),
22639
- reducer: _reducer2['default'],
22636
+ propTypes: (0, _createPropTypes2.default)(React),
22637
+ reduxForm: (0, _createReduxForm2.default)(isReactNative, React, connect),
22638
+ reducer: _reducer2.default,
22640
22639
  removeArrayValue: removeArrayValue,
22641
22640
  reset: reset,
22642
22641
  startAsyncValidation: startAsyncValidation,
@@ -22652,8 +22651,6 @@
22652
22651
  };
22653
22652
  }
22654
22653
 
22655
- module.exports = exports['default'];
22656
-
22657
22654
  /***/ },
22658
22655
  /* 205 */
22659
22656
  /***/ function(module, exports, __webpack_require__) {
@@ -22661,15 +22658,12 @@
22661
22658
  'use strict';
22662
22659
 
22663
22660
  exports.__esModule = true;
22661
+ exports.initialState = exports.globalErrorKey = undefined;
22664
22662
 
22665
22663
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
22666
22664
 
22667
22665
  var _initialState, _behaviors;
22668
22666
 
22669
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22670
-
22671
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22672
-
22673
22667
  var _actionTypes = __webpack_require__(206);
22674
22668
 
22675
22669
  var _mapValues = __webpack_require__(207);
@@ -22706,31 +22700,33 @@
22706
22700
 
22707
22701
  var _normalizeFields2 = _interopRequireDefault(_normalizeFields);
22708
22702
 
22709
- var globalErrorKey = '_error';
22703
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22704
+
22705
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22706
+
22707
+ var globalErrorKey = exports.globalErrorKey = '_error';
22710
22708
 
22711
- exports.globalErrorKey = globalErrorKey;
22712
- var initialState = (_initialState = {
22709
+ var initialState = exports.initialState = (_initialState = {
22713
22710
  _active: undefined,
22714
22711
  _asyncValidating: false
22715
22712
  }, _initialState[globalErrorKey] = undefined, _initialState._initialized = false, _initialState._submitting = false, _initialState._submitFailed = false, _initialState);
22716
22713
 
22717
- exports.initialState = initialState;
22718
22714
  var behaviors = (_behaviors = {}, _behaviors[_actionTypes.ADD_ARRAY_VALUE] = function (state, _ref) {
22719
22715
  var path = _ref.path;
22720
22716
  var index = _ref.index;
22721
22717
  var value = _ref.value;
22722
22718
  var fields = _ref.fields;
22723
22719
 
22724
- var array = _read2['default'](path, state);
22720
+ var array = (0, _read2.default)(path, state);
22725
22721
  var stateCopy = _extends({}, state);
22726
22722
  var arrayCopy = array ? [].concat(array) : [];
22727
- var newValue = value !== null && typeof value === 'object' ? _initializeState2['default'](value, fields || Object.keys(value)) : _fieldValue.makeFieldValue({ value: value });
22723
+ var newValue = value !== null && typeof value === 'object' ? (0, _initializeState2.default)(value, fields || Object.keys(value)) : (0, _fieldValue.makeFieldValue)({ value: value });
22728
22724
  if (index === undefined) {
22729
22725
  arrayCopy.push(newValue);
22730
22726
  } else {
22731
22727
  arrayCopy.splice(index, 0, newValue);
22732
22728
  }
22733
- return _write2['default'](path, arrayCopy, stateCopy);
22729
+ return (0, _write2.default)(path, arrayCopy, stateCopy);
22734
22730
  }, _behaviors[_actionTypes.BLUR] = function (state, _ref2) {
22735
22731
  var field = _ref2.field;
22736
22732
  var value = _ref2.value;
@@ -22739,10 +22735,10 @@
22739
22735
  // remove _active from state
22740
22736
  var _active = state._active;
22741
22737
 
22742
- var stateCopy = _objectWithoutProperties(state, ['_active']);
22738
+ var stateCopy = _objectWithoutProperties(state, ['_active']); // eslint-disable-line prefer-const
22743
22739
 
22744
- // eslint-disable-line prefer-const
22745
- return _write2['default'](field, function (previous) {
22740
+
22741
+ return (0, _write2.default)(field, function (previous) {
22746
22742
  var result = _extends({}, previous);
22747
22743
  if (value !== undefined) {
22748
22744
  result.value = value;
@@ -22750,33 +22746,33 @@
22750
22746
  if (touch) {
22751
22747
  result.touched = true;
22752
22748
  }
22753
- return _fieldValue.makeFieldValue(result);
22749
+ return (0, _fieldValue.makeFieldValue)(result);
22754
22750
  }, stateCopy);
22755
22751
  }, _behaviors[_actionTypes.CHANGE] = function (state, _ref3) {
22756
22752
  var field = _ref3.field;
22757
22753
  var value = _ref3.value;
22758
22754
  var touch = _ref3.touch;
22759
22755
 
22760
- return _write2['default'](field, function (previous) {
22761
- var _extends13 = _extends({}, previous, { value: value });
22756
+ return (0, _write2.default)(field, function (previous) {
22757
+ var _previous$value = _extends({}, previous, { value: value });
22762
22758
 
22763
- var asyncError = _extends13.asyncError;
22764
- var submitError = _extends13.submitError;
22759
+ var asyncError = _previous$value.asyncError;
22760
+ var submitError = _previous$value.submitError;
22765
22761
 
22766
- var result = _objectWithoutProperties(_extends13, ['asyncError', 'submitError']);
22762
+ var result = _objectWithoutProperties(_previous$value, ['asyncError', 'submitError']);
22767
22763
 
22768
22764
  if (touch) {
22769
22765
  result.touched = true;
22770
22766
  }
22771
- return _fieldValue.makeFieldValue(result);
22767
+ return (0, _fieldValue.makeFieldValue)(result);
22772
22768
  }, state);
22773
22769
  }, _behaviors[_actionTypes.DESTROY] = function () {
22774
22770
  return undefined;
22775
22771
  }, _behaviors[_actionTypes.FOCUS] = function (state, _ref4) {
22776
22772
  var field = _ref4.field;
22777
22773
 
22778
- var stateCopy = _write2['default'](field, function (previous) {
22779
- return _fieldValue.makeFieldValue(_extends({}, previous, { visited: true }));
22774
+ var stateCopy = (0, _write2.default)(field, function (previous) {
22775
+ return (0, _fieldValue.makeFieldValue)(_extends({}, previous, { visited: true }));
22780
22776
  }, state);
22781
22777
  stateCopy._active = field;
22782
22778
  return stateCopy;
@@ -22786,7 +22782,7 @@
22786
22782
  var data = _ref5.data;
22787
22783
  var fields = _ref5.fields;
22788
22784
 
22789
- return _extends({}, _initializeState2['default'](data, fields, state), (_extends2 = {
22785
+ return _extends({}, (0, _initializeState2.default)(data, fields, state), (_extends2 = {
22790
22786
  _asyncValidating: false,
22791
22787
  _active: undefined
22792
22788
  }, _extends2[globalErrorKey] = undefined, _extends2._initialized = true, _extends2._submitting = false, _extends2._submitFailed = false, _extends2));
@@ -22794,7 +22790,7 @@
22794
22790
  var path = _ref6.path;
22795
22791
  var index = _ref6.index;
22796
22792
 
22797
- var array = _read2['default'](path, state);
22793
+ var array = (0, _read2.default)(path, state);
22798
22794
  var stateCopy = _extends({}, state);
22799
22795
  var arrayCopy = array ? [].concat(array) : [];
22800
22796
  if (index === undefined) {
@@ -22804,11 +22800,11 @@
22804
22800
  } else {
22805
22801
  arrayCopy.splice(index, 1);
22806
22802
  }
22807
- return _write2['default'](path, arrayCopy, stateCopy);
22803
+ return (0, _write2.default)(path, arrayCopy, stateCopy);
22808
22804
  }, _behaviors[_actionTypes.RESET] = function (state) {
22809
22805
  var _extends3;
22810
22806
 
22811
- return _extends({}, _resetState2['default'](state), (_extends3 = {
22807
+ return _extends({}, (0, _resetState2.default)(state), (_extends3 = {
22812
22808
  _active: undefined,
22813
22809
  _asyncValidating: false
22814
22810
  }, _extends3[globalErrorKey] = undefined, _extends3._initialized = state._initialized, _extends3._submitting = false, _extends3._submitFailed = false, _extends3));
@@ -22827,7 +22823,7 @@
22827
22823
 
22828
22824
  var errors = _ref8.errors;
22829
22825
 
22830
- return _extends({}, _setErrors2['default'](state, errors, 'asyncError'), (_extends4 = {
22826
+ return _extends({}, (0, _setErrors2.default)(state, errors, 'asyncError'), (_extends4 = {
22831
22827
  _asyncValidating: false
22832
22828
  }, _extends4[globalErrorKey] = errors && errors[globalErrorKey], _extends4));
22833
22829
  }, _behaviors[_actionTypes.STOP_SUBMIT] = function (state, _ref9) {
@@ -22835,7 +22831,7 @@
22835
22831
 
22836
22832
  var errors = _ref9.errors;
22837
22833
 
22838
- return _extends({}, _setErrors2['default'](state, errors, 'submitError'), (_extends5 = {}, _extends5[globalErrorKey] = errors && errors[globalErrorKey], _extends5._submitting = false, _extends5._submitFailed = !!(errors && Object.keys(errors).length), _extends5));
22834
+ return _extends({}, (0, _setErrors2.default)(state, errors, 'submitError'), (_extends5 = {}, _extends5[globalErrorKey] = errors && errors[globalErrorKey], _extends5._submitting = false, _extends5._submitFailed = !!(errors && Object.keys(errors).length), _extends5));
22839
22835
  }, _behaviors[_actionTypes.SUBMIT_FAILED] = function (state) {
22840
22836
  return _extends({}, state, {
22841
22837
  _submitFailed: true
@@ -22845,7 +22841,7 @@
22845
22841
  var indexA = _ref10.indexA;
22846
22842
  var indexB = _ref10.indexB;
22847
22843
 
22848
- var array = _read2['default'](path, state);
22844
+ var array = (0, _read2.default)(path, state);
22849
22845
  var arrayLength = array.length;
22850
22846
  if (indexA === indexB || isNaN(indexA) || isNaN(indexB) || indexA >= arrayLength || indexB >= arrayLength) {
22851
22847
  return state; // do nothing
@@ -22854,28 +22850,28 @@
22854
22850
  var arrayCopy = [].concat(array);
22855
22851
  arrayCopy[indexA] = array[indexB];
22856
22852
  arrayCopy[indexB] = array[indexA];
22857
- return _write2['default'](path, arrayCopy, stateCopy);
22853
+ return (0, _write2.default)(path, arrayCopy, stateCopy);
22858
22854
  }, _behaviors[_actionTypes.TOUCH] = function (state, _ref11) {
22859
22855
  var fields = _ref11.fields;
22860
22856
 
22861
22857
  return _extends({}, state, fields.reduce(function (accumulator, field) {
22862
- return _write2['default'](field, function (value) {
22863
- return _fieldValue.makeFieldValue(_extends({}, value, { touched: true }));
22858
+ return (0, _write2.default)(field, function (value) {
22859
+ return (0, _fieldValue.makeFieldValue)(_extends({}, value, { touched: true }));
22864
22860
  }, accumulator);
22865
22861
  }, state));
22866
22862
  }, _behaviors[_actionTypes.UNTOUCH] = function (state, _ref12) {
22867
22863
  var fields = _ref12.fields;
22868
22864
 
22869
22865
  return _extends({}, state, fields.reduce(function (accumulator, field) {
22870
- return _write2['default'](field, function (value) {
22866
+ return (0, _write2.default)(field, function (value) {
22871
22867
  if (value) {
22872
22868
  var touched = value.touched;
22873
22869
 
22874
22870
  var rest = _objectWithoutProperties(value, ['touched']);
22875
22871
 
22876
- return _fieldValue.makeFieldValue(rest);
22872
+ return (0, _fieldValue.makeFieldValue)(rest);
22877
22873
  }
22878
- return _fieldValue.makeFieldValue(value);
22874
+ return (0, _fieldValue.makeFieldValue)(value);
22879
22875
  }, accumulator);
22880
22876
  }, state));
22881
22877
  }, _behaviors);
@@ -22889,17 +22885,16 @@
22889
22885
  };
22890
22886
 
22891
22887
  function formReducer() {
22892
- var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
22893
-
22894
22888
  var _extends11;
22895
22889
 
22890
+ var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
22896
22891
  var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
22897
22892
  var form = action.form;
22898
22893
  var key = action.key;
22899
22894
 
22900
- var rest = _objectWithoutProperties(action, ['form', 'key']);
22895
+ var rest = _objectWithoutProperties(action, ['form', 'key']); // eslint-disable-line no-redeclare
22896
+
22901
22897
 
22902
- // eslint-disable-line no-redeclare
22903
22898
  if (!form) {
22904
22899
  return state;
22905
22900
  }
@@ -22940,7 +22935,7 @@
22940
22935
  var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
22941
22936
 
22942
22937
  var result = _this(state, action);
22943
- return _extends({}, result, _mapValues2['default'](reducers, function (pluginReducer, key) {
22938
+ return _extends({}, result, (0, _mapValues2.default)(reducers, function (pluginReducer, key) {
22944
22939
  return pluginReducer(result[key] || initialState, action);
22945
22940
  }));
22946
22941
  });
@@ -22955,12 +22950,12 @@
22955
22950
  var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
22956
22951
 
22957
22952
  var result = _this2(state, action);
22958
- return _extends({}, result, _mapValues2['default'](normalizers, function (formNormalizers, form) {
22953
+ return _extends({}, result, (0, _mapValues2.default)(normalizers, function (formNormalizers, form) {
22959
22954
  var runNormalize = function runNormalize(previous, currentResult) {
22960
- var previousValues = _getValuesFromState2['default'](_extends({}, initialState, previous));
22955
+ var previousValues = (0, _getValuesFromState2.default)(_extends({}, initialState, previous));
22961
22956
  var formResult = _extends({}, initialState, currentResult);
22962
- var values = _getValuesFromState2['default'](formResult);
22963
- return _normalizeFields2['default'](formNormalizers, formResult, previous, values, previousValues);
22957
+ var values = (0, _getValuesFromState2.default)(formResult);
22958
+ return (0, _normalizeFields2.default)(formNormalizers, formResult, previous, values, previousValues);
22964
22959
  };
22965
22960
  if (action.key) {
22966
22961
  var _extends12;
@@ -22975,7 +22970,7 @@
22975
22970
  return target;
22976
22971
  }
22977
22972
 
22978
- exports['default'] = decorate(formReducer);
22973
+ exports.default = decorate(formReducer);
22979
22974
 
22980
22975
  /***/ },
22981
22976
  /* 206 */
@@ -22984,54 +22979,37 @@
22984
22979
  'use strict';
22985
22980
 
22986
22981
  exports.__esModule = true;
22987
- var ADD_ARRAY_VALUE = 'redux-form/ADD_ARRAY_VALUE';
22988
- exports.ADD_ARRAY_VALUE = ADD_ARRAY_VALUE;
22989
- var BLUR = 'redux-form/BLUR';
22990
- exports.BLUR = BLUR;
22991
- var CHANGE = 'redux-form/CHANGE';
22992
- exports.CHANGE = CHANGE;
22993
- var DESTROY = 'redux-form/DESTROY';
22994
- exports.DESTROY = DESTROY;
22995
- var FOCUS = 'redux-form/FOCUS';
22996
- exports.FOCUS = FOCUS;
22997
- var INITIALIZE = 'redux-form/INITIALIZE';
22998
- exports.INITIALIZE = INITIALIZE;
22999
- var REMOVE_ARRAY_VALUE = 'redux-form/REMOVE_ARRAY_VALUE';
23000
- exports.REMOVE_ARRAY_VALUE = REMOVE_ARRAY_VALUE;
23001
- var RESET = 'redux-form/RESET';
23002
- exports.RESET = RESET;
23003
- var START_ASYNC_VALIDATION = 'redux-form/START_ASYNC_VALIDATION';
23004
- exports.START_ASYNC_VALIDATION = START_ASYNC_VALIDATION;
23005
- var START_SUBMIT = 'redux-form/START_SUBMIT';
23006
- exports.START_SUBMIT = START_SUBMIT;
23007
- var STOP_ASYNC_VALIDATION = 'redux-form/STOP_ASYNC_VALIDATION';
23008
- exports.STOP_ASYNC_VALIDATION = STOP_ASYNC_VALIDATION;
23009
- var STOP_SUBMIT = 'redux-form/STOP_SUBMIT';
23010
- exports.STOP_SUBMIT = STOP_SUBMIT;
23011
- var SUBMIT_FAILED = 'redux-form/SUBMIT_FAILED';
23012
- exports.SUBMIT_FAILED = SUBMIT_FAILED;
23013
- var SWAP_ARRAY_VALUES = 'redux-form/SWAP_ARRAY_VALUES';
23014
- exports.SWAP_ARRAY_VALUES = SWAP_ARRAY_VALUES;
23015
- var TOUCH = 'redux-form/TOUCH';
23016
- exports.TOUCH = TOUCH;
23017
- var UNTOUCH = 'redux-form/UNTOUCH';
23018
- exports.UNTOUCH = UNTOUCH;
22982
+ var ADD_ARRAY_VALUE = exports.ADD_ARRAY_VALUE = 'redux-form/ADD_ARRAY_VALUE';
22983
+ var BLUR = exports.BLUR = 'redux-form/BLUR';
22984
+ var CHANGE = exports.CHANGE = 'redux-form/CHANGE';
22985
+ var DESTROY = exports.DESTROY = 'redux-form/DESTROY';
22986
+ var FOCUS = exports.FOCUS = 'redux-form/FOCUS';
22987
+ var INITIALIZE = exports.INITIALIZE = 'redux-form/INITIALIZE';
22988
+ var REMOVE_ARRAY_VALUE = exports.REMOVE_ARRAY_VALUE = 'redux-form/REMOVE_ARRAY_VALUE';
22989
+ var RESET = exports.RESET = 'redux-form/RESET';
22990
+ var START_ASYNC_VALIDATION = exports.START_ASYNC_VALIDATION = 'redux-form/START_ASYNC_VALIDATION';
22991
+ var START_SUBMIT = exports.START_SUBMIT = 'redux-form/START_SUBMIT';
22992
+ var STOP_ASYNC_VALIDATION = exports.STOP_ASYNC_VALIDATION = 'redux-form/STOP_ASYNC_VALIDATION';
22993
+ var STOP_SUBMIT = exports.STOP_SUBMIT = 'redux-form/STOP_SUBMIT';
22994
+ var SUBMIT_FAILED = exports.SUBMIT_FAILED = 'redux-form/SUBMIT_FAILED';
22995
+ var SWAP_ARRAY_VALUES = exports.SWAP_ARRAY_VALUES = 'redux-form/SWAP_ARRAY_VALUES';
22996
+ var TOUCH = exports.TOUCH = 'redux-form/TOUCH';
22997
+ var UNTOUCH = exports.UNTOUCH = 'redux-form/UNTOUCH';
23019
22998
 
23020
22999
  /***/ },
23021
23000
  /* 207 */
23022
23001
  /***/ function(module, exports) {
23023
23002
 
23024
- /**
23025
- * Maps all the values in the given object through the given function and saves them, by key, to a result object
23026
- */
23027
23003
  "use strict";
23028
23004
 
23029
23005
  exports.__esModule = true;
23030
23006
 
23031
23007
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23032
23008
 
23033
- exports["default"] = mapValues;
23034
-
23009
+ exports.default = mapValues;
23010
+ /**
23011
+ * Maps all the values in the given object through the given function and saves them, by key, to a result object
23012
+ */
23035
23013
  function mapValues(obj, fn) {
23036
23014
  return obj ? Object.keys(obj).reduce(function (accumulator, key) {
23037
23015
  var _extends2;
@@ -23040,200 +23018,157 @@
23040
23018
  }, {}) : obj;
23041
23019
  }
23042
23020
 
23043
- module.exports = exports["default"];
23044
-
23045
23021
  /***/ },
23046
23022
  /* 208 */
23047
23023
  /***/ function(module, exports) {
23048
23024
 
23049
- /**
23050
- * Reads any potentially deep value from an object using dot and array syntax
23051
- */
23052
23025
  'use strict';
23053
23026
 
23054
23027
  exports.__esModule = true;
23055
- var read = function read(_x, _x2) {
23056
- var _again = true;
23057
-
23058
- _function: while (_again) {
23059
- var path = _x,
23060
- object = _x2;
23061
- _again = false;
23062
-
23063
- if (!path || !object) {
23064
- return object;
23028
+ /**
23029
+ * Reads any potentially deep value from an object using dot and array syntax
23030
+ */
23031
+ var read = function read(path, object) {
23032
+ if (!path || !object) {
23033
+ return object;
23034
+ }
23035
+ var dotIndex = path.indexOf('.');
23036
+ if (dotIndex === 0) {
23037
+ return read(path.substring(1), object);
23038
+ }
23039
+ var openIndex = path.indexOf('[');
23040
+ var closeIndex = path.indexOf(']');
23041
+ if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23042
+ // iterate down object tree
23043
+ return read(path.substring(dotIndex + 1), object[path.substring(0, dotIndex)]);
23044
+ }
23045
+ if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23046
+ if (closeIndex < 0) {
23047
+ throw new Error('found [ but no ]');
23065
23048
  }
23066
- var dotIndex = path.indexOf('.');
23067
- if (dotIndex === 0) {
23068
- _x = path.substring(1);
23069
- _x2 = object;
23070
- _again = true;
23071
- dotIndex = undefined;
23072
- continue _function;
23049
+ var key = path.substring(0, openIndex);
23050
+ var index = path.substring(openIndex + 1, closeIndex);
23051
+ if (!index.length) {
23052
+ return object[key];
23073
23053
  }
23074
- var openIndex = path.indexOf('[');
23075
- var closeIndex = path.indexOf(']');
23076
- if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23077
- // iterate down object tree
23078
- _x = path.substring(dotIndex + 1);
23079
- _x2 = object[path.substring(0, dotIndex)];
23080
- _again = true;
23081
- dotIndex = openIndex = closeIndex = undefined;
23082
- continue _function;
23054
+ if (openIndex === 0) {
23055
+ return read(path.substring(closeIndex + 1), object[index]);
23083
23056
  }
23084
- if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23085
- if (closeIndex < 0) {
23086
- throw new Error('found [ but no ]');
23087
- }
23088
- var key = path.substring(0, openIndex);
23089
- var index = path.substring(openIndex + 1, closeIndex);
23090
- if (!index.length) {
23091
- return object[key];
23092
- }
23093
- if (openIndex === 0) {
23094
- _x = path.substring(closeIndex + 1);
23095
- _x2 = object[index];
23096
- _again = true;
23097
- dotIndex = openIndex = closeIndex = key = index = undefined;
23098
- continue _function;
23099
- }
23100
- if (!object[key]) {
23101
- return undefined;
23102
- }
23103
- _x = path.substring(closeIndex + 1);
23104
- _x2 = object[key][index];
23105
- _again = true;
23106
- dotIndex = openIndex = closeIndex = key = index = undefined;
23107
- continue _function;
23057
+ if (!object[key]) {
23058
+ return undefined;
23108
23059
  }
23109
- return object[path];
23060
+ return read(path.substring(closeIndex + 1), object[key][index]);
23110
23061
  }
23062
+ return object[path];
23111
23063
  };
23112
23064
 
23113
- exports['default'] = read;
23114
- module.exports = exports['default'];
23065
+ exports.default = read;
23115
23066
 
23116
23067
  /***/ },
23117
23068
  /* 209 */
23118
23069
  /***/ function(module, exports) {
23119
23070
 
23120
- /**
23121
- * Writes any potentially deep value from an object using dot and array syntax,
23122
- * and returns a new copy of the object.
23123
- */
23124
23071
  'use strict';
23125
23072
 
23126
23073
  exports.__esModule = true;
23127
23074
 
23128
23075
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23129
23076
 
23130
- var write = function write(_x, _x2, _x3) {
23131
- var _again = true;
23132
-
23133
- _function: while (_again) {
23134
- var path = _x,
23135
- value = _x2,
23136
- object = _x3;
23137
-
23138
- var _extends7;
23139
-
23140
- _again = false;
23077
+ /**
23078
+ * Writes any potentially deep value from an object using dot and array syntax,
23079
+ * and returns a new copy of the object.
23080
+ */
23081
+ var write = function write(path, value, object) {
23082
+ var _extends7;
23141
23083
 
23142
- var dotIndex = path.indexOf('.');
23143
- if (dotIndex === 0) {
23144
- _x = path.substring(1);
23145
- _x2 = value;
23146
- _x3 = object;
23147
- _again = true;
23148
- _extends7 = dotIndex = undefined;
23149
- continue _function;
23150
- }
23151
- var openIndex = path.indexOf('[');
23152
- var closeIndex = path.indexOf(']');
23153
- if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23154
- var _extends2;
23084
+ var dotIndex = path.indexOf('.');
23085
+ if (dotIndex === 0) {
23086
+ return write(path.substring(1), value, object);
23087
+ }
23088
+ var openIndex = path.indexOf('[');
23089
+ var closeIndex = path.indexOf(']');
23090
+ if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23091
+ var _extends2;
23155
23092
 
23156
- // is dot notation
23157
- var key = path.substring(0, dotIndex);
23158
- return _extends({}, object, (_extends2 = {}, _extends2[key] = write(path.substring(dotIndex + 1), value, object[key] || {}), _extends2));
23159
- }
23160
- if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23093
+ // is dot notation
23094
+ var key = path.substring(0, dotIndex);
23095
+ return _extends({}, object, (_extends2 = {}, _extends2[key] = write(path.substring(dotIndex + 1), value, object[key] || {}), _extends2));
23096
+ }
23097
+ if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23098
+ var _ret = function () {
23161
23099
  var _extends6;
23162
23100
 
23163
- var _extends4;
23164
-
23165
- var _extends3;
23166
-
23167
- var _extends5;
23101
+ // is array notation
23102
+ if (closeIndex < 0) {
23103
+ throw new Error('found [ but no ]');
23104
+ }
23105
+ var key = path.substring(0, openIndex);
23106
+ var index = path.substring(openIndex + 1, closeIndex);
23107
+ var array = object[key] || [];
23108
+ var rest = path.substring(closeIndex + 1);
23109
+ if (index) {
23110
+ var _extends4;
23168
23111
 
23169
- var _ret = (function () {
23170
- // is array notation
23171
- if (closeIndex < 0) {
23172
- throw new Error('found [ but no ]');
23173
- }
23174
- var key = path.substring(0, openIndex);
23175
- var index = path.substring(openIndex + 1, closeIndex);
23176
- var array = object[key] || [];
23177
- var rest = path.substring(closeIndex + 1);
23178
- if (index) {
23179
- // indexed array
23180
- if (rest.length) {
23181
- // need to keep recursing
23182
- var dest = array[index] || {};
23183
- var arrayCopy = [].concat(array);
23184
- arrayCopy[index] = write(rest, value, dest);
23185
- return {
23186
- v: _extends({}, object || {}, (_extends3 = {}, _extends3[key] = arrayCopy, _extends3))
23187
- };
23188
- }
23189
- var copy = [].concat(array);
23190
- copy[index] = typeof value === 'function' ? value(copy[index]) : value;
23191
- return {
23192
- v: _extends({}, object || {}, (_extends4 = {}, _extends4[key] = copy, _extends4))
23193
- };
23194
- }
23195
- // indexless array
23112
+ // indexed array
23196
23113
  if (rest.length) {
23114
+ var _extends3;
23115
+
23197
23116
  // need to keep recursing
23198
- if ((!array || !array.length) && typeof value === 'function') {
23199
- return {
23200
- v: object
23201
- }; // don't even set a value under [key]
23202
- }
23203
- var arrayCopy = array.map(function (dest) {
23204
- return write(rest, value, dest);
23205
- });
23117
+ var dest = array[index] || {};
23118
+ var arrayCopy = [].concat(array);
23119
+ arrayCopy[index] = write(rest, value, dest);
23206
23120
  return {
23207
- v: _extends({}, object || {}, (_extends5 = {}, _extends5[key] = arrayCopy, _extends5))
23121
+ v: _extends({}, object || {}, (_extends3 = {}, _extends3[key] = arrayCopy, _extends3))
23208
23122
  };
23209
23123
  }
23210
- var result = undefined;
23211
- if (Array.isArray(value)) {
23212
- result = value;
23213
- } else if (object[key]) {
23214
- result = array.map(function (dest) {
23215
- return typeof value === 'function' ? value(dest) : value;
23216
- });
23217
- } else if (typeof value === 'function') {
23124
+ var copy = [].concat(array);
23125
+ copy[index] = typeof value === 'function' ? value(copy[index]) : value;
23126
+ return {
23127
+ v: _extends({}, object || {}, (_extends4 = {}, _extends4[key] = copy, _extends4))
23128
+ };
23129
+ }
23130
+ // indexless array
23131
+ if (rest.length) {
23132
+ var _extends5;
23133
+
23134
+ // need to keep recursing
23135
+ if ((!array || !array.length) && typeof value === 'function') {
23218
23136
  return {
23219
23137
  v: object
23220
23138
  }; // don't even set a value under [key]
23221
- } else {
23222
- result = value;
23223
- }
23139
+ }
23140
+ var _arrayCopy = array.map(function (dest) {
23141
+ return write(rest, value, dest);
23142
+ });
23224
23143
  return {
23225
- v: _extends({}, object || {}, (_extends6 = {}, _extends6[key] = result, _extends6))
23144
+ v: _extends({}, object || {}, (_extends5 = {}, _extends5[key] = _arrayCopy, _extends5))
23226
23145
  };
23227
- })();
23146
+ }
23147
+ var result = void 0;
23148
+ if (Array.isArray(value)) {
23149
+ result = value;
23150
+ } else if (object[key]) {
23151
+ result = array.map(function (dest) {
23152
+ return typeof value === 'function' ? value(dest) : value;
23153
+ });
23154
+ } else if (typeof value === 'function') {
23155
+ return {
23156
+ v: object
23157
+ }; // don't even set a value under [key]
23158
+ } else {
23159
+ result = value;
23160
+ }
23161
+ return {
23162
+ v: _extends({}, object || {}, (_extends6 = {}, _extends6[key] = result, _extends6))
23163
+ };
23164
+ }();
23228
23165
 
23229
- if (typeof _ret === 'object') return _ret.v;
23230
- }
23231
- return _extends({}, object, (_extends7 = {}, _extends7[path] = typeof value === 'function' ? value(object[path]) : value, _extends7));
23166
+ if (typeof _ret === "object") return _ret.v;
23232
23167
  }
23168
+ return _extends({}, object, (_extends7 = {}, _extends7[path] = typeof value === 'function' ? value(object[path]) : value, _extends7));
23233
23169
  };
23234
23170
 
23235
- exports['default'] = write;
23236
- module.exports = exports['default'];
23171
+ exports.default = write;
23237
23172
 
23238
23173
  /***/ },
23239
23174
  /* 210 */
@@ -23265,7 +23200,7 @@
23265
23200
  }
23266
23201
  } else if (Array.isArray(field)) {
23267
23202
  accumulator[key] = field.map(function (arrayField) {
23268
- return _fieldValue.isFieldValue(arrayField) ? arrayField.value : getValuesFromState(arrayField);
23203
+ return (0, _fieldValue.isFieldValue)(arrayField) ? arrayField.value : getValuesFromState(arrayField);
23269
23204
  });
23270
23205
  } else if (typeof field === 'object') {
23271
23206
  var result = getValuesFromState(field);
@@ -23279,8 +23214,7 @@
23279
23214
  }, {});
23280
23215
  };
23281
23216
 
23282
- exports['default'] = getValuesFromState;
23283
- module.exports = exports['default'];
23217
+ exports.default = getValuesFromState;
23284
23218
 
23285
23219
  /***/ },
23286
23220
  /* 211 */
@@ -23320,7 +23254,7 @@
23320
23254
  var _fieldValue = __webpack_require__(211);
23321
23255
 
23322
23256
  var makeEntry = function makeEntry(value) {
23323
- return _fieldValue.makeFieldValue(value === undefined ? {} : { initial: value, value: value });
23257
+ return (0, _fieldValue.makeFieldValue)(value === undefined ? {} : { initial: value, value: value });
23324
23258
  };
23325
23259
 
23326
23260
  /**
@@ -23335,69 +23269,54 @@
23335
23269
  if (!values || !fields.length) {
23336
23270
  return state;
23337
23271
  }
23338
- var initializeField = function initializeField(_x2, _x3, _x4) {
23339
- var _again = true;
23340
-
23341
- _function: while (_again) {
23342
- var path = _x2,
23343
- src = _x3,
23344
- dest = _x4;
23345
- _again = false;
23346
-
23347
- var dotIndex = path.indexOf('.');
23348
- if (dotIndex === 0) {
23349
- _x2 = path.substring(1);
23350
- _x3 = src;
23351
- _x4 = dest;
23352
- _again = true;
23353
- dotIndex = undefined;
23354
- continue _function;
23355
- }
23356
- var openIndex = path.indexOf('[');
23357
- var closeIndex = path.indexOf(']');
23358
- var result = _extends({}, dest) || {};
23359
- if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23360
- // is dot notation
23361
- var key = path.substring(0, dotIndex);
23362
- result[key] = src[key] && initializeField(path.substring(dotIndex + 1), src[key], result[key] || {});
23363
- } else if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23364
- (function () {
23365
- // is array notation
23366
- if (closeIndex < 0) {
23367
- throw new Error('found \'[\' but no \']\': \'' + path + '\'');
23368
- }
23369
- var key = path.substring(0, openIndex);
23370
- var srcArray = src[key];
23371
- var destArray = result[key];
23372
- var rest = path.substring(closeIndex + 1);
23373
- if (Array.isArray(srcArray)) {
23374
- if (rest.length) {
23375
- // need to keep recursing
23376
- result[key] = srcArray.map(function (srcValue, srcIndex) {
23377
- return initializeField(rest, srcValue, destArray && destArray[srcIndex]);
23378
- });
23379
- } else {
23380
- result[key] = srcArray.map(function (srcValue) {
23381
- return makeEntry(srcValue);
23382
- });
23383
- }
23272
+ var initializeField = function initializeField(path, src, dest) {
23273
+ var dotIndex = path.indexOf('.');
23274
+ if (dotIndex === 0) {
23275
+ return initializeField(path.substring(1), src, dest);
23276
+ }
23277
+ var openIndex = path.indexOf('[');
23278
+ var closeIndex = path.indexOf(']');
23279
+ var result = _extends({}, dest) || {};
23280
+ if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) {
23281
+ // is dot notation
23282
+ var key = path.substring(0, dotIndex);
23283
+ result[key] = src[key] && initializeField(path.substring(dotIndex + 1), src[key], result[key] || {});
23284
+ } else if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) {
23285
+ (function () {
23286
+ // is array notation
23287
+ if (closeIndex < 0) {
23288
+ throw new Error('found \'[\' but no \']\': \'' + path + '\'');
23289
+ }
23290
+ var key = path.substring(0, openIndex);
23291
+ var srcArray = src[key];
23292
+ var destArray = result[key];
23293
+ var rest = path.substring(closeIndex + 1);
23294
+ if (Array.isArray(srcArray)) {
23295
+ if (rest.length) {
23296
+ // need to keep recursing
23297
+ result[key] = srcArray.map(function (srcValue, srcIndex) {
23298
+ return initializeField(rest, srcValue, destArray && destArray[srcIndex]);
23299
+ });
23384
23300
  } else {
23385
- result[key] = [];
23301
+ result[key] = srcArray.map(function (srcValue) {
23302
+ return makeEntry(srcValue);
23303
+ });
23386
23304
  }
23387
- })();
23388
- } else {
23389
- result[path] = makeEntry(src && src[path]);
23390
- }
23391
- return result;
23305
+ } else {
23306
+ result[key] = [];
23307
+ }
23308
+ })();
23309
+ } else {
23310
+ result[path] = makeEntry(src && src[path]);
23392
23311
  }
23312
+ return result;
23393
23313
  };
23394
23314
  return fields.reduce(function (accumulator, field) {
23395
23315
  return initializeField(field, values, accumulator);
23396
23316
  }, _extends({}, state));
23397
23317
  };
23398
23318
 
23399
- exports['default'] = initializeState;
23400
- module.exports = exports['default'];
23319
+ exports.default = initializeState;
23401
23320
 
23402
23321
  /***/ },
23403
23322
  /* 213 */
@@ -23410,7 +23329,7 @@
23410
23329
  var _fieldValue = __webpack_require__(211);
23411
23330
 
23412
23331
  var reset = function reset(value) {
23413
- return _fieldValue.makeFieldValue(value === undefined || value && value.initial === undefined ? {} : { initial: value.initial, value: value.initial });
23332
+ return (0, _fieldValue.makeFieldValue)(value === undefined || value && value.initial === undefined ? {} : { initial: value.initial, value: value.initial });
23414
23333
  };
23415
23334
 
23416
23335
  /**
@@ -23421,10 +23340,10 @@
23421
23340
  var value = values[key];
23422
23341
  if (Array.isArray(value)) {
23423
23342
  accumulator[key] = value.map(function (item) {
23424
- return _fieldValue.isFieldValue(item) ? reset(item) : resetState(item);
23343
+ return (0, _fieldValue.isFieldValue)(item) ? reset(item) : resetState(item);
23425
23344
  });
23426
23345
  } else if (value) {
23427
- if (_fieldValue.isFieldValue(value)) {
23346
+ if ((0, _fieldValue.isFieldValue)(value)) {
23428
23347
  accumulator[key] = reset(value);
23429
23348
  } else if (typeof value === 'object' && value !== null) {
23430
23349
  accumulator[key] = resetState(value);
@@ -23436,8 +23355,7 @@
23436
23355
  }, {}) : values;
23437
23356
  };
23438
23357
 
23439
- exports['default'] = resetState;
23440
- module.exports = exports['default'];
23358
+ exports.default = resetState;
23441
23359
 
23442
23360
  /***/ },
23443
23361
  /* 214 */
@@ -23458,93 +23376,77 @@
23458
23376
  /**
23459
23377
  * Sets an error on a field deep in the tree, returning a new copy of the state
23460
23378
  */
23461
- var setErrors = function setErrors(_x, _x2, _x3) {
23462
- var _again = true;
23463
-
23464
- _function: while (_again) {
23465
- var state = _x,
23466
- errors = _x2,
23467
- destKey = _x3;
23468
- _again = false;
23469
-
23470
- var clear = function clear() {
23471
- if (Array.isArray(state)) {
23472
- return state.map(function (stateItem, index) {
23473
- return setErrors(stateItem, errors && errors[index], destKey);
23474
- });
23475
- }
23476
- if (state && typeof state === 'object') {
23477
- var result = Object.keys(state).reduce(function (accumulator, key) {
23478
- var _extends2;
23379
+ var setErrors = function setErrors(state, errors, destKey) {
23380
+ var clear = function clear() {
23381
+ if (Array.isArray(state)) {
23382
+ return state.map(function (stateItem, index) {
23383
+ return setErrors(stateItem, errors && errors[index], destKey);
23384
+ });
23385
+ }
23386
+ if (state && typeof state === 'object') {
23387
+ var result = Object.keys(state).reduce(function (accumulator, key) {
23388
+ var _extends2;
23479
23389
 
23480
- return isMetaKey(key) ? accumulator : _extends({}, accumulator, (_extends2 = {}, _extends2[key] = setErrors(state[key], errors && errors[key], destKey), _extends2));
23481
- }, state);
23482
- if (_fieldValue.isFieldValue(state)) {
23483
- _fieldValue.makeFieldValue(result);
23484
- }
23485
- return result;
23486
- }
23487
- return _fieldValue.makeFieldValue(state);
23488
- };
23489
- if (!errors) {
23490
- if (!state) {
23491
- return state;
23390
+ return isMetaKey(key) ? accumulator : _extends({}, accumulator, (_extends2 = {}, _extends2[key] = setErrors(state[key], errors && errors[key], destKey), _extends2));
23391
+ }, state);
23392
+ if ((0, _fieldValue.isFieldValue)(state)) {
23393
+ (0, _fieldValue.makeFieldValue)(result);
23492
23394
  }
23493
- if (state[destKey]) {
23494
- var copy = _extends({}, state);
23495
- delete copy[destKey];
23496
- return _fieldValue.makeFieldValue(copy);
23497
- }
23498
- return clear();
23395
+ return result;
23499
23396
  }
23500
- if (typeof errors === 'string') {
23501
- var _extends3;
23502
-
23503
- return _fieldValue.makeFieldValue(_extends({}, state, (_extends3 = {}, _extends3[destKey] = errors, _extends3)));
23397
+ return (0, _fieldValue.makeFieldValue)(state);
23398
+ };
23399
+ if (!errors) {
23400
+ if (!state) {
23401
+ return state;
23504
23402
  }
23505
- if (Array.isArray(errors)) {
23506
- if (!state || Array.isArray(state)) {
23507
- var _ret = (function () {
23508
- var copy = (state || []).map(function (stateItem, index) {
23509
- return setErrors(stateItem, errors[index], destKey);
23510
- });
23511
- errors.forEach(function (errorItem, index) {
23512
- return copy[index] = setErrors(copy[index], errorItem, destKey);
23513
- });
23514
- return {
23515
- v: copy
23516
- };
23517
- })();
23518
-
23519
- if (typeof _ret === 'object') return _ret.v;
23520
- }
23521
- _x = state;
23522
- _x2 = errors[0];
23523
- _x3 = destKey;
23524
- _again = true;
23525
- clear = copy = _extends3 = _ret = undefined;
23526
- continue _function;
23527
- // use first error
23403
+ if (state[destKey]) {
23404
+ var copy = _extends({}, state);
23405
+ delete copy[destKey];
23406
+ return (0, _fieldValue.makeFieldValue)(copy);
23528
23407
  }
23529
- if (_fieldValue.isFieldValue(state)) {
23530
- var _extends4;
23408
+ return clear();
23409
+ }
23410
+ if (typeof errors === 'string') {
23411
+ var _extends3;
23531
23412
 
23532
- return _fieldValue.makeFieldValue(_extends({}, state, (_extends4 = {}, _extends4[destKey] = errors, _extends4)));
23533
- }
23534
- var errorKeys = Object.keys(errors);
23535
- if (!errorKeys.length && !state) {
23536
- return state;
23413
+ return (0, _fieldValue.makeFieldValue)(_extends({}, state, (_extends3 = {}, _extends3[destKey] = errors, _extends3)));
23414
+ }
23415
+ if (Array.isArray(errors)) {
23416
+ if (!state || Array.isArray(state)) {
23417
+ var _ret = function () {
23418
+ var copy = (state || []).map(function (stateItem, index) {
23419
+ return setErrors(stateItem, errors[index], destKey);
23420
+ });
23421
+ errors.forEach(function (errorItem, index) {
23422
+ return copy[index] = setErrors(copy[index], errorItem, destKey);
23423
+ });
23424
+ return {
23425
+ v: copy
23426
+ };
23427
+ }();
23428
+
23429
+ if (typeof _ret === "object") return _ret.v;
23537
23430
  }
23538
- return errorKeys.reduce(function (accumulator, key) {
23539
- var _extends5;
23431
+ return setErrors(state, errors[0], destKey); // use first error
23432
+ }
23433
+ if ((0, _fieldValue.isFieldValue)(state)) {
23434
+ var _extends4;
23540
23435
 
23541
- return isMetaKey(key) ? accumulator : _extends({}, accumulator, (_extends5 = {}, _extends5[key] = setErrors(state && state[key], errors[key], destKey), _extends5));
23542
- }, clear() || {});
23436
+ return (0, _fieldValue.makeFieldValue)(_extends({}, state, (_extends4 = {}, _extends4[destKey] = errors, _extends4)));
23543
23437
  }
23438
+ var errorKeys = Object.keys(errors);
23439
+ if (!errorKeys.length && !state) {
23440
+ return state;
23441
+ }
23442
+ return errorKeys.reduce(function (accumulator, key) {
23443
+ var _extends5;
23444
+
23445
+ return isMetaKey(key) ? accumulator : _extends({}, accumulator, (_extends5 = {}, _extends5[key] = setErrors(state && state[key], errors[key], destKey), _extends5));
23446
+ }, clear() || {});
23544
23447
  };
23545
23448
 
23546
- exports['default'] = setErrors;
23547
- module.exports = exports['default'];
23449
+ exports.default = setErrors;
23548
23450
 
23549
23451
  /***/ },
23550
23452
  /* 215 */
@@ -23556,7 +23458,7 @@
23556
23458
 
23557
23459
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23558
23460
 
23559
- exports['default'] = normalizeFields;
23461
+ exports.default = normalizeFields;
23560
23462
 
23561
23463
  var _fieldValue = __webpack_require__(211);
23562
23464
 
@@ -23570,8 +23472,8 @@
23570
23472
  }
23571
23473
 
23572
23474
  var isArray = openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex);
23573
- var key = undefined;
23574
- var nestedPath = undefined;
23475
+ var key = void 0;
23476
+ var nestedPath = void 0;
23575
23477
 
23576
23478
  if (isArray) {
23577
23479
  key = field.substring(0, openIndex);
@@ -23593,7 +23495,7 @@
23593
23495
  function normalizeField(field, fullFieldPath, state, previousState, values, previousValues, normalizers) {
23594
23496
  if (field.isArray) {
23595
23497
  if (field.nestedPath) {
23596
- var _ret = (function () {
23498
+ var _ret = function () {
23597
23499
  var array = state && state[field.key] || [];
23598
23500
  var previousArray = previousState && previousState[field.key] || [];
23599
23501
  var nestedField = extractKey(field.nestedPath);
@@ -23605,14 +23507,15 @@
23605
23507
  return nestedState;
23606
23508
  })
23607
23509
  };
23608
- })();
23510
+ }();
23609
23511
 
23610
- if (typeof _ret === 'object') return _ret.v;
23512
+ if (typeof _ret === "object") return _ret.v;
23611
23513
  }
23612
23514
 
23613
23515
  var _normalizer = normalizers[fullFieldPath];
23614
23516
 
23615
- return _normalizer(state && state[field.key], previousState && previousState[field.key], values, previousValues);
23517
+ var result = _normalizer(state && state[field.key], previousState && previousState[field.key], values, previousValues);
23518
+ return field.isArray ? result && result.map(_fieldValue.makeFieldValue) : result;
23616
23519
  } else if (field.nestedPath) {
23617
23520
  var nestedState = state && state[field.key] || {};
23618
23521
  var nestedField = extractKey(field.nestedPath);
@@ -23627,7 +23530,7 @@
23627
23530
 
23628
23531
  finalField.value = normalizer(finalField.value, previousState && previousState[field.key] && previousState[field.key].value, values, previousValues);
23629
23532
 
23630
- return _fieldValue.makeFieldValue(finalField);
23533
+ return (0, _fieldValue.makeFieldValue)(finalField);
23631
23534
  }
23632
23535
 
23633
23536
  function normalizeFields(normalizers, state, previousState, values, previousValues) {
@@ -23642,8 +23545,6 @@
23642
23545
  return _extends({}, state, newState);
23643
23546
  }
23644
23547
 
23645
- module.exports = exports['default'];
23646
-
23647
23548
  /***/ },
23648
23549
  /* 216 */
23649
23550
  /***/ function(module, exports, __webpack_require__) {
@@ -23654,12 +23555,6 @@
23654
23555
 
23655
23556
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23656
23557
 
23657
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23658
-
23659
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
23660
-
23661
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
23662
-
23663
23558
  var _createReduxFormConnector = __webpack_require__(217);
23664
23559
 
23665
23560
  var _createReduxFormConnector2 = _interopRequireDefault(_createReduxFormConnector);
@@ -23668,13 +23563,21 @@
23668
23563
 
23669
23564
  var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
23670
23565
 
23566
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23567
+
23568
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23569
+
23570
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
23571
+
23572
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
23573
+
23671
23574
  /**
23672
23575
  * The decorator that is the main API to redux-form
23673
23576
  */
23674
23577
  var createReduxForm = function createReduxForm(isReactNative, React, connect) {
23675
23578
  var Component = React.Component;
23676
23579
 
23677
- var reduxFormConnector = _createReduxFormConnector2['default'](isReactNative, React, connect);
23580
+ var reduxFormConnector = (0, _createReduxFormConnector2.default)(isReactNative, React, connect);
23678
23581
  return function (config, mapStateToProps, mapDispatchToProps, mergeProps, options) {
23679
23582
  return function (WrappedComponent) {
23680
23583
  var ReduxFormConnector = reduxFormConnector(WrappedComponent, mapStateToProps, mapDispatchToProps, mergeProps, options);
@@ -23684,29 +23587,33 @@
23684
23587
  destroyOnUnmount: true
23685
23588
  }, config);
23686
23589
 
23687
- var ConnectedForm = (function (_Component) {
23590
+ var ConnectedForm = function (_Component) {
23688
23591
  _inherits(ConnectedForm, _Component);
23689
23592
 
23690
23593
  function ConnectedForm() {
23691
23594
  _classCallCheck(this, ConnectedForm);
23692
23595
 
23693
- _Component.apply(this, arguments);
23596
+ return _possibleConstructorReturn(this, _Component.apply(this, arguments));
23694
23597
  }
23695
23598
 
23696
23599
  ConnectedForm.prototype.render = function render() {
23697
- return React.createElement(ReduxFormConnector, _extends({}, configWithDefaults, this.props));
23600
+ var _this2 = this;
23601
+
23602
+ return React.createElement(ReduxFormConnector, _extends({}, configWithDefaults, this.props, {
23603
+ submitPassback: function submitPassback(submit) {
23604
+ return _this2.submit = submit;
23605
+ } }));
23698
23606
  };
23699
23607
 
23700
23608
  return ConnectedForm;
23701
- })(Component);
23609
+ }(Component);
23702
23610
 
23703
- return _hoistNonReactStatics2['default'](ConnectedForm, WrappedComponent);
23611
+ return (0, _hoistNonReactStatics2.default)(ConnectedForm, WrappedComponent);
23704
23612
  };
23705
23613
  };
23706
23614
  };
23707
23615
 
23708
- exports['default'] = createReduxForm;
23709
- module.exports = exports['default'];
23616
+ exports.default = createReduxForm;
23710
23617
 
23711
23618
  /***/ },
23712
23619
  /* 217 */
@@ -23716,17 +23623,9 @@
23716
23623
 
23717
23624
  exports.__esModule = true;
23718
23625
 
23719
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23720
-
23721
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
23722
-
23723
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
23724
-
23725
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
23726
-
23727
- var _reactLazyCacheNoGetters = __webpack_require__(218);
23626
+ var _noGetters = __webpack_require__(218);
23728
23627
 
23729
- var _reactLazyCacheNoGetters2 = _interopRequireDefault(_reactLazyCacheNoGetters);
23628
+ var _noGetters2 = _interopRequireDefault(_noGetters);
23730
23629
 
23731
23630
  var _getDisplayName = __webpack_require__(223);
23732
23631
 
@@ -23736,6 +23635,16 @@
23736
23635
 
23737
23636
  var _createHigherOrderComponent2 = _interopRequireDefault(_createHigherOrderComponent);
23738
23637
 
23638
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23639
+
23640
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
23641
+
23642
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23643
+
23644
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
23645
+
23646
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
23647
+
23739
23648
  /**
23740
23649
  * This component tracks props that affect how the form is mounted to the store. Normally these should not change,
23741
23650
  * but if they do, the connected components below it need to be redefined.
@@ -23745,21 +23654,23 @@
23745
23654
  var Component = React.Component;
23746
23655
  var PropTypes = React.PropTypes;
23747
23656
 
23748
- var ReduxFormConnector = (function (_Component) {
23657
+ var ReduxFormConnector = function (_Component) {
23749
23658
  _inherits(ReduxFormConnector, _Component);
23750
23659
 
23751
23660
  function ReduxFormConnector(props) {
23752
23661
  _classCallCheck(this, ReduxFormConnector);
23753
23662
 
23754
- _Component.call(this, props);
23755
- this.cache = new _reactLazyCacheNoGetters2['default'](this, {
23663
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props));
23664
+
23665
+ _this.cache = new _noGetters2.default(_this, {
23756
23666
  ReduxForm: {
23757
23667
  params: [
23758
23668
  // props that effect how redux-form connects to the redux store
23759
23669
  'reduxMountPoint', 'form', 'formKey', 'getFormState'],
23760
- fn: _createHigherOrderComponent2['default'](props, isReactNative, React, connect, WrappedComponent, mapStateToProps, mapDispatchToProps, mergeProps, options)
23670
+ fn: (0, _createHigherOrderComponent2.default)(props, isReactNative, React, connect, WrappedComponent, mapStateToProps, mapDispatchToProps, mergeProps, options)
23761
23671
  }
23762
23672
  });
23673
+ return _this;
23763
23674
  }
23764
23675
 
23765
23676
  ReduxFormConnector.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
@@ -23777,16 +23688,16 @@
23777
23688
  var touchOnBlur = _props.touchOnBlur;
23778
23689
  var touchOnChange = _props.touchOnChange;
23779
23690
 
23780
- var passableProps = _objectWithoutProperties(_props, ['reduxMountPoint', 'destroyOnUnmount', 'form', 'getFormState', 'touchOnBlur', 'touchOnChange']);
23691
+ var passableProps = _objectWithoutProperties(_props, ['reduxMountPoint', 'destroyOnUnmount', 'form', 'getFormState', 'touchOnBlur', 'touchOnChange']); // eslint-disable-line no-redeclare
23692
+
23781
23693
 
23782
- // eslint-disable-line no-redeclare
23783
23694
  return React.createElement(ReduxForm, passableProps);
23784
23695
  };
23785
23696
 
23786
23697
  return ReduxFormConnector;
23787
- })(Component);
23698
+ }(Component);
23788
23699
 
23789
- ReduxFormConnector.displayName = 'ReduxFormConnector(' + _getDisplayName2['default'](WrappedComponent) + ')';
23700
+ ReduxFormConnector.displayName = 'ReduxFormConnector(' + (0, _getDisplayName2.default)(WrappedComponent) + ')';
23790
23701
  ReduxFormConnector.WrappedComponent = WrappedComponent;
23791
23702
  ReduxFormConnector.propTypes = {
23792
23703
  destroyOnUnmount: PropTypes.bool,
@@ -23807,8 +23718,7 @@
23807
23718
  };
23808
23719
  };
23809
23720
 
23810
- exports['default'] = createReduxFormConnector;
23811
- module.exports = exports['default'];
23721
+ exports.default = createReduxFormConnector;
23812
23722
 
23813
23723
  /***/ },
23814
23724
  /* 218 */
@@ -24060,14 +23970,11 @@
24060
23970
  'use strict';
24061
23971
 
24062
23972
  exports.__esModule = true;
24063
- exports['default'] = getDisplayName;
24064
-
23973
+ exports.default = getDisplayName;
24065
23974
  function getDisplayName(Comp) {
24066
23975
  return Comp.displayName || Comp.name || 'Component';
24067
23976
  }
24068
23977
 
24069
- module.exports = exports['default'];
24070
-
24071
23978
  /***/ },
24072
23979
  /* 224 */
24073
23980
  /***/ function(module, exports, __webpack_require__) {
@@ -24078,16 +23985,6 @@
24078
23985
 
24079
23986
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24080
23987
 
24081
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24082
-
24083
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
24084
-
24085
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
24086
-
24087
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
24088
-
24089
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
24090
-
24091
23988
  var _actions = __webpack_require__(225);
24092
23989
 
24093
23990
  var importedActions = _interopRequireWildcard(_actions);
@@ -24126,13 +24023,13 @@
24126
24023
 
24127
24024
  var _asyncValidation2 = _interopRequireDefault(_asyncValidation);
24128
24025
 
24129
- var _eventsSilenceEvents = __webpack_require__(245);
24026
+ var _silenceEvents = __webpack_require__(245);
24130
24027
 
24131
- var _eventsSilenceEvents2 = _interopRequireDefault(_eventsSilenceEvents);
24028
+ var _silenceEvents2 = _interopRequireDefault(_silenceEvents);
24132
24029
 
24133
- var _eventsSilenceEvent = __webpack_require__(246);
24030
+ var _silenceEvent = __webpack_require__(246);
24134
24031
 
24135
- var _eventsSilenceEvent2 = _interopRequireDefault(_eventsSilenceEvent);
24032
+ var _silenceEvent2 = _interopRequireDefault(_silenceEvent);
24136
24033
 
24137
24034
  var _wrapMapDispatchToProps = __webpack_require__(247);
24138
24035
 
@@ -24142,6 +24039,18 @@
24142
24039
 
24143
24040
  var _wrapMapStateToProps2 = _interopRequireDefault(_wrapMapStateToProps);
24144
24041
 
24042
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24043
+
24044
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
24045
+
24046
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
24047
+
24048
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24049
+
24050
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
24051
+
24052
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
24053
+
24145
24054
  /**
24146
24055
  * Creates a HOC that knows how to create redux-connected sub-components.
24147
24056
  */
@@ -24150,17 +24059,25 @@
24150
24059
  var PropTypes = React.PropTypes;
24151
24060
 
24152
24061
  return function (reduxMountPoint, formName, formKey, getFormState) {
24153
- var ReduxForm = (function (_Component) {
24062
+ var ReduxForm = function (_Component) {
24154
24063
  _inherits(ReduxForm, _Component);
24155
24064
 
24156
24065
  function ReduxForm(props) {
24157
24066
  _classCallCheck(this, ReduxForm);
24158
24067
 
24159
- _Component.call(this, props);
24160
24068
  // bind functions
24161
- this.asyncValidate = this.asyncValidate.bind(this);
24162
- this.handleSubmit = this.handleSubmit.bind(this);
24163
- this.fields = _readFields2['default'](props, {}, {}, this.asyncValidate, isReactNative);
24069
+
24070
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props));
24071
+
24072
+ _this.asyncValidate = _this.asyncValidate.bind(_this);
24073
+ _this.handleSubmit = _this.handleSubmit.bind(_this);
24074
+ _this.fields = (0, _readFields2.default)(props, {}, {}, _this.asyncValidate, isReactNative);
24075
+ var submitPassback = _this.props.submitPassback;
24076
+
24077
+ submitPassback(function () {
24078
+ return _this.handleSubmit();
24079
+ }); // wrapped in function to disallow params
24080
+ return _this;
24164
24081
  }
24165
24082
 
24166
24083
  ReduxForm.prototype.componentWillMount = function componentWillMount() {
@@ -24176,10 +24093,10 @@
24176
24093
  };
24177
24094
 
24178
24095
  ReduxForm.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
24179
- if (!_deepEqual2['default'](this.props.fields, nextProps.fields) || !_deepEqual2['default'](this.props.form, nextProps.form, { strict: true })) {
24180
- this.fields = _readFields2['default'](nextProps, this.props, this.fields, this.asyncValidate, isReactNative);
24096
+ if (!(0, _deepEqual2.default)(this.props.fields, nextProps.fields) || !(0, _deepEqual2.default)(this.props.form, nextProps.form, { strict: true })) {
24097
+ this.fields = (0, _readFields2.default)(nextProps, this.props, this.fields, this.asyncValidate, isReactNative);
24181
24098
  }
24182
- if (!_deepEqual2['default'](this.props.initialValues, nextProps.initialValues)) {
24099
+ if (!(0, _deepEqual2.default)(this.props.initialValues, nextProps.initialValues)) {
24183
24100
  this.props.initialize(nextProps.initialValues, nextProps.fields);
24184
24101
  }
24185
24102
  };
@@ -24191,7 +24108,7 @@
24191
24108
  };
24192
24109
 
24193
24110
  ReduxForm.prototype.asyncValidate = function asyncValidate(name, value) {
24194
- var _this = this;
24111
+ var _this2 = this;
24195
24112
 
24196
24113
  var _props2 = this.props;
24197
24114
  var asyncValidate = _props2.asyncValidate;
@@ -24204,34 +24121,34 @@
24204
24121
 
24205
24122
  var isSubmitting = !name;
24206
24123
  if (asyncValidate) {
24207
- var _ret = (function () {
24208
- var values = _getValues2['default'](fields, form);
24124
+ var _ret = function () {
24125
+ var values = (0, _getValues2.default)(fields, form);
24209
24126
  if (name) {
24210
24127
  values[name] = value;
24211
24128
  }
24212
- var syncErrors = validate(values, _this.props);
24213
- var allPristine = _this.fields._meta.allPristine;
24129
+ var syncErrors = validate(values, _this2.props);
24130
+ var allPristine = _this2.fields._meta.allPristine;
24214
24131
 
24215
24132
  var initialized = form._initialized;
24216
24133
 
24217
24134
  // if blur validating, only run async validate if sync validation passes
24218
24135
  // and submitting (not blur validation) or form is dirty or form was never initialized
24219
- var syncValidationPasses = isSubmitting || _isValid2['default'](syncErrors[name]);
24136
+ var syncValidationPasses = isSubmitting || (0, _isValid2.default)(syncErrors[name]);
24220
24137
  if (syncValidationPasses && (isSubmitting || !allPristine || !initialized)) {
24221
24138
  return {
24222
- v: _asyncValidation2['default'](function () {
24223
- return asyncValidate(values, dispatch, _this.props);
24139
+ v: (0, _asyncValidation2.default)(function () {
24140
+ return asyncValidate(values, dispatch, _this2.props);
24224
24141
  }, startAsyncValidation, stopAsyncValidation, name)
24225
24142
  };
24226
24143
  }
24227
- })();
24144
+ }();
24228
24145
 
24229
- if (typeof _ret === 'object') return _ret.v;
24146
+ if (typeof _ret === "object") return _ret.v;
24230
24147
  }
24231
24148
  };
24232
24149
 
24233
24150
  ReduxForm.prototype.handleSubmit = function handleSubmit(submitOrEvent) {
24234
- var _this2 = this;
24151
+ var _this3 = this;
24235
24152
 
24236
24153
  var _props3 = this.props;
24237
24154
  var onSubmit = _props3.onSubmit;
@@ -24244,18 +24161,18 @@
24244
24161
  }
24245
24162
  return submit;
24246
24163
  };
24247
- return !submitOrEvent || _eventsSilenceEvent2['default'](submitOrEvent) ?
24164
+ return !submitOrEvent || (0, _silenceEvent2.default)(submitOrEvent) ?
24248
24165
  // submitOrEvent is an event: fire submit
24249
- _handleSubmit3['default'](check(onSubmit), _getValues2['default'](fields, form), this.props, this.asyncValidate) :
24166
+ (0, _handleSubmit3.default)(check(onSubmit), (0, _getValues2.default)(fields, form), this.props, this.asyncValidate) :
24250
24167
  // submitOrEvent is the submit function: return deferred submit thunk
24251
- _eventsSilenceEvents2['default'](function () {
24252
- return _handleSubmit3['default'](check(submitOrEvent), _getValues2['default'](fields, form), _this2.props, _this2.asyncValidate);
24168
+ (0, _silenceEvents2.default)(function () {
24169
+ return (0, _handleSubmit3.default)(check(submitOrEvent), (0, _getValues2.default)(fields, form), _this3.props, _this3.asyncValidate);
24253
24170
  });
24254
24171
  };
24255
24172
 
24256
24173
  ReduxForm.prototype.render = function render() {
24257
- var _ref,
24258
- _this3 = this;
24174
+ var _this4 = this,
24175
+ _ref;
24259
24176
 
24260
24177
  var allFields = this.fields;
24261
24178
  var _props4 = this.props;
@@ -24284,9 +24201,9 @@
24284
24201
  var untouch = _props4.untouch;
24285
24202
  var validate = _props4.validate;
24286
24203
 
24287
- var passableProps = _objectWithoutProperties(_props4, ['addArrayValue', 'asyncBlurFields', 'blur', 'change', 'destroy', 'focus', 'fields', 'form', 'initialValues', 'initialize', 'onSubmit', 'propNamespace', 'reset', 'removeArrayValue', 'returnRejectedSubmitPromise', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitFailed', 'swapArrayValues', 'touch', 'untouch', 'validate']);
24204
+ var passableProps = _objectWithoutProperties(_props4, ['addArrayValue', 'asyncBlurFields', 'blur', 'change', 'destroy', 'focus', 'fields', 'form', 'initialValues', 'initialize', 'onSubmit', 'propNamespace', 'reset', 'removeArrayValue', 'returnRejectedSubmitPromise', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitFailed', 'swapArrayValues', 'touch', 'untouch', 'validate']); // eslint-disable-line no-redeclare
24205
+
24288
24206
 
24289
- // eslint-disable-line no-redeclare
24290
24207
  var _allFields$_meta = allFields._meta;
24291
24208
  var allPristine = _allFields$_meta.allPristine;
24292
24209
  var allValid = _allFields$_meta.allValid;
@@ -24294,6 +24211,7 @@
24294
24211
  var formError = _allFields$_meta.formError;
24295
24212
  var values = _allFields$_meta.values;
24296
24213
 
24214
+
24297
24215
  var props = {
24298
24216
  // State:
24299
24217
  active: form._active,
@@ -24311,26 +24229,26 @@
24311
24229
  values: values,
24312
24230
 
24313
24231
  // Actions:
24314
- asyncValidate: _eventsSilenceEvents2['default'](function () {
24315
- return _this3.asyncValidate();
24232
+ asyncValidate: (0, _silenceEvents2.default)(function () {
24233
+ return _this4.asyncValidate();
24316
24234
  }),
24317
24235
  // ^ doesn't just pass this.asyncValidate to disallow values passing
24318
- destroyForm: _eventsSilenceEvents2['default'](destroy),
24236
+ destroyForm: (0, _silenceEvents2.default)(destroy),
24319
24237
  handleSubmit: this.handleSubmit,
24320
- initializeForm: _eventsSilenceEvents2['default'](function (initValues) {
24238
+ initializeForm: (0, _silenceEvents2.default)(function (initValues) {
24321
24239
  return initialize(initValues, fields);
24322
24240
  }),
24323
- resetForm: _eventsSilenceEvents2['default'](reset),
24324
- touch: _eventsSilenceEvents2['default'](function () {
24241
+ resetForm: (0, _silenceEvents2.default)(reset),
24242
+ touch: (0, _silenceEvents2.default)(function () {
24325
24243
  return touch.apply(undefined, arguments);
24326
24244
  }),
24327
- touchAll: _eventsSilenceEvents2['default'](function () {
24245
+ touchAll: (0, _silenceEvents2.default)(function () {
24328
24246
  return touch.apply(undefined, fields);
24329
24247
  }),
24330
- untouch: _eventsSilenceEvents2['default'](function () {
24248
+ untouch: (0, _silenceEvents2.default)(function () {
24331
24249
  return untouch.apply(undefined, arguments);
24332
24250
  }),
24333
- untouchAll: _eventsSilenceEvents2['default'](function () {
24251
+ untouchAll: (0, _silenceEvents2.default)(function () {
24334
24252
  return untouch.apply(undefined, fields);
24335
24253
  })
24336
24254
  };
@@ -24339,9 +24257,9 @@
24339
24257
  };
24340
24258
 
24341
24259
  return ReduxForm;
24342
- })(Component);
24260
+ }(Component);
24343
24261
 
24344
- ReduxForm.displayName = 'ReduxForm(' + _getDisplayName2['default'](WrappedComponent) + ')';
24262
+ ReduxForm.displayName = 'ReduxForm(' + (0, _getDisplayName2.default)(WrappedComponent) + ')';
24345
24263
  ReduxForm.WrappedComponent = WrappedComponent;
24346
24264
  ReduxForm.propTypes = {
24347
24265
  // props:
@@ -24355,6 +24273,7 @@
24355
24273
  propNamespace: PropTypes.string,
24356
24274
  readonly: PropTypes.bool,
24357
24275
  returnRejectedSubmitPromise: PropTypes.bool,
24276
+ submitPassback: PropTypes.func.isRequired,
24358
24277
  validate: PropTypes.func,
24359
24278
 
24360
24279
  // actions:
@@ -24387,36 +24306,37 @@
24387
24306
 
24388
24307
  // bind touch flags to blur and change
24389
24308
  var unboundActions = _extends({}, importedActions, {
24390
- blur: _bindActionData2['default'](importedActions.blur, {
24309
+ blur: (0, _bindActionData2.default)(importedActions.blur, {
24391
24310
  touch: !!config.touchOnBlur
24392
24311
  }),
24393
- change: _bindActionData2['default'](importedActions.change, {
24312
+ change: (0, _bindActionData2.default)(importedActions.change, {
24394
24313
  touch: !!config.touchOnChange
24395
24314
  })
24396
24315
  });
24397
24316
 
24398
24317
  // make redux connector with or without form key
24399
- var decorate = formKey !== undefined && formKey !== null ? connect(_wrapMapStateToProps2['default'](mapStateToProps, function (state) {
24318
+ var decorate = formKey !== undefined && formKey !== null ? connect((0, _wrapMapStateToProps2.default)(mapStateToProps, function (state) {
24400
24319
  var formState = getFormState(state, reduxMountPoint);
24401
24320
  if (!formState) {
24402
24321
  throw new Error('You need to mount the redux-form reducer at "' + reduxMountPoint + '"');
24403
24322
  }
24404
24323
  return formState && formState[formName] && formState[formName][formKey];
24405
- }), _wrapMapDispatchToProps2['default'](mapDispatchToProps, _bindActionData2['default'](unboundActions, { form: formName, key: formKey })), mergeProps, options) : connect(_wrapMapStateToProps2['default'](mapStateToProps, function (state) {
24324
+ }), (0, _wrapMapDispatchToProps2.default)(mapDispatchToProps, (0, _bindActionData2.default)(unboundActions, {
24325
+ form: formName,
24326
+ key: formKey
24327
+ })), mergeProps, options) : connect((0, _wrapMapStateToProps2.default)(mapStateToProps, function (state) {
24406
24328
  var formState = getFormState(state, reduxMountPoint);
24407
24329
  if (!formState) {
24408
24330
  throw new Error('You need to mount the redux-form reducer at "' + reduxMountPoint + '"');
24409
24331
  }
24410
24332
  return formState && formState[formName];
24411
- }), _wrapMapDispatchToProps2['default'](mapDispatchToProps, _bindActionData2['default'](unboundActions, { form: formName })), mergeProps, options);
24333
+ }), (0, _wrapMapDispatchToProps2.default)(mapDispatchToProps, (0, _bindActionData2.default)(unboundActions, { form: formName })), mergeProps, options);
24412
24334
 
24413
24335
  return decorate(ReduxForm);
24414
24336
  };
24415
24337
  };
24416
24338
 
24417
- exports['default'] = createHigherOrderComponent;
24418
- module.exports = exports['default'];
24419
- // contains dispatch
24339
+ exports.default = createHigherOrderComponent;
24420
24340
 
24421
24341
  /***/ },
24422
24342
  /* 225 */
@@ -24425,83 +24345,70 @@
24425
24345
  'use strict';
24426
24346
 
24427
24347
  exports.__esModule = true;
24348
+ exports.untouch = exports.touch = exports.swapArrayValues = exports.submitFailed = exports.stopSubmit = exports.stopAsyncValidation = exports.startSubmit = exports.startAsyncValidation = exports.reset = exports.removeArrayValue = exports.initialize = exports.focus = exports.destroy = exports.change = exports.blur = exports.addArrayValue = undefined;
24428
24349
 
24429
24350
  var _actionTypes = __webpack_require__(206);
24430
24351
 
24431
- var addArrayValue = function addArrayValue(path, value, index, fields) {
24352
+ var addArrayValue = exports.addArrayValue = function addArrayValue(path, value, index, fields) {
24432
24353
  return { type: _actionTypes.ADD_ARRAY_VALUE, path: path, value: value, index: index, fields: fields };
24433
24354
  };
24434
24355
 
24435
- exports.addArrayValue = addArrayValue;
24436
- var blur = function blur(field, value) {
24356
+ var blur = exports.blur = function blur(field, value) {
24437
24357
  return { type: _actionTypes.BLUR, field: field, value: value };
24438
24358
  };
24439
24359
 
24440
- exports.blur = blur;
24441
- var change = function change(field, value) {
24360
+ var change = exports.change = function change(field, value) {
24442
24361
  return { type: _actionTypes.CHANGE, field: field, value: value };
24443
24362
  };
24444
24363
 
24445
- exports.change = change;
24446
- var destroy = function destroy() {
24364
+ var destroy = exports.destroy = function destroy() {
24447
24365
  return { type: _actionTypes.DESTROY };
24448
24366
  };
24449
24367
 
24450
- exports.destroy = destroy;
24451
- var focus = function focus(field) {
24368
+ var focus = exports.focus = function focus(field) {
24452
24369
  return { type: _actionTypes.FOCUS, field: field };
24453
24370
  };
24454
24371
 
24455
- exports.focus = focus;
24456
- var initialize = function initialize(data, fields) {
24372
+ var initialize = exports.initialize = function initialize(data, fields) {
24457
24373
  if (!Array.isArray(fields)) {
24458
24374
  throw new Error('must provide fields array to initialize() action creator');
24459
24375
  }
24460
24376
  return { type: _actionTypes.INITIALIZE, data: data, fields: fields };
24461
24377
  };
24462
24378
 
24463
- exports.initialize = initialize;
24464
- var removeArrayValue = function removeArrayValue(path, index) {
24379
+ var removeArrayValue = exports.removeArrayValue = function removeArrayValue(path, index) {
24465
24380
  return { type: _actionTypes.REMOVE_ARRAY_VALUE, path: path, index: index };
24466
24381
  };
24467
24382
 
24468
- exports.removeArrayValue = removeArrayValue;
24469
- var reset = function reset() {
24383
+ var reset = exports.reset = function reset() {
24470
24384
  return { type: _actionTypes.RESET };
24471
24385
  };
24472
24386
 
24473
- exports.reset = reset;
24474
- var startAsyncValidation = function startAsyncValidation(field) {
24387
+ var startAsyncValidation = exports.startAsyncValidation = function startAsyncValidation(field) {
24475
24388
  return { type: _actionTypes.START_ASYNC_VALIDATION, field: field };
24476
24389
  };
24477
24390
 
24478
- exports.startAsyncValidation = startAsyncValidation;
24479
- var startSubmit = function startSubmit() {
24391
+ var startSubmit = exports.startSubmit = function startSubmit() {
24480
24392
  return { type: _actionTypes.START_SUBMIT };
24481
24393
  };
24482
24394
 
24483
- exports.startSubmit = startSubmit;
24484
- var stopAsyncValidation = function stopAsyncValidation(errors) {
24395
+ var stopAsyncValidation = exports.stopAsyncValidation = function stopAsyncValidation(errors) {
24485
24396
  return { type: _actionTypes.STOP_ASYNC_VALIDATION, errors: errors };
24486
24397
  };
24487
24398
 
24488
- exports.stopAsyncValidation = stopAsyncValidation;
24489
- var stopSubmit = function stopSubmit(errors) {
24399
+ var stopSubmit = exports.stopSubmit = function stopSubmit(errors) {
24490
24400
  return { type: _actionTypes.STOP_SUBMIT, errors: errors };
24491
24401
  };
24492
24402
 
24493
- exports.stopSubmit = stopSubmit;
24494
- var submitFailed = function submitFailed() {
24403
+ var submitFailed = exports.submitFailed = function submitFailed() {
24495
24404
  return { type: _actionTypes.SUBMIT_FAILED };
24496
24405
  };
24497
24406
 
24498
- exports.submitFailed = submitFailed;
24499
- var swapArrayValues = function swapArrayValues(path, indexA, indexB) {
24407
+ var swapArrayValues = exports.swapArrayValues = function swapArrayValues(path, indexA, indexB) {
24500
24408
  return { type: _actionTypes.SWAP_ARRAY_VALUES, path: path, indexA: indexA, indexB: indexB };
24501
24409
  };
24502
24410
 
24503
- exports.swapArrayValues = swapArrayValues;
24504
- var touch = function touch() {
24411
+ var touch = exports.touch = function touch() {
24505
24412
  for (var _len = arguments.length, fields = Array(_len), _key = 0; _key < _len; _key++) {
24506
24413
  fields[_key] = arguments[_key];
24507
24414
  }
@@ -24509,15 +24416,13 @@
24509
24416
  return { type: _actionTypes.TOUCH, fields: fields };
24510
24417
  };
24511
24418
 
24512
- exports.touch = touch;
24513
- var untouch = function untouch() {
24419
+ var untouch = exports.untouch = function untouch() {
24514
24420
  for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
24515
24421
  fields[_key2] = arguments[_key2];
24516
24422
  }
24517
24423
 
24518
24424
  return { type: _actionTypes.UNTOUCH, fields: fields };
24519
24425
  };
24520
- exports.untouch = untouch;
24521
24426
 
24522
24427
  /***/ },
24523
24428
  /* 226 */
@@ -24529,18 +24434,17 @@
24529
24434
 
24530
24435
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24531
24436
 
24532
- exports['default'] = bindActionData;
24533
-
24534
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24437
+ exports.default = bindActionData;
24535
24438
 
24536
24439
  var _mapValues = __webpack_require__(207);
24537
24440
 
24538
24441
  var _mapValues2 = _interopRequireDefault(_mapValues);
24539
24442
 
24443
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24444
+
24540
24445
  /**
24541
24446
  * Adds additional properties to the results of the function or map of functions passed
24542
24447
  */
24543
-
24544
24448
  function bindActionData(action, data) {
24545
24449
  if (typeof action === 'function') {
24546
24450
  return function () {
@@ -24548,15 +24452,13 @@
24548
24452
  };
24549
24453
  }
24550
24454
  if (typeof action === 'object') {
24551
- return _mapValues2['default'](action, function (value) {
24455
+ return (0, _mapValues2.default)(action, function (value) {
24552
24456
  return bindActionData(value, data);
24553
24457
  });
24554
24458
  }
24555
24459
  return action;
24556
24460
  }
24557
24461
 
24558
- module.exports = exports['default'];
24559
-
24560
24462
  /***/ },
24561
24463
  /* 227 */
24562
24464
  /***/ function(module, exports) {
@@ -24592,7 +24494,7 @@
24592
24494
  });
24593
24495
  } else {
24594
24496
  dest[key] = array.map(function (item) {
24595
- return item.value;
24497
+ return item && item.value;
24596
24498
  });
24597
24499
  }
24598
24500
  })();
@@ -24616,8 +24518,7 @@
24616
24518
  }, {});
24617
24519
  };
24618
24520
 
24619
- exports['default'] = getValues;
24620
- module.exports = exports['default'];
24521
+ exports.default = getValues;
24621
24522
 
24622
24523
  /***/ },
24623
24524
  /* 228 */
@@ -24626,8 +24527,7 @@
24626
24527
  'use strict';
24627
24528
 
24628
24529
  exports.__esModule = true;
24629
- exports['default'] = isValid;
24630
-
24530
+ exports.default = isValid;
24631
24531
  function isValid(error) {
24632
24532
  if (Array.isArray(error)) {
24633
24533
  return error.reduce(function (valid, errorValue) {
@@ -24642,8 +24542,6 @@
24642
24542
  return !error;
24643
24543
  }
24644
24544
 
24645
- module.exports = exports['default'];
24646
-
24647
24545
  /***/ },
24648
24546
  /* 229 */
24649
24547
  /***/ function(module, exports, __webpack_require__) {
@@ -24654,8 +24552,6 @@
24654
24552
 
24655
24553
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24656
24554
 
24657
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24658
-
24659
24555
  var _readField = __webpack_require__(230);
24660
24556
 
24661
24557
  var _readField2 = _interopRequireDefault(_readField);
@@ -24672,6 +24568,8 @@
24672
24568
 
24673
24569
  var _removeField2 = _interopRequireDefault(_removeField);
24674
24570
 
24571
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24572
+
24675
24573
  /**
24676
24574
  * Reads props and generates (or updates) field structure
24677
24575
  */
@@ -24681,7 +24579,7 @@
24681
24579
  var validate = props.validate;
24682
24580
 
24683
24581
  var previousFields = previousProps.fields;
24684
- var values = _getValues2['default'](fields, form);
24582
+ var values = (0, _getValues2.default)(fields, form);
24685
24583
  var syncErrors = validate(values, props);
24686
24584
  var errors = {};
24687
24585
  var formError = syncErrors._error || form._error;
@@ -24689,7 +24587,7 @@
24689
24587
  var allPristine = true;
24690
24588
  var tally = function tally(field) {
24691
24589
  if (field.error) {
24692
- errors = _write2['default'](field.name, field.error, errors);
24590
+ errors = (0, _write2.default)(field.name, field.error, errors);
24693
24591
  allValid = false;
24694
24592
  }
24695
24593
  if (field.dirty) {
@@ -24697,10 +24595,10 @@
24697
24595
  }
24698
24596
  };
24699
24597
  var fieldObjects = previousFields ? previousFields.reduce(function (accumulator, previousField) {
24700
- return ~fields.indexOf(previousField) ? accumulator : _removeField2['default'](accumulator, previousField);
24598
+ return ~fields.indexOf(previousField) ? accumulator : (0, _removeField2.default)(accumulator, previousField);
24701
24599
  }, _extends({}, myFields)) : _extends({}, myFields);
24702
24600
  fields.forEach(function (name) {
24703
- _readField2['default'](form, name, undefined, fieldObjects, syncErrors, asyncValidate, isReactNative, props, tally);
24601
+ (0, _readField2.default)(form, name, undefined, fieldObjects, syncErrors, asyncValidate, isReactNative, props, tally);
24704
24602
  });
24705
24603
  Object.defineProperty(fieldObjects, '_meta', {
24706
24604
  value: {
@@ -24713,8 +24611,7 @@
24713
24611
  });
24714
24612
  return fieldObjects;
24715
24613
  };
24716
- exports['default'] = readFields;
24717
- module.exports = exports['default'];
24614
+ exports.default = readFields;
24718
24615
 
24719
24616
  /***/ },
24720
24617
  /* 230 */
@@ -24724,27 +24621,27 @@
24724
24621
 
24725
24622
  exports.__esModule = true;
24726
24623
 
24727
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24624
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24728
24625
 
24729
- var _eventsCreateOnBlur = __webpack_require__(231);
24626
+ var _createOnBlur = __webpack_require__(231);
24730
24627
 
24731
- var _eventsCreateOnBlur2 = _interopRequireDefault(_eventsCreateOnBlur);
24628
+ var _createOnBlur2 = _interopRequireDefault(_createOnBlur);
24732
24629
 
24733
- var _eventsCreateOnChange = __webpack_require__(234);
24630
+ var _createOnChange = __webpack_require__(234);
24734
24631
 
24735
- var _eventsCreateOnChange2 = _interopRequireDefault(_eventsCreateOnChange);
24632
+ var _createOnChange2 = _interopRequireDefault(_createOnChange);
24736
24633
 
24737
- var _eventsCreateOnDragStart = __webpack_require__(235);
24634
+ var _createOnDragStart = __webpack_require__(235);
24738
24635
 
24739
- var _eventsCreateOnDragStart2 = _interopRequireDefault(_eventsCreateOnDragStart);
24636
+ var _createOnDragStart2 = _interopRequireDefault(_createOnDragStart);
24740
24637
 
24741
- var _eventsCreateOnDrop = __webpack_require__(236);
24638
+ var _createOnDrop = __webpack_require__(236);
24742
24639
 
24743
- var _eventsCreateOnDrop2 = _interopRequireDefault(_eventsCreateOnDrop);
24640
+ var _createOnDrop2 = _interopRequireDefault(_createOnDrop);
24744
24641
 
24745
- var _eventsCreateOnFocus = __webpack_require__(237);
24642
+ var _createOnFocus = __webpack_require__(237);
24746
24643
 
24747
- var _eventsCreateOnFocus2 = _interopRequireDefault(_eventsCreateOnFocus);
24644
+ var _createOnFocus2 = _interopRequireDefault(_createOnFocus);
24748
24645
 
24749
24646
  var _silencePromise = __webpack_require__(238);
24750
24647
 
@@ -24758,6 +24655,8 @@
24758
24655
 
24759
24656
  var _updateField2 = _interopRequireDefault(_updateField);
24760
24657
 
24658
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24659
+
24761
24660
  function getSuffix(input, closeIndex) {
24762
24661
  var suffix = input.substring(closeIndex + 1);
24763
24662
  if (suffix[0] === '.') {
@@ -24766,155 +24665,165 @@
24766
24665
  return suffix;
24767
24666
  }
24768
24667
 
24769
- var readField = function readField(_x3, _x4, _x5, _x6, _x7, _x8, _x9, _x10) {
24770
- var _arguments = arguments;
24771
- var _again = true;
24668
+ var getNextKey = function getNextKey(path) {
24669
+ var dotIndex = path.indexOf('.');
24670
+ var openIndex = path.indexOf('[');
24671
+ if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
24672
+ return path.substring(0, openIndex);
24673
+ }
24674
+ return dotIndex > 0 ? path.substring(0, dotIndex) : path;
24675
+ };
24772
24676
 
24773
- _function: while (_again) {
24774
- var state = _x3,
24775
- fieldName = _x4,
24776
- pathToHere = _x5,
24777
- fields = _x6,
24778
- syncErrors = _x7,
24779
- asyncValidate = _x8,
24780
- isReactNative = _x9,
24781
- props = _x10;
24782
- if (pathToHere === undefined) pathToHere = '';
24783
- var callback = _arguments.length <= 8 || _arguments[8] === undefined ? function () {
24784
- return null;
24785
- } : _arguments[8];
24786
- _again = false;
24787
- var prefix = _arguments.length <= 9 || _arguments[9] === undefined ? '' : _arguments[9];
24788
- var asyncBlurFields = props.asyncBlurFields;
24789
- var blur = props.blur;
24790
- var change = props.change;
24791
- var focus = props.focus;
24792
- var form = props.form;
24793
- var initialValues = props.initialValues;
24794
- var readonly = props.readonly;
24795
- var addArrayValue = props.addArrayValue;
24796
- var removeArrayValue = props.removeArrayValue;
24797
- var swapArrayValues = props.swapArrayValues;
24798
-
24799
- var dotIndex = fieldName.indexOf('.');
24800
- var openIndex = fieldName.indexOf('[');
24801
- var closeIndex = fieldName.indexOf(']');
24802
- if (openIndex > 0 && closeIndex !== openIndex + 1) {
24803
- throw new Error('found [ not followed by ]');
24804
- }
24805
-
24806
- if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
24807
- var _ret = (function () {
24808
- // array field
24809
- var key = fieldName.substring(0, openIndex);
24810
- var rest = getSuffix(fieldName, closeIndex);
24811
- var stateArray = state && state[key] || [];
24812
- var fullPrefix = prefix + fieldName.substring(0, closeIndex + 1);
24813
- var subfields = props.fields.reduce(function (accumulator, field) {
24814
- if (field.indexOf(fullPrefix) === 0) {
24815
- accumulator.push(field);
24677
+ var readField = function readField(state, fieldName) {
24678
+ var pathToHere = arguments.length <= 2 || arguments[2] === undefined ? '' : arguments[2];
24679
+ var fields = arguments[3];
24680
+ var syncErrors = arguments[4];
24681
+ var asyncValidate = arguments[5];
24682
+ var isReactNative = arguments[6];
24683
+ var props = arguments[7];
24684
+ var callback = arguments.length <= 8 || arguments[8] === undefined ? function () {
24685
+ return null;
24686
+ } : arguments[8];
24687
+ var prefix = arguments.length <= 9 || arguments[9] === undefined ? '' : arguments[9];
24688
+ var asyncBlurFields = props.asyncBlurFields;
24689
+ var blur = props.blur;
24690
+ var change = props.change;
24691
+ var focus = props.focus;
24692
+ var form = props.form;
24693
+ var initialValues = props.initialValues;
24694
+ var readonly = props.readonly;
24695
+ var addArrayValue = props.addArrayValue;
24696
+ var removeArrayValue = props.removeArrayValue;
24697
+ var swapArrayValues = props.swapArrayValues;
24698
+
24699
+ var dotIndex = fieldName.indexOf('.');
24700
+ var openIndex = fieldName.indexOf('[');
24701
+ var closeIndex = fieldName.indexOf(']');
24702
+ if (openIndex > 0 && closeIndex !== openIndex + 1) {
24703
+ throw new Error('found [ not followed by ]');
24704
+ }
24705
+
24706
+ if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
24707
+ var _ret = function () {
24708
+ // array field
24709
+ var key = fieldName.substring(0, openIndex);
24710
+ var rest = getSuffix(fieldName, closeIndex);
24711
+ var stateArray = state && state[key] || [];
24712
+ var fullPrefix = prefix + fieldName.substring(0, closeIndex + 1);
24713
+ var subfields = props.fields.reduce(function (accumulator, field) {
24714
+ if (field.indexOf(fullPrefix) === 0) {
24715
+ accumulator.push(field);
24716
+ }
24717
+ return accumulator;
24718
+ }, []).map(function (field) {
24719
+ return getSuffix(field, prefix.length + closeIndex);
24720
+ });
24721
+ var addMethods = function addMethods(dest) {
24722
+ Object.defineProperty(dest, 'addField', {
24723
+ value: function value(_value, index) {
24724
+ return addArrayValue(pathToHere + key, _value, index, subfields);
24816
24725
  }
24817
- return accumulator;
24818
- }, []).map(function (field) {
24819
- return getSuffix(field, prefix.length + closeIndex);
24820
24726
  });
24821
- if (!fields[key] || fields[key].length !== stateArray.length) {
24822
- fields[key] = fields[key] ? [].concat(fields[key]) : [];
24823
- Object.defineProperty(fields[key], 'addField', {
24824
- value: function value(_value, index) {
24825
- return addArrayValue(pathToHere + key, _value, index, subfields);
24826
- }
24827
- });
24828
- Object.defineProperty(fields[key], 'removeField', {
24829
- value: function value(index) {
24830
- return removeArrayValue(pathToHere + key, index);
24831
- }
24832
- });
24833
- Object.defineProperty(fields[key], 'swapFields', {
24834
- value: function value(indexA, indexB) {
24835
- return swapArrayValues(pathToHere + key, indexA, indexB);
24836
- }
24837
- });
24838
- }
24839
- var fieldArray = fields[key];
24840
- stateArray.forEach(function (fieldState, index) {
24841
- if (rest && !fieldArray[index]) {
24842
- fieldArray[index] = {};
24727
+ Object.defineProperty(dest, 'removeField', {
24728
+ value: function value(index) {
24729
+ return removeArrayValue(pathToHere + key, index);
24843
24730
  }
24844
- var dest = rest ? fieldArray[index] : {};
24845
- var nextPath = '' + pathToHere + key + '[' + index + ']' + (rest ? '.' : '');
24846
- var nextPrefix = '' + prefix + key + '[]' + (rest ? '.' : '');
24847
-
24848
- var result = readField(fieldState, rest, nextPath, dest, syncErrors, asyncValidate, isReactNative, props, callback, nextPrefix);
24849
- if (!rest) {
24850
- // if nothing after [] in field name, assign directly to array
24851
- fieldArray[index] = result;
24731
+ });
24732
+ Object.defineProperty(dest, 'swapFields', {
24733
+ value: function value(indexA, indexB) {
24734
+ return swapArrayValues(pathToHere + key, indexA, indexB);
24852
24735
  }
24853
24736
  });
24854
- if (fieldArray.length > stateArray.length) {
24855
- // remove extra items that aren't in state array
24856
- fieldArray.splice(stateArray.length, fieldArray.length - stateArray.length);
24857
- }
24858
- return {
24859
- v: fieldArray
24860
- };
24861
- })();
24862
-
24863
- if (typeof _ret === 'object') return _ret.v;
24864
- }
24865
- if (dotIndex > 0) {
24866
- // subobject field
24867
- var key = fieldName.substring(0, dotIndex);
24868
- var rest = fieldName.substring(dotIndex + 1);
24869
- if (!fields[key]) {
24870
- fields[key] = {};
24737
+ return dest;
24738
+ };
24739
+ if (!fields[key] || fields[key].length !== stateArray.length) {
24740
+ fields[key] = fields[key] ? [].concat(fields[key]) : [];
24741
+ addMethods(fields[key]);
24871
24742
  }
24872
- var nextPath = pathToHere + key + '.';
24873
- _arguments = [_x3 = state[key] || {}, _x4 = rest, _x5 = nextPath, _x6 = fields[key], _x7 = syncErrors, _x8 = asyncValidate, _x9 = isReactNative, _x10 = props, callback, nextPath];
24874
- _again = true;
24875
- callback = prefix = asyncBlurFields = blur = change = focus = form = initialValues = readonly = addArrayValue = removeArrayValue = swapArrayValues = dotIndex = openIndex = closeIndex = _ret = key = rest = nextPath = undefined;
24876
- continue _function;
24877
- }
24878
- var name = pathToHere + fieldName;
24879
- var field = fields[fieldName] || {};
24880
- if (field.name !== name) {
24881
- var onChange = _eventsCreateOnChange2['default'](name, change, isReactNative);
24882
- var initialFormValue = _read2['default'](name + '.initial', form);
24883
- var initialValue = initialFormValue || _read2['default'](name, initialValues);
24884
- field.name = name;
24885
- field.defaultChecked = initialValue === true;
24886
- field.defaultValue = initialValue;
24887
- field.initialValue = initialValue;
24888
- if (!readonly) {
24889
- field.onBlur = _eventsCreateOnBlur2['default'](name, blur, isReactNative, ~asyncBlurFields.indexOf(name) && function (blurName, blurValue) {
24890
- return _silencePromise2['default'](asyncValidate(blurName, blurValue));
24891
- });
24892
- field.onChange = onChange;
24893
- field.onDragStart = _eventsCreateOnDragStart2['default'](name, function () {
24894
- return field.value;
24895
- });
24896
- field.onDrop = _eventsCreateOnDrop2['default'](name, change);
24897
- field.onFocus = _eventsCreateOnFocus2['default'](name, focus);
24898
- field.onUpdate = onChange; // alias to support belle. https://github.com/nikgraf/belle/issues/58
24743
+ var fieldArray = fields[key];
24744
+ var changed = false;
24745
+ stateArray.forEach(function (fieldState, index) {
24746
+ if (rest && !fieldArray[index]) {
24747
+ fieldArray[index] = {};
24748
+ changed = true;
24749
+ }
24750
+ var dest = rest ? fieldArray[index] : {};
24751
+ var nextPath = '' + pathToHere + key + '[' + index + ']' + (rest ? '.' : '');
24752
+ var nextPrefix = '' + prefix + key + '[]' + (rest ? '.' : '');
24753
+
24754
+ var result = readField(fieldState, rest, nextPath, dest, syncErrors, asyncValidate, isReactNative, props, callback, nextPrefix);
24755
+ if (!rest && fieldArray[index] !== result) {
24756
+ // if nothing after [] in field name, assign directly to array
24757
+ fieldArray[index] = result;
24758
+ changed = true;
24759
+ }
24760
+ });
24761
+ if (fieldArray.length > stateArray.length) {
24762
+ // remove extra items that aren't in state array
24763
+ fieldArray.splice(stateArray.length, fieldArray.length - stateArray.length);
24899
24764
  }
24900
- field.valid = true;
24901
- field.invalid = false;
24902
- Object.defineProperty(field, '_isField', { value: true });
24903
- }
24765
+ return {
24766
+ v: changed ? addMethods([].concat(fieldArray)) : fieldArray
24767
+ };
24768
+ }();
24904
24769
 
24905
- var fieldState = (fieldName ? state[fieldName] : state) || {};
24906
- var syncError = _read2['default'](name, syncErrors);
24907
- var updated = _updateField2['default'](field, fieldState, name === form._active, syncError);
24908
- if (fieldName || fields[fieldName] !== updated) {
24909
- fields[fieldName] = updated;
24770
+ if (typeof _ret === "object") return _ret.v;
24771
+ }
24772
+ if (dotIndex > 0) {
24773
+ // subobject field
24774
+ var key = fieldName.substring(0, dotIndex);
24775
+ var rest = fieldName.substring(dotIndex + 1);
24776
+ var subobject = fields[key] || {};
24777
+ var nextPath = pathToHere + key + '.';
24778
+ var nextKey = getNextKey(rest);
24779
+ var previous = subobject[nextKey];
24780
+ var result = readField(state[key] || {}, rest, nextPath, subobject, syncErrors, asyncValidate, isReactNative, props, callback, nextPath);
24781
+ if (result !== previous) {
24782
+ var _extends2;
24783
+
24784
+ subobject = _extends({}, subobject, (_extends2 = {}, _extends2[nextKey] = result, _extends2));
24785
+ }
24786
+ fields[key] = subobject;
24787
+ return subobject;
24788
+ }
24789
+ var name = pathToHere + fieldName;
24790
+ var field = fields[fieldName] || {};
24791
+ if (field.name !== name) {
24792
+ var onChange = (0, _createOnChange2.default)(name, change, isReactNative);
24793
+ var initialFormValue = (0, _read2.default)(name + '.initial', form);
24794
+ var initialValue = initialFormValue || (0, _read2.default)(name, initialValues);
24795
+ field.name = name;
24796
+ field.defaultChecked = initialValue === true;
24797
+ field.defaultValue = initialValue;
24798
+ field.initialValue = initialValue;
24799
+ if (!readonly) {
24800
+ field.onBlur = (0, _createOnBlur2.default)(name, blur, isReactNative, ~asyncBlurFields.indexOf(name) && function (blurName, blurValue) {
24801
+ return (0, _silencePromise2.default)(asyncValidate(blurName, blurValue));
24802
+ });
24803
+ field.onChange = onChange;
24804
+ field.onDragStart = (0, _createOnDragStart2.default)(name, function () {
24805
+ return field.value;
24806
+ });
24807
+ field.onDrop = (0, _createOnDrop2.default)(name, change);
24808
+ field.onFocus = (0, _createOnFocus2.default)(name, focus);
24809
+ field.onUpdate = onChange; // alias to support belle. https://github.com/nikgraf/belle/issues/58
24910
24810
  }
24911
- callback(updated);
24912
- return updated;
24811
+ field.valid = true;
24812
+ field.invalid = false;
24813
+ Object.defineProperty(field, '_isField', { value: true });
24913
24814
  }
24815
+
24816
+ var fieldState = (fieldName ? state[fieldName] : state) || {};
24817
+ var syncError = (0, _read2.default)(name, syncErrors);
24818
+ var updated = (0, _updateField2.default)(field, fieldState, name === form._active, syncError);
24819
+ if (fieldName || fields[fieldName] !== updated) {
24820
+ fields[fieldName] = updated;
24821
+ }
24822
+ callback(updated);
24823
+ return updated;
24914
24824
  };
24915
24825
 
24916
- exports['default'] = readField;
24917
- module.exports = exports['default'];
24826
+ exports.default = readField;
24918
24827
 
24919
24828
  /***/ },
24920
24829
  /* 231 */
@@ -24924,23 +24833,22 @@
24924
24833
 
24925
24834
  exports.__esModule = true;
24926
24835
 
24927
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24928
-
24929
24836
  var _getValue = __webpack_require__(232);
24930
24837
 
24931
24838
  var _getValue2 = _interopRequireDefault(_getValue);
24932
24839
 
24840
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24841
+
24933
24842
  var createOnBlur = function createOnBlur(name, blur, isReactNative, afterBlur) {
24934
24843
  return function (event) {
24935
- var value = _getValue2['default'](event, isReactNative);
24844
+ var value = (0, _getValue2.default)(event, isReactNative);
24936
24845
  blur(name, value);
24937
24846
  if (afterBlur) {
24938
24847
  afterBlur(name, value);
24939
24848
  }
24940
24849
  };
24941
24850
  };
24942
- exports['default'] = createOnBlur;
24943
- module.exports = exports['default'];
24851
+ exports.default = createOnBlur;
24944
24852
 
24945
24853
  /***/ },
24946
24854
  /* 232 */
@@ -24950,12 +24858,12 @@
24950
24858
 
24951
24859
  exports.__esModule = true;
24952
24860
 
24953
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
24954
-
24955
24861
  var _isEvent = __webpack_require__(233);
24956
24862
 
24957
24863
  var _isEvent2 = _interopRequireDefault(_isEvent);
24958
24864
 
24865
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24866
+
24959
24867
  var getSelectedValues = function getSelectedValues(options) {
24960
24868
  var result = [];
24961
24869
  if (options) {
@@ -24970,7 +24878,7 @@
24970
24878
  };
24971
24879
 
24972
24880
  var getValue = function getValue(event, isReactNative) {
24973
- if (_isEvent2['default'](event)) {
24881
+ if ((0, _isEvent2.default)(event)) {
24974
24882
  if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {
24975
24883
  return event.nativeEvent.text;
24976
24884
  }
@@ -25000,8 +24908,7 @@
25000
24908
  event;
25001
24909
  };
25002
24910
 
25003
- exports['default'] = getValue;
25004
- module.exports = exports['default'];
24911
+ exports.default = getValue;
25005
24912
 
25006
24913
  /***/ },
25007
24914
  /* 233 */
@@ -25014,8 +24921,7 @@
25014
24921
  return !!(candidate && candidate.stopPropagation && candidate.preventDefault);
25015
24922
  };
25016
24923
 
25017
- exports["default"] = isEvent;
25018
- module.exports = exports["default"];
24924
+ exports.default = isEvent;
25019
24925
 
25020
24926
  /***/ },
25021
24927
  /* 234 */
@@ -25025,19 +24931,18 @@
25025
24931
 
25026
24932
  exports.__esModule = true;
25027
24933
 
25028
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25029
-
25030
24934
  var _getValue = __webpack_require__(232);
25031
24935
 
25032
24936
  var _getValue2 = _interopRequireDefault(_getValue);
25033
24937
 
24938
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24939
+
25034
24940
  var createOnChange = function createOnChange(name, change, isReactNative) {
25035
24941
  return function (event) {
25036
- return change(name, _getValue2['default'](event, isReactNative));
24942
+ return change(name, (0, _getValue2.default)(event, isReactNative));
25037
24943
  };
25038
24944
  };
25039
- exports['default'] = createOnChange;
25040
- module.exports = exports['default'];
24945
+ exports.default = createOnChange;
25041
24946
 
25042
24947
  /***/ },
25043
24948
  /* 235 */
@@ -25046,15 +24951,14 @@
25046
24951
  'use strict';
25047
24952
 
25048
24953
  exports.__esModule = true;
25049
- var dataKey = 'value';
25050
- exports.dataKey = dataKey;
24954
+ var dataKey = exports.dataKey = 'value';
25051
24955
  var createOnDragStart = function createOnDragStart(name, getValue) {
25052
24956
  return function (event) {
25053
24957
  event.dataTransfer.setData(dataKey, getValue());
25054
24958
  };
25055
24959
  };
25056
24960
 
25057
- exports['default'] = createOnDragStart;
24961
+ exports.default = createOnDragStart;
25058
24962
 
25059
24963
  /***/ },
25060
24964
  /* 236 */
@@ -25071,8 +24975,7 @@
25071
24975
  change(name, event.dataTransfer.getData(_createOnDragStart.dataKey));
25072
24976
  };
25073
24977
  };
25074
- exports['default'] = createOnDrop;
25075
- module.exports = exports['default'];
24978
+ exports.default = createOnDrop;
25076
24979
 
25077
24980
  /***/ },
25078
24981
  /* 237 */
@@ -25086,8 +24989,7 @@
25086
24989
  return focus(name);
25087
24990
  };
25088
24991
  };
25089
- exports["default"] = createOnFocus;
25090
- module.exports = exports["default"];
24992
+ exports.default = createOnFocus;
25091
24993
 
25092
24994
  /***/ },
25093
24995
  /* 238 */
@@ -25097,22 +24999,21 @@
25097
24999
 
25098
25000
  exports.__esModule = true;
25099
25001
 
25100
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25101
-
25102
25002
  var _isPromise = __webpack_require__(239);
25103
25003
 
25104
25004
  var _isPromise2 = _interopRequireDefault(_isPromise);
25105
25005
 
25006
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25007
+
25106
25008
  var noop = function noop() {
25107
25009
  return undefined;
25108
25010
  };
25109
25011
 
25110
25012
  var silencePromise = function silencePromise(promise) {
25111
- return _isPromise2['default'](promise) ? promise.then(noop, noop) : promise;
25013
+ return (0, _isPromise2.default)(promise) ? promise.then(noop, noop) : promise;
25112
25014
  };
25113
25015
 
25114
- exports['default'] = silencePromise;
25115
- module.exports = exports['default'];
25016
+ exports.default = silencePromise;
25116
25017
 
25117
25018
  /***/ },
25118
25019
  /* 239 */
@@ -25135,8 +25036,6 @@
25135
25036
 
25136
25037
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25137
25038
 
25138
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25139
-
25140
25039
  var _isPristine = __webpack_require__(241);
25141
25040
 
25142
25041
  var _isPristine2 = _interopRequireDefault(_isPristine);
@@ -25145,6 +25044,8 @@
25145
25044
 
25146
25045
  var _isValid2 = _interopRequireDefault(_isValid);
25147
25046
 
25047
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25048
+
25148
25049
  /**
25149
25050
  * Updates a field object from the store values
25150
25051
  */
@@ -25158,7 +25059,7 @@
25158
25059
  }
25159
25060
 
25160
25061
  // update dirty/pristine
25161
- var pristine = _isPristine2['default'](formField.value, formField.initial);
25062
+ var pristine = (0, _isPristine2.default)(formField.value, formField.initial);
25162
25063
  if (field.pristine !== pristine) {
25163
25064
  diff.dirty = !pristine;
25164
25065
  diff.pristine = pristine;
@@ -25169,7 +25070,7 @@
25169
25070
  if (error !== field.error) {
25170
25071
  diff.error = error;
25171
25072
  }
25172
- var valid = _isValid2['default'](error);
25073
+ var valid = (0, _isValid2.default)(error);
25173
25074
  if (field.valid !== valid) {
25174
25075
  diff.invalid = !valid;
25175
25076
  diff.valid = valid;
@@ -25195,8 +25096,7 @@
25195
25096
 
25196
25097
  return Object.keys(diff).length ? _extends({}, field, diff) : field;
25197
25098
  };
25198
- exports['default'] = updateField;
25199
- module.exports = exports['default'];
25099
+ exports.default = updateField;
25200
25100
 
25201
25101
  /***/ },
25202
25102
  /* 241 */
@@ -25205,8 +25105,7 @@
25205
25105
  'use strict';
25206
25106
 
25207
25107
  exports.__esModule = true;
25208
- exports['default'] = isPristine;
25209
-
25108
+ exports.default = isPristine;
25210
25109
  function isPristine(initial, data) {
25211
25110
  if (initial === data) {
25212
25111
  return true;
@@ -25237,8 +25136,6 @@
25237
25136
  return true;
25238
25137
  }
25239
25138
 
25240
- module.exports = exports['default'];
25241
-
25242
25139
  /***/ },
25243
25140
  /* 242 */
25244
25141
  /***/ function(module, exports) {
@@ -25263,9 +25160,7 @@
25263
25160
  throw new Error('found [ not followed by ]');
25264
25161
  }
25265
25162
  if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) {
25266
- var _extends2;
25267
-
25268
- var _ret = (function () {
25163
+ var _ret = function () {
25269
25164
  // array field
25270
25165
  var key = path.substring(0, openIndex);
25271
25166
  if (!Array.isArray(fields[key])) {
@@ -25278,7 +25173,9 @@
25278
25173
  rest = rest.substring(1);
25279
25174
  }
25280
25175
  if (rest) {
25281
- var _ret2 = (function () {
25176
+ var _ret2 = function () {
25177
+ var _extends2;
25178
+
25282
25179
  var copy = [];
25283
25180
  fields[key].forEach(function (item, index) {
25284
25181
  var result = removeField(item, rest);
@@ -25291,16 +25188,16 @@
25291
25188
  v: copy.length ? _extends({}, fields, (_extends2 = {}, _extends2[key] = copy, _extends2)) : without(fields, key)
25292
25189
  }
25293
25190
  };
25294
- })();
25191
+ }();
25295
25192
 
25296
- if (typeof _ret2 === 'object') return _ret2.v;
25193
+ if (typeof _ret2 === "object") return _ret2.v;
25297
25194
  }
25298
25195
  return {
25299
25196
  v: without(fields, key)
25300
25197
  };
25301
- })();
25198
+ }();
25302
25199
 
25303
- if (typeof _ret === 'object') return _ret.v;
25200
+ if (typeof _ret === "object") return _ret.v;
25304
25201
  }
25305
25202
  if (dotIndex > 0) {
25306
25203
  var _extends3;
@@ -25317,8 +25214,7 @@
25317
25214
  return without(fields, path);
25318
25215
  };
25319
25216
 
25320
- exports['default'] = removeField;
25321
- module.exports = exports['default'];
25217
+ exports.default = removeField;
25322
25218
 
25323
25219
  /***/ },
25324
25220
  /* 243 */
@@ -25328,8 +25224,6 @@
25328
25224
 
25329
25225
  exports.__esModule = true;
25330
25226
 
25331
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25332
-
25333
25227
  var _isPromise = __webpack_require__(239);
25334
25228
 
25335
25229
  var _isPromise2 = _interopRequireDefault(_isPromise);
@@ -25338,6 +25232,8 @@
25338
25232
 
25339
25233
  var _isValid2 = _interopRequireDefault(_isValid);
25340
25234
 
25235
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25236
+
25341
25237
  var handleSubmit = function handleSubmit(submit, values, props, asyncValidate) {
25342
25238
  var dispatch = props.dispatch;
25343
25239
  var fields = props.fields;
@@ -25350,10 +25246,10 @@
25350
25246
 
25351
25247
  var syncErrors = validate(values, props);
25352
25248
  touch.apply(undefined, fields); // touch all fields
25353
- if (_isValid2['default'](syncErrors)) {
25249
+ if ((0, _isValid2.default)(syncErrors)) {
25354
25250
  var doSubmit = function doSubmit() {
25355
25251
  var result = submit(values, dispatch);
25356
- if (_isPromise2['default'](result)) {
25252
+ if ((0, _isPromise2.default)(result)) {
25357
25253
  startSubmit();
25358
25254
  return result.then(function (submitResult) {
25359
25255
  stopSubmit();
@@ -25368,7 +25264,7 @@
25368
25264
  return result;
25369
25265
  };
25370
25266
  var asyncValidateResult = asyncValidate();
25371
- return _isPromise2['default'](asyncValidateResult) ?
25267
+ return (0, _isPromise2.default)(asyncValidateResult) ?
25372
25268
  // asyncValidateResult will be rejected if async validation failed
25373
25269
  asyncValidateResult.then(doSubmit, function () {
25374
25270
  submitFailed();
@@ -25382,8 +25278,7 @@
25382
25278
  }
25383
25279
  };
25384
25280
 
25385
- exports['default'] = handleSubmit;
25386
- module.exports = exports['default'];
25281
+ exports.default = handleSubmit;
25387
25282
 
25388
25283
  /***/ },
25389
25284
  /* 244 */
@@ -25393,8 +25288,6 @@
25393
25288
 
25394
25289
  exports.__esModule = true;
25395
25290
 
25396
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25397
-
25398
25291
  var _isPromise = __webpack_require__(239);
25399
25292
 
25400
25293
  var _isPromise2 = _interopRequireDefault(_isPromise);
@@ -25403,15 +25296,17 @@
25403
25296
 
25404
25297
  var _isValid2 = _interopRequireDefault(_isValid);
25405
25298
 
25299
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25300
+
25406
25301
  var asyncValidation = function asyncValidation(fn, start, stop, field) {
25407
25302
  start(field);
25408
25303
  var promise = fn();
25409
- if (!_isPromise2['default'](promise)) {
25304
+ if (!(0, _isPromise2.default)(promise)) {
25410
25305
  throw new Error('asyncValidate function passed to reduxForm must return a promise');
25411
25306
  }
25412
25307
  var handleErrors = function handleErrors(rejected) {
25413
25308
  return function (errors) {
25414
- if (!_isValid2['default'](errors)) {
25309
+ if (!(0, _isValid2.default)(errors)) {
25415
25310
  stop(errors);
25416
25311
  return Promise.reject();
25417
25312
  } else if (rejected) {
@@ -25425,8 +25320,7 @@
25425
25320
  return promise.then(handleErrors(false), handleErrors(true));
25426
25321
  };
25427
25322
 
25428
- exports['default'] = asyncValidation;
25429
- module.exports = exports['default'];
25323
+ exports.default = asyncValidation;
25430
25324
 
25431
25325
  /***/ },
25432
25326
  /* 245 */
@@ -25436,24 +25330,23 @@
25436
25330
 
25437
25331
  exports.__esModule = true;
25438
25332
 
25439
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25440
-
25441
25333
  var _silenceEvent = __webpack_require__(246);
25442
25334
 
25443
25335
  var _silenceEvent2 = _interopRequireDefault(_silenceEvent);
25444
25336
 
25337
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25338
+
25445
25339
  var silenceEvents = function silenceEvents(fn) {
25446
25340
  return function (event) {
25447
25341
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
25448
25342
  args[_key - 1] = arguments[_key];
25449
25343
  }
25450
25344
 
25451
- return _silenceEvent2['default'](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args));
25345
+ return (0, _silenceEvent2.default)(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args));
25452
25346
  };
25453
25347
  };
25454
25348
 
25455
- exports['default'] = silenceEvents;
25456
- module.exports = exports['default'];
25349
+ exports.default = silenceEvents;
25457
25350
 
25458
25351
  /***/ },
25459
25352
  /* 246 */
@@ -25463,22 +25356,21 @@
25463
25356
 
25464
25357
  exports.__esModule = true;
25465
25358
 
25466
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25467
-
25468
25359
  var _isEvent = __webpack_require__(233);
25469
25360
 
25470
25361
  var _isEvent2 = _interopRequireDefault(_isEvent);
25471
25362
 
25363
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25364
+
25472
25365
  var silenceEvent = function silenceEvent(event) {
25473
- var is = _isEvent2['default'](event);
25366
+ var is = (0, _isEvent2.default)(event);
25474
25367
  if (is) {
25475
25368
  event.preventDefault();
25476
25369
  }
25477
25370
  return is;
25478
25371
  };
25479
25372
 
25480
- exports['default'] = silenceEvent;
25481
- module.exports = exports['default'];
25373
+ exports.default = silenceEvent;
25482
25374
 
25483
25375
  /***/ },
25484
25376
  /* 247 */
@@ -25499,30 +25391,29 @@
25499
25391
  return function (dispatch, ownProps) {
25500
25392
  return _extends({
25501
25393
  dispatch: dispatch
25502
- }, mapDispatchToProps(dispatch, ownProps), _redux.bindActionCreators(actionCreators, dispatch));
25394
+ }, mapDispatchToProps(dispatch, ownProps), (0, _redux.bindActionCreators)(actionCreators, dispatch));
25503
25395
  };
25504
25396
  }
25505
25397
  return function (dispatch) {
25506
25398
  return _extends({
25507
25399
  dispatch: dispatch
25508
- }, mapDispatchToProps(dispatch), _redux.bindActionCreators(actionCreators, dispatch));
25400
+ }, mapDispatchToProps(dispatch), (0, _redux.bindActionCreators)(actionCreators, dispatch));
25509
25401
  };
25510
25402
  }
25511
25403
  return function (dispatch) {
25512
25404
  return _extends({
25513
25405
  dispatch: dispatch
25514
- }, _redux.bindActionCreators(mapDispatchToProps, dispatch), _redux.bindActionCreators(actionCreators, dispatch));
25406
+ }, (0, _redux.bindActionCreators)(mapDispatchToProps, dispatch), (0, _redux.bindActionCreators)(actionCreators, dispatch));
25515
25407
  };
25516
25408
  }
25517
25409
  return function (dispatch) {
25518
25410
  return _extends({
25519
25411
  dispatch: dispatch
25520
- }, _redux.bindActionCreators(actionCreators, dispatch));
25412
+ }, (0, _redux.bindActionCreators)(actionCreators, dispatch));
25521
25413
  };
25522
25414
  };
25523
25415
 
25524
- exports['default'] = wrapMapDispatchToProps;
25525
- module.exports = exports['default'];
25416
+ exports.default = wrapMapDispatchToProps;
25526
25417
 
25527
25418
  /***/ },
25528
25419
  /* 248 */
@@ -25559,8 +25450,7 @@
25559
25450
  };
25560
25451
  };
25561
25452
 
25562
- exports['default'] = wrapMapStateToProps;
25563
- module.exports = exports['default'];
25453
+ exports.default = wrapMapStateToProps;
25564
25454
 
25565
25455
  /***/ },
25566
25456
  /* 249 */
@@ -25605,8 +25495,7 @@
25605
25495
  };
25606
25496
  };
25607
25497
 
25608
- exports["default"] = createPropTypes;
25609
- module.exports = exports["default"];
25498
+ exports.default = createPropTypes;
25610
25499
 
25611
25500
  /***/ },
25612
25501
  /* 250 */
@@ -25781,7 +25670,7 @@
25781
25670
  { className: 'load-messages', onClick: this.showAll },
25782
25671
  'Load previous messages'
25783
25672
  )
25784
- ) : undefined,
25673
+ ) : void 0,
25785
25674
  messages.length >= 50 && !showAll ? messages.slice(Math.max(messages.length - 50, 1)).map(function (message, index) {
25786
25675
  return _react2.default.createElement(
25787
25676
  'div',
@@ -25884,19 +25773,23 @@
25884
25773
  'div',
25885
25774
  { className: 'chat-message chat-message-' + cssClass },
25886
25775
  _react2.default.createElement(
25887
- 'span',
25888
- { className: 'message-author' },
25889
- message.full_name
25890
- ),
25891
- _react2.default.createElement('img', { className: 'chat-image chat-image-default', src: message.avatar }),
25892
- _react2.default.createElement(
25893
- 'span',
25894
- { className: 'message-time' },
25895
- message.time
25776
+ 'div',
25777
+ { className: 'user-info' },
25778
+ _react2.default.createElement('img', { className: 'chat-image chat-image-default', src: message.avatar }),
25779
+ _react2.default.createElement(
25780
+ 'span',
25781
+ { className: 'message-author' },
25782
+ message.full_name
25783
+ )
25896
25784
  ),
25897
25785
  _react2.default.createElement(
25898
25786
  'div',
25899
25787
  { className: 'chat-message-wrapper' },
25788
+ _react2.default.createElement(
25789
+ 'span',
25790
+ { className: 'message-time' },
25791
+ message.time
25792
+ ),
25900
25793
  _react2.default.createElement(
25901
25794
  'div',
25902
25795
  { className: 'chat-message-content' },
@@ -25989,28 +25882,15 @@
25989
25882
 
25990
25883
  return _react2.default.createElement(
25991
25884
  'div',
25992
- null,
25885
+ { className: 'denshobato-send-message' },
25993
25886
  _react2.default.createElement(
25994
25887
  'form',
25995
25888
  { onSubmit: handleSubmit },
25889
+ _react2.default.createElement('input', _extends({ className: 'message_input', placeholder: 'Type your message here...' }, body)),
25996
25890
  _react2.default.createElement(
25997
- 'div',
25998
- { className: 'bottom_wrapper clearfix' },
25999
- _react2.default.createElement(
26000
- 'div',
26001
- { className: 'message_input_wrapper' },
26002
- _react2.default.createElement('input', _extends({ className: 'message_input', placeholder: 'Type your message here...' }, body))
26003
- ),
26004
- _react2.default.createElement(
26005
- 'div',
26006
- { className: 'send_message' },
26007
- _react2.default.createElement('div', { className: 'icon' }),
26008
- _react2.default.createElement(
26009
- 'button',
26010
- { onclick: handleSubmit, className: 'text' },
26011
- 'Send'
26012
- )
26013
- )
25891
+ 'button',
25892
+ { onclick: handleSubmit, className: 'text' },
25893
+ 'Send'
26014
25894
  )
26015
25895
  )
26016
25896
  );