@mmb-digital/ds-lilly 0.3.15 → 0.3.16

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/ds-lilly.js CHANGED
@@ -84159,6 +84159,9 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_ = __
84159
84159
  var external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_);
84160
84160
 
84161
84161
  // CONCATENATED MODULE: ./src/utils/hooks.ts
84162
+ // TODO: enable eslint react-hooks/exhaustive-deps
84163
+ /* eslint-disable react-hooks/exhaustive-deps */
84164
+ // TODO: enable eslint @typescript-eslint/ban-ts-comment
84162
84165
  /* eslint-disable @typescript-eslint/ban-ts-comment */
84163
84166
 
84164
84167
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
@@ -96390,6 +96393,8 @@ var DropdownItem = function (_a) {
96390
96393
  };
96391
96394
 
96392
96395
  // CONCATENATED MODULE: ./src/components/Components/CompactButtons/CompactButtons.tsx
96396
+ // TODO: enable eslint react-hooks/exhaustive-deps
96397
+ /* eslint-disable react-hooks/exhaustive-deps */
96393
96398
  var CompactButtons_assign = (undefined && undefined.__assign) || function () {
96394
96399
  CompactButtons_assign = Object.assign || function(t) {
96395
96400
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -96648,6 +96653,8 @@ var ModalContent = function (_a) {
96648
96653
  };
96649
96654
 
96650
96655
  // CONCATENATED MODULE: ./src/components/Components/Modal/ModalDialog.tsx
96656
+ // TODO: enable eslint react-hooks/exhaustive-deps
96657
+ /* eslint-disable react-hooks/exhaustive-deps */
96651
96658
 
96652
96659
 
96653
96660
 
@@ -96728,6 +96735,8 @@ var Modal = function (_a) {
96728
96735
  };
96729
96736
 
96730
96737
  // CONCATENATED MODULE: ./src/components/Components/Modal/Modal.hook.tsx
96738
+ // TODO: enable eslint react-hooks/exhaustive-deps
96739
+ /* eslint-disable react-hooks/exhaustive-deps */
96731
96740
 
96732
96741
 
96733
96742
 
@@ -96958,6 +96967,8 @@ var useToast = function () { return ({
96958
96967
  }); };
96959
96968
 
96960
96969
  // CONCATENATED MODULE: ./src/components/Components/Toast/Toast.tsx
96970
+ // TODO: enable eslint react-hooks/exhaustive-deps
96971
+ /* eslint-disable react-hooks/exhaustive-deps */
96961
96972
  var Toast_assign = (undefined && undefined.__assign) || function () {
96962
96973
  Toast_assign = Object.assign || function(t) {
96963
96974
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -97393,6 +97404,8 @@ var FormField = Object(external_root_React_commonjs2_react_commonjs_react_amd_re
97393
97404
  FormField.displayName = 'forwardRef(FormField)';
97394
97405
 
97395
97406
  // CONCATENATED MODULE: ./src/components/Form/FormControl/FormControl.tsx
97407
+ // TODO: enable eslint react-hooks/exhaustive-deps
97408
+ /* eslint-disable react-hooks/exhaustive-deps */
97396
97409
  var FormControl_assign = (undefined && undefined.__assign) || function () {
97397
97410
  FormControl_assign = Object.assign || function(t) {
97398
97411
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -97495,6 +97508,8 @@ var TextInputControl = Object(external_root_React_commonjs2_react_commonjs_react
97495
97508
  TextInputControl.displayName = 'TextInputControl';
97496
97509
 
97497
97510
  // CONCATENATED MODULE: ./src/components/Form/IntegerInput/IntegerInput.tsx
97511
+ // TODO: enable eslint react-hooks/exhaustive-deps
97512
+ /* eslint-disable react-hooks/exhaustive-deps */
97498
97513
  var IntegerInput_assign = (undefined && undefined.__assign) || function () {
97499
97514
  IntegerInput_assign = Object.assign || function(t) {
97500
97515
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -97591,6 +97606,12 @@ var IntegerInput = function (_a) {
97591
97606
 
97592
97607
 
97593
97608
 
97609
+ var renderTime = function (timeLeft) {
97610
+ var minutes = Math.floor(timeLeft / 60);
97611
+ var secondsLeft = timeLeft % 60;
97612
+ var seconds = secondsLeft < 10 ? "0" + secondsLeft : secondsLeft;
97613
+ return minutes + ":" + seconds;
97614
+ };
97594
97615
  var UserAuth = function (_a) {
97595
97616
  var _b;
97596
97617
  var children = _a.children, mobileKey = _a.mobileKey, resetTimer = _a.resetTimer, state = _a.state, testId = _a.testId, theme = _a.theme, timer = _a.timer, title = _a.title;
@@ -97600,7 +97621,7 @@ var UserAuth = function (_a) {
97600
97621
  var _d = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(''), mobileKeyValue = _d[0], setMobileKeyValue = _d[1];
97601
97622
  var timerAriaRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])(null);
97602
97623
  var isTimerAriaInDOM = useOnScreen(timerAriaRef);
97603
- var setAriaText = function (time, addSeconds) {
97624
+ var setAriaText = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (time, addSeconds) {
97604
97625
  var minutes = Math.floor(time / 60);
97605
97626
  var seconds = time % 60;
97606
97627
  var minutesText = undefined;
@@ -97619,9 +97640,9 @@ var UserAuth = function (_a) {
97619
97640
  }
97620
97641
  return (timer === null || timer === void 0 ? void 0 : timer.aria.timeLeft) + " " + seconds + " " + (timer === null || timer === void 0 ? void 0 : timer.aria.seconds);
97621
97642
  }
97622
- };
97643
+ }, [timer]);
97623
97644
  var _e = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(setAriaText(timeLeft, true)), ariaMessage = _e[0], setAriaMessage = _e[1];
97624
- var isInputVisible = (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.message) && (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.placeholder) && timeLeft > 0;
97645
+ var isInputVisible = state === 'waiting' && !!mobileKey && (timeLeft > 0 || !timer);
97625
97646
  var timeoutRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])();
97626
97647
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
97627
97648
  setTimeLeft((timer === null || timer === void 0 ? void 0 : timer.time) ? timer.time : 0);
@@ -97631,18 +97652,17 @@ var UserAuth = function (_a) {
97631
97652
  setTimeLeft((timer === null || timer === void 0 ? void 0 : timer.time) ? timer.time : 0);
97632
97653
  setMobileKeyValue('');
97633
97654
  }
97634
- }, [resetTimer]);
97655
+ }, [resetTimer, timer]);
97635
97656
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
97636
97657
  if (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.error) {
97637
97658
  setMobileKeyValue('');
97638
97659
  }
97639
97660
  }, [mobileKey]);
97640
97661
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
97641
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97642
- // @ts-ignore
97643
97662
  timeoutRef.current = setTimeout(function () {
97644
- if (ariaMessage === '')
97663
+ if (ariaMessage === '') {
97645
97664
  setAriaMessage(setAriaText(timeLeft, true));
97665
+ }
97646
97666
  var newTime = timeLeft - 1;
97647
97667
  if (timeLeft > 0) {
97648
97668
  var minutes = Math.floor(newTime / 60);
@@ -97660,22 +97680,18 @@ var UserAuth = function (_a) {
97660
97680
  }
97661
97681
  }, 1000);
97662
97682
  return function () {
97663
- clearTimeout(timeoutRef.current);
97683
+ if (timeoutRef.current) {
97684
+ clearTimeout(timeoutRef.current);
97685
+ }
97664
97686
  };
97665
- }, [timeLeft]);
97666
- var renderTime = function () {
97667
- var minutes = Math.floor(timeLeft / 60);
97668
- var secondsLeft = timeLeft % 60;
97669
- var seconds = secondsLeft < 10 ? "0" + secondsLeft : secondsLeft;
97670
- return minutes + ":" + seconds;
97671
- };
97687
+ }, [timeLeft, timer, setAriaText, ariaMessage]);
97672
97688
  var renderLoader = function () { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Loader, null, timer && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], null,
97673
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { role: "timer" }, renderTime()),
97689
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { role: "timer" }, renderTime(timeLeft)),
97674
97690
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: timerAriaRef, "aria-atomic": "true", "aria-live": "assertive", className: classBinder_cx('u-vHide') }, isTimerAriaInDOM && ariaMessage))))); };
97675
- var handleOnChange = function (val) {
97691
+ var handleOnChange = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (val) {
97676
97692
  mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.onChange(mobileKeyValue, val);
97677
97693
  setMobileKeyValue(val);
97678
- };
97694
+ }, [mobileKey, mobileKeyValue]);
97679
97695
  var renderInfoGraphic = function () {
97680
97696
  switch (state) {
97681
97697
  case 'error':
@@ -97702,7 +97718,9 @@ var UserAuth = function (_a) {
97702
97718
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-live": "polite", className: classBinder_cx('c-alert__content') },
97703
97719
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Flex, { direction: "column", justifyContent: isSmall ? 'center' : 'flex-start' },
97704
97720
  title && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-alert__title'), id: identification + "__title" }, title)),
97705
- isInputVisible && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(IntegerInput, { allowLeadingZeros: true, hasAutoFocus: true, "aria-live": "off", error: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.error, label: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.message, maxLength: 8, name: (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.name) || 'mobileKey', placeholder: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.placeholder, theme: classBinder_cx('c-userAuth__mobileKey'), value: mobileKeyValue, onChange: handleOnChange })),
97721
+ isInputVisible && (
97722
+ //TODO: change it with Input2
97723
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(IntegerInput, { allowLeadingZeros: true, hasAutoFocus: true, "aria-live": "off", error: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.error, label: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.message, maxLength: 8, name: (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.name) || 'mobileKey', placeholder: mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.placeholder, theme: classBinder_cx('c-userAuth__mobileKey'), value: mobileKeyValue, onChange: handleOnChange })),
97706
97724
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-alert__text') }, children))))));
97707
97725
  };
97708
97726
 
@@ -97844,6 +97862,8 @@ var Select2Options = function (_a) {
97844
97862
  };
97845
97863
 
97846
97864
  // CONCATENATED MODULE: ./src/components/Form/Autocomplete/Autocomplete.tsx
97865
+ // TODO: enable eslint react-hooks/exhaustive-deps
97866
+ /* eslint-disable react-hooks/exhaustive-deps */
97847
97867
  var Autocomplete_assign = (undefined && undefined.__assign) || function () {
97848
97868
  Autocomplete_assign = Object.assign || function(t) {
97849
97869
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -98212,6 +98232,8 @@ var SelectedOption = function (_a) {
98212
98232
  };
98213
98233
 
98214
98234
  // CONCATENATED MODULE: ./src/components/Form/Autocomplete2/Autocomplete2.tsx
98235
+ // TODO: enable eslint react-hooks/exhaustive-deps
98236
+ /* eslint-disable react-hooks/exhaustive-deps */
98215
98237
  var Autocomplete2_assign = (undefined && undefined.__assign) || function () {
98216
98238
  Autocomplete2_assign = Object.assign || function(t) {
98217
98239
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -103799,6 +103821,8 @@ var SelectMenu = function (_a) {
103799
103821
  };
103800
103822
 
103801
103823
  // CONCATENATED MODULE: ./src/components/Form/SelectControlAutocomplete/SelectControlAutocomplete.tsx
103824
+ // TODO: enable eslint react-hooks/exhaustive-deps
103825
+ /* eslint-disable react-hooks/exhaustive-deps */
103802
103826
  var SelectControlAutocomplete_assign = (undefined && undefined.__assign) || function () {
103803
103827
  SelectControlAutocomplete_assign = Object.assign || function(t) {
103804
103828
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -104353,6 +104377,8 @@ var react_flatpickr_build = __webpack_require__(61);
104353
104377
  var build_default = /*#__PURE__*/__webpack_require__.n(react_flatpickr_build);
104354
104378
 
104355
104379
  // CONCATENATED MODULE: ./src/components/Form/DatePicker/DatePicker.tsx
104380
+ // TODO: enable eslint react-hooks/exhaustive-deps
104381
+ /* eslint-disable react-hooks/exhaustive-deps */
104356
104382
  var DatePicker_assign = (undefined && undefined.__assign) || function () {
104357
104383
  DatePicker_assign = Object.assign || function(t) {
104358
104384
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -104470,6 +104496,8 @@ var ShowPasswordIcon = function (_a) {
104470
104496
  };
104471
104497
 
104472
104498
  // CONCATENATED MODULE: ./src/components/Form/Input2/Input2.tsx
104499
+ // TODO: enable eslint react-hooks/exhaustive-deps
104500
+ /* eslint-disable react-hooks/exhaustive-deps */
104473
104501
  var Input2_assign = (undefined && undefined.__assign) || function () {
104474
104502
  Input2_assign = Object.assign || function(t) {
104475
104503
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -104723,6 +104751,8 @@ var DatePicker2 = function (_a) {
104723
104751
 
104724
104752
 
104725
104753
  // CONCATENATED MODULE: ./src/components/Form/DecimalInput/DecimalInput.tsx
104754
+ // TODO: enable eslint react-hooks/exhaustive-deps
104755
+ /* eslint-disable react-hooks/exhaustive-deps */
104726
104756
  var DecimalInput_assign = (undefined && undefined.__assign) || function () {
104727
104757
  DecimalInput_assign = Object.assign || function(t) {
104728
104758
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -106586,6 +106616,8 @@ function monthSelectPlugin(pluginConfig) {
106586
106616
  };
106587
106617
  }
106588
106618
  // CONCATENATED MODULE: ./src/components/Form/MonthInput/MonthInput.tsx
106619
+ // TODO: enable eslint react-hooks/exhaustive-deps
106620
+ /* eslint-disable react-hooks/exhaustive-deps */
106589
106621
  var MonthInput_assign = (undefined && undefined.__assign) || function () {
106590
106622
  MonthInput_assign = Object.assign || function(t) {
106591
106623
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -107042,6 +107074,8 @@ var RadioGroup = function (_a) {
107042
107074
 
107043
107075
 
107044
107076
  // CONCATENATED MODULE: ./src/components/Form/Select2/Select2.tsx
107077
+ // TODO: enable eslint react-hooks/exhaustive-deps
107078
+ /* eslint-disable react-hooks/exhaustive-deps */
107045
107079
  var Select2_assign = (undefined && undefined.__assign) || function () {
107046
107080
  Select2_assign = Object.assign || function(t) {
107047
107081
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -111071,6 +111105,8 @@ var AreaChart_assign = (undefined && undefined.__assign) || function () {
111071
111105
  };
111072
111106
  return AreaChart_assign.apply(this, arguments);
111073
111107
  };
111108
+ // TODO: enable react-hooks/rules-of-hooks
111109
+ /* eslint-disable react-hooks/rules-of-hooks */
111074
111110
 
111075
111111
 
111076
111112
 
@@ -112550,6 +112586,8 @@ var AppMain = function (_a) {
112550
112586
 
112551
112587
 
112552
112588
  // CONCATENATED MODULE: ./src/components/Layout/Box/Box.tsx
112589
+ // TODO: enable eslint react-hooks/exhaustive-deps
112590
+ /* eslint-disable react-hooks/exhaustive-deps */
112553
112591
 
112554
112592
 
112555
112593
  var Box = function (_a) {