indicator-ui 0.1.88 → 0.1.90

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
@@ -75454,7 +75454,7 @@ __webpack_require__.r(__webpack_exports__);
75454
75454
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
75455
75455
  /* harmony export */ });
75456
75456
  // extracted by mini-css-extract-plugin
75457
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"wrapper":"FormDateRange-module__wrapper___Ysixt","error":"FormDateRange-module__error___rtYwO"});
75457
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"wrapper":"FormDateRange-module__wrapper___Ysixt","empty":"FormDateRange-module__empty___HbKpO","error":"FormDateRange-module__error___rtYwO"});
75458
75458
 
75459
75459
  /***/ }),
75460
75460
 
@@ -75565,14 +75565,13 @@ __webpack_require__.r(__webpack_exports__);
75565
75565
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
75566
75566
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
75567
75567
  /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
75568
- /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
75569
- /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isValid.js");
75570
- /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/format.js");
75571
- /* harmony import */ var _assets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets */ "./src/assets/index.ts");
75572
- /* harmony import */ var _const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/const */ "./src/const/index.ts");
75573
- /* harmony import */ var _InputInnerButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./InputInnerButton */ "./src/ui/formFields/FormDateRangeField/ui/InputInnerButton.tsx");
75574
- /* harmony import */ var _Mask__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Mask */ "./src/ui/formFields/FormDateRangeField/ui/Mask.tsx");
75575
- /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles */ "./src/ui/formFields/FormDateRangeField/styles/index.ts");
75568
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
75569
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/isValid.js");
75570
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/format.js");
75571
+ /* harmony import */ var _const__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/const */ "./src/const/index.ts");
75572
+ /* harmony import */ var _InputInnerButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InputInnerButton */ "./src/ui/formFields/FormDateRangeField/ui/InputInnerButton.tsx");
75573
+ /* harmony import */ var _Mask__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Mask */ "./src/ui/formFields/FormDateRangeField/ui/Mask.tsx");
75574
+ /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles */ "./src/ui/formFields/FormDateRangeField/styles/index.ts");
75576
75575
  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); }
75577
75576
  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; }
75578
75577
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
@@ -75590,7 +75589,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
75590
75589
 
75591
75590
 
75592
75591
 
75593
-
75594
75592
  function FormDateRangeFieldBase(props) {
75595
75593
  var value = props.value,
75596
75594
  onChange = props.onChange,
@@ -75600,29 +75598,28 @@ function FormDateRangeFieldBase(props) {
75600
75598
  outFormat = _props$outFormat === void 0 ? 'yyyy-MM-dd' : _props$outFormat,
75601
75599
  _props$inputFormat = props.inputFormat,
75602
75600
  inputFormat = _props$inputFormat === void 0 ? 'dd.MM.yyyy' : _props$inputFormat,
75603
- _props$text = props.text1,
75604
- text1 = _props$text === void 0 ? 'от' : _props$text,
75605
- _props$text2 = props.text2,
75606
- text2 = _props$text2 === void 0 ? 'до' : _props$text2,
75607
- _props$icon = props.icon1,
75608
- icon1 = _props$icon === void 0 ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_2__.CalendarSVG, {}) : _props$icon,
75609
- _props$icon2 = props.icon2,
75610
- icon2 = _props$icon2 === void 0 ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_2__.CalendarSVG, {}) : _props$icon2,
75611
- _props$placeholder = props.placeholder1,
75612
- placeholder1 = _props$placeholder === void 0 ? 'дд.мм.гггг' : _props$placeholder,
75613
- _props$placeholder2 = props.placeholder2,
75614
- placeholder2 = _props$placeholder2 === void 0 ? 'дд.мм.гггг' : _props$placeholder2;
75601
+ text1 = props.text1,
75602
+ text2 = props.text2,
75603
+ icon1 = props.icon1,
75604
+ icon2 = props.icon2,
75605
+ placeholder1 = props.placeholder1,
75606
+ placeholder2 = props.placeholder2;
75607
+ var isEmptyValue = function isEmptyValue() {
75608
+ return value ? value.find(function (item) {
75609
+ return item;
75610
+ }) === undefined : true;
75611
+ };
75615
75612
  var getDate = function getDate(curValue) {
75616
- var date = (0,date_fns__WEBPACK_IMPORTED_MODULE_7__.parse)(curValue || '', outFormat, new Date());
75617
- if ((0,date_fns__WEBPACK_IMPORTED_MODULE_8__.isValid)(date) && curValue === (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(date, outFormat)) {
75618
- return (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(date, inputFormat);
75613
+ var date = (0,date_fns__WEBPACK_IMPORTED_MODULE_6__.parse)(curValue || '', outFormat, new Date());
75614
+ if ((0,date_fns__WEBPACK_IMPORTED_MODULE_7__.isValid)(date) && curValue === (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.format)(date, outFormat)) {
75615
+ return (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.format)(date, inputFormat);
75619
75616
  }
75620
75617
  return curValue;
75621
75618
  };
75622
75619
  var processDate = function processDate(newValue) {
75623
- var date = (0,date_fns__WEBPACK_IMPORTED_MODULE_7__.parse)(newValue || '', inputFormat, new Date());
75624
- if ((0,date_fns__WEBPACK_IMPORTED_MODULE_8__.isValid)(date) && newValue === (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(date, inputFormat)) {
75625
- return (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(date, outFormat);
75620
+ var date = (0,date_fns__WEBPACK_IMPORTED_MODULE_6__.parse)(newValue || '', inputFormat, new Date());
75621
+ if ((0,date_fns__WEBPACK_IMPORTED_MODULE_7__.isValid)(date) && newValue === (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.format)(date, inputFormat)) {
75622
+ return (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.format)(date, outFormat);
75626
75623
  }
75627
75624
  return newValue;
75628
75625
  };
@@ -75648,27 +75645,27 @@ function FormDateRangeFieldBase(props) {
75648
75645
  };
75649
75646
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
75650
75647
  onBlur: onBlur,
75651
- className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_6__.FormDateRangeStyle.wrapper, _defineProperty({}, _styles__WEBPACK_IMPORTED_MODULE_6__.FormDateRangeStyle.error, error)),
75648
+ className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FormDateRangeStyle.wrapper, _defineProperty(_defineProperty({}, _styles__WEBPACK_IMPORTED_MODULE_5__.FormDateRangeStyle.error, error), _styles__WEBPACK_IMPORTED_MODULE_5__.FormDateRangeStyle.empty, isEmptyValue())),
75652
75649
  tabIndex: -1,
75653
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Mask__WEBPACK_IMPORTED_MODULE_5__.Mask, {
75650
+ children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Mask__WEBPACK_IMPORTED_MODULE_4__.Mask, {
75654
75651
  value: getValue1(),
75655
75652
  onAccept: handleChange1,
75656
75653
  mask: inputFormat,
75657
- blocks: _const__WEBPACK_IMPORTED_MODULE_3__.DATE_IMASK_BLOCKS,
75654
+ blocks: _const__WEBPACK_IMPORTED_MODULE_2__.DATE_IMASK_BLOCKS,
75658
75655
  icon: icon1,
75659
75656
  text: text1,
75660
75657
  placeholder: placeholder1
75661
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Mask__WEBPACK_IMPORTED_MODULE_5__.Mask, {
75658
+ }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Mask__WEBPACK_IMPORTED_MODULE_4__.Mask, {
75662
75659
  value: getValue2(),
75663
75660
  onAccept: handleChange2,
75664
75661
  mask: inputFormat,
75665
- blocks: _const__WEBPACK_IMPORTED_MODULE_3__.DATE_IMASK_BLOCKS,
75662
+ blocks: _const__WEBPACK_IMPORTED_MODULE_2__.DATE_IMASK_BLOCKS,
75666
75663
  text: text2,
75667
75664
  icon: icon2,
75668
75665
  placeholder: placeholder2,
75669
75666
  divider: true
75670
75667
  }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("section", {
75671
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputInnerButton__WEBPACK_IMPORTED_MODULE_4__.InputInnerButton, {
75668
+ children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputInnerButton__WEBPACK_IMPORTED_MODULE_3__.InputInnerButton, {
75672
75669
  color: 'gray',
75673
75670
  onClick: clear
75674
75671
  })