@apexcura/core 0.0.17-Beta12 → 0.0.17-Beta121

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
@@ -1,182 +1,180 @@
1
1
  import React from 'react';
2
+ import { UploadFile } from 'antd';
2
3
 
3
4
  type styling = {
4
5
  horizontalGutter?: number;
5
6
  verticalGutter?: number;
6
7
  };
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[] | null | object;
30
- picker?: "date" | "week" | "month" | "quarter" | "year";
31
- weekrange?: boolean;
32
- img?: string;
33
- primaryText?: string;
34
- secondaryText?: string;
35
- count?: number;
36
- profileImage?: string;
37
- profileSubClassName?: string;
38
- containerClassName?: string;
39
- subContainerClassName?: string;
40
- secondTextClassName?: string;
41
- iconsClassName?: string;
42
- labelClassName?: string;
43
- view?: boolean;
44
- isSVGStylesOverride?: boolean;
45
- rowSelection?: boolean;
46
- length?: number;
47
- loading?: boolean;
48
- fillText1?: string;
49
- fillText2?: string;
50
- labels?: any[];
51
- data?: any[];
52
- pagination?: boolean;
53
- is_detail?: boolean;
54
- dateTime?: string;
55
- minRows?: number;
56
- maxRows?: number;
57
- mode?: "multiple" | "tags" | undefined;
58
- modalContent?: {
59
- name?: string;
60
- className?: string;
61
- fields?: any[];
8
+ type pagenationType = {
9
+ page?: number;
10
+ pageSize?: number;
11
+ };
12
+ type SchemaField = {
13
+ name?: string;
14
+ label?: string;
15
+ source?: string;
16
+ visible?: boolean;
17
+ element?: string;
18
+ className?: string;
19
+ action?: string;
20
+ order?: number;
21
+ colCount?: number;
22
+ disabled?: boolean;
23
+ activeClassName?: string;
24
+ listClassName?: string;
25
+ listItemClassName?: string;
26
+ buttonClassName?: string;
27
+ icon?: string;
28
+ placement?: string;
29
+ firstPlaceholder?: string;
30
+ secondPlaceholder?: string;
31
+ enabled_dates?: string;
32
+ profileImageClassName?: string;
33
+ value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
34
+ message?: string;
35
+ description?: string;
36
+ notificationType?: 'error' | 'warning' | 'success' | 'info' | undefined;
37
+ showProgress?: boolean;
38
+ picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
39
+ weekrange?: boolean;
40
+ img?: string;
41
+ primaryText?: string;
42
+ secondaryText?: string;
43
+ count?: number;
44
+ profileImage?: string;
45
+ profileSubClassName?: string;
46
+ containerClassName?: string;
47
+ subContainerClassName?: string;
48
+ secondTextClassName?: string;
49
+ iconsClassName?: string;
50
+ labelClassName?: string;
51
+ view?: boolean;
52
+ isSVGStylesOverride?: boolean;
53
+ rowSelection?: boolean;
54
+ length?: number;
55
+ loading?: boolean;
56
+ fillText1?: string;
57
+ fillText2?: string;
58
+ pagination?: boolean;
59
+ is_detail?: boolean;
60
+ dateTime?: string;
61
+ minRows?: number;
62
+ maxRows?: number;
63
+ mode?: string;
64
+ checkedChildren?: string;
65
+ unCheckedChildren?: string;
66
+ items?: {
67
+ icon?: React.JSX.Element | string;
68
+ label?: string;
69
+ active?: boolean;
70
+ text?: string;
71
+ time?: string;
72
+ name?: string;
73
+ y?: number;
74
+ color?: string;
75
+ }[];
76
+ options?: {
77
+ key?: string | number;
78
+ label?: string;
79
+ value?: string;
80
+ }[];
81
+ firstOptions?: {
82
+ key?: string | number;
83
+ label?: string;
84
+ value?: string;
85
+ }[];
86
+ secondOptions?: {
87
+ key?: string | number;
88
+ label?: string;
89
+ value?: string | string[];
90
+ }[];
91
+ selectBefore?: {
92
+ label?: string;
93
+ value?: string;
94
+ }[];
95
+ selectAfter?: {
96
+ label?: string;
97
+ value?: string;
98
+ }[];
99
+ dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
100
+ required?: boolean;
101
+ prefix?: React.ReactNode;
102
+ suffix?: React.ReactNode;
103
+ addonBefore?: React.ReactNode;
104
+ defaultValue?: string;
105
+ status?: 'error' | 'warning';
106
+ style?: React.CSSProperties;
107
+ fieldClassName?: string;
108
+ elementClassName?: string;
109
+ variant?: string;
110
+ thead?: {
111
+ id?: number;
112
+ name?: string;
113
+ label?: string;
114
+ visible?: boolean;
115
+ required?: boolean;
116
+ key?: string | number;
117
+ render?: (text: string) => React.JSX.Element;
118
+ ellipsis?: boolean;
119
+ }[];
120
+ tbody?: {
121
+ id?: number;
122
+ name?: string;
123
+ label?: string;
124
+ element?: string;
125
+ type?: string;
126
+ variable_data?: {
127
+ id: {
128
+ id?: number;
129
+ };
130
+ Route?: {
131
+ label: string;
132
+ element: string;
133
+ type: string;
134
+ };
135
+ Dose?: {
136
+ label: string;
137
+ element: string;
138
+ type: string;
139
+ };
140
+ Frequency?: {
141
+ label: string;
142
+ element: string;
143
+ type: string;
144
+ };
145
+ When?: {
146
+ label: string;
147
+ element: string;
148
+ type: string;
149
+ };
150
+ Duration?: {
151
+ label: string;
152
+ element: string;
153
+ type: string;
154
+ };
155
+ Instructions?: {
156
+ label: string;
157
+ element: string;
158
+ type: string;
159
+ };
160
+ SubRows?: {
161
+ label: string;
62
162
  };
63
- items?: {
64
- icon?: React.JSX.Element | string;
65
- label?: string;
66
- active?: boolean;
67
- text?: string;
68
- time?: string;
69
- name?: string;
70
- y?: number;
71
- color?: string;
72
- }[];
73
- fields?: {
74
- name?: string;
75
- label?: string;
76
- placeholder?: string;
77
- element?: string;
78
- type?: string;
79
- value?: string | number | boolean | any[] | null | object;
80
- options?: {
81
- key?: number;
82
- label: string;
83
- value: string;
84
- }[];
85
- firstOptions?: {
86
- key?: number;
87
- label: string;
88
- value: string;
89
- }[];
90
- secondOptions?: {
91
- key?: number;
92
- label: string;
93
- value: string;
94
- }[];
95
- selectBefore?: {
96
- label: string;
97
- value: string;
98
- }[];
99
- selectAfter?: {
100
- label: string;
101
- value: string;
102
- }[];
103
- dropDownOptions?: any[];
104
- visible?: boolean;
105
- disabled?: boolean;
106
- required?: boolean;
107
- prefix?: React.ReactNode;
108
- suffix?: React.ReactNode;
109
- addonBefore?: React.ReactNode;
110
- defaultValue?: string;
111
- status?: "error" | "warning";
112
- styles?: React.CSSProperties;
113
- fieldClassName?: string;
114
- elementClassName?: string;
115
- variant?: string;
116
- thead?: {
117
- id: number;
118
- name?: string;
119
- label?: string;
120
- visible?: boolean;
121
- required?: boolean;
122
- key?: string;
123
- render?: () => void;
124
- ellipsis: boolean;
125
- }[];
126
- tbody?: {
127
- id?: number;
128
- name?: string;
129
- label?: string;
130
- element?: string;
131
- type?: string;
132
- variable_data?: {
133
- id: {
134
- id?: number;
135
- };
136
- Route?: {
137
- label: string;
138
- element: string;
139
- type: string;
140
- };
141
- Dose?: {
142
- label: string;
143
- element: string;
144
- type: string;
145
- };
146
- Frequency?: {
147
- label: string;
148
- element: string;
149
- type: string;
150
- };
151
- When?: {
152
- label: string;
153
- element: string;
154
- type: string;
155
- };
156
- Duration?: {
157
- label: string;
158
- element: string;
159
- type: string;
160
- };
161
- Instructions?: {
162
- label: string;
163
- element: string;
164
- type: string;
165
- };
166
- SubRows?: {
167
- label: string;
168
- };
169
- }[];
170
- }[];
171
- payload_keys?: string[];
172
- api_endpoint?: string;
173
- next_id?: string;
174
- action?: string;
175
- }[];
176
163
  }[];
177
- };
178
- setData?: Function;
179
- selectedRecord?: Function;
164
+ }[];
165
+ payload_keys?: string[];
166
+ api_endpoint?: string;
167
+ next_id?: string;
168
+ fields?: SchemaField[];
169
+ };
170
+ type Schema = {
171
+ className?: string;
172
+ schema: SchemaField[];
173
+ };
174
+ type FormExecutorProps = {
175
+ data: Schema;
176
+ setData?: (schema: Schema) => void;
177
+ selectedRecord?: (field: SchemaField) => void;
180
178
  };
181
179
  type ElementExecutorProps = FormExecutorProps & styling;
182
180
  declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,182 +1,180 @@
1
1
  import React from 'react';
2
+ import { UploadFile } from 'antd';
2
3
 
3
4
  type styling = {
4
5
  horizontalGutter?: number;
5
6
  verticalGutter?: number;
6
7
  };
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[] | null | object;
30
- picker?: "date" | "week" | "month" | "quarter" | "year";
31
- weekrange?: boolean;
32
- img?: string;
33
- primaryText?: string;
34
- secondaryText?: string;
35
- count?: number;
36
- profileImage?: string;
37
- profileSubClassName?: string;
38
- containerClassName?: string;
39
- subContainerClassName?: string;
40
- secondTextClassName?: string;
41
- iconsClassName?: string;
42
- labelClassName?: string;
43
- view?: boolean;
44
- isSVGStylesOverride?: boolean;
45
- rowSelection?: boolean;
46
- length?: number;
47
- loading?: boolean;
48
- fillText1?: string;
49
- fillText2?: string;
50
- labels?: any[];
51
- data?: any[];
52
- pagination?: boolean;
53
- is_detail?: boolean;
54
- dateTime?: string;
55
- minRows?: number;
56
- maxRows?: number;
57
- mode?: "multiple" | "tags" | undefined;
58
- modalContent?: {
59
- name?: string;
60
- className?: string;
61
- fields?: any[];
8
+ type pagenationType = {
9
+ page?: number;
10
+ pageSize?: number;
11
+ };
12
+ type SchemaField = {
13
+ name?: string;
14
+ label?: string;
15
+ source?: string;
16
+ visible?: boolean;
17
+ element?: string;
18
+ className?: string;
19
+ action?: string;
20
+ order?: number;
21
+ colCount?: number;
22
+ disabled?: boolean;
23
+ activeClassName?: string;
24
+ listClassName?: string;
25
+ listItemClassName?: string;
26
+ buttonClassName?: string;
27
+ icon?: string;
28
+ placement?: string;
29
+ firstPlaceholder?: string;
30
+ secondPlaceholder?: string;
31
+ enabled_dates?: string;
32
+ profileImageClassName?: string;
33
+ value?: string | number | boolean | null | object | undefined | string[] | UploadFile[] | pagenationType;
34
+ message?: string;
35
+ description?: string;
36
+ notificationType?: 'error' | 'warning' | 'success' | 'info' | undefined;
37
+ showProgress?: boolean;
38
+ picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
39
+ weekrange?: boolean;
40
+ img?: string;
41
+ primaryText?: string;
42
+ secondaryText?: string;
43
+ count?: number;
44
+ profileImage?: string;
45
+ profileSubClassName?: string;
46
+ containerClassName?: string;
47
+ subContainerClassName?: string;
48
+ secondTextClassName?: string;
49
+ iconsClassName?: string;
50
+ labelClassName?: string;
51
+ view?: boolean;
52
+ isSVGStylesOverride?: boolean;
53
+ rowSelection?: boolean;
54
+ length?: number;
55
+ loading?: boolean;
56
+ fillText1?: string;
57
+ fillText2?: string;
58
+ pagination?: boolean;
59
+ is_detail?: boolean;
60
+ dateTime?: string;
61
+ minRows?: number;
62
+ maxRows?: number;
63
+ mode?: string;
64
+ checkedChildren?: string;
65
+ unCheckedChildren?: string;
66
+ items?: {
67
+ icon?: React.JSX.Element | string;
68
+ label?: string;
69
+ active?: boolean;
70
+ text?: string;
71
+ time?: string;
72
+ name?: string;
73
+ y?: number;
74
+ color?: string;
75
+ }[];
76
+ options?: {
77
+ key?: string | number;
78
+ label?: string;
79
+ value?: string;
80
+ }[];
81
+ firstOptions?: {
82
+ key?: string | number;
83
+ label?: string;
84
+ value?: string;
85
+ }[];
86
+ secondOptions?: {
87
+ key?: string | number;
88
+ label?: string;
89
+ value?: string | string[];
90
+ }[];
91
+ selectBefore?: {
92
+ label?: string;
93
+ value?: string;
94
+ }[];
95
+ selectAfter?: {
96
+ label?: string;
97
+ value?: string;
98
+ }[];
99
+ dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
100
+ required?: boolean;
101
+ prefix?: React.ReactNode;
102
+ suffix?: React.ReactNode;
103
+ addonBefore?: React.ReactNode;
104
+ defaultValue?: string;
105
+ status?: 'error' | 'warning';
106
+ style?: React.CSSProperties;
107
+ fieldClassName?: string;
108
+ elementClassName?: string;
109
+ variant?: string;
110
+ thead?: {
111
+ id?: number;
112
+ name?: string;
113
+ label?: string;
114
+ visible?: boolean;
115
+ required?: boolean;
116
+ key?: string | number;
117
+ render?: (text: string) => React.JSX.Element;
118
+ ellipsis?: boolean;
119
+ }[];
120
+ tbody?: {
121
+ id?: number;
122
+ name?: string;
123
+ label?: string;
124
+ element?: string;
125
+ type?: string;
126
+ variable_data?: {
127
+ id: {
128
+ id?: number;
129
+ };
130
+ Route?: {
131
+ label: string;
132
+ element: string;
133
+ type: string;
134
+ };
135
+ Dose?: {
136
+ label: string;
137
+ element: string;
138
+ type: string;
139
+ };
140
+ Frequency?: {
141
+ label: string;
142
+ element: string;
143
+ type: string;
144
+ };
145
+ When?: {
146
+ label: string;
147
+ element: string;
148
+ type: string;
149
+ };
150
+ Duration?: {
151
+ label: string;
152
+ element: string;
153
+ type: string;
154
+ };
155
+ Instructions?: {
156
+ label: string;
157
+ element: string;
158
+ type: string;
159
+ };
160
+ SubRows?: {
161
+ label: string;
62
162
  };
63
- items?: {
64
- icon?: React.JSX.Element | string;
65
- label?: string;
66
- active?: boolean;
67
- text?: string;
68
- time?: string;
69
- name?: string;
70
- y?: number;
71
- color?: string;
72
- }[];
73
- fields?: {
74
- name?: string;
75
- label?: string;
76
- placeholder?: string;
77
- element?: string;
78
- type?: string;
79
- value?: string | number | boolean | any[] | null | object;
80
- options?: {
81
- key?: number;
82
- label: string;
83
- value: string;
84
- }[];
85
- firstOptions?: {
86
- key?: number;
87
- label: string;
88
- value: string;
89
- }[];
90
- secondOptions?: {
91
- key?: number;
92
- label: string;
93
- value: string;
94
- }[];
95
- selectBefore?: {
96
- label: string;
97
- value: string;
98
- }[];
99
- selectAfter?: {
100
- label: string;
101
- value: string;
102
- }[];
103
- dropDownOptions?: any[];
104
- visible?: boolean;
105
- disabled?: boolean;
106
- required?: boolean;
107
- prefix?: React.ReactNode;
108
- suffix?: React.ReactNode;
109
- addonBefore?: React.ReactNode;
110
- defaultValue?: string;
111
- status?: "error" | "warning";
112
- styles?: React.CSSProperties;
113
- fieldClassName?: string;
114
- elementClassName?: string;
115
- variant?: string;
116
- thead?: {
117
- id: number;
118
- name?: string;
119
- label?: string;
120
- visible?: boolean;
121
- required?: boolean;
122
- key?: string;
123
- render?: () => void;
124
- ellipsis: boolean;
125
- }[];
126
- tbody?: {
127
- id?: number;
128
- name?: string;
129
- label?: string;
130
- element?: string;
131
- type?: string;
132
- variable_data?: {
133
- id: {
134
- id?: number;
135
- };
136
- Route?: {
137
- label: string;
138
- element: string;
139
- type: string;
140
- };
141
- Dose?: {
142
- label: string;
143
- element: string;
144
- type: string;
145
- };
146
- Frequency?: {
147
- label: string;
148
- element: string;
149
- type: string;
150
- };
151
- When?: {
152
- label: string;
153
- element: string;
154
- type: string;
155
- };
156
- Duration?: {
157
- label: string;
158
- element: string;
159
- type: string;
160
- };
161
- Instructions?: {
162
- label: string;
163
- element: string;
164
- type: string;
165
- };
166
- SubRows?: {
167
- label: string;
168
- };
169
- }[];
170
- }[];
171
- payload_keys?: string[];
172
- api_endpoint?: string;
173
- next_id?: string;
174
- action?: string;
175
- }[];
176
163
  }[];
177
- };
178
- setData?: Function;
179
- selectedRecord?: Function;
164
+ }[];
165
+ payload_keys?: string[];
166
+ api_endpoint?: string;
167
+ next_id?: string;
168
+ fields?: SchemaField[];
169
+ };
170
+ type Schema = {
171
+ className?: string;
172
+ schema: SchemaField[];
173
+ };
174
+ type FormExecutorProps = {
175
+ data: Schema;
176
+ setData?: (schema: Schema) => void;
177
+ selectedRecord?: (field: SchemaField) => void;
180
178
  };
181
179
  type ElementExecutorProps = FormExecutorProps & styling;
182
180
  declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
package/dist/index.js CHANGED
@@ -117,6 +117,11 @@ var ElementExecutor = (props) => {
117
117
  setSchema(updatedSchema);
118
118
  props.setData && props.setData({ ...props.data, schema: updatedSchema });
119
119
  };
120
+ (0, import_react.useEffect)(() => {
121
+ if (props?.data?.schema) {
122
+ setSchema([...props.data.schema]);
123
+ }
124
+ }, [props.data]);
120
125
  const handleSelectData = async () => {
121
126
  try {
122
127
  const response = await postService("/products/", "POST", []);
@@ -265,6 +270,14 @@ var ElementExecutor = (props) => {
265
270
  onChange: (value) => onHandleChange(elementProps.name || "", value)
266
271
  }
267
272
  );
273
+ case "datetimepicker":
274
+ return /* @__PURE__ */ import_react.default.createElement(
275
+ import_ui_components.DatePickerElement,
276
+ {
277
+ ...elementProps,
278
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
279
+ }
280
+ );
268
281
  case "upload":
269
282
  return /* @__PURE__ */ import_react.default.createElement(
270
283
  import_ui_components.FileUpload,
@@ -379,14 +392,38 @@ var ElementExecutor = (props) => {
379
392
  onChange: (value) => onHandleChange(elementProps.name || "", value)
380
393
  }
381
394
  );
395
+ case "alert":
396
+ return /* @__PURE__ */ import_react.default.createElement(
397
+ import_ui_components.NotificationAlert,
398
+ {
399
+ ...elementProps,
400
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
401
+ }
402
+ );
403
+ case "editor":
404
+ return /* @__PURE__ */ import_react.default.createElement(
405
+ import_ui_components.Editor,
406
+ {
407
+ ...elementProps,
408
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
409
+ }
410
+ );
411
+ case "switch":
412
+ return /* @__PURE__ */ import_react.default.createElement(
413
+ import_ui_components.SwitchElement,
414
+ {
415
+ ...elementProps,
416
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
417
+ }
418
+ );
382
419
  default:
383
420
  return null;
384
421
  }
385
422
  };
386
423
  const renderFields = (schema2) => {
387
- return schema2 && schema2.map((eachSection) => {
424
+ return schema2 && schema2.map((eachSection, index) => {
388
425
  if (eachSection.visible !== false) {
389
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: eachSection.name }, 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)), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
426
+ 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), /* @__PURE__ */ import_react.default.createElement("div", { className: eachSection.className, key: index }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
390
427
  "p",
391
428
  {
392
429
  style: {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/libraries/element-executor.tsx
2
- import React, { useState } from "react";
2
+ import React, { useEffect, useState } from "react";
3
3
  import {
4
4
  TextElement,
5
5
  NumberElement,
@@ -32,7 +32,10 @@ import {
32
32
  LineChart,
33
33
  BarChart,
34
34
  DivContainer,
35
- ColorPickerElement
35
+ ColorPickerElement,
36
+ NotificationAlert,
37
+ Editor,
38
+ SwitchElement
36
39
  } from "@apexcura/ui-components";
37
40
  import moment from "moment";
38
41
 
@@ -114,6 +117,11 @@ var ElementExecutor = (props) => {
114
117
  setSchema(updatedSchema);
115
118
  props.setData && props.setData({ ...props.data, schema: updatedSchema });
116
119
  };
120
+ useEffect(() => {
121
+ if (props?.data?.schema) {
122
+ setSchema([...props.data.schema]);
123
+ }
124
+ }, [props.data]);
117
125
  const handleSelectData = async () => {
118
126
  try {
119
127
  const response = await postService("/products/", "POST", []);
@@ -262,6 +270,14 @@ var ElementExecutor = (props) => {
262
270
  onChange: (value) => onHandleChange(elementProps.name || "", value)
263
271
  }
264
272
  );
273
+ case "datetimepicker":
274
+ return /* @__PURE__ */ React.createElement(
275
+ DatePickerElement,
276
+ {
277
+ ...elementProps,
278
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
279
+ }
280
+ );
265
281
  case "upload":
266
282
  return /* @__PURE__ */ React.createElement(
267
283
  FileUpload,
@@ -376,14 +392,38 @@ var ElementExecutor = (props) => {
376
392
  onChange: (value) => onHandleChange(elementProps.name || "", value)
377
393
  }
378
394
  );
395
+ case "alert":
396
+ return /* @__PURE__ */ React.createElement(
397
+ NotificationAlert,
398
+ {
399
+ ...elementProps,
400
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
401
+ }
402
+ );
403
+ case "editor":
404
+ return /* @__PURE__ */ React.createElement(
405
+ Editor,
406
+ {
407
+ ...elementProps,
408
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
409
+ }
410
+ );
411
+ case "switch":
412
+ return /* @__PURE__ */ React.createElement(
413
+ SwitchElement,
414
+ {
415
+ ...elementProps,
416
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
417
+ }
418
+ );
379
419
  default:
380
420
  return null;
381
421
  }
382
422
  };
383
423
  const renderFields = (schema2) => {
384
- return schema2 && schema2.map((eachSection) => {
424
+ return schema2 && schema2.map((eachSection, index) => {
385
425
  if (eachSection.visible !== false) {
386
- return /* @__PURE__ */ React.createElement(React.Fragment, { key: eachSection.name }, 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)), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
426
+ return /* @__PURE__ */ React.createElement(React.Fragment, { key: index }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), /* @__PURE__ */ React.createElement("div", { className: eachSection.className, key: index }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
387
427
  "p",
388
428
  {
389
429
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.17-Beta12",
3
+ "version": "0.0.17-Beta121",
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.15-Beta14",
31
+ "@apexcura/ui-components": "^0.0.15-Beta99",
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",