nntc-ui 0.0.41 → 0.0.43

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.
@@ -204,6 +204,22 @@ var ExportTableIcon = (props) => /* @__PURE__ */ jsx36(Icon, { ...props, childre
204
204
  import { jsx as jsx37 } from "react/jsx-runtime";
205
205
  var DownloadIcon = (props) => /* @__PURE__ */ jsx37(Icon, { ...props, children: /* @__PURE__ */ jsx37("path", { d: "M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5z" }) });
206
206
 
207
+ // src/icons/VisibilityIcon.tsx
208
+ import { jsx as jsx38 } from "react/jsx-runtime";
209
+ var VisibilityIcon = (props) => /* @__PURE__ */ jsx38(Icon, { ...props, children: /* @__PURE__ */ jsx38(
210
+ "path",
211
+ {
212
+ d: `M12 6.375C15.75 6.375 18.9525 8.7075 20.25 12C18.9525 15.2925 15.75 17.625 12 17.625C8.25
213
+ 17.625 5.0475 15.2925 3.75 12C5.0475 8.7075 8.25 6.375 12 6.375ZM12 7.875C9.15755 7.87505
214
+ 6.62225 9.47254 5.38477 12C6.62225 14.52746 9.15755 16.12495 12 16.125C14.8425
215
+ 16.125 17.3777 14.5275 18.6152 12C17.3777 9.4725 14.8425 7.875 12 7.875ZM12
216
+ 8.625C13.86 8.625 15.375 10.14 15.375 12C15.375 13.86 13.86 15.375 12 15.375C10.14 15.375
217
+ 8.625 13.86 8.625 12C8.625 10.14 10.14 8.625 12 8.625ZM12 10.125C10.965 10.125 10.125 10.965
218
+ 10.125 12C10.125 13.035 10.965 13.875 12 13.875C13.035 13.875 13.875 13.035
219
+ 13.875 12C13.875 10.965 13.035 10.125 12 10.125Z`
220
+ }
221
+ ) });
222
+
207
223
  export {
208
224
  __export,
209
225
  CheckboxDeselectedIcon,
@@ -241,5 +257,6 @@ export {
241
257
  BookmarkIcon,
242
258
  BookmarkAddIcon,
243
259
  ExportTableIcon,
244
- DownloadIcon
260
+ DownloadIcon,
261
+ VisibilityIcon
245
262
  };
package/icons/index.d.ts CHANGED
@@ -78,4 +78,6 @@ declare const ExportTableIcon: React__default.FC<IconProps>;
78
78
 
79
79
  declare const DownloadIcon: React__default.FC<IconProps>;
80
80
 
81
- export { AddIcon, ArrowDropDownIcon, ArrowDropUpIcon, AttachIcon, BarChartIcon, BookmarkAddIcon, BookmarkIcon, CheckboxDeselectedIcon, CheckboxIcon, CheckboxSeveralIcon, ChevronLeftIcon, ChevronRightIcon, CircleFilledIcon, CloseIcon, DateRangeIcon, DeleteIcon, DoneIcon, DownloadIcon, EditIcon, ExportTableIcon, FileUploadIcon, FilterClearIcon, FilterIcon, FullScreenOffIcon, FullScreenOnIcon, InfoIcon, KeyboardArrowDownIcon, ListIcon, MoreVerticalIcon, SearchIcon, SettingsIcon, SortDownIcon, SortUpIcon, TableChartIcon, UploadIcon, WellIcon };
81
+ declare const VisibilityIcon: React__default.FC<IconProps>;
82
+
83
+ export { AddIcon, ArrowDropDownIcon, ArrowDropUpIcon, AttachIcon, BarChartIcon, BookmarkAddIcon, BookmarkIcon, CheckboxDeselectedIcon, CheckboxIcon, CheckboxSeveralIcon, ChevronLeftIcon, ChevronRightIcon, CircleFilledIcon, CloseIcon, DateRangeIcon, DeleteIcon, DoneIcon, DownloadIcon, EditIcon, ExportTableIcon, FileUploadIcon, FilterClearIcon, FilterIcon, FullScreenOffIcon, FullScreenOnIcon, InfoIcon, KeyboardArrowDownIcon, ListIcon, MoreVerticalIcon, SearchIcon, SettingsIcon, SortDownIcon, SortUpIcon, TableChartIcon, UploadIcon, VisibilityIcon, WellIcon };
package/icons/index.js CHANGED
@@ -34,8 +34,9 @@ import {
34
34
  SortUpIcon,
35
35
  TableChartIcon,
36
36
  UploadIcon,
37
+ VisibilityIcon,
37
38
  WellIcon
38
- } from "../chunk-EOYCTU5A.js";
39
+ } from "../chunk-CVFNR56A.js";
39
40
  export {
40
41
  AddIcon,
41
42
  ArrowDropDownIcon,
@@ -72,5 +73,6 @@ export {
72
73
  SortUpIcon,
73
74
  TableChartIcon,
74
75
  UploadIcon,
76
+ VisibilityIcon,
75
77
  WellIcon
76
78
  };
package/index.d.ts CHANGED
@@ -327,6 +327,7 @@ interface Props$7 {
327
327
  globalSorts?: SortBy[];
328
328
  onFiltersChange?: (filters: FilterBy[]) => void;
329
329
  onSortsChange?: (sorts: SortBy[]) => void;
330
+ additionalHeaderContent?: (headerName: string) => ReactNode;
330
331
  }
331
332
  declare function VirtualTable(props: UiProps<Props$7>): react_jsx_runtime.JSX.Element;
332
333
 
package/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  SortDownIcon,
17
17
  SortUpIcon,
18
18
  __export
19
- } from "./chunk-EOYCTU5A.js";
19
+ } from "./chunk-CVFNR56A.js";
20
20
 
21
21
  // src/components/common/Button/Button.tsx
22
22
  import classnames from "classnames";
@@ -2917,6 +2917,7 @@ function HeaderDropdown(props) {
2917
2917
  items: items2,
2918
2918
  containerRef,
2919
2919
  showUniqueValuesCount,
2920
+ additionalContent,
2920
2921
  children: children2
2921
2922
  } = props;
2922
2923
  const headerResultName = sortAnotherName ?? headerName;
@@ -2967,9 +2968,9 @@ function HeaderDropdown(props) {
2967
2968
  return [...prev.filter((p) => !(p.columnName === headerResultName && p.type === "numberRange"))];
2968
2969
  } else {
2969
2970
  const newResult = [...prev];
2970
- const exist = newResult.find((p) => p.columnName === headerResultName && p.type === "numberRange");
2971
- if (exist) {
2972
- exist.values = values;
2971
+ const existIndex = newResult.findIndex((p) => p.columnName === headerResultName && p.type === "numberRange");
2972
+ if (existIndex !== -1) {
2973
+ newResult[existIndex] = { ...newResult[existIndex], values };
2973
2974
  } else {
2974
2975
  newResult.push({
2975
2976
  columnName: headerResultName,
@@ -2987,9 +2988,9 @@ function HeaderDropdown(props) {
2987
2988
  return [...prev.filter((p) => !(p.columnName === headerResultName && p.type === "dateRange"))];
2988
2989
  } else {
2989
2990
  const newResult = [...prev];
2990
- const exist = newResult.find((p) => p.columnName === headerResultName && p.type === "dateRange");
2991
- if (exist) {
2992
- exist.values = values;
2991
+ const existIndex = newResult.findIndex((p) => p.columnName === headerResultName && p.type === "dateRange");
2992
+ if (existIndex !== -1) {
2993
+ newResult[existIndex] = { ...newResult[existIndex], values };
2993
2994
  } else {
2994
2995
  newResult.push({
2995
2996
  columnName: headerResultName,
@@ -3009,9 +3010,9 @@ function HeaderDropdown(props) {
3009
3010
  });
3010
3011
  setFilterBy((prev) => {
3011
3012
  const newResult = [...prev];
3012
- const exist = newResult.find((p) => p.columnName === headerResultName && p.type === "value");
3013
- if (exist) {
3014
- exist.values = Object.keys(selected5);
3013
+ const existIndex = newResult.findIndex((p) => p.columnName === headerResultName && p.type === "value");
3014
+ if (existIndex !== -1) {
3015
+ newResult[existIndex] = { ...newResult[existIndex], values: Object.keys(selected5) };
3015
3016
  } else {
3016
3017
  newResult.push({ columnName: headerResultName, type: "value", values: Object.keys(selected5) });
3017
3018
  }
@@ -3021,6 +3022,7 @@ function HeaderDropdown(props) {
3021
3022
  const hasAnyFilter = Object.keys(filterSelectedItems).length || sortBy.some((sb) => sb.columnName === headerResultName);
3022
3023
  const { t } = useTranslation();
3023
3024
  return /* @__PURE__ */ jsxs19("div", { className: classnames21(root18), children: [
3025
+ additionalContent?.(headerResultName),
3024
3026
  children2?.(showUniqueValuesCount && /* @__PURE__ */ jsx33("div", { children: `(${filterItems3.length})` })),
3025
3027
  (sortable || filtrationByValue || filtrationByDate || filtrationByNumber) && /* @__PURE__ */ jsx33(
3026
3028
  Popover,
@@ -3235,7 +3237,8 @@ function VirtualTable(props) {
3235
3237
  globalFilters,
3236
3238
  globalSorts,
3237
3239
  onFiltersChange,
3238
- onSortsChange
3240
+ onSortsChange,
3241
+ additionalHeaderContent
3239
3242
  } = props;
3240
3243
  const [filterBy, setFilterBy] = useState16(globalFilters ?? []);
3241
3244
  const [sortBy, setSortBy] = useState16([...globalSorts ?? [], { columnName: "isNew", direction: "desc" }]);
@@ -3424,6 +3427,7 @@ function VirtualTable(props) {
3424
3427
  headerName: header2.column.columnDef.id ?? header2.id,
3425
3428
  containerRef: useTableContainerAsRootForPopup ? tableContainerRef : void 0,
3426
3429
  showUniqueValuesCount,
3430
+ additionalContent: additionalHeaderContent,
3427
3431
  children: (afterNode) => /* @__PURE__ */ jsxs20(
3428
3432
  "div",
3429
3433
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nntc-ui",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "author": "NNTC",
5
5
  "description": "React UI-kit for NNTC",
6
6
  "type": "module",