impaktapps-ui-builder 0.0.101-alpha.9 → 0.0.101-alpha.91

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 (36) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1134 -809
  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/coreSection.d.ts +98 -95
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -33
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +52 -38
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/styleSection.d.ts +7 -8
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +29 -33
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +56 -37
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +56 -36
  14. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
  15. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +6 -0
  16. package/package.json +1 -1
  17. package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
  18. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +14 -10
  19. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +111 -96
  20. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +101 -95
  21. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +189 -110
  22. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +39 -17
  23. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +44 -44
  24. package/src/impaktapps-ui-builder/builder/build/uischema/styleSection.ts +9 -13
  25. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +40 -18
  26. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +117 -48
  27. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +113 -45
  28. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +23 -23
  29. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +119 -51
  30. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +30 -21
  31. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +15 -12
  32. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +188 -295
  33. package/src/impaktapps-ui-builder/builder/services/component.ts +146 -32
  34. package/src/impaktapps-ui-builder/builder/services/event.ts +167 -65
  35. package/src/impaktapps-ui-builder/runtime/services/events.ts +8 -1
  36. package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -4
@@ -11,7 +11,7 @@ export const APISection = {
11
11
  widget: "SelectInputField",
12
12
  },
13
13
  config: {
14
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
14
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
15
15
  main: {
16
16
  label: "Method",
17
17
  type: "text",
@@ -26,7 +26,7 @@ export const APISection = {
26
26
  widget: "InputField",
27
27
  },
28
28
  config: {
29
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
29
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
30
30
  main: {
31
31
  label: "Path",
32
32
  type: "text",
@@ -43,121 +43,136 @@ export const APISection = {
43
43
  widget: "EmptyBox",
44
44
  },
45
45
  config: {
46
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
46
+ layout: { xs: 0, sm: 0, md: 4, lg: 6 },
47
47
  },
48
48
  },
49
49
  {
50
50
  type: "Control",
51
- scope: "#/properties/emptyBox",
52
-
51
+ scope: "#/properties/headers",
53
52
  options: {
54
- widget: "EmptyBox",
53
+ widget: "Array",
55
54
  },
56
55
  config: {
57
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
56
+ layout: 12,
57
+ main: {
58
+ label: "Headers",
59
+ childElementLabel: "Headers",
60
+ },
61
+ style: {
62
+ marginLeft: "-24px",
63
+ marginBottom: "24px !important",
64
+ labelStyle: {
65
+ marginLeft: "24px",
66
+ },
67
+ detailsStyle: {
68
+ marginLeft: "24px",
69
+ }
70
+ }
58
71
  },
59
- },
60
- {
61
- type: "Control",
62
- scope: "#/properties/headers",
63
- layout: 11.5,
64
- options: {
65
- "elementLabelProp": "key",
66
- detail: {
67
- type: "HorizontalLayout",
68
- elements: [
69
- {
70
- type: "Control",
71
- scope: "#/properties/key",
72
- options: {
73
- widget: "InputField",
74
- },
75
- config: {
76
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
77
- main: {
78
- label: "Key",
79
- },
80
- },
72
+ elements: [
73
+ {
74
+ type: "Control",
75
+ scope: "#/properties/key",
76
+ options: {
77
+ widget: "InputField",
78
+ },
79
+ config: {
80
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
81
+ main: {
82
+ label: "Key",
81
83
  },
82
- {
83
- type: "Control",
84
- scope: "#/properties/value",
84
+ },
85
+ },
86
+ {
87
+ type: "Control",
88
+ scope: "#/properties/value",
85
89
 
86
- options: {
87
- widget: "InputField",
88
- },
89
- config: {
90
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
91
- main: {
92
- label: "Value",
93
- },
94
- },
90
+ options: {
91
+ widget: "InputField",
92
+ },
93
+ config: {
94
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
95
+ main: {
96
+ label: "Value",
95
97
  },
96
- {
97
- type: "Control",
98
- scope: "#/properties/emptyBox",
99
-
100
- options: {
101
- widget: "EmptyBox",
102
- },
103
- config: {
104
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
105
- },
106
- },
107
- ],
98
+ },
108
99
  },
109
- },
100
+ {
101
+ type: "Control",
102
+ scope: "#/properties/emptyBox",
103
+
104
+ options: {
105
+ widget: "EmptyBox",
106
+ },
107
+ config: {
108
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
109
+ },
110
+ },
111
+ ],
110
112
  },
111
113
  {
112
114
  type: "Control",
113
115
  scope: "#/properties/body",
114
- layout: 11.5,
115
116
  options: {
116
- "elementLabelProp": "key",
117
- detail: {
118
- type: "HorizontalLayout",
119
- elements: [
120
- {
121
- type: "Control",
122
- scope: "#/properties/key",
123
- options: {
124
- widget: "InputField",
125
- },
126
- config: {
127
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
128
- main: {
129
- label: "Key",
130
- },
131
- },
117
+ widget: "Array",
118
+ },
119
+ config: {
120
+ layout: 12,
121
+ main: {
122
+ label: "Body",
123
+ childElementLabel: "Body",
124
+ },
125
+ style: {
126
+ marginLeft: "-24px",
127
+ marginBottom: "24px !important",
128
+ labelStyle: {
129
+ marginLeft: "24px",
130
+ },
131
+ detailsStyle: {
132
+ marginLeft: "24px",
133
+ }
134
+ }
135
+ },
136
+ elements: [
137
+ {
138
+ type: "Control",
139
+ scope: "#/properties/key",
140
+ options: {
141
+ widget: "InputField",
142
+ },
143
+ config: {
144
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
145
+ main: {
146
+ label: "Key",
132
147
  },
133
- {
134
- type: "Control",
135
- scope: "#/properties/value",
148
+ },
149
+ },
150
+ {
151
+ type: "Control",
152
+ scope: "#/properties/value",
136
153
 
137
- options: {
138
- widget: "InputField",
139
- },
140
- config: {
141
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
142
- main: {
143
- label: "Value",
144
- },
145
- },
154
+ options: {
155
+ widget: "InputField",
156
+ },
157
+ config: {
158
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
159
+ main: {
160
+ label: "Value",
146
161
  },
147
- {
148
- type: "Control",
149
- scope: "#/properties/emptyBox",
150
-
151
- options: {
152
- widget: "EmptyBox",
153
- },
154
- config: {
155
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
156
- },
157
- },
158
- ],
162
+ },
159
163
  },
160
- },
164
+ {
165
+ type: "Control",
166
+ scope: "#/properties/emptyBox",
167
+
168
+ options: {
169
+ widget: "EmptyBox",
170
+ },
171
+ config: {
172
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
173
+ },
174
+ },
175
+ ],
161
176
  },
162
177
  getTextArea("apiBody", "Transformer", true,12),
163
178
  ],
@@ -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
  ];