guestbell-forms 2.0.298 → 2.0.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/InputHeader/InputHeader.js +258 -323
- package/build/components/InputHeader/InputHeader.js.map +1 -1
- package/build/components/InputHeader/InputHeaderContext.js +6 -8
- package/build/components/InputHeader/InputHeaderContext.js.map +1 -1
- package/build/components/InputHeader/index.js +4 -6
- package/build/components/InputHeader/index.js.map +1 -1
- package/build/components/InputHeader/withInputHeaderContext.js +9 -13
- package/build/components/InputHeader/withInputHeaderContext.js.map +1 -1
- package/build/components/base/input/BaseInput.js +334 -418
- package/build/components/base/input/BaseInput.js.map +1 -1
- package/build/components/base/input/index.js +1 -1
- package/build/components/base/input/index.js.map +1 -1
- package/build/components/bookingCalendar/BookingCalendar.js +68 -85
- package/build/components/bookingCalendar/BookingCalendar.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js +40 -71
- package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarControls/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarControls/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarControls/index.js +2 -2
- package/build/components/bookingCalendar/bookingCalendarControls/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js +22 -41
- package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js +2 -2
- package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js +20 -24
- package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarGrid/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarGrid/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js +9 -12
- package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarItem/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarItem/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarItem/index.js +2 -2
- package/build/components/bookingCalendar/bookingCalendarItem/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js +23 -28
- package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLane/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarLane/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLane/index.js +2 -2
- package/build/components/bookingCalendar/bookingCalendarLane/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js +6 -6
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js +12 -16
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js +27 -31
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js +2 -2
- package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js +19 -19
- package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js +133 -175
- package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js +17 -19
- package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.js +1 -1
- package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.js.map +1 -1
- package/build/components/bookingCalendar/classes.js +1 -1
- package/build/components/bookingCalendar/classes.js.map +1 -1
- package/build/components/bookingCalendar/common.js +5 -7
- package/build/components/bookingCalendar/common.js.map +1 -1
- package/build/components/bookingCalendar/index.js +3 -3
- package/build/components/bookingCalendar/index.js.map +1 -1
- package/build/components/bookingCalendar/utils.js +143 -205
- package/build/components/bookingCalendar/utils.js.map +1 -1
- package/build/components/button/Button.js +101 -123
- package/build/components/button/Button.js.map +1 -1
- package/build/components/button/index.js +4 -6
- package/build/components/button/index.js.map +1 -1
- package/build/components/checkbox/Checkbox.js +102 -145
- package/build/components/checkbox/Checkbox.js.map +1 -1
- package/build/components/checkbox/index.js +4 -6
- package/build/components/checkbox/index.js.map +1 -1
- package/build/components/dropdown/Dropdown.js +41 -57
- package/build/components/dropdown/Dropdown.js.map +1 -1
- package/build/components/dropdown/index.js +4 -6
- package/build/components/dropdown/index.js.map +1 -1
- package/build/components/dynamicSubmit/DynamicSubmit.js +81 -123
- package/build/components/dynamicSubmit/DynamicSubmit.js.map +1 -1
- package/build/components/dynamicSubmit/index.js +4 -6
- package/build/components/dynamicSubmit/index.js.map +1 -1
- package/build/components/form/Form.js +139 -193
- package/build/components/form/Form.js.map +1 -1
- package/build/components/form/FormContext.js +6 -8
- package/build/components/form/FormContext.js.map +1 -1
- package/build/components/form/FormValidationSummary.js +57 -105
- package/build/components/form/FormValidationSummary.js.map +1 -1
- package/build/components/form/index.js +5 -7
- package/build/components/form/index.js.map +1 -1
- package/build/components/form/withFormContext.js +9 -13
- package/build/components/form/withFormContext.js.map +1 -1
- package/build/components/inputGroup/InputGroup.js +16 -48
- package/build/components/inputGroup/InputGroup.js.map +1 -1
- package/build/components/inputGroup/index.js +4 -6
- package/build/components/inputGroup/index.js.map +1 -1
- package/build/components/money/Money.js +137 -211
- package/build/components/money/Money.js.map +1 -1
- package/build/components/money/index.js +4 -6
- package/build/components/money/index.js.map +1 -1
- package/build/components/numberInput/NumberInput.js +106 -144
- package/build/components/numberInput/NumberInput.js.map +1 -1
- package/build/components/numberInput/index.js +4 -6
- package/build/components/numberInput/index.js.map +1 -1
- package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js +162 -220
- package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js.map +1 -1
- package/build/components/openingHours/openingHoursDay/index.js +4 -6
- package/build/components/openingHours/openingHoursDay/index.js.map +1 -1
- package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js +114 -191
- package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js.map +1 -1
- package/build/components/openingHours/openingHoursSpecial/index.js +4 -6
- package/build/components/openingHours/openingHoursSpecial/index.js.map +1 -1
- package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js +150 -209
- package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js.map +1 -1
- package/build/components/openingHours/openingHoursWeek/index.js +4 -6
- package/build/components/openingHours/openingHoursWeek/index.js.map +1 -1
- package/build/components/openingHours/utils/OpeningHoursUtil.js +51 -76
- package/build/components/openingHours/utils/OpeningHoursUtil.js.map +1 -1
- package/build/components/radio/Radio.js +38 -75
- package/build/components/radio/Radio.js.map +1 -1
- package/build/components/radio/index.js +4 -6
- package/build/components/radio/index.js.map +1 -1
- package/build/components/radioContainer/RadioContainer.js +19 -49
- package/build/components/radioContainer/RadioContainer.js.map +1 -1
- package/build/components/radioContainer/index.js +4 -6
- package/build/components/radioContainer/index.js.map +1 -1
- package/build/components/select/Select.js +186 -264
- package/build/components/select/Select.js.map +1 -1
- package/build/components/select/index.js +4 -6
- package/build/components/select/index.js.map +1 -1
- package/build/components/submit/Submit.js +50 -87
- package/build/components/submit/Submit.js.map +1 -1
- package/build/components/submit/index.js +4 -6
- package/build/components/submit/index.js.map +1 -1
- package/build/components/submit/subComponents/SubmitValidationSummary.js +5 -7
- package/build/components/submit/subComponents/SubmitValidationSummary.js.map +1 -1
- package/build/components/tags/Tags.js +365 -565
- package/build/components/tags/Tags.js.map +1 -1
- package/build/components/tags/index.js +4 -6
- package/build/components/tags/index.js.map +1 -1
- package/build/components/tags/subComponents/TagsSuggestions.js +29 -30
- package/build/components/tags/subComponents/TagsSuggestions.js.map +1 -1
- package/build/components/text/Text.js +95 -138
- package/build/components/text/Text.js.map +1 -1
- package/build/components/text/index.js +4 -6
- package/build/components/text/index.js.map +1 -1
- package/build/components/textArea/TextArea.js +52 -91
- package/build/components/textArea/TextArea.js.map +1 -1
- package/build/components/textArea/index.js +4 -6
- package/build/components/textArea/index.js.map +1 -1
- package/build/components/themeProvider/ThemeContext.js +6 -8
- package/build/components/themeProvider/ThemeContext.js.map +1 -1
- package/build/components/themeProvider/ThemeProvider.js +3 -5
- package/build/components/themeProvider/ThemeProvider.js.map +1 -1
- package/build/components/themeProvider/index.js +4 -6
- package/build/components/themeProvider/index.js.map +1 -1
- package/build/components/themeProvider/withThemeContext.js +10 -14
- package/build/components/themeProvider/withThemeContext.js.map +1 -1
- package/build/components/time/Time.js +184 -228
- package/build/components/time/Time.js.map +1 -1
- package/build/components/time/index.js +4 -6
- package/build/components/time/index.js.map +1 -1
- package/build/components/timeSpan/TimeSpan.js +226 -280
- package/build/components/timeSpan/TimeSpan.js.map +1 -1
- package/build/components/timeSpan/index.js +4 -6
- package/build/components/timeSpan/index.js.map +1 -1
- package/build/components/utils/Guid.js +3 -5
- package/build/components/utils/Guid.js.map +1 -1
- package/build/components/utils/ShallowEqual.js +5 -11
- package/build/components/utils/ShallowEqual.js.map +1 -1
- package/build/components/utils/TimeUtil.js +8 -22
- package/build/components/utils/TimeUtil.js.map +1 -1
- package/build/components/utils/Typescript.js.map +1 -1
- package/build/dist/guestbell-forms.css +0 -6
- package/build/dist/guestbell-forms.css.map +1 -1
- package/build/dist/guestbell-forms.min.css +1 -1
- package/build/dist/guestbell-forms.min.js +1 -1
- package/build/dist/guestbell-forms.min.js.map +1 -1
- package/build/dist/report.html +2 -2
- package/build/index.js +23 -23
- package/build/index.js.map +1 -1
- package/build/types/ElementOverrideProp.js.map +1 -1
- package/build/types/Theme.js.map +1 -1
- package/build/types/ThemeOverrides.js.map +1 -1
- package/build/validators/EmailValidator.js +8 -22
- package/build/validators/EmailValidator.js.map +1 -1
- package/build/validators/LatitudeValidator.js +13 -27
- package/build/validators/LatitudeValidator.js.map +1 -1
- package/build/validators/LongitudeValidator.js +13 -27
- package/build/validators/LongitudeValidator.js.map +1 -1
- package/build/validators/NumberValidator.js +27 -39
- package/build/validators/NumberValidator.js.map +1 -1
- package/build/validators/UrlValidator.js +9 -23
- package/build/validators/UrlValidator.js.map +1 -1
- package/build/validators/base.js.map +1 -1
- package/build/validators/index.js +6 -6
- package/build/validators/index.js.map +1 -1
- package/package.json +8 -5
- package/tsconfig.json +0 -1
@@ -1,14 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
8
6
|
var _exportNames = {};
|
9
7
|
Object.defineProperty(exports, "default", {
|
10
8
|
enumerable: true,
|
11
|
-
get: function
|
9
|
+
get: function () {
|
12
10
|
return _Select.default;
|
13
11
|
}
|
14
12
|
});
|
@@ -21,13 +19,13 @@ Object.keys(_Select).forEach(function (key) {
|
|
21
19
|
if (key in exports && exports[key] === _Select[key]) return;
|
22
20
|
Object.defineProperty(exports, key, {
|
23
21
|
enumerable: true,
|
24
|
-
get: function
|
22
|
+
get: function () {
|
25
23
|
return _Select[key];
|
26
24
|
}
|
27
25
|
});
|
28
26
|
});
|
29
27
|
|
30
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
28
|
+
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); }
|
31
29
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
30
|
+
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; }
|
33
31
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/components/select/index.tsx"],"
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/lib/components/select/index.tsx"],"sourcesContent":["export * from './Select';\r\nexport { default } from './Select';\r\n"],"mappings":";;;;;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
@@ -1,15 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
8
|
-
exports.
|
6
|
+
exports.defaultSubmitTranslations = exports.default = exports.SubmitRaw = exports.Submit = void 0;
|
9
7
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
11
9
|
|
12
|
-
var
|
10
|
+
var _BaseInput = require("../base/input/BaseInput");
|
13
11
|
|
14
12
|
var _Button = require("../button/Button");
|
15
13
|
|
@@ -23,111 +21,76 @@ var _withThemeContext = require("../themeProvider/withThemeContext");
|
|
23
21
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
23
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
27
|
-
|
28
|
-
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; }
|
29
|
-
|
30
|
-
function _extends() { _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; }; return _extends.apply(this, arguments); }
|
31
|
-
|
32
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
33
|
-
|
34
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
35
|
-
|
36
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
37
|
-
|
38
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
39
|
-
|
40
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
41
|
-
|
42
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
43
|
-
|
44
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
24
|
+
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); }
|
45
25
|
|
46
|
-
function
|
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; }
|
47
27
|
|
48
|
-
function
|
28
|
+
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); }
|
49
29
|
|
50
|
-
function
|
30
|
+
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; }
|
51
31
|
|
52
|
-
function
|
53
|
-
|
54
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
32
|
+
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; }
|
55
33
|
|
56
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; }
|
57
35
|
|
58
36
|
// Misc
|
59
|
-
|
37
|
+
const defaultSubmitTranslations = _objectSpread(_objectSpread({}, _BaseInput.defaultBaseTranslations), {}, {
|
60
38
|
hangOn: 'Hang on',
|
61
39
|
needsFixing: '... needs fixing'
|
62
40
|
});
|
63
41
|
|
64
42
|
exports.defaultSubmitTranslations = defaultSubmitTranslations;
|
65
43
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
44
|
+
class SubmitRaw extends _BaseInput.BaseInput {
|
45
|
+
constructor(props) {
|
46
|
+
super(props);
|
47
|
+
this.handleClick = this.handleClick.bind(this);
|
48
|
+
}
|
70
49
|
|
71
|
-
|
72
|
-
|
50
|
+
render() {
|
51
|
+
const disabled = this.isDisabled();
|
52
|
+
const translations = this.getTranslations(defaultSubmitTranslations);
|
53
|
+
return /*#__PURE__*/React.createElement(_Button.Button, _extends({}, this.props, {
|
54
|
+
className: `${this.props.className ? this.props.className : ''}`,
|
55
|
+
onClick: this.handleClick,
|
56
|
+
disabled: disabled,
|
57
|
+
buttonProps: _objectSpread(_objectSpread({}, this.props.buttonProps), {}, {
|
58
|
+
type: 'submit',
|
59
|
+
title: disabled ? this.props.disabledTitle : this.props.buttonProps && this.props.buttonProps.title
|
60
|
+
}),
|
61
|
+
tooltip: this.props.tooltip ? this.props.tooltip : this.props.showValidationSummaryTooltip && !this.props.formContext.isFormValid && /*#__PURE__*/React.createElement(_FormValidationSummary.FormValidationSummaryRaw, {
|
62
|
+
title: translations.hangOn,
|
63
|
+
footer: translations.needsFixing,
|
64
|
+
containerClassName: "",
|
65
|
+
headerClassName: "submitValidationSummary__header",
|
66
|
+
footerClassName: "submitValidationSummary__footer",
|
67
|
+
Component: _SubmitValidationSummary.default,
|
68
|
+
formContext: this.props.formContext
|
69
|
+
}),
|
70
|
+
tooltipProps: _objectSpread({
|
71
|
+
theme: 'validation'
|
72
|
+
}, this.props.tooltipProps)
|
73
|
+
}), this.props.children);
|
74
|
+
}
|
73
75
|
|
74
|
-
|
76
|
+
handleClick(e) {
|
77
|
+
if (this.props.preventsDefault) {
|
78
|
+
e.preventDefault();
|
79
|
+
}
|
75
80
|
|
76
|
-
|
77
|
-
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
78
|
-
return _this;
|
81
|
+
this.props.onClick && this.props.onClick(e);
|
79
82
|
}
|
80
83
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
var translations = this.getTranslations(defaultSubmitTranslations);
|
86
|
-
return /*#__PURE__*/React.createElement(_Button.Button, _extends({}, this.props, {
|
87
|
-
className: "".concat(this.props.className ? this.props.className : ''),
|
88
|
-
onClick: this.handleClick,
|
89
|
-
disabled: disabled,
|
90
|
-
buttonProps: _objectSpread(_objectSpread({}, this.props.buttonProps), {}, {
|
91
|
-
type: 'submit',
|
92
|
-
title: disabled ? this.props.disabledTitle : this.props.buttonProps && this.props.buttonProps.title
|
93
|
-
}),
|
94
|
-
tooltip: this.props.tooltip ? this.props.tooltip : this.props.showValidationSummaryTooltip && !this.props.formContext.isFormValid && /*#__PURE__*/React.createElement(_FormValidationSummary.FormValidationSummaryRaw, {
|
95
|
-
title: translations.hangOn,
|
96
|
-
footer: translations.needsFixing,
|
97
|
-
containerClassName: "",
|
98
|
-
headerClassName: "submitValidationSummary__header",
|
99
|
-
footerClassName: "submitValidationSummary__footer",
|
100
|
-
Component: _SubmitValidationSummary.default,
|
101
|
-
formContext: this.props.formContext
|
102
|
-
}),
|
103
|
-
tooltipProps: _objectSpread({
|
104
|
-
theme: 'validation'
|
105
|
-
}, this.props.tooltipProps)
|
106
|
-
}), this.props.children);
|
107
|
-
}
|
108
|
-
}, {
|
109
|
-
key: "handleClick",
|
110
|
-
value: function handleClick(e) {
|
111
|
-
if (this.props.preventsDefault) {
|
112
|
-
e.preventDefault();
|
113
|
-
}
|
114
|
-
|
115
|
-
this.props.onClick && this.props.onClick(e);
|
116
|
-
}
|
117
|
-
}, {
|
118
|
-
key: "isDisabled",
|
119
|
-
value: function isDisabled() {
|
120
|
-
var disabled = this.getDisabled();
|
121
|
-
return disabled ? disabled : this.props.validateForm && this.props.formContext ? !this.props.formContext.isFormValid : false;
|
122
|
-
}
|
123
|
-
}]);
|
84
|
+
isDisabled() {
|
85
|
+
const disabled = this.getDisabled();
|
86
|
+
return disabled ? disabled : this.props.validateForm && this.props.formContext ? !this.props.formContext.isFormValid : false;
|
87
|
+
}
|
124
88
|
|
125
|
-
|
126
|
-
}(_BaseInput2.BaseInput);
|
89
|
+
}
|
127
90
|
|
128
91
|
exports.SubmitRaw = SubmitRaw;
|
129
92
|
|
130
|
-
_defineProperty(SubmitRaw, "defaultProps", Object.assign({},
|
93
|
+
_defineProperty(SubmitRaw, "defaultProps", Object.assign({}, _BaseInput.BaseInput.defaultProps, {
|
131
94
|
validateForm: true,
|
132
95
|
ignoreContext: true,
|
133
96
|
reRendersWhenContextChanges: true,
|
@@ -135,7 +98,7 @@ _defineProperty(SubmitRaw, "defaultProps", Object.assign({}, _BaseInput2.BaseInp
|
|
135
98
|
preventsDefault: true
|
136
99
|
}));
|
137
100
|
|
138
|
-
|
101
|
+
const Submit = (0, _withThemeContext.withThemeContext)((0, _withFormContext.withFormContext)(SubmitRaw), 'submit');
|
139
102
|
exports.Submit = Submit;
|
140
103
|
var _default = Submit;
|
141
104
|
exports.default = _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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,GAAG,KAAKC,UAAL,EAAjB;IACA,MAAMC,YAAY,GAAG,KAAKC,eAAL,CAAqBd,yBAArB,CAArB;IACA,oBACE,oBAAC,cAAD,eACM,KAAKO,KADX;MAEE,SAAS,EAAG,GAAE,KAAKA,KAAL,CAAWQ,SAAX,GAAuB,KAAKR,KAAL,CAAWQ,SAAlC,GAA8C,EAAG,EAFjE;MAGE,OAAO,EAAE,KAAKP,WAHhB;MAIE,QAAQ,EAAEG,QAJZ;MAKE,WAAW,kCACN,KAAKJ,KAAL,CAAWS,WADL;QAETC,IAAI,EAAE,QAFG;QAGTC,KAAK,EAAEP,QAAQ,GACX,KAAKJ,KAAL,CAAWY,aADA,GAEX,KAAKZ,KAAL,CAAWS,WAAX,IAA0B,KAAKT,KAAL,CAAWS,WAAX,CAAuBE;MAL5C,EALb;MAYE,OAAO,EACL,KAAKX,KAAL,CAAWa,OAAX,GACI,KAAKb,KAAL,CAAWa,OADf,GAEI,KAAKb,KAAL,CAAWc,4BAAX,IACA,CAAC,KAAKd,KAAL,CAAWe,WAAX,CAAuBC,WADxB,iBAEE,oBAAC,+CAAD;QACE,KAAK,EAAEV,YAAY,CAACX,MADtB;QAEE,MAAM,EAAEW,YAAY,CAACV,WAFvB;QAGE,kBAAkB,EAAC,EAHrB;QAIE,eAAe,EAAC,iCAJlB;QAKE,eAAe,EAAC,iCALlB;QAME,SAAS,EAAEqB,gCANb;QAOE,WAAW,EAAE,KAAKjB,KAAL,CAAWe;MAP1B,EAjBV;MA4BE,YAAY;QACVG,KAAK,EAAE;MADG,GAEP,KAAKlB,KAAL,CAAWmB,YAFJ;IA5Bd,IAiCG,KAAKnB,KAAL,CAAWoB,QAjCd,CADF;EAqCD;;EAEOnB,WAAW,CAACoB,CAAD,EAAyC;IAC1D,IAAI,KAAKrB,KAAL,CAAWsB,eAAf,EAAgC;MAC9BD,CAAC,CAACE,cAAF;IACD;;IACD,KAAKvB,KAAL,CAAWwB,OAAX,IAAsB,KAAKxB,KAAL,CAAWwB,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,14 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
8
6
|
var _exportNames = {};
|
9
7
|
Object.defineProperty(exports, "default", {
|
10
8
|
enumerable: true,
|
11
|
-
get: function
|
9
|
+
get: function () {
|
12
10
|
return _Submit.default;
|
13
11
|
}
|
14
12
|
});
|
@@ -21,13 +19,13 @@ Object.keys(_Submit).forEach(function (key) {
|
|
21
19
|
if (key in exports && exports[key] === _Submit[key]) return;
|
22
20
|
Object.defineProperty(exports, key, {
|
23
21
|
enumerable: true,
|
24
|
-
get: function
|
22
|
+
get: function () {
|
25
23
|
return _Submit[key];
|
26
24
|
}
|
27
25
|
});
|
28
26
|
});
|
29
27
|
|
30
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
28
|
+
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); }
|
31
29
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
30
|
+
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; }
|
33
31
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/components/submit/index.tsx"],"
|
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,7 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
@@ -13,9 +11,9 @@ var _button = _interopRequireDefault(require("../../button"));
|
|
13
11
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
13
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
14
|
+
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); }
|
17
15
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
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; }
|
19
17
|
|
20
18
|
var ArrowIcon = function ArrowIcon(props) {
|
21
19
|
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
@@ -30,8 +28,8 @@ ArrowIcon.defaultProps = {
|
|
30
28
|
viewBox: "0 0 24 24"
|
31
29
|
};
|
32
30
|
|
33
|
-
|
34
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, props.componentsWithErrors.map(
|
31
|
+
const SubmitValidationSummary = props => {
|
32
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.componentsWithErrors.map((component, index) => {
|
35
33
|
return /*#__PURE__*/React.createElement("div", {
|
36
34
|
key: index,
|
37
35
|
className: "submitValidationSummary__item"
|
@@ -48,7 +46,7 @@ var SubmitValidationSummary = function SubmitValidationSummary(props) {
|
|
48
46
|
type: "white",
|
49
47
|
small: true,
|
50
48
|
blank: true,
|
51
|
-
onClick:
|
49
|
+
onClick: () => {
|
52
50
|
component.componentApi.scrollTo();
|
53
51
|
component.componentApi.focus();
|
54
52
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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"}
|