impaktapps-ui-builder 0.0.101-alpha.13 → 0.0.101-alpha.130

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.
Files changed (34) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1058 -717
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +62 -59
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +17 -21
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -33
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +52 -38
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/styleSection.d.ts +7 -8
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +29 -33
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +56 -37
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +56 -36
  13. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
  14. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +6 -0
  15. package/package.json +1 -1
  16. package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
  17. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +14 -10
  18. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +111 -96
  19. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +101 -95
  20. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +39 -17
  21. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +44 -44
  22. package/src/impaktapps-ui-builder/builder/build/uischema/styleSection.ts +9 -13
  23. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +40 -18
  24. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +117 -48
  25. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +113 -43
  26. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +23 -23
  27. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +68 -9
  28. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +46 -20
  29. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +15 -12
  30. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +188 -295
  31. package/src/impaktapps-ui-builder/builder/services/component.ts +161 -32
  32. package/src/impaktapps-ui-builder/builder/services/event.ts +165 -65
  33. package/src/impaktapps-ui-builder/runtime/services/events.ts +8 -1
  34. package/src/impaktapps-ui-builder/runtime/services/service.ts +29 -4
@@ -1,8 +1,6 @@
1
1
 
2
2
  import _ from "lodash";
3
- import { buildLabel } from "../buildLabel";
4
- import Box from "./box";
5
- const emptyBox = (scope:string,layout?: any) => {
3
+ export const emptyBox = (scope:string,layout?: any) => {
6
4
 
7
5
  if(layout !== undefined){
8
6
  return {
@@ -12,7 +10,6 @@ const emptyBox = (scope:string,layout?: any) => {
12
10
  widget: "EmptyBox",
13
11
  },
14
12
  config: {
15
- //[{},{},{}]
16
13
  layout: layout,
17
14
  },
18
15
  }
@@ -32,82 +29,108 @@ const emptyBox = (scope:string,layout?: any) => {
32
29
  const cardLayout = {
33
30
  type: "Control",
34
31
  scope: "#/properties/cardLayout",
35
- layout: 11.5,
36
32
  options: {
37
- detail: {
38
- type: "HorizontalLayout",
39
- elements: [
40
- {
41
- type: "Control",
42
- scope: "#/properties/key",
43
- options: {
44
- widget: "SelectInputField",
45
- },
46
- config: {
47
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
48
- main: {
49
- label: "Screen Size",
33
+ widget: "Array",
34
+ },
35
+ config: {
36
+ layout: 12,
37
+ main: {
38
+ label: "Card Layout",
39
+ childElementLabel: "Card Layout",
40
+ },
41
+ style: {
42
+ marginLeft: "-24px",
43
+ marginBottom: "24px !important",
44
+ labelStyle: {
45
+ marginLeft: "24px",
46
+ },
47
+ detailsStyle: {
48
+ marginLeft: "24px",
49
+ }
50
+ }
51
+ },
52
+ elements: [
53
+ {
54
+ type: "Control",
55
+ scope: "#/properties/key",
56
+ options: {
57
+ widget: "SelectInputField",
58
+ },
59
+ config: {
60
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
61
+ main: {
62
+ label: "Screen Size",
50
63
 
51
- },
52
- },
53
64
  },
54
- {
55
- type: "Control",
56
- scope: "#/properties/value",
65
+ },
66
+ },
67
+ {
68
+ type: "Control",
69
+ scope: "#/properties/value",
57
70
 
58
- options: {
59
- widget: "InputField",
60
- },
61
- config: {
62
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
63
- main: {
64
- label: "Value",
65
- type: "number",
66
- // freeSolo:true,
67
- helperText: 'Number should be in range of 0 to 12',
68
- errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
71
+ options: {
72
+ widget: "InputField",
73
+ },
74
+ config: {
75
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
76
+ main: {
77
+ label: "Value",
78
+ type: "number",
79
+ // freeSolo:true,
80
+ helperText: 'Number should be in range of 0 to 12',
81
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
69
82
 
70
- },
71
- },
72
83
  },
73
- emptyBox("cardEmpty")
74
- ],
84
+ },
75
85
  },
76
- },
86
+ emptyBox("cardEmpty")
87
+ ],
77
88
  };
78
89
  const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
79
90
  return {
80
91
  type: "Control",
81
92
  scope: `#/properties/${parentScope}`,
82
- layout: 12,
83
93
  options: {
84
- "elementLabelProp": childScope,
85
- detail: {
86
- type: "HorizontalLayout",
87
- elements: [
88
- {
89
- type: "Control",
90
- scope: `#/properties/${childScope}`,
94
+ widget: "Array"
95
+ },
96
+ config: {
97
+ layout: 12,
98
+ main: {
99
+ label: childLabel,
100
+ childElementLabel: childLabel,
101
+ },
102
+ style: {
103
+ marginLeft: "-24px",
104
+ marginBottom: "24px !important",
105
+ labelStyle: {
106
+ marginLeft: "24px",
107
+ },
108
+ detailsStyle: {
109
+ marginLeft: "24px",
110
+ }
111
+ }
112
+ },
113
+ elements: [
114
+ {
115
+ type: "Control",
116
+ scope: `#/properties/${childScope}`,
91
117
 
92
- options: {
93
- widget: "InputField",
94
- },
95
- config: {
96
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
97
- main: {
98
- label: childLabel || "Labels for Tab",
99
- },
100
- },
118
+ options: {
119
+ widget: "InputField",
120
+ },
121
+ config: {
122
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
123
+ main: {
124
+ label: childLabel || "Labels for Tab",
101
125
  },
102
- emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
103
- emptyBox("ArrayControlEmpty2", {xs: 0, sm: 0, md: 4, lg: 4 })
104
- ],
126
+ },
105
127
  },
106
- },
128
+ emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 8, lg: 8 }),
129
+ ],
107
130
  }
108
131
  };
109
132
  const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
110
- sizeHolder.options.detail.elements[1] = {
133
+ sizeHolder.elements[1] = {
111
134
  type: "Control",
112
135
  scope: `#/properties/value`,
113
136
 
@@ -121,7 +144,7 @@ sizeHolder.options.detail.elements[1] = {
121
144
  },
122
145
  },
123
146
  };
124
- sizeHolder.options.detail.elements[2] = emptyBox("sizeHolderempty")
147
+ sizeHolder.elements[2] = emptyBox("sizeHolderempty")
125
148
  const getInputField = (scope: String, label: String) => {
126
149
  return {
127
150
  type: "Control",
@@ -131,7 +154,7 @@ const getInputField = (scope: String, label: String) => {
131
154
  widget: "InputField",
132
155
  },
133
156
  config: {
134
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
157
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
135
158
  main: {
136
159
  label: label,
137
160
  },
@@ -148,7 +171,7 @@ export const getRadioInputField = (scope: String, label: String, options: string
148
171
  widget: "RadioInputField",
149
172
  },
150
173
  config: {
151
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
174
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
152
175
  main: {
153
176
  label: label,
154
177
 
@@ -165,16 +188,6 @@ export const buildWrapper = (label: string, elements: any[]) => {
165
188
  label: label || "Details",
166
189
  isAccordion: true,
167
190
  },
168
- wrapperStyle: {
169
- marginTop: '-6px',
170
- marginBottom: '-8px',
171
- marginLeft: "-34px",
172
- width: "108%"
173
- },
174
- componentsBoxStyle: {
175
- marginLeft: "12px",
176
- },
177
- defaultStyle: true
178
191
  },
179
192
  elements: elements || []
180
193
  }
@@ -189,22 +202,8 @@ export const getTextArea = (scope: string, heading: string, hideButton: boolean,
189
202
  },
190
203
  config: {
191
204
  layout: layout || 12,
192
- style: {
193
- containerStyle: {
194
- borderRadius: "20px",
195
- },
196
- headerContainerStyle: {
197
-
198
- },
199
- textAreaStyle: {
200
- borderRadius: "20px",
201
- padding: "20px"
202
- // background:"black",
203
- // color:"white"
204
- }
205
- },
206
205
  main: {
207
- heading: heading,
206
+ label: heading,
208
207
  minRows: 8,
209
208
  hideButton: hideButton,
210
209
  enableCodeEditor: true
@@ -221,7 +220,7 @@ export const getSelectField = (scope: string, label: string, options: { label: s
221
220
  widget: "SelectInputField",
222
221
  },
223
222
  config: {
224
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
223
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
225
224
  main: {
226
225
  label: label,
227
226
  type: "text",
@@ -239,7 +238,7 @@ export const getMultiSelectField = (scope: string, label: string) => {
239
238
  widget: "MultipleSelect",
240
239
  },
241
240
  config: {
242
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
241
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
243
242
  main: {
244
243
  multiple: true,
245
244
  label: label,
@@ -250,13 +249,19 @@ export const getMultiSelectField = (scope: string, label: string) => {
250
249
  }
251
250
 
252
251
 
253
- const GraphSection = {
252
+ const BaseSection = {
254
253
  type: "WrapperLayout",
254
+ config: {
255
+ main: {
256
+ label: " ",
257
+ gap: "8px"
258
+ }
259
+ },
255
260
  elements: [],
256
261
  };
257
262
 
258
263
  export const buildPropertiesSection = function (type: String) {
259
- let uiSchema = _.cloneDeep(GraphSection);
264
+ let uiSchema = _.cloneDeep(BaseSection);
260
265
  switch (type) {
261
266
 
262
267
  case "TreeMap":
@@ -317,7 +322,7 @@ export const buildPropertiesSection = function (type: String) {
317
322
  case "Text":
318
323
  uiSchema.elements = [
319
324
  getInputField("placeholder", "Placeholder"),
320
- emptyBox("TextEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
325
+ getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
321
326
  emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
322
327
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
323
328
  ]
@@ -327,6 +332,7 @@ export const buildPropertiesSection = function (type: String) {
327
332
  getInputField("placeholder", "Placeholder"),
328
333
  getRadioInputField("enableCodeEditor", "Enable Code Editor",["YES", "NO"]),
329
334
  getInputField("codeEditorLanguage", "Enter Code Language"),
335
+ emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 0, lg: 3 }),
330
336
  ]
331
337
  break;
332
338
 
@@ -413,7 +419,7 @@ export const buildPropertiesSection = function (type: String) {
413
419
  getInputField("xAxisValue", "X-AxisValue"),
414
420
  getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
415
421
  getInputField("leftMargin", "Left Margin"),
416
- emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 8 }),
422
+ emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 6 }),
417
423
  getArrayControl("legendLabels", "label"),
418
424
  getArrayControl("pieArcColors", "color"),
419
425
  ];
@@ -16,21 +16,25 @@ export const EventSection = (theme)=>{
16
16
  widget: {
17
17
  type: "Control",
18
18
  scope: "#/properties/New_Record",
19
-
20
19
  options: {
21
20
  widget: "IconButton",
22
21
  },
23
22
  config: {
24
23
  main: {
25
- color: "info",
26
24
  onClick: "eventAddHandler",
27
25
  size: "small",
28
- icon: "AddIcon",
29
- iconLabel: "Add New",
26
+ icon: "TableAddIcon",
27
+ iconLabel: "Add",
30
28
  styleDefault: true,
31
29
  },
32
30
  style: {
33
31
  mt: "6px",
32
+ color: "inherit",
33
+ fill: "inherit",
34
+ "&:hover": {
35
+ color: "inherit",
36
+ fill: "inherit",
37
+ }
34
38
  },
35
39
  },
36
40
  }
@@ -45,15 +49,20 @@ export const EventSection = (theme)=>{
45
49
  },
46
50
  config: {
47
51
  main: {
48
- // color: "info",
49
52
  onClick: "copyPasteElement",
50
53
  size: "small",
51
- icon: "PasteIcon",
54
+ icon: "TablePaste",
52
55
  iconLabel: "Paste",
53
56
  styleDefault: true,
54
57
  },
55
58
  style: {
56
59
  mt: "6px",
60
+ color: "inherit",
61
+ fill: "inherit",
62
+ "&:hover": {
63
+ color: "inherit",
64
+ fill: "inherit",
65
+ }
57
66
  },
58
67
  },
59
68
  }
@@ -70,16 +79,21 @@ export const EventSection = (theme)=>{
70
79
 
71
80
  {
72
81
  accessorKey: "eventType",
73
- header: "Event Type",
82
+ header: "Event's Type",
83
+ type: "string",
84
+ size: 300,
74
85
  },
75
86
  {
76
87
  accessorKey: "Handler",
77
88
  header: "Handler",
89
+ type: "string",
90
+ size: 200,
78
91
  },
79
92
  {
80
93
  accessorKey: "Edit_Approve_Records",
81
- header: "Edit Widget",
82
-
94
+ header: "Edit",
95
+ size: 150,
96
+ type: "action",
83
97
  widget: {
84
98
  type: "Control",
85
99
  scope: "#/properties/Edit_Records",
@@ -88,14 +102,16 @@ export const EventSection = (theme)=>{
88
102
  },
89
103
  config: {
90
104
  main: {
91
- color: "info",
92
105
  size: "small",
93
- icon: "EditIcon",
106
+ icon: "TableEditIcon",
94
107
  tooltipMessage: "Edit This Record",
95
108
  onClick: "eventEditHandler",
96
109
  },
97
110
  style: {
98
- color: theme.palette.primary.main,
111
+ fill: theme.palette.primary.main,
112
+ "& :hover": {
113
+ fill: theme.palette.primary.dark,
114
+ },
99
115
  },
100
116
  },
101
117
  },
@@ -103,7 +119,8 @@ export const EventSection = (theme)=>{
103
119
  {
104
120
  accessorKey: "Reject_Records",
105
121
  header: "Delete",
106
-
122
+ size: 150,
123
+ type: "action",
107
124
  widget: {
108
125
  type: "Control",
109
126
  scope: "#/properties/RejectButton",
@@ -113,18 +130,24 @@ export const EventSection = (theme)=>{
113
130
  },
114
131
  config: {
115
132
  main: {
116
- icon: "RejectIcon",
117
- color: "error",
133
+ icon: "Bin",
118
134
  tooltipMessage: "Reject This Record",
119
135
  onClick: "deletePopUpEvent",
120
136
  },
137
+ style: {
138
+ fill: theme.palette.primary.main,
139
+ "& :hover": {
140
+ fill: theme.palette.primary.dark,
141
+ },
142
+ },
121
143
  },
122
144
  },
123
145
  },
124
146
  {
125
147
  header: "Copy",
126
148
  field: "Copy_Event",
127
- flex: 1,
149
+ size: 150,
150
+ type: "action",
128
151
  widget: {
129
152
  type: "Control",
130
153
  scope: "#/properties/Copy_Event",
@@ -134,7 +157,6 @@ export const EventSection = (theme)=>{
134
157
  config: {
135
158
  main: {
136
159
  icon: "FileCopyIcon",
137
- // color: "error",
138
160
  onClick: "copyPasteElement",
139
161
  tooltipMessage: "Reject This Record",
140
162
  styleDefault: true,
@@ -6,56 +6,56 @@ export const refreshSectionUiSchema = {
6
6
  {
7
7
  type: "Control",
8
8
  scope: "#/properties/refreshElements",
9
- layout: 11.5,
10
9
  options: {
11
- detail: {
12
- type: "HorizontalLayout",
13
- elements: [
14
- {
15
- type: "Control",
16
- scope: "#/properties/value",
17
-
18
- options: {
19
- widget: "InputField",
20
- },
21
- config: {
22
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
23
- main: {
24
- label: "Value",
25
- },
26
- },
27
- },
28
- {
29
- type: "Control",
30
- scope: "#/properties/emptyBox",
10
+ widget: "Array",
11
+ },
12
+ config: {
13
+ layout: 12,
14
+ main: {
15
+ label: "Refresh Elements",
16
+ childElementLabel: "Refresh Elements",
17
+ },
18
+ style: {
19
+ marginLeft: "-24px",
20
+ marginBottom: "24px !important",
21
+ labelStyle: {
22
+ marginLeft: "24px",
23
+ },
24
+ detailsStyle: {
25
+ marginLeft: "24px",
26
+ }
27
+ }
28
+ },
29
+ elements: [
30
+ {
31
+ type: "Control",
32
+ scope: "#/properties/value",
31
33
 
32
- options: {
33
- widget: "EmptyBox",
34
- },
35
- config: {
36
- layout: { xs: 0, sm: 6, md: 4, lg: 4 },
37
- main: {
38
-
39
- },
40
- },
34
+ options: {
35
+ widget: "InputField",
36
+ },
37
+ config: {
38
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
39
+ main: {
40
+ label: "Value",
41
41
  },
42
- {
43
- type: "Control",
44
- scope: "#/properties/emptyBox",
42
+ },
43
+ },
44
+ {
45
+ type: "Control",
46
+ scope: "#/properties/emptyBox",
45
47
 
46
- options: {
47
- widget: "EmptyBox",
48
- },
49
- config: {
50
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
51
- main: {
52
-
53
- },
54
- },
48
+ options: {
49
+ widget: "EmptyBox",
50
+ },
51
+ config: {
52
+ layout: { xs: 6, sm: 6, md: 8, lg: 8 },
53
+ main: {
54
+
55
55
  },
56
- ],
56
+ },
57
57
  },
58
- },
58
+ ],
59
59
  }
60
60
  ],
61
61
  };
@@ -1,5 +1,11 @@
1
1
  export const StyleSection = {
2
- type: "HorizontalLayout",
2
+ type: "WrapperLayout",
3
+ config: {
4
+ main: {
5
+ label: " ",
6
+ gap: "8px"
7
+ }
8
+ },
3
9
  elements: [
4
10
  {
5
11
  type: "Control",
@@ -15,18 +21,8 @@ export const StyleSection = {
15
21
  md: 12,
16
22
  lg: 12,
17
23
  },
18
- style:{
19
- containerStyle:{
20
- // background:"gray"
21
- borderRadius:"20px"
22
- },
23
- headerContainerStyle:{
24
-
25
- },
26
- textAreaStyle:{
27
- borderRadius:"20px",
28
- padding:"20px"
29
- }
24
+ style: {
25
+ "& .MuiFormLabel-root:not(.MuiInputLabel-shrink)": {},
30
26
  },
31
27
  main: {
32
28
  heading:"JSON Style",