impaktapps-ui-builder 0.0.101-alpha.32 → 0.0.101-alpha.334

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.
@@ -71,6 +71,12 @@ export declare const EventSchema: {
71
71
  RemoveItemButton: {
72
72
  disabled: boolean;
73
73
  };
74
+ pageName: {
75
+ path: {
76
+ label: string;
77
+ path: string;
78
+ }[];
79
+ };
74
80
  };
75
81
  required: string[];
76
82
  };
@@ -79,6 +79,12 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
79
79
  RemoveItemButton: {
80
80
  disabled: boolean;
81
81
  };
82
+ pageName: {
83
+ path: {
84
+ label: string;
85
+ path: string;
86
+ }[];
87
+ };
82
88
  };
83
89
  required: string[];
84
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.32",
3
+ "version": "0.0.101-alpha.334",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -2,22 +2,25 @@ import _ from "lodash";
2
2
  import TextInputField from "./uischema/textInputField";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildTextField = (config:any,componentScope:string) =>{
6
- const inputField: any = _.cloneDeep(TextInputField);
7
- inputField.config.main.label = config.label;
8
- if (config.style) {
9
- inputField.config.style = JSON.parse(config.style)
10
- }
11
- if (config.InputFormatingAndMasking) {
12
- inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
13
- }
14
- if (config.placeholder) {
15
- inputField.config.main.placeholder = config.placeholder;
16
- }
17
- if (config.layout) {
18
- inputField.config.layout = createLayoutFormat(config.layout)
19
- }
20
- inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
21
- inputField.scope = componentScope;
22
- return inputField;
5
+ export const buildTextField = (config: any, componentScope: string) => {
6
+ const inputField: any = _.cloneDeep(TextInputField);
7
+ inputField.config.main.label = config.label;
8
+ if (config.style) {
9
+ inputField.config.style = JSON.parse(config.style)
10
+ }
11
+ if (config.multiline) {
12
+ inputField.config.main.multiline = config.multiline === "YES" ? true : false;
13
+ }
14
+ if (config.InputFormatingAndMasking) {
15
+ inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
16
+ }
17
+ if (config.placeholder) {
18
+ inputField.config.main.placeholder = config.placeholder;
19
+ }
20
+ if (config.layout) {
21
+ inputField.config.layout = createLayoutFormat(config.layout)
22
+ }
23
+ inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
24
+ inputField.scope = componentScope;
25
+ return inputField;
23
26
  }
@@ -343,17 +343,17 @@ 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
358
  if (cellElem.type) {
359
359
  return {
@@ -363,8 +363,10 @@ const buildUiSchema = (config: any, store?: any) => {
363
363
  type: cellElem.columnFormat,
364
364
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
365
365
  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: config.filteringOptions
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
368
370
  }
369
371
  } else {
370
372
  return {
@@ -372,8 +374,10 @@ const buildUiSchema = (config: any, store?: any) => {
372
374
  type: cellElem.columnFormat,
373
375
  header: cellElem.label || cellElem.name,
374
376
  size: sizeMap[cellElem.name] || 180,
375
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
376
- columnFilterModeOptions: config.filteringOptions
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
377
381
  }
378
382
  }
379
383
 
@@ -322,7 +322,7 @@ export const buildPropertiesSection = function (type: String) {
322
322
  case "Text":
323
323
  uiSchema.elements = [
324
324
  getInputField("placeholder", "Placeholder"),
325
- emptyBox("TextEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
325
+ getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
326
326
  emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
327
327
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
328
328
  ]
@@ -4,7 +4,7 @@ export const ComponentSchema: any = {
4
4
  type: {
5
5
  // type: "string",
6
6
  oneOf: [
7
- { title: "Masked Aadhaar", const: "AadharcardText" },
7
+ { title: "Masked Aadhar Card", const: "AadharcardText" },
8
8
  { title: "Array", const: "Array" },
9
9
  { title: "Button", const: "Button" },
10
10
  { title: "Data Card", const: "card" },
@@ -204,8 +204,6 @@ export const ComponentSchema: any = {
204
204
  },
205
205
  },
206
206
  filteringOptions:{
207
- type: "array",
208
- items:{
209
207
  oneOf: [
210
208
  { const: 'fuzzy', title: 'Fuzzy' },
211
209
  { const: 'contains', title: 'Contain' },
@@ -220,7 +218,6 @@ export const ComponentSchema: any = {
220
218
  { const: 'lessThan', title: 'Less than' },
221
219
  { const: 'lessThanOrEqualTo', title: 'Less than or equal to' },
222
220
  ]
223
- },
224
221
  },
225
222
  legendLabels: {
226
223
  type: "array",
@@ -340,6 +337,9 @@ export const ComponentSchema: any = {
340
337
  { title: "Info", const: "info" },
341
338
  ]
342
339
  },
340
+ pageName: {
341
+ path: []
342
+ },
343
343
  name: {
344
344
  type: "string",
345
345
  },
@@ -407,15 +407,16 @@ export const componentBasicUiSchema: any = (theme)=>{
407
407
  config: {
408
408
  layout: 11,
409
409
  main: {
410
- heading: "Are you sure you want to delete ?",
410
+ heading: "Are you sure you want to delete this Component ?",
411
411
  },
412
412
  style:{
413
- marginTop: "-20px",
414
- fontSize: "20px",
415
413
  "&.MuiTypography-root": {
416
- padding: "10px 30px 20px 30px",
414
+ padding: "0px 20px",
417
415
  textAlign: "center",
418
- lineHeight: "1"
416
+ lineHeight: "1.2",
417
+ fontWeight: "normal",
418
+ fontSize: "18px",
419
+ marginBottom: theme.spacing(5)
419
420
  }
420
421
  }
421
422
  },
@@ -445,6 +446,8 @@ export const componentBasicUiSchema: any = (theme)=>{
445
446
  },
446
447
  style: {
447
448
  position: "absolute",
449
+ padding: "8px 0px",
450
+ fontSize: "16px",
448
451
  bottom: 0,
449
452
  left: 0,
450
453
  width: "50%",
@@ -480,6 +483,8 @@ export const componentBasicUiSchema: any = (theme)=>{
480
483
  },
481
484
  style: {
482
485
  position: "absolute",
486
+ padding: "8px 0px",
487
+ fontSize: "16px",
483
488
  bottom: 0,
484
489
  right: 0,
485
490
  width: "50%",
@@ -530,15 +535,17 @@ export const componentBasicUiSchema: any = (theme)=>{
530
535
  config: {
531
536
  layout: 11,
532
537
  main: {
533
- heading: "Are you sure you want to delete ?",
538
+ heading: "Are you sure you want to delete this Event ?",
534
539
  },
535
540
  style:{
536
- marginTop: "-20px",
537
541
  fontSize: "20px",
538
542
  "&.MuiTypography-root": {
539
- padding: "10px 30px 20px 30px",
543
+ padding: "0px 20px",
540
544
  textAlign: "center",
541
- lineHeight: "1"
545
+ lineHeight: "1.2",
546
+ fontWeight: "normal",
547
+ fontSize: "18px",
548
+ marginBottom: theme.spacing(5)
542
549
  }
543
550
  }
544
551
  },
@@ -568,6 +575,8 @@ export const componentBasicUiSchema: any = (theme)=>{
568
575
  },
569
576
  style: {
570
577
  position: "absolute",
578
+ padding: "8px 0px",
579
+ fontSize: "16px",
571
580
  bottom: 0,
572
581
  left: 0,
573
582
  width: "50%",
@@ -603,6 +612,8 @@ export const componentBasicUiSchema: any = (theme)=>{
603
612
  },
604
613
  style: {
605
614
  position: "absolute",
615
+ padding: "8px 0px",
616
+ fontSize: "16px",
606
617
  bottom: 0,
607
618
  right: 0,
608
619
  width: "50%",
@@ -623,28 +634,51 @@ export const componentBasicUiSchema: any = (theme)=>{
623
634
  },
624
635
  ]
625
636
  },
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
+ // },
626
662
  {
627
663
  type: "Control",
628
664
  scope: "#/properties/pageName",
629
665
 
630
666
  options: {
631
- widget: "Box",
667
+ widget: "Breadcrumb",
632
668
  },
633
669
  config: {
634
670
  layout: 12,
635
671
  main: {
636
- heading: "",
637
672
  },
638
673
  style: {
639
674
  paddingLeft: theme.spacing(3),
640
- width:"100%",
641
- fontSize:"10px",
642
675
  color:theme.palette.grey[600],
676
+ fontSize:"10px",
643
677
  position: "fixed",
644
678
  bottom: "24px",
645
- backgroundColor: theme.palette.background.default,
646
679
  borderBottom: `1px solid ${theme.palette.common.black}29`,
647
680
  borderTop: `1px solid ${theme.palette.common.black}29`,
681
+ backgroundColor: theme.palette.background.default,
648
682
  },
649
683
  },
650
684
  },
@@ -71,11 +71,28 @@ export const PageMasterUiSchema: any = (theme) => {
71
71
  },
72
72
  },
73
73
  },
74
+ {
75
+ type: "Control",
76
+ scope: "#/properties/programIdRequired",
77
+
78
+ options: {
79
+ widget: "RadioInputField",
80
+ },
81
+ config: {
82
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
83
+ main: {
84
+ label: "Program ID Required",
85
+ // options: ["YES", "NO"],
86
+ options: [{label: "Yes",const: "YES"}, {label: "No",const: "NO"}],
87
+ // errorMessage: "Active is not marked YES or NO",
88
+ },
89
+ },
90
+ },
74
91
  {
75
92
  type: "Control",
76
93
  scope: "#/properties/EmptyBox",
77
94
  config: {
78
- layout: { xs: 0, sm: 0, md: 4, lg: 6 },
95
+ layout: { xs: 0, sm: 6, md: 0, lg: 3 },
79
96
  },
80
97
  options: {
81
98
  widget: "EmptyBox",
@@ -161,6 +178,7 @@ export const PageMasterUiSchema: any = (theme) => {
161
178
  icon: "TablePaste",
162
179
  iconLabel: "Paste",
163
180
  styleDefault: true,
181
+ title: ""
164
182
  },
165
183
  style: {
166
184
  mt: "6px",
@@ -569,15 +587,17 @@ export const PageMasterUiSchema: any = (theme) => {
569
587
  config: {
570
588
  layout: 11,
571
589
  main: {
572
- heading: "Are you sure you want to delete ?",
590
+ heading: "Are you sure you want to delete this Component ?",
573
591
  },
574
592
  style:{
575
- marginTop: "-20px",
576
593
  fontSize: "20px",
577
594
  "&.MuiTypography-root": {
578
- padding: "10px 30px 20px 30px",
595
+ padding: "0px 20px",
579
596
  textAlign: "center",
580
- lineHeight: "1"
597
+ lineHeight: "1.2",
598
+ fontWeight: "normal",
599
+ fontSize: "18px",
600
+ marginBottom: theme.spacing(5)
581
601
  }
582
602
  }
583
603
  },
@@ -600,15 +620,15 @@ export const PageMasterUiSchema: any = (theme) => {
600
620
  layout: 6,
601
621
  main: {
602
622
  name: "No",
603
- startIcon: "ApproveIcon",
604
623
  variant: "contained",
605
- color: "info",
606
624
  type: "text",
607
625
  onClick: "deletePopUpComponent",
608
626
  size: "large",
609
627
  },
610
628
  style: {
611
629
  position: "absolute",
630
+ padding: "8px 0px",
631
+ fontSize: "16px",
612
632
  bottom: 0,
613
633
  left: 0,
614
634
  width: "50%",
@@ -636,7 +656,6 @@ export const PageMasterUiSchema: any = (theme) => {
636
656
  layout: 6,
637
657
  main: {
638
658
  name: "Yes",
639
- startIcon: "ApproveIcon",
640
659
  variant: "contained",
641
660
  color: "error",
642
661
  type: "text",
@@ -645,6 +664,8 @@ export const PageMasterUiSchema: any = (theme) => {
645
664
  },
646
665
  style: {
647
666
  position: "absolute",
667
+ padding: "8px 0px",
668
+ fontSize: "16px",
648
669
  bottom: 0,
649
670
  right: 0,
650
671
  width: "50%",
@@ -695,15 +716,17 @@ export const PageMasterUiSchema: any = (theme) => {
695
716
  config: {
696
717
  layout: 11,
697
718
  main: {
698
- heading: "Are you sure you want to delete ?",
719
+ heading: "Are you sure you want to delete this Event ?",
699
720
  },
700
721
  style:{
701
- marginTop: "-20px",
702
722
  fontSize: "20px",
703
723
  "&.MuiTypography-root": {
704
- padding: "10px 30px 20px 30px",
724
+ padding: "0px 20px",
705
725
  textAlign: "center",
706
- lineHeight: "1"
726
+ lineHeight: "1.2",
727
+ fontWeight: "normal",
728
+ fontSize: "18px",
729
+ marginBottom: theme.spacing(5)
707
730
  }
708
731
  }
709
732
  },
@@ -726,15 +749,15 @@ export const PageMasterUiSchema: any = (theme) => {
726
749
  layout: 6,
727
750
  main: {
728
751
  name: "No",
729
- startIcon: "ApproveIcon",
730
752
  variant: "contained",
731
- color: "info",
732
753
  type: "text",
733
754
  onClick: "deletePopUpEvent",
734
755
  size: "large",
735
756
  },
736
757
  style: {
737
758
  position: "absolute",
759
+ padding: "8px 0px",
760
+ fontSize: "16px",
738
761
  bottom: 0,
739
762
  left: 0,
740
763
  width: "50%",
@@ -762,7 +785,6 @@ export const PageMasterUiSchema: any = (theme) => {
762
785
  layout: 6,
763
786
  main: {
764
787
  name: "Yes",
765
- startIcon: "ApproveIcon",
766
788
  variant: "contained",
767
789
  color: "error",
768
790
  type: "text",
@@ -771,6 +793,8 @@ export const PageMasterUiSchema: any = (theme) => {
771
793
  },
772
794
  style: {
773
795
  position: "absolute",
796
+ padding: "8px 0px",
797
+ fontSize: "16px",
774
798
  bottom: 0,
775
799
  right: 0,
776
800
  width: "50%",
@@ -87,6 +87,9 @@ export const EventSchema = {
87
87
  RemoveItemButton:{
88
88
  disabled: true,
89
89
  },
90
+ pageName: {
91
+ path: [{label: "defaultLabel", path: "defaultPath"}]
92
+ },
90
93
  },
91
94
  required:["eventType","Handler"]
92
95
  }
@@ -5,26 +5,6 @@ export const EventUiSchema: any = (theme) => {
5
5
  type: "HorizontalLayout",
6
6
  heading: "Page-Events",
7
7
  elements: [
8
- // {
9
- // type: "Control",
10
- // scope: "#/properties/pageName",
11
-
12
- // options: {
13
- // widget: "Box",
14
- // },
15
- // config: {
16
- // layout: 12,
17
- // main: {
18
- // heading: " ",
19
- // },
20
- // style: {
21
- // marginLeft: theme.spacing(3),
22
- // width:"auto",
23
- // fontSize:"12px",
24
- // color:"gray",
25
- // },
26
- // },
27
- // },
28
8
  {
29
9
  type: "TabLayout",
30
10
  config: {
@@ -402,15 +382,17 @@ export const EventUiSchema: any = (theme) => {
402
382
  config: {
403
383
  layout: 11,
404
384
  main: {
405
- heading: "Are you sure you want to delete ?",
385
+ heading: "Are you sure you want to delete this Event ?",
406
386
  },
407
387
  style:{
408
- marginTop: "-20px",
409
388
  fontSize: "20px",
410
389
  "&.MuiTypography-root": {
411
- padding: "10px 30px 20px 30px",
390
+ padding: "0px 20px",
412
391
  textAlign: "center",
413
- lineHeight: "1"
392
+ lineHeight: "1.2",
393
+ fontWeight: "normal",
394
+ fontSize: "18px",
395
+ marginBottom: theme.spacing(5)
414
396
  }
415
397
  }
416
398
  },
@@ -435,13 +417,14 @@ export const EventUiSchema: any = (theme) => {
435
417
  name: "No",
436
418
  startIcon: "ApproveIcon",
437
419
  variant: "contained",
438
- color: "info",
439
420
  type: "text",
440
421
  onClick: "deletePopUpEvent",
441
422
  size: "large",
442
423
  },
443
424
  style: {
444
425
  position: "absolute",
426
+ padding: "8px 0px",
427
+ fontSize: "16px",
445
428
  bottom: 0,
446
429
  left: 0,
447
430
  width: "50%",
@@ -469,7 +452,6 @@ export const EventUiSchema: any = (theme) => {
469
452
  layout: 6,
470
453
  main: {
471
454
  name: "Yes",
472
- startIcon: "ApproveIcon",
473
455
  variant: "contained",
474
456
  color: "error",
475
457
  type: "text",
@@ -478,6 +460,8 @@ export const EventUiSchema: any = (theme) => {
478
460
  },
479
461
  style: {
480
462
  position: "absolute",
463
+ padding: "8px 0px",
464
+ fontSize: "16px",
481
465
  bottom: 0,
482
466
  right: 0,
483
467
  width: "50%",
@@ -503,23 +487,21 @@ export const EventUiSchema: any = (theme) => {
503
487
  scope: "#/properties/pageName",
504
488
 
505
489
  options: {
506
- widget: "Box",
490
+ widget: "Breadcrumb",
507
491
  },
508
492
  config: {
509
493
  layout: 12,
510
494
  main: {
511
- heading: "",
512
495
  },
513
496
  style: {
514
497
  paddingLeft: theme.spacing(3),
515
- width:"100%",
516
- fontSize:"10px",
517
498
  color:theme.palette.grey[600],
499
+ fontSize:"10px",
518
500
  position: "fixed",
519
501
  bottom: "24px",
520
- backgroundColor: theme.palette.background.default,
521
502
  borderBottom: `1px solid ${theme.palette.common.black}29`,
522
503
  borderTop: `1px solid ${theme.palette.common.black}29`,
504
+ backgroundColor: theme.palette.background.default,
523
505
  },
524
506
  },
525
507
  },