@turquoisehealth/pit-viper 2.66.1-dev.3 → 2.66.1-dev.4

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.
@@ -116648,43 +116648,44 @@ const cR = (e, t, i) => !e || e.length === 0 ? e : e.slice().sort((o, s) => {
116648
116648
  searchStyle: {}
116649
116649
  },
116650
116650
  setup(e) {
116651
- const t = e, i = ge(null), o = ge(""), s = ge([]), n = ge(!1), r = si(ug, ge(null)), { isServerSideFilter: a, tableSearchFilterModel: l, tableSearchHandler: c } = tF(), d = (p) => {
116652
- r?.value && (a.value ? console.error("Server-side filtering with table free text search is not yet supported.") : r.value.setGridOption("quickFilterText", p));
116653
- }, u = (p) => {
116651
+ const t = e, i = ge(null), o = ge(""), s = ge([]), n = ge(!1), r = si(ug, ge(null)), { isServerSideFilter: a, filterModel: l, tableSearchFilterModel: c, tableSearchHandler: d } = tF(), u = (g) => {
116652
+ r?.value && (a.value ? console.error("Server-side filtering with table free text search is not yet supported.") : r.value.setGridOption("quickFilterText", g));
116653
+ }, h = (g) => {
116654
116654
  if (r?.value) {
116655
116655
  if (!a.value) {
116656
116656
  console.error("Client-side filtering with query builder is not yet supported");
116657
116657
  return;
116658
116658
  }
116659
- l.value = zWe(p), r.value?.onFilterChanged(), r.value?.refreshServerSide({ purge: !0 });
116659
+ c.value = zWe(g), r.value?.onFilterChanged(), r.value?.refreshServerSide({ purge: !0 });
116660
116660
  }
116661
- }, h = async (p) => {
116662
- if (!p || p.length < 2) {
116661
+ }, p = async (g) => {
116662
+ if (!g || g.length < 2) {
116663
116663
  s.value = [];
116664
116664
  return;
116665
116665
  }
116666
- if (!r?.value || !c?.value) return;
116667
- const g = {
116666
+ if (!r?.value || !d?.value) return;
116667
+ const f = {
116668
116668
  api: r.value,
116669
- query: p
116669
+ query: g,
116670
+ filterModel: l.value
116670
116671
  };
116671
116672
  n.value = !0;
116672
- const m = (await c.value?.(g))?.filter((y) => y !== null) || [];
116673
- s.value = m.map((y) => {
116674
- let b = "search";
116675
- const v = r.value?.getColumnDef(y.queryField || "");
116676
- return v && (b = Q2(v.context?.dataType || null) || "search"), {
116677
- id: `${y.queryField}-${y.queryText}`,
116678
- text: y.queryText,
116679
- icon: b,
116680
- queryTerm: y
116673
+ const y = (await d.value?.(f))?.filter((b) => b !== null) || [];
116674
+ s.value = y.map((b) => {
116675
+ let v = "search";
116676
+ const S = r.value?.getColumnDef(b.queryField || "");
116677
+ return S && (v = Q2(S.context?.dataType || null) || "search"), {
116678
+ id: `${b.queryField}-${b.queryText}`,
116679
+ text: b.queryText,
116680
+ icon: v,
116681
+ queryTerm: b
116681
116682
  };
116682
116683
  }), n.value = !1;
116683
116684
  };
116684
116685
  return JT(
116685
116686
  o,
116686
- (p) => {
116687
- t.searchStyle === "query-builder" ? h(p) : t.searchStyle === "text" && d(p);
116687
+ (g) => {
116688
+ t.searchStyle === "query-builder" ? p(g) : t.searchStyle === "text" && u(g);
116688
116689
  },
116689
116690
  {
116690
116691
  debounce: 300,
@@ -116692,29 +116693,29 @@ const cR = (e, t, i) => !e || e.length === 0 ? e : e.slice().sort((o, s) => {
116692
116693
  }
116693
116694
  ), JT(
116694
116695
  i,
116695
- (p) => {
116696
- t.searchStyle === "query-builder" && u(p);
116696
+ (g) => {
116697
+ t.searchStyle === "query-builder" && h(g);
116697
116698
  },
116698
116699
  {
116699
116700
  debounce: 300,
116700
116701
  immediate: !0,
116701
116702
  deep: !0
116702
116703
  }
116703
- ), (p, g) => p.searchStyle === "query-builder" ? (K(), qe(qje, {
116704
+ ), (g, f) => g.searchStyle === "query-builder" ? (K(), qe(qje, {
116704
116705
  key: 0,
116705
- placeholder: p.placeholder,
116706
+ placeholder: g.placeholder,
116706
116707
  "search-text": o.value,
116707
- "onUpdate:searchText": g[0] || (g[0] = (f) => o.value = f),
116708
+ "onUpdate:searchText": f[0] || (f[0] = (m) => o.value = m),
116708
116709
  query: i.value,
116709
- "onUpdate:query": g[1] || (g[1] = (f) => i.value = f),
116710
+ "onUpdate:query": f[1] || (f[1] = (m) => i.value = m),
116710
116711
  options: s.value,
116711
- "onUpdate:options": g[2] || (g[2] = (f) => s.value = f),
116712
+ "onUpdate:options": f[2] || (f[2] = (m) => s.value = m),
116712
116713
  "options-loading": n.value
116713
116714
  }, null, 8, ["placeholder", "search-text", "query", "options", "options-loading"])) : (K(), qe(Ve(K2), {
116714
116715
  key: 1,
116715
- placeholder: p.placeholder,
116716
+ placeholder: g.placeholder,
116716
116717
  modelValue: o.value,
116717
- "onUpdate:modelValue": g[3] || (g[3] = (f) => o.value = f)
116718
+ "onUpdate:modelValue": f[3] || (f[3] = (m) => o.value = m)
116718
116719
  }, null, 8, ["placeholder", "modelValue"]));
116719
116720
  }
116720
116721
  }), Jje = {