fui-material 2.1.13 → 2.2.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.
@@ -2940,15 +2940,15 @@ const FFullDateField = forwardRef(
2940
2940
  );
2941
2941
  }
2942
2942
  );
2943
- const active$2 = "_active_j5nh9_38";
2943
+ const active$2 = "_active_1hrag_40";
2944
2944
  const styles$e = {
2945
- "f-select-search-db": "_f-select-search-db_j5nh9_1",
2946
- "f-select-search-db__input": "_f-select-search-db__input_j5nh9_6",
2947
- "f-select-search-db__input_field": "_f-select-search-db__input_field_j5nh9_10",
2948
- "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_j5nh9_13",
2949
- "f-select-search-db__dropdown": "_f-select-search-db__dropdown_j5nh9_20",
2945
+ "f-select-search-db": "_f-select-search-db_1hrag_1",
2946
+ "f-select-search-db__input": "_f-select-search-db__input_1hrag_6",
2947
+ "f-select-search-db__input_field": "_f-select-search-db__input_field_1hrag_10",
2948
+ "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_1hrag_13",
2949
+ "f-select-search-db__dropdown": "_f-select-search-db__dropdown_1hrag_20",
2950
2950
  active: active$2,
2951
- "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_j5nh9_42"
2951
+ "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_1hrag_44"
2952
2952
  };
2953
2953
  const FSelectSearchDb = ({
2954
2954
  fetchingFunc,
@@ -3166,7 +3166,7 @@ const FSelectSearchDb = ({
3166
3166
  {
3167
3167
  ref: dropdownRef,
3168
3168
  className: `${styles$e["f-select-search-db__dropdown"]} ${isDropdownOpen ? styles$e.active : ""}`,
3169
- children: arrObject.length === 0 && valueInput.trim() === "" ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Введите текст" }) : arrObject.length === 0 && valueInput.trim() !== "" && !load ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Ничего не найдено" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: styles$e["f-select-search-db__dropdown_content"], children: arrObject.slice(0, 10).map((opt, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { onClick: () => handleItemClick(opt), children: selectItem(opt) }, index)) })
3169
+ children: arrObject.length === 0 && valueInput.trim() === "" ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Введите текст" }) : arrObject.length === 0 && valueInput.trim() !== "" && !load ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Ничего не найдено" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: styles$e["f-select-search-db__dropdown_content"], children: arrObject.slice(0, 10).map((opt, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { onMouseDown: () => handleItemClick(opt), children: selectItem(opt) }, index)) })
3170
3170
  }
3171
3171
  ),
3172
3172
  dropdownPortalRef.current
@@ -50047,6 +50047,46 @@ function fDownloadBlobFile(blob, fileName) {
50047
50047
  document.body.removeChild(link2);
50048
50048
  window.URL.revokeObjectURL(url);
50049
50049
  }
50050
+ function fBankRound(value, decimalPlaces) {
50051
+ if (decimalPlaces == void 0) decimalPlaces = 2;
50052
+ const factor = Math.pow(10, decimalPlaces);
50053
+ const roundedValue = Math.round(value * factor) / factor;
50054
+ const strValue = roundedValue.toString();
50055
+ const dotIndex = strValue.indexOf(".");
50056
+ if (dotIndex === -1) {
50057
+ return roundedValue;
50058
+ }
50059
+ const fractionalPart = strValue.slice(dotIndex + 1);
50060
+ if (fractionalPart.length <= decimalPlaces) {
50061
+ return roundedValue;
50062
+ }
50063
+ const nextDigit = fractionalPart[decimalPlaces];
50064
+ if (nextDigit === "5") {
50065
+ const lastDigit = fractionalPart[decimalPlaces - 1];
50066
+ if (+lastDigit % 2 !== 0) {
50067
+ return +(roundedValue + Math.pow(10, -decimalPlaces)).toFixed(decimalPlaces);
50068
+ } else {
50069
+ return +roundedValue.toFixed(decimalPlaces);
50070
+ }
50071
+ }
50072
+ return +roundedValue.toFixed(decimalPlaces);
50073
+ }
50074
+ const fFormatRuNumber = (a, options) => {
50075
+ if (typeof a !== "number" || isNaN(a)) return "";
50076
+ let processedValue = a;
50077
+ if (options == null ? void 0 : options.useBankRound) {
50078
+ const decimalPlaces = options.bankRoundDecimalPlaces;
50079
+ processedValue = fBankRound(processedValue, decimalPlaces);
50080
+ }
50081
+ const formatOptions = {};
50082
+ if ((options == null ? void 0 : options.maximumFractionDigits) !== void 0) {
50083
+ formatOptions.maximumFractionDigits = options.maximumFractionDigits;
50084
+ }
50085
+ if ((options == null ? void 0 : options.minimumFractionDigits) !== void 0) {
50086
+ formatOptions.minimumFractionDigits = options.minimumFractionDigits;
50087
+ }
50088
+ return new Intl.NumberFormat("ru-RU", formatOptions).format(processedValue);
50089
+ };
50050
50090
  function bind(fn, thisArg) {
50051
50091
  return function wrap() {
50052
50092
  return fn.apply(thisArg, arguments);
@@ -52545,6 +52585,7 @@ export {
52545
52585
  FTrashIcon,
52546
52586
  FUnlinkIcon,
52547
52587
  fAlert,
52588
+ fBankRound,
52548
52589
  fConfirm,
52549
52590
  fConvertFileToBase64,
52550
52591
  fDownloadBlobFile,
@@ -52553,6 +52594,7 @@ export {
52553
52594
  fExportTableToExcel,
52554
52595
  fExportingHtmlToDocx,
52555
52596
  fExportingHtmlToXlsx,
52597
+ fFormatRuNumber,
52556
52598
  fGenerateUniqueId,
52557
52599
  fInstallFormatCodeXlsx,
52558
52600
  fNotification,