impaktapps-ui-builder 1.0.4 → 1.0.41

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 (22) hide show
  1. package/dist/impaktapps-ui-builder.es.js +233 -196
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +6 -6
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  11. package/package.json +1 -1
  12. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +20 -15
  13. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -6
  14. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  15. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +88 -128
  16. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +58 -119
  17. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  18. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  19. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  20. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +60 -118
  21. package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
  22. package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -2
@@ -1,8 +1,8 @@
1
1
 
2
2
  import _ from "lodash";
3
- export const emptyBox = (scope:string,layout?: any) => {
3
+ export const emptyBox = (scope: string, layout?: any) => {
4
4
 
5
- if(layout !== undefined){
5
+ if (layout !== undefined) {
6
6
  return {
7
7
  type: "Control",
8
8
  scope: `#/properties/${scope}`,
@@ -15,123 +15,75 @@ export const emptyBox = (scope:string,layout?: any) => {
15
15
  }
16
16
  }
17
17
  return {
18
- type: "Control",
19
- scope: "#/properties/empty",
18
+ type: "Control",
19
+ scope: "#/properties/empty",
20
20
 
21
- options: {
22
- widget: "EmptyBox",
23
- },
24
- config: {
25
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
26
- },
27
- }
21
+ options: {
22
+ widget: "EmptyBox",
23
+ },
24
+ config: {
25
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
26
+ },
27
+ }
28
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
- // };
89
29
  const cardLayout = {
90
30
  type: "Control",
91
31
  scope: "#/properties/cardLayout",
92
- layout: 12,
93
- options: {
94
- detail: {
95
- type: "HorizontalLayout",
96
- elements: [
97
- {
98
- type: "Control",
99
- scope: "#/properties/key",
100
- options: {
101
- widget: "SelectInputField",
102
- },
103
- config: {
104
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
105
- main: {
106
- label: "Screen Size",
32
+ config: {
33
+ layout: 12,
34
+ main: {
35
+ label: "Card Layout",
36
+ childElementLabel: "Card Layout",
37
+ },
38
+ style: {
39
+ marginLeft: "-24px",
40
+ marginBottom: "24px !important",
41
+ labelStyle: {
42
+ marginLeft: "24px",
43
+ },
44
+ detailsStyle: {
45
+ marginLeft: "24px",
46
+ }
47
+ }
48
+ },
49
+ elements: [
50
+ {
51
+ type: "Control",
52
+ scope: "#/properties/key",
53
+ options: {
54
+ widget: "SelectInputField",
55
+ },
56
+ config: {
57
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
58
+ main: {
59
+ label: "Screen Size",
107
60
 
108
- },
109
- },
110
61
  },
111
- {
112
- type: "Control",
113
- scope: "#/properties/value",
62
+ },
63
+ },
64
+ {
65
+ type: "Control",
66
+ scope: "#/properties/value",
114
67
 
115
- options: {
116
- widget: "InputField",
117
- },
118
- config: {
119
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
120
- main: {
121
- label: "Value",
122
- type: "number",
123
- // freeSolo:true,
124
- helperText: 'Number should be in range of 0 to 12',
125
- errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
68
+ options: {
69
+ widget: "InputField",
70
+ },
71
+ config: {
72
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
73
+ main: {
74
+ label: "Value",
75
+ type: "number",
76
+ // freeSolo:true,
77
+ helperText: 'Number should be in range of 0 to 12',
78
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
126
79
 
127
- },
128
- },
129
80
  },
130
- emptyBox("cardEmpty")
131
- ],
81
+ },
132
82
  },
133
- },
83
+ emptyBox("cardEmpty")
84
+ ],
134
85
  };
86
+
135
87
  const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
136
88
  return {
137
89
  type: "Control",
@@ -171,7 +123,7 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
171
123
  },
172
124
  },
173
125
  },
174
- emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 8, lg: 8 }),
126
+ emptyBox("ArrayControlEmpty1", { xs: 6, sm: 6, md: 8, lg: 8 }),
175
127
  ],
176
128
  }
177
129
  };
@@ -276,7 +228,7 @@ export const getSelectField = (scope: string, label: string, options: { label: s
276
228
  }
277
229
  }
278
230
  export const getMultiSelectField = (scope: string, label: string) => {
279
- return {
231
+ return {
280
232
  type: "Control",
281
233
  scope: `#/properties/${scope}`,
282
234
 
@@ -309,7 +261,15 @@ const BaseSection = {
309
261
  export const buildPropertiesSection = function (type: String) {
310
262
  let uiSchema = _.cloneDeep(BaseSection);
311
263
  switch (type) {
264
+ case "Array": // // allExpanded childElementLabel label
265
+ uiSchema.elements = [
266
+ getRadioInputField("allExpanded", "Initial Expand", ["YES", "NO"]),
267
+ getInputField("childElementLabel", "Child Element Label"),
268
+ emptyBox("empty1", { xs: 12, sm: 6, md: 4, lg: 3 }),
269
+ emptyBox("empty2", { xs: 0, sm: 0, md: 4, lg: 3 }),
312
270
 
271
+ ]
272
+ break;
313
273
  case "TreeMap":
314
274
  uiSchema.elements = [
315
275
  getSelectField("orientation", "orientation", []),
@@ -317,7 +277,7 @@ export const buildPropertiesSection = function (type: String) {
317
277
  getInputField("graphHeight", "Graph Height"),
318
278
  getInputField("graphWidth", "Graph Width"),
319
279
  getInputField("graphZoomHeight", "Zoom Height"),
320
- emptyBox("TreeEmpty", {xs: 6, sm: 6, md: 4, lg: 4})
280
+ emptyBox("TreeEmpty", { xs: 6, sm: 6, md: 4, lg: 4 })
321
281
  ]
322
282
  break;
323
283
  case "InputSlider":
@@ -325,9 +285,9 @@ export const buildPropertiesSection = function (type: String) {
325
285
  getInputField("max", "Max Limit"),
326
286
  getInputField("step", "Step"),
327
287
  getInputField("min", "Min Limit"),
328
- emptyBox("InputSliderEmpty1", {xs: 6, sm: 0, md: 0, lg: 0}),
288
+ emptyBox("InputSliderEmpty1", { xs: 6, sm: 0, md: 0, lg: 0 }),
329
289
  getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"]),
330
- emptyBox("InputSliderEmpty2", {xs: 0, sm: 0, md: 8, lg: 8})
290
+ emptyBox("InputSliderEmpty2", { xs: 0, sm: 0, md: 8, lg: 8 })
331
291
  ]
332
292
  break;
333
293
  case "DataGrid":
@@ -336,8 +296,8 @@ export const buildPropertiesSection = function (type: String) {
336
296
  getInputField("elevation", "Card Elevation"),
337
297
  getInputField("height", "Grid height"),
338
298
  getInputField("justifyContent", "justifyContent"),
339
- emptyBox("DataGridEmpty1", {xs: 6, sm: 0, md: 4, lg: 4 }),
340
- emptyBox("DataGridEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
299
+ emptyBox("DataGridEmpty1", { xs: 6, sm: 0, md: 4, lg: 4 }),
300
+ emptyBox("DataGridEmpty1", { xs: 0, sm: 0, md: 4, lg: 4 }),
341
301
  cardLayout,
342
302
  ]
343
303
  break;
@@ -351,7 +311,7 @@ export const buildPropertiesSection = function (type: String) {
351
311
  { label: "Horizontal", value: "horizontal" },
352
312
  { label: "Vertical", value: "vertical" },
353
313
  ]),
354
- emptyBox("Stepper", {xs: 6, sm: 6, md: 4, lg: 4 }),
314
+ emptyBox("Stepper", { xs: 6, sm: 6, md: 4, lg: 4 }),
355
315
 
356
316
  getArrayControl("sectionLabels", "label")
357
317
 
@@ -362,23 +322,23 @@ export const buildPropertiesSection = function (type: String) {
362
322
  getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
363
323
  getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
364
324
  getInputField("maxWidth", "Max. Width"),
365
- emptyBox("PopUpEmpty", {xs: 6, sm: 6, md: 0, lg: 0 })
325
+ emptyBox("PopUpEmpty", { xs: 6, sm: 6, md: 0, lg: 0 })
366
326
  ]
367
327
  break;
368
328
  case "Text":
369
329
  uiSchema.elements = [
370
330
  getInputField("placeholder", "Placeholder"),
371
331
  getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
372
- emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
332
+ emptyBox("TextEmpty1", { xs: 0, sm: 0, md: 4, lg: 4 }),
373
333
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
374
334
  ]
375
335
  break;
376
336
  case "TextArea":
377
337
  uiSchema.elements = [
378
338
  getInputField("placeholder", "Placeholder"),
379
- getRadioInputField("enableCodeEditor", "Enable Code Editor",["YES", "NO"]),
339
+ getRadioInputField("enableCodeEditor", "Enable Code Editor", ["YES", "NO"]),
380
340
  getInputField("codeEditorLanguage", "Enter Code Language"),
381
- emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 0, lg: 3 }),
341
+ emptyBox("TextEmpty1", { xs: 0, sm: 0, md: 0, lg: 3 }),
382
342
  ]
383
343
  break;
384
344
 
@@ -389,14 +349,14 @@ export const buildPropertiesSection = function (type: String) {
389
349
  getInputField("heading", "Container Heading"),
390
350
  getInputField("speedoCaption", "Speedometer Caption"),
391
351
  getInputField("width", "Speedometer Width"),
392
- emptyBox("SpeedoMeterEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 })
352
+ emptyBox("SpeedoMeterEmpty1", { xs: 6, sm: 6, md: 4, lg: 4 })
393
353
  ]
394
354
  break;
395
355
  case "RankCard":
396
356
  uiSchema.elements = [
397
357
  getInputField("rank", "Rank"),
398
358
  getInputField("height", "Height"),
399
- emptyBox("RankCardEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 })];
359
+ emptyBox("RankCardEmpty1", { xs: 0, sm: 0, md: 4, lg: 4 })];
400
360
  break;
401
361
  case "LeaderBoard":
402
362
  uiSchema.elements = [
@@ -406,7 +366,7 @@ export const buildPropertiesSection = function (type: String) {
406
366
  getInputField("nameKey", "Key for Name"),
407
367
  getInputField("imageKey", "Key for Image"),
408
368
  getInputField("scoreKey", "Key for comparing parameter"),
409
- emptyBox("LeaderBoardEmpty1", {xs: 6, sm: 6, md: 0, lg: 0 }),
369
+ emptyBox("LeaderBoardEmpty1", { xs: 6, sm: 6, md: 0, lg: 0 }),
410
370
  ];
411
371
  break;
412
372
  case "CardSlider":
@@ -429,7 +389,7 @@ export const buildPropertiesSection = function (type: String) {
429
389
  getInputField("label", "Label"),
430
390
  getInputField("titleIcon", "Unicode of Icon for title"),
431
391
  getInputField("description", "Description"),
432
- emptyBox("cardEmpty", {xs: 0, sm: 0, md: 8, lg: 8 })
392
+ emptyBox("cardEmpty", { xs: 0, sm: 0, md: 8, lg: 8 })
433
393
  ];
434
394
  break;
435
395
  case "Button":
@@ -442,7 +402,7 @@ export const buildPropertiesSection = function (type: String) {
442
402
  { label: "Apply Default Style", value: "true" },
443
403
  { label: "No Style", value: "false" },
444
404
  ]),
445
- emptyBox("ButtonEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 })
405
+ emptyBox("ButtonEmpty1", { xs: 6, sm: 6, md: 4, lg: 4 })
446
406
  ];
447
407
  break;
448
408
  case "Graph":
@@ -459,13 +419,13 @@ export const buildPropertiesSection = function (type: String) {
459
419
  ]),
460
420
  getInputField("leftLabel", "Left Label"),
461
421
  getInputField("bottomLabel", "Bottom Label"),
462
- emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 0, lg: 0 }),
422
+ emptyBox("GraphEmpty1", { xs: 6, sm: 0, md: 0, lg: 0 }),
463
423
  getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
464
424
  getInputField("yAxisValue", "Y-AxisValue"),
465
425
  getInputField("xAxisValue", "X-AxisValue"),
466
426
  getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
467
427
  getInputField("leftMargin", "Left Margin"),
468
- emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 6 }),
428
+ emptyBox("GraphEmpty1", { xs: 6, sm: 0, md: 8, lg: 6 }),
469
429
  getArrayControl("legendLabels", "label"),
470
430
  getArrayControl("pieArcColors", "color"),
471
431
  ];
@@ -475,7 +435,7 @@ export const buildPropertiesSection = function (type: String) {
475
435
  getRadioInputField("isAccordion", "Accordion", ["YES", "No"])
476
436
  , getRadioInputField("defaultStyle", "Default Style", ["YES", "No"]),
477
437
  getInputField("rowSpacing", "Row Spacing"),
478
- emptyBox("WrapperSectionEmpty1", {xs: 6, sm: 0, md: 4, lg: 4 }), emptyBox("WrapperSectionEmpty2")
438
+ emptyBox("WrapperSectionEmpty1", { xs: 6, sm: 0, md: 4, lg: 4 }), emptyBox("WrapperSectionEmpty2")
479
439
  ]
480
440
  break;
481
441
 
@@ -534,7 +494,7 @@ export const buildPropertiesSection = function (type: String) {
534
494
  case "MultipleSelect":
535
495
  uiSchema.elements = [
536
496
  getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
537
- emptyBox("MultipleSelectEmpty1", {xs: 0, sm: 6, md: 4, lg: 4 }),
497
+ emptyBox("MultipleSelectEmpty1", { xs: 0, sm: 6, md: 4, lg: 4 }),
538
498
  emptyBox("MultipleSelectEmpty2")
539
499
  ]
540
500
  break;
@@ -89,129 +89,68 @@ export const CoreSection = {
89
89
  {
90
90
  type: "Control",
91
91
  scope: "#/properties/layout",
92
- layout: 12,
93
- options: {
94
- "elementLabelProp": "key",
95
- detail: {
96
- type: "HorizontalLayout",
97
-
98
- elements: [
99
- {
100
- type: "Control",
101
- scope: "#/properties/key",
102
- options: {
103
- widget: "SelectInputField",
104
- },
105
- config: {
106
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
107
- main: {
108
- label: "Screen Size",
109
-
110
- },
111
- },
112
- },
113
- {
114
- type: "Control",
115
- scope: "#/properties/value",
116
-
117
- options: {
118
- widget: "InputField",
119
- },
120
- config: {
121
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
122
- main: {
123
- label: "Value",
124
- type:"number",
125
- // freeSolo:true,
126
- helperText:'Number should be in range of 0 to 12',
127
- errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
128
- },
129
- },
130
- },
131
- {
132
- type: "Control",
133
- scope: "#/properties/proc",
134
- config: {
135
- layout: { xs: 0, sm: 0, md: 4, lg: 4 },
136
- },
137
- options: {
138
- widget: "EmptyBox",
139
- },
140
- },
141
- ],
92
+ config: {
93
+ layout: 12,
94
+ main: {
95
+ label: "Layout",
96
+ childElementLabel: "Layout",
142
97
  },
98
+ style: {
99
+ marginLeft: "-24px",
100
+ marginBottom: "24px !important",
101
+ labelStyle: {
102
+ marginLeft: "24px",
103
+ },
104
+ detailsStyle: {
105
+ marginLeft: "24px",
106
+ }
107
+ }
143
108
  },
144
- },
145
-
146
-
147
- // {
148
- // type: "Control",
149
- // scope: "#/properties/layout",
150
- // options: {
151
- // widget: "Array",
152
- // },
153
- // config: {
154
- // layout: 12,
155
- // main: {
156
- // label: "Layout",
157
- // childElementLabel: "Layout",
158
- // },
159
- // style: {
160
- // marginLeft: "-24px",
161
- // marginBottom: "24px !important",
162
- // labelStyle: {
163
- // marginLeft: "24px",
164
- // },
165
- // detailsStyle: {
166
- // marginLeft: "24px",
167
- // }
168
- // }
169
- // },
170
- // elements: [
171
- // {
172
- // type: "Control",
173
- // scope: "#/properties/key",
174
- // options: {
175
- // widget: "SelectInputField",
176
- // },
177
- // config: {
178
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
179
- // main: {
180
- // label: "Screen Size",
109
+ elements: [
110
+ {
111
+ type: "Control",
112
+ scope: "#/properties/key",
113
+ options: {
114
+ widget: "SelectInputField",
115
+ },
116
+ config: {
117
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
118
+ main: {
119
+ label: "Screen Size",
181
120
 
182
- // },
183
- // },
184
- // },
185
- // {
186
- // type: "Control",
187
- // scope: "#/properties/value",
121
+ },
122
+ },
123
+ },
124
+ {
125
+ type: "Control",
126
+ scope: "#/properties/value",
188
127
 
189
- // options: {
190
- // widget: "InputField",
191
- // },
192
- // config: {
193
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
194
- // main: {
195
- // label: "Value",
196
- // type:"number",
197
- // // freeSolo:true,
198
- // helperText:'Number should be in range of 0 to 12',
199
- // errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
128
+ options: {
129
+ widget: "InputField",
130
+ },
131
+ config: {
132
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
133
+ main: {
134
+ label: "Value",
135
+ type:"number",
136
+ // freeSolo:true,
137
+ helperText:'Number should be in range of 0 to 12',
138
+ errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
200
139
 
201
- // },
202
- // },
203
- // },
204
- // {
205
- // type: "Control",
206
- // scope: "#/properties/proc",
207
- // config: {
208
- // layout: { xs: 0, sm: 0, md: 4, lg: 4 },
209
- // },
210
- // options: {
211
- // widget: "EmptyBox",
212
- // },
213
- // },
214
- // ],
215
- // },
140
+ },
141
+ },
142
+ },
143
+ {
144
+ type: "Control",
145
+ scope: "#/properties/proc",
146
+ config: {
147
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
148
+ },
149
+ options: {
150
+ widget: "EmptyBox",
151
+ },
152
+ },
153
+ ],
154
+ },
216
155
  ],
217
156
  };
@@ -6,9 +6,6 @@ export const refreshSectionUiSchema = {
6
6
  {
7
7
  type: "Control",
8
8
  scope: "#/properties/refreshElements",
9
- options: {
10
- widget: "Array",
11
- },
12
9
  config: {
13
10
  layout: 12,
14
11
  main: {