@conboai/app.db.query 0.8.72 → 0.8.73

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.
@@ -1467,7 +1467,8 @@ const yte = {
1467
1467
  isTabSelected: !1,
1468
1468
  isLoadMore: !1,
1469
1469
  isNoResultsState: !1,
1470
- selectedDeletedItems: []
1470
+ selectedDeletedItems: [],
1471
+ isValidationError: !1
1471
1472
  }, Ym = [
1472
1473
  {
1473
1474
  label: "ASC",
@@ -139273,8 +139274,9 @@ const AGe = async ({
139273
139274
  conboMatchInputValue: n,
139274
139275
  conboMatchExlusiveValue: r,
139275
139276
  conboMatchUtcValue: o,
139276
- conboMatchInputError: i
139277
- } = ct(yn), [s] = ct((M) => [M.editTabData]), a = MWe({
139277
+ conboMatchInputError: i,
139278
+ isValidationError: s
139279
+ } = ct(yn), [a] = ct((b) => [b.editTabData]), l = MWe({
139278
139280
  defaultValues: {
139279
139281
  ...J$.shape,
139280
139282
  conboKey: n,
@@ -139284,20 +139286,24 @@ const AGe = async ({
139284
139286
  resolver: CWe(J$.schema()),
139285
139287
  mode: "all",
139286
139288
  reValidateMode: "onSubmit"
139287
- }), { loading: l } = qN(), { control: u, handleSubmit: p, formState: h, setValue: f } = a, { errors: g } = h;
139289
+ }), { loading: u } = qN(), { control: p, handleSubmit: h, formState: f, setValue: g } = l, { errors: y } = f;
139288
139290
  Oe(() => {
139289
- f("conboKey", n), f("keyExclusive", r), f("isUtc", o);
139291
+ g("conboKey", n), g("keyExclusive", r), g("isUtc", o);
139290
139292
  }, [
139291
139293
  n,
139292
139294
  r,
139293
139295
  o,
139294
- f
139296
+ g
139295
139297
  ]);
139296
- const y = vt(() => {
139297
- (async () => await p(() => {
139298
- e == null || e({ conboKey: n, baseUrl: t });
139299
- })())();
139300
- }, [t, n, p, e]);
139298
+ const M = vt(() => {
139299
+ (async () => {
139300
+ if (!/^\d+-\d+-\d+-\d+$/.test(n))
139301
+ return a("isValidationError", !0), a("conboMatchInputError", "Invalid format"), null;
139302
+ a("isValidationError", !1), a("conboMatchInputError", ""), await h(() => {
139303
+ e == null || e({ conboKey: n, baseUrl: t });
139304
+ })();
139305
+ })();
139306
+ }, [t, n, a, h, e]);
139301
139307
  return /* @__PURE__ */ se.jsxs(
139302
139308
  Xe,
139303
139309
  {
@@ -139313,18 +139319,18 @@ const AGe = async ({
139313
139319
  F$,
139314
139320
  {
139315
139321
  name: ps.isUtc,
139316
- control: u,
139317
- render: ({ field: M }) => /* @__PURE__ */ se.jsx(
139322
+ control: p,
139323
+ render: ({ field: b }) => /* @__PURE__ */ se.jsx(
139318
139324
  Wi,
139319
139325
  {
139320
- ...M,
139326
+ ...b,
139321
139327
  leftLabel: $4[ps.isUtc].label,
139322
139328
  sx: NWe,
139323
- onChange: (b) => {
139324
- const C = b.target.checked;
139325
- M.onChange(C), s("isUtc", C), s("conboMatchUtcValue", C);
139329
+ onChange: (C) => {
139330
+ const v = C.target.checked;
139331
+ b.onChange(v), a("isUtc", v), a("conboMatchUtcValue", v);
139326
139332
  },
139327
- checked: !!M.value,
139333
+ checked: !!b.value,
139328
139334
  disabled: !1
139329
139335
  }
139330
139336
  )
@@ -139336,25 +139342,25 @@ const AGe = async ({
139336
139342
  F$,
139337
139343
  {
139338
139344
  name: ps.conboKey,
139339
- control: u,
139340
- render: ({ field: M }) => /* @__PURE__ */ se.jsx(
139345
+ control: p,
139346
+ render: ({ field: b }) => /* @__PURE__ */ se.jsx(
139341
139347
  IN,
139342
139348
  {
139343
- ...M,
139344
- value: M.value || "",
139349
+ ...b,
139350
+ value: b.value || "",
139345
139351
  onBlur: () => {
139346
- var C;
139347
- const b = ((C = g.conboKey) == null ? void 0 : C.message) || "";
139348
- b !== i && s("conboMatchInputError", b);
139352
+ var v;
139353
+ const C = ((v = y.conboKey) == null ? void 0 : v.message) || "";
139354
+ C !== i && a("conboMatchInputError", C);
139349
139355
  },
139350
- onChange: (b) => {
139351
- M.onChange(b), s("conboMatchInputValue", b.target.value);
139356
+ onChange: (C) => {
139357
+ b.onChange(C), a("conboMatchInputValue", C.target.value), a("conboMatchInputError", ""), a("isValidationError", !1);
139352
139358
  },
139353
139359
  id: ps.conboKey,
139354
139360
  label: $4[ps.conboKey].label,
139355
139361
  placeholder: $4[ps.conboKey].placeholder,
139356
- error: !!i,
139357
- disabled: l
139362
+ error: !!i || s,
139363
+ disabled: u
139358
139364
  }
139359
139365
  )
139360
139366
  }
@@ -139374,8 +139380,8 @@ const AGe = async ({
139374
139380
  Gr,
139375
139381
  {
139376
139382
  size: "full",
139377
- onClick: y,
139378
- disabled: l || !n,
139383
+ onClick: M,
139384
+ disabled: u || !n || s,
139379
139385
  children: "Search"
139380
139386
  }
139381
139387
  ) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/app.db.query",
3
- "version": "0.8.72",
3
+ "version": "0.8.73",
4
4
  "type": "module",
5
5
  "main": "dist/app.db.query.js",
6
6
  "types": "dist/build/index.d.ts",