@apexcura/core 0.0.15-Beta37 → 0.0.15-Beta39
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.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +2 -2
- package/dist/index.d.mts +0 -158
- package/dist/index.d.ts +0 -158
package/dist/index.js
CHANGED
|
@@ -99,18 +99,18 @@ function postService(url, method, data) {
|
|
|
99
99
|
var ElementExecutor = (props) => {
|
|
100
100
|
const [data, setData] = (0, import_react.useState)([]);
|
|
101
101
|
const [schema, setSchema] = (0, import_react.useState)(props.data.schema);
|
|
102
|
-
const onHandleChange = (name,
|
|
102
|
+
const onHandleChange = (name, value) => {
|
|
103
103
|
let prev = schema;
|
|
104
104
|
prev?.map((fie) => {
|
|
105
105
|
if (fie.name === name) {
|
|
106
|
-
fie["value"] =
|
|
107
|
-
props.selectedRecord(
|
|
106
|
+
fie["value"] = value;
|
|
107
|
+
props.selectedRecord(value);
|
|
108
108
|
}
|
|
109
109
|
if (fie.fields && fie.fields.length) {
|
|
110
110
|
fie.fields.map((sub) => {
|
|
111
111
|
if (sub.name === name) {
|
|
112
|
-
sub["value"] =
|
|
113
|
-
props.selectedRecord(
|
|
112
|
+
sub["value"] = value;
|
|
113
|
+
props.selectedRecord(value);
|
|
114
114
|
}
|
|
115
115
|
return sub;
|
|
116
116
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -85,18 +85,18 @@ function postService(url, method, data) {
|
|
|
85
85
|
var ElementExecutor = (props) => {
|
|
86
86
|
const [data, setData] = useState([]);
|
|
87
87
|
const [schema, setSchema] = useState(props.data.schema);
|
|
88
|
-
const onHandleChange = (name,
|
|
88
|
+
const onHandleChange = (name, value) => {
|
|
89
89
|
let prev = schema;
|
|
90
90
|
prev?.map((fie) => {
|
|
91
91
|
if (fie.name === name) {
|
|
92
|
-
fie["value"] =
|
|
93
|
-
props.selectedRecord(
|
|
92
|
+
fie["value"] = value;
|
|
93
|
+
props.selectedRecord(value);
|
|
94
94
|
}
|
|
95
95
|
if (fie.fields && fie.fields.length) {
|
|
96
96
|
fie.fields.map((sub) => {
|
|
97
97
|
if (sub.name === name) {
|
|
98
|
-
sub["value"] =
|
|
99
|
-
props.selectedRecord(
|
|
98
|
+
sub["value"] = value;
|
|
99
|
+
props.selectedRecord(value);
|
|
100
100
|
}
|
|
101
101
|
return sub;
|
|
102
102
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/core",
|
|
3
|
-
"version": "0.0.15-
|
|
3
|
+
"version": "0.0.15-Beta39",
|
|
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.13-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.13-Beta34",
|
|
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",
|
package/dist/index.d.mts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type styling = {
|
|
4
|
-
horizontalGutter?: number;
|
|
5
|
-
verticalGutter?: number;
|
|
6
|
-
};
|
|
7
|
-
type FormExecutorProps = {
|
|
8
|
-
data: {
|
|
9
|
-
className: string;
|
|
10
|
-
schema?: {
|
|
11
|
-
name?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
visible?: boolean;
|
|
15
|
-
element?: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
action?: string;
|
|
18
|
-
order?: number;
|
|
19
|
-
size?: string;
|
|
20
|
-
colCount?: number;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
activeClassName?: string;
|
|
23
|
-
listClassName?: string;
|
|
24
|
-
listItemClassName?: string;
|
|
25
|
-
buttonClassName?: string;
|
|
26
|
-
icon?: string;
|
|
27
|
-
placement?: string;
|
|
28
|
-
profileImageClassName?: string;
|
|
29
|
-
value?: string | number | boolean | any[] | object[] | null;
|
|
30
|
-
img?: string;
|
|
31
|
-
primaryText?: string;
|
|
32
|
-
secondaryText?: string;
|
|
33
|
-
count?: number;
|
|
34
|
-
profileImage?: string;
|
|
35
|
-
profileSubClassName?: string;
|
|
36
|
-
subContainerClassName?: string;
|
|
37
|
-
secondTextClassName?: string;
|
|
38
|
-
iconsClassName?: string;
|
|
39
|
-
labelClassName?: string;
|
|
40
|
-
modalContent?: {
|
|
41
|
-
className?: string;
|
|
42
|
-
fields?: {
|
|
43
|
-
_id?: string;
|
|
44
|
-
name?: string;
|
|
45
|
-
label?: string;
|
|
46
|
-
source?: string;
|
|
47
|
-
initial_message?: boolean;
|
|
48
|
-
element: string;
|
|
49
|
-
className?: string;
|
|
50
|
-
position?: string;
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
items?: {
|
|
54
|
-
icon?: React.JSX.Element;
|
|
55
|
-
label?: string;
|
|
56
|
-
active?: boolean;
|
|
57
|
-
text?: string;
|
|
58
|
-
time?: string;
|
|
59
|
-
}[];
|
|
60
|
-
fields?: {
|
|
61
|
-
name?: string;
|
|
62
|
-
label?: string;
|
|
63
|
-
placeholder?: string;
|
|
64
|
-
element?: string;
|
|
65
|
-
type?: string;
|
|
66
|
-
value?: string | number | boolean | any[] | object[] | null;
|
|
67
|
-
options?: {
|
|
68
|
-
label: string;
|
|
69
|
-
value: string;
|
|
70
|
-
}[];
|
|
71
|
-
selectBefore?: {
|
|
72
|
-
label: string;
|
|
73
|
-
value: string;
|
|
74
|
-
}[];
|
|
75
|
-
selectAfter?: {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[];
|
|
79
|
-
dropDownOptions?: any[];
|
|
80
|
-
visible?: boolean;
|
|
81
|
-
disabled?: boolean;
|
|
82
|
-
required?: boolean;
|
|
83
|
-
prefix?: React.ReactNode;
|
|
84
|
-
suffix?: React.ReactNode;
|
|
85
|
-
addonBefore?: React.ReactNode;
|
|
86
|
-
defaultValue?: string;
|
|
87
|
-
status?: "error" | "warning";
|
|
88
|
-
styles?: React.CSSProperties;
|
|
89
|
-
fieldClassName?: string;
|
|
90
|
-
elementClassName?: string;
|
|
91
|
-
variant?: "outlined" | "borderless" | "filled";
|
|
92
|
-
thead?: {
|
|
93
|
-
id: number;
|
|
94
|
-
name?: string;
|
|
95
|
-
label?: string;
|
|
96
|
-
visible?: boolean;
|
|
97
|
-
required?: boolean;
|
|
98
|
-
key?: string;
|
|
99
|
-
}[];
|
|
100
|
-
tbody?: {
|
|
101
|
-
id?: number;
|
|
102
|
-
name?: string;
|
|
103
|
-
label?: string;
|
|
104
|
-
element?: string;
|
|
105
|
-
type?: string;
|
|
106
|
-
variable_data?: {
|
|
107
|
-
id: {
|
|
108
|
-
id?: number;
|
|
109
|
-
};
|
|
110
|
-
Route?: {
|
|
111
|
-
label: string;
|
|
112
|
-
element: string;
|
|
113
|
-
type: string;
|
|
114
|
-
};
|
|
115
|
-
Dose?: {
|
|
116
|
-
label: string;
|
|
117
|
-
element: string;
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
120
|
-
Frequency?: {
|
|
121
|
-
label: string;
|
|
122
|
-
element: string;
|
|
123
|
-
type: string;
|
|
124
|
-
};
|
|
125
|
-
When?: {
|
|
126
|
-
label: string;
|
|
127
|
-
element: string;
|
|
128
|
-
type: string;
|
|
129
|
-
};
|
|
130
|
-
Duration?: {
|
|
131
|
-
label: string;
|
|
132
|
-
element: string;
|
|
133
|
-
type: string;
|
|
134
|
-
};
|
|
135
|
-
Instructions?: {
|
|
136
|
-
label: string;
|
|
137
|
-
element: string;
|
|
138
|
-
type: string;
|
|
139
|
-
};
|
|
140
|
-
SubRows?: {
|
|
141
|
-
label: string;
|
|
142
|
-
};
|
|
143
|
-
}[];
|
|
144
|
-
}[];
|
|
145
|
-
payload_keys?: string[];
|
|
146
|
-
api_endpoint?: string;
|
|
147
|
-
next_id?: string;
|
|
148
|
-
action?: string;
|
|
149
|
-
}[];
|
|
150
|
-
}[];
|
|
151
|
-
};
|
|
152
|
-
setData: Function;
|
|
153
|
-
selectedRecord: Function;
|
|
154
|
-
};
|
|
155
|
-
type ElementExecutorProps = FormExecutorProps & styling;
|
|
156
|
-
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
157
|
-
|
|
158
|
-
export { ElementExecutor };
|
package/dist/index.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type styling = {
|
|
4
|
-
horizontalGutter?: number;
|
|
5
|
-
verticalGutter?: number;
|
|
6
|
-
};
|
|
7
|
-
type FormExecutorProps = {
|
|
8
|
-
data: {
|
|
9
|
-
className: string;
|
|
10
|
-
schema?: {
|
|
11
|
-
name?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
visible?: boolean;
|
|
15
|
-
element?: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
action?: string;
|
|
18
|
-
order?: number;
|
|
19
|
-
size?: string;
|
|
20
|
-
colCount?: number;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
activeClassName?: string;
|
|
23
|
-
listClassName?: string;
|
|
24
|
-
listItemClassName?: string;
|
|
25
|
-
buttonClassName?: string;
|
|
26
|
-
icon?: string;
|
|
27
|
-
placement?: string;
|
|
28
|
-
profileImageClassName?: string;
|
|
29
|
-
value?: string | number | boolean | any[] | object[] | null;
|
|
30
|
-
img?: string;
|
|
31
|
-
primaryText?: string;
|
|
32
|
-
secondaryText?: string;
|
|
33
|
-
count?: number;
|
|
34
|
-
profileImage?: string;
|
|
35
|
-
profileSubClassName?: string;
|
|
36
|
-
subContainerClassName?: string;
|
|
37
|
-
secondTextClassName?: string;
|
|
38
|
-
iconsClassName?: string;
|
|
39
|
-
labelClassName?: string;
|
|
40
|
-
modalContent?: {
|
|
41
|
-
className?: string;
|
|
42
|
-
fields?: {
|
|
43
|
-
_id?: string;
|
|
44
|
-
name?: string;
|
|
45
|
-
label?: string;
|
|
46
|
-
source?: string;
|
|
47
|
-
initial_message?: boolean;
|
|
48
|
-
element: string;
|
|
49
|
-
className?: string;
|
|
50
|
-
position?: string;
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
items?: {
|
|
54
|
-
icon?: React.JSX.Element;
|
|
55
|
-
label?: string;
|
|
56
|
-
active?: boolean;
|
|
57
|
-
text?: string;
|
|
58
|
-
time?: string;
|
|
59
|
-
}[];
|
|
60
|
-
fields?: {
|
|
61
|
-
name?: string;
|
|
62
|
-
label?: string;
|
|
63
|
-
placeholder?: string;
|
|
64
|
-
element?: string;
|
|
65
|
-
type?: string;
|
|
66
|
-
value?: string | number | boolean | any[] | object[] | null;
|
|
67
|
-
options?: {
|
|
68
|
-
label: string;
|
|
69
|
-
value: string;
|
|
70
|
-
}[];
|
|
71
|
-
selectBefore?: {
|
|
72
|
-
label: string;
|
|
73
|
-
value: string;
|
|
74
|
-
}[];
|
|
75
|
-
selectAfter?: {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[];
|
|
79
|
-
dropDownOptions?: any[];
|
|
80
|
-
visible?: boolean;
|
|
81
|
-
disabled?: boolean;
|
|
82
|
-
required?: boolean;
|
|
83
|
-
prefix?: React.ReactNode;
|
|
84
|
-
suffix?: React.ReactNode;
|
|
85
|
-
addonBefore?: React.ReactNode;
|
|
86
|
-
defaultValue?: string;
|
|
87
|
-
status?: "error" | "warning";
|
|
88
|
-
styles?: React.CSSProperties;
|
|
89
|
-
fieldClassName?: string;
|
|
90
|
-
elementClassName?: string;
|
|
91
|
-
variant?: "outlined" | "borderless" | "filled";
|
|
92
|
-
thead?: {
|
|
93
|
-
id: number;
|
|
94
|
-
name?: string;
|
|
95
|
-
label?: string;
|
|
96
|
-
visible?: boolean;
|
|
97
|
-
required?: boolean;
|
|
98
|
-
key?: string;
|
|
99
|
-
}[];
|
|
100
|
-
tbody?: {
|
|
101
|
-
id?: number;
|
|
102
|
-
name?: string;
|
|
103
|
-
label?: string;
|
|
104
|
-
element?: string;
|
|
105
|
-
type?: string;
|
|
106
|
-
variable_data?: {
|
|
107
|
-
id: {
|
|
108
|
-
id?: number;
|
|
109
|
-
};
|
|
110
|
-
Route?: {
|
|
111
|
-
label: string;
|
|
112
|
-
element: string;
|
|
113
|
-
type: string;
|
|
114
|
-
};
|
|
115
|
-
Dose?: {
|
|
116
|
-
label: string;
|
|
117
|
-
element: string;
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
120
|
-
Frequency?: {
|
|
121
|
-
label: string;
|
|
122
|
-
element: string;
|
|
123
|
-
type: string;
|
|
124
|
-
};
|
|
125
|
-
When?: {
|
|
126
|
-
label: string;
|
|
127
|
-
element: string;
|
|
128
|
-
type: string;
|
|
129
|
-
};
|
|
130
|
-
Duration?: {
|
|
131
|
-
label: string;
|
|
132
|
-
element: string;
|
|
133
|
-
type: string;
|
|
134
|
-
};
|
|
135
|
-
Instructions?: {
|
|
136
|
-
label: string;
|
|
137
|
-
element: string;
|
|
138
|
-
type: string;
|
|
139
|
-
};
|
|
140
|
-
SubRows?: {
|
|
141
|
-
label: string;
|
|
142
|
-
};
|
|
143
|
-
}[];
|
|
144
|
-
}[];
|
|
145
|
-
payload_keys?: string[];
|
|
146
|
-
api_endpoint?: string;
|
|
147
|
-
next_id?: string;
|
|
148
|
-
action?: string;
|
|
149
|
-
}[];
|
|
150
|
-
}[];
|
|
151
|
-
};
|
|
152
|
-
setData: Function;
|
|
153
|
-
selectedRecord: Function;
|
|
154
|
-
};
|
|
155
|
-
type ElementExecutorProps = FormExecutorProps & styling;
|
|
156
|
-
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
157
|
-
|
|
158
|
-
export { ElementExecutor };
|