@commercetools-uikit/date-time-field 19.12.1 → 19.14.0
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.
|
@@ -56,8 +56,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
56
56
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
57
57
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
58
58
|
const sequentialId = utils.createSequentialId('date-time-field-');
|
|
59
|
-
const sequentialErrorsId = utils.createSequentialId('date-time-field-error-')();
|
|
60
|
-
const sequentialWarningsId = utils.createSequentialId('date-time-field-warning-')();
|
|
61
59
|
const hasErrors = errors => {
|
|
62
60
|
var _context;
|
|
63
61
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -93,6 +91,8 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
93
91
|
}
|
|
94
92
|
const hasError = this.props.touched && hasErrors(this.props.errors);
|
|
95
93
|
const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
|
|
94
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
95
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
96
96
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
97
97
|
max: this.props.horizontalConstraint,
|
|
98
98
|
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
@@ -123,15 +123,15 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
123
123
|
horizontalConstraint: "scale"
|
|
124
124
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
125
125
|
"aria-invalid": hasError,
|
|
126
|
-
"aria-errormessage":
|
|
126
|
+
"aria-errormessage": errorsContainerId,
|
|
127
127
|
defaultDaySelectionTime: this.props.defaultDaySelectionTime
|
|
128
128
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
129
|
-
id:
|
|
129
|
+
id: errorsContainerId,
|
|
130
130
|
errors: this.props.errors,
|
|
131
131
|
isVisible: hasError,
|
|
132
132
|
renderError: this.props.renderError
|
|
133
133
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
134
|
-
id:
|
|
134
|
+
id: warningsContainerId,
|
|
135
135
|
warnings: this.props.warnings,
|
|
136
136
|
isVisible: hasWarning,
|
|
137
137
|
renderWarning: this.props.renderWarning
|
|
@@ -189,7 +189,7 @@ DateTimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
189
189
|
var DateTimeField$1 = DateTimeField;
|
|
190
190
|
|
|
191
191
|
// NOTE: This string will be replaced on build time with the package version.
|
|
192
|
-
var version = "19.
|
|
192
|
+
var version = "19.14.0";
|
|
193
193
|
|
|
194
194
|
exports["default"] = DateTimeField$1;
|
|
195
195
|
exports.version = version;
|
|
@@ -55,8 +55,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
55
55
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
56
56
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
57
57
|
const sequentialId = utils.createSequentialId('date-time-field-');
|
|
58
|
-
const sequentialErrorsId = utils.createSequentialId('date-time-field-error-')();
|
|
59
|
-
const sequentialWarningsId = utils.createSequentialId('date-time-field-warning-')();
|
|
60
58
|
const hasErrors = errors => {
|
|
61
59
|
var _context;
|
|
62
60
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -88,6 +86,8 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
88
86
|
if (this.props.hintIcon) ;
|
|
89
87
|
const hasError = this.props.touched && hasErrors(this.props.errors);
|
|
90
88
|
const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
|
|
89
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
90
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
91
91
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
92
92
|
max: this.props.horizontalConstraint,
|
|
93
93
|
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
@@ -118,15 +118,15 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
118
118
|
horizontalConstraint: "scale"
|
|
119
119
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
120
120
|
"aria-invalid": hasError,
|
|
121
|
-
"aria-errormessage":
|
|
121
|
+
"aria-errormessage": errorsContainerId,
|
|
122
122
|
defaultDaySelectionTime: this.props.defaultDaySelectionTime
|
|
123
123
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
124
|
-
id:
|
|
124
|
+
id: errorsContainerId,
|
|
125
125
|
errors: this.props.errors,
|
|
126
126
|
isVisible: hasError,
|
|
127
127
|
renderError: this.props.renderError
|
|
128
128
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
129
|
-
id:
|
|
129
|
+
id: warningsContainerId,
|
|
130
130
|
warnings: this.props.warnings,
|
|
131
131
|
isVisible: hasWarning,
|
|
132
132
|
renderWarning: this.props.renderWarning
|
|
@@ -158,7 +158,7 @@ DateTimeField.propTypes = {};
|
|
|
158
158
|
var DateTimeField$1 = DateTimeField;
|
|
159
159
|
|
|
160
160
|
// NOTE: This string will be replaced on build time with the package version.
|
|
161
|
-
var version = "19.
|
|
161
|
+
var version = "19.14.0";
|
|
162
162
|
|
|
163
163
|
exports["default"] = DateTimeField$1;
|
|
164
164
|
exports.version = version;
|
|
@@ -31,8 +31,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
31
31
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
32
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
33
33
|
const sequentialId = createSequentialId('date-time-field-');
|
|
34
|
-
const sequentialErrorsId = createSequentialId('date-time-field-error-')();
|
|
35
|
-
const sequentialWarningsId = createSequentialId('date-time-field-warning-')();
|
|
36
34
|
const hasErrors = errors => {
|
|
37
35
|
var _context;
|
|
38
36
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -68,6 +66,8 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
68
66
|
}
|
|
69
67
|
const hasError = this.props.touched && hasErrors(this.props.errors);
|
|
70
68
|
const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
|
|
69
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
70
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
71
71
|
return jsx(Constraints.Horizontal, {
|
|
72
72
|
max: this.props.horizontalConstraint,
|
|
73
73
|
children: jsxs(Spacings.Stack, {
|
|
@@ -98,15 +98,15 @@ let DateTimeField = /*#__PURE__*/function (_Component) {
|
|
|
98
98
|
horizontalConstraint: "scale"
|
|
99
99
|
}, filterDataAttributes(this.props)), {}, {
|
|
100
100
|
"aria-invalid": hasError,
|
|
101
|
-
"aria-errormessage":
|
|
101
|
+
"aria-errormessage": errorsContainerId,
|
|
102
102
|
defaultDaySelectionTime: this.props.defaultDaySelectionTime
|
|
103
103
|
})), jsx(FieldErrors, {
|
|
104
|
-
id:
|
|
104
|
+
id: errorsContainerId,
|
|
105
105
|
errors: this.props.errors,
|
|
106
106
|
isVisible: hasError,
|
|
107
107
|
renderError: this.props.renderError
|
|
108
108
|
}), jsx(FieldWarnings, {
|
|
109
|
-
id:
|
|
109
|
+
id: warningsContainerId,
|
|
110
110
|
warnings: this.props.warnings,
|
|
111
111
|
isVisible: hasWarning,
|
|
112
112
|
renderWarning: this.props.renderWarning
|
|
@@ -164,6 +164,6 @@ DateTimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
164
164
|
var DateTimeField$1 = DateTimeField;
|
|
165
165
|
|
|
166
166
|
// NOTE: This string will be replaced on build time with the package version.
|
|
167
|
-
var version = "19.
|
|
167
|
+
var version = "19.14.0";
|
|
168
168
|
|
|
169
169
|
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": "19.
|
|
4
|
+
"version": "19.14.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/date-time-input": "19.
|
|
26
|
-
"@commercetools-uikit/design-system": "19.
|
|
27
|
-
"@commercetools-uikit/field-errors": "19.
|
|
28
|
-
"@commercetools-uikit/field-label": "19.
|
|
29
|
-
"@commercetools-uikit/field-warnings": "19.
|
|
30
|
-
"@commercetools-uikit/spacings": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.14.0",
|
|
25
|
+
"@commercetools-uikit/date-time-input": "19.14.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "19.14.0",
|
|
27
|
+
"@commercetools-uikit/field-errors": "19.14.0",
|
|
28
|
+
"@commercetools-uikit/field-label": "19.14.0",
|
|
29
|
+
"@commercetools-uikit/field-warnings": "19.14.0",
|
|
30
|
+
"@commercetools-uikit/spacings": "19.14.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.14.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"prop-types": "15.8.1",
|