indicator-ui 0.1.93 → 0.1.94

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/dist/index.js CHANGED
@@ -68248,9 +68248,7 @@ function DateField(_ref) {
68248
68248
  };
68249
68249
  var onSubmit = function onSubmit(value) {
68250
68250
  if (typeof value === 'string') {
68251
- var newDate = (0,_lib__WEBPACK_IMPORTED_MODULE_6__.saveParseDate)(value, {
68252
- from: _ui__WEBPACK_IMPORTED_MODULE_5__.DATE_TYPE_FORMAT
68253
- });
68251
+ var newDate = new Date(value);
68254
68252
  setDateTime(newDate);
68255
68253
  close();
68256
68254
  }
@@ -68616,7 +68614,7 @@ function DateTimeField(_ref) {
68616
68614
  };
68617
68615
  var onSubmit = function onSubmit(value) {
68618
68616
  if (typeof value === 'string') {
68619
- var newDate = (0,_lib__WEBPACK_IMPORTED_MODULE_6__.saveParseDate)(value, {});
68617
+ var newDate = new Date(value);
68620
68618
  setDateTime(newDate);
68621
68619
  close();
68622
68620
  }
@@ -68838,9 +68836,7 @@ function TimeField(_ref) {
68838
68836
  };
68839
68837
  var onSubmit = function onSubmit(value) {
68840
68838
  if (typeof value === 'string') {
68841
- var newDate = (0,_lib__WEBPACK_IMPORTED_MODULE_6__.saveParseDate)(value, {
68842
- from: _ui__WEBPACK_IMPORTED_MODULE_3__.TIME_TYPE_FORMAT
68843
- });
68839
+ var newDate = new Date(value);
68844
68840
  setDateTime(newDate);
68845
68841
  close();
68846
68842
  }
@@ -69320,6 +69316,7 @@ __webpack_require__.r(__webpack_exports__);
69320
69316
  /* harmony import */ var _DateTimeField_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../DateTimeField/styles */ "./src/ui/InputFields/DateTimeField/styles/index.ts");
69321
69317
  /* harmony import */ var _DateTimeField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../DateTimeField */ "./src/ui/InputFields/DateTimeField/index.ts");
69322
69318
  /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/DateTimeRangeField/styles/index.ts");
69319
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/format.js");
69323
69320
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
69324
69321
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
69325
69322
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
@@ -69343,6 +69340,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
69343
69340
 
69344
69341
 
69345
69342
 
69343
+
69346
69344
  function DateRangeField(_ref) {
69347
69345
  var value = _ref.value,
69348
69346
  onChange = _ref.onChange,
@@ -69458,7 +69456,10 @@ function DateRangeField(_ref) {
69458
69456
  };
69459
69457
  var onSubmit = function onSubmit(value) {
69460
69458
  if (Array.isArray(value)) {
69461
- onChange === null || onChange === void 0 || onChange(value);
69459
+ onChange === null || onChange === void 0 || onChange(value.map(function (item) {
69460
+ return item ? (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(item, _ui__WEBPACK_IMPORTED_MODULE_3__.DATE_RANGE_TYPE_FORMAT) : item;
69461
+ }));
69462
+ close();
69462
69463
  }
69463
69464
  };
69464
69465
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {