@commercetools-uikit/date-range-field 19.12.0 → 19.13.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-range-field-');
|
|
59
|
-
const sequentialErrorsId = utils.createSequentialId('date-range-field-error-')();
|
|
60
|
-
const sequentialWarningsId = utils.createSequentialId('date-range-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 DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
93
91
|
if (this.props.hintIcon) {
|
|
94
92
|
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.hint === 'string' || /*#__PURE__*/react.isValidElement(this.props.hint), 'DateRangeField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
95
93
|
}
|
|
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, {
|
|
@@ -122,14 +122,14 @@ let DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
122
122
|
horizontalConstraint: "scale"
|
|
123
123
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
124
124
|
"aria-invalid": hasError,
|
|
125
|
-
"aria-errormessage":
|
|
125
|
+
"aria-errormessage": errorsContainerId
|
|
126
126
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
127
|
-
id:
|
|
127
|
+
id: errorsContainerId,
|
|
128
128
|
errors: this.props.errors,
|
|
129
129
|
isVisible: hasError,
|
|
130
130
|
renderError: this.props.renderError
|
|
131
131
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
132
|
-
id:
|
|
132
|
+
id: warningsContainerId,
|
|
133
133
|
warnings: this.props.warnings,
|
|
134
134
|
isVisible: hasWarning,
|
|
135
135
|
renderWarning: this.props.renderWarning
|
|
@@ -185,7 +185,7 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
185
185
|
var DateRangeField$1 = DateRangeField;
|
|
186
186
|
|
|
187
187
|
// NOTE: This string will be replaced on build time with the package version.
|
|
188
|
-
var version = "19.
|
|
188
|
+
var version = "19.13.0";
|
|
189
189
|
|
|
190
190
|
exports["default"] = DateRangeField$1;
|
|
191
191
|
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-range-field-');
|
|
58
|
-
const sequentialErrorsId = utils.createSequentialId('date-range-field-error-')();
|
|
59
|
-
const sequentialWarningsId = utils.createSequentialId('date-range-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 DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
88
86
|
const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
|
|
89
87
|
if (!this.props.isReadOnly) ;
|
|
90
88
|
if (this.props.hintIcon) ;
|
|
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, {
|
|
@@ -117,14 +117,14 @@ let DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
117
117
|
horizontalConstraint: "scale"
|
|
118
118
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
119
119
|
"aria-invalid": hasError,
|
|
120
|
-
"aria-errormessage":
|
|
120
|
+
"aria-errormessage": errorsContainerId
|
|
121
121
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
122
|
-
id:
|
|
122
|
+
id: errorsContainerId,
|
|
123
123
|
errors: this.props.errors,
|
|
124
124
|
isVisible: hasError,
|
|
125
125
|
renderError: this.props.renderError
|
|
126
126
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
127
|
-
id:
|
|
127
|
+
id: warningsContainerId,
|
|
128
128
|
warnings: this.props.warnings,
|
|
129
129
|
isVisible: hasWarning,
|
|
130
130
|
renderWarning: this.props.renderWarning
|
|
@@ -156,7 +156,7 @@ DateRangeField.propTypes = {};
|
|
|
156
156
|
var DateRangeField$1 = DateRangeField;
|
|
157
157
|
|
|
158
158
|
// NOTE: This string will be replaced on build time with the package version.
|
|
159
|
-
var version = "19.
|
|
159
|
+
var version = "19.13.0";
|
|
160
160
|
|
|
161
161
|
exports["default"] = DateRangeField$1;
|
|
162
162
|
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-range-field-');
|
|
34
|
-
const sequentialErrorsId = createSequentialId('date-range-field-error-')();
|
|
35
|
-
const sequentialWarningsId = createSequentialId('date-range-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 DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
68
66
|
if (this.props.hintIcon) {
|
|
69
67
|
process.env.NODE_ENV !== "production" ? warning(typeof this.props.hint === 'string' || /*#__PURE__*/isValidElement(this.props.hint), 'DateRangeField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
70
68
|
}
|
|
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, {
|
|
@@ -97,14 +97,14 @@ let DateRangeField = /*#__PURE__*/function (_Component) {
|
|
|
97
97
|
horizontalConstraint: "scale"
|
|
98
98
|
}, filterDataAttributes(this.props)), {}, {
|
|
99
99
|
"aria-invalid": hasError,
|
|
100
|
-
"aria-errormessage":
|
|
100
|
+
"aria-errormessage": errorsContainerId
|
|
101
101
|
})), jsx(FieldErrors, {
|
|
102
|
-
id:
|
|
102
|
+
id: errorsContainerId,
|
|
103
103
|
errors: this.props.errors,
|
|
104
104
|
isVisible: hasError,
|
|
105
105
|
renderError: this.props.renderError
|
|
106
106
|
}), jsx(FieldWarnings, {
|
|
107
|
-
id:
|
|
107
|
+
id: warningsContainerId,
|
|
108
108
|
warnings: this.props.warnings,
|
|
109
109
|
isVisible: hasWarning,
|
|
110
110
|
renderWarning: this.props.renderWarning
|
|
@@ -160,6 +160,6 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
160
160
|
var DateRangeField$1 = DateRangeField;
|
|
161
161
|
|
|
162
162
|
// NOTE: This string will be replaced on build time with the package version.
|
|
163
|
-
var version = "19.
|
|
163
|
+
var version = "19.13.0";
|
|
164
164
|
|
|
165
165
|
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": "19.
|
|
4
|
+
"version": "19.13.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-range-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.13.0",
|
|
25
|
+
"@commercetools-uikit/date-range-input": "19.13.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "19.13.0",
|
|
27
|
+
"@commercetools-uikit/field-errors": "19.13.0",
|
|
28
|
+
"@commercetools-uikit/field-label": "19.13.0",
|
|
29
|
+
"@commercetools-uikit/field-warnings": "19.13.0",
|
|
30
|
+
"@commercetools-uikit/spacings": "19.13.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.13.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"prop-types": "15.8.1",
|