impaktapps-ui-builder 0.0.382460 → 1.0.1

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 (45) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1273 -1115
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +16 -16
  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/card.d.ts +10 -2
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +23 -32
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -33
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +52 -38
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/styleSection.d.ts +7 -8
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +29 -33
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +6 -0
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +56 -36
  16. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
  17. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
  18. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +8 -0
  19. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -1
  20. package/package.json +1 -1
  21. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -0
  22. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +6 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
  24. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +39 -27
  25. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +111 -96
  26. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +113 -61
  27. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +8 -4
  28. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +108 -88
  29. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +39 -17
  30. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +44 -44
  31. package/src/impaktapps-ui-builder/builder/build/uischema/styleSection.ts +9 -13
  32. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  33. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +40 -18
  34. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +73 -2
  35. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +63 -45
  36. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +50 -44
  37. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +232 -309
  38. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +166 -224
  39. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +15 -12
  40. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +147 -205
  41. package/src/impaktapps-ui-builder/builder/services/component.ts +228 -57
  42. package/src/impaktapps-ui-builder/builder/services/event.ts +182 -66
  43. package/src/impaktapps-ui-builder/builder/services/utils.ts +2 -2
  44. package/src/impaktapps-ui-builder/runtime/services/events.ts +32 -21
  45. package/src/impaktapps-ui-builder/runtime/services/service.ts +18 -29
@@ -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
  }
@@ -29,10 +26,70 @@ const emptyBox = (scope:string,layout?: any) => {
29
26
  },
30
27
  }
31
28
  }
29
+ // const cardLayout = {
30
+ // type: "Control",
31
+ // scope: "#/properties/cardLayout",
32
+ // options: {
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",
63
+
64
+ // },
65
+ // },
66
+ // },
67
+ // {
68
+ // type: "Control",
69
+ // scope: "#/properties/value",
70
+
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.",
82
+
83
+ // },
84
+ // },
85
+ // },
86
+ // emptyBox("cardEmpty")
87
+ // ],
88
+ // };
32
89
  const cardLayout = {
33
90
  type: "Control",
34
91
  scope: "#/properties/cardLayout",
35
- layout: 11.5,
92
+ layout: 12,
36
93
  options: {
37
94
  detail: {
38
95
  type: "HorizontalLayout",
@@ -79,35 +136,47 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
79
136
  return {
80
137
  type: "Control",
81
138
  scope: `#/properties/${parentScope}`,
82
- layout: 12,
83
139
  options: {
84
- "elementLabelProp": childScope,
85
- detail: {
86
- type: "HorizontalLayout",
87
- elements: [
88
- {
89
- type: "Control",
90
- scope: `#/properties/${childScope}`,
140
+ widget: "Array"
141
+ },
142
+ config: {
143
+ layout: 12,
144
+ main: {
145
+ label: childLabel,
146
+ childElementLabel: childLabel,
147
+ },
148
+ style: {
149
+ marginLeft: "-24px",
150
+ marginBottom: "24px !important",
151
+ labelStyle: {
152
+ marginLeft: "24px",
153
+ },
154
+ detailsStyle: {
155
+ marginLeft: "24px",
156
+ }
157
+ }
158
+ },
159
+ elements: [
160
+ {
161
+ type: "Control",
162
+ scope: `#/properties/${childScope}`,
91
163
 
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
- },
164
+ options: {
165
+ widget: "InputField",
166
+ },
167
+ config: {
168
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
169
+ main: {
170
+ label: childLabel || "Labels for Tab",
101
171
  },
102
- emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
103
- emptyBox("ArrayControlEmpty2", {xs: 0, sm: 0, md: 4, lg: 4 })
104
- ],
172
+ },
105
173
  },
106
- },
174
+ emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 8, lg: 8 }),
175
+ ],
107
176
  }
108
177
  };
109
178
  const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
110
- sizeHolder.options.detail.elements[1] = {
179
+ sizeHolder.elements[1] = {
111
180
  type: "Control",
112
181
  scope: `#/properties/value`,
113
182
 
@@ -121,7 +190,7 @@ sizeHolder.options.detail.elements[1] = {
121
190
  },
122
191
  },
123
192
  };
124
- sizeHolder.options.detail.elements[2] = emptyBox("sizeHolderempty")
193
+ sizeHolder.elements[2] = emptyBox("sizeHolderempty")
125
194
  const getInputField = (scope: String, label: String) => {
126
195
  return {
127
196
  type: "Control",
@@ -131,7 +200,7 @@ const getInputField = (scope: String, label: String) => {
131
200
  widget: "InputField",
132
201
  },
133
202
  config: {
134
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
203
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
135
204
  main: {
136
205
  label: label,
137
206
  },
@@ -148,7 +217,7 @@ export const getRadioInputField = (scope: String, label: String, options: string
148
217
  widget: "RadioInputField",
149
218
  },
150
219
  config: {
151
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
220
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
152
221
  main: {
153
222
  label: label,
154
223
 
@@ -165,16 +234,6 @@ export const buildWrapper = (label: string, elements: any[]) => {
165
234
  label: label || "Details",
166
235
  isAccordion: true,
167
236
  },
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
237
  },
179
238
  elements: elements || []
180
239
  }
@@ -189,22 +248,8 @@ export const getTextArea = (scope: string, heading: string, hideButton: boolean,
189
248
  },
190
249
  config: {
191
250
  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
251
  main: {
207
- heading: heading,
252
+ label: heading,
208
253
  minRows: 8,
209
254
  hideButton: hideButton,
210
255
  enableCodeEditor: true
@@ -221,7 +266,7 @@ export const getSelectField = (scope: string, label: string, options: { label: s
221
266
  widget: "SelectInputField",
222
267
  },
223
268
  config: {
224
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
269
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
225
270
  main: {
226
271
  label: label,
227
272
  type: "text",
@@ -239,7 +284,7 @@ export const getMultiSelectField = (scope: string, label: string) => {
239
284
  widget: "MultipleSelect",
240
285
  },
241
286
  config: {
242
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
287
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
243
288
  main: {
244
289
  multiple: true,
245
290
  label: label,
@@ -250,13 +295,19 @@ export const getMultiSelectField = (scope: string, label: string) => {
250
295
  }
251
296
 
252
297
 
253
- const GraphSection = {
298
+ const BaseSection = {
254
299
  type: "WrapperLayout",
300
+ config: {
301
+ main: {
302
+ label: " ",
303
+ gap: "8px"
304
+ }
305
+ },
255
306
  elements: [],
256
307
  };
257
308
 
258
309
  export const buildPropertiesSection = function (type: String) {
259
- let uiSchema = _.cloneDeep(GraphSection);
310
+ let uiSchema = _.cloneDeep(BaseSection);
260
311
  switch (type) {
261
312
 
262
313
  case "TreeMap":
@@ -317,7 +368,7 @@ export const buildPropertiesSection = function (type: String) {
317
368
  case "Text":
318
369
  uiSchema.elements = [
319
370
  getInputField("placeholder", "Placeholder"),
320
- emptyBox("TextEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
371
+ getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
321
372
  emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
322
373
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
323
374
  ]
@@ -327,6 +378,7 @@ export const buildPropertiesSection = function (type: String) {
327
378
  getInputField("placeholder", "Placeholder"),
328
379
  getRadioInputField("enableCodeEditor", "Enable Code Editor",["YES", "NO"]),
329
380
  getInputField("codeEditorLanguage", "Enter Code Language"),
381
+ emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 0, lg: 3 }),
330
382
  ]
331
383
  break;
332
384
 
@@ -413,7 +465,7 @@ export const buildPropertiesSection = function (type: String) {
413
465
  getInputField("xAxisValue", "X-AxisValue"),
414
466
  getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
415
467
  getInputField("leftMargin", "Left Margin"),
416
- emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 8 }),
468
+ emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 6 }),
417
469
  getArrayControl("legendLabels", "label"),
418
470
  getArrayControl("pieArcColors", "color"),
419
471
  ];
@@ -6,7 +6,8 @@ export default function Card(theme){
6
6
  wrapperStyle: {
7
7
  position: "relative",
8
8
  top: "50%",
9
- transform: "translateY(-50%)"
9
+ transform: "translateY(-50%)",
10
+ marginBottom: 0
10
11
  },
11
12
  componentsBoxStyle: {
12
13
  boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
@@ -46,6 +47,7 @@ export default function Card(theme){
46
47
  },
47
48
  wrapperStyle: {
48
49
  background: "transparent",
50
+ marginBottom: 0
49
51
  },
50
52
  componentsBoxStyle: {
51
53
  flexDirection: "column",
@@ -67,6 +69,7 @@ export default function Card(theme){
67
69
  },
68
70
  wrapperStyle: {
69
71
  background: "transparent",
72
+ marginBottom: 0
70
73
  },
71
74
  componentsBoxStyle: {
72
75
  flexDirection: "row",
@@ -99,6 +102,7 @@ export default function Card(theme){
99
102
  justifyContent: "flex-start",
100
103
  width: "auto",
101
104
  margin: "-8px",
105
+ marginLeft: "-24px",
102
106
  height: 0
103
107
  },
104
108
  // layout: 1,
@@ -124,7 +128,7 @@ export default function Card(theme){
124
128
  width: "auto",
125
129
  margin: "-8px",
126
130
  position: "absolute",
127
- left: "8px"
131
+ left: "24px"
128
132
  },
129
133
  // layout: 11,
130
134
  },
@@ -149,8 +153,7 @@ export default function Card(theme){
149
153
  background: "inherit",
150
154
  width: "calc(100%+8px)",
151
155
  margin: "-8px",
152
- marginTop: "12px",
153
- lineHeight: "1",
156
+ marginTop: {xs: "16px", md: "20px"},
154
157
  },
155
158
  layout: 12,
156
159
  },
@@ -177,6 +180,7 @@ export default function Card(theme){
177
180
  justifyContent: "end",
178
181
  },
179
182
  imageStyle: {
183
+ width: "unset",
180
184
  fontSize: "none",
181
185
  padding: "4px",
182
186
  margin: "0px 0px 0px 8px",