@conboai/app.db.query 0.8.81 → 0.8.82

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.
@@ -139686,9 +139686,10 @@ const GGe = (e = [], t) => {
139686
139686
  }, qGe = async ({
139687
139687
  conboKey: e,
139688
139688
  baseUrl: t,
139689
- signal: n
139689
+ signal: n,
139690
+ deploymentId: r
139690
139691
  }) => await Xu({
139691
- url: `${t}/api/reid/find_all/${e}`,
139692
+ url: `${t}/api/reid/find_all/${e}/${r}`,
139692
139693
  options: {
139693
139694
  signal: n
139694
139695
  }
@@ -139704,21 +139705,22 @@ const GGe = (e = [], t) => {
139704
139705
  abortController: null
139705
139706
  });
139706
139707
  },
139707
- findAllReids: async ({ conboKey: n, baseUrl: r }) => {
139708
- const o = new AbortController();
139709
- e(() => ({ loading: !0, error: null, abortController: o }));
139710
- const i = at.getState().editTabData;
139708
+ findAllReids: async ({ conboKey: n, baseUrl: r, deploymentId: o }) => {
139709
+ const i = new AbortController();
139710
+ e(() => ({ loading: !0, error: null, abortController: i }));
139711
+ const s = at.getState().editTabData;
139711
139712
  try {
139712
- const s = await qGe({
139713
+ const a = await qGe({
139713
139714
  conboKey: n,
139714
139715
  baseUrl: r,
139715
- signal: o.signal
139716
+ signal: i.signal,
139717
+ deploymentId: o
139716
139718
  });
139717
- i("allReids", WGe(s)), i("isReidsAborted", !1), e(() => ({
139719
+ s("allReids", WGe(a)), s("isReidsAborted", !1), e(() => ({
139718
139720
  loading: !1
139719
139721
  }));
139720
- } catch (s) {
139721
- console.error(s), i("allReids", []), e({ error: "Something went wrong", loading: !1 });
139722
+ } catch (a) {
139723
+ console.error(a), s("allReids", []), e({ error: "Something went wrong", loading: !1 });
139722
139724
  }
139723
139725
  },
139724
139726
  abortReidRequests: () => {
@@ -139727,42 +139729,50 @@ const GGe = (e = [], t) => {
139727
139729
  }
139728
139730
  })), ZGe = ({
139729
139731
  onSubmit: e,
139730
- baseUrl: t
139732
+ baseUrl: t,
139733
+ deploymentId: n
139731
139734
  }) => {
139732
139735
  const {
139733
- conboMatchInputValue: n,
139734
- conboMatchExlusiveValue: r,
139735
- conboMatchUtcValue: o,
139736
- conboMatchInputError: i,
139737
- isValidationError: s
139738
- } = at(sn), [a] = at((b) => [b.editTabData]), l = LWe({
139736
+ conboMatchInputValue: r,
139737
+ conboMatchExlusiveValue: o,
139738
+ conboMatchUtcValue: i,
139739
+ conboMatchInputError: s,
139740
+ isValidationError: a
139741
+ } = at(sn), [l] = at((D) => [D.editTabData]), u = LWe({
139739
139742
  defaultValues: {
139740
139743
  ...K$.shape,
139741
- conboKey: n,
139742
- keyExclusive: r,
139743
- isUtc: o
139744
+ conboKey: r,
139745
+ keyExclusive: o,
139746
+ isUtc: i
139744
139747
  },
139745
139748
  resolver: _We(K$.schema()),
139746
139749
  mode: "all",
139747
139750
  reValidateMode: "onSubmit"
139748
- }), { loading: u } = KN(), { control: p, handleSubmit: h, formState: f, setValue: g } = l, { errors: y } = f;
139751
+ }), { loading: p } = KN(), { control: h, handleSubmit: f, formState: g, setValue: y } = u, { errors: M } = g;
139749
139752
  Oe(() => {
139750
- g("conboKey", n), g("keyExclusive", r), g("isUtc", o);
139753
+ y("conboKey", r), y("keyExclusive", o), y("isUtc", i);
139751
139754
  }, [
139752
- n,
139753
139755
  r,
139754
139756
  o,
139755
- g
139757
+ i,
139758
+ y
139756
139759
  ]);
139757
- const M = mt(() => {
139760
+ const b = mt(() => {
139758
139761
  (async () => {
139759
- if (!/^\d+-\d+-\d+-\d+$/.test(n))
139760
- return a("isValidationError", !0), a("conboMatchInputError", "Invalid format"), null;
139761
- a("isValidationError", !1), a("conboMatchInputError", ""), await h(() => {
139762
- e == null || e({ conboKey: n, baseUrl: t });
139762
+ if (!/^\d+-\d+-\d+-\d+$/.test(r))
139763
+ return l("isValidationError", !0), l("conboMatchInputError", "Invalid format"), null;
139764
+ l("isValidationError", !1), l("conboMatchInputError", ""), await f(() => {
139765
+ e == null || e({ conboKey: r, baseUrl: t, deploymentId: n });
139763
139766
  })();
139764
139767
  })();
139765
- }, [t, n, a, h, e]);
139768
+ }, [
139769
+ t,
139770
+ r,
139771
+ l,
139772
+ f,
139773
+ e,
139774
+ n
139775
+ ]);
139766
139776
  return /* @__PURE__ */ le.jsxs(
139767
139777
  Ke,
139768
139778
  {
@@ -139778,18 +139788,18 @@ const GGe = (e = [], t) => {
139778
139788
  U$,
139779
139789
  {
139780
139790
  name: ls.isUtc,
139781
- control: p,
139782
- render: ({ field: b }) => /* @__PURE__ */ le.jsx(
139791
+ control: h,
139792
+ render: ({ field: D }) => /* @__PURE__ */ le.jsx(
139783
139793
  $i,
139784
139794
  {
139785
- ...b,
139795
+ ...D,
139786
139796
  leftLabel: B4[ls.isUtc].label,
139787
139797
  sx: FWe,
139788
- onChange: (D) => {
139789
- const v = D.target.checked;
139790
- b.onChange(v), a("isUtc", v), a("conboMatchUtcValue", v);
139798
+ onChange: (v) => {
139799
+ const x = v.target.checked;
139800
+ D.onChange(x), l("isUtc", x), l("conboMatchUtcValue", x);
139791
139801
  },
139792
- checked: !!b.value,
139802
+ checked: !!D.value,
139793
139803
  disabled: !1
139794
139804
  }
139795
139805
  )
@@ -139801,30 +139811,30 @@ const GGe = (e = [], t) => {
139801
139811
  U$,
139802
139812
  {
139803
139813
  name: ls.conboKey,
139804
- control: p,
139805
- render: ({ field: b }) => /* @__PURE__ */ le.jsx(
139814
+ control: h,
139815
+ render: ({ field: D }) => /* @__PURE__ */ le.jsx(
139806
139816
  jN,
139807
139817
  {
139808
- ...b,
139809
- value: b.value || "",
139818
+ ...D,
139819
+ value: D.value || "",
139810
139820
  onBlur: () => {
139811
- var v;
139812
- const D = ((v = y.conboKey) == null ? void 0 : v.message) || "";
139813
- D !== i && a("conboMatchInputError", D);
139821
+ var x;
139822
+ const v = ((x = M.conboKey) == null ? void 0 : x.message) || "";
139823
+ v !== s && l("conboMatchInputError", v);
139814
139824
  },
139815
- onChange: (D) => {
139816
- b.onChange(D), a("conboMatchInputValue", D.target.value), a("conboMatchInputError", ""), a("isValidationError", !1);
139825
+ onChange: (v) => {
139826
+ D.onChange(v), l("conboMatchInputValue", v.target.value), l("conboMatchInputError", ""), l("isValidationError", !1);
139817
139827
  },
139818
139828
  id: ls.conboKey,
139819
139829
  label: B4[ls.conboKey].label,
139820
139830
  placeholder: B4[ls.conboKey].placeholder,
139821
- error: !!i || s,
139822
- disabled: u
139831
+ error: !!s || a,
139832
+ disabled: p
139823
139833
  }
139824
139834
  )
139825
139835
  }
139826
139836
  ),
139827
- i && /* @__PURE__ */ le.jsx(nz, { error: !0, children: i })
139837
+ s && /* @__PURE__ */ le.jsx(nz, { error: !0, children: s })
139828
139838
  ] }) })
139829
139839
  ] }),
139830
139840
  /* @__PURE__ */ le.jsxs(Ke, { sx: BWe, marginTop: "auto", children: [
@@ -139832,15 +139842,15 @@ const GGe = (e = [], t) => {
139832
139842
  /* @__PURE__ */ le.jsx(
139833
139843
  Dc,
139834
139844
  {
139835
- title: n ? "" : "Conbo key is required",
139845
+ title: r ? "" : "Conbo key is required",
139836
139846
  placement: ci.TOP,
139837
139847
  arrow: !0,
139838
139848
  children: /* @__PURE__ */ le.jsx(Ke, { sx: { px: "20px" }, children: /* @__PURE__ */ le.jsx(
139839
139849
  $r,
139840
139850
  {
139841
139851
  size: "full",
139842
- onClick: M,
139843
- disabled: u || !n || s,
139852
+ onClick: b,
139853
+ disabled: p || !r || a,
139844
139854
  children: "Search"
139845
139855
  }
139846
139856
  ) })
@@ -140315,18 +140325,28 @@ const GGe = (e = [], t) => {
140315
140325
  const n = at.getState().editTabData, { abortController: r } = t();
140316
140326
  r && (r.abort(), e({ abortController: null, loading: !1 }), n("isRequestAborted", !0));
140317
140327
  }
140318
- })), KGe = ({ baseUrl: e }) => {
140319
- const t = XN(), { findAllReids: n } = KN(), { getDetectionsInfo: r } = Dg(), { isRequestAborted: o } = at(sn), [i] = at((l) => [l.editTabData]), s = mt(
140320
- async (l) => {
140328
+ })), KGe = ({
140329
+ baseUrl: e,
140330
+ deploymentId: t
140331
+ }) => {
140332
+ const n = XN(), { findAllReids: r } = KN(), { getDetectionsInfo: o } = Dg(), { isRequestAborted: i } = at(sn), [s] = at((u) => [u.editTabData]), a = mt(
140333
+ async (u) => {
140321
140334
  try {
140322
- i("title", l.conboKey), i("color", "yellow"), await n(l), await r(l), i("color", "green"), i("isNewSearch", !0), o && i("isRequestAborted", !1);
140335
+ s("title", u.conboKey), s("color", "yellow"), await r(u), await o(u), s("color", "green"), s("isNewSearch", !0), i && s("isRequestAborted", !1);
140323
140336
  } catch {
140324
- i("color", "red");
140337
+ s("color", "red");
140325
140338
  }
140326
140339
  },
140327
- [i, n, r, o]
140328
- ), a = t != null && t.isLeftPanelShown ? "flex" : "none";
140329
- return /* @__PURE__ */ le.jsx(Ke, { position: "relative", height: "100%", display: a, children: /* @__PURE__ */ le.jsx(ZGe, { onSubmit: s, baseUrl: e }) });
140340
+ [s, r, o, i]
140341
+ ), l = n != null && n.isLeftPanelShown ? "flex" : "none";
140342
+ return /* @__PURE__ */ le.jsx(Ke, { position: "relative", height: "100%", display: l, children: /* @__PURE__ */ le.jsx(
140343
+ ZGe,
140344
+ {
140345
+ onSubmit: a,
140346
+ baseUrl: e,
140347
+ deploymentId: t
140348
+ }
140349
+ ) });
140330
140350
  }, XGe = ({
140331
140351
  title: e,
140332
140352
  onHomeClick: t,
@@ -140817,7 +140837,7 @@ const GGe = (e = [], t) => {
140817
140837
  onHomeClick: t,
140818
140838
  isLoading: b
140819
140839
  }
140820
- ), w = /* @__PURE__ */ le.jsx(KGe, { baseUrl: n }), z = /* @__PURE__ */ le.jsx(aqe, {}), P = /* @__PURE__ */ le.jsx(nqe, { baseUrl: n });
140840
+ ), w = /* @__PURE__ */ le.jsx(KGe, { baseUrl: n, deploymentId: e }), z = /* @__PURE__ */ le.jsx(aqe, {}), P = /* @__PURE__ */ le.jsx(nqe, { baseUrl: n });
140821
140841
  return /* @__PURE__ */ le.jsx(
140822
140842
  Ng,
140823
140843
  {
@@ -1,5 +1,6 @@
1
1
  type AppSidebarLeftProps = {
2
2
  baseUrl?: string;
3
+ deploymentId: string;
3
4
  };
4
- export declare const AppSidebarLeft: ({ baseUrl }: AppSidebarLeftProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const AppSidebarLeft: ({ baseUrl, deploymentId }: AppSidebarLeftProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -7,8 +7,10 @@ type SidebarLeftFilterInput = {
7
7
  onSubmit?: (value: {
8
8
  conboKey: string;
9
9
  baseUrl?: string;
10
+ deploymentId: string;
10
11
  }) => void;
11
12
  baseUrl?: string;
13
+ deploymentId: string;
12
14
  };
13
- export declare const SidebarLeftFilter: ({ onSubmit, baseUrl }: SidebarLeftFilterInput) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const SidebarLeftFilter: ({ onSubmit, baseUrl, deploymentId }: SidebarLeftFilterInput) => import("react/jsx-runtime").JSX.Element;
14
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/app.db.query",
3
- "version": "0.8.81",
3
+ "version": "0.8.82",
4
4
  "type": "module",
5
5
  "main": "dist/app.db.query.js",
6
6
  "types": "dist/build/index.d.ts",