@apexcura/core 0.0.17-Beta8 → 0.0.17-Beta81
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 +167 -171
- package/dist/index.d.ts +167 -171
- package/dist/index.js +47 -33
- package/dist/index.mjs +54 -40
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,180 +1,176 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { UploadFile } from 'antd';
|
|
2
3
|
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type pagenationType = {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: 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
|
-
|
|
8
|
+
type SchemaField = {
|
|
9
|
+
name?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
element?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
action?: string;
|
|
16
|
+
order?: number;
|
|
17
|
+
colCount?: number;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
activeClassName?: string;
|
|
20
|
+
listClassName?: string;
|
|
21
|
+
listItemClassName?: string;
|
|
22
|
+
buttonClassName?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
placement?: string;
|
|
25
|
+
firstPlaceholder?: string;
|
|
26
|
+
secondPlaceholder?: string;
|
|
27
|
+
enabled_dates?: string;
|
|
28
|
+
profileImageClassName?: string;
|
|
29
|
+
value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
|
|
30
|
+
message?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
notificationType?: 'error' | 'warning' | 'success' | 'info' | undefined;
|
|
33
|
+
showProgress?: boolean;
|
|
34
|
+
picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
|
|
35
|
+
weekrange?: boolean;
|
|
36
|
+
img?: string;
|
|
37
|
+
primaryText?: string;
|
|
38
|
+
secondaryText?: string;
|
|
39
|
+
count?: number;
|
|
40
|
+
profileImage?: string;
|
|
41
|
+
profileSubClassName?: string;
|
|
42
|
+
containerClassName?: string;
|
|
43
|
+
subContainerClassName?: string;
|
|
44
|
+
secondTextClassName?: string;
|
|
45
|
+
iconsClassName?: string;
|
|
46
|
+
labelClassName?: string;
|
|
47
|
+
view?: boolean;
|
|
48
|
+
isSVGStylesOverride?: boolean;
|
|
49
|
+
rowSelection?: boolean;
|
|
50
|
+
length?: number;
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
fillText1?: string;
|
|
53
|
+
fillText2?: string;
|
|
54
|
+
pagination?: boolean;
|
|
55
|
+
is_detail?: boolean;
|
|
56
|
+
dateTime?: string;
|
|
57
|
+
minRows?: number;
|
|
58
|
+
maxRows?: number;
|
|
59
|
+
mode?: 'multiple' | 'tags' | undefined;
|
|
60
|
+
items?: {
|
|
61
|
+
icon?: React.JSX.Element | string;
|
|
62
|
+
label?: string;
|
|
63
|
+
active?: boolean;
|
|
64
|
+
text?: string;
|
|
65
|
+
time?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
y?: number;
|
|
68
|
+
color?: string;
|
|
69
|
+
}[];
|
|
70
|
+
options?: {
|
|
71
|
+
key?: string | number;
|
|
72
|
+
label?: string;
|
|
73
|
+
value?: string;
|
|
74
|
+
}[];
|
|
75
|
+
firstOptions?: {
|
|
76
|
+
key?: string | number;
|
|
77
|
+
label?: string;
|
|
78
|
+
value?: string;
|
|
79
|
+
}[];
|
|
80
|
+
secondOptions?: {
|
|
81
|
+
key?: string | number;
|
|
82
|
+
label?: string;
|
|
83
|
+
value?: string | string[];
|
|
84
|
+
}[];
|
|
85
|
+
selectBefore?: {
|
|
86
|
+
label?: string;
|
|
87
|
+
value?: string;
|
|
88
|
+
}[];
|
|
89
|
+
selectAfter?: {
|
|
90
|
+
label?: string;
|
|
91
|
+
value?: string;
|
|
92
|
+
}[];
|
|
93
|
+
dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
|
|
94
|
+
required?: boolean;
|
|
95
|
+
prefix?: React.ReactNode;
|
|
96
|
+
suffix?: React.ReactNode;
|
|
97
|
+
addonBefore?: React.ReactNode;
|
|
98
|
+
defaultValue?: string;
|
|
99
|
+
status?: 'error' | 'warning';
|
|
100
|
+
styles?: React.CSSProperties;
|
|
101
|
+
fieldClassName?: string;
|
|
102
|
+
elementClassName?: string;
|
|
103
|
+
variant?: 'outlined' | 'borderless' | 'filled';
|
|
104
|
+
thead?: {
|
|
105
|
+
id?: number;
|
|
106
|
+
name?: string;
|
|
107
|
+
label?: string;
|
|
108
|
+
visible?: boolean;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
key?: string | number;
|
|
111
|
+
render?: (text: string) => React.JSX.Element;
|
|
112
|
+
ellipsis: boolean;
|
|
113
|
+
}[];
|
|
114
|
+
tbody?: {
|
|
115
|
+
id?: number;
|
|
116
|
+
name?: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
element?: string;
|
|
119
|
+
type?: string;
|
|
120
|
+
variable_data?: {
|
|
121
|
+
id: {
|
|
122
|
+
id?: number;
|
|
123
|
+
};
|
|
124
|
+
Route?: {
|
|
125
|
+
label: string;
|
|
126
|
+
element: string;
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
Dose?: {
|
|
130
|
+
label: string;
|
|
131
|
+
element: string;
|
|
132
|
+
type: string;
|
|
133
|
+
};
|
|
134
|
+
Frequency?: {
|
|
135
|
+
label: string;
|
|
136
|
+
element: string;
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
When?: {
|
|
140
|
+
label: string;
|
|
141
|
+
element: string;
|
|
142
|
+
type: string;
|
|
143
|
+
};
|
|
144
|
+
Duration?: {
|
|
145
|
+
label: string;
|
|
146
|
+
element: string;
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
Instructions?: {
|
|
150
|
+
label: string;
|
|
151
|
+
element: string;
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
SubRows?: {
|
|
155
|
+
label: string;
|
|
58
156
|
};
|
|
59
|
-
items?: {
|
|
60
|
-
icon?: React.JSX.Element | string;
|
|
61
|
-
label?: string;
|
|
62
|
-
active?: boolean;
|
|
63
|
-
text?: string;
|
|
64
|
-
time?: string;
|
|
65
|
-
name?: string;
|
|
66
|
-
y?: number;
|
|
67
|
-
color?: string;
|
|
68
|
-
}[];
|
|
69
|
-
fields?: {
|
|
70
|
-
name?: string;
|
|
71
|
-
label?: string;
|
|
72
|
-
placeholder?: string;
|
|
73
|
-
element?: string;
|
|
74
|
-
type?: string;
|
|
75
|
-
value?: string | number | boolean | any[] | null | object;
|
|
76
|
-
options?: {
|
|
77
|
-
key?: number;
|
|
78
|
-
label: string;
|
|
79
|
-
value: string;
|
|
80
|
-
}[];
|
|
81
|
-
firstOptions?: {
|
|
82
|
-
key?: number;
|
|
83
|
-
label: string;
|
|
84
|
-
value: string;
|
|
85
|
-
}[];
|
|
86
|
-
secondOptions?: {
|
|
87
|
-
key?: number;
|
|
88
|
-
label: string;
|
|
89
|
-
value: string;
|
|
90
|
-
}[];
|
|
91
|
-
selectBefore?: {
|
|
92
|
-
label: string;
|
|
93
|
-
value: string;
|
|
94
|
-
}[];
|
|
95
|
-
selectAfter?: {
|
|
96
|
-
label: string;
|
|
97
|
-
value: string;
|
|
98
|
-
}[];
|
|
99
|
-
dropDownOptions?: any[];
|
|
100
|
-
visible?: boolean;
|
|
101
|
-
disabled?: boolean;
|
|
102
|
-
required?: boolean;
|
|
103
|
-
prefix?: React.ReactNode;
|
|
104
|
-
suffix?: React.ReactNode;
|
|
105
|
-
addonBefore?: React.ReactNode;
|
|
106
|
-
defaultValue?: string;
|
|
107
|
-
status?: "error" | "warning";
|
|
108
|
-
styles?: React.CSSProperties;
|
|
109
|
-
fieldClassName?: string;
|
|
110
|
-
elementClassName?: string;
|
|
111
|
-
variant?: string;
|
|
112
|
-
thead?: {
|
|
113
|
-
id: number;
|
|
114
|
-
name?: string;
|
|
115
|
-
label?: string;
|
|
116
|
-
visible?: boolean;
|
|
117
|
-
required?: boolean;
|
|
118
|
-
key?: string;
|
|
119
|
-
render?: () => void;
|
|
120
|
-
ellipsis: boolean;
|
|
121
|
-
}[];
|
|
122
|
-
tbody?: {
|
|
123
|
-
id?: number;
|
|
124
|
-
name?: string;
|
|
125
|
-
label?: string;
|
|
126
|
-
element?: string;
|
|
127
|
-
type?: string;
|
|
128
|
-
variable_data?: {
|
|
129
|
-
id: {
|
|
130
|
-
id?: number;
|
|
131
|
-
};
|
|
132
|
-
Route?: {
|
|
133
|
-
label: string;
|
|
134
|
-
element: string;
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
Dose?: {
|
|
138
|
-
label: string;
|
|
139
|
-
element: string;
|
|
140
|
-
type: string;
|
|
141
|
-
};
|
|
142
|
-
Frequency?: {
|
|
143
|
-
label: string;
|
|
144
|
-
element: string;
|
|
145
|
-
type: string;
|
|
146
|
-
};
|
|
147
|
-
When?: {
|
|
148
|
-
label: string;
|
|
149
|
-
element: string;
|
|
150
|
-
type: string;
|
|
151
|
-
};
|
|
152
|
-
Duration?: {
|
|
153
|
-
label: string;
|
|
154
|
-
element: string;
|
|
155
|
-
type: string;
|
|
156
|
-
};
|
|
157
|
-
Instructions?: {
|
|
158
|
-
label: string;
|
|
159
|
-
element: string;
|
|
160
|
-
type: string;
|
|
161
|
-
};
|
|
162
|
-
SubRows?: {
|
|
163
|
-
label: string;
|
|
164
|
-
};
|
|
165
|
-
}[];
|
|
166
|
-
}[];
|
|
167
|
-
payload_keys?: string[];
|
|
168
|
-
api_endpoint?: string;
|
|
169
|
-
next_id?: string;
|
|
170
|
-
action?: string;
|
|
171
|
-
}[];
|
|
172
157
|
}[];
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
|
|
158
|
+
}[];
|
|
159
|
+
payload_keys?: string[];
|
|
160
|
+
api_endpoint?: string;
|
|
161
|
+
next_id?: string;
|
|
162
|
+
fields?: SchemaField[];
|
|
163
|
+
};
|
|
164
|
+
type Schema = {
|
|
165
|
+
className?: string;
|
|
166
|
+
schema: SchemaField[];
|
|
167
|
+
};
|
|
168
|
+
type FormExecutorProps = {
|
|
169
|
+
data: Schema;
|
|
170
|
+
setData?: (schema: Schema) => void;
|
|
171
|
+
selectedRecord?: (field: SchemaField) => void;
|
|
176
172
|
};
|
|
177
|
-
type ElementExecutorProps = FormExecutorProps
|
|
173
|
+
type ElementExecutorProps = FormExecutorProps;
|
|
178
174
|
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
179
175
|
|
|
180
176
|
export { ElementExecutor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,180 +1,176 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { UploadFile } from 'antd';
|
|
2
3
|
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type pagenationType = {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: 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
|
-
|
|
8
|
+
type SchemaField = {
|
|
9
|
+
name?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
element?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
action?: string;
|
|
16
|
+
order?: number;
|
|
17
|
+
colCount?: number;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
activeClassName?: string;
|
|
20
|
+
listClassName?: string;
|
|
21
|
+
listItemClassName?: string;
|
|
22
|
+
buttonClassName?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
placement?: string;
|
|
25
|
+
firstPlaceholder?: string;
|
|
26
|
+
secondPlaceholder?: string;
|
|
27
|
+
enabled_dates?: string;
|
|
28
|
+
profileImageClassName?: string;
|
|
29
|
+
value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
|
|
30
|
+
message?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
notificationType?: 'error' | 'warning' | 'success' | 'info' | undefined;
|
|
33
|
+
showProgress?: boolean;
|
|
34
|
+
picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
|
|
35
|
+
weekrange?: boolean;
|
|
36
|
+
img?: string;
|
|
37
|
+
primaryText?: string;
|
|
38
|
+
secondaryText?: string;
|
|
39
|
+
count?: number;
|
|
40
|
+
profileImage?: string;
|
|
41
|
+
profileSubClassName?: string;
|
|
42
|
+
containerClassName?: string;
|
|
43
|
+
subContainerClassName?: string;
|
|
44
|
+
secondTextClassName?: string;
|
|
45
|
+
iconsClassName?: string;
|
|
46
|
+
labelClassName?: string;
|
|
47
|
+
view?: boolean;
|
|
48
|
+
isSVGStylesOverride?: boolean;
|
|
49
|
+
rowSelection?: boolean;
|
|
50
|
+
length?: number;
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
fillText1?: string;
|
|
53
|
+
fillText2?: string;
|
|
54
|
+
pagination?: boolean;
|
|
55
|
+
is_detail?: boolean;
|
|
56
|
+
dateTime?: string;
|
|
57
|
+
minRows?: number;
|
|
58
|
+
maxRows?: number;
|
|
59
|
+
mode?: 'multiple' | 'tags' | undefined;
|
|
60
|
+
items?: {
|
|
61
|
+
icon?: React.JSX.Element | string;
|
|
62
|
+
label?: string;
|
|
63
|
+
active?: boolean;
|
|
64
|
+
text?: string;
|
|
65
|
+
time?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
y?: number;
|
|
68
|
+
color?: string;
|
|
69
|
+
}[];
|
|
70
|
+
options?: {
|
|
71
|
+
key?: string | number;
|
|
72
|
+
label?: string;
|
|
73
|
+
value?: string;
|
|
74
|
+
}[];
|
|
75
|
+
firstOptions?: {
|
|
76
|
+
key?: string | number;
|
|
77
|
+
label?: string;
|
|
78
|
+
value?: string;
|
|
79
|
+
}[];
|
|
80
|
+
secondOptions?: {
|
|
81
|
+
key?: string | number;
|
|
82
|
+
label?: string;
|
|
83
|
+
value?: string | string[];
|
|
84
|
+
}[];
|
|
85
|
+
selectBefore?: {
|
|
86
|
+
label?: string;
|
|
87
|
+
value?: string;
|
|
88
|
+
}[];
|
|
89
|
+
selectAfter?: {
|
|
90
|
+
label?: string;
|
|
91
|
+
value?: string;
|
|
92
|
+
}[];
|
|
93
|
+
dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
|
|
94
|
+
required?: boolean;
|
|
95
|
+
prefix?: React.ReactNode;
|
|
96
|
+
suffix?: React.ReactNode;
|
|
97
|
+
addonBefore?: React.ReactNode;
|
|
98
|
+
defaultValue?: string;
|
|
99
|
+
status?: 'error' | 'warning';
|
|
100
|
+
styles?: React.CSSProperties;
|
|
101
|
+
fieldClassName?: string;
|
|
102
|
+
elementClassName?: string;
|
|
103
|
+
variant?: 'outlined' | 'borderless' | 'filled';
|
|
104
|
+
thead?: {
|
|
105
|
+
id?: number;
|
|
106
|
+
name?: string;
|
|
107
|
+
label?: string;
|
|
108
|
+
visible?: boolean;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
key?: string | number;
|
|
111
|
+
render?: (text: string) => React.JSX.Element;
|
|
112
|
+
ellipsis: boolean;
|
|
113
|
+
}[];
|
|
114
|
+
tbody?: {
|
|
115
|
+
id?: number;
|
|
116
|
+
name?: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
element?: string;
|
|
119
|
+
type?: string;
|
|
120
|
+
variable_data?: {
|
|
121
|
+
id: {
|
|
122
|
+
id?: number;
|
|
123
|
+
};
|
|
124
|
+
Route?: {
|
|
125
|
+
label: string;
|
|
126
|
+
element: string;
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
Dose?: {
|
|
130
|
+
label: string;
|
|
131
|
+
element: string;
|
|
132
|
+
type: string;
|
|
133
|
+
};
|
|
134
|
+
Frequency?: {
|
|
135
|
+
label: string;
|
|
136
|
+
element: string;
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
When?: {
|
|
140
|
+
label: string;
|
|
141
|
+
element: string;
|
|
142
|
+
type: string;
|
|
143
|
+
};
|
|
144
|
+
Duration?: {
|
|
145
|
+
label: string;
|
|
146
|
+
element: string;
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
Instructions?: {
|
|
150
|
+
label: string;
|
|
151
|
+
element: string;
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
SubRows?: {
|
|
155
|
+
label: string;
|
|
58
156
|
};
|
|
59
|
-
items?: {
|
|
60
|
-
icon?: React.JSX.Element | string;
|
|
61
|
-
label?: string;
|
|
62
|
-
active?: boolean;
|
|
63
|
-
text?: string;
|
|
64
|
-
time?: string;
|
|
65
|
-
name?: string;
|
|
66
|
-
y?: number;
|
|
67
|
-
color?: string;
|
|
68
|
-
}[];
|
|
69
|
-
fields?: {
|
|
70
|
-
name?: string;
|
|
71
|
-
label?: string;
|
|
72
|
-
placeholder?: string;
|
|
73
|
-
element?: string;
|
|
74
|
-
type?: string;
|
|
75
|
-
value?: string | number | boolean | any[] | null | object;
|
|
76
|
-
options?: {
|
|
77
|
-
key?: number;
|
|
78
|
-
label: string;
|
|
79
|
-
value: string;
|
|
80
|
-
}[];
|
|
81
|
-
firstOptions?: {
|
|
82
|
-
key?: number;
|
|
83
|
-
label: string;
|
|
84
|
-
value: string;
|
|
85
|
-
}[];
|
|
86
|
-
secondOptions?: {
|
|
87
|
-
key?: number;
|
|
88
|
-
label: string;
|
|
89
|
-
value: string;
|
|
90
|
-
}[];
|
|
91
|
-
selectBefore?: {
|
|
92
|
-
label: string;
|
|
93
|
-
value: string;
|
|
94
|
-
}[];
|
|
95
|
-
selectAfter?: {
|
|
96
|
-
label: string;
|
|
97
|
-
value: string;
|
|
98
|
-
}[];
|
|
99
|
-
dropDownOptions?: any[];
|
|
100
|
-
visible?: boolean;
|
|
101
|
-
disabled?: boolean;
|
|
102
|
-
required?: boolean;
|
|
103
|
-
prefix?: React.ReactNode;
|
|
104
|
-
suffix?: React.ReactNode;
|
|
105
|
-
addonBefore?: React.ReactNode;
|
|
106
|
-
defaultValue?: string;
|
|
107
|
-
status?: "error" | "warning";
|
|
108
|
-
styles?: React.CSSProperties;
|
|
109
|
-
fieldClassName?: string;
|
|
110
|
-
elementClassName?: string;
|
|
111
|
-
variant?: string;
|
|
112
|
-
thead?: {
|
|
113
|
-
id: number;
|
|
114
|
-
name?: string;
|
|
115
|
-
label?: string;
|
|
116
|
-
visible?: boolean;
|
|
117
|
-
required?: boolean;
|
|
118
|
-
key?: string;
|
|
119
|
-
render?: () => void;
|
|
120
|
-
ellipsis: boolean;
|
|
121
|
-
}[];
|
|
122
|
-
tbody?: {
|
|
123
|
-
id?: number;
|
|
124
|
-
name?: string;
|
|
125
|
-
label?: string;
|
|
126
|
-
element?: string;
|
|
127
|
-
type?: string;
|
|
128
|
-
variable_data?: {
|
|
129
|
-
id: {
|
|
130
|
-
id?: number;
|
|
131
|
-
};
|
|
132
|
-
Route?: {
|
|
133
|
-
label: string;
|
|
134
|
-
element: string;
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
Dose?: {
|
|
138
|
-
label: string;
|
|
139
|
-
element: string;
|
|
140
|
-
type: string;
|
|
141
|
-
};
|
|
142
|
-
Frequency?: {
|
|
143
|
-
label: string;
|
|
144
|
-
element: string;
|
|
145
|
-
type: string;
|
|
146
|
-
};
|
|
147
|
-
When?: {
|
|
148
|
-
label: string;
|
|
149
|
-
element: string;
|
|
150
|
-
type: string;
|
|
151
|
-
};
|
|
152
|
-
Duration?: {
|
|
153
|
-
label: string;
|
|
154
|
-
element: string;
|
|
155
|
-
type: string;
|
|
156
|
-
};
|
|
157
|
-
Instructions?: {
|
|
158
|
-
label: string;
|
|
159
|
-
element: string;
|
|
160
|
-
type: string;
|
|
161
|
-
};
|
|
162
|
-
SubRows?: {
|
|
163
|
-
label: string;
|
|
164
|
-
};
|
|
165
|
-
}[];
|
|
166
|
-
}[];
|
|
167
|
-
payload_keys?: string[];
|
|
168
|
-
api_endpoint?: string;
|
|
169
|
-
next_id?: string;
|
|
170
|
-
action?: string;
|
|
171
|
-
}[];
|
|
172
157
|
}[];
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
|
|
158
|
+
}[];
|
|
159
|
+
payload_keys?: string[];
|
|
160
|
+
api_endpoint?: string;
|
|
161
|
+
next_id?: string;
|
|
162
|
+
fields?: SchemaField[];
|
|
163
|
+
};
|
|
164
|
+
type Schema = {
|
|
165
|
+
className?: string;
|
|
166
|
+
schema: SchemaField[];
|
|
167
|
+
};
|
|
168
|
+
type FormExecutorProps = {
|
|
169
|
+
data: Schema;
|
|
170
|
+
setData?: (schema: Schema) => void;
|
|
171
|
+
selectedRecord?: (field: SchemaField) => void;
|
|
176
172
|
};
|
|
177
|
-
type ElementExecutorProps = FormExecutorProps
|
|
173
|
+
type ElementExecutorProps = FormExecutorProps;
|
|
178
174
|
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
179
175
|
|
|
180
176
|
export { ElementExecutor };
|
package/dist/index.js
CHANGED
|
@@ -104,7 +104,7 @@ var ElementExecutor = (props) => {
|
|
|
104
104
|
return schema2.map((field) => {
|
|
105
105
|
if (field.name === name) {
|
|
106
106
|
field["value"] = value;
|
|
107
|
-
props.selectedRecord(field);
|
|
107
|
+
props.selectedRecord && props.selectedRecord(field);
|
|
108
108
|
}
|
|
109
109
|
if (field.fields && field.fields.length) {
|
|
110
110
|
field.fields = updateSchema(field.fields);
|
|
@@ -114,12 +114,16 @@ var ElementExecutor = (props) => {
|
|
|
114
114
|
};
|
|
115
115
|
const updatedSchema = updateSchema(schema);
|
|
116
116
|
setSchema(updatedSchema);
|
|
117
|
-
props.setData({ ...props.data, schema: updatedSchema });
|
|
117
|
+
props.setData && props.setData({ ...props.data, schema: updatedSchema });
|
|
118
118
|
};
|
|
119
119
|
const handleSelectData = async () => {
|
|
120
120
|
try {
|
|
121
|
-
const response = await postService(
|
|
122
|
-
|
|
121
|
+
const response = await postService(
|
|
122
|
+
"/products/",
|
|
123
|
+
"POST",
|
|
124
|
+
JSON.stringify({})
|
|
125
|
+
);
|
|
126
|
+
if (response !== false && typeof response === "object" && Array.isArray(response.products)) {
|
|
123
127
|
setData(response.products);
|
|
124
128
|
}
|
|
125
129
|
} catch (error) {
|
|
@@ -160,14 +164,6 @@ var ElementExecutor = (props) => {
|
|
|
160
164
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
161
165
|
}
|
|
162
166
|
);
|
|
163
|
-
case "input-mobile":
|
|
164
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
165
|
-
import_ui_components.NumberElement,
|
|
166
|
-
{
|
|
167
|
-
...elementProps,
|
|
168
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
169
|
-
}
|
|
170
|
-
);
|
|
171
167
|
case "input-checkbox":
|
|
172
168
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
173
169
|
import_ui_components.CheckboxElement,
|
|
@@ -184,14 +180,6 @@ var ElementExecutor = (props) => {
|
|
|
184
180
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
185
181
|
}
|
|
186
182
|
);
|
|
187
|
-
case "input-description":
|
|
188
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
189
|
-
import_ui_components.CkEditor,
|
|
190
|
-
{
|
|
191
|
-
...elementProps,
|
|
192
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
183
|
case "input-single-select":
|
|
196
184
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
197
185
|
import_ui_components.SingleSelectElement,
|
|
@@ -212,16 +200,20 @@ var ElementExecutor = (props) => {
|
|
|
212
200
|
onClick: handleSelectData
|
|
213
201
|
}
|
|
214
202
|
);
|
|
215
|
-
case "add-more":
|
|
216
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ui_components.AddMoreTable, { ...elementProps });
|
|
217
203
|
case "div":
|
|
218
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
204
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
205
|
+
import_ui_components.DivContainer,
|
|
206
|
+
{
|
|
207
|
+
...elementProps,
|
|
208
|
+
onClick: () => props.selectedRecord && props.selectedRecord(elementProps)
|
|
209
|
+
}
|
|
210
|
+
);
|
|
219
211
|
case "button":
|
|
220
212
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
221
213
|
import_ui_components.ButtonElement,
|
|
222
214
|
{
|
|
223
215
|
...elementProps,
|
|
224
|
-
onClick: () => props.selectedRecord(elementProps)
|
|
216
|
+
onClick: () => props.selectedRecord && props.selectedRecord(elementProps)
|
|
225
217
|
}
|
|
226
218
|
);
|
|
227
219
|
case "sidebar":
|
|
@@ -258,17 +250,17 @@ var ElementExecutor = (props) => {
|
|
|
258
250
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
259
251
|
}
|
|
260
252
|
);
|
|
261
|
-
case "
|
|
253
|
+
case "datetimepicker":
|
|
262
254
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
263
|
-
import_ui_components.
|
|
255
|
+
import_ui_components.DatePickerElement,
|
|
264
256
|
{
|
|
265
257
|
...elementProps,
|
|
266
258
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
267
259
|
}
|
|
268
260
|
);
|
|
269
|
-
case "upload
|
|
261
|
+
case "upload":
|
|
270
262
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
271
|
-
import_ui_components.
|
|
263
|
+
import_ui_components.FileUpload,
|
|
272
264
|
{
|
|
273
265
|
...elementProps,
|
|
274
266
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
@@ -316,21 +308,43 @@ var ElementExecutor = (props) => {
|
|
|
316
308
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
317
309
|
}
|
|
318
310
|
);
|
|
319
|
-
case "
|
|
320
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
311
|
+
case "color-picker":
|
|
312
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
313
|
+
import_ui_components.ColorPickerElement,
|
|
314
|
+
{
|
|
315
|
+
...elementProps,
|
|
316
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
case "alert":
|
|
320
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
321
|
+
import_ui_components.NotificationAlert,
|
|
322
|
+
{
|
|
323
|
+
...elementProps,
|
|
324
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
325
|
+
}
|
|
326
|
+
);
|
|
327
|
+
case "editor":
|
|
328
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
329
|
+
import_ui_components.CkEditor,
|
|
330
|
+
{
|
|
331
|
+
...elementProps,
|
|
332
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
333
|
+
}
|
|
334
|
+
);
|
|
321
335
|
default:
|
|
322
336
|
return null;
|
|
323
337
|
}
|
|
324
338
|
};
|
|
325
339
|
const renderFields = (schema2) => {
|
|
326
|
-
return schema2 && schema2.map((eachSection) => {
|
|
340
|
+
return schema2 && schema2.map((eachSection, index) => {
|
|
327
341
|
if (eachSection.visible !== false) {
|
|
328
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key:
|
|
342
|
+
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), renderFields(eachSection.fields)) : renderElement(eachSection));
|
|
329
343
|
}
|
|
330
344
|
return null;
|
|
331
345
|
});
|
|
332
346
|
};
|
|
333
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
347
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, renderFields(schema));
|
|
334
348
|
};
|
|
335
349
|
// Annotate the CommonJS export names for ESM import in node:
|
|
336
350
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -5,27 +5,27 @@ import {
|
|
|
5
5
|
NumberElement,
|
|
6
6
|
TextareaElement,
|
|
7
7
|
SelectElement,
|
|
8
|
-
ButtonElement,
|
|
9
|
-
RadioElement,
|
|
10
8
|
CheckboxElement,
|
|
11
|
-
|
|
9
|
+
RadioElement,
|
|
12
10
|
SingleSelectElement,
|
|
13
11
|
MultipleSelectElement,
|
|
14
|
-
|
|
12
|
+
DivContainer,
|
|
13
|
+
ButtonElement,
|
|
15
14
|
Sidebar,
|
|
16
15
|
Navbar,
|
|
17
16
|
TableElement,
|
|
18
17
|
DateRangePickerElement,
|
|
19
18
|
DatePickerElement,
|
|
19
|
+
FileUpload,
|
|
20
20
|
Image,
|
|
21
21
|
PasswordElement,
|
|
22
22
|
SingleCheckbox,
|
|
23
23
|
DropDownGroup,
|
|
24
|
-
FileUpload,
|
|
25
24
|
TabsElement,
|
|
26
|
-
Upload,
|
|
27
25
|
OtpElement,
|
|
28
|
-
|
|
26
|
+
ColorPickerElement,
|
|
27
|
+
NotificationAlert,
|
|
28
|
+
CkEditor
|
|
29
29
|
} from "@apexcura/ui-components";
|
|
30
30
|
|
|
31
31
|
// src/services/http-service.tsx
|
|
@@ -94,7 +94,7 @@ var ElementExecutor = (props) => {
|
|
|
94
94
|
return schema2.map((field) => {
|
|
95
95
|
if (field.name === name) {
|
|
96
96
|
field["value"] = value;
|
|
97
|
-
props.selectedRecord(field);
|
|
97
|
+
props.selectedRecord && props.selectedRecord(field);
|
|
98
98
|
}
|
|
99
99
|
if (field.fields && field.fields.length) {
|
|
100
100
|
field.fields = updateSchema(field.fields);
|
|
@@ -104,12 +104,16 @@ var ElementExecutor = (props) => {
|
|
|
104
104
|
};
|
|
105
105
|
const updatedSchema = updateSchema(schema);
|
|
106
106
|
setSchema(updatedSchema);
|
|
107
|
-
props.setData({ ...props.data, schema: updatedSchema });
|
|
107
|
+
props.setData && props.setData({ ...props.data, schema: updatedSchema });
|
|
108
108
|
};
|
|
109
109
|
const handleSelectData = async () => {
|
|
110
110
|
try {
|
|
111
|
-
const response = await postService(
|
|
112
|
-
|
|
111
|
+
const response = await postService(
|
|
112
|
+
"/products/",
|
|
113
|
+
"POST",
|
|
114
|
+
JSON.stringify({})
|
|
115
|
+
);
|
|
116
|
+
if (response !== false && typeof response === "object" && Array.isArray(response.products)) {
|
|
113
117
|
setData(response.products);
|
|
114
118
|
}
|
|
115
119
|
} catch (error) {
|
|
@@ -150,14 +154,6 @@ var ElementExecutor = (props) => {
|
|
|
150
154
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
151
155
|
}
|
|
152
156
|
);
|
|
153
|
-
case "input-mobile":
|
|
154
|
-
return /* @__PURE__ */ React.createElement(
|
|
155
|
-
NumberElement,
|
|
156
|
-
{
|
|
157
|
-
...elementProps,
|
|
158
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
157
|
case "input-checkbox":
|
|
162
158
|
return /* @__PURE__ */ React.createElement(
|
|
163
159
|
CheckboxElement,
|
|
@@ -174,14 +170,6 @@ var ElementExecutor = (props) => {
|
|
|
174
170
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
175
171
|
}
|
|
176
172
|
);
|
|
177
|
-
case "input-description":
|
|
178
|
-
return /* @__PURE__ */ React.createElement(
|
|
179
|
-
CkEditor,
|
|
180
|
-
{
|
|
181
|
-
...elementProps,
|
|
182
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
173
|
case "input-single-select":
|
|
186
174
|
return /* @__PURE__ */ React.createElement(
|
|
187
175
|
SingleSelectElement,
|
|
@@ -202,16 +190,20 @@ var ElementExecutor = (props) => {
|
|
|
202
190
|
onClick: handleSelectData
|
|
203
191
|
}
|
|
204
192
|
);
|
|
205
|
-
case "add-more":
|
|
206
|
-
return /* @__PURE__ */ React.createElement(AddMoreTable, { ...elementProps });
|
|
207
193
|
case "div":
|
|
208
|
-
return /* @__PURE__ */ React.createElement(
|
|
194
|
+
return /* @__PURE__ */ React.createElement(
|
|
195
|
+
DivContainer,
|
|
196
|
+
{
|
|
197
|
+
...elementProps,
|
|
198
|
+
onClick: () => props.selectedRecord && props.selectedRecord(elementProps)
|
|
199
|
+
}
|
|
200
|
+
);
|
|
209
201
|
case "button":
|
|
210
202
|
return /* @__PURE__ */ React.createElement(
|
|
211
203
|
ButtonElement,
|
|
212
204
|
{
|
|
213
205
|
...elementProps,
|
|
214
|
-
onClick: () => props.selectedRecord(elementProps)
|
|
206
|
+
onClick: () => props.selectedRecord && props.selectedRecord(elementProps)
|
|
215
207
|
}
|
|
216
208
|
);
|
|
217
209
|
case "sidebar":
|
|
@@ -248,17 +240,17 @@ var ElementExecutor = (props) => {
|
|
|
248
240
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
249
241
|
}
|
|
250
242
|
);
|
|
251
|
-
case "
|
|
243
|
+
case "datetimepicker":
|
|
252
244
|
return /* @__PURE__ */ React.createElement(
|
|
253
|
-
|
|
245
|
+
DatePickerElement,
|
|
254
246
|
{
|
|
255
247
|
...elementProps,
|
|
256
248
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
257
249
|
}
|
|
258
250
|
);
|
|
259
|
-
case "upload
|
|
251
|
+
case "upload":
|
|
260
252
|
return /* @__PURE__ */ React.createElement(
|
|
261
|
-
|
|
253
|
+
FileUpload,
|
|
262
254
|
{
|
|
263
255
|
...elementProps,
|
|
264
256
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
@@ -306,21 +298,43 @@ var ElementExecutor = (props) => {
|
|
|
306
298
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
307
299
|
}
|
|
308
300
|
);
|
|
309
|
-
case "
|
|
310
|
-
return /* @__PURE__ */ React.createElement(
|
|
301
|
+
case "color-picker":
|
|
302
|
+
return /* @__PURE__ */ React.createElement(
|
|
303
|
+
ColorPickerElement,
|
|
304
|
+
{
|
|
305
|
+
...elementProps,
|
|
306
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
case "alert":
|
|
310
|
+
return /* @__PURE__ */ React.createElement(
|
|
311
|
+
NotificationAlert,
|
|
312
|
+
{
|
|
313
|
+
...elementProps,
|
|
314
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
case "editor":
|
|
318
|
+
return /* @__PURE__ */ React.createElement(
|
|
319
|
+
CkEditor,
|
|
320
|
+
{
|
|
321
|
+
...elementProps,
|
|
322
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
323
|
+
}
|
|
324
|
+
);
|
|
311
325
|
default:
|
|
312
326
|
return null;
|
|
313
327
|
}
|
|
314
328
|
};
|
|
315
329
|
const renderFields = (schema2) => {
|
|
316
|
-
return schema2 && schema2.map((eachSection) => {
|
|
330
|
+
return schema2 && schema2.map((eachSection, index) => {
|
|
317
331
|
if (eachSection.visible !== false) {
|
|
318
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, { key:
|
|
332
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, { key: index }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), renderFields(eachSection.fields)) : renderElement(eachSection));
|
|
319
333
|
}
|
|
320
334
|
return null;
|
|
321
335
|
});
|
|
322
336
|
};
|
|
323
|
-
return /* @__PURE__ */ React.createElement(
|
|
337
|
+
return /* @__PURE__ */ React.createElement("div", null, renderFields(schema));
|
|
324
338
|
};
|
|
325
339
|
export {
|
|
326
340
|
ElementExecutor
|
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-Beta81",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"build": "tsup"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@apexcura/ui-components": "^0.0.15-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.15-Beta64",
|
|
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",
|
|
35
35
|
"antd": "^5.16.5",
|
|
36
36
|
"axios": "^1.6.8",
|
|
37
|
+
"moment": "^2.30.1",
|
|
37
38
|
"react": "^18.3.1",
|
|
38
39
|
"react-dom": "^18.3.1",
|
|
39
40
|
"tsup": "^8.0.2"
|