nexaas-ui-components 1.0.14 → 1.0.17

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
@@ -9,7 +9,7 @@ import { parse, format, set, startOfWeek, endOfWeek, startOfMonth, endOfMonth, s
9
9
  import { Switch, Popover, PopoverButton, PopoverPanel, Listbox, ListboxOptions, Combobox, ListboxOption } from '@headlessui/react';
10
10
  import { Float } from '@headlessui-float/react';
11
11
  import IntlCurrencyInputRaw from 'react-intl-currency-input';
12
- import _debounce from 'lodash/debounce';
12
+ import * as lodashNamespace from 'lodash';
13
13
  import InputMask from 'react-input-mask';
14
14
  import * as ReactModalNamespace from 'react-modal';
15
15
  import { Tooltip } from 'react-tooltip';
@@ -1840,6 +1840,9 @@ function InputMoney({
1840
1840
  );
1841
1841
  }
1842
1842
  InputMoney.displayName = "InputMoney";
1843
+ var lodash = lodashNamespace.default || lodashNamespace;
1844
+ var debounce = lodash.debounce;
1845
+ var debounce_default = debounce;
1843
1846
  function InputNumber({
1844
1847
  label,
1845
1848
  type,
@@ -1881,7 +1884,7 @@ function InputNumber({
1881
1884
  }
1882
1885
  };
1883
1886
  const updateCount = useMemo(() => {
1884
- return _debounce(() => {
1887
+ return debounce_default(() => {
1885
1888
  save();
1886
1889
  }, 1e3);
1887
1890
  }, []);
@@ -2507,7 +2510,7 @@ var SelectField = ({
2507
2510
  isClearable = false,
2508
2511
  onChange,
2509
2512
  required,
2510
- debounce = 0,
2513
+ debounce: debounce2 = 0,
2511
2514
  filterOptions,
2512
2515
  optionsList,
2513
2516
  disabled,
@@ -2546,7 +2549,7 @@ var SelectField = ({
2546
2549
  const loadOptions = (inputValue2) => {
2547
2550
  setLoading(true);
2548
2551
  if (isSearchable && filterOptions) {
2549
- if (debounce && inputValue2.length >= debounce || !debounce) {
2552
+ if (debounce2 && inputValue2.length >= debounce2 || !debounce2) {
2550
2553
  const result = filterOptions(inputValue2);
2551
2554
  setLoading(false);
2552
2555
  return result;
@@ -2605,7 +2608,7 @@ var SelectField = ({
2605
2608
  ) });
2606
2609
  };
2607
2610
  const LoadingMessage = (props) => {
2608
- if (!debounce || debounce && inputValue.length >= debounce) {
2611
+ if (!debounce2 || debounce2 && inputValue.length >= debounce2) {
2609
2612
  return /* @__PURE__ */ jsxs(
2610
2613
  "div",
2611
2614
  {
@@ -2626,20 +2629,20 @@ var SelectField = ({
2626
2629
  ]
2627
2630
  }
2628
2631
  );
2629
- } else if (debounce && inputValue.length < debounce) {
2632
+ } else if (debounce2 && inputValue.length < debounce2) {
2630
2633
  return /* @__PURE__ */ jsxs("div", { className: "p-2 text-neutral-300", children: [
2631
2634
  "Digite ",
2632
- debounce,
2635
+ debounce2,
2633
2636
  " ou mais caracteres para pesquisar"
2634
2637
  ] });
2635
2638
  }
2636
2639
  };
2637
2640
  const NoOptionsMessage = (props) => {
2638
2641
  var _a2;
2639
- if (props.selectProps.inputValue.length == 0 && debounce > 0 || debounce > 0 && props.selectProps.inputValue.length < debounce) {
2642
+ if (props.selectProps.inputValue.length == 0 && debounce2 > 0 || debounce2 > 0 && props.selectProps.inputValue.length < debounce2) {
2640
2643
  return /* @__PURE__ */ jsxs("div", { className: "text-dangerous-500 text-sm", children: [
2641
2644
  "Digite ",
2642
- debounce,
2645
+ debounce2,
2643
2646
  " ou mais caracteres para pesquisar"
2644
2647
  ] });
2645
2648
  } else if (props.selectProps.inputValue.length > 0 && ((_a2 = props == null ? void 0 : props.options) == null ? void 0 : _a2.length) == 0) {
@@ -2702,7 +2705,7 @@ var SelectField = ({
2702
2705
  onBlur: () => setIsFocused(false),
2703
2706
  loadingMessage: () => /* @__PURE__ */ jsx("div", { children: "Carregando" }),
2704
2707
  isLoading: loading,
2705
- defaultOptions: debounce > 0 ? false : optionsList ? options : true,
2708
+ defaultOptions: debounce2 > 0 ? false : optionsList ? options : true,
2706
2709
  loadOptions,
2707
2710
  name: field.name,
2708
2711
  isClearable,