@addsign/moje-agenda-shared-lib 1.0.1 → 1.0.2

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.
@@ -1315,6 +1315,10 @@ video {
1315
1315
  .\!bg-danger {
1316
1316
  background-color: var(--color-danger) !important;
1317
1317
  }
1318
+ .\!bg-gray-100 {
1319
+ --tw-bg-opacity: 1 !important;
1320
+ background-color: rgb(243 244 246 / var(--tw-bg-opacity)) !important;
1321
+ }
1318
1322
  .\!bg-primary {
1319
1323
  background-color: var(--color-primary) !important;
1320
1324
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect, useCallback } from "react";
2
+ import { useState, useMemo, useEffect, useCallback } from "react";
3
3
  import '../../assets/tailwind.css';/* empty css */
4
4
  import Button from "../Button.js";
5
5
  import { e as MdOutlineFilterAlt, f as MdOutlineFilterAltOff, g as MdSearch, d as MdClose, h as MdArrowBack, i as MdArrowForward, j as MdArrowUpward, k as MdArrowDownward } from "../../index-BMFehNPK.js";
@@ -21703,7 +21703,9 @@ function DataTableServer({
21703
21703
  const [selectedItems, setSelectedItems] = useState([]);
21704
21704
  const [fulltextSearch, setFulltextSearch] = useState("");
21705
21705
  const [filterOptions, setFilterOptions] = useState({});
21706
- const [columnFilters, setColumnFilters] = useState();
21706
+ const [columnFilters, setColumnFilters] = useState(
21707
+ {}
21708
+ );
21707
21709
  const [showColFilters, setShowColFilters] = useState();
21708
21710
  const [sortConfig, setSortConfig] = useState(null);
21709
21711
  const createDataPageable = (response, itemsPerPage) => {
@@ -21721,6 +21723,9 @@ function DataTableServer({
21721
21723
  };
21722
21724
  };
21723
21725
  const [reloadData, setReloadData] = useState(false);
21726
+ const mergedFilters = useMemo(() => {
21727
+ return { ...columnFilters, ...filters };
21728
+ }, [columnFilters, filters]);
21724
21729
  useEffect(() => {
21725
21730
  setReloadData(true);
21726
21731
  }, [
@@ -21743,8 +21748,7 @@ function DataTableServer({
21743
21748
  setIsLoading(true);
21744
21749
  federationContext.apiClient.get(url, {
21745
21750
  params: {
21746
- ...filters,
21747
- ...showColFilters ? columnFilters : {},
21751
+ ...mergedFilters,
21748
21752
  pageSize: itemsPerPageLocal,
21749
21753
  page: currentPage,
21750
21754
  sortBy: sortConfig == null ? void 0 : sortConfig.sortParam,
@@ -21798,11 +21802,6 @@ function DataTableServer({
21798
21802
  setShowColFilters(storageObject.showColFilters);
21799
21803
  setCurrentPage(storageObject.currentPage || 0);
21800
21804
  setSortConfig(null);
21801
- console.log(
21802
- "%clibcomponentsdatatableDataTableServer.tsx:204 storageObject",
21803
- "color: #007acc;",
21804
- storageObject
21805
- );
21806
21805
  setItemsPerPageLocal(storageObject.itemsPerPage || 10);
21807
21806
  }
21808
21807
  }
@@ -22094,12 +22093,13 @@ function DataTableServer({
22094
22093
  ),
22095
22094
  type: filterType,
22096
22095
  options: filterOptions[String(filterParam)] || [],
22097
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22096
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22098
22097
  clearable: true,
22099
22098
  className: " px-0",
22100
22099
  placeholder: "Filtr",
22101
22100
  rounded: true
22102
- }
22101
+ },
22102
+ JSON.stringify(mergedFilters)
22103
22103
  ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22104
22104
  DateRangeField,
22105
22105
  {
@@ -22112,14 +22112,15 @@ function DataTableServer({
22112
22112
  type: filterType,
22113
22113
  options: filterOptions[String(filterParam)] || [],
22114
22114
  value: {
22115
- startDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22116
- endDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam2)]) || ""
22115
+ startDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22116
+ endDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam2)]) || ""
22117
22117
  },
22118
22118
  clearable: true,
22119
22119
  className: " px-0 py-0 ",
22120
22120
  placeholder: "Filtr",
22121
22121
  rounded: true
22122
- }
22122
+ },
22123
+ JSON.stringify(mergedFilters)
22123
22124
  ) : /* @__PURE__ */ jsx(
22124
22125
  InputField,
22125
22126
  {
@@ -22129,13 +22130,15 @@ function DataTableServer({
22129
22130
  e.target.value
22130
22131
  ),
22131
22132
  type: filterType,
22132
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22133
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22134
+ disabled: !!(filters == null ? void 0 : filters[String(filterParam)]),
22133
22135
  clearable: true,
22134
22136
  className: " min-w-[100px] px-0 ",
22135
22137
  rounded: true,
22136
22138
  placeholder: "Filtr",
22137
22139
  debounceTimeout: 1e3
22138
- }
22140
+ },
22141
+ JSON.stringify(mergedFilters)
22139
22142
  )
22140
22143
  }
22141
22144
  )