guestbell-forms 3.0.18 → 3.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/.babelrc.js +1 -1
  2. package/build/components/base/input/BaseInput.js +8 -96
  3. package/build/components/base/input/BaseInput.js.map +1 -1
  4. package/build/components/base/input/index.js +0 -2
  5. package/build/components/base/input/index.js.map +1 -1
  6. package/build/components/bookingCalendar/BookingCalendar.js +7 -30
  7. package/build/components/bookingCalendar/BookingCalendar.js.map +1 -1
  8. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js +2 -22
  9. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js.map +1 -1
  10. package/build/components/bookingCalendar/bookingCalendarControls/classes.js.map +1 -1
  11. package/build/components/bookingCalendar/bookingCalendarControls/index.js +0 -4
  12. package/build/components/bookingCalendar/bookingCalendarControls/index.js.map +1 -1
  13. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js +6 -19
  14. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js.map +1 -1
  15. package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.js.map +1 -1
  16. package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js +0 -4
  17. package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js.map +1 -1
  18. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.d.ts +2 -1
  19. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js +11 -10
  20. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js.map +1 -1
  21. package/build/components/bookingCalendar/bookingCalendarGrid/classes.js.map +1 -1
  22. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js +0 -9
  23. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js.map +1 -1
  24. package/build/components/bookingCalendar/bookingCalendarItem/classes.js.map +1 -1
  25. package/build/components/bookingCalendar/bookingCalendarItem/index.js +0 -4
  26. package/build/components/bookingCalendar/bookingCalendarItem/index.js.map +1 -1
  27. package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js +0 -10
  28. package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js.map +1 -1
  29. package/build/components/bookingCalendar/bookingCalendarLane/classes.js.map +1 -1
  30. package/build/components/bookingCalendar/bookingCalendarLane/index.js +0 -4
  31. package/build/components/bookingCalendar/bookingCalendarLane/index.js.map +1 -1
  32. package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js +0 -7
  33. package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js.map +1 -1
  34. package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.js.map +1 -1
  35. package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js +0 -2
  36. package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js.map +1 -1
  37. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js +0 -12
  38. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js.map +1 -1
  39. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js +0 -9
  40. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js.map +1 -1
  41. package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.js.map +1 -1
  42. package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js +0 -4
  43. package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js.map +1 -1
  44. package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js +0 -9
  45. package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js.map +1 -1
  46. package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.js.map +1 -1
  47. package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js +0 -2
  48. package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js.map +1 -1
  49. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js +0 -30
  50. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js.map +1 -1
  51. package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js +0 -7
  52. package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js.map +1 -1
  53. package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.js.map +1 -1
  54. package/build/components/bookingCalendar/classes.js.map +1 -1
  55. package/build/components/bookingCalendar/common.js +0 -9
  56. package/build/components/bookingCalendar/common.js.map +1 -1
  57. package/build/components/bookingCalendar/index.js +0 -6
  58. package/build/components/bookingCalendar/index.js.map +1 -1
  59. package/build/components/bookingCalendar/utils.js +5 -50
  60. package/build/components/bookingCalendar/utils.js.map +1 -1
  61. package/build/components/button/Button.js +9 -37
  62. package/build/components/button/Button.js.map +1 -1
  63. package/build/components/button/index.js +0 -4
  64. package/build/components/button/index.js.map +1 -1
  65. package/build/components/checkbox/Checkbox.js +5 -35
  66. package/build/components/checkbox/Checkbox.js.map +1 -1
  67. package/build/components/checkbox/index.js +0 -4
  68. package/build/components/checkbox/index.js.map +1 -1
  69. package/build/components/dropdown/Dropdown.js +1 -15
  70. package/build/components/dropdown/Dropdown.js.map +1 -1
  71. package/build/components/dropdown/index.js +0 -4
  72. package/build/components/dropdown/index.js.map +1 -1
  73. package/build/components/dynamicSubmit/DynamicSubmit.js +7 -39
  74. package/build/components/dynamicSubmit/DynamicSubmit.js.map +1 -1
  75. package/build/components/dynamicSubmit/index.js +0 -4
  76. package/build/components/dynamicSubmit/index.js.map +1 -1
  77. package/build/components/externalValidationComponent/ExternalValidationComponent.js +6 -17
  78. package/build/components/externalValidationComponent/ExternalValidationComponent.js.map +1 -1
  79. package/build/components/externalValidationComponent/index.js +0 -4
  80. package/build/components/externalValidationComponent/index.js.map +1 -1
  81. package/build/components/form/Form.js +8 -46
  82. package/build/components/form/Form.js.map +1 -1
  83. package/build/components/form/FormContext.js +0 -4
  84. package/build/components/form/FormContext.js.map +1 -1
  85. package/build/components/form/FormValidationSummary.js +3 -25
  86. package/build/components/form/FormValidationSummary.js.map +1 -1
  87. package/build/components/form/index.js +0 -10
  88. package/build/components/form/index.js.map +1 -1
  89. package/build/components/form/withFormContext.js +0 -6
  90. package/build/components/form/withFormContext.js.map +1 -1
  91. package/build/components/inputGroup/InputGroup.js +5 -15
  92. package/build/components/inputGroup/InputGroup.js.map +1 -1
  93. package/build/components/inputGroup/index.js +0 -4
  94. package/build/components/inputGroup/index.js.map +1 -1
  95. package/build/components/inputHeader/InputHeader.js +16 -75
  96. package/build/components/inputHeader/InputHeader.js.map +1 -1
  97. package/build/components/inputHeader/InputHeaderContext.js +0 -4
  98. package/build/components/inputHeader/InputHeaderContext.js.map +1 -1
  99. package/build/components/inputHeader/index.js +0 -4
  100. package/build/components/inputHeader/index.js.map +1 -1
  101. package/build/components/inputHeader/withInputHeaderContext.js +0 -6
  102. package/build/components/inputHeader/withInputHeaderContext.js.map +1 -1
  103. package/build/components/money/Money.js +20 -64
  104. package/build/components/money/Money.js.map +1 -1
  105. package/build/components/money/index.js +0 -4
  106. package/build/components/money/index.js.map +1 -1
  107. package/build/components/numberInput/NumberInput.js +13 -44
  108. package/build/components/numberInput/NumberInput.js.map +1 -1
  109. package/build/components/numberInput/index.js +0 -4
  110. package/build/components/numberInput/index.js.map +1 -1
  111. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js +13 -62
  112. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js.map +1 -1
  113. package/build/components/openingHours/openingHoursDay/index.js +0 -4
  114. package/build/components/openingHours/openingHoursDay/index.js.map +1 -1
  115. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js +18 -49
  116. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js.map +1 -1
  117. package/build/components/openingHours/openingHoursSpecial/index.js +0 -4
  118. package/build/components/openingHours/openingHoursSpecial/index.js.map +1 -1
  119. package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js +16 -53
  120. package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js.map +1 -1
  121. package/build/components/openingHours/openingHoursWeek/index.js +0 -4
  122. package/build/components/openingHours/openingHoursWeek/index.js.map +1 -1
  123. package/build/components/openingHours/utils/OpeningHoursUtil.js +3 -21
  124. package/build/components/openingHours/utils/OpeningHoursUtil.js.map +1 -1
  125. package/build/components/radio/Radio.js +4 -19
  126. package/build/components/radio/Radio.js.map +1 -1
  127. package/build/components/radio/index.js +0 -4
  128. package/build/components/radio/index.js.map +1 -1
  129. package/build/components/radioContainer/RadioContainer.js +2 -13
  130. package/build/components/radioContainer/RadioContainer.js.map +1 -1
  131. package/build/components/radioContainer/index.js +0 -4
  132. package/build/components/radioContainer/index.js.map +1 -1
  133. package/build/components/select/Select.js +6 -53
  134. package/build/components/select/Select.js.map +1 -1
  135. package/build/components/select/index.js +0 -4
  136. package/build/components/select/index.js.map +1 -1
  137. package/build/components/submit/Submit.js +5 -28
  138. package/build/components/submit/Submit.js.map +1 -1
  139. package/build/components/submit/index.js +0 -4
  140. package/build/components/submit/index.js.map +1 -1
  141. package/build/components/submit/subComponents/SubmitValidationSummary.js +0 -9
  142. package/build/components/submit/subComponents/SubmitValidationSummary.js.map +1 -1
  143. package/build/components/tags/Tags.js +34 -119
  144. package/build/components/tags/Tags.js.map +1 -1
  145. package/build/components/tags/index.js +0 -4
  146. package/build/components/tags/index.js.map +1 -1
  147. package/build/components/tags/subComponents/TagsSuggestions.js +0 -14
  148. package/build/components/tags/subComponents/TagsSuggestions.js.map +1 -1
  149. package/build/components/text/Text.js +10 -42
  150. package/build/components/text/Text.js.map +1 -1
  151. package/build/components/text/index.js +0 -4
  152. package/build/components/text/index.js.map +1 -1
  153. package/build/components/textArea/TextArea.js +8 -31
  154. package/build/components/textArea/TextArea.js.map +1 -1
  155. package/build/components/textArea/index.js +0 -4
  156. package/build/components/textArea/index.js.map +1 -1
  157. package/build/components/themeProvider/ThemeContext.js +0 -4
  158. package/build/components/themeProvider/ThemeContext.js.map +1 -1
  159. package/build/components/themeProvider/ThemeProvider.js +2 -6
  160. package/build/components/themeProvider/ThemeProvider.js.map +1 -1
  161. package/build/components/themeProvider/index.js +0 -8
  162. package/build/components/themeProvider/index.js.map +1 -1
  163. package/build/components/themeProvider/withThemeContext.js +0 -8
  164. package/build/components/themeProvider/withThemeContext.js.map +1 -1
  165. package/build/components/time/Time.js +17 -73
  166. package/build/components/time/Time.js.map +1 -1
  167. package/build/components/time/index.js +0 -4
  168. package/build/components/time/index.js.map +1 -1
  169. package/build/components/timeSpan/TimeSpan.js +17 -99
  170. package/build/components/timeSpan/TimeSpan.js.map +1 -1
  171. package/build/components/timeSpan/index.js +0 -4
  172. package/build/components/timeSpan/index.js.map +1 -1
  173. package/build/components/utils/Guid.js +0 -3
  174. package/build/components/utils/Guid.js.map +1 -1
  175. package/build/components/utils/ShallowEqual.js +5 -10
  176. package/build/components/utils/ShallowEqual.js.map +1 -1
  177. package/build/components/utils/TimeUtil.js +1 -3
  178. package/build/components/utils/TimeUtil.js.map +1 -1
  179. package/build/dist/guestbell-forms.css.map +1 -1
  180. package/build/dist/guestbell-forms.js +21 -84
  181. package/build/dist/guestbell-forms.js.map +1 -1
  182. package/build/dist/guestbell-forms.min.js +1 -1
  183. package/build/dist/guestbell-forms.min.js.map +1 -1
  184. package/build/dist/report.html +13 -41
  185. package/build/index.js +0 -48
  186. package/build/index.js.map +1 -1
  187. package/build/validators/EmailValidator.js +0 -4
  188. package/build/validators/EmailValidator.js.map +1 -1
  189. package/build/validators/LatitudeValidator.js +0 -8
  190. package/build/validators/LatitudeValidator.js.map +1 -1
  191. package/build/validators/LongitudeValidator.js +0 -8
  192. package/build/validators/LongitudeValidator.js.map +1 -1
  193. package/build/validators/NumberValidator.js +0 -15
  194. package/build/validators/NumberValidator.js.map +1 -1
  195. package/build/validators/UrlValidator.js +2 -5
  196. package/build/validators/UrlValidator.js.map +1 -1
  197. package/build/validators/index.js +0 -7
  198. package/build/validators/index.js.map +1 -1
  199. package/package.json +19 -19
@@ -4,49 +4,33 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.defaultSubmitTranslations = exports.default = exports.SubmitRaw = exports.Submit = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _BaseInput = require("../base/input/BaseInput");
11
-
12
9
  var _Button = require("../button/Button");
13
-
14
10
  var _withFormContext = require("../form/withFormContext");
15
-
16
11
  var _FormValidationSummary = require("./../form/FormValidationSummary");
17
-
18
12
  var _SubmitValidationSummary = _interopRequireDefault(require("./subComponents/SubmitValidationSummary"));
19
-
20
13
  var _withThemeContext = require("../themeProvider/withThemeContext");
21
-
22
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
-
26
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
-
28
17
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
29
-
30
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
31
-
32
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33
-
34
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
-
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } // Libs
36
23
  // Misc
37
24
  const defaultSubmitTranslations = _objectSpread(_objectSpread({}, _BaseInput.defaultBaseTranslations), {}, {
38
25
  hangOn: 'Hang on',
39
26
  needsFixing: '... needs fixing'
40
27
  });
41
-
42
28
  exports.defaultSubmitTranslations = defaultSubmitTranslations;
43
-
44
29
  class SubmitRaw extends _BaseInput.BaseInput {
45
30
  constructor(props) {
46
31
  super(props);
47
32
  this.handleClick = this.handleClick.bind(this);
48
33
  }
49
-
50
34
  render() {
51
35
  const disabled = this.isDisabled();
52
36
  const translations = this.getTranslations(defaultSubmitTranslations);
@@ -72,32 +56,25 @@ class SubmitRaw extends _BaseInput.BaseInput {
72
56
  }, this.props.tooltipProps)
73
57
  }), this.props.children);
74
58
  }
75
-
76
59
  handleClick(e) {
77
60
  if (this.props.preventsDefault) {
78
61
  e.preventDefault();
79
62
  }
80
-
81
63
  this.props.onClick && this.props.onClick(e);
82
64
  }
83
-
84
65
  isDisabled() {
85
66
  const disabled = this.getDisabled();
86
67
  return disabled ? disabled : this.props.validateForm && this.props.formContext ? !this.props.formContext.isFormValid : false;
87
68
  }
88
-
89
69
  }
90
-
91
70
  exports.SubmitRaw = SubmitRaw;
92
-
93
- _defineProperty(SubmitRaw, "defaultProps", Object.assign({}, _BaseInput.BaseInput.defaultProps, {
71
+ SubmitRaw.defaultProps = Object.assign({}, _BaseInput.BaseInput.defaultProps, {
94
72
  validateForm: true,
95
73
  ignoreContext: true,
96
74
  reRendersWhenContextChanges: true,
97
75
  showValidationSummaryTooltip: true,
98
76
  preventsDefault: true
99
- }));
100
-
77
+ });
101
78
  const Submit = (0, _withThemeContext.withThemeContext)((0, _withFormContext.withFormContext)(SubmitRaw), 'submit');
102
79
  exports.Submit = Submit;
103
80
  var _default = Submit;
@@ -1 +1 @@
1
- {"version":3,"file":"Submit.js","names":["defaultSubmitTranslations","defaultBaseTranslations","hangOn","needsFixing","SubmitRaw","BaseInput","constructor","props","handleClick","bind","render","disabled","isDisabled","translations","getTranslations","className","buttonProps","type","title","disabledTitle","tooltip","showValidationSummaryTooltip","formContext","isFormValid","SubmitValidationSummary","theme","tooltipProps","children","e","preventsDefault","preventDefault","onClick","getDisabled","validateForm","Object","assign","defaultProps","ignoreContext","reRendersWhenContextChanges","Submit","withThemeContext","withFormContext"],"sources":["../../../src/lib/components/submit/Submit.tsx"],"sourcesContent":["// Libs\r\nimport * as React from 'react';\r\nimport {\r\n BaseInputProps,\r\n BaseInputState,\r\n BaseInput,\r\n defaultBaseTranslations,\r\n} from '../base/input/BaseInput';\r\nimport { Button, ButtonProps } from '../button/Button';\r\nimport { withFormContext } from '../form/withFormContext';\r\nimport { FormValidationSummaryRaw } from './../form/FormValidationSummary';\r\nimport SubmitValidationSummary from './subComponents/SubmitValidationSummary';\r\nimport { withThemeContext } from '../themeProvider/withThemeContext';\r\n\r\n// Misc\r\nexport const defaultSubmitTranslations = {\r\n ...defaultBaseTranslations,\r\n hangOn: 'Hang on',\r\n needsFixing: '... needs fixing',\r\n};\r\n\r\nexport type SubmitTranslations = Partial<typeof defaultSubmitTranslations>;\r\n\r\nexport type SubmitProps = BaseInputProps<never, SubmitTranslations> &\r\n ButtonProps & {\r\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n validateForm?: boolean;\r\n disabledTitle?: string;\r\n showValidationSummaryTooltip?: boolean;\r\n };\r\n\r\nexport interface SubmitState extends BaseInputState {}\r\n\r\nexport class SubmitRaw extends BaseInput<\r\n SubmitProps,\r\n SubmitState,\r\n never,\r\n SubmitTranslations\r\n> {\r\n public static defaultProps = Object.assign({}, BaseInput.defaultProps, {\r\n validateForm: true,\r\n ignoreContext: true,\r\n reRendersWhenContextChanges: true,\r\n showValidationSummaryTooltip: true,\r\n preventsDefault: true,\r\n });\r\n\r\n constructor(props: SubmitProps) {\r\n super(props);\r\n this.handleClick = this.handleClick.bind(this);\r\n }\r\n\r\n public render() {\r\n const disabled = this.isDisabled();\r\n const translations = this.getTranslations(defaultSubmitTranslations);\r\n return (\r\n <Button\r\n {...this.props}\r\n className={`${this.props.className ? this.props.className : ''}`}\r\n onClick={this.handleClick}\r\n disabled={disabled}\r\n buttonProps={{\r\n ...this.props.buttonProps,\r\n type: 'submit',\r\n title: disabled\r\n ? this.props.disabledTitle\r\n : this.props.buttonProps && this.props.buttonProps.title,\r\n }}\r\n tooltip={\r\n this.props.tooltip\r\n ? this.props.tooltip\r\n : this.props.showValidationSummaryTooltip &&\r\n !this.props.formContext.isFormValid && (\r\n <FormValidationSummaryRaw\r\n title={translations.hangOn}\r\n footer={translations.needsFixing}\r\n containerClassName=\"\"\r\n headerClassName=\"submitValidationSummary__header\"\r\n footerClassName=\"submitValidationSummary__footer\"\r\n Component={SubmitValidationSummary}\r\n formContext={this.props.formContext}\r\n />\r\n )\r\n }\r\n tooltipProps={{\r\n theme: 'validation',\r\n ...this.props.tooltipProps,\r\n }}\r\n >\r\n {this.props.children}\r\n </Button>\r\n );\r\n }\r\n\r\n private handleClick(e: React.MouseEvent<HTMLButtonElement>) {\r\n if (this.props.preventsDefault) {\r\n e.preventDefault();\r\n }\r\n this.props.onClick && this.props.onClick(e);\r\n }\r\n\r\n private isDisabled() {\r\n const disabled = this.getDisabled();\r\n return disabled\r\n ? disabled\r\n : this.props.validateForm && this.props.formContext\r\n ? !this.props.formContext.isFormValid\r\n : false;\r\n }\r\n}\r\n\r\nexport const Submit = withThemeContext<\r\n SubmitProps,\r\n InstanceType<typeof SubmitRaw>\r\n>(withFormContext<SubmitProps>(SubmitRaw), 'submit');\r\n\r\nexport default Submit;\r\n"],"mappings":";;;;;;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA;AACO,MAAMA,yBAAyB,mCACjCC,kCADiC;EAEpCC,MAAM,EAAE,SAF4B;EAGpCC,WAAW,EAAE;AAHuB,EAA/B;;;;AAkBA,MAAMC,SAAN,SAAwBC,oBAAxB,CAKL;EASAC,WAAW,CAACC,KAAD,EAAqB;IAC9B,MAAMA,KAAN;IACA,KAAKC,WAAL,GAAmB,KAAKA,WAAL,CAAiBC,IAAjB,CAAsB,IAAtB,CAAnB;EACD;;EAEMC,MAAM,GAAG;IACd,MAAMC,QAAQ,G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B,OAAX,CAAmBH,CAAnB,CAAtB;EACD;;EAEOhB,UAAU,GAAG;IACnB,MAAMD,QAAQ,GAAG,KAAKqB,WAAL,EAAjB;IACA,OAAOrB,QAAQ,GACXA,QADW,GAEX,KAAKJ,KAAL,CAAW0B,YAAX,IAA2B,KAAK1B,KAAL,CAAWe,WAAtC,GACA,CAAC,KAAKf,KAAL,CAAWe,WAAX,CAAuBC,WADxB,GAEA,KAJJ;EAKD;;AAtED;;;;gBALWnB,S,kBAMkB8B,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkB9B,oBAAA,CAAU+B,YAA5B,EAA0C;EACrEH,YAAY,EAAE,IADuD;EAErEI,aAAa,EAAE,IAFsD;EAGrEC,2BAA2B,EAAE,IAHwC;EAIrEjB,4BAA4B,EAAE,IAJuC;EAKrEQ,eAAe,EAAE;AALoD,CAA1C,C;;AAwExB,MAAMU,MAAM,GAAG,IAAAC,kCAAA,EAGpB,IAAAC,gCAAA,EAA6BrC,SAA7B,CAHoB,EAGqB,QAHrB,CAAf;;eAKQmC,M"}
1
+ {"version":3,"file":"Submit.js","names":["React","_interopRequireWildcard","require","_BaseInput","_Button","_withFormContext","_FormValidationSummary","_SubmitValidationSummary","_interopRequireDefault","_withThemeContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","defaultSubmitTranslations","defaultBaseTranslations","hangOn","needsFixing","exports","SubmitRaw","BaseInput","constructor","props","handleClick","render","disabled","isDisabled","translations","getTranslations","createElement","Button","className","onClick","buttonProps","type","title","disabledTitle","tooltip","showValidationSummaryTooltip","formContext","isFormValid","FormValidationSummaryRaw","footer","containerClassName","headerClassName","footerClassName","Component","SubmitValidationSummary","tooltipProps","theme","children","e","preventsDefault","preventDefault","getDisabled","validateForm","defaultProps","ignoreContext","reRendersWhenContextChanges","Submit","withThemeContext","withFormContext","_default"],"sources":["../../../src/lib/components/submit/Submit.tsx"],"sourcesContent":["// Libs\r\nimport * as React from 'react';\r\nimport {\r\n BaseInputProps,\r\n BaseInputState,\r\n BaseInput,\r\n defaultBaseTranslations,\r\n} from '../base/input/BaseInput';\r\nimport { Button, ButtonProps } from '../button/Button';\r\nimport { withFormContext } from '../form/withFormContext';\r\nimport { FormValidationSummaryRaw } from './../form/FormValidationSummary';\r\nimport SubmitValidationSummary from './subComponents/SubmitValidationSummary';\r\nimport { withThemeContext } from '../themeProvider/withThemeContext';\r\n\r\n// Misc\r\nexport const defaultSubmitTranslations = {\r\n ...defaultBaseTranslations,\r\n hangOn: 'Hang on',\r\n needsFixing: '... needs fixing',\r\n};\r\n\r\nexport type SubmitTranslations = Partial<typeof defaultSubmitTranslations>;\r\n\r\nexport type SubmitProps = BaseInputProps<never, SubmitTranslations> &\r\n ButtonProps & {\r\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n validateForm?: boolean;\r\n disabledTitle?: string;\r\n showValidationSummaryTooltip?: boolean;\r\n };\r\n\r\nexport interface SubmitState extends BaseInputState {}\r\n\r\nexport class SubmitRaw extends BaseInput<\r\n SubmitProps,\r\n SubmitState,\r\n never,\r\n SubmitTranslations\r\n> {\r\n public static defaultProps = Object.assign({}, BaseInput.defaultProps, {\r\n validateForm: true,\r\n ignoreContext: true,\r\n reRendersWhenContextChanges: true,\r\n showValidationSummaryTooltip: true,\r\n preventsDefault: true,\r\n });\r\n\r\n constructor(props: SubmitProps) {\r\n super(props);\r\n this.handleClick = this.handleClick.bind(this);\r\n }\r\n\r\n public render() {\r\n const disabled = this.isDisabled();\r\n const translations = this.getTranslations(defaultSubmitTranslations);\r\n return (\r\n <Button\r\n {...this.props}\r\n className={`${this.props.className ? this.props.className : ''}`}\r\n onClick={this.handleClick}\r\n disabled={disabled}\r\n buttonProps={{\r\n ...this.props.buttonProps,\r\n type: 'submit',\r\n title: disabled\r\n ? this.props.disabledTitle\r\n : this.props.buttonProps && this.props.buttonProps.title,\r\n }}\r\n tooltip={\r\n this.props.tooltip\r\n ? this.props.tooltip\r\n : this.props.showValidationSummaryTooltip &&\r\n !this.props.formContext.isFormValid && (\r\n <FormValidationSummaryRaw\r\n title={translations.hangOn}\r\n footer={translations.needsFixing}\r\n containerClassName=\"\"\r\n headerClassName=\"submitValidationSummary__header\"\r\n footerClassName=\"submitValidationSummary__footer\"\r\n Component={SubmitValidationSummary}\r\n formContext={this.props.formContext}\r\n />\r\n )\r\n }\r\n tooltipProps={{\r\n theme: 'validation',\r\n ...this.props.tooltipProps,\r\n }}\r\n >\r\n {this.props.children}\r\n </Button>\r\n );\r\n }\r\n\r\n private handleClick(e: React.MouseEvent<HTMLButtonElement>) {\r\n if (this.props.preventsDefault) {\r\n e.preventDefault();\r\n }\r\n this.props.onClick && this.props.onClick(e);\r\n }\r\n\r\n private isDisabled() {\r\n const disabled = this.getDisabled();\r\n return disabled\r\n ? disabled\r\n : this.props.validateForm && this.props.formContext\r\n ? !this.props.formContext.isFormValid\r\n : false;\r\n }\r\n}\r\n\r\nexport const Submit = withThemeContext<\r\n SubmitProps,\r\n InstanceType<typeof SubmitRaw>\r\n>(withFormContext<SubmitProps>(SubmitRaw), 'submit');\r\n\r\nexport default Submit;\r\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAMA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAC,sBAAA,C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AAA,GAAA4G,QAAA"}
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "default", {
10
10
  return _Submit.default;
11
11
  }
12
12
  });
13
-
14
13
  var _Submit = _interopRequireWildcard(require("./Submit"));
15
-
16
14
  Object.keys(_Submit).forEach(function (key) {
17
15
  if (key === "default" || key === "__esModule") return;
18
16
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -24,8 +22,6 @@ Object.keys(_Submit).forEach(function (key) {
24
22
  }
25
23
  });
26
24
  });
27
-
28
25
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
-
30
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/lib/components/submit/index.tsx"],"sourcesContent":["export * from './Submit';\r\nexport { default } from './Submit';\r\n"],"mappings":";;;;;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_Submit","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["../../../src/lib/components/submit/index.tsx"],"sourcesContent":["export * from './Submit';\r\nexport { default } from './Submit';\r\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAJ,OAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,OAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAd,OAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAAyB,SAAAS,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAf,wBAAAmB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAT,GAAA,CAAAM,GAAA,SAAAK,MAAA,WAAAC,qBAAA,GAAAvB,MAAA,CAAAS,cAAA,IAAAT,MAAA,CAAAwB,wBAAA,WAAArB,GAAA,IAAAc,GAAA,QAAAd,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAW,GAAA,EAAAd,GAAA,SAAAsB,IAAA,GAAAF,qBAAA,GAAAvB,MAAA,CAAAwB,wBAAA,CAAAP,GAAA,EAAAd,GAAA,cAAAsB,IAAA,KAAAA,IAAA,CAAAd,GAAA,IAAAc,IAAA,CAAAC,GAAA,KAAA1B,MAAA,CAAAS,cAAA,CAAAa,MAAA,EAAAnB,GAAA,EAAAsB,IAAA,YAAAH,MAAA,CAAAnB,GAAA,IAAAc,GAAA,CAAAd,GAAA,SAAAmB,MAAA,CAAAH,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAM,GAAA,CAAAT,GAAA,EAAAK,MAAA,YAAAA,MAAA"}
@@ -4,30 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _button = _interopRequireDefault(require("../../button"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
12
  var ArrowIcon = function ArrowIcon(props) {
19
13
  return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
20
14
  d: "M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
21
15
  }));
22
16
  };
23
-
24
17
  ArrowIcon.defaultProps = {
25
18
  xmlns: "http://www.w3.org/2000/svg",
26
19
  width: "24",
27
20
  height: "24",
28
21
  viewBox: "0 0 24 24"
29
22
  };
30
-
31
23
  const SubmitValidationSummary = props => {
32
24
  return /*#__PURE__*/React.createElement(React.Fragment, null, props.componentsWithErrors.map((component, index) => {
33
25
  return /*#__PURE__*/React.createElement("div", {
@@ -53,7 +45,6 @@ const SubmitValidationSummary = props => {
53
45
  }, /*#__PURE__*/React.createElement(ArrowIcon, null)));
54
46
  }));
55
47
  };
56
-
57
48
  var _default = SubmitValidationSummary;
58
49
  exports.default = _default;
59
50
  //# sourceMappingURL=SubmitValidationSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitValidationSummary.js","names":["ArrowIcon","SubmitValidationSummary","props","componentsWithErrors","map","component","index","validation","name","flex","componentApi","focus","scrollTo"],"sources":["../../../../src/lib/components/submit/subComponents/SubmitValidationSummary.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { FormValidationSummaryComponentProps } from './../../form/FormValidationSummary';\r\nimport Button from '../../button';\r\nimport * as ArrowIcon from 'material-design-icons/maps/svg/production/ic_my_location_24px.svg';\r\n\r\nexport type SubmitValidationSummaryProps = {} & FormValidationSummaryComponentProps;\r\n\r\nconst SubmitValidationSummary: React.FC<SubmitValidationSummaryProps> = props => {\r\n return (\r\n <React.Fragment>\r\n {props.componentsWithErrors.map((component, index) => {\r\n return (\r\n <div key={index} className=\"submitValidationSummary__item\">\r\n <div className=\"submitValidationSummary__item__header\">\r\n {component.validation.name\r\n ? component.validation.name\r\n : 'unknown'}\r\n </div>\r\n {/*<div className=\"submitValidationSummary__item__errors\">\r\n {component.validation.errors && component.validation.errors.map((err, errIndex) => (\r\n <span\r\n className=\"submitValidationSummary__item__error\"\r\n key={errIndex}\r\n >\r\n {err}\r\n </span>\r\n ))}\r\n </div>*/}\r\n <div style={{ flex: 'auto' }} />\r\n {component.componentApi &&\r\n component.componentApi.focus &&\r\n component.componentApi.scrollTo && (\r\n <Button\r\n icon={true}\r\n className=\"submitValidationSummary__item__locate-button\"\r\n circular={true}\r\n type=\"white\"\r\n small={true}\r\n blank={true}\r\n onClick={() => {\r\n component.componentApi.scrollTo();\r\n component.componentApi.focus();\r\n }}\r\n >\r\n <ArrowIcon />\r\n </Button>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n};\r\n\r\nexport default SubmitValidationSummary;\r\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;IACYA,S,YAAAA,S;;;;;;AAAAA,S;;;;;;;AAIZ,MAAMC,uBAA+D,GAAGC,KAAK,IAAI;EAC/E,oBACE,oBAAC,KAAD,CAAO,QAAP,QACGA,KAAK,CAACC,oBAAN,CAA2BC,GAA3B,CAA+B,CAACC,SAAD,EAAYC,KAAZ,KAAsB;IACpD,oBACE;MAAK,GAAG,EAAEA,KAAV;MAAiB,SAAS,EAAC;IAA3B,gBACE;MAAK,SAAS,EAAC;IAAf,GACGD,SAAS,CAACE,UAAV,CAAqBC,IAArB,GACGH,SAAS,CAACE,UAAV,CAAqBC,IADxB,GAEG,SAHN,CADF,eAgBE;MAAK,KAAK,EAAE;QAAEC,IAAI,EAAE;MAAR;IAAZ,EAhBF,EAiBGJ,SAAS,CAACK,YAAV,IACCL,SAAS,CAACK,YAAV,CAAuBC,KADxB,IAECN,SAAS,CAACK,YAAV,CAAuBE,QAFxB,iBAGG,oBAAC,eAAD;MACE,IAAI,EAAE,IADR;MAEE,SAAS,EAAC,8CAFZ;MAGE,QAAQ,EAAE,IAHZ;MAIE,IAAI,EAAC,OAJP;MAKE,KAAK,EAAE,IALT;MAME,KAAK,EAAE,IANT;MAOE,OAAO,EAAE,MAAM;QACbP,SAAS,CAACK,YAAV,CAAuBE,QAAvB;QACAP,SAAS,CAACK,YAAV,CAAuBC,KAAvB;MACD;IAVH,gBAYE,oBAAC,SAAD,OAZF,CApBN,CADF;EAsCD,CAvCA,CADH,CADF;AA4CD,CA7CD;;eA+CeV,uB"}
1
+ {"version":3,"file":"SubmitValidationSummary.js","names":["React","_interopRequireWildcard","require","_button","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ArrowIcon","props","createElement","d","defaultProps","xmlns","width","height","viewBox","SubmitValidationSummary","Fragment","componentsWithErrors","map","component","index","className","validation","name","style","flex","componentApi","focus","scrollTo","icon","circular","type","small","blank","onClick","_default","exports"],"sources":["../../../../src/lib/components/submit/subComponents/SubmitValidationSummary.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { FormValidationSummaryComponentProps } from './../../form/FormValidationSummary';\r\nimport Button from '../../button';\r\nimport * as ArrowIcon from 'material-design-icons/maps/svg/production/ic_my_location_24px.svg';\r\n\r\nexport type SubmitValidationSummaryProps = {} & FormValidationSummaryComponentProps;\r\n\r\nconst SubmitValidationSummary: React.FC<SubmitValidationSummaryProps> = props => {\r\n return (\r\n <React.Fragment>\r\n {props.componentsWithErrors.map((component, index) => {\r\n return (\r\n <div key={index} className=\"submitValidationSummary__item\">\r\n <div className=\"submitValidationSummary__item__header\">\r\n {component.validation.name\r\n ? component.validation.name\r\n : 'unknown'}\r\n </div>\r\n {/*<div className=\"submitValidationSummary__item__errors\">\r\n {component.validation.errors && component.validation.errors.map((err, errIndex) => (\r\n <span\r\n className=\"submitValidationSummary__item__error\"\r\n key={errIndex}\r\n >\r\n {err}\r\n </span>\r\n ))}\r\n </div>*/}\r\n <div style={{ flex: 'auto' }} />\r\n {component.componentApi &&\r\n component.componentApi.focus &&\r\n component.componentApi.scrollTo && (\r\n <Button\r\n icon={true}\r\n className=\"submitValidationSummary__item__locate-button\"\r\n circular={true}\r\n type=\"white\"\r\n small={true}\r\n blank={true}\r\n onClick={() => {\r\n component.componentApi.scrollTo();\r\n component.componentApi.focus();\r\n }}\r\n >\r\n <ArrowIcon />\r\n </Button>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n};\r\n\r\nexport default SubmitValidationSummary;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAkC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAI,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,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