guestbell-forms 2.0.297 → 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 +135 -177
- 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 +190 -216
- 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,11 +1,9 @@
|
|
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.defaultTagsTranslations = exports.default = exports.TagsRaw = exports.Tags = void 0;
|
9
7
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
11
9
|
|
@@ -13,7 +11,7 @@ var _InputGroup = require("../inputGroup/InputGroup");
|
|
13
11
|
|
14
12
|
var _Text = require("../text/Text");
|
15
13
|
|
16
|
-
var
|
14
|
+
var _BaseInput = require("../base/input/BaseInput");
|
17
15
|
|
18
16
|
var _Button = require("../button/Button");
|
19
17
|
|
@@ -31,43 +29,15 @@ var _Portal = _interopRequireDefault(require("@material-ui/core/Portal"));
|
|
31
29
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
33
31
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
35
|
-
|
36
|
-
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; }
|
37
|
-
|
38
|
-
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); }
|
39
|
-
|
40
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
41
|
-
|
42
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
43
|
-
|
44
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
45
|
-
|
46
|
-
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); } }
|
47
|
-
|
48
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
49
|
-
|
50
|
-
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
32
|
+
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); }
|
51
33
|
|
52
|
-
function
|
34
|
+
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; }
|
53
35
|
|
54
|
-
function
|
36
|
+
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); }
|
55
37
|
|
56
|
-
function
|
38
|
+
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; }
|
57
39
|
|
58
|
-
function
|
59
|
-
|
60
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
61
|
-
|
62
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
63
|
-
|
64
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
65
|
-
|
66
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
67
|
-
|
68
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
69
|
-
|
70
|
-
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; }
|
40
|
+
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; }
|
71
41
|
|
72
42
|
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; }
|
73
43
|
|
@@ -97,287 +67,181 @@ LeftArrowIcon.defaultProps = {
|
|
97
67
|
viewBox: "0 0 24 24"
|
98
68
|
};
|
99
69
|
|
100
|
-
|
70
|
+
const defaultTagsTranslations = _objectSpread(_objectSpread({}, _BaseInput.defaultBaseTranslations), {}, {
|
101
71
|
addNew: 'Add new'
|
102
72
|
});
|
103
73
|
|
104
74
|
exports.defaultTagsTranslations = defaultTagsTranslations;
|
105
75
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
}, p.children);
|
112
|
-
};
|
113
|
-
|
114
|
-
var TagsRaw = /*#__PURE__*/function (_BaseInput) {
|
115
|
-
_inherits(TagsRaw, _BaseInput);
|
76
|
+
const TagButtonComponent = p => /*#__PURE__*/React.createElement("a", {
|
77
|
+
className: p.className,
|
78
|
+
id: p.id,
|
79
|
+
onClick: p.onClick
|
80
|
+
}, p.children);
|
116
81
|
|
117
|
-
|
118
|
-
|
119
|
-
function TagsRaw(props) {
|
82
|
+
class TagsRaw extends _BaseInput.BaseInput {
|
83
|
+
constructor(props) {
|
120
84
|
var _this;
|
121
85
|
|
122
|
-
|
123
|
-
|
124
|
-
_this = _super.call(this, props);
|
86
|
+
super(props);
|
87
|
+
_this = this;
|
125
88
|
|
126
|
-
_defineProperty(
|
89
|
+
_defineProperty(this, "textRef", void 0);
|
127
90
|
|
128
|
-
_defineProperty(
|
91
|
+
_defineProperty(this, "suggestionsRef", void 0);
|
129
92
|
|
130
|
-
_defineProperty(
|
93
|
+
_defineProperty(this, "isMobile", false);
|
131
94
|
|
132
|
-
_defineProperty(
|
133
|
-
|
134
|
-
|
135
|
-
textErrors: textErrors
|
136
|
-
};
|
137
|
-
}, function () {
|
138
|
-
return _this.handleErrors();
|
139
|
-
});
|
140
|
-
});
|
95
|
+
_defineProperty(this, "onTextErrorsChanged", textErrors => this.setState(() => ({
|
96
|
+
textErrors
|
97
|
+
}), () => this.handleErrors()));
|
141
98
|
|
142
|
-
_defineProperty(
|
99
|
+
_defineProperty(this, "onFocus", e => {
|
143
100
|
var _this$props$onFocus, _this$props;
|
144
101
|
|
145
|
-
(_this$props$onFocus = (_this$props =
|
102
|
+
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props, e);
|
146
103
|
|
147
|
-
if (!
|
104
|
+
if (!this.state.suggestionsVisible) {
|
148
105
|
var _this$props$onSuggest, _this$props2;
|
149
106
|
|
150
|
-
(_this$props$onSuggest = (_this$props2 =
|
107
|
+
(_this$props$onSuggest = (_this$props2 = this.props).onSuggestionsOpened) === null || _this$props$onSuggest === void 0 ? void 0 : _this$props$onSuggest.call(_this$props2);
|
151
108
|
}
|
152
109
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
return _this.handleErrors();
|
161
|
-
});
|
162
|
-
|
163
|
-
_this.fetchExistingTags(_this.state.value);
|
110
|
+
this.setState(() => ({
|
111
|
+
textIsFocused: true,
|
112
|
+
suggestionsVisible: true,
|
113
|
+
touched: true
|
114
|
+
}), () => this.handleErrors());
|
115
|
+
this.fetchExistingTags(this.state.value);
|
116
|
+
const showMobileVersion = this.props.mobileVersionEnabled && this.isMobile && (this.state.textIsFocused || this.state.suggestionsVisible);
|
164
117
|
|
165
|
-
|
166
|
-
|
167
|
-
if (!showMobileVersion && _this.props.mobileVersionEnabled && _this.isMobile) {
|
168
|
-
setTimeout(function () {
|
118
|
+
if (!showMobileVersion && this.props.mobileVersionEnabled && this.isMobile) {
|
119
|
+
setTimeout(() => {
|
169
120
|
var _this$textRef$current;
|
170
121
|
|
171
|
-
return (_this$textRef$current =
|
122
|
+
return (_this$textRef$current = this.textRef.current) === null || _this$textRef$current === void 0 ? void 0 : _this$textRef$current.focus();
|
172
123
|
}, 100);
|
173
124
|
}
|
174
125
|
});
|
175
126
|
|
176
|
-
_defineProperty(
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
switch (_context.prev = _context.next) {
|
184
|
-
case 0:
|
185
|
-
if (e.key === 'Tab') {
|
186
|
-
_this.setState({
|
187
|
-
suggestionsVisible: false,
|
188
|
-
preselectedSuggestion: undefined
|
189
|
-
});
|
190
|
-
}
|
191
|
-
|
192
|
-
if (!(e.key === 'Enter' && (_this.state.value !== '' || _this.state.preselectedSuggestion !== undefined) && _this.state.textErrors.length === 0)) {
|
193
|
-
_context.next = 19;
|
194
|
-
break;
|
195
|
-
}
|
196
|
-
|
197
|
-
e.preventDefault();
|
198
|
-
e.stopPropagation();
|
199
|
-
existingTag = _this.props.existingTags && _this.props.existingTags.find(function (et) {
|
200
|
-
return et.name === _this.state.value;
|
201
|
-
});
|
202
|
-
|
203
|
-
if (!(_this.state.preselectedSuggestion !== undefined)) {
|
204
|
-
_context.next = 10;
|
205
|
-
break;
|
206
|
-
}
|
207
|
-
|
208
|
-
_this.props.onTagsChanged(_this.props.tags.concat(suggestions[_this.state.preselectedSuggestion]));
|
209
|
-
|
210
|
-
_this.setState({
|
211
|
-
value: '',
|
212
|
-
preselectedSuggestion: undefined
|
213
|
-
}, function () {
|
214
|
-
_this.fetchExistingTags();
|
215
|
-
|
216
|
-
_this.handleErrors();
|
217
|
-
});
|
218
|
-
|
219
|
-
_context.next = 19;
|
220
|
-
break;
|
221
|
-
|
222
|
-
case 10:
|
223
|
-
if (!existingTag) {
|
224
|
-
_context.next = 15;
|
225
|
-
break;
|
226
|
-
}
|
227
|
-
|
228
|
-
_this.props.onTagsChanged(_this.props.tags.concat(existingTag));
|
229
|
-
|
230
|
-
_this.setState({
|
231
|
-
value: ''
|
232
|
-
}, function () {
|
233
|
-
_this.fetchExistingTags();
|
234
|
-
|
235
|
-
_this.handleErrors();
|
236
|
-
});
|
237
|
-
|
238
|
-
_context.next = 19;
|
239
|
-
break;
|
240
|
-
|
241
|
-
case 15:
|
242
|
-
if (!_this.props.allowNew) {
|
243
|
-
_context.next = 19;
|
244
|
-
break;
|
245
|
-
}
|
246
|
-
|
247
|
-
_context.next = 18;
|
248
|
-
return _this.addNewTag();
|
249
|
-
|
250
|
-
case 18:
|
251
|
-
_this.handleErrors();
|
252
|
-
|
253
|
-
case 19:
|
254
|
-
if (suggestions.length > 0 && _this.state.suggestionsVisible) {
|
255
|
-
if (e.key === 'ArrowUp') {
|
256
|
-
preselectedSuggestion = _this.state.preselectedSuggestion === undefined ? suggestions.length - 1 : _this.state.preselectedSuggestion === 0 ? suggestions.length - 1 : _this.state.preselectedSuggestion - 1;
|
257
|
-
|
258
|
-
_this.setState({
|
259
|
-
preselectedSuggestion: preselectedSuggestion
|
260
|
-
});
|
261
|
-
} else if (e.key === 'ArrowDown') {
|
262
|
-
_preselectedSuggestion = _this.state.preselectedSuggestion === undefined ? 0 : _this.state.preselectedSuggestion === suggestions.length - 1 ? 0 : _this.state.preselectedSuggestion + 1;
|
263
|
-
|
264
|
-
_this.setState({
|
265
|
-
preselectedSuggestion: _preselectedSuggestion
|
266
|
-
});
|
267
|
-
} else {
|
268
|
-
_this.setState({
|
269
|
-
preselectedSuggestion: undefined
|
270
|
-
});
|
271
|
-
}
|
272
|
-
}
|
273
|
-
|
274
|
-
case 20:
|
275
|
-
case "end":
|
276
|
-
return _context.stop();
|
277
|
-
}
|
278
|
-
}
|
279
|
-
}, _callee);
|
280
|
-
}));
|
127
|
+
_defineProperty(this, "onKeyDown", suggestions => async e => {
|
128
|
+
if (e.key === 'Tab') {
|
129
|
+
this.setState({
|
130
|
+
suggestionsVisible: false,
|
131
|
+
preselectedSuggestion: undefined
|
132
|
+
});
|
133
|
+
}
|
281
134
|
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
135
|
+
if (e.key === 'Enter' && (this.state.value !== '' || this.state.preselectedSuggestion !== undefined) && this.state.textErrors.length === 0) {
|
136
|
+
e.preventDefault();
|
137
|
+
e.stopPropagation();
|
138
|
+
const existingTag = this.props.existingTags && this.props.existingTags.find(et => et.name === this.state.value);
|
139
|
+
|
140
|
+
if (this.state.preselectedSuggestion !== undefined) {
|
141
|
+
this.props.onTagsChanged(this.props.tags.concat(suggestions[this.state.preselectedSuggestion]));
|
142
|
+
this.setState({
|
143
|
+
value: '',
|
144
|
+
preselectedSuggestion: undefined
|
145
|
+
}, () => {
|
146
|
+
this.fetchExistingTags();
|
147
|
+
this.handleErrors();
|
148
|
+
});
|
149
|
+
} else if (existingTag) {
|
150
|
+
this.props.onTagsChanged(this.props.tags.concat(existingTag));
|
151
|
+
this.setState({
|
152
|
+
value: ''
|
153
|
+
}, () => {
|
154
|
+
this.fetchExistingTags();
|
155
|
+
this.handleErrors();
|
156
|
+
});
|
157
|
+
} else if (this.props.allowNew) {
|
158
|
+
await this.addNewTag();
|
159
|
+
this.handleErrors();
|
160
|
+
}
|
161
|
+
}
|
287
162
|
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
if (newTag) {
|
305
|
-
_this.props.onTagsChanged(_this.props.tags ? _this.props.tags.concat(newTag) : [newTag]);
|
306
|
-
}
|
307
|
-
|
308
|
-
_this.setState({
|
309
|
-
value: '',
|
310
|
-
textErrors: []
|
311
|
-
}, function () {
|
312
|
-
_this.fetchExistingTags();
|
313
|
-
|
314
|
-
_this.handleErrors();
|
315
|
-
});
|
316
|
-
|
317
|
-
case 6:
|
318
|
-
case "end":
|
319
|
-
return _context2.stop();
|
320
|
-
}
|
163
|
+
if (suggestions.length > 0 && this.state.suggestionsVisible) {
|
164
|
+
if (e.key === 'ArrowUp') {
|
165
|
+
const preselectedSuggestion = this.state.preselectedSuggestion === undefined ? suggestions.length - 1 : this.state.preselectedSuggestion === 0 ? suggestions.length - 1 : this.state.preselectedSuggestion - 1;
|
166
|
+
this.setState({
|
167
|
+
preselectedSuggestion
|
168
|
+
});
|
169
|
+
} else if (e.key === 'ArrowDown') {
|
170
|
+
const preselectedSuggestion = this.state.preselectedSuggestion === undefined ? 0 : this.state.preselectedSuggestion === suggestions.length - 1 ? 0 : this.state.preselectedSuggestion + 1;
|
171
|
+
this.setState({
|
172
|
+
preselectedSuggestion
|
173
|
+
});
|
174
|
+
} else {
|
175
|
+
this.setState({
|
176
|
+
preselectedSuggestion: undefined
|
177
|
+
});
|
321
178
|
}
|
322
|
-
}
|
323
|
-
})
|
179
|
+
}
|
180
|
+
});
|
324
181
|
|
325
|
-
_defineProperty(
|
326
|
-
|
182
|
+
_defineProperty(this, "addNewTag", async () => {
|
183
|
+
const newTag = await this.props.onNewTagAdded(this.state.value);
|
184
|
+
this.setState({
|
185
|
+
suggestionsVisible: this.props.closeSuggestionsAfterCreate ? false : this.state.suggestionsVisible
|
186
|
+
});
|
327
187
|
|
328
|
-
|
188
|
+
if (newTag) {
|
189
|
+
this.props.onTagsChanged(this.props.tags ? this.props.tags.concat(newTag) : [newTag]);
|
190
|
+
}
|
329
191
|
|
330
|
-
|
331
|
-
|
192
|
+
this.setState({
|
193
|
+
value: '',
|
194
|
+
textErrors: []
|
195
|
+
}, () => {
|
196
|
+
this.fetchExistingTags();
|
197
|
+
this.handleErrors();
|
198
|
+
});
|
199
|
+
});
|
332
200
|
|
333
|
-
|
201
|
+
_defineProperty(this, "onSuggestionSelected", (tag, lastSelected) => {
|
202
|
+
const newTags = this.props.tags.concat(tag);
|
203
|
+
this.props.onTagsChanged(newTags);
|
204
|
+
const isMax = newTags.length === this.props.maxTags;
|
205
|
+
const finalValue = !this.props.allowNew && !isMax && !lastSelected ? this.state.value : '';
|
206
|
+
this.setState({
|
334
207
|
value: finalValue,
|
335
|
-
suggestionsVisible: isMax ||
|
208
|
+
suggestionsVisible: isMax || this.props.closeSuggestionsAfterCreate ? false : this.state.suggestionsVisible,
|
336
209
|
preselectedSuggestion: undefined,
|
337
210
|
textErrors: []
|
338
|
-
},
|
339
|
-
if (!
|
340
|
-
|
211
|
+
}, () => {
|
212
|
+
if (!this.props.maxTags || this.props.tags.length + 1 < this.props.maxTags) {
|
213
|
+
this.fetchExistingTags(finalValue);
|
341
214
|
}
|
342
215
|
|
343
|
-
|
216
|
+
this.handleErrors();
|
344
217
|
});
|
345
218
|
});
|
346
219
|
|
347
|
-
_defineProperty(
|
220
|
+
_defineProperty(this, "onBlur", () => {
|
348
221
|
var _this$props$onBlur, _this$props3;
|
349
222
|
|
350
|
-
(_this$props$onBlur = (_this$props3 =
|
351
|
-
|
352
|
-
_this.setState({
|
223
|
+
(_this$props$onBlur = (_this$props3 = this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props3);
|
224
|
+
this.setState({
|
353
225
|
textIsFocused: false,
|
354
226
|
preselectedSuggestion: undefined
|
355
|
-
},
|
356
|
-
return _this.handleErrors();
|
357
|
-
});
|
227
|
+
}, () => this.handleErrors());
|
358
228
|
});
|
359
229
|
|
360
|
-
_defineProperty(
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
};
|
370
|
-
}, function () {
|
371
|
-
return _this.handleErrors();
|
372
|
-
});
|
373
|
-
|
374
|
-
_this.fetchExistingTags(e.target.value);
|
230
|
+
_defineProperty(this, "onTextChanged", (e, isValid) => {
|
231
|
+
const value = e.target.value;
|
232
|
+
this.setState(() => ({
|
233
|
+
value,
|
234
|
+
isValid: isValid,
|
235
|
+
textIsValid: isValid,
|
236
|
+
suggestionsVisible: true
|
237
|
+
}), () => this.handleErrors());
|
238
|
+
this.fetchExistingTags(e.target.value);
|
375
239
|
});
|
376
240
|
|
377
|
-
_defineProperty(
|
378
|
-
|
241
|
+
_defineProperty(this, "handleErrors", function () {
|
242
|
+
let tags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.tags;
|
379
243
|
|
380
|
-
|
244
|
+
let errors = _this.getErrors(tags);
|
381
245
|
|
382
246
|
if (errors.length > 0) {
|
383
247
|
_this.setInvalid(errors);
|
@@ -386,35 +250,25 @@ var TagsRaw = /*#__PURE__*/function (_BaseInput) {
|
|
386
250
|
}
|
387
251
|
});
|
388
252
|
|
389
|
-
_defineProperty(
|
390
|
-
|
391
|
-
_this.props.onTagClick && _this.props.onTagClick(tag);
|
392
|
-
};
|
253
|
+
_defineProperty(this, "tagClick", tag => () => {
|
254
|
+
this.props.onTagClick && this.props.onTagClick(tag);
|
393
255
|
});
|
394
256
|
|
395
|
-
_defineProperty(
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
});*/
|
408
|
-
|
409
|
-
|
410
|
-
_this.props.onTagsChanged && _this.props.onTagsChanged(newTags);
|
411
|
-
|
412
|
-
_this.handleErrors(newTags); // this.fetchExistingTags();
|
413
|
-
|
414
|
-
};
|
257
|
+
_defineProperty(this, "tagRemoveClick", tag => e => {
|
258
|
+
e.stopPropagation();
|
259
|
+
const newTags = this.props.tags.filter(sv => sv.id !== tag.id);
|
260
|
+
/*if (newTags.length === 0) {
|
261
|
+
setTimeout(() => this.focus(), 50);
|
262
|
+
}
|
263
|
+
this.setState({
|
264
|
+
suggestionsVisible: false,
|
265
|
+
});*/
|
266
|
+
|
267
|
+
this.props.onTagsChanged && this.props.onTagsChanged(newTags);
|
268
|
+
this.handleErrors(newTags); // this.fetchExistingTags();
|
415
269
|
});
|
416
270
|
|
417
|
-
|
271
|
+
this.state = _objectSpread(_objectSpread({}, this.state), {}, {
|
418
272
|
textErrors: [],
|
419
273
|
textIsFocused: false,
|
420
274
|
suggestionsVisible: false,
|
@@ -422,316 +276,266 @@ var TagsRaw = /*#__PURE__*/function (_BaseInput) {
|
|
422
276
|
textIsValid: false,
|
423
277
|
fetchedExistingTags: []
|
424
278
|
});
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
279
|
+
this.textRef = /*#__PURE__*/React.createRef();
|
280
|
+
this.suggestionsRef = /*#__PURE__*/React.createRef();
|
281
|
+
this.handleClickOutside = this.handleClickOutside.bind(this);
|
282
|
+
this.handleLeaveMobileClick = this.handleLeaveMobileClick.bind(this);
|
429
283
|
|
430
284
|
if (props.mobileVersionEnabled) {
|
431
285
|
var _require;
|
432
286
|
|
433
|
-
|
287
|
+
this.isMobile = (_require = require('react-device-detect')) === null || _require === void 0 ? void 0 : _require.isMobile;
|
434
288
|
}
|
435
|
-
|
436
|
-
return _this;
|
437
289
|
}
|
438
290
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
if (this.textRef.current) {
|
443
|
-
this.textRef.current.focus();
|
444
|
-
}
|
291
|
+
focus() {
|
292
|
+
if (this.textRef.current) {
|
293
|
+
this.textRef.current.focus();
|
445
294
|
}
|
446
|
-
}
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
}
|
295
|
+
}
|
296
|
+
|
297
|
+
componentDidUpdate(oldProps) {
|
298
|
+
if (oldProps.tags !== this.props.tags || oldProps.validators !== this.props.validators || oldProps.customValidators !== this.props.customValidators || oldProps.required !== this.props.required) {
|
299
|
+
this.handleErrors(this.props.tags);
|
452
300
|
}
|
453
|
-
}
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
301
|
+
}
|
302
|
+
|
303
|
+
handleLeaveMobileClick() {
|
304
|
+
this.setState({
|
305
|
+
textIsFocused: false,
|
306
|
+
suggestionsVisible: false,
|
307
|
+
preselectedSuggestion: undefined
|
308
|
+
});
|
309
|
+
}
|
310
|
+
|
311
|
+
handleClickOutside(e) {
|
312
|
+
var _this$containerRef$cu, _this$containerRef$cu2;
|
313
|
+
|
314
|
+
if (!this.containerRef.current || (_this$containerRef$cu = this.containerRef.current.querySelector('.tags-input__tag__wrapper')) !== null && _this$containerRef$cu !== void 0 && _this$containerRef$cu.contains(e.target) || (_this$containerRef$cu2 = this.containerRef.current.querySelector('.tags-input__text-input')) !== null && _this$containerRef$cu2 !== void 0 && _this$containerRef$cu2.contains(e.target) || !this.suggestionsRef.current || this.suggestionsRef.current.contains(e.target)) {
|
315
|
+
return;
|
461
316
|
}
|
462
|
-
}, {
|
463
|
-
key: "handleClickOutside",
|
464
|
-
value: function handleClickOutside(e) {
|
465
|
-
var _this$containerRef$cu,
|
466
|
-
_this$containerRef$cu2,
|
467
|
-
_this2 = this;
|
468
|
-
|
469
|
-
if (!this.containerRef.current || (_this$containerRef$cu = this.containerRef.current.querySelector('.tags-input__tag__wrapper')) !== null && _this$containerRef$cu !== void 0 && _this$containerRef$cu.contains(e.target) || (_this$containerRef$cu2 = this.containerRef.current.querySelector('.tags-input__text-input')) !== null && _this$containerRef$cu2 !== void 0 && _this$containerRef$cu2.contains(e.target) || !this.suggestionsRef.current || this.suggestionsRef.current.contains(e.target)) {
|
470
|
-
return;
|
471
|
-
}
|
472
317
|
|
473
|
-
|
474
|
-
|
318
|
+
if (this.state.suggestionsVisible) {
|
319
|
+
var _this$props$onSuggest2, _this$props4;
|
475
320
|
|
476
|
-
|
477
|
-
|
321
|
+
(_this$props$onSuggest2 = (_this$props4 = this.props).onSuggestionsClosed) === null || _this$props$onSuggest2 === void 0 ? void 0 : _this$props$onSuggest2.call(_this$props4);
|
322
|
+
}
|
478
323
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
324
|
+
this.setState({
|
325
|
+
suggestionsVisible: false,
|
326
|
+
preselectedSuggestion: undefined
|
327
|
+
});
|
483
328
|
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
return s.name === _this2.state.value;
|
488
|
-
});
|
329
|
+
if (this.props.addNewOnBlur && this.state.value) {
|
330
|
+
const suggestions = this.getSuggestions();
|
331
|
+
const existing = suggestions.find(s => s.name === this.state.value);
|
489
332
|
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
}
|
333
|
+
if (existing) {
|
334
|
+
this.onSuggestionSelected(existing, suggestions.length === 1);
|
335
|
+
} else if (this.props.allowNew) {
|
336
|
+
this.addNewTag();
|
495
337
|
}
|
496
|
-
/* else if (this.state.value) {
|
497
|
-
this.setState({ value: '' });
|
498
|
-
}*/
|
499
|
-
|
500
|
-
}
|
501
|
-
}, {
|
502
|
-
key: "componentDidMount",
|
503
|
-
value: function componentDidMount() {
|
504
|
-
document.addEventListener('mousedown', this.handleClickOutside);
|
505
|
-
document.addEventListener('touchstart', this.handleClickOutside);
|
506
|
-
this.handleErrors(this.props.tags);
|
507
338
|
}
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
document.removeEventListener('mousedown', this.handleClickOutside);
|
512
|
-
document.removeEventListener('touchstart', this.handleClickOutside);
|
339
|
+
/* else if (this.state.value) {
|
340
|
+
this.setState({ value: '' });
|
341
|
+
}*/
|
513
342
|
|
514
|
-
|
515
|
-
}
|
516
|
-
}, {
|
517
|
-
key: "render",
|
518
|
-
value: function render() {
|
519
|
-
var _this3 = this;
|
520
|
-
|
521
|
-
var translations = this.getTranslations(defaultTagsTranslations);
|
522
|
-
var textProps = this.props.textProps ? this.props.textProps : {};
|
523
|
-
var suggestions = this.getSuggestions();
|
524
|
-
var showMobileVersion = this.props.mobileVersionEnabled && this.isMobile && (this.state.textIsFocused || this.state.suggestionsVisible);
|
525
|
-
var LeaveMobileButton = showMobileVersion ? /*#__PURE__*/React.createElement(_Button.Button, {
|
526
|
-
className: "tags-input__leaveMobileTagsButton line-height--0",
|
527
|
-
onClick: this.handleLeaveMobileClick,
|
528
|
-
noShadow: true,
|
529
|
-
unobtrusive: true
|
530
|
-
}, /*#__PURE__*/React.createElement(LeftArrowIcon, null)) : undefined;
|
531
|
-
var showInput = Boolean((!this.props.maxTags || this.props.maxTags > (this.props.tags && this.props.tags.length)) && !this.props.readOnly);
|
532
|
-
return /*#__PURE__*/React.createElement(_Portal.default, {
|
533
|
-
container: document.body,
|
534
|
-
disablePortal: !showMobileVersion
|
535
|
-
}, /*#__PURE__*/React.createElement(_InputGroup.InputGroup, {
|
536
|
-
title: this.props.title,
|
537
|
-
tooltip: this.props.tooltip
|
538
|
-
}, /*#__PURE__*/React.createElement("div", _extends({}, this.props.id && {
|
539
|
-
id: this.props.id
|
540
|
-
}, {
|
541
|
-
className: (0, _classnames.default)('input__base tags-input', this.getValidationClass(), this.props.className, {
|
542
|
-
'tags-input--readOnly': this.props.readOnly,
|
543
|
-
'tags-input--hasPlaceholder': this.props.textProps && this.props.textProps.placeholder,
|
544
|
-
'tags-input--mobile': showMobileVersion
|
545
|
-
}),
|
546
|
-
ref: this.containerRef
|
547
|
-
}), showMobileVersion && /*#__PURE__*/React.createElement("div", {
|
548
|
-
className: "tags-input__mobileBackdrop"
|
549
|
-
}), /*#__PURE__*/React.createElement("div", {
|
550
|
-
className: "tags-input__tags__wrapper"
|
551
|
-
}, !showInput && showMobileVersion && LeaveMobileButton, this.props.tags && this.props.tags.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
552
|
-
className: "tags-input__tag__wrapper"
|
553
|
-
}, this.props.tags.map(function (item, index) {
|
554
|
-
return _this3.renderTag(item, index);
|
555
|
-
})) : this.props.readOnly && /*#__PURE__*/React.createElement("div", {
|
556
|
-
className: "tags-input__tag__wrapper"
|
557
|
-
}, /*#__PURE__*/React.createElement("div", {
|
558
|
-
className: "tags-input__tag"
|
559
|
-
}, this.props.readonlyEmptyPlaceholder))), showInput && /*#__PURE__*/React.createElement("div", {
|
560
|
-
className: 'tags-input__tags__wrapper ' + (this.props.readOnly ? 'filled ' : '')
|
561
|
-
}, /*#__PURE__*/React.createElement(_Text.Text, _extends({
|
562
|
-
showClearButton: true
|
563
|
-
}, textProps, this.props.id && {
|
564
|
-
id: this.props.id + '-text-input'
|
565
|
-
}, {
|
566
|
-
ref: this.textRef,
|
567
|
-
required: this.props.tags.length > 0 ? false : this.props.required,
|
568
|
-
className: 'tags-input__text-input ' + (textProps.className ? textProps.className : ''),
|
569
|
-
onKeyDown: this.onKeyDown(suggestions),
|
570
|
-
onErrorsChanged: this.onTextErrorsChanged,
|
571
|
-
onChange: this.onTextChanged,
|
572
|
-
onFocus: this.onFocus,
|
573
|
-
onBlur: this.onBlur,
|
574
|
-
value: this.state.value,
|
575
|
-
readOnly: this.props.readOnly,
|
576
|
-
showValidation: false,
|
577
|
-
ignoreContext: true,
|
578
|
-
validators: this.props.validators,
|
579
|
-
customValidators: this.props.customValidators,
|
580
|
-
before: LeaveMobileButton
|
581
|
-
})), this.state.suggestionsVisible && this.props.showSuggestions && /*#__PURE__*/React.createElement(_TagsSuggestions.default, _extends({}, this.props.id && {
|
582
|
-
id: this.props.id + '-text-input'
|
583
|
-
}, {
|
584
|
-
className: (0, _classnames.default)(this.props.tagsSuggestionsClassName),
|
585
|
-
innerRef: this.suggestionsRef,
|
586
|
-
anchorEl: this.containerRef.current,
|
587
|
-
allowNew: this.props.allowNew,
|
588
|
-
preselectedSuggestion: this.state.preselectedSuggestion,
|
589
|
-
loading: this.state.fetchingExistingTags || this.props.isLoading,
|
590
|
-
LoadingComponent: this.props.suggestionsLoadingComponent,
|
591
|
-
isVisible: this.state.suggestionsVisible,
|
592
|
-
EmptyComponent: this.props.suggestionsEmptyComponent,
|
593
|
-
WaitingForMoreInputComponent: this.props.waitingForMoreInputComponent,
|
594
|
-
isWaitingForMoreInput: this.state.value.length < this.props.minLettersToFetch,
|
595
|
-
tags: suggestions,
|
596
|
-
onSelected: this.onSuggestionSelected,
|
597
|
-
value: this.state.value,
|
598
|
-
AddNewTagComponent: this.props.allowNew && this.state.value !== '' && (!this.props.existingTags || !this.props.existingTags.find(function (e) {
|
599
|
-
return e.name === _this3.state.value;
|
600
|
-
})) && (!this.state.fetchedExistingTags || !this.state.fetchedExistingTags.find(function (e) {
|
601
|
-
return e.name === _this3.state.value;
|
602
|
-
})) && this.state.textIsValid && /*#__PURE__*/React.createElement(_Button.Button, _extends({}, this.props.id && {
|
603
|
-
id: this.props.id + '-add-new-button'
|
604
|
-
}, {
|
605
|
-
className: "tags-input__suggestion tags-input__add-new",
|
606
|
-
dropdown: true,
|
607
|
-
onClick: this.addNewTag
|
608
|
-
}), translations.addNew, " \"", this.state.value, "\""),
|
609
|
-
SuggestionTag: this.props.SuggestionTag,
|
610
|
-
popperProps: this.props.popperProps
|
611
|
-
}))), this.renderDefaultValidation(), this.props.label && /*#__PURE__*/React.createElement("label", {
|
612
|
-
className: this.state.value !== '' || this.state.textIsFocused || this.props.readOnly || this.props.tags.length >= this.props.maxTags || showMobileVersion ? 'label--focused' : ''
|
613
|
-
}, this.renderLabel()))));
|
614
|
-
}
|
615
|
-
}, {
|
616
|
-
key: "getErrors",
|
617
|
-
value: function getErrors(tags) {
|
618
|
-
var errors = [];
|
343
|
+
}
|
619
344
|
|
620
|
-
|
621
|
-
|
622
|
-
|
345
|
+
componentDidMount() {
|
346
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
347
|
+
document.addEventListener('touchstart', this.handleClickOutside);
|
348
|
+
this.handleErrors(this.props.tags);
|
349
|
+
}
|
623
350
|
|
624
|
-
|
625
|
-
|
626
|
-
|
351
|
+
componentWillUnmount() {
|
352
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
353
|
+
document.removeEventListener('touchstart', this.handleClickOutside);
|
354
|
+
super.componentWillUnmount();
|
355
|
+
}
|
627
356
|
|
628
|
-
|
629
|
-
|
630
|
-
|
357
|
+
render() {
|
358
|
+
const translations = this.getTranslations(defaultTagsTranslations);
|
359
|
+
const textProps = this.props.textProps ? this.props.textProps : {};
|
360
|
+
const suggestions = this.getSuggestions();
|
361
|
+
const showMobileVersion = this.props.mobileVersionEnabled && this.isMobile && (this.state.textIsFocused || this.state.suggestionsVisible);
|
362
|
+
const LeaveMobileButton = showMobileVersion ? /*#__PURE__*/React.createElement(_Button.Button, {
|
363
|
+
className: "tags-input__leaveMobileTagsButton line-height--0",
|
364
|
+
onClick: this.handleLeaveMobileClick,
|
365
|
+
noShadow: true,
|
366
|
+
unobtrusive: true
|
367
|
+
}, /*#__PURE__*/React.createElement(LeftArrowIcon, null)) : undefined;
|
368
|
+
const showInput = Boolean((!this.props.maxTags || this.props.maxTags > (this.props.tags && this.props.tags.length)) && !this.props.readOnly);
|
369
|
+
return /*#__PURE__*/React.createElement(_Portal.default, {
|
370
|
+
container: document.body,
|
371
|
+
disablePortal: !showMobileVersion
|
372
|
+
}, /*#__PURE__*/React.createElement(_InputGroup.InputGroup, {
|
373
|
+
title: this.props.title,
|
374
|
+
tooltip: this.props.tooltip
|
375
|
+
}, /*#__PURE__*/React.createElement("div", _extends({}, this.props.id && {
|
376
|
+
id: this.props.id
|
377
|
+
}, {
|
378
|
+
className: (0, _classnames.default)('input__base tags-input', this.getValidationClass(), this.props.className, {
|
379
|
+
'tags-input--readOnly': this.props.readOnly,
|
380
|
+
'tags-input--hasPlaceholder': this.props.textProps && this.props.textProps.placeholder,
|
381
|
+
'tags-input--mobile': showMobileVersion
|
382
|
+
}),
|
383
|
+
ref: this.containerRef
|
384
|
+
}), showMobileVersion && /*#__PURE__*/React.createElement("div", {
|
385
|
+
className: "tags-input__mobileBackdrop"
|
386
|
+
}), /*#__PURE__*/React.createElement("div", {
|
387
|
+
className: "tags-input__tags__wrapper"
|
388
|
+
}, !showInput && showMobileVersion && LeaveMobileButton, this.props.tags && this.props.tags.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
389
|
+
className: "tags-input__tag__wrapper"
|
390
|
+
}, this.props.tags.map((item, index) => this.renderTag(item, index))) : this.props.readOnly && /*#__PURE__*/React.createElement("div", {
|
391
|
+
className: "tags-input__tag__wrapper"
|
392
|
+
}, /*#__PURE__*/React.createElement("div", {
|
393
|
+
className: "tags-input__tag"
|
394
|
+
}, this.props.readonlyEmptyPlaceholder))), showInput && /*#__PURE__*/React.createElement("div", {
|
395
|
+
className: 'tags-input__tags__wrapper ' + (this.props.readOnly ? 'filled ' : '')
|
396
|
+
}, /*#__PURE__*/React.createElement(_Text.Text, _extends({
|
397
|
+
showClearButton: true
|
398
|
+
}, textProps, this.props.id && {
|
399
|
+
id: this.props.id + '-text-input'
|
400
|
+
}, {
|
401
|
+
ref: this.textRef,
|
402
|
+
required: this.props.tags.length > 0 ? false : this.props.required,
|
403
|
+
className: 'tags-input__text-input ' + (textProps.className ? textProps.className : ''),
|
404
|
+
onKeyDown: this.onKeyDown(suggestions),
|
405
|
+
onErrorsChanged: this.onTextErrorsChanged,
|
406
|
+
onChange: this.onTextChanged,
|
407
|
+
onFocus: this.onFocus,
|
408
|
+
onBlur: this.onBlur,
|
409
|
+
value: this.state.value,
|
410
|
+
readOnly: this.props.readOnly,
|
411
|
+
showValidation: false,
|
412
|
+
ignoreContext: true,
|
413
|
+
validators: this.props.validators,
|
414
|
+
customValidators: this.props.customValidators,
|
415
|
+
before: LeaveMobileButton
|
416
|
+
})), this.state.suggestionsVisible && this.props.showSuggestions && /*#__PURE__*/React.createElement(_TagsSuggestions.default, _extends({}, this.props.id && {
|
417
|
+
id: this.props.id + '-text-input'
|
418
|
+
}, {
|
419
|
+
className: (0, _classnames.default)(this.props.tagsSuggestionsClassName),
|
420
|
+
innerRef: this.suggestionsRef,
|
421
|
+
anchorEl: this.containerRef.current,
|
422
|
+
allowNew: this.props.allowNew,
|
423
|
+
preselectedSuggestion: this.state.preselectedSuggestion,
|
424
|
+
loading: this.state.fetchingExistingTags || this.props.isLoading,
|
425
|
+
LoadingComponent: this.props.suggestionsLoadingComponent,
|
426
|
+
isVisible: this.state.suggestionsVisible,
|
427
|
+
EmptyComponent: this.props.suggestionsEmptyComponent,
|
428
|
+
WaitingForMoreInputComponent: this.props.waitingForMoreInputComponent,
|
429
|
+
isWaitingForMoreInput: this.state.value.length < this.props.minLettersToFetch,
|
430
|
+
tags: suggestions,
|
431
|
+
onSelected: this.onSuggestionSelected,
|
432
|
+
value: this.state.value,
|
433
|
+
AddNewTagComponent: this.props.allowNew && this.state.value !== '' && (!this.props.existingTags || !this.props.existingTags.find(e => e.name === this.state.value)) && (!this.state.fetchedExistingTags || !this.state.fetchedExistingTags.find(e => e.name === this.state.value)) && this.state.textIsValid && /*#__PURE__*/React.createElement(_Button.Button, _extends({}, this.props.id && {
|
434
|
+
id: this.props.id + '-add-new-button'
|
435
|
+
}, {
|
436
|
+
className: "tags-input__suggestion tags-input__add-new",
|
437
|
+
dropdown: true,
|
438
|
+
onClick: this.addNewTag
|
439
|
+
}), translations.addNew, " \"", this.state.value, "\""),
|
440
|
+
SuggestionTag: this.props.SuggestionTag,
|
441
|
+
popperProps: this.props.popperProps
|
442
|
+
}))), this.renderDefaultValidation(), this.props.label && /*#__PURE__*/React.createElement("label", {
|
443
|
+
className: this.state.value !== '' || this.state.textIsFocused || this.props.readOnly || this.props.tags.length >= this.props.maxTags || showMobileVersion ? 'label--focused' : ''
|
444
|
+
}, this.renderLabel()))));
|
445
|
+
}
|
631
446
|
|
632
|
-
|
633
|
-
|
634
|
-
}
|
447
|
+
getErrors(tags) {
|
448
|
+
let errors = [];
|
635
449
|
|
636
|
-
|
637
|
-
|
638
|
-
});
|
450
|
+
if (tags.length < this.props.maxTags) {
|
451
|
+
errors = errors.concat(this.state.textErrors);
|
639
452
|
}
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
var _this4 = this;
|
644
|
-
|
645
|
-
var startsWith = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
646
|
-
|
647
|
-
if (this.props.fetchExistingTags && startsWith.length >= this.props.minLettersToFetch) {
|
648
|
-
var timer = setTimeout(function () {
|
649
|
-
return _this4.setState(function () {
|
650
|
-
return {
|
651
|
-
fetchingExistingTags: true
|
652
|
-
};
|
653
|
-
});
|
654
|
-
}, this.props.loadingDelayMs);
|
655
|
-
this.props.fetchExistingTags(startsWith).then(function (fetchedExistingTags) {
|
656
|
-
clearTimeout(timer);
|
657
|
-
|
658
|
-
_this4.setState(function () {
|
659
|
-
return {
|
660
|
-
fetchedExistingTags: fetchedExistingTags,
|
661
|
-
fetchingExistingTags: false
|
662
|
-
};
|
663
|
-
});
|
664
|
-
});
|
665
|
-
}
|
453
|
+
|
454
|
+
if (this.state.value !== '' && tags.length === 0 && this.props.required) {
|
455
|
+
errors = errors.concat(this.getTranslations(this.props.translations).required);
|
666
456
|
}
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
var _this5 = this;
|
671
|
-
|
672
|
-
var existingTags = [].concat(this.props.existingTags ? this.props.existingTags : []).concat(this.state.fetchedExistingTags ? this.state.fetchedExistingTags : []);
|
673
|
-
var filteredTags = this.props.filterExistingTags(this.state.value ? this.state.value.toLowerCase() : '', existingTags);
|
674
|
-
var suggestions = filteredTags.filter(function (tag) {
|
675
|
-
return _this5.props.allowSameTagMultipleTimes || !_this5.props.tags.some(function (t) {
|
676
|
-
return t.id === tag.id;
|
677
|
-
});
|
678
|
-
}).slice(0, this.props.maxSuggestions);
|
679
|
-
return suggestions;
|
457
|
+
|
458
|
+
if (this.state.value && this.props.allowNew && !this.state.textIsFocused) {
|
459
|
+
errors = errors.concat(this.props.valueNotAddedError);
|
680
460
|
}
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
461
|
+
|
462
|
+
if (this.props.maxTags < (this.props.tags && this.props.tags.length)) {
|
463
|
+
errors = errors.concat(this.props.maxTagsSurpassedError);
|
464
|
+
}
|
465
|
+
|
466
|
+
return errors.filter(i => i);
|
467
|
+
}
|
468
|
+
|
469
|
+
fetchExistingTags() {
|
470
|
+
let startsWith = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
471
|
+
|
472
|
+
if (this.props.fetchExistingTags && startsWith.length >= this.props.minLettersToFetch) {
|
473
|
+
const timer = setTimeout(() => this.setState(() => ({
|
474
|
+
fetchingExistingTags: true
|
475
|
+
})), this.props.loadingDelayMs);
|
476
|
+
this.props.fetchExistingTags(startsWith).then(fetchedExistingTags => {
|
477
|
+
clearTimeout(timer);
|
478
|
+
this.setState(() => ({
|
479
|
+
fetchedExistingTags,
|
480
|
+
fetchingExistingTags: false
|
481
|
+
}));
|
696
482
|
});
|
483
|
+
}
|
484
|
+
}
|
697
485
|
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
486
|
+
getSuggestions() {
|
487
|
+
const existingTags = [].concat(this.props.existingTags ? this.props.existingTags : []).concat(this.state.fetchedExistingTags ? this.state.fetchedExistingTags : []);
|
488
|
+
const filteredTags = this.props.filterExistingTags(this.state.value ? this.state.value.toLowerCase() : '', existingTags);
|
489
|
+
let suggestions = filteredTags.filter(tag => this.props.allowSameTagMultipleTimes || !this.props.tags.some(t => t.id === tag.id)).slice(0, this.props.maxSuggestions);
|
490
|
+
return suggestions;
|
491
|
+
}
|
492
|
+
|
493
|
+
renderTag(tag, index) {
|
494
|
+
const body = /*#__PURE__*/React.createElement(React.Fragment, null, tag.name, !this.props.readOnly && /*#__PURE__*/React.createElement(_Button.Button, _extends({}, this.props.id && {
|
495
|
+
id: this.props.id + '-tag-' + index.toString()
|
496
|
+
}, {
|
497
|
+
circular: true,
|
498
|
+
blank: true,
|
499
|
+
onClick: this.tagRemoveClick(tag),
|
500
|
+
className: "ml-1 transform-rotate--45 line-height--0 p-0",
|
501
|
+
Component: TagButtonComponent,
|
502
|
+
preventsDefault: false
|
503
|
+
}), /*#__PURE__*/React.createElement(PlusIcon, null)));
|
504
|
+
const className = (0, _classnames.default)('tags-input__tag', {
|
505
|
+
'tags-input__tag-chip': this.props.showChips
|
506
|
+
});
|
706
507
|
|
707
|
-
|
508
|
+
if (this.props.onTagClick) {
|
509
|
+
return /*#__PURE__*/React.createElement(_Button.Button, {
|
708
510
|
onClick: this.tagClick(tag),
|
511
|
+
small: true,
|
709
512
|
className: className,
|
710
513
|
key: index
|
711
514
|
}, body);
|
712
515
|
}
|
713
|
-
}]);
|
714
516
|
|
715
|
-
|
716
|
-
|
517
|
+
return /*#__PURE__*/React.createElement("div", {
|
518
|
+
onClick: this.tagClick(tag),
|
519
|
+
className: className,
|
520
|
+
key: index
|
521
|
+
}, body);
|
522
|
+
}
|
523
|
+
|
524
|
+
}
|
717
525
|
|
718
526
|
exports.TagsRaw = TagsRaw;
|
719
527
|
|
720
|
-
_defineProperty(TagsRaw, "defaultProps", _objectSpread(_objectSpread({},
|
528
|
+
_defineProperty(TagsRaw, "defaultProps", _objectSpread(_objectSpread({}, _BaseInput.BaseInput.defaultProps), {}, {
|
721
529
|
disabled: false,
|
722
530
|
className: '',
|
723
531
|
tags: [],
|
724
532
|
existingTags: [],
|
725
533
|
maxTags: 1000,
|
726
|
-
onTagsChanged:
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
name: newTagName,
|
732
|
-
id: new Date().getTime()
|
733
|
-
});
|
734
|
-
},
|
534
|
+
onTagsChanged: () => undefined,
|
535
|
+
onNewTagAdded: newTagName => Promise.resolve({
|
536
|
+
name: newTagName,
|
537
|
+
id: new Date().getTime()
|
538
|
+
}),
|
735
539
|
valueNotAddedError: /*#__PURE__*/React.createElement("span", null, "You forgot to add tag"),
|
736
540
|
maxTagsSurpassedError: /*#__PURE__*/React.createElement("span", null, "Maximum number of tags surpassed"),
|
737
541
|
waitingForMoreInputComponent: /*#__PURE__*/React.createElement("span", null, "Waiting for more input..."),
|
@@ -741,11 +545,7 @@ _defineProperty(TagsRaw, "defaultProps", _objectSpread(_objectSpread({}, _BaseIn
|
|
741
545
|
}),
|
742
546
|
suggestionsEmptyComponent: 'No existing tags...',
|
743
547
|
loadingDelayMs: 500,
|
744
|
-
filterExistingTags:
|
745
|
-
return tags.filter(function (tag) {
|
746
|
-
return tag.name && tag.name.toLowerCase().startsWith(text);
|
747
|
-
});
|
748
|
-
},
|
548
|
+
filterExistingTags: (text, tags) => tags.filter(tag => tag.name && tag.name.toLowerCase().startsWith(text)),
|
749
549
|
maxSuggestions: 5,
|
750
550
|
addNewOnBlur: false,
|
751
551
|
translations: defaultTagsTranslations,
|
@@ -754,7 +554,7 @@ _defineProperty(TagsRaw, "defaultProps", _objectSpread(_objectSpread({}, _BaseIn
|
|
754
554
|
closeSuggestionsAfterCreate: false
|
755
555
|
}));
|
756
556
|
|
757
|
-
|
557
|
+
const Tags = (0, _withThemeContext.withThemeContext)( // tslint:disable-next-line: no-any
|
758
558
|
(0, _withFormContext.withFormContext)(TagsRaw), 'tags');
|
759
559
|
exports.Tags = Tags;
|
760
560
|
var _default = Tags;
|