@apexcura/core 0.0.17-Beta15 → 0.0.17-Beta150
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/index.d.mts +169 -171
- package/dist/index.d.ts +169 -171
- package/dist/index.js +46 -2
- package/dist/index.mjs +51 -4
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,182 +1,180 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { UploadFile } from 'antd';
|
|
2
3
|
|
|
3
4
|
type styling = {
|
|
4
5
|
horizontalGutter?: number;
|
|
5
6
|
verticalGutter?: number;
|
|
6
7
|
};
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
8
|
+
type pagenationType = {
|
|
9
|
+
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
};
|
|
12
|
+
type SchemaField = {
|
|
13
|
+
name?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
source?: string;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
element?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
action?: string;
|
|
20
|
+
order?: number;
|
|
21
|
+
colCount?: number;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
activeClassName?: string;
|
|
24
|
+
listClassName?: string;
|
|
25
|
+
listItemClassName?: string;
|
|
26
|
+
buttonClassName?: string;
|
|
27
|
+
icon?: string;
|
|
28
|
+
placement?: string;
|
|
29
|
+
firstPlaceholder?: string;
|
|
30
|
+
secondPlaceholder?: string;
|
|
31
|
+
enabled_dates?: string;
|
|
32
|
+
profileImageClassName?: string;
|
|
33
|
+
value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
|
|
34
|
+
message?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
notificationType?: "error" | "warning" | "success" | "info" | undefined;
|
|
37
|
+
showProgress?: boolean;
|
|
38
|
+
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
39
|
+
weekrange?: boolean;
|
|
40
|
+
img?: string;
|
|
41
|
+
primaryText?: string;
|
|
42
|
+
secondaryText?: string;
|
|
43
|
+
count?: number;
|
|
44
|
+
profileImage?: string;
|
|
45
|
+
profileSubClassName?: string;
|
|
46
|
+
containerClassName?: string;
|
|
47
|
+
subContainerClassName?: string;
|
|
48
|
+
secondTextClassName?: string;
|
|
49
|
+
iconsClassName?: string;
|
|
50
|
+
labelClassName?: string;
|
|
51
|
+
view?: boolean;
|
|
52
|
+
isSVGStylesOverride?: boolean;
|
|
53
|
+
rowSelection?: boolean;
|
|
54
|
+
length?: number;
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
fillText1?: string;
|
|
57
|
+
fillText2?: string;
|
|
58
|
+
pagination?: boolean;
|
|
59
|
+
is_detail?: boolean;
|
|
60
|
+
dateTime?: string;
|
|
61
|
+
minRows?: number;
|
|
62
|
+
maxRows?: number;
|
|
63
|
+
mode?: string;
|
|
64
|
+
checkedChildren?: string;
|
|
65
|
+
unCheckedChildren?: string;
|
|
66
|
+
items?: {
|
|
67
|
+
icon?: React.JSX.Element | string;
|
|
68
|
+
label?: string;
|
|
69
|
+
active?: boolean;
|
|
70
|
+
text?: string;
|
|
71
|
+
time?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
y?: number;
|
|
74
|
+
color?: string;
|
|
75
|
+
}[];
|
|
76
|
+
options?: {
|
|
77
|
+
key?: string | number;
|
|
78
|
+
label?: string;
|
|
79
|
+
value?: string;
|
|
80
|
+
}[];
|
|
81
|
+
firstOptions?: {
|
|
82
|
+
key?: string | number;
|
|
83
|
+
label?: string;
|
|
84
|
+
value?: string;
|
|
85
|
+
}[];
|
|
86
|
+
secondOptions?: {
|
|
87
|
+
key?: string | number;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string | string[];
|
|
90
|
+
}[];
|
|
91
|
+
selectBefore?: {
|
|
92
|
+
label?: string;
|
|
93
|
+
value?: string;
|
|
94
|
+
}[];
|
|
95
|
+
selectAfter?: {
|
|
96
|
+
label?: string;
|
|
97
|
+
value?: string;
|
|
98
|
+
}[];
|
|
99
|
+
dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
|
|
100
|
+
required?: boolean;
|
|
101
|
+
prefix?: React.ReactNode;
|
|
102
|
+
suffix?: React.ReactNode;
|
|
103
|
+
addonBefore?: React.ReactNode;
|
|
104
|
+
defaultValue?: string;
|
|
105
|
+
status?: "error" | "warning";
|
|
106
|
+
style?: React.CSSProperties;
|
|
107
|
+
fieldClassName?: string;
|
|
108
|
+
elementClassName?: string;
|
|
109
|
+
variant?: string;
|
|
110
|
+
thead?: {
|
|
111
|
+
id?: number;
|
|
112
|
+
name?: string;
|
|
113
|
+
label?: string;
|
|
114
|
+
visible?: boolean;
|
|
115
|
+
required?: boolean;
|
|
116
|
+
key?: string | number;
|
|
117
|
+
render?: (text: string) => React.JSX.Element;
|
|
118
|
+
ellipsis?: boolean;
|
|
119
|
+
}[];
|
|
120
|
+
tbody?: {
|
|
121
|
+
id?: number;
|
|
122
|
+
name?: string;
|
|
123
|
+
label?: string;
|
|
124
|
+
element?: string;
|
|
125
|
+
type?: string;
|
|
126
|
+
variable_data?: {
|
|
127
|
+
id: {
|
|
128
|
+
id?: number;
|
|
129
|
+
};
|
|
130
|
+
Route?: {
|
|
131
|
+
label: string;
|
|
132
|
+
element: string;
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
Dose?: {
|
|
136
|
+
label: string;
|
|
137
|
+
element: string;
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
Frequency?: {
|
|
141
|
+
label: string;
|
|
142
|
+
element: string;
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
When?: {
|
|
146
|
+
label: string;
|
|
147
|
+
element: string;
|
|
148
|
+
type: string;
|
|
149
|
+
};
|
|
150
|
+
Duration?: {
|
|
151
|
+
label: string;
|
|
152
|
+
element: string;
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
Instructions?: {
|
|
156
|
+
label: string;
|
|
157
|
+
element: string;
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
SubRows?: {
|
|
161
|
+
label: string;
|
|
62
162
|
};
|
|
63
|
-
items?: {
|
|
64
|
-
icon?: React.JSX.Element | string;
|
|
65
|
-
label?: string;
|
|
66
|
-
active?: boolean;
|
|
67
|
-
text?: string;
|
|
68
|
-
time?: string;
|
|
69
|
-
name?: string;
|
|
70
|
-
y?: number;
|
|
71
|
-
color?: string;
|
|
72
|
-
}[];
|
|
73
|
-
fields?: {
|
|
74
|
-
name?: string;
|
|
75
|
-
label?: string;
|
|
76
|
-
placeholder?: string;
|
|
77
|
-
element?: string;
|
|
78
|
-
type?: string;
|
|
79
|
-
value?: string | number | boolean | any[] | null | object;
|
|
80
|
-
options?: {
|
|
81
|
-
key?: number;
|
|
82
|
-
label: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[];
|
|
85
|
-
firstOptions?: {
|
|
86
|
-
key?: number;
|
|
87
|
-
label: string;
|
|
88
|
-
value: string;
|
|
89
|
-
}[];
|
|
90
|
-
secondOptions?: {
|
|
91
|
-
key?: number;
|
|
92
|
-
label: string;
|
|
93
|
-
value: string;
|
|
94
|
-
}[];
|
|
95
|
-
selectBefore?: {
|
|
96
|
-
label: string;
|
|
97
|
-
value: string;
|
|
98
|
-
}[];
|
|
99
|
-
selectAfter?: {
|
|
100
|
-
label: string;
|
|
101
|
-
value: string;
|
|
102
|
-
}[];
|
|
103
|
-
dropDownOptions?: any[];
|
|
104
|
-
visible?: boolean;
|
|
105
|
-
disabled?: boolean;
|
|
106
|
-
required?: boolean;
|
|
107
|
-
prefix?: React.ReactNode;
|
|
108
|
-
suffix?: React.ReactNode;
|
|
109
|
-
addonBefore?: React.ReactNode;
|
|
110
|
-
defaultValue?: string;
|
|
111
|
-
status?: "error" | "warning";
|
|
112
|
-
styles?: React.CSSProperties;
|
|
113
|
-
fieldClassName?: string;
|
|
114
|
-
elementClassName?: string;
|
|
115
|
-
variant?: string;
|
|
116
|
-
thead?: {
|
|
117
|
-
id: number;
|
|
118
|
-
name?: string;
|
|
119
|
-
label?: string;
|
|
120
|
-
visible?: boolean;
|
|
121
|
-
required?: boolean;
|
|
122
|
-
key?: string;
|
|
123
|
-
render?: () => void;
|
|
124
|
-
ellipsis: boolean;
|
|
125
|
-
}[];
|
|
126
|
-
tbody?: {
|
|
127
|
-
id?: number;
|
|
128
|
-
name?: string;
|
|
129
|
-
label?: string;
|
|
130
|
-
element?: string;
|
|
131
|
-
type?: string;
|
|
132
|
-
variable_data?: {
|
|
133
|
-
id: {
|
|
134
|
-
id?: number;
|
|
135
|
-
};
|
|
136
|
-
Route?: {
|
|
137
|
-
label: string;
|
|
138
|
-
element: string;
|
|
139
|
-
type: string;
|
|
140
|
-
};
|
|
141
|
-
Dose?: {
|
|
142
|
-
label: string;
|
|
143
|
-
element: string;
|
|
144
|
-
type: string;
|
|
145
|
-
};
|
|
146
|
-
Frequency?: {
|
|
147
|
-
label: string;
|
|
148
|
-
element: string;
|
|
149
|
-
type: string;
|
|
150
|
-
};
|
|
151
|
-
When?: {
|
|
152
|
-
label: string;
|
|
153
|
-
element: string;
|
|
154
|
-
type: string;
|
|
155
|
-
};
|
|
156
|
-
Duration?: {
|
|
157
|
-
label: string;
|
|
158
|
-
element: string;
|
|
159
|
-
type: string;
|
|
160
|
-
};
|
|
161
|
-
Instructions?: {
|
|
162
|
-
label: string;
|
|
163
|
-
element: string;
|
|
164
|
-
type: string;
|
|
165
|
-
};
|
|
166
|
-
SubRows?: {
|
|
167
|
-
label: string;
|
|
168
|
-
};
|
|
169
|
-
}[];
|
|
170
|
-
}[];
|
|
171
|
-
payload_keys?: string[];
|
|
172
|
-
api_endpoint?: string;
|
|
173
|
-
next_id?: string;
|
|
174
|
-
action?: string;
|
|
175
|
-
}[];
|
|
176
163
|
}[];
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
|
|
164
|
+
}[];
|
|
165
|
+
payload_keys?: string[];
|
|
166
|
+
api_endpoint?: string;
|
|
167
|
+
next_id?: string;
|
|
168
|
+
fields?: SchemaField[];
|
|
169
|
+
};
|
|
170
|
+
type Schema = {
|
|
171
|
+
className?: string;
|
|
172
|
+
schema: SchemaField[];
|
|
173
|
+
};
|
|
174
|
+
type FormExecutorProps = {
|
|
175
|
+
data: Schema;
|
|
176
|
+
setData?: (schema: Schema) => void;
|
|
177
|
+
selectedRecord?: (field: SchemaField) => void;
|
|
180
178
|
};
|
|
181
179
|
type ElementExecutorProps = FormExecutorProps & styling;
|
|
182
180
|
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,182 +1,180 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { UploadFile } from 'antd';
|
|
2
3
|
|
|
3
4
|
type styling = {
|
|
4
5
|
horizontalGutter?: number;
|
|
5
6
|
verticalGutter?: number;
|
|
6
7
|
};
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
8
|
+
type pagenationType = {
|
|
9
|
+
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
};
|
|
12
|
+
type SchemaField = {
|
|
13
|
+
name?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
source?: string;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
element?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
action?: string;
|
|
20
|
+
order?: number;
|
|
21
|
+
colCount?: number;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
activeClassName?: string;
|
|
24
|
+
listClassName?: string;
|
|
25
|
+
listItemClassName?: string;
|
|
26
|
+
buttonClassName?: string;
|
|
27
|
+
icon?: string;
|
|
28
|
+
placement?: string;
|
|
29
|
+
firstPlaceholder?: string;
|
|
30
|
+
secondPlaceholder?: string;
|
|
31
|
+
enabled_dates?: string;
|
|
32
|
+
profileImageClassName?: string;
|
|
33
|
+
value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
|
|
34
|
+
message?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
notificationType?: "error" | "warning" | "success" | "info" | undefined;
|
|
37
|
+
showProgress?: boolean;
|
|
38
|
+
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
39
|
+
weekrange?: boolean;
|
|
40
|
+
img?: string;
|
|
41
|
+
primaryText?: string;
|
|
42
|
+
secondaryText?: string;
|
|
43
|
+
count?: number;
|
|
44
|
+
profileImage?: string;
|
|
45
|
+
profileSubClassName?: string;
|
|
46
|
+
containerClassName?: string;
|
|
47
|
+
subContainerClassName?: string;
|
|
48
|
+
secondTextClassName?: string;
|
|
49
|
+
iconsClassName?: string;
|
|
50
|
+
labelClassName?: string;
|
|
51
|
+
view?: boolean;
|
|
52
|
+
isSVGStylesOverride?: boolean;
|
|
53
|
+
rowSelection?: boolean;
|
|
54
|
+
length?: number;
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
fillText1?: string;
|
|
57
|
+
fillText2?: string;
|
|
58
|
+
pagination?: boolean;
|
|
59
|
+
is_detail?: boolean;
|
|
60
|
+
dateTime?: string;
|
|
61
|
+
minRows?: number;
|
|
62
|
+
maxRows?: number;
|
|
63
|
+
mode?: string;
|
|
64
|
+
checkedChildren?: string;
|
|
65
|
+
unCheckedChildren?: string;
|
|
66
|
+
items?: {
|
|
67
|
+
icon?: React.JSX.Element | string;
|
|
68
|
+
label?: string;
|
|
69
|
+
active?: boolean;
|
|
70
|
+
text?: string;
|
|
71
|
+
time?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
y?: number;
|
|
74
|
+
color?: string;
|
|
75
|
+
}[];
|
|
76
|
+
options?: {
|
|
77
|
+
key?: string | number;
|
|
78
|
+
label?: string;
|
|
79
|
+
value?: string;
|
|
80
|
+
}[];
|
|
81
|
+
firstOptions?: {
|
|
82
|
+
key?: string | number;
|
|
83
|
+
label?: string;
|
|
84
|
+
value?: string;
|
|
85
|
+
}[];
|
|
86
|
+
secondOptions?: {
|
|
87
|
+
key?: string | number;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string | string[];
|
|
90
|
+
}[];
|
|
91
|
+
selectBefore?: {
|
|
92
|
+
label?: string;
|
|
93
|
+
value?: string;
|
|
94
|
+
}[];
|
|
95
|
+
selectAfter?: {
|
|
96
|
+
label?: string;
|
|
97
|
+
value?: string;
|
|
98
|
+
}[];
|
|
99
|
+
dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
|
|
100
|
+
required?: boolean;
|
|
101
|
+
prefix?: React.ReactNode;
|
|
102
|
+
suffix?: React.ReactNode;
|
|
103
|
+
addonBefore?: React.ReactNode;
|
|
104
|
+
defaultValue?: string;
|
|
105
|
+
status?: "error" | "warning";
|
|
106
|
+
style?: React.CSSProperties;
|
|
107
|
+
fieldClassName?: string;
|
|
108
|
+
elementClassName?: string;
|
|
109
|
+
variant?: string;
|
|
110
|
+
thead?: {
|
|
111
|
+
id?: number;
|
|
112
|
+
name?: string;
|
|
113
|
+
label?: string;
|
|
114
|
+
visible?: boolean;
|
|
115
|
+
required?: boolean;
|
|
116
|
+
key?: string | number;
|
|
117
|
+
render?: (text: string) => React.JSX.Element;
|
|
118
|
+
ellipsis?: boolean;
|
|
119
|
+
}[];
|
|
120
|
+
tbody?: {
|
|
121
|
+
id?: number;
|
|
122
|
+
name?: string;
|
|
123
|
+
label?: string;
|
|
124
|
+
element?: string;
|
|
125
|
+
type?: string;
|
|
126
|
+
variable_data?: {
|
|
127
|
+
id: {
|
|
128
|
+
id?: number;
|
|
129
|
+
};
|
|
130
|
+
Route?: {
|
|
131
|
+
label: string;
|
|
132
|
+
element: string;
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
Dose?: {
|
|
136
|
+
label: string;
|
|
137
|
+
element: string;
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
Frequency?: {
|
|
141
|
+
label: string;
|
|
142
|
+
element: string;
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
When?: {
|
|
146
|
+
label: string;
|
|
147
|
+
element: string;
|
|
148
|
+
type: string;
|
|
149
|
+
};
|
|
150
|
+
Duration?: {
|
|
151
|
+
label: string;
|
|
152
|
+
element: string;
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
Instructions?: {
|
|
156
|
+
label: string;
|
|
157
|
+
element: string;
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
SubRows?: {
|
|
161
|
+
label: string;
|
|
62
162
|
};
|
|
63
|
-
items?: {
|
|
64
|
-
icon?: React.JSX.Element | string;
|
|
65
|
-
label?: string;
|
|
66
|
-
active?: boolean;
|
|
67
|
-
text?: string;
|
|
68
|
-
time?: string;
|
|
69
|
-
name?: string;
|
|
70
|
-
y?: number;
|
|
71
|
-
color?: string;
|
|
72
|
-
}[];
|
|
73
|
-
fields?: {
|
|
74
|
-
name?: string;
|
|
75
|
-
label?: string;
|
|
76
|
-
placeholder?: string;
|
|
77
|
-
element?: string;
|
|
78
|
-
type?: string;
|
|
79
|
-
value?: string | number | boolean | any[] | null | object;
|
|
80
|
-
options?: {
|
|
81
|
-
key?: number;
|
|
82
|
-
label: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[];
|
|
85
|
-
firstOptions?: {
|
|
86
|
-
key?: number;
|
|
87
|
-
label: string;
|
|
88
|
-
value: string;
|
|
89
|
-
}[];
|
|
90
|
-
secondOptions?: {
|
|
91
|
-
key?: number;
|
|
92
|
-
label: string;
|
|
93
|
-
value: string;
|
|
94
|
-
}[];
|
|
95
|
-
selectBefore?: {
|
|
96
|
-
label: string;
|
|
97
|
-
value: string;
|
|
98
|
-
}[];
|
|
99
|
-
selectAfter?: {
|
|
100
|
-
label: string;
|
|
101
|
-
value: string;
|
|
102
|
-
}[];
|
|
103
|
-
dropDownOptions?: any[];
|
|
104
|
-
visible?: boolean;
|
|
105
|
-
disabled?: boolean;
|
|
106
|
-
required?: boolean;
|
|
107
|
-
prefix?: React.ReactNode;
|
|
108
|
-
suffix?: React.ReactNode;
|
|
109
|
-
addonBefore?: React.ReactNode;
|
|
110
|
-
defaultValue?: string;
|
|
111
|
-
status?: "error" | "warning";
|
|
112
|
-
styles?: React.CSSProperties;
|
|
113
|
-
fieldClassName?: string;
|
|
114
|
-
elementClassName?: string;
|
|
115
|
-
variant?: string;
|
|
116
|
-
thead?: {
|
|
117
|
-
id: number;
|
|
118
|
-
name?: string;
|
|
119
|
-
label?: string;
|
|
120
|
-
visible?: boolean;
|
|
121
|
-
required?: boolean;
|
|
122
|
-
key?: string;
|
|
123
|
-
render?: () => void;
|
|
124
|
-
ellipsis: boolean;
|
|
125
|
-
}[];
|
|
126
|
-
tbody?: {
|
|
127
|
-
id?: number;
|
|
128
|
-
name?: string;
|
|
129
|
-
label?: string;
|
|
130
|
-
element?: string;
|
|
131
|
-
type?: string;
|
|
132
|
-
variable_data?: {
|
|
133
|
-
id: {
|
|
134
|
-
id?: number;
|
|
135
|
-
};
|
|
136
|
-
Route?: {
|
|
137
|
-
label: string;
|
|
138
|
-
element: string;
|
|
139
|
-
type: string;
|
|
140
|
-
};
|
|
141
|
-
Dose?: {
|
|
142
|
-
label: string;
|
|
143
|
-
element: string;
|
|
144
|
-
type: string;
|
|
145
|
-
};
|
|
146
|
-
Frequency?: {
|
|
147
|
-
label: string;
|
|
148
|
-
element: string;
|
|
149
|
-
type: string;
|
|
150
|
-
};
|
|
151
|
-
When?: {
|
|
152
|
-
label: string;
|
|
153
|
-
element: string;
|
|
154
|
-
type: string;
|
|
155
|
-
};
|
|
156
|
-
Duration?: {
|
|
157
|
-
label: string;
|
|
158
|
-
element: string;
|
|
159
|
-
type: string;
|
|
160
|
-
};
|
|
161
|
-
Instructions?: {
|
|
162
|
-
label: string;
|
|
163
|
-
element: string;
|
|
164
|
-
type: string;
|
|
165
|
-
};
|
|
166
|
-
SubRows?: {
|
|
167
|
-
label: string;
|
|
168
|
-
};
|
|
169
|
-
}[];
|
|
170
|
-
}[];
|
|
171
|
-
payload_keys?: string[];
|
|
172
|
-
api_endpoint?: string;
|
|
173
|
-
next_id?: string;
|
|
174
|
-
action?: string;
|
|
175
|
-
}[];
|
|
176
163
|
}[];
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
|
|
164
|
+
}[];
|
|
165
|
+
payload_keys?: string[];
|
|
166
|
+
api_endpoint?: string;
|
|
167
|
+
next_id?: string;
|
|
168
|
+
fields?: SchemaField[];
|
|
169
|
+
};
|
|
170
|
+
type Schema = {
|
|
171
|
+
className?: string;
|
|
172
|
+
schema: SchemaField[];
|
|
173
|
+
};
|
|
174
|
+
type FormExecutorProps = {
|
|
175
|
+
data: Schema;
|
|
176
|
+
setData?: (schema: Schema) => void;
|
|
177
|
+
selectedRecord?: (field: SchemaField) => void;
|
|
180
178
|
};
|
|
181
179
|
type ElementExecutorProps = FormExecutorProps & styling;
|
|
182
180
|
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -97,6 +97,7 @@ function postService(url, method, data) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// src/libraries/element-executor.tsx
|
|
100
|
+
var import_antd = require("antd");
|
|
100
101
|
var ElementExecutor = (props) => {
|
|
101
102
|
const [data, setData] = (0, import_react.useState)([]);
|
|
102
103
|
const [schema, setSchema] = (0, import_react.useState)(props.data.schema);
|
|
@@ -117,6 +118,11 @@ var ElementExecutor = (props) => {
|
|
|
117
118
|
setSchema(updatedSchema);
|
|
118
119
|
props.setData && props.setData({ ...props.data, schema: updatedSchema });
|
|
119
120
|
};
|
|
121
|
+
(0, import_react.useEffect)(() => {
|
|
122
|
+
if (props?.data?.schema) {
|
|
123
|
+
setSchema([...props.data.schema]);
|
|
124
|
+
}
|
|
125
|
+
}, [props.data]);
|
|
120
126
|
const handleSelectData = async () => {
|
|
121
127
|
try {
|
|
122
128
|
const response = await postService("/products/", "POST", []);
|
|
@@ -265,6 +271,14 @@ var ElementExecutor = (props) => {
|
|
|
265
271
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
266
272
|
}
|
|
267
273
|
);
|
|
274
|
+
case "datetimepicker":
|
|
275
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
276
|
+
import_ui_components.DatePickerElement,
|
|
277
|
+
{
|
|
278
|
+
...elementProps,
|
|
279
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
280
|
+
}
|
|
281
|
+
);
|
|
268
282
|
case "upload":
|
|
269
283
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
270
284
|
import_ui_components.FileUpload,
|
|
@@ -379,14 +393,44 @@ var ElementExecutor = (props) => {
|
|
|
379
393
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
380
394
|
}
|
|
381
395
|
);
|
|
396
|
+
case "alert":
|
|
397
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
398
|
+
import_ui_components.NotificationAlert,
|
|
399
|
+
{
|
|
400
|
+
...elementProps,
|
|
401
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
case "editor":
|
|
405
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
406
|
+
import_ui_components.Editor,
|
|
407
|
+
{
|
|
408
|
+
...elementProps,
|
|
409
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
case "switch":
|
|
413
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
414
|
+
import_ui_components.SwitchElement,
|
|
415
|
+
{
|
|
416
|
+
...elementProps,
|
|
417
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
case "tooltip":
|
|
421
|
+
console.log(elementProps);
|
|
422
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: elementProps.tooltip_title }, renderElement({
|
|
423
|
+
...elementProps,
|
|
424
|
+
element: elementProps.child_element
|
|
425
|
+
}));
|
|
382
426
|
default:
|
|
383
427
|
return null;
|
|
384
428
|
}
|
|
385
429
|
};
|
|
386
430
|
const renderFields = (schema2) => {
|
|
387
|
-
return schema2 && schema2.map((eachSection) => {
|
|
431
|
+
return schema2 && schema2.map((eachSection, index) => {
|
|
388
432
|
if (eachSection.visible !== false) {
|
|
389
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key:
|
|
433
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: index }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderElement(eachSection), /* @__PURE__ */ import_react.default.createElement("div", { className: eachSection.className, key: index }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
390
434
|
"p",
|
|
391
435
|
{
|
|
392
436
|
style: {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/libraries/element-executor.tsx
|
|
2
|
-
import React, { useState } from "react";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
TextElement,
|
|
5
5
|
NumberElement,
|
|
@@ -32,7 +32,10 @@ import {
|
|
|
32
32
|
LineChart,
|
|
33
33
|
BarChart,
|
|
34
34
|
DivContainer,
|
|
35
|
-
ColorPickerElement
|
|
35
|
+
ColorPickerElement,
|
|
36
|
+
NotificationAlert,
|
|
37
|
+
Editor,
|
|
38
|
+
SwitchElement
|
|
36
39
|
} from "@apexcura/ui-components";
|
|
37
40
|
import moment from "moment";
|
|
38
41
|
|
|
@@ -94,6 +97,7 @@ function postService(url, method, data) {
|
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
// src/libraries/element-executor.tsx
|
|
100
|
+
import { Tooltip } from "antd";
|
|
97
101
|
var ElementExecutor = (props) => {
|
|
98
102
|
const [data, setData] = useState([]);
|
|
99
103
|
const [schema, setSchema] = useState(props.data.schema);
|
|
@@ -114,6 +118,11 @@ var ElementExecutor = (props) => {
|
|
|
114
118
|
setSchema(updatedSchema);
|
|
115
119
|
props.setData && props.setData({ ...props.data, schema: updatedSchema });
|
|
116
120
|
};
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (props?.data?.schema) {
|
|
123
|
+
setSchema([...props.data.schema]);
|
|
124
|
+
}
|
|
125
|
+
}, [props.data]);
|
|
117
126
|
const handleSelectData = async () => {
|
|
118
127
|
try {
|
|
119
128
|
const response = await postService("/products/", "POST", []);
|
|
@@ -262,6 +271,14 @@ var ElementExecutor = (props) => {
|
|
|
262
271
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
263
272
|
}
|
|
264
273
|
);
|
|
274
|
+
case "datetimepicker":
|
|
275
|
+
return /* @__PURE__ */ React.createElement(
|
|
276
|
+
DatePickerElement,
|
|
277
|
+
{
|
|
278
|
+
...elementProps,
|
|
279
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
280
|
+
}
|
|
281
|
+
);
|
|
265
282
|
case "upload":
|
|
266
283
|
return /* @__PURE__ */ React.createElement(
|
|
267
284
|
FileUpload,
|
|
@@ -376,14 +393,44 @@ var ElementExecutor = (props) => {
|
|
|
376
393
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
377
394
|
}
|
|
378
395
|
);
|
|
396
|
+
case "alert":
|
|
397
|
+
return /* @__PURE__ */ React.createElement(
|
|
398
|
+
NotificationAlert,
|
|
399
|
+
{
|
|
400
|
+
...elementProps,
|
|
401
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
case "editor":
|
|
405
|
+
return /* @__PURE__ */ React.createElement(
|
|
406
|
+
Editor,
|
|
407
|
+
{
|
|
408
|
+
...elementProps,
|
|
409
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
case "switch":
|
|
413
|
+
return /* @__PURE__ */ React.createElement(
|
|
414
|
+
SwitchElement,
|
|
415
|
+
{
|
|
416
|
+
...elementProps,
|
|
417
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
case "tooltip":
|
|
421
|
+
console.log(elementProps);
|
|
422
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { title: elementProps.tooltip_title }, renderElement({
|
|
423
|
+
...elementProps,
|
|
424
|
+
element: elementProps.child_element
|
|
425
|
+
}));
|
|
379
426
|
default:
|
|
380
427
|
return null;
|
|
381
428
|
}
|
|
382
429
|
};
|
|
383
430
|
const renderFields = (schema2) => {
|
|
384
|
-
return schema2 && schema2.map((eachSection) => {
|
|
431
|
+
return schema2 && schema2.map((eachSection, index) => {
|
|
385
432
|
if (eachSection.visible !== false) {
|
|
386
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, { key:
|
|
433
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, { key: index }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), /* @__PURE__ */ React.createElement("div", { className: eachSection.className, key: index }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
|
|
387
434
|
"p",
|
|
388
435
|
{
|
|
389
436
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/core",
|
|
3
|
-
"version": "0.0.17-
|
|
3
|
+
"version": "0.0.17-Beta150",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"build": "tsup"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@apexcura/ui-components": "^0.0.
|
|
31
|
+
"@apexcura/ui-components": "^0.0.16-Beta40",
|
|
32
32
|
"@testing-library/jest-dom": "^6.4.2",
|
|
33
33
|
"@testing-library/react": "^15.0.6",
|
|
34
34
|
"@types/react-global-configuration": "^1.3.3",
|