@chase-shao/vue-component-lib 1.0.1 → 1.1.0
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/components/data-gen/views/CreateView.vue.d.ts +24 -24
- package/dist/components/data-gen/widgets/Cascader.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/FileUpload.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputNumber.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputText.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/SelectList.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/TextArea.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/index.vue.d.ts +11 -11
- package/dist/composables/usePinia.d.ts +4 -0
- package/dist/composables/useRouter.d.ts +4 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.es.js +848 -42
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/main.d.ts +9 -1
- package/package.json +4 -1
|
@@ -10,27 +10,27 @@ declare function __VLS_template(): {
|
|
|
10
10
|
};
|
|
11
11
|
refs: {
|
|
12
12
|
dataWidgetsRef: (import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
13
14
|
onChange?: ((value: any) => any) | undefined;
|
|
14
15
|
onError?: ((value: string) => any) | undefined;
|
|
15
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
isFileUpload(): boolean;
|
|
18
18
|
submit(workflowId: number): void;
|
|
19
19
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
"update:modelValue": (value: any) => any;
|
|
20
21
|
change: (value: any) => any;
|
|
21
22
|
error: (value: string) => any;
|
|
22
|
-
"update:modelValue": (value: any) => any;
|
|
23
23
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
24
24
|
widgetRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
25
26
|
onChange?: ((value: any) => any) | undefined;
|
|
26
27
|
onError?: ((value: string) => any) | undefined;
|
|
27
28
|
onInput?: ((value: any) => any) | undefined;
|
|
28
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
29
29
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
"update:modelValue": (value: any) => any;
|
|
30
31
|
change: (value: any) => any;
|
|
31
32
|
error: (value: string) => any;
|
|
32
33
|
input: (value: any) => any;
|
|
33
|
-
"update:modelValue": (value: any) => any;
|
|
34
34
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
35
35
|
P: {};
|
|
36
36
|
B: {};
|
|
@@ -39,19 +39,19 @@ declare function __VLS_template(): {
|
|
|
39
39
|
M: {};
|
|
40
40
|
Defaults: {};
|
|
41
41
|
}, Readonly<{}> & Readonly<{
|
|
42
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
42
43
|
onChange?: ((value: any) => any) | undefined;
|
|
43
44
|
onError?: ((value: string) => any) | undefined;
|
|
44
45
|
onInput?: ((value: any) => any) | undefined;
|
|
45
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
46
46
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
47
47
|
modelValue: string;
|
|
48
48
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
49
49
|
}> & Readonly<{
|
|
50
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
51
50
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
51
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
52
52
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
53
|
-
change: (value?: string | number | null | undefined) => any;
|
|
54
53
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
54
|
+
change: (value?: string | number | null | undefined) => any;
|
|
55
55
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
56
56
|
P: {};
|
|
57
57
|
B: {};
|
|
@@ -63,18 +63,18 @@ declare function __VLS_template(): {
|
|
|
63
63
|
modelValue: string;
|
|
64
64
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
65
65
|
}> & Readonly<{
|
|
66
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
67
66
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
67
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
68
68
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
69
69
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
70
70
|
}> & Readonly<{
|
|
71
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
72
71
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
72
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
73
73
|
}>, {
|
|
74
74
|
submit(workflowId: number): void;
|
|
75
75
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
76
|
-
change: (value?: string | number | null | undefined) => any;
|
|
77
76
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
77
|
+
change: (value?: string | number | null | undefined) => any;
|
|
78
78
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
79
79
|
uploadRef: any;
|
|
80
80
|
}, any, import('vue').ComponentProvideOptions, {
|
|
@@ -87,8 +87,8 @@ declare function __VLS_template(): {
|
|
|
87
87
|
}, Readonly<{
|
|
88
88
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
89
89
|
}> & Readonly<{
|
|
90
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
91
90
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
91
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
93
|
submit(workflowId: number): void;
|
|
94
94
|
}, {}, {}, {}, {}> | null;
|
|
@@ -100,9 +100,9 @@ declare function __VLS_template(): {
|
|
|
100
100
|
M: {};
|
|
101
101
|
Defaults: {};
|
|
102
102
|
}, Readonly<{}> & Readonly<{
|
|
103
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
103
104
|
onChange?: ((value: any) => any) | undefined;
|
|
104
105
|
onError?: ((value: string) => any) | undefined;
|
|
105
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
106
106
|
}>, {
|
|
107
107
|
isFileUpload(): boolean;
|
|
108
108
|
submit(workflowId: number): void;
|
|
@@ -113,27 +113,27 @@ declare function __VLS_template(): {
|
|
|
113
113
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
114
114
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
115
115
|
dataWidgetsRef: (import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
116
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
116
117
|
onChange?: ((value: any) => any) | undefined;
|
|
117
118
|
onError?: ((value: string) => any) | undefined;
|
|
118
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
119
119
|
}>, {
|
|
120
120
|
isFileUpload(): boolean;
|
|
121
121
|
submit(workflowId: number): void;
|
|
122
122
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
123
|
+
"update:modelValue": (value: any) => any;
|
|
123
124
|
change: (value: any) => any;
|
|
124
125
|
error: (value: string) => any;
|
|
125
|
-
"update:modelValue": (value: any) => any;
|
|
126
126
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
127
127
|
widgetRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
128
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
128
129
|
onChange?: ((value: any) => any) | undefined;
|
|
129
130
|
onError?: ((value: string) => any) | undefined;
|
|
130
131
|
onInput?: ((value: any) => any) | undefined;
|
|
131
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
132
132
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
133
|
+
"update:modelValue": (value: any) => any;
|
|
133
134
|
change: (value: any) => any;
|
|
134
135
|
error: (value: string) => any;
|
|
135
136
|
input: (value: any) => any;
|
|
136
|
-
"update:modelValue": (value: any) => any;
|
|
137
137
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
138
138
|
P: {};
|
|
139
139
|
B: {};
|
|
@@ -142,19 +142,19 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
142
142
|
M: {};
|
|
143
143
|
Defaults: {};
|
|
144
144
|
}, Readonly<{}> & Readonly<{
|
|
145
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
145
146
|
onChange?: ((value: any) => any) | undefined;
|
|
146
147
|
onError?: ((value: string) => any) | undefined;
|
|
147
148
|
onInput?: ((value: any) => any) | undefined;
|
|
148
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
149
149
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
150
150
|
modelValue: string;
|
|
151
151
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
152
152
|
}> & Readonly<{
|
|
153
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
154
153
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
154
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
155
155
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
156
|
-
change: (value?: string | number | null | undefined) => any;
|
|
157
156
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
157
|
+
change: (value?: string | number | null | undefined) => any;
|
|
158
158
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
159
159
|
P: {};
|
|
160
160
|
B: {};
|
|
@@ -166,18 +166,18 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
166
166
|
modelValue: string;
|
|
167
167
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
168
168
|
}> & Readonly<{
|
|
169
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
170
169
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
170
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
171
171
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
172
172
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
173
173
|
}> & Readonly<{
|
|
174
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
175
174
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
175
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
176
176
|
}>, {
|
|
177
177
|
submit(workflowId: number): void;
|
|
178
178
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
179
|
-
change: (value?: string | number | null | undefined) => any;
|
|
180
179
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
180
|
+
change: (value?: string | number | null | undefined) => any;
|
|
181
181
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
182
182
|
uploadRef: any;
|
|
183
183
|
}, any, import('vue').ComponentProvideOptions, {
|
|
@@ -190,8 +190,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
190
190
|
}, Readonly<{
|
|
191
191
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
192
192
|
}> & Readonly<{
|
|
193
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
194
193
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
194
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
195
195
|
}>, {
|
|
196
196
|
submit(workflowId: number): void;
|
|
197
197
|
}, {}, {}, {}, {}> | null;
|
|
@@ -203,9 +203,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
203
203
|
M: {};
|
|
204
204
|
Defaults: {};
|
|
205
205
|
}, Readonly<{}> & Readonly<{
|
|
206
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
206
207
|
onChange?: ((value: any) => any) | undefined;
|
|
207
208
|
onError?: ((value: string) => any) | undefined;
|
|
208
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
209
209
|
}>, {
|
|
210
210
|
isFileUpload(): boolean;
|
|
211
211
|
submit(workflowId: number): void;
|
|
@@ -4,10 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
config: WidgetConfig;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (value?: string | number | null | undefined) => any;
|
|
8
7
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
8
|
+
change: (value?: string | number | null | undefined) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
11
10
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
11
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|
|
@@ -5,11 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
6
6
|
submit(workflowId: number): void;
|
|
7
7
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
-
change: (value?: string | number | null | undefined) => any;
|
|
9
8
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
9
|
+
change: (value?: string | number | null | undefined) => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
12
11
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
12
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
14
|
uploadRef: any;
|
|
15
15
|
}, any>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2
|
+
"update:modelValue": (value: any) => any;
|
|
2
3
|
change: (value: any) => any;
|
|
3
4
|
error: (value: string) => any;
|
|
4
5
|
input: (value: any) => any;
|
|
5
|
-
"update:modelValue": (value: any) => any;
|
|
6
6
|
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7
8
|
onChange?: ((value: any) => any) | undefined;
|
|
8
9
|
onError?: ((value: string) => any) | undefined;
|
|
9
10
|
onInput?: ((value: any) => any) | undefined;
|
|
10
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
11
11
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2
|
+
"update:modelValue": (value: any) => any;
|
|
2
3
|
change: (value: any) => any;
|
|
3
4
|
error: (value: string) => any;
|
|
4
5
|
input: (value: any) => any;
|
|
5
|
-
"update:modelValue": (value: any) => any;
|
|
6
6
|
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7
8
|
onChange?: ((value: any) => any) | undefined;
|
|
8
9
|
onError?: ((value: string) => any) | undefined;
|
|
9
10
|
onInput?: ((value: any) => any) | undefined;
|
|
10
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
11
11
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|
|
@@ -4,10 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
config: WidgetConfig;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (value?: string | number | null | undefined) => any;
|
|
8
7
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
8
|
+
change: (value?: string | number | null | undefined) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
11
10
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
11
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2
|
+
"update:modelValue": (value: any) => any;
|
|
2
3
|
change: (value: any) => any;
|
|
3
4
|
error: (value: string) => any;
|
|
4
5
|
input: (value: any) => any;
|
|
5
|
-
"update:modelValue": (value: any) => any;
|
|
6
6
|
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7
8
|
onChange?: ((value: any) => any) | undefined;
|
|
8
9
|
onError?: ((value: string) => any) | undefined;
|
|
9
10
|
onInput?: ((value: any) => any) | undefined;
|
|
10
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
11
11
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|
|
@@ -2,24 +2,24 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
2
2
|
isFileUpload(): boolean;
|
|
3
3
|
submit(workflowId: number): void;
|
|
4
4
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
5
|
+
"update:modelValue": (value: any) => any;
|
|
5
6
|
change: (value: any) => any;
|
|
6
7
|
error: (value: string) => any;
|
|
7
|
-
"update:modelValue": (value: any) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
9
10
|
onChange?: ((value: any) => any) | undefined;
|
|
10
11
|
onError?: ((value: string) => any) | undefined;
|
|
11
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
13
|
widgetRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
14
15
|
onChange?: ((value: any) => any) | undefined;
|
|
15
16
|
onError?: ((value: string) => any) | undefined;
|
|
16
17
|
onInput?: ((value: any) => any) | undefined;
|
|
17
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
18
18
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
19
|
+
"update:modelValue": (value: any) => any;
|
|
19
20
|
change: (value: any) => any;
|
|
20
21
|
error: (value: string) => any;
|
|
21
22
|
input: (value: any) => any;
|
|
22
|
-
"update:modelValue": (value: any) => any;
|
|
23
23
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
24
24
|
P: {};
|
|
25
25
|
B: {};
|
|
@@ -28,19 +28,19 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
28
28
|
M: {};
|
|
29
29
|
Defaults: {};
|
|
30
30
|
}, Readonly<{}> & Readonly<{
|
|
31
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
31
32
|
onChange?: ((value: any) => any) | undefined;
|
|
32
33
|
onError?: ((value: string) => any) | undefined;
|
|
33
34
|
onInput?: ((value: any) => any) | undefined;
|
|
34
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
35
35
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
36
36
|
modelValue: string;
|
|
37
37
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
38
38
|
}> & Readonly<{
|
|
39
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
40
39
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
40
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
41
41
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
42
|
-
change: (value?: string | number | null | undefined) => any;
|
|
43
42
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
43
|
+
change: (value?: string | number | null | undefined) => any;
|
|
44
44
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
45
45
|
P: {};
|
|
46
46
|
B: {};
|
|
@@ -52,18 +52,18 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
52
52
|
modelValue: string;
|
|
53
53
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
54
54
|
}> & Readonly<{
|
|
55
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
56
55
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
56
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
57
57
|
}>, {}, {}, {}, {}, {}> | import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
58
58
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
59
59
|
}> & Readonly<{
|
|
60
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
61
60
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
61
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
63
|
submit(workflowId: number): void;
|
|
64
64
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
65
|
-
change: (value?: string | number | null | undefined) => any;
|
|
66
65
|
"update:modelValue": (value?: string | number | null | undefined) => any;
|
|
66
|
+
change: (value?: string | number | null | undefined) => any;
|
|
67
67
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
68
68
|
uploadRef: any;
|
|
69
69
|
}, any, import('vue').ComponentProvideOptions, {
|
|
@@ -76,8 +76,8 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
76
76
|
}, Readonly<{
|
|
77
77
|
config: import('../../../services/dataGen').WidgetConfig;
|
|
78
78
|
}> & Readonly<{
|
|
79
|
-
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
80
79
|
"onUpdate:modelValue"?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
80
|
+
onChange?: ((value?: string | number | null | undefined) => any) | undefined;
|
|
81
81
|
}>, {
|
|
82
82
|
submit(workflowId: number): void;
|
|
83
83
|
}, {}, {}, {}, {}> | null;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i={class:"my-component"},a=e.defineComponent({__name:"MyComponent",props:{title:{default:"Hello, Vue 3 with TypeScript!"}},setup(t){const n=t,o=e.ref(n.title);return(r,l)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("h2",null,e.toDisplayString(o.value),1),e.renderSlot(r.$slots,"default",{},void 0,!0)]))}}),s=(t,n)=>{const o=t.__vccOpts||t;for(const[r,l]of n)o[r]=l;return o},c=s(a,[["__scopeId","data-v-7649ee09"]]),m=e.defineComponent({name:"SetupComponent",props:{initialCount:{type:Number,default:0}},setup(t){const n=e.ref("Setup API Component"),o=e.ref(t.initialCount);return{title:n,count:o,increment:()=>{o.value++}}}}),d={class:"setup-component"};function f(t,n,o,r,l,C){return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("h3",null,e.toDisplayString(t.title),1),e.createElementVNode("p",null,"Count: "+e.toDisplayString(t.count),1),e.createElementVNode("button",{onClick:n[0]||(n[0]=(...u)=>t.increment&&t.increment(...u))},"Increment"),e.renderSlot(t.$slots,"default",{},void 0,!0)])}const p=s(m,[["render",f],["__scopeId","data-v-5f4f20f5"]]),_={install(t){t.component("MyComponent",c),t.component("SetupComponent",p)}};exports.MyComponent=c;exports.SetupComponent=p;exports.default=_;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),K=require("axios"),M=require("pinia"),R=require("vue-router"),z=M.defineStore("main",{state:()=>({token:void 0})}),q=async t=>new Promise(a=>setTimeout(a,t)),G=async(t,a,o,n=void 0)=>{if(t[a]===void 0)try{t[a]=null,t[a]=await o()||n}catch(l){console.error(l),t[a]=void 0}for(;t[a]===null;)await q(100);return t[a]},x="",J="",D=K.create({baseURL:x,timeout:1e4,headers:{"Content-Type":"application/json"}}),Q=async()=>{const t=z();return await G(t,"token",async()=>(await D.get(`${x}/GenerateToken`,{params:{appid:"bpm",appsecret:J}}))?.data?.token)},h=async()=>{const t=await Q();return D.defaults.headers.common.Authorization=`Bearer ${t}`,D},E={CurrentUserEmail:()=>"test.email@dataGetter.ts",CurrentUserPositionCode:()=>888,CurrentDatetime:()=>new Date().toISOString(),ApproverEmail:()=>"test.approver@sanofi.com",ApproverPositionCode:()=>999,RejectReason:()=>"Test Reject Reason"};var B=(t=>(t[t.Create=0]="Create",t[t.Update=1]="Update",t[t.Details=2]="Details",t[t.list=3]="list",t))(B||{});function X(t){const a={pageType:"",fields:{},globalValidations:[]};return t.__ClassAttributes?.forEach(o=>{o.AttributeType==="UIPageType"?a.pageType=o.Type:o.AttributeType==="UIValidationControl"?a.globalValidations.push({rule:o.RuleName,param:o.RuleParameter,appliesTo:o.PropertyNames||["*"]}):o.AttributeType==="UIControl"&&(a.actions||(a.actions=[]),a.actions.push({isSubmit:o.IsSubmit,requestUrl:o.RequestUrl,redirectUrl:o.RedirectUrl,redirectType:o.RedirectType,title:o.Title,widget:o.Widget}))}),Object.entries(t).forEach(([o,n])=>{if(o==="__ClassAttributes"||o==="ClassName")return;const l={validations:[]},{attributes:d,propertyValue:s}=n;switch(s){case null:l.value="";break;case void 0:l.value="";break;default:l.value=s;break}d?.forEach(r=>{r.order||r.Order?l.order=r.order??r.Order:r.AttributeType==="UIControl"?l.widget={...r,column:!0}:r.AttributeType==="UIValidationControl"?l.validations.push(r):r.AttributeType==="UIListed"?l.widget={...r,column:!0}:r.DependentType&&(l.value=E[r.DependentType]?E[r.DependentType]():"")}),a.fields[o]=l}),a}const S=async(t,a)=>{const n=await(await h()).get(`/General/${t}/page`,{params:a});return X(n?.data)};async function Y(t,a){const n=await(await h()).get(`/General/${t}/list`,{params:a});return{data:n.data.Data.propertyValue.data,totalCount:n.data.Data.propertyValue.totalCount,actions:n.data.__ClassAttributes.filter(l=>l.AttributeType==="UIControl").map(l=>({redirectUrl:l.RedirectUrl,location:l.Location,attributeType:l.AttributeType,redirectType:l.RedirectType,readonly:l.Readonly,widget:l.Widget,title:l.Title,isSubmit:l.IsSubmit}))}}async function Z(t,a,o){const l=await(await h()).post(o,a,{params:{className:t}});return l.data.length>0?l.data[0]:0}function ee(t,a){return t.replace(/{workflowId}/g,a)}async function te(t,a,o,n){const l=await h(),d=ee(n,a);return(await l.put(d,o,{params:{className:t}}))?.data}function oe(t,a){return t.replace(/{WorkflowId}/g,a)}function ne(t,a){return t.replace(/{ApproverEmail}/g,a)}function ae(t,a){return t.replace(/{WorkFlowReason}/g,a)}async function le(t,a,o,n,l,d){const s=await h();let r=oe(d,a);return r=ne(r,o),r=ae(r,n),(await s.put(r,l,{params:{className:t}}))?.data}async function re(t,a){return((await(await h()).get(t,{params:{value:a}}))?.data).map(d=>({value:d.key,label:d.value}))}const ie=(t,a)=>t.reduce((o,n)=>o&&se(n,a),!0),se=(t,a)=>{const{RuleName:o,RuleParameter:n}=t;return ce[o](n,a)},ce={Regex:(t,a)=>new RegExp(t).test(a)},L=e.defineComponent({__name:"InputText",props:{modelValue:{},config:{},readonly:{type:Boolean},validations:{}},emits:["update:modelValue","change","error","input"],setup(t,{emit:a}){const o=t,n=a,l=r=>ie(o.validations,r),d=r=>{n("update:modelValue",r),n("input",r)},s=r=>{const i=l(r);n("update:modelValue",r),n("change",r),n("error",i?"":"Validation Error")};return(r,i)=>{const u=e.resolveComponent("AInput");return e.openBlock(),e.createBlock(u,{"model-value":o.modelValue,clearable:"",disabled:o.readonly||o.config.Readonly,onInput:d,onChange:s},null,8,["model-value","disabled"])}}}),ue=e.defineComponent({__name:"InputNumber",props:{modelValue:{},config:{},readonly:{type:Boolean},validations:{}},emits:["update:modelValue","change","error","input"],setup(t,{emit:a}){const o=t,n=a,l=e.ref(100),d=e.ref(0);e.onMounted(()=>{o.validations&&o.validations.forEach(i=>{i.RuleName==="Max"&&(l.value=i.RuleParameter),i.RuleName==="Min"&&(d.value=i.RuleParameter)})});const s=i=>{n("update:modelValue",i),n("input",i)},r=i=>{n("update:modelValue",i),n("change",i)};return(i,u)=>{const c=e.resolveComponent("AInputNumber");return e.openBlock(),e.createBlock(c,{"model-value":o.modelValue,clearable:"",disabled:o.readonly,min:d.value,max:l.value,onInput:s,onChange:r},null,8,["model-value","disabled","min","max"])}}}),T=e.defineComponent({__name:"SelectList",props:{modelValue:{},config:{}},emits:["update:modelValue","change"],setup(t,{emit:a}){const o=t,n=a,l=e.ref(!1),d=e.ref(o.config.options??[]),s=async()=>{d.value=await re(o.config.DataSourceProvider)};e.onMounted(s);const r=i=>{n("update:modelValue",i),n("change",i)};return(i,u)=>{const c=e.resolveComponent("AOption"),f=e.resolveComponent("ASelect");return e.openBlock(),e.createBlock(f,{"model-value":i.modelValue,loading:l.value,"filter-option":!0,"allow-search":!0,onChange:r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,p=>(e.openBlock(),e.createBlock(c,{key:p.value,value:p.value,label:p.label},null,8,["value","label"]))),128))]),_:1},8,["model-value","loading"])}}}),de=e.defineComponent({__name:"Cascader",props:{modelValue:{},config:{}},emits:["update:modelValue","change"],setup(t,{emit:a}){const o=t,n=a,l=e.ref(o.config.options??[]),d=r=>{n("update:modelValue",r),n("change",r)};e.onMounted(async()=>{if(o.config){const r=o.config.DataSourceProvider;if(r){const u=await(await h()).get(r);l.value=u.data}}});const s={value:"key",label:"value"};return(r,i)=>{const u=e.resolveComponent("ACascader"),c=e.resolveComponent("ASpace");return e.openBlock(),e.createBlock(c,{direction:"vertical",size:"large"},{default:e.withCtx(()=>[e.createVNode(u,{"field-names":s,"model-value":r.modelValue,options:l.value,style:{width:"320px"},placeholder:"Please select ...",onChange:d},null,8,["model-value","options"])]),_:1})}}}),pe=e.defineComponent({__name:"FileUpload",props:{config:{}},emits:["update:modelValue","change"],setup(t,{expose:a,emit:o}){const n=t,l=o,d="",s=e.ref(null),r=e.ref(0),i=e.ref([]);function u(p,m){return p.replace(/{WorkflowId}/g,m)}const c=e.computed(()=>{if(n.config.UploadURL){const p=d+n.config.UploadURL;return u(p,r.value.toString())}return""}),f=p=>{l("change",p)};return a({submit(p){console.log("🚀 ~ submit ~ workflowId:",p),s.value&&(n.config.UploadURL&&(r.value=p),e.nextTick(()=>{s.value.submit()}))}}),(p,m)=>{const v=e.resolveComponent("a-upload");return e.openBlock(),e.createBlock(v,{ref_key:"uploadRef",ref:s,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),"auto-upload":!1,action:c.value,onChange:f},{"start-icon":e.withCtx(()=>m[1]||(m[1]=[])),_:1},8,["modelValue","action"])}}}),me=e.defineComponent({__name:"TextArea",props:{modelValue:{},config:{},readonly:{type:Boolean},validations:{}},emits:["update:modelValue","change","error","input"],setup(t,{emit:a}){const o=t,n=a,l=s=>{n("update:modelValue",s),n("input",s)},d=s=>{n("update:modelValue",s),n("change",s)};return(s,r)=>{const i=e.resolveComponent("ATextarea");return e.openBlock(),e.createBlock(i,{"model-value":o.modelValue,placeholder:"Please enter something","allow-clear":"",disabled:o.readonly,onInput:l,onChange:d},null,8,["model-value","disabled"])}}}),fe={class:"widget-wrapper"},ge={class:"title mb-1.5"},ve={class:"form-widget"},_e={class:"widget"},ke={key:0,class:"err-msg"},we=e.defineComponent({__name:"index",props:{config:{},modelValue:{},readonly:{type:Boolean},validations:{}},emits:["update:modelValue","change","error"],setup(t,{expose:a,emit:o}){const n=t,l=o,d=e.useTemplateRef("widgetRef"),s=e.ref(n.modelValue||n.config?.value);e.watch(s,m=>{l("update:modelValue",m)});const r=e.computed(()=>{switch(n.config?.widget?.Widget){case"TextBox":return L;case"Number":return ue;case"SelectList":return T;case"Cascade":return de;case"File":return pe;case"TextArea":return me;case"DropDown":return T;default:return L}}),i=e.ref(""),u=m=>{i.value=m},c=m=>l("change",m),f=m=>l("update:modelValue",m);function p(){return n.config?.widget?.Widget==="File"}return a({isFileUpload(){return n.config?.widget?.Widget==="File"},submit(m){p()&&d.value.submit(m)}}),(m,v)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",ge,e.toDisplayString(n?.config?.widget?.Title),1),e.createElementVNode("div",ve,[e.createElementVNode("div",_e,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{ref_key:"widgetRef",ref:d,"model-value":n.modelValue,config:n.config.widget,validations:n.config.validations,onError:u,onChange:c,"onUpdate:modelValue":f},null,40,["model-value","config","validations"]))]),i.value.length>0?(e.openBlock(),e.createElementBlock("div",ke,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0)])]))}}),N=(t,a)=>{const o=t.__vccOpts||t;for(const[n,l]of a)o[n]=l;return o},I=N(we,[["__scopeId","data-v-bc0a480b"]]);var k=(t=>(t[t.Submit=0]="Submit",t[t.Link=1]="Link",t))(k||{});const he=e.defineComponent({__name:"SubmitButton",props:{url:{},redirectType:{}},emits:["click"],setup(t,{emit:a}){const o=t,n=a;function l(){n("click",k.Submit,o.url,o.redirectType)}return(d,s)=>{const r=e.resolveComponent("AButton");return e.openBlock(),e.createBlock(r,{onClick:l},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3})}}}),be=e.defineComponent({__name:"DetailLink",props:{url:{},redirectType:{}},emits:["click"],setup(t,{emit:a}){const o=t,n=a;function l(){n("click",k.Link,o.url,o.redirectType)}return(d,s)=>{const r=e.resolveComponent("ALink");return e.openBlock(),e.createBlock(r,{onClick:l},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3})}}}),V=e.defineComponent({__name:"index",props:{config:{}},emits:["click"],setup(t,{emit:a}){const o=t,n=a;function l(i,u,c){n("click",i,u,c)}const d=e.computed(()=>{switch(o.config.widget){case"Submit":return he;case"Link":default:return be}}),s=e.computed(()=>o.config.widget==="Submit"?o.config.requestUrl??"":o.config.widget==="Link"?o.config.redirectUrl??"":""),r=e.computed(()=>o.config.redirectType??"Details");return(i,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{url:s.value,"redirect-type":r.value,onClick:l},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.config.title),1)]),_:1},8,["url","redirect-type"]))}}),U=Symbol("router");function ye(){const t=e.inject(U);if(!t)throw new Error("Router not provided. Please provide router using app.provide(RouterKey, router)");return t}const Ce={class:"page-container relative h-full"},Ve={class:"page-title p-4 bg-white"},Be={class:"title"},Se={class:"page-content p-2"},Ne={class:"fields grid grid-cols-3 gap-8 bg-white p-4"},$e={class:"action-row absolute bottom-0 left-0 w-full bg-white p-4 flex justify-end"},De=e.defineComponent({__name:"CreateView",props:{className:{}},setup(t){const a=ye(),o=t,n=e.ref(),l=e.computed(()=>n.value?.fields?Object.entries(n.value.fields).map(([f,p])=>({fieldKey:f,...p})).filter(f=>f.widget&&f.widget.Widget!=="Hidden").sort((f,p)=>(f.order??0)-(p.order??0)):[]),d=e.computed(()=>n.value?.actions?[...n.value.actions].reverse():[]),s=e.reactive({}),r=e.ref(!0),i=e.useTemplateRef("dataWidgetsRef");e.onMounted(async()=>{r.value=!0,n.value=await S(B.Create,{className:o.className});for(const c in n.value.fields)s[c]=n.value.fields[c].value;r.value=!1});async function u(c,f,p){switch(c){case k.Submit:const m=await Z(o.className,s,f);i.value?.filter(v=>{v?.submit&&v.submit(m)}),a.push({name:"List"});break;case k.Link:p==="List"&&a.push({name:"List"});break;default:console.warn("Unknown action type:",c)}}return(c,f)=>{const p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",Ve,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("div",Be,e.toDisplayString(c.className)+" : Create",1)],!0)]),e.withDirectives((e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(m,v)=>(e.openBlock(),e.createElementBlock("div",{key:m.fieldKey,class:"field"},[e.createVNode(I,{ref_for:!0,ref_key:"dataWidgetsRef",ref:i,name:v,config:m,modelValue:s[m.fieldKey],"onUpdate:modelValue":b=>s[m.fieldKey]=b},null,8,["name","config","modelValue","onUpdate:modelValue"])]))),128))]),e.renderSlot(c.$slots,"content",{},void 0,!0)])),[[p,r.value]]),e.createElementVNode("div",$e,[e.renderSlot(c.$slots,"action",{},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(V,{key:m.Title,config:m,class:"action",onClick:u},null,8,["config"]))),128))])])}}}),A=N(De,[["__scopeId","data-v-cfe5b53b"]]),Ee={class:"page-container relative h-full"},Re={class:"page-title p-4 bg-white"},Ue={class:"title"},Le={class:"page-content p-2"},Te={class:"fields grid grid-cols-3 gap-8 bg-white p-4"},xe={class:"action-row absolute bottom-0 left-0 w-full bg-white p-4 flex justify-end"},Ie=e.defineComponent({__name:"UpdateView",props:{className:{},workflowId:{}},setup(t){const a=R.useRouter(),o=t,n=e.ref(),l=e.computed(()=>n.value?.fields?Object.entries(n.value.fields).map(([c,f])=>({fieldKey:c,...f})).filter(c=>c.widget&&c.widget.Widget!=="Hidden").sort((c,f)=>(c.order??0)-(f.order??0)):[]),d=e.computed(()=>n.value?.actions?[...n.value.actions].reverse():[]),s=e.reactive({}),r=e.ref(!0);e.onMounted(async()=>{r.value=!0,n.value=await S(B.Update,{workflowId:o.workflowId,className:o.className});for(const u in n.value.fields)s[u]=n.value.fields[u].value;r.value=!1});async function i(u,c,f){switch(u){case k.Submit:await te(o.className,o.workflowId,s,c),a.push({name:"List"});break;case k.Link:f==="List"&&a.push({name:"List"});break;default:console.warn("Unknown action type:",u)}}return(u,c)=>{const f=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",Re,[e.renderSlot(u.$slots,"title",{},()=>[e.createElementVNode("div",Ue,e.toDisplayString(u.className)+" : Update",1)],!0)]),e.withDirectives((e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{key:p.fieldKey,class:"field"},[e.createVNode(I,{name:m,config:p,modelValue:s[p.fieldKey],"onUpdate:modelValue":v=>s[p.fieldKey]=v},null,8,["name","config","modelValue","onUpdate:modelValue"])]))),128))]),e.renderSlot(u.$slots,"content",{},void 0,!0)])),[[f,r.value]]),e.createElementVNode("div",xe,[e.renderSlot(u.$slots,"action",{},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,p=>(e.openBlock(),e.createBlock(V,{key:p.Title,config:p,data:s,class:"action",onClick:i},null,8,["config","data"]))),128))])])}}}),H=N(Ie,[["__scopeId","data-v-a2711d7b"]]),Ae={class:"page-container relative h-full"},He={class:"page-title p-4 bg-white"},Pe={class:"title"},Fe={class:"page-content p-2"},Oe={class:"bg-white"},We={class:"action-row absolute bottom-0 left-0 w-full bg-white p-4 flex justify-end"},je=e.defineComponent({__name:"DetailView",props:{className:{},workflowId:{}},setup(t){const a=R.useRouter(),o=t,n=e.ref();e.computed(()=>n.value?.fields?Object.entries(n.value.fields).map(([u,c])=>({fieldKey:u,...c})).filter(u=>u.widget&&u.widget.Widget!=="Hidden").sort((u,c)=>(u.order??0)-(c.order??0)):[]);const l=e.computed(()=>n.value?.actions?[...n.value.actions].reverse():[]),d=e.reactive([]),s=e.ref(!0);e.onMounted(async()=>{s.value=!0,n.value=await S(B.Details,{workflowId:o.workflowId,className:o.className});for(const[i,u]of Object.entries(n.value.fields))d.push({label:i,value:u.value});s.value=!1});function r(i,u,c){switch(i){case k.Submit:le(o.className,o.workflowId,E.ApproverEmail(),"",d,u),a.push({name:"List"});break;case k.Link:c==="List"&&a.push({name:"List"});break;default:console.warn("Unknown action type:",i)}}return(i,u)=>{const c=e.resolveComponent("a-descriptions"),f=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",He,[e.renderSlot(i.$slots,"title",{},()=>[e.createElementVNode("div",Pe,e.toDisplayString(i.className)+" : Approve",1)],!0)]),e.withDirectives((e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",Oe,[e.createVNode(c,{data:d,layout:"inline-vertical"},null,8,["data"])]),e.renderSlot(i.$slots,"content",{},void 0,!0)])),[[f,s.value]]),e.createElementVNode("div",We,[e.renderSlot(i.$slots,"action",{},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,p=>(e.openBlock(),e.createBlock(V,{key:p.Title,config:p,data:d,class:"action",onClick:r},null,8,["config","data"]))),128))])])}}}),P=N(je,[["__scopeId","data-v-a6c5d695"]]),Ke={class:"page-container relative h-full"},Me={class:"page-title p-4 bg-white"},ze={class:"title"},qe={class:"page-conteont p-2"},F=e.defineComponent({__name:"ListView",props:{className:{}},setup(t){const a=R.useRouter(),o=t,n=e.ref(),l=e.reactive({current:1,total:0,pageSize:20,defaultPageSize:20,showTotal:!0,showPageSize:!0}),d=e.computed(()=>({PageNumber:l.current-1,PageSize:l.pageSize,Filters:[],Sorts:[]})),s=e.ref([]),r=e.ref([]),i=e.ref(!0),u=e.ref(!0),c=e.ref(),f=g=>{console.log(g),s.value=Object.entries(g).filter(([,_])=>_.widget?.column).map(([_,w])=>({title:w.widget.Title,dataIndex:_.charAt(0).toLowerCase()+_.slice(1),order:w.order})).sort((_,w)=>_.order-w.order),s.value.push({title:"Actions",slotName:"optional"})},p=async()=>{u.value=!0;const g=await Y(o.className,d.value);r.value=g.data,l.total=g.totalCount,c.value=g.actions,u.value=!1};e.onMounted(async()=>{i.value=!0,n.value=await S(3,{className:o.className}),f(n.value.fields),i.value=!1,p()});const m=g=>{l.current=g,p()},v=g=>{l.pageSize=g,p()};function b(g,_,w,$){switch(g){case k.Link:a.push({name:w,params:{workflowId:$}});break;default:console.warn("Unknown action type:",g)}}function W(g,_,w){switch(g){case k.Link:a.push({name:w});break;default:console.warn("Unknown action type:",g)}}return(g,_)=>{const w=e.resolveComponent("ATable"),$=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Me,[e.renderSlot(g.$slots,"title",{},()=>[e.createElementVNode("div",ze,e.toDisplayString(g.className)+" : List",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[y.location==="InOperation"?(e.openBlock(),e.createBlock(V,{key:0,config:y,class:"action",onClick:_[0]||(_[0]=(...C)=>W(...C))},null,8,["config"])):e.createCommentVNode("",!0)],64))),128))])]),e.withDirectives((e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(g.$slots,"content",{},()=>[e.createVNode(w,{columns:s.value,data:r.value,stripe:"",border:"","page-position":"bl",pagination:l,loading:u.value,onPageChange:m,onPageSizeChange:v},{optional:e.withCtx(({record:y})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,C=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C.title},[C.location==="InTable"?(e.openBlock(),e.createBlock(V,{key:0,config:C,class:"action",onClick:(...j)=>b(...j,y.workflowId)},null,8,["config","onClick"])):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["columns","data","pagination","loading"])])])),[[$,i.value]])])}}}),O=Symbol("pinia"),Ge={install(t,a={}){a.router&&t.provide(U,a.router),a.pinia&&t.provide(O,a.pinia),t.component("CreateView",A),t.component("UpdateView",H),t.component("DetailView",P),t.component("ListView",F)}};exports.CreateView=A;exports.DetailView=P;exports.ListView=F;exports.PiniaKey=O;exports.RouterKey=U;exports.UpdateView=H;exports.default=Ge;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|