gomtm 0.0.370 → 0.0.371
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.
- package/dist/esm/components/curdView/curdViewEditor.d.ts +0 -1
- package/dist/esm/components/curdView/curdViewEditor.js +26 -8
- package/dist/esm/gomtmpb/mtm/sppb/curd_pb.d.ts +25 -1
- package/dist/esm/gomtmpb/mtm/sppb/curd_pb.js +160 -6
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -44,12 +44,13 @@ function CurdViewEditor(props) {
|
|
|
44
44
|
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "title" }, field)) }),
|
|
45
45
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
46
46
|
] }) }),
|
|
47
|
-
/* @__PURE__ */ jsx(CurdViewContentField, { name: "content"
|
|
47
|
+
/* @__PURE__ */ jsx(CurdViewContentField, { name: "content" })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
50
|
const CurdViewContentField = (props) => {
|
|
51
|
-
const { name
|
|
51
|
+
const { name } = props;
|
|
52
52
|
const form = useFormContext();
|
|
53
|
+
const defaultValues = form.getValues()[name];
|
|
53
54
|
console.log("defaultValues", defaultValues);
|
|
54
55
|
const contentForm = useForm({
|
|
55
56
|
defaultValues
|
|
@@ -61,14 +62,31 @@ const CurdViewContentField = (props) => {
|
|
|
61
62
|
return () => subscription.unsubscribe();
|
|
62
63
|
}, [contentForm, contentForm.watch, form, name]);
|
|
63
64
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
FormField,
|
|
67
|
+
{
|
|
68
|
+
control: contentForm.control,
|
|
69
|
+
name: "svcName",
|
|
70
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Svc" }),
|
|
72
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "svcName" }, field)) }),
|
|
73
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
74
|
+
] })
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsx(FormField, { control: contentForm.control, name: "methodList", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "methodList" }),
|
|
79
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "methodList" }, field)) }),
|
|
80
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
81
|
+
] }) }),
|
|
82
|
+
/* @__PURE__ */ jsx(FormField, { control: contentForm.control, name: "methodGet", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "methodGet" }),
|
|
84
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "methodGet" }, field)) }),
|
|
67
85
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
68
86
|
] }) }),
|
|
69
|
-
/* @__PURE__ */ jsx(FormField, { control: contentForm.control, name: "
|
|
70
|
-
/* @__PURE__ */ jsx(FormLabel, { children: "
|
|
71
|
-
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "
|
|
87
|
+
/* @__PURE__ */ jsx(FormField, { control: contentForm.control, name: "methodUpdate", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "methodUpdate" }),
|
|
89
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, __spreadValues({ placeholder: "methodUpdate" }, field)) }),
|
|
72
90
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
73
91
|
] }) })
|
|
74
92
|
] });
|
|
@@ -179,7 +179,7 @@ export declare class CurdView extends Message<CurdView> {
|
|
|
179
179
|
};
|
|
180
180
|
layout: string;
|
|
181
181
|
defaultDetailView: string;
|
|
182
|
-
content
|
|
182
|
+
content?: CurdViewContent;
|
|
183
183
|
constructor(data?: PartialMessage<CurdView>);
|
|
184
184
|
static readonly runtime: typeof proto3;
|
|
185
185
|
static readonly typeName = "sppb.CurdView";
|
|
@@ -189,3 +189,27 @@ export declare class CurdView extends Message<CurdView> {
|
|
|
189
189
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CurdView;
|
|
190
190
|
static equals(a: CurdView | PlainMessage<CurdView> | undefined, b: CurdView | PlainMessage<CurdView> | undefined): boolean;
|
|
191
191
|
}
|
|
192
|
+
export declare class CurdViewContent extends Message<CurdViewContent> {
|
|
193
|
+
title: string;
|
|
194
|
+
routeList: string;
|
|
195
|
+
routeShow: string;
|
|
196
|
+
routeCreate: string;
|
|
197
|
+
routeEdit: string;
|
|
198
|
+
svcName: string;
|
|
199
|
+
methodList: string;
|
|
200
|
+
methodGet: string;
|
|
201
|
+
methodCreate: string;
|
|
202
|
+
methodUpdate: string;
|
|
203
|
+
methodDelete: string;
|
|
204
|
+
rolesView: string[];
|
|
205
|
+
rolesEdit: string[];
|
|
206
|
+
rolesDelete: string[];
|
|
207
|
+
constructor(data?: PartialMessage<CurdViewContent>);
|
|
208
|
+
static readonly runtime: typeof proto3;
|
|
209
|
+
static readonly typeName = "sppb.CurdViewContent";
|
|
210
|
+
static readonly fields: FieldList;
|
|
211
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CurdViewContent;
|
|
212
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CurdViewContent;
|
|
213
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CurdViewContent;
|
|
214
|
+
static equals(a: CurdViewContent | PlainMessage<CurdViewContent> | undefined, b: CurdViewContent | PlainMessage<CurdViewContent> | undefined): boolean;
|
|
215
|
+
}
|
|
@@ -560,9 +560,9 @@ const _CurdView = class _CurdView extends Message {
|
|
|
560
560
|
*/
|
|
561
561
|
__publicField(this, "defaultDetailView", "");
|
|
562
562
|
/**
|
|
563
|
-
* @generated from field:
|
|
563
|
+
* @generated from field: sppb.CurdViewContent content = 25;
|
|
564
564
|
*/
|
|
565
|
-
__publicField(this, "content"
|
|
565
|
+
__publicField(this, "content");
|
|
566
566
|
proto3.util.initPartial(data, this);
|
|
567
567
|
}
|
|
568
568
|
static fromBinary(bytes, options) {
|
|
@@ -711,15 +711,168 @@ __publicField(_CurdView, "fields", proto3.util.newFieldList(() => [
|
|
|
711
711
|
T: 9
|
|
712
712
|
/* ScalarType.STRING */
|
|
713
713
|
},
|
|
714
|
+
{ no: 25, name: "content", kind: "message", T: CurdViewContent }
|
|
715
|
+
]));
|
|
716
|
+
let CurdView = _CurdView;
|
|
717
|
+
const _CurdViewContent = class _CurdViewContent extends Message {
|
|
718
|
+
constructor(data) {
|
|
719
|
+
super();
|
|
720
|
+
/**
|
|
721
|
+
* @generated from field: string title = 1;
|
|
722
|
+
*/
|
|
723
|
+
__publicField(this, "title", "");
|
|
724
|
+
/**
|
|
725
|
+
* @generated from field: string route_list = 4;
|
|
726
|
+
*/
|
|
727
|
+
__publicField(this, "routeList", "");
|
|
728
|
+
/**
|
|
729
|
+
* @generated from field: string route_show = 5;
|
|
730
|
+
*/
|
|
731
|
+
__publicField(this, "routeShow", "");
|
|
732
|
+
/**
|
|
733
|
+
* @generated from field: string route_create = 6;
|
|
734
|
+
*/
|
|
735
|
+
__publicField(this, "routeCreate", "");
|
|
736
|
+
/**
|
|
737
|
+
* @generated from field: string route_edit = 7;
|
|
738
|
+
*/
|
|
739
|
+
__publicField(this, "routeEdit", "");
|
|
740
|
+
/**
|
|
741
|
+
* @generated from field: string svc_name = 8;
|
|
742
|
+
*/
|
|
743
|
+
__publicField(this, "svcName", "");
|
|
744
|
+
/**
|
|
745
|
+
* @generated from field: string method_list = 9;
|
|
746
|
+
*/
|
|
747
|
+
__publicField(this, "methodList", "");
|
|
748
|
+
/**
|
|
749
|
+
* @generated from field: string method_get = 10;
|
|
750
|
+
*/
|
|
751
|
+
__publicField(this, "methodGet", "");
|
|
752
|
+
/**
|
|
753
|
+
* @generated from field: string method_create = 11;
|
|
754
|
+
*/
|
|
755
|
+
__publicField(this, "methodCreate", "");
|
|
756
|
+
/**
|
|
757
|
+
* @generated from field: string method_update = 12;
|
|
758
|
+
*/
|
|
759
|
+
__publicField(this, "methodUpdate", "");
|
|
760
|
+
/**
|
|
761
|
+
* @generated from field: string method_delete = 13;
|
|
762
|
+
*/
|
|
763
|
+
__publicField(this, "methodDelete", "");
|
|
764
|
+
/**
|
|
765
|
+
* @generated from field: repeated string roles_view = 14;
|
|
766
|
+
*/
|
|
767
|
+
__publicField(this, "rolesView", []);
|
|
768
|
+
/**
|
|
769
|
+
* @generated from field: repeated string roles_edit = 15;
|
|
770
|
+
*/
|
|
771
|
+
__publicField(this, "rolesEdit", []);
|
|
772
|
+
/**
|
|
773
|
+
* @generated from field: repeated string roles_delete = 16;
|
|
774
|
+
*/
|
|
775
|
+
__publicField(this, "rolesDelete", []);
|
|
776
|
+
proto3.util.initPartial(data, this);
|
|
777
|
+
}
|
|
778
|
+
static fromBinary(bytes, options) {
|
|
779
|
+
return new _CurdViewContent().fromBinary(bytes, options);
|
|
780
|
+
}
|
|
781
|
+
static fromJson(jsonValue, options) {
|
|
782
|
+
return new _CurdViewContent().fromJson(jsonValue, options);
|
|
783
|
+
}
|
|
784
|
+
static fromJsonString(jsonString, options) {
|
|
785
|
+
return new _CurdViewContent().fromJsonString(jsonString, options);
|
|
786
|
+
}
|
|
787
|
+
static equals(a, b) {
|
|
788
|
+
return proto3.util.equals(_CurdViewContent, a, b);
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
__publicField(_CurdViewContent, "runtime", proto3);
|
|
792
|
+
__publicField(_CurdViewContent, "typeName", "sppb.CurdViewContent");
|
|
793
|
+
__publicField(_CurdViewContent, "fields", proto3.util.newFieldList(() => [
|
|
714
794
|
{
|
|
715
|
-
no:
|
|
716
|
-
name: "
|
|
795
|
+
no: 1,
|
|
796
|
+
name: "title",
|
|
717
797
|
kind: "scalar",
|
|
718
798
|
T: 9
|
|
719
799
|
/* ScalarType.STRING */
|
|
720
|
-
}
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
no: 4,
|
|
803
|
+
name: "route_list",
|
|
804
|
+
kind: "scalar",
|
|
805
|
+
T: 9
|
|
806
|
+
/* ScalarType.STRING */
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
no: 5,
|
|
810
|
+
name: "route_show",
|
|
811
|
+
kind: "scalar",
|
|
812
|
+
T: 9
|
|
813
|
+
/* ScalarType.STRING */
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
no: 6,
|
|
817
|
+
name: "route_create",
|
|
818
|
+
kind: "scalar",
|
|
819
|
+
T: 9
|
|
820
|
+
/* ScalarType.STRING */
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
no: 7,
|
|
824
|
+
name: "route_edit",
|
|
825
|
+
kind: "scalar",
|
|
826
|
+
T: 9
|
|
827
|
+
/* ScalarType.STRING */
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
no: 8,
|
|
831
|
+
name: "svc_name",
|
|
832
|
+
kind: "scalar",
|
|
833
|
+
T: 9
|
|
834
|
+
/* ScalarType.STRING */
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
no: 9,
|
|
838
|
+
name: "method_list",
|
|
839
|
+
kind: "scalar",
|
|
840
|
+
T: 9
|
|
841
|
+
/* ScalarType.STRING */
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
no: 10,
|
|
845
|
+
name: "method_get",
|
|
846
|
+
kind: "scalar",
|
|
847
|
+
T: 9
|
|
848
|
+
/* ScalarType.STRING */
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
no: 11,
|
|
852
|
+
name: "method_create",
|
|
853
|
+
kind: "scalar",
|
|
854
|
+
T: 9
|
|
855
|
+
/* ScalarType.STRING */
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
no: 12,
|
|
859
|
+
name: "method_update",
|
|
860
|
+
kind: "scalar",
|
|
861
|
+
T: 9
|
|
862
|
+
/* ScalarType.STRING */
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
no: 13,
|
|
866
|
+
name: "method_delete",
|
|
867
|
+
kind: "scalar",
|
|
868
|
+
T: 9
|
|
869
|
+
/* ScalarType.STRING */
|
|
870
|
+
},
|
|
871
|
+
{ no: 14, name: "roles_view", kind: "scalar", T: 9, repeated: true },
|
|
872
|
+
{ no: 15, name: "roles_edit", kind: "scalar", T: 9, repeated: true },
|
|
873
|
+
{ no: 16, name: "roles_delete", kind: "scalar", T: 9, repeated: true }
|
|
721
874
|
]));
|
|
722
|
-
let
|
|
875
|
+
let CurdViewContent = _CurdViewContent;
|
|
723
876
|
export {
|
|
724
877
|
CurdConfig,
|
|
725
878
|
CurdConfigSvc,
|
|
@@ -729,6 +882,7 @@ export {
|
|
|
729
882
|
CurdConfigSvc_List,
|
|
730
883
|
CurdConfigSvc_Update,
|
|
731
884
|
CurdView,
|
|
885
|
+
CurdViewContent,
|
|
732
886
|
CurdViewCreateReq,
|
|
733
887
|
CurdViewGetReq,
|
|
734
888
|
CurdViewGetRes,
|