@apexcura/core 0.0.17-Beta10 → 0.0.17-Beta100

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,178 @@
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
+ items?: {
65
+ icon?: React.JSX.Element | string;
66
+ label?: string;
67
+ active?: boolean;
68
+ text?: string;
69
+ time?: string;
70
+ name?: string;
71
+ y?: number;
72
+ color?: string;
73
+ }[];
74
+ options?: {
75
+ key?: string | number;
76
+ label?: string;
77
+ value?: string;
78
+ }[];
79
+ firstOptions?: {
80
+ key?: string | number;
81
+ label?: string;
82
+ value?: string;
83
+ }[];
84
+ secondOptions?: {
85
+ key?: string | number;
86
+ label?: string;
87
+ value?: string | string[];
88
+ }[];
89
+ selectBefore?: {
90
+ label?: string;
91
+ value?: string;
92
+ }[];
93
+ selectAfter?: {
94
+ label?: string;
95
+ value?: string;
96
+ }[];
97
+ dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
98
+ required?: boolean;
99
+ prefix?: React.ReactNode;
100
+ suffix?: React.ReactNode;
101
+ addonBefore?: React.ReactNode;
102
+ defaultValue?: string;
103
+ status?: 'error' | 'warning';
104
+ style?: React.CSSProperties;
105
+ fieldClassName?: string;
106
+ elementClassName?: string;
107
+ variant?: string;
108
+ thead?: {
109
+ id?: number;
110
+ name?: string;
111
+ label?: string;
112
+ visible?: boolean;
113
+ required?: boolean;
114
+ key?: string | number;
115
+ render?: (text: string) => React.JSX.Element;
116
+ ellipsis?: boolean;
117
+ }[];
118
+ tbody?: {
119
+ id?: number;
120
+ name?: string;
121
+ label?: string;
122
+ element?: string;
123
+ type?: string;
124
+ variable_data?: {
125
+ id: {
126
+ id?: number;
127
+ };
128
+ Route?: {
129
+ label: string;
130
+ element: string;
131
+ type: string;
132
+ };
133
+ Dose?: {
134
+ label: string;
135
+ element: string;
136
+ type: string;
137
+ };
138
+ Frequency?: {
139
+ label: string;
140
+ element: string;
141
+ type: string;
142
+ };
143
+ When?: {
144
+ label: string;
145
+ element: string;
146
+ type: string;
147
+ };
148
+ Duration?: {
149
+ label: string;
150
+ element: string;
151
+ type: string;
152
+ };
153
+ Instructions?: {
154
+ label: string;
155
+ element: string;
156
+ type: string;
157
+ };
158
+ SubRows?: {
159
+ label: string;
62
160
  };
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
161
  }[];
177
- };
178
- setData?: Function;
179
- selectedRecord?: Function;
162
+ }[];
163
+ payload_keys?: string[];
164
+ api_endpoint?: string;
165
+ next_id?: string;
166
+ fields?: SchemaField[];
167
+ };
168
+ type Schema = {
169
+ className?: string;
170
+ schema: SchemaField[];
171
+ };
172
+ type FormExecutorProps = {
173
+ data: Schema;
174
+ setData?: (schema: Schema) => void;
175
+ selectedRecord?: (field: SchemaField) => void;
180
176
  };
181
177
  type ElementExecutorProps = FormExecutorProps & styling;
182
178
  declare const ElementExecutor: (props: ElementExecutorProps) => React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,182 +1,178 @@
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
+ items?: {
65
+ icon?: React.JSX.Element | string;
66
+ label?: string;
67
+ active?: boolean;
68
+ text?: string;
69
+ time?: string;
70
+ name?: string;
71
+ y?: number;
72
+ color?: string;
73
+ }[];
74
+ options?: {
75
+ key?: string | number;
76
+ label?: string;
77
+ value?: string;
78
+ }[];
79
+ firstOptions?: {
80
+ key?: string | number;
81
+ label?: string;
82
+ value?: string;
83
+ }[];
84
+ secondOptions?: {
85
+ key?: string | number;
86
+ label?: string;
87
+ value?: string | string[];
88
+ }[];
89
+ selectBefore?: {
90
+ label?: string;
91
+ value?: string;
92
+ }[];
93
+ selectAfter?: {
94
+ label?: string;
95
+ value?: string;
96
+ }[];
97
+ dropDownOptions?: (number | string | boolean | object | null | undefined | (() => void))[];
98
+ required?: boolean;
99
+ prefix?: React.ReactNode;
100
+ suffix?: React.ReactNode;
101
+ addonBefore?: React.ReactNode;
102
+ defaultValue?: string;
103
+ status?: 'error' | 'warning';
104
+ style?: React.CSSProperties;
105
+ fieldClassName?: string;
106
+ elementClassName?: string;
107
+ variant?: string;
108
+ thead?: {
109
+ id?: number;
110
+ name?: string;
111
+ label?: string;
112
+ visible?: boolean;
113
+ required?: boolean;
114
+ key?: string | number;
115
+ render?: (text: string) => React.JSX.Element;
116
+ ellipsis?: boolean;
117
+ }[];
118
+ tbody?: {
119
+ id?: number;
120
+ name?: string;
121
+ label?: string;
122
+ element?: string;
123
+ type?: string;
124
+ variable_data?: {
125
+ id: {
126
+ id?: number;
127
+ };
128
+ Route?: {
129
+ label: string;
130
+ element: string;
131
+ type: string;
132
+ };
133
+ Dose?: {
134
+ label: string;
135
+ element: string;
136
+ type: string;
137
+ };
138
+ Frequency?: {
139
+ label: string;
140
+ element: string;
141
+ type: string;
142
+ };
143
+ When?: {
144
+ label: string;
145
+ element: string;
146
+ type: string;
147
+ };
148
+ Duration?: {
149
+ label: string;
150
+ element: string;
151
+ type: string;
152
+ };
153
+ Instructions?: {
154
+ label: string;
155
+ element: string;
156
+ type: string;
157
+ };
158
+ SubRows?: {
159
+ label: string;
62
160
  };
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
161
  }[];
177
- };
178
- setData?: Function;
179
- selectedRecord?: Function;
162
+ }[];
163
+ payload_keys?: string[];
164
+ api_endpoint?: string;
165
+ next_id?: string;
166
+ fields?: SchemaField[];
167
+ };
168
+ type Schema = {
169
+ className?: string;
170
+ schema: SchemaField[];
171
+ };
172
+ type FormExecutorProps = {
173
+ data: Schema;
174
+ setData?: (schema: Schema) => void;
175
+ selectedRecord?: (field: SchemaField) => void;
180
176
  };
181
177
  type ElementExecutorProps = FormExecutorProps & styling;
182
178
  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,30 @@ 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
+ );
382
411
  default:
383
412
  return null;
384
413
  }
385
414
  };
386
415
  const renderFields = (schema2) => {
387
- return schema2 && schema2.map((eachSection) => {
416
+ return schema2 && schema2.map((eachSection, index) => {
388
417
  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(
418
+ 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
419
  "p",
391
420
  {
392
421
  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,9 @@ import {
32
32
  LineChart,
33
33
  BarChart,
34
34
  DivContainer,
35
- ColorPickerElement
35
+ ColorPickerElement,
36
+ NotificationAlert,
37
+ Editor
36
38
  } from "@apexcura/ui-components";
37
39
  import moment from "moment";
38
40
 
@@ -114,6 +116,11 @@ var ElementExecutor = (props) => {
114
116
  setSchema(updatedSchema);
115
117
  props.setData && props.setData({ ...props.data, schema: updatedSchema });
116
118
  };
119
+ useEffect(() => {
120
+ if (props?.data?.schema) {
121
+ setSchema([...props.data.schema]);
122
+ }
123
+ }, [props.data]);
117
124
  const handleSelectData = async () => {
118
125
  try {
119
126
  const response = await postService("/products/", "POST", []);
@@ -262,6 +269,14 @@ var ElementExecutor = (props) => {
262
269
  onChange: (value) => onHandleChange(elementProps.name || "", value)
263
270
  }
264
271
  );
272
+ case "datetimepicker":
273
+ return /* @__PURE__ */ React.createElement(
274
+ DatePickerElement,
275
+ {
276
+ ...elementProps,
277
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
278
+ }
279
+ );
265
280
  case "upload":
266
281
  return /* @__PURE__ */ React.createElement(
267
282
  FileUpload,
@@ -376,14 +391,30 @@ var ElementExecutor = (props) => {
376
391
  onChange: (value) => onHandleChange(elementProps.name || "", value)
377
392
  }
378
393
  );
394
+ case "alert":
395
+ return /* @__PURE__ */ React.createElement(
396
+ NotificationAlert,
397
+ {
398
+ ...elementProps,
399
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
400
+ }
401
+ );
402
+ case "editor":
403
+ return /* @__PURE__ */ React.createElement(
404
+ Editor,
405
+ {
406
+ ...elementProps,
407
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
408
+ }
409
+ );
379
410
  default:
380
411
  return null;
381
412
  }
382
413
  };
383
414
  const renderFields = (schema2) => {
384
- return schema2 && schema2.map((eachSection) => {
415
+ return schema2 && schema2.map((eachSection, index) => {
385
416
  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(
417
+ 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
418
  "p",
388
419
  {
389
420
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.17-Beta10",
3
+ "version": "0.0.17-Beta100",
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-Beta12",
31
+ "@apexcura/ui-components": "^0.0.15-Beta79",
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",