@commercetools-uikit/date-time-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-time-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('date-time-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -116,7 +117,7 @@ var DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
116
117
|
badge: this.props.badge,
|
|
117
118
|
hasRequiredIndicator: this.props.isRequired,
|
|
118
119
|
htmlFor: this.state.id
|
|
119
|
-
}), jsxRuntime.jsx(DateTimeInput__default["default"], _objectSpread({
|
|
120
|
+
}), jsxRuntime.jsx(DateTimeInput__default["default"], _objectSpread(_objectSpread({
|
|
120
121
|
id: this.state.id,
|
|
121
122
|
name: this.props.name,
|
|
122
123
|
timeZone: this.props.timeZone,
|
|
@@ -129,7 +130,11 @@ var DateTimeField = /*#__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
|
|
@@ -179,7 +184,7 @@ DateTimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
179
184
|
var DateTimeField$1 = DateTimeField;
|
|
180
185
|
|
|
181
186
|
// NOTE: This string will be replaced on build time with the package version.
|
|
182
|
-
var version = "13.0.
|
|
187
|
+
var version = "13.0.4";
|
|
183
188
|
|
|
184
189
|
exports["default"] = DateTimeField$1;
|
|
185
190
|
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-time-field-');
|
|
61
|
+
var sequentialErrorsId = utils.createSequentialId('date-time-field-error-')();
|
|
61
62
|
|
|
62
63
|
var hasErrors = function hasErrors(errors) {
|
|
63
64
|
var _context;
|
|
@@ -111,7 +112,7 @@ var DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
111
112
|
badge: this.props.badge,
|
|
112
113
|
hasRequiredIndicator: this.props.isRequired,
|
|
113
114
|
htmlFor: this.state.id
|
|
114
|
-
}), jsxRuntime.jsx(DateTimeInput__default["default"], _objectSpread({
|
|
115
|
+
}), jsxRuntime.jsx(DateTimeInput__default["default"], _objectSpread(_objectSpread({
|
|
115
116
|
id: this.state.id,
|
|
116
117
|
name: this.props.name,
|
|
117
118
|
timeZone: this.props.timeZone,
|
|
@@ -124,7 +125,11 @@ var DateTimeField = /*#__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 @@ DateTimeField.propTypes = {};
|
|
|
152
157
|
var DateTimeField$1 = DateTimeField;
|
|
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"] = DateTimeField$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-time-field-');
|
|
37
|
+
var sequentialErrorsId = createSequentialId('date-time-field-error-')();
|
|
37
38
|
|
|
38
39
|
var hasErrors = function hasErrors(errors) {
|
|
39
40
|
var _context;
|
|
@@ -91,7 +92,7 @@ var DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
91
92
|
badge: this.props.badge,
|
|
92
93
|
hasRequiredIndicator: this.props.isRequired,
|
|
93
94
|
htmlFor: this.state.id
|
|
94
|
-
}), jsx(DateTimeInput, _objectSpread({
|
|
95
|
+
}), jsx(DateTimeInput, _objectSpread(_objectSpread({
|
|
95
96
|
id: this.state.id,
|
|
96
97
|
name: this.props.name,
|
|
97
98
|
timeZone: this.props.timeZone,
|
|
@@ -104,7 +105,11 @@ var DateTimeField = /*#__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
|
|
@@ -154,6 +159,6 @@ DateTimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
154
159
|
var DateTimeField$1 = DateTimeField;
|
|
155
160
|
|
|
156
161
|
// NOTE: This string will be replaced on build time with the package version.
|
|
157
|
-
var version = "13.0.
|
|
162
|
+
var version = "13.0.4";
|
|
158
163
|
|
|
159
164
|
export { DateTimeField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-time-field",
|
|
3
3
|
"description": "A controlled date time input component for single date, 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-time-input": "13.0.
|
|
25
|
+
"@commercetools-uikit/date-time-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"
|