gomtm 0.0.360 → 0.0.361

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.
@@ -1,7 +1,40 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __spreadValues = (a, b) => {
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
11
+ if (__getOwnPropSymbols)
12
+ for (var prop of __getOwnPropSymbols(b)) {
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ }
16
+ return a;
17
+ };
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "mtxuilib/ui/form";
20
+ import { Input } from "mtxuilib/ui/input";
21
+ import { useFormContext } from "react-hook-form";
22
+ import { FormShell } from "../../curd/form/FormShell";
3
23
  function CurdViewEditor() {
4
- return /* @__PURE__ */ jsx("div", { className: "bg-blue-100 p-2", children: /* @__PURE__ */ jsx("h1", { children: "TODO CurdViewEditor" }) });
24
+ const form = useFormContext();
25
+ return /* @__PURE__ */ jsx(FormShell, { children: /* @__PURE__ */ jsx(
26
+ FormField,
27
+ {
28
+ control: form.control,
29
+ name: "svcName",
30
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
31
+ /* @__PURE__ */ jsx(FormLabel, { children: "Svc" }),
32
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "svcName" }, field)) }),
33
+ /* @__PURE__ */ jsx(FormDescription, { children: "svcName" }),
34
+ /* @__PURE__ */ jsx(FormMessage, {})
35
+ ] })
36
+ }
37
+ ) });
5
38
  }
6
39
  export {
7
40
  CurdViewEditor as default
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from "react";
2
+ export declare const FormShell: (props: PropsWithChildren) => import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ const FormShell = (props) => {
4
+ const { children } = props;
5
+ return /* @__PURE__ */ jsx("div", { children });
6
+ };
7
+ export {
8
+ FormShell
9
+ };
@@ -40,9 +40,13 @@ import { createConnectTransport } from "@connectrpc/connect-web";
40
40
  import { camelCase, merge } from "lodash";
41
41
  import { fetchMiddleWithCache } from "mtxlib/http/fetchMiddleWithCache";
42
42
  import { CONST_HeaderMtmHost, MTM_API_PREFIX } from "./consts";
43
+ import { CurdService } from "./gomtmpb/mtm/sppb/curd_connect";
43
44
  import { MtmService } from "./gomtmpb/mtm/sppb/mtm_connect";
44
45
  import { MtmError } from "./gomtmpb/mtm/sppb/mtm_pb";
45
- const allServices = [MtmService];
46
+ const allServices = [
47
+ MtmService,
48
+ CurdService
49
+ ];
46
50
  const createQueryKey = (svc, method, input) => {
47
51
  return [svc, method, input || {}];
48
52
  };