@apexcura/core 0.0.15-Beta49 → 0.0.15-Beta5

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 CHANGED
@@ -16,7 +16,7 @@ type FormExecutorProps = {
16
16
  className?: string;
17
17
  action?: string;
18
18
  order?: number;
19
- size?: string;
19
+ sie?: string;
20
20
  colCount?: number;
21
21
  disabled?: boolean;
22
22
  activeClassName?: string;
@@ -26,7 +26,7 @@ type FormExecutorProps = {
26
26
  icon?: string;
27
27
  placement?: string;
28
28
  profileImageClassName?: string;
29
- value?: string | number | boolean | any[] | null | object;
29
+ value?: string | number | boolean | any[] | object[] | null;
30
30
  img?: string;
31
31
  primaryText?: string;
32
32
  secondaryText?: string;
@@ -63,18 +63,14 @@ type FormExecutorProps = {
63
63
  placeholder?: string;
64
64
  element?: string;
65
65
  type?: string;
66
- value?: string | number | boolean | any[] | null | object;
66
+ value?: string | number | boolean | any[] | object[] | null;
67
+ fieldNames?: any[];
68
+ optionType?: string;
67
69
  options?: {
68
70
  label: string;
69
71
  value: string;
70
- }[];
71
- selectBefore?: {
72
- label: string;
73
- value: string;
74
- }[];
75
- selectAfter?: {
76
- label: string;
77
- value: string;
72
+ className?: string;
73
+ selectedClassName?: string;
78
74
  }[];
79
75
  dropDownOptions?: any[];
80
76
  visible?: boolean;
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ type FormExecutorProps = {
16
16
  className?: string;
17
17
  action?: string;
18
18
  order?: number;
19
- size?: string;
19
+ sie?: string;
20
20
  colCount?: number;
21
21
  disabled?: boolean;
22
22
  activeClassName?: string;
@@ -26,7 +26,7 @@ type FormExecutorProps = {
26
26
  icon?: string;
27
27
  placement?: string;
28
28
  profileImageClassName?: string;
29
- value?: string | number | boolean | any[] | null | object;
29
+ value?: string | number | boolean | any[] | object[] | null;
30
30
  img?: string;
31
31
  primaryText?: string;
32
32
  secondaryText?: string;
@@ -63,18 +63,14 @@ type FormExecutorProps = {
63
63
  placeholder?: string;
64
64
  element?: string;
65
65
  type?: string;
66
- value?: string | number | boolean | any[] | null | object;
66
+ value?: string | number | boolean | any[] | object[] | null;
67
+ fieldNames?: any[];
68
+ optionType?: string;
67
69
  options?: {
68
70
  label: string;
69
71
  value: string;
70
- }[];
71
- selectBefore?: {
72
- label: string;
73
- value: string;
74
- }[];
75
- selectAfter?: {
76
- label: string;
77
- value: string;
72
+ className?: string;
73
+ selectedClassName?: string;
78
74
  }[];
79
75
  dropDownOptions?: any[];
80
76
  visible?: boolean;
package/dist/index.js CHANGED
@@ -104,13 +104,13 @@ var ElementExecutor = (props) => {
104
104
  prev?.map((fie) => {
105
105
  if (fie.name === name) {
106
106
  fie["value"] = value;
107
- props.selectedRecord(value);
107
+ props.selectedRecord(fie);
108
108
  }
109
109
  if (fie.fields && fie.fields.length) {
110
110
  fie.fields.map((sub) => {
111
111
  if (sub.name === name) {
112
112
  sub["value"] = value;
113
- props.selectedRecord(value);
113
+ props.selectedRecord(sub);
114
114
  }
115
115
  return sub;
116
116
  });
@@ -119,6 +119,7 @@ var ElementExecutor = (props) => {
119
119
  });
120
120
  setSchema([...prev]);
121
121
  props.setData({ ...props.data, schema: prev });
122
+ console.log("prev---------", prev);
122
123
  };
123
124
  const handleSelectData = async () => {
124
125
  try {
@@ -156,7 +157,7 @@ var ElementExecutor = (props) => {
156
157
  onChange: (value) => onHandleChange(elementProps.name || "", value)
157
158
  }
158
159
  );
159
- case "single-select":
160
+ case "input-gender":
160
161
  return /* @__PURE__ */ import_react.default.createElement(
161
162
  import_ui_components.SelectElement,
162
163
  {
@@ -221,81 +222,17 @@ var ElementExecutor = (props) => {
221
222
  case "div":
222
223
  return /* @__PURE__ */ import_react.default.createElement("div", { className: elementProps.className }, elementProps.label);
223
224
  case "button":
224
- return /* @__PURE__ */ import_react.default.createElement(
225
- import_ui_components.ButtonElement,
226
- {
227
- ...elementProps,
228
- onClick: () => props.selectedRecord(elementProps)
229
- }
230
- );
225
+ return /* @__PURE__ */ import_react.default.createElement(import_ui_components.ButtonElement, { ...elementProps });
231
226
  case "sidebar":
232
- return /* @__PURE__ */ import_react.default.createElement(
233
- import_ui_components.Sidebar,
234
- {
235
- ...elementProps,
236
- onChange: (value) => onHandleChange(elementProps.name || "", value)
237
- }
238
- );
227
+ return /* @__PURE__ */ import_react.default.createElement(import_ui_components.Sidebar, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
239
228
  case "navbar":
240
229
  return /* @__PURE__ */ import_react.default.createElement(import_ui_components.Navbar, { ...elementProps });
241
230
  case "table":
242
- return /* @__PURE__ */ import_react.default.createElement(
243
- import_ui_components.TableElement,
244
- {
245
- ...elementProps,
246
- onChange: (value) => onHandleChange(elementProps.name || "", value)
247
- }
248
- );
231
+ return /* @__PURE__ */ import_react.default.createElement(import_ui_components.TableElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
249
232
  case "daterangepicker":
250
- return /* @__PURE__ */ import_react.default.createElement(
251
- import_ui_components.DateRangePickerElement,
252
- {
253
- ...elementProps,
254
- onChange: (value) => onHandleChange(elementProps.name || "", value)
255
- }
256
- );
233
+ return /* @__PURE__ */ import_react.default.createElement(import_ui_components.DateRangePickerElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
257
234
  case "datepicker":
258
- return /* @__PURE__ */ import_react.default.createElement(
259
- import_ui_components.DatePickerElement,
260
- {
261
- ...elementProps,
262
- onChange: (value) => onHandleChange(elementProps.name || "", value)
263
- }
264
- );
265
- case "upload":
266
- return /* @__PURE__ */ import_react.default.createElement(
267
- import_ui_components.UploadElement,
268
- {
269
- ...elementProps,
270
- onChange: (value) => onHandleChange(elementProps.name || "", value)
271
- }
272
- );
273
- case "image":
274
- return /* @__PURE__ */ import_react.default.createElement(import_ui_components.Image, { ...elementProps });
275
- case "input-password":
276
- return /* @__PURE__ */ import_react.default.createElement(
277
- import_ui_components.PasswordElement,
278
- {
279
- ...elementProps,
280
- onChange: (value) => onHandleChange(elementProps.name || "", value)
281
- }
282
- );
283
- case "single-checkbox":
284
- return /* @__PURE__ */ import_react.default.createElement(
285
- import_ui_components.SingleCheckbox,
286
- {
287
- ...elementProps,
288
- onChange: (value) => onHandleChange(elementProps.name || "", value)
289
- }
290
- );
291
- case "multi-select":
292
- return /* @__PURE__ */ import_react.default.createElement(
293
- import_ui_components.MultiSelect,
294
- {
295
- ...elementProps,
296
- onChange: (value) => onHandleChange(elementProps.name || "", value)
297
- }
298
- );
235
+ return /* @__PURE__ */ import_react.default.createElement(import_ui_components.DatePickerElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
299
236
  default:
300
237
  return null;
301
238
  }
package/dist/index.mjs CHANGED
@@ -16,12 +16,7 @@ import {
16
16
  Navbar,
17
17
  TableElement,
18
18
  DateRangePickerElement,
19
- DatePickerElement,
20
- UploadElement,
21
- Image,
22
- PasswordElement,
23
- SingleCheckbox,
24
- MultiSelect
19
+ DatePickerElement
25
20
  } from "@apexcura/ui-components";
26
21
 
27
22
  // src/services/http-service.tsx
@@ -90,13 +85,13 @@ var ElementExecutor = (props) => {
90
85
  prev?.map((fie) => {
91
86
  if (fie.name === name) {
92
87
  fie["value"] = value;
93
- props.selectedRecord(value);
88
+ props.selectedRecord(fie);
94
89
  }
95
90
  if (fie.fields && fie.fields.length) {
96
91
  fie.fields.map((sub) => {
97
92
  if (sub.name === name) {
98
93
  sub["value"] = value;
99
- props.selectedRecord(value);
94
+ props.selectedRecord(sub);
100
95
  }
101
96
  return sub;
102
97
  });
@@ -105,6 +100,7 @@ var ElementExecutor = (props) => {
105
100
  });
106
101
  setSchema([...prev]);
107
102
  props.setData({ ...props.data, schema: prev });
103
+ console.log("prev---------", prev);
108
104
  };
109
105
  const handleSelectData = async () => {
110
106
  try {
@@ -142,7 +138,7 @@ var ElementExecutor = (props) => {
142
138
  onChange: (value) => onHandleChange(elementProps.name || "", value)
143
139
  }
144
140
  );
145
- case "single-select":
141
+ case "input-gender":
146
142
  return /* @__PURE__ */ React.createElement(
147
143
  SelectElement,
148
144
  {
@@ -207,81 +203,17 @@ var ElementExecutor = (props) => {
207
203
  case "div":
208
204
  return /* @__PURE__ */ React.createElement("div", { className: elementProps.className }, elementProps.label);
209
205
  case "button":
210
- return /* @__PURE__ */ React.createElement(
211
- ButtonElement,
212
- {
213
- ...elementProps,
214
- onClick: () => props.selectedRecord(elementProps)
215
- }
216
- );
206
+ return /* @__PURE__ */ React.createElement(ButtonElement, { ...elementProps });
217
207
  case "sidebar":
218
- return /* @__PURE__ */ React.createElement(
219
- Sidebar,
220
- {
221
- ...elementProps,
222
- onChange: (value) => onHandleChange(elementProps.name || "", value)
223
- }
224
- );
208
+ return /* @__PURE__ */ React.createElement(Sidebar, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
225
209
  case "navbar":
226
210
  return /* @__PURE__ */ React.createElement(Navbar, { ...elementProps });
227
211
  case "table":
228
- return /* @__PURE__ */ React.createElement(
229
- TableElement,
230
- {
231
- ...elementProps,
232
- onChange: (value) => onHandleChange(elementProps.name || "", value)
233
- }
234
- );
212
+ return /* @__PURE__ */ React.createElement(TableElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
235
213
  case "daterangepicker":
236
- return /* @__PURE__ */ React.createElement(
237
- DateRangePickerElement,
238
- {
239
- ...elementProps,
240
- onChange: (value) => onHandleChange(elementProps.name || "", value)
241
- }
242
- );
214
+ return /* @__PURE__ */ React.createElement(DateRangePickerElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
243
215
  case "datepicker":
244
- return /* @__PURE__ */ React.createElement(
245
- DatePickerElement,
246
- {
247
- ...elementProps,
248
- onChange: (value) => onHandleChange(elementProps.name || "", value)
249
- }
250
- );
251
- case "upload":
252
- return /* @__PURE__ */ React.createElement(
253
- UploadElement,
254
- {
255
- ...elementProps,
256
- onChange: (value) => onHandleChange(elementProps.name || "", value)
257
- }
258
- );
259
- case "image":
260
- return /* @__PURE__ */ React.createElement(Image, { ...elementProps });
261
- case "input-password":
262
- return /* @__PURE__ */ React.createElement(
263
- PasswordElement,
264
- {
265
- ...elementProps,
266
- onChange: (value) => onHandleChange(elementProps.name || "", value)
267
- }
268
- );
269
- case "single-checkbox":
270
- return /* @__PURE__ */ React.createElement(
271
- SingleCheckbox,
272
- {
273
- ...elementProps,
274
- onChange: (value) => onHandleChange(elementProps.name || "", value)
275
- }
276
- );
277
- case "multi-select":
278
- return /* @__PURE__ */ React.createElement(
279
- MultiSelect,
280
- {
281
- ...elementProps,
282
- onChange: (value) => onHandleChange(elementProps.name || "", value)
283
- }
284
- );
216
+ return /* @__PURE__ */ React.createElement(DatePickerElement, { ...elementProps, onChange: (value) => onHandleChange(elementProps.name || "", value) });
285
217
  default:
286
218
  return null;
287
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.15-Beta49",
3
+ "version": "0.0.15-Beta5",
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-Beta43",
31
+ "@apexcura/ui-components": "^0.0.13-Beta0",
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",