sprintify-ui 0.10.61 → 0.10.62

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.
@@ -15273,7 +15273,12 @@ const Sa = /* @__PURE__ */ Wa(dy), fy = { class: "flex grow items-center justify
15273
15273
  if (!he)
15274
15274
  return [];
15275
15275
  const ce = Et.value.toLowerCase();
15276
- return o.search ? o.search(he, Et.value) : he == null ? void 0 : he.filter((ve) => Object.values(ve).some((de) => typeof de == "string" ? de.toLowerCase().includes(ce) : !1));
15276
+ return o.search ? o.search(he, Et.value) : he == null ? void 0 : he.filter((ve) => Object.values(ve).some((de) => {
15277
+ if (typeof de == "string")
15278
+ return de.toLowerCase().includes(ce);
15279
+ if (typeof de == "object")
15280
+ return JSON.stringify(de).toLowerCase().includes(ce);
15281
+ }));
15277
15282
  }
15278
15283
  function wt(he) {
15279
15284
  return he ? !ut.value || !ct.value ? he : ct.value == "asc" ? Wi(he, ut.value) : Wi(he, ut.value).reverse() : [];
@@ -18304,6 +18309,13 @@ const Ib = ["align", "colspan"], $b = ["innerHTML"], cd = /* @__PURE__ */ te({
18304
18309
  default() {
18305
18310
  return window.location.pathname;
18306
18311
  }
18312
+ },
18313
+ /**
18314
+ * Function to search local data
18315
+ */
18316
+ search: {
18317
+ default: void 0,
18318
+ type: Function
18307
18319
  }
18308
18320
  },
18309
18321
  emits: [
@@ -18482,6 +18494,7 @@ const Ib = ["align", "colspan"], $b = ["innerHTML"], cd = /* @__PURE__ */ te({
18482
18494
  sections: c(re),
18483
18495
  "scroll-top-on-fetch": t.maxHeight ? !1 : t.scrollTopOnFetch,
18484
18496
  "filters-position": t.filtersPosition,
18497
+ search: t.search,
18485
18498
  onFetch: be,
18486
18499
  onWillScrollTop: ge
18487
18500
  }, au({
@@ -18650,7 +18663,7 @@ const Ib = ["align", "colspan"], $b = ["innerHTML"], cd = /* @__PURE__ */ te({
18650
18663
  ue(ie.$slots, oe.name)
18651
18664
  ])
18652
18665
  }))
18653
- ]), 1032, ["items", "per-page", "url", "url-query", "default-query", "searchable", "actions", "history-mode", "layout", "size", "sections", "scroll-top-on-fetch", "filters-position"]));
18666
+ ]), 1032, ["items", "per-page", "url", "url-query", "default-query", "searchable", "actions", "history-mode", "layout", "size", "sections", "scroll-top-on-fetch", "filters-position", "search"]));
18654
18667
  }
18655
18668
  });
18656
18669
  var xl = [
@@ -1778,6 +1778,13 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
1778
1778
  type: StringConstructor;
1779
1779
  default(): string;
1780
1780
  };
1781
+ /**
1782
+ * Function to search local data
1783
+ */
1784
+ search: {
1785
+ default: undefined;
1786
+ type: PropType<(items: Collection, search: string | null) => Collection>;
1787
+ };
1781
1788
  }>, {
1782
1789
  t: typeof t;
1783
1790
  BaseDataIterator: typeof BaseDataIterator;
@@ -2066,11 +2073,19 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
2066
2073
  type: StringConstructor;
2067
2074
  default(): string;
2068
2075
  };
2076
+ /**
2077
+ * Function to search local data
2078
+ */
2079
+ search: {
2080
+ default: undefined;
2081
+ type: PropType<(items: Collection, search: string | null) => Collection>;
2082
+ };
2069
2083
  }>> & Readonly<{
2070
2084
  onDelete?: ((...args: any[]) => any) | undefined;
2071
2085
  "onUpdate:checked-rows"?: ((...args: any[]) => any) | undefined;
2072
2086
  onFetch?: ((...args: any[]) => any) | undefined;
2073
2087
  }>, {
2088
+ search: (items: Collection, search: string | null) => Collection;
2074
2089
  size: "xs" | "sm" | "md" | "lg" | "xl";
2075
2090
  items: CollectionItem[] | undefined;
2076
2091
  actions: ActionItem[];
@@ -2360,6 +2375,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
2360
2375
  type: StringConstructor;
2361
2376
  default(): string;
2362
2377
  };
2378
+ /**
2379
+ * Function to search local data
2380
+ */
2381
+ search: {
2382
+ default: undefined;
2383
+ type: PropType<(items: Collection, search: string | null) => Collection>;
2384
+ };
2363
2385
  }>, {
2364
2386
  fetch: typeof fetch;
2365
2387
  fetchWithoutLoading: typeof fetchWithoutLoading;
@@ -2620,11 +2642,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
2620
2642
  type: StringConstructor;
2621
2643
  default(): string;
2622
2644
  };
2645
+ /**
2646
+ * Function to search local data
2647
+ */
2648
+ search: {
2649
+ default: undefined;
2650
+ type: PropType<(items: Collection, search: string | null) => Collection>;
2651
+ };
2623
2652
  }>> & Readonly<{
2624
2653
  onDelete?: ((...args: any[]) => any) | undefined;
2625
2654
  "onUpdate:checked-rows"?: ((...args: any[]) => any) | undefined;
2626
2655
  onFetch?: ((...args: any[]) => any) | undefined;
2627
2656
  }>, {
2657
+ search: (items: Collection, search: string | null) => Collection;
2628
2658
  size: "xs" | "sm" | "md" | "lg" | "xl";
2629
2659
  items: CollectionItem[] | undefined;
2630
2660
  actions: ActionItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.61",
3
+ "version": "0.10.62",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -796,7 +796,9 @@ function searchItems(items: Collection | undefined) {
796
796
  if (typeof value === 'string') {
797
797
  return value.toLowerCase().includes(searchWords);
798
798
  }
799
- return false;
799
+ if (typeof value === 'object') {
800
+ return JSON.stringify(value).toLowerCase().includes(searchWords);
801
+ }
800
802
  });
801
803
  });
802
804
  }
@@ -14,6 +14,7 @@
14
14
  :sections="sectionsInternal"
15
15
  :scroll-top-on-fetch="maxHeight ? false : scrollTopOnFetch"
16
16
  :filters-position="filtersPosition"
17
+ :search="search"
17
18
  @fetch="onFetch"
18
19
  @will-scroll-top="onWillScrollTop"
19
20
  >
@@ -562,6 +563,14 @@ const props = defineProps({
562
563
  return window.location.pathname;
563
564
  },
564
565
  },
566
+
567
+ /**
568
+ * Function to search local data
569
+ */
570
+ search: {
571
+ default: undefined,
572
+ type: Function as PropType<(items: Collection, search: string | null) => Collection>,
573
+ }
565
574
  });
566
575
 
567
576
  const sizeInternal = useInputSize(props.size);