@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.
@@ -46327,43 +46327,44 @@ const aW = { class: "pv-flex" }, lW = {
46327
46327
  searchStyle: {}
46328
46328
  },
46329
46329
  setup(e) {
46330
- const t = e, o = W(null), i = W(""), s = W([]), r = W(!1), n = Je(vs, W(null)), { isServerSideFilter: a, tableSearchFilterModel: l, tableSearchHandler: d } = Ad(), c = (p) => {
46331
- n?.value && (a.value ? console.error("Server-side filtering with table free text search is not yet supported.") : n.value.setGridOption("quickFilterText", p));
46332
- }, u = (p) => {
46330
+ const t = e, o = W(null), i = W(""), s = W([]), r = W(!1), n = Je(vs, W(null)), { isServerSideFilter: a, filterModel: l, tableSearchFilterModel: d, tableSearchHandler: c } = Ad(), u = (g) => {
46331
+ n?.value && (a.value ? console.error("Server-side filtering with table free text search is not yet supported.") : n.value.setGridOption("quickFilterText", g));
46332
+ }, h = (g) => {
46333
46333
  if (n?.value) {
46334
46334
  if (!a.value) {
46335
46335
  console.error("Client-side filtering with query builder is not yet supported");
46336
46336
  return;
46337
46337
  }
46338
- l.value = C2(p), n.value?.onFilterChanged(), n.value?.refreshServerSide({ purge: !0 });
46338
+ d.value = C2(g), n.value?.onFilterChanged(), n.value?.refreshServerSide({ purge: !0 });
46339
46339
  }
46340
- }, h = async (p) => {
46341
- if (!p || p.length < 2) {
46340
+ }, p = async (g) => {
46341
+ if (!g || g.length < 2) {
46342
46342
  s.value = [];
46343
46343
  return;
46344
46344
  }
46345
- if (!n?.value || !d?.value) return;
46346
- const g = {
46345
+ if (!n?.value || !c?.value) return;
46346
+ const f = {
46347
46347
  api: n.value,
46348
- query: p
46348
+ query: g,
46349
+ filterModel: l.value
46349
46350
  };
46350
46351
  r.value = !0;
46351
- const m = (await d.value?.(g))?.filter((w) => w !== null) || [];
46352
- s.value = m.map((w) => {
46353
- let y = "search";
46354
- const v = n.value?.getColumnDef(w.queryField || "");
46355
- return v && (y = Nf(v.context?.dataType || null) || "search"), {
46356
- id: `${w.queryField}-${w.queryText}`,
46357
- text: w.queryText,
46358
- icon: y,
46359
- queryTerm: w
46352
+ const w = (await c.value?.(f))?.filter((y) => y !== null) || [];
46353
+ s.value = w.map((y) => {
46354
+ let v = "search";
46355
+ const S = n.value?.getColumnDef(y.queryField || "");
46356
+ return S && (v = Nf(S.context?.dataType || null) || "search"), {
46357
+ id: `${y.queryField}-${y.queryText}`,
46358
+ text: y.queryText,
46359
+ icon: v,
46360
+ queryTerm: y
46360
46361
  };
46361
46362
  }), r.value = !1;
46362
46363
  };
46363
46364
  return wl(
46364
46365
  i,
46365
- (p) => {
46366
- t.searchStyle === "query-builder" ? h(p) : t.searchStyle === "text" && c(p);
46366
+ (g) => {
46367
+ t.searchStyle === "query-builder" ? p(g) : t.searchStyle === "text" && u(g);
46367
46368
  },
46368
46369
  {
46369
46370
  debounce: 300,
@@ -46371,29 +46372,29 @@ const aW = { class: "pv-flex" }, lW = {
46371
46372
  }
46372
46373
  ), wl(
46373
46374
  o,
46374
- (p) => {
46375
- t.searchStyle === "query-builder" && u(p);
46375
+ (g) => {
46376
+ t.searchStyle === "query-builder" && h(g);
46376
46377
  },
46377
46378
  {
46378
46379
  debounce: 300,
46379
46380
  immediate: !0,
46380
46381
  deep: !0
46381
46382
  }
46382
- ), (p, g) => p.searchStyle === "query-builder" ? (k(), me(LW, {
46383
+ ), (g, f) => g.searchStyle === "query-builder" ? (k(), me(LW, {
46383
46384
  key: 0,
46384
- placeholder: p.placeholder,
46385
+ placeholder: g.placeholder,
46385
46386
  "search-text": i.value,
46386
- "onUpdate:searchText": g[0] || (g[0] = (f) => i.value = f),
46387
+ "onUpdate:searchText": f[0] || (f[0] = (m) => i.value = m),
46387
46388
  query: o.value,
46388
- "onUpdate:query": g[1] || (g[1] = (f) => o.value = f),
46389
+ "onUpdate:query": f[1] || (f[1] = (m) => o.value = m),
46389
46390
  options: s.value,
46390
- "onUpdate:options": g[2] || (g[2] = (f) => s.value = f),
46391
+ "onUpdate:options": f[2] || (f[2] = (m) => s.value = m),
46391
46392
  "options-loading": r.value
46392
46393
  }, null, 8, ["placeholder", "search-text", "query", "options", "options-loading"])) : (k(), me(oe(Cf), {
46393
46394
  key: 1,
46394
- placeholder: p.placeholder,
46395
+ placeholder: g.placeholder,
46395
46396
  modelValue: i.value,
46396
- "onUpdate:modelValue": g[3] || (g[3] = (f) => i.value = f)
46397
+ "onUpdate:modelValue": f[3] || (f[3] = (m) => i.value = m)
46397
46398
  }, null, 8, ["placeholder", "modelValue"]));
46398
46399
  }
46399
46400
  }), GW = {