@apexcura/core 0.0.16-Beta34 → 0.0.16-Beta6
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 +0 -11
- package/dist/index.d.ts +0 -11
- package/dist/index.js +4 -9
- package/dist/index.mjs +5 -11
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -38,7 +38,6 @@ type FormExecutorProps = {
|
|
|
38
38
|
secondTextClassName?: string;
|
|
39
39
|
iconsClassName?: string;
|
|
40
40
|
labelClassName?: string;
|
|
41
|
-
view?: boolean;
|
|
42
41
|
modalContent?: {
|
|
43
42
|
className?: string;
|
|
44
43
|
fields?: {
|
|
@@ -71,16 +70,6 @@ type FormExecutorProps = {
|
|
|
71
70
|
label: string;
|
|
72
71
|
value: string;
|
|
73
72
|
}[];
|
|
74
|
-
firstOptions?: {
|
|
75
|
-
key?: number;
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[];
|
|
79
|
-
secondOptions?: {
|
|
80
|
-
key?: number;
|
|
81
|
-
label: string;
|
|
82
|
-
value: string;
|
|
83
|
-
}[];
|
|
84
73
|
selectBefore?: {
|
|
85
74
|
label: string;
|
|
86
75
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ type FormExecutorProps = {
|
|
|
38
38
|
secondTextClassName?: string;
|
|
39
39
|
iconsClassName?: string;
|
|
40
40
|
labelClassName?: string;
|
|
41
|
-
view?: boolean;
|
|
42
41
|
modalContent?: {
|
|
43
42
|
className?: string;
|
|
44
43
|
fields?: {
|
|
@@ -71,16 +70,6 @@ type FormExecutorProps = {
|
|
|
71
70
|
label: string;
|
|
72
71
|
value: string;
|
|
73
72
|
}[];
|
|
74
|
-
firstOptions?: {
|
|
75
|
-
key?: number;
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[];
|
|
79
|
-
secondOptions?: {
|
|
80
|
-
key?: number;
|
|
81
|
-
label: string;
|
|
82
|
-
value: string;
|
|
83
|
-
}[];
|
|
84
73
|
selectBefore?: {
|
|
85
74
|
label: string;
|
|
86
75
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -100,6 +100,8 @@ 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
102
|
const onHandleChange = (name, value) => {
|
|
103
|
+
console.log("name", name);
|
|
104
|
+
console.log("value", value);
|
|
103
105
|
const updateSchema = (schema2) => {
|
|
104
106
|
return schema2.map((field) => {
|
|
105
107
|
if (field.name === name) {
|
|
@@ -112,6 +114,7 @@ var ElementExecutor = (props) => {
|
|
|
112
114
|
return field;
|
|
113
115
|
});
|
|
114
116
|
};
|
|
117
|
+
console.log("schema--------------", schema);
|
|
115
118
|
const updatedSchema = updateSchema(schema);
|
|
116
119
|
setSchema(updatedSchema);
|
|
117
120
|
props.setData({ ...props.data, schema: updatedSchema });
|
|
@@ -266,14 +269,6 @@ var ElementExecutor = (props) => {
|
|
|
266
269
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
267
270
|
}
|
|
268
271
|
);
|
|
269
|
-
case "upload-manually":
|
|
270
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
271
|
-
import_ui_components.Upload,
|
|
272
|
-
{
|
|
273
|
-
...elementProps,
|
|
274
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
275
|
-
}
|
|
276
|
-
);
|
|
277
272
|
case "image":
|
|
278
273
|
return /* @__PURE__ */ import_react.default.createElement(import_ui_components.Image, { ...elementProps });
|
|
279
274
|
case "input-password":
|
|
@@ -315,7 +310,7 @@ var ElementExecutor = (props) => {
|
|
|
315
310
|
const renderFields = (schema2) => {
|
|
316
311
|
return schema2 && schema2.map((eachSection) => {
|
|
317
312
|
if (eachSection.visible !== false) {
|
|
318
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment,
|
|
313
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, 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: eachSection.name }, renderFields(eachSection.fields))) : renderElement(eachSection));
|
|
319
314
|
}
|
|
320
315
|
return null;
|
|
321
316
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -22,8 +22,7 @@ import {
|
|
|
22
22
|
SingleCheckbox,
|
|
23
23
|
DropDownGroup,
|
|
24
24
|
FileUpload,
|
|
25
|
-
TabsElement
|
|
26
|
-
Upload
|
|
25
|
+
TabsElement
|
|
27
26
|
} from "@apexcura/ui-components";
|
|
28
27
|
|
|
29
28
|
// src/services/http-service.tsx
|
|
@@ -88,6 +87,8 @@ var ElementExecutor = (props) => {
|
|
|
88
87
|
const [data, setData] = useState([]);
|
|
89
88
|
const [schema, setSchema] = useState(props.data.schema);
|
|
90
89
|
const onHandleChange = (name, value) => {
|
|
90
|
+
console.log("name", name);
|
|
91
|
+
console.log("value", value);
|
|
91
92
|
const updateSchema = (schema2) => {
|
|
92
93
|
return schema2.map((field) => {
|
|
93
94
|
if (field.name === name) {
|
|
@@ -100,6 +101,7 @@ var ElementExecutor = (props) => {
|
|
|
100
101
|
return field;
|
|
101
102
|
});
|
|
102
103
|
};
|
|
104
|
+
console.log("schema--------------", schema);
|
|
103
105
|
const updatedSchema = updateSchema(schema);
|
|
104
106
|
setSchema(updatedSchema);
|
|
105
107
|
props.setData({ ...props.data, schema: updatedSchema });
|
|
@@ -254,14 +256,6 @@ var ElementExecutor = (props) => {
|
|
|
254
256
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
255
257
|
}
|
|
256
258
|
);
|
|
257
|
-
case "upload-manually":
|
|
258
|
-
return /* @__PURE__ */ React.createElement(
|
|
259
|
-
Upload,
|
|
260
|
-
{
|
|
261
|
-
...elementProps,
|
|
262
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
259
|
case "image":
|
|
266
260
|
return /* @__PURE__ */ React.createElement(Image, { ...elementProps });
|
|
267
261
|
case "input-password":
|
|
@@ -303,7 +297,7 @@ var ElementExecutor = (props) => {
|
|
|
303
297
|
const renderFields = (schema2) => {
|
|
304
298
|
return schema2 && schema2.map((eachSection) => {
|
|
305
299
|
if (eachSection.visible !== false) {
|
|
306
|
-
return /* @__PURE__ */ React.createElement(React.Fragment,
|
|
300
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), /* @__PURE__ */ React.createElement("div", { className: eachSection.className, key: eachSection.name }, renderFields(eachSection.fields))) : renderElement(eachSection));
|
|
307
301
|
}
|
|
308
302
|
return null;
|
|
309
303
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/core",
|
|
3
|
-
"version": "0.0.16-
|
|
3
|
+
"version": "0.0.16-Beta6",
|
|
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.14-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.14-Beta6",
|
|
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",
|