@ammarkhalidfarooq/dashboard-package 0.6.32 → 0.6.33

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.cjs.js CHANGED
@@ -2122,7 +2122,7 @@ var PageHeader = function PageHeader(_ref9) {
2122
2122
  },
2123
2123
  children: ["Page ", page, " of 2"]
2124
2124
  })]
2125
- }), activeFilters && /*#__PURE__*/jsxRuntime.jsxs("div", {
2125
+ }), !!"".concat(activeFilters || "").trim() && /*#__PURE__*/jsxRuntime.jsxs("div", {
2126
2126
  style: {
2127
2127
  marginTop: 7,
2128
2128
  display: "inline-flex",
@@ -2193,11 +2193,26 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2193
2193
  minute: "2-digit"
2194
2194
  }) + " GMT";
2195
2195
  var dateLabel = dateName;
2196
- var formattedActiveFilters = Array.isArray(activeFilters) ? activeFilters.filter(function (item) {
2197
- return item && item.value !== undefined && item.value !== null && "".concat(item.value).trim();
2198
- }).map(function (item) {
2199
- return "".concat(item.label || item.id, ": ").concat(item.value);
2200
- }).join(" | ") : "";
2196
+ var normalizeFiltersText = function normalizeFiltersText(filtersInput) {
2197
+ if (Array.isArray(filtersInput)) {
2198
+ var fromObjects = filtersInput.filter(function (item) {
2199
+ return item && item.value !== undefined && item.value !== null && "".concat(item.value).trim();
2200
+ }).map(function (item) {
2201
+ return "".concat(item.label || item.id || "Filter", ": ").concat(item.value);
2202
+ }).join(" | ").trim();
2203
+ if (fromObjects) return fromObjects;
2204
+ var fromStrings = filtersInput.map(function (item) {
2205
+ return typeof item === "string" ? item.trim() : "";
2206
+ }).filter(Boolean).join(" | ").trim();
2207
+ if (fromStrings) return fromStrings;
2208
+ }
2209
+ if (typeof filtersInput === "string") {
2210
+ var str = filtersInput.trim();
2211
+ if (str) return str;
2212
+ }
2213
+ return "";
2214
+ };
2215
+ var formattedActiveFilters = normalizeFiltersText(activeFilters) || normalizeFiltersText(getActiveFilterChips(apiData));
2201
2216
  var report = buildReportData(apiData, dateName);
2202
2217
  var hero = report.hero,
2203
2218
  metrics = report.metrics,