@apexcura/core 0.0.14-Beta97 → 0.0.14-Beta99
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 +44 -38
- package/dist/index.d.ts +44 -38
- package/dist/index.js +3 -23
- package/dist/index.mjs +2 -21
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -4,42 +4,8 @@ type styling = {
|
|
|
4
4
|
horizontalGutter?: number;
|
|
5
5
|
verticalGutter?: number;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
sectionName?: string;
|
|
12
|
-
sectionLabel?: string;
|
|
13
|
-
sectionOrder?: number;
|
|
14
|
-
colCount: number;
|
|
15
|
-
fields: {
|
|
16
|
-
name?: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
element?: string;
|
|
20
|
-
type?: string;
|
|
21
|
-
value?: string | number | boolean | any[] | object[];
|
|
22
|
-
fieldNames?: any[];
|
|
23
|
-
dropDownOptions?: any[];
|
|
24
|
-
visible?: boolean;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
required: boolean;
|
|
27
|
-
prefix?: React.ReactNode;
|
|
28
|
-
suffix?: React.ReactNode;
|
|
29
|
-
addonBefore?: React.ReactNode;
|
|
30
|
-
defaultValue?: string;
|
|
31
|
-
status?: "error" | "warning";
|
|
32
|
-
styles?: React.CSSProperties;
|
|
33
|
-
fieldClassName?: string;
|
|
34
|
-
elementClassName?: string;
|
|
35
|
-
variant?: "outlined" | "borderless" | "filled";
|
|
36
|
-
}[];
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
declare const ElementExecutor: (props: ElementExecutorProps & styling) => React.JSX.Element;
|
|
40
|
-
|
|
41
|
-
type TableExecutorProps = {
|
|
42
|
-
data: {
|
|
7
|
+
type FormExecutorProps = {
|
|
8
|
+
table: {
|
|
43
9
|
name: string;
|
|
44
10
|
label: string;
|
|
45
11
|
element: string;
|
|
@@ -90,7 +56,47 @@ type TableExecutorProps = {
|
|
|
90
56
|
}[];
|
|
91
57
|
}[];
|
|
92
58
|
}[];
|
|
59
|
+
data: {
|
|
60
|
+
visible?: boolean;
|
|
61
|
+
className?: string;
|
|
62
|
+
sectionName?: string;
|
|
63
|
+
sectionLabel?: string;
|
|
64
|
+
sectionOrder?: number;
|
|
65
|
+
colCount: number;
|
|
66
|
+
fields: {
|
|
67
|
+
name?: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
element?: string;
|
|
71
|
+
type?: string;
|
|
72
|
+
value?: string | number | boolean | any[] | object[];
|
|
73
|
+
fieldNames?: any[];
|
|
74
|
+
dropDownOptions?: any[];
|
|
75
|
+
visible?: boolean;
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
required: boolean;
|
|
78
|
+
prefix?: React.ReactNode;
|
|
79
|
+
suffix?: React.ReactNode;
|
|
80
|
+
addonBefore?: React.ReactNode;
|
|
81
|
+
defaultValue?: string;
|
|
82
|
+
status?: "error" | "warning";
|
|
83
|
+
styles?: React.CSSProperties;
|
|
84
|
+
fieldClassName?: string;
|
|
85
|
+
elementClassName?: string;
|
|
86
|
+
variant?: "outlined" | "borderless" | "filled";
|
|
87
|
+
}[];
|
|
88
|
+
}[];
|
|
89
|
+
chatbot: {
|
|
90
|
+
visible: boolean;
|
|
91
|
+
name: string;
|
|
92
|
+
label?: string;
|
|
93
|
+
element: string;
|
|
94
|
+
type: string;
|
|
95
|
+
value: string;
|
|
96
|
+
required: boolean;
|
|
97
|
+
}[];
|
|
93
98
|
};
|
|
94
|
-
|
|
99
|
+
type ElementExecutorProps = FormExecutorProps & styling;
|
|
100
|
+
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
95
101
|
|
|
96
|
-
export { ElementExecutor
|
|
102
|
+
export { ElementExecutor };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,42 +4,8 @@ type styling = {
|
|
|
4
4
|
horizontalGutter?: number;
|
|
5
5
|
verticalGutter?: number;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
sectionName?: string;
|
|
12
|
-
sectionLabel?: string;
|
|
13
|
-
sectionOrder?: number;
|
|
14
|
-
colCount: number;
|
|
15
|
-
fields: {
|
|
16
|
-
name?: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
element?: string;
|
|
20
|
-
type?: string;
|
|
21
|
-
value?: string | number | boolean | any[] | object[];
|
|
22
|
-
fieldNames?: any[];
|
|
23
|
-
dropDownOptions?: any[];
|
|
24
|
-
visible?: boolean;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
required: boolean;
|
|
27
|
-
prefix?: React.ReactNode;
|
|
28
|
-
suffix?: React.ReactNode;
|
|
29
|
-
addonBefore?: React.ReactNode;
|
|
30
|
-
defaultValue?: string;
|
|
31
|
-
status?: "error" | "warning";
|
|
32
|
-
styles?: React.CSSProperties;
|
|
33
|
-
fieldClassName?: string;
|
|
34
|
-
elementClassName?: string;
|
|
35
|
-
variant?: "outlined" | "borderless" | "filled";
|
|
36
|
-
}[];
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
declare const ElementExecutor: (props: ElementExecutorProps & styling) => React.JSX.Element;
|
|
40
|
-
|
|
41
|
-
type TableExecutorProps = {
|
|
42
|
-
data: {
|
|
7
|
+
type FormExecutorProps = {
|
|
8
|
+
table: {
|
|
43
9
|
name: string;
|
|
44
10
|
label: string;
|
|
45
11
|
element: string;
|
|
@@ -90,7 +56,47 @@ type TableExecutorProps = {
|
|
|
90
56
|
}[];
|
|
91
57
|
}[];
|
|
92
58
|
}[];
|
|
59
|
+
data: {
|
|
60
|
+
visible?: boolean;
|
|
61
|
+
className?: string;
|
|
62
|
+
sectionName?: string;
|
|
63
|
+
sectionLabel?: string;
|
|
64
|
+
sectionOrder?: number;
|
|
65
|
+
colCount: number;
|
|
66
|
+
fields: {
|
|
67
|
+
name?: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
element?: string;
|
|
71
|
+
type?: string;
|
|
72
|
+
value?: string | number | boolean | any[] | object[];
|
|
73
|
+
fieldNames?: any[];
|
|
74
|
+
dropDownOptions?: any[];
|
|
75
|
+
visible?: boolean;
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
required: boolean;
|
|
78
|
+
prefix?: React.ReactNode;
|
|
79
|
+
suffix?: React.ReactNode;
|
|
80
|
+
addonBefore?: React.ReactNode;
|
|
81
|
+
defaultValue?: string;
|
|
82
|
+
status?: "error" | "warning";
|
|
83
|
+
styles?: React.CSSProperties;
|
|
84
|
+
fieldClassName?: string;
|
|
85
|
+
elementClassName?: string;
|
|
86
|
+
variant?: "outlined" | "borderless" | "filled";
|
|
87
|
+
}[];
|
|
88
|
+
}[];
|
|
89
|
+
chatbot: {
|
|
90
|
+
visible: boolean;
|
|
91
|
+
name: string;
|
|
92
|
+
label?: string;
|
|
93
|
+
element: string;
|
|
94
|
+
type: string;
|
|
95
|
+
value: string;
|
|
96
|
+
required: boolean;
|
|
97
|
+
}[];
|
|
93
98
|
};
|
|
94
|
-
|
|
99
|
+
type ElementExecutorProps = FormExecutorProps & styling;
|
|
100
|
+
declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
|
|
95
101
|
|
|
96
|
-
export { ElementExecutor
|
|
102
|
+
export { ElementExecutor };
|
package/dist/index.js
CHANGED
|
@@ -30,8 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
-
ElementExecutor: () => ElementExecutor
|
|
34
|
-
TableExecutor: () => TableExecutor
|
|
33
|
+
ElementExecutor: () => ElementExecutor
|
|
35
34
|
});
|
|
36
35
|
module.exports = __toCommonJS(src_exports);
|
|
37
36
|
|
|
@@ -99,6 +98,7 @@ function postService(url, method, data) {
|
|
|
99
98
|
// src/libraries/element-executor.tsx
|
|
100
99
|
var import_antd = require("antd");
|
|
101
100
|
var ElementExecutor = (props) => {
|
|
101
|
+
console.log(props.table);
|
|
102
102
|
const [formData, setFormData] = (0, import_react.useState)({});
|
|
103
103
|
const [data, setData] = (0, import_react.useState)([]);
|
|
104
104
|
const onHandleChange = (name, value) => {
|
|
@@ -168,27 +168,7 @@ var ElementExecutor = (props) => {
|
|
|
168
168
|
return null;
|
|
169
169
|
}), /* @__PURE__ */ import_react.default.createElement("div", { onClick: onHandleSubmit }, /* @__PURE__ */ import_react.default.createElement(import_ui_components.ButtonElement, null)));
|
|
170
170
|
};
|
|
171
|
-
|
|
172
|
-
// src/libraries/table-executor.tsx
|
|
173
|
-
var import_react2 = __toESM(require("react"));
|
|
174
|
-
var import_ui_components2 = require("@apexcura/ui-components");
|
|
175
|
-
var TableExecutor = (props) => {
|
|
176
|
-
const [tableData, setTableData] = (0, import_react2.useState)({});
|
|
177
|
-
const onHandleChange = (name, value) => {
|
|
178
|
-
setTableData((prev) => ({ ...prev, [name]: value }));
|
|
179
|
-
};
|
|
180
|
-
console.log(tableData);
|
|
181
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, props.data?.map((eachEl) => {
|
|
182
|
-
if (eachEl.element === "input-text") {
|
|
183
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", { key: eachEl.name }, /* @__PURE__ */ import_react2.default.createElement(import_ui_components2.TextElement, { ...eachEl, onChange: (value) => onHandleChange(eachEl.name || "", value) }));
|
|
184
|
-
} else if (eachEl.element === "add_more") {
|
|
185
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", { key: eachEl.name }, /* @__PURE__ */ import_react2.default.createElement(import_ui_components2.AddMoreTable, { ...eachEl }));
|
|
186
|
-
}
|
|
187
|
-
return null;
|
|
188
|
-
}));
|
|
189
|
-
};
|
|
190
171
|
// Annotate the CommonJS export names for ESM import in node:
|
|
191
172
|
0 && (module.exports = {
|
|
192
|
-
ElementExecutor
|
|
193
|
-
TableExecutor
|
|
173
|
+
ElementExecutor
|
|
194
174
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -62,6 +62,7 @@ function postService(url, method, data) {
|
|
|
62
62
|
// src/libraries/element-executor.tsx
|
|
63
63
|
import { Col, Row } from "antd";
|
|
64
64
|
var ElementExecutor = (props) => {
|
|
65
|
+
console.log(props.table);
|
|
65
66
|
const [formData, setFormData] = useState({});
|
|
66
67
|
const [data, setData] = useState([]);
|
|
67
68
|
const onHandleChange = (name, value) => {
|
|
@@ -131,26 +132,6 @@ var ElementExecutor = (props) => {
|
|
|
131
132
|
return null;
|
|
132
133
|
}), /* @__PURE__ */ React.createElement("div", { onClick: onHandleSubmit }, /* @__PURE__ */ React.createElement(ButtonElement, null)));
|
|
133
134
|
};
|
|
134
|
-
|
|
135
|
-
// src/libraries/table-executor.tsx
|
|
136
|
-
import React2, { useState as useState2 } from "react";
|
|
137
|
-
import { AddMoreTable, TextElement as TextElement2 } from "@apexcura/ui-components";
|
|
138
|
-
var TableExecutor = (props) => {
|
|
139
|
-
const [tableData, setTableData] = useState2({});
|
|
140
|
-
const onHandleChange = (name, value) => {
|
|
141
|
-
setTableData((prev) => ({ ...prev, [name]: value }));
|
|
142
|
-
};
|
|
143
|
-
console.log(tableData);
|
|
144
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, props.data?.map((eachEl) => {
|
|
145
|
-
if (eachEl.element === "input-text") {
|
|
146
|
-
return /* @__PURE__ */ React2.createElement("div", { key: eachEl.name }, /* @__PURE__ */ React2.createElement(TextElement2, { ...eachEl, onChange: (value) => onHandleChange(eachEl.name || "", value) }));
|
|
147
|
-
} else if (eachEl.element === "add_more") {
|
|
148
|
-
return /* @__PURE__ */ React2.createElement("div", { key: eachEl.name }, /* @__PURE__ */ React2.createElement(AddMoreTable, { ...eachEl }));
|
|
149
|
-
}
|
|
150
|
-
return null;
|
|
151
|
-
}));
|
|
152
|
-
};
|
|
153
135
|
export {
|
|
154
|
-
ElementExecutor
|
|
155
|
-
TableExecutor
|
|
136
|
+
ElementExecutor
|
|
156
137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/core",
|
|
3
|
-
"version": "0.0.14-
|
|
3
|
+
"version": "0.0.14-Beta99",
|
|
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.11-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.11-Beta57",
|
|
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",
|