@commercetools-uikit/date-range-field 13.0.2 → 13.0.4
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.
|
@@ -59,6 +59,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
59
59
|
|
|
60
60
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
61
61
|
var sequentialId = utils.createSequentialId('date-range-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('date-range-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -117,7 +118,7 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
117
118
|
badge: this.props.badge,
|
|
118
119
|
hasRequiredIndicator: this.props.isRequired,
|
|
119
120
|
htmlFor: this.state.id
|
|
120
|
-
}), jsxRuntime.jsx(DateRangeInput__default["default"], _objectSpread({
|
|
121
|
+
}), jsxRuntime.jsx(DateRangeInput__default["default"], _objectSpread(_objectSpread({
|
|
121
122
|
id: this.state.id,
|
|
122
123
|
name: this.props.name,
|
|
123
124
|
value: this.props.value,
|
|
@@ -129,7 +130,11 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
129
130
|
hasError: hasError,
|
|
130
131
|
placeholder: this.props.placeholder,
|
|
131
132
|
horizontalConstraint: "scale"
|
|
132
|
-
}, utils.filterDataAttributes(this.props))
|
|
133
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
134
|
+
"aria-invalid": hasError,
|
|
135
|
+
"aria-errormessage": sequentialErrorsId
|
|
136
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
137
|
+
id: sequentialErrorsId,
|
|
133
138
|
errors: this.props.errors,
|
|
134
139
|
isVisible: hasError,
|
|
135
140
|
renderError: this.props.renderError
|
|
@@ -178,7 +183,7 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
178
183
|
var DateRangeField$1 = DateRangeField;
|
|
179
184
|
|
|
180
185
|
// NOTE: This string will be replaced on build time with the package version.
|
|
181
|
-
var version = "13.0.
|
|
186
|
+
var version = "13.0.4";
|
|
182
187
|
|
|
183
188
|
exports["default"] = DateRangeField$1;
|
|
184
189
|
exports.version = version;
|
|
@@ -58,6 +58,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
58
58
|
|
|
59
59
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
60
60
|
var sequentialId = utils.createSequentialId('date-range-field-');
|
|
61
|
+
var sequentialErrorsId = utils.createSequentialId('date-range-field-error-')();
|
|
61
62
|
|
|
62
63
|
var hasErrors = function hasErrors(errors) {
|
|
63
64
|
var _context;
|
|
@@ -112,7 +113,7 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
badge: this.props.badge,
|
|
113
114
|
hasRequiredIndicator: this.props.isRequired,
|
|
114
115
|
htmlFor: this.state.id
|
|
115
|
-
}), jsxRuntime.jsx(DateRangeInput__default["default"], _objectSpread({
|
|
116
|
+
}), jsxRuntime.jsx(DateRangeInput__default["default"], _objectSpread(_objectSpread({
|
|
116
117
|
id: this.state.id,
|
|
117
118
|
name: this.props.name,
|
|
118
119
|
value: this.props.value,
|
|
@@ -124,7 +125,11 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
124
125
|
hasError: hasError,
|
|
125
126
|
placeholder: this.props.placeholder,
|
|
126
127
|
horizontalConstraint: "scale"
|
|
127
|
-
}, utils.filterDataAttributes(this.props))
|
|
128
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
129
|
+
"aria-invalid": hasError,
|
|
130
|
+
"aria-errormessage": sequentialErrorsId
|
|
131
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
132
|
+
id: sequentialErrorsId,
|
|
128
133
|
errors: this.props.errors,
|
|
129
134
|
isVisible: hasError,
|
|
130
135
|
renderError: this.props.renderError
|
|
@@ -152,7 +157,7 @@ DateRangeField.propTypes = {};
|
|
|
152
157
|
var DateRangeField$1 = DateRangeField;
|
|
153
158
|
|
|
154
159
|
// NOTE: This string will be replaced on build time with the package version.
|
|
155
|
-
var version = "13.0.
|
|
160
|
+
var version = "13.0.4";
|
|
156
161
|
|
|
157
162
|
exports["default"] = DateRangeField$1;
|
|
158
163
|
exports.version = version;
|
|
@@ -34,6 +34,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
34
34
|
|
|
35
35
|
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; } }
|
|
36
36
|
var sequentialId = createSequentialId('date-range-field-');
|
|
37
|
+
var sequentialErrorsId = createSequentialId('date-range-field-error-')();
|
|
37
38
|
|
|
38
39
|
var hasErrors = function hasErrors(errors) {
|
|
39
40
|
var _context;
|
|
@@ -92,7 +93,7 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
92
93
|
badge: this.props.badge,
|
|
93
94
|
hasRequiredIndicator: this.props.isRequired,
|
|
94
95
|
htmlFor: this.state.id
|
|
95
|
-
}), jsx(DateRangeInput, _objectSpread({
|
|
96
|
+
}), jsx(DateRangeInput, _objectSpread(_objectSpread({
|
|
96
97
|
id: this.state.id,
|
|
97
98
|
name: this.props.name,
|
|
98
99
|
value: this.props.value,
|
|
@@ -104,7 +105,11 @@ var DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
104
105
|
hasError: hasError,
|
|
105
106
|
placeholder: this.props.placeholder,
|
|
106
107
|
horizontalConstraint: "scale"
|
|
107
|
-
}, filterDataAttributes(this.props))
|
|
108
|
+
}, filterDataAttributes(this.props)), {}, {
|
|
109
|
+
"aria-invalid": hasError,
|
|
110
|
+
"aria-errormessage": sequentialErrorsId
|
|
111
|
+
})), jsx(FieldErrors, {
|
|
112
|
+
id: sequentialErrorsId,
|
|
108
113
|
errors: this.props.errors,
|
|
109
114
|
isVisible: hasError,
|
|
110
115
|
renderError: this.props.renderError
|
|
@@ -153,6 +158,6 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
153
158
|
var DateRangeField$1 = DateRangeField;
|
|
154
159
|
|
|
155
160
|
// NOTE: This string will be replaced on build time with the package version.
|
|
156
|
-
var version = "13.0.
|
|
161
|
+
var version = "13.0.4";
|
|
157
162
|
|
|
158
163
|
export { DateRangeField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-range-field",
|
|
3
3
|
"description": "A controlled date input component for a date range, with validation states and a label.",
|
|
4
|
-
"version": "13.0.
|
|
4
|
+
"version": "13.0.4",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"@babel/runtime": "7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "7.17.2",
|
|
24
24
|
"@commercetools-uikit/constraints": "13.0.2",
|
|
25
|
-
"@commercetools-uikit/date-range-input": "13.0.
|
|
25
|
+
"@commercetools-uikit/date-range-input": "13.0.4",
|
|
26
26
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
27
|
-
"@commercetools-uikit/field-errors": "13.0.
|
|
28
|
-
"@commercetools-uikit/field-label": "13.0.
|
|
27
|
+
"@commercetools-uikit/field-errors": "13.0.4",
|
|
28
|
+
"@commercetools-uikit/field-label": "13.0.4",
|
|
29
29
|
"@commercetools-uikit/spacings": "13.0.2",
|
|
30
30
|
"@commercetools-uikit/utils": "13.0.2",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|
|
33
33
|
"prop-types": "15.8.1",
|
|
34
|
-
"react-
|
|
34
|
+
"react-intl": "^5.24.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "17.0.2"
|