impaktapps-ui-builder 0.0.101-alpha.217 → 0.0.101-alpha.219

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.217",
3
+ "version": "0.0.101-alpha.219",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -14,7 +14,7 @@ import { buildWrapperSection } from "./buildWrapperSection";
14
14
  import { buildTextField } from "./buildText";
15
15
  import { buildSelect } from "./buildSelect";
16
16
  import { buildButton } from "./buildButton";
17
- import { buildTable } from "./buildTable";
17
+ import { buildTable } from "./buildTable";
18
18
  import { buildLabel } from "./buildLabel";
19
19
  import { buildUploadFile } from "./buildUplaodFile";
20
20
  import { buildDownloadFile } from "./buildDownloadFile";
@@ -343,54 +343,49 @@ const buildUiSchema = (config: any, store?: any) => {
343
343
  }
344
344
  else if (config.type == "Table") {
345
345
  const sizeMap = {}
346
- // const filterMap = {}
346
+ const filterMap = {}
347
347
  if (config.sizeHolder) {
348
348
  config.sizeHolder.map((e, i) => {
349
349
  sizeMap[e.keyName] = e.value
350
350
  });
351
351
  }
352
- // if(config.enableColumnFilter){
353
- // config.enableColumnFilter.map((e)=>{
354
- // filterMap[e.keyName] = true
355
- // })
356
- // }
352
+ if (config.enableColumnFilter) {
353
+ config.enableColumnFilter.map((e) => {
354
+ filterMap[e.keyName] = true
355
+ })
356
+ }
357
357
  elements.elements = config.elements.map((cellElem, elemInd) => {
358
+ const commonProperties = {
359
+ accessorKey: cellElem.name,
360
+ type: cellElem.columnFormat,
361
+ header: cellElem.label || cellElem.name,
362
+ size: sizeMap[cellElem.name] || 180,
363
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
364
+ columnFilterModeOptions: config.filteringOptions,
365
+ enableSorting: config.enableSorting === "No" ? false : true,
366
+ columnKey: config.columnKey
367
+ }
358
368
  if (cellElem.type) {
359
369
  return {
360
- accessorKey: cellElem.name,
361
- header: cellElem.label || cellElem.name,
362
- size: sizeMap[cellElem.name] || 180,
363
- type: cellElem.columnFormat,
364
370
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
365
371
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
366
- // enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
367
- columnFilterModeOptions: cellElem.filteringOptions,
368
- enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
369
- enableSorting: cellElem.enableSorting === "Yes" ? true : false
372
+ ...commonProperties
373
+
370
374
  }
371
375
  } else {
372
- return {
373
- accessorKey: cellElem.name,
374
- type: cellElem.columnFormat,
375
- header: cellElem.label || cellElem.name,
376
- size: sizeMap[cellElem.name] || 180,
377
- // enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
378
- columnFilterModeOptions: cellElem.filteringOptions,
379
- enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
380
- enableSorting: cellElem.enableSorting === "Yes" ? true : false
381
- }
376
+ return commonProperties
382
377
  }
383
378
 
384
379
  })
385
380
  }
386
381
  else if (config.type == "Array") {
387
382
  elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
388
- return buildUiSchema(e,store)
383
+ return buildUiSchema(e, store)
389
384
  });
390
385
  }
391
386
  else {
392
387
  elements.elements = config.elements.map((e: any, elemInd: number) => {
393
- return buildUiSchema(e,store)
388
+ return buildUiSchema(e, store)
394
389
  });
395
390
  }
396
391
  }
@@ -214,63 +214,4 @@ export const CoreSection = {
214
214
  ],
215
215
  },
216
216
  ],
217
- };
218
-
219
- // export const OptionArray: any = {
220
- // type: "Control",
221
- // scope: "#/properties/value",
222
- // layout: 11.5,
223
- // options: {
224
- // detail: {
225
- // type: "HorizontalLayout",
226
- // elements: [
227
- // {
228
- // type: "Control",
229
- // scope: "#/properties/label",
230
- // options: {
231
- // widget: "SelectInputField",
232
- // },
233
- // config: {
234
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
235
- // main: {
236
- // label: "Label",
237
- // },
238
- // },
239
- // },
240
- // {
241
- // type: "Control",
242
- // scope: "#/properties/value",
243
-
244
- // options: {
245
- // widget: "InputField",
246
- // },
247
- // config: {
248
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
249
- // main: {
250
- // label: "Value",
251
- // helperText: 'Number should be in range of 0 to 12',
252
- // errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
253
- // },
254
- // },
255
- // },
256
- // ],
257
- // },
258
- // },
259
- // };
260
-
261
- // export const OptionArraySchema = {
262
- // value: {
263
- // type: "array",
264
- // items: {
265
- // type: "object",
266
- // properties: {
267
- // label: {
268
- // type: "string",
269
- // },
270
- // value: {
271
- // type: "string",
272
- // },
273
- // },
274
- // },
275
- // },
276
- // };
217
+ };
@@ -7,58 +7,6 @@ export const ValidationSection = {
7
7
  }
8
8
  },
9
9
  elements: [
10
- // {
11
- // type: "Control",
12
- // scope: "#/properties/validation",
13
- // layout: 11.5,
14
- // options: {
15
- // "elementLabelProp": "validationType",
16
- // detail: {
17
- // type: "HorizontalLayout",
18
- // elements: [
19
- // {
20
- // type: "Control",
21
- // scope: "#/properties/validationType",
22
-
23
- // options: {
24
- // widget: "SelectInputField",
25
- // },
26
- // config: {
27
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
28
- // main: {
29
- // label: "Validation Type",
30
- // },
31
- // },
32
- // },
33
- // {
34
- // type: "Control",
35
- // scope: "#/properties/validationValue",
36
-
37
- // options: {
38
- // widget: "InputField",
39
- // },
40
- // config: {
41
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
42
- // main: {
43
- // label: "Validation Value",
44
- // },
45
- // },
46
- // },
47
- // {
48
- // type: "Control",
49
- // scope: "#/properties/emptyBox",
50
- // options: {
51
- // widget: "EmptyBox"
52
- // },
53
- // config: {
54
- // layout: {xs: 0, sm: 0, md: 4}
55
- // }
56
- // }
57
- // ],
58
- // },
59
- // },
60
-
61
- // },
62
10
  {
63
11
  type: "Control",
64
12
  scope: "#/properties/validation",
@@ -7,56 +7,6 @@ export const ValueTab = {
7
7
  }
8
8
  },
9
9
  elements: [
10
- // {
11
- // type: "Control",
12
- // scope: "#/properties/value",
13
- // layout: 12,
14
- // options: {
15
- // detail: {
16
- // type: "HorizontalLayout",
17
- // elements: [
18
- // {
19
- // type: "Control",
20
- // scope: "#/properties/label",
21
- // options: {
22
- // widget: "InputField",
23
- // },
24
- // config: {
25
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
26
- // main: {
27
- // label: "Label",
28
- // },
29
- // },
30
- // },
31
- // {
32
- // type: "Control",
33
- // scope: "#/properties/value",
34
-
35
- // options: {
36
- // widget: "InputField",
37
- // },
38
- // config: {
39
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
40
- // main: {
41
- // label: "Value",
42
-
43
- // },
44
- // },
45
- // },
46
- // {
47
- // type: "Control",
48
- // scope: "#/properties/emptyBox",
49
- // options: {
50
- // widget: "EmptyBox"
51
- // },
52
- // config: {
53
- // layout: { xs: 0, sm: 0, md: 4, lg: 4 },
54
- // }
55
- // }
56
- // ],
57
- // },
58
- // },
59
- // }
60
10
  {
61
11
  type: "Control",
62
12
  scope: "#/properties/value",
@@ -2,7 +2,6 @@ export const ComponentSchema: any = {
2
2
  type: "object",
3
3
  properties: {
4
4
  type: {
5
- // type: "string",
6
5
  oneOf: [
7
6
  { title: "Masked Aadhar Card", const: "AadharcardText" },
8
7
  { title: "Array", const: "Array" },
@@ -71,7 +70,7 @@ export const ComponentSchema: any = {
71
70
  type: "array",
72
71
  items: {
73
72
  type: "object",
74
- properties: {
73
+ properties: {
75
74
  key: {
76
75
  type: "string",
77
76
  oneOf: [
@@ -82,7 +81,6 @@ export const ComponentSchema: any = {
82
81
  ],
83
82
  },
84
83
  value: {
85
- // type: "string",
86
84
 
87
85
  },
88
86
  },
@@ -103,7 +101,6 @@ export const ComponentSchema: any = {
103
101
  ],
104
102
  },
105
103
  value: {
106
- // type: "string",
107
104
 
108
105
  },
109
106
  },
@@ -192,7 +189,7 @@ export const ComponentSchema: any = {
192
189
  },
193
190
  },
194
191
  },
195
- enableColumnFilter:{
192
+ enableColumnFilter: {
196
193
  type: "array",
197
194
  items: {
198
195
  type: "object",
@@ -203,22 +200,23 @@ export const ComponentSchema: any = {
203
200
  },
204
201
  },
205
202
  },
206
- filteringOptions:{
207
- oneOf: [
208
- { const: 'fuzzy', title: 'Fuzzy' },
209
- { const: 'contains', title: 'Contain' },
210
- { const: 'startsWith', title: 'Starts with' },
211
- { const: 'endsWith', title: 'Ends with' },
212
- { const: 'equals', title: 'Equals' },
213
- { const: 'notEquals', title: 'Not Equals' },
214
- { const: 'between', title: 'Between' },
215
- { const: 'betweenInclusive', title: 'Between inclusive' },
216
- { const: 'greaterThan', title: 'Greater than' },
217
- { const: 'greaterThanOrEqualTo', title: 'Greater than or equal to' },
218
- { const: 'lessThan', title: 'Less than' },
219
- { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
220
- ]
203
+ filteringOptions: {
204
+ oneOf: [
205
+ { const: 'fuzzy', title: 'Fuzzy' },
206
+ { const: 'contains', title: 'Contain' },
207
+ { const: 'startsWith', title: 'Starts with' },
208
+ { const: 'endsWith', title: 'Ends with' },
209
+ { const: 'equals', title: 'Equals' },
210
+ { const: 'notEquals', title: 'Not Equals' },
211
+ { const: 'between', title: 'Between' },
212
+ { const: 'betweenInclusive', title: 'Between inclusive' },
213
+ { const: 'greaterThan', title: 'Greater than' },
214
+ { const: 'greaterThanOrEqualTo', title: 'Greater than or equal to' },
215
+ { const: 'lessThan', title: 'Less than' },
216
+ { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
217
+ ]
221
218
  },
219
+
222
220
  legendLabels: {
223
221
  type: "array",
224
222
  items: {
@@ -344,7 +342,7 @@ export const ComponentSchema: any = {
344
342
  type: "string",
345
343
  },
346
344
  label: { type: 'string' },
347
- RemoveItemButton:{
345
+ RemoveItemButton: {
348
346
  disabled: true,
349
347
  },
350
348
  },
@@ -1,28 +1,8 @@
1
- export const componentBasicUiSchema: any = (theme)=>{
1
+ export const componentBasicUiSchema: any = (theme) => {
2
2
  const uiSchema = {
3
3
  type: "HorizontalLayout",
4
4
  heading: "Page-Component",
5
5
  elements: [
6
- // {
7
- // type: "Control",
8
- // scope: "#/properties/pageName",
9
-
10
- // options: {
11
- // widget: "Box",
12
- // },
13
- // config: {
14
- // layout: 12,
15
- // main: {
16
- // heading: " ",
17
- // },
18
- // style: {
19
- // marginLeft: theme.spacing(3),
20
- // width:"auto",
21
- // fontSize:"12px",
22
- // color:"gray",
23
- // },
24
- // },
25
- // },
26
6
  {
27
7
  type: "TabLayout",
28
8
  config: {
@@ -110,20 +90,6 @@ export const componentBasicUiSchema: any = (theme)=>{
110
90
  },
111
91
  },
112
92
  },
113
- // {//////////////////////////
114
- // type: "Control",
115
- // scope: "#/properties/columnFormat",
116
- // options: {
117
- // widget: "SelectInputField",
118
- // },
119
- // config: {
120
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
121
- // main: {
122
- // label: "Column Format",
123
-
124
- // },
125
- // },
126
- // },/////////////////////
127
93
  {
128
94
  type: "Control",
129
95
  scope: "#/properties/proc",
@@ -134,61 +100,6 @@ export const componentBasicUiSchema: any = (theme)=>{
134
100
  widget: "EmptyBox",
135
101
  },
136
102
  },
137
- // {
138
- // type: "Control",
139
- // scope: "#/properties/layout",
140
- // layout: 12,
141
- // options: {
142
- // detail: {
143
- // type: "HorizontalLayout",
144
- // elements: [
145
- // {
146
- // type: "Control",
147
- // scope: "#/properties/key",
148
- // options: {
149
- // widget: "SelectInputField",
150
- // },
151
- // config: {
152
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
153
- // main: {
154
- // label: "Screen Size",
155
-
156
- // },
157
- // },
158
- // },
159
- // {
160
- // type: "Control",
161
- // scope: "#/properties/value",
162
-
163
- // options: {
164
- // widget: "InputField",
165
- // },
166
- // config: {
167
- // layout: { xs: 6, sm: 6, md: 4, lg: 4 },
168
- // main: {
169
- // label: "Value",
170
- // type:"number",
171
- // // freeSolo:true,
172
- // helperText:'Number should be in range of 0 to 12',
173
- // errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
174
-
175
- // },
176
- // },
177
- // },
178
- // {
179
- // type: "Control",
180
- // scope: "#/properties/proc",
181
- // config: {
182
- // layout: { xs: 0, sm: 0, md: 4, lg: 4 },
183
- // },
184
- // options: {
185
- // widget: "EmptyBox",
186
- // },
187
- // },
188
- // ],
189
- // },
190
- // },
191
- // },
192
103
  {
193
104
  type: "Control",
194
105
  scope: "#/properties/layout",
@@ -239,7 +150,6 @@ export const componentBasicUiSchema: any = (theme)=>{
239
150
  main: {
240
151
  label: "Value",
241
152
  type:"number",
242
- // freeSolo:true,
243
153
  helperText:'Number should be in range of 0 to 12',
244
154
  errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
245
155
 
@@ -262,65 +172,6 @@ export const componentBasicUiSchema: any = (theme)=>{
262
172
  },
263
173
  ],
264
174
  },
265
- // {
266
- // type: "HorizontalLayout",
267
- // config: {
268
- // layout:{xs:12,sm: 6}
269
- // },
270
- // elements: [
271
- // {
272
- // type: "Control",
273
- // scope: "#/properties/RemoveItemButton",
274
- // options: {
275
- // widget: "IconButton",
276
- // },
277
- // config: {
278
- // layout: { xs: 1, sm: 1 },
279
- // main: {
280
- // onClick: "RemoveItemButton",
281
- // size: "large",
282
- // icon: "RejectIcon",
283
- // styleDefault: true,
284
- // },
285
- // style:{
286
- // marginLeft: "-10px"
287
- // }
288
- // },
289
- // },
290
-
291
- // {
292
- // type: "Control",
293
- // scope: "#/properties/copiedElementDetails",
294
-
295
- // options: {
296
- // widget: "Box",
297
- // },
298
- // config: {
299
- // layout: { xs: 6, sm: 6 },
300
- // main: {
301
- // heading: "No element copied",
302
- // },
303
- // style: {
304
- // color: "#535557",
305
- // marginLeft: "-10px",
306
- // fontSize: "12px",
307
- // marginTop: "4px"
308
- // },
309
- // },
310
- // },
311
- // {
312
- // type: "Control",
313
- // scope: "#/properties/EmptyBox",
314
- // options: {
315
- // widget: "EmptyBox",
316
- // },
317
- // config: {
318
- // layout: { xs: 1, sm: 5 },
319
- // },
320
- // },
321
- // ]
322
- // },
323
-
324
175
  {
325
176
  type: "WrapperLayout",
326
177
  config: {
@@ -634,31 +485,6 @@ export const componentBasicUiSchema: any = (theme)=>{
634
485
  },
635
486
  ]
636
487
  },
637
- // {
638
- // type: "Control",
639
- // scope: "#/properties/pageName",
640
-
641
- // options: {
642
- // widget: "Box",
643
- // },
644
- // config: {
645
- // layout: 12,
646
- // main: {
647
- // heading: "",
648
- // },
649
- // style: {
650
- // paddingLeft: theme.spacing(3),
651
- // width:"100%",
652
- // fontSize:"10px",
653
- // color:theme.palette.grey[600],
654
- // position: "fixed",
655
- // bottom: "24px",
656
- // backgroundColor: theme.palette.background.default,
657
- // borderBottom: `1px solid ${theme.palette.common.black}29`,
658
- // borderTop: `1px solid ${theme.palette.common.black}29`,
659
- // },
660
- // },
661
- // },
662
488
  {
663
489
  type: "Control",
664
490
  scope: "#/properties/pageName",
@@ -33,27 +33,6 @@ export const PageMasterUiSchema: any = (theme) => {
33
33
  },
34
34
  },
35
35
  },
36
- // {
37
- // type: "Control",
38
- // scope: "#/properties/template",
39
-
40
- // options: {
41
- // widget: "SelectInputField",
42
- // },
43
- // config: {
44
- // layout: { xs: 6, sm: 6, md: 4, lg: 3 },
45
- // main: {
46
- // label: "Template",
47
- // options: [
48
- // { const: "template1", title: "template1" },
49
- // { const: "template2", title: "template2" },
50
- // { const: "template3", title: "template3" }
51
- // ],
52
- // color: "secondary",
53
- // required: true,
54
- // },
55
- // },
56
- // },
57
36
  {
58
37
  type: "Control",
59
38
  scope: "#/properties/label",
@@ -260,7 +239,6 @@ export const PageMasterUiSchema: any = (theme) => {
260
239
  config: {
261
240
  main: {
262
241
  icon: "FileCopyIcon",
263
- // color: "error",
264
242
  onClick: "copyPasteElement",
265
243
  styleDefault: true,
266
244
  },
@@ -432,69 +410,10 @@ export const PageMasterUiSchema: any = (theme) => {
432
410
  },
433
411
  },
434
412
  ]
435
- // }]
436
413
  },
437
414
 
438
415
  ],
439
416
  },
440
- // {
441
- // type: "HorizontalLayout",
442
- // config: {
443
- // layout:{xs:12,sm: 9}
444
- // },
445
- // elements: [
446
- // {
447
- // type: "Control",
448
- // scope: "#/properties/RemoveItemButton",
449
- // options: {
450
- // widget: "IconButton",
451
- // },
452
- // config: {
453
- // layout: { xs: 1, sm: 1 },
454
- // main: {
455
- // onClick: "RemoveItemButton",
456
- // size: "large",
457
- // icon: "RejectIcon",
458
- // styleDefault: true,
459
- // },
460
- // style:{
461
- // marginLeft: "-5px"
462
- // }
463
- // },
464
- // },
465
-
466
- // {
467
- // type: "Control",
468
- // scope: "#/properties/copiedElementDetails",
469
-
470
- // options: {
471
- // widget: "Box",
472
- // },
473
- // config: {
474
- // layout: { xs: 6, sm: 6 },
475
- // main: {
476
- // heading: "No element copied",
477
- // },
478
- // style: {
479
- // color: "#535557",
480
- // marginLeft: "-30px",
481
- // fontSize: "12px",
482
- // marginTop: "4px"
483
- // },
484
- // },
485
- // },
486
- // {
487
- // type: "Control",
488
- // scope: "#/properties/EmptyBox",
489
- // options: {
490
- // widget: "EmptyBox",
491
- // },
492
- // config: {
493
- // layout: { xs: 1, sm: 5 },
494
- // },
495
- // },
496
- // ]
497
- // },
498
417
  {
499
418
  scope: "#/properties/Remarks Container",
500
419
  type: "WrapperLayout",