impaktapps-ui-builder 0.0.99 → 0.0.101-alpha.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 (62) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1909 -1522
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +17 -17
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +0 -1
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +94 -23
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +55 -2
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +28 -21
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +10 -301
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/progressBar.d.ts +6 -1
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +50 -2
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/thoughtOfTheDay.d.ts +17 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/timer.d.ts +1 -14
  17. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +3 -0
  18. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +3 -0
  19. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +8 -2
  20. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +5 -0
  21. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +5 -0
  22. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -1
  23. package/package.json +5 -1
  24. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -0
  25. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +7 -3
  26. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +7 -2
  27. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +9 -21
  28. package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +1 -1
  29. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +18 -13
  30. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +3 -8
  31. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +22 -0
  32. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +4 -15
  33. package/src/impaktapps-ui-builder/builder/build/buildRankCard.ts +4 -10
  34. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +8 -10
  35. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +22 -0
  36. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +11 -0
  37. package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +16 -19
  38. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +13 -8
  39. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +0 -1
  40. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +103 -46
  41. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +44 -0
  42. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +9 -27
  43. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +10 -366
  44. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  45. package/src/impaktapps-ui-builder/builder/build/uischema/progressBar.ts +1 -1
  46. package/src/impaktapps-ui-builder/builder/build/uischema/rankCard.ts +1 -1
  47. package/src/impaktapps-ui-builder/builder/build/uischema/runnerBoyProgressBar.ts +1 -1
  48. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +45 -1
  49. package/src/impaktapps-ui-builder/builder/build/uischema/thoughtOfTheDay.ts +14 -0
  50. package/src/impaktapps-ui-builder/builder/build/uischema/timer.ts +2 -16
  51. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +6 -1
  52. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +424 -202
  53. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +4 -1
  54. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +479 -167
  55. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -1
  56. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +339 -111
  57. package/src/impaktapps-ui-builder/builder/services/component.ts +94 -8
  58. package/src/impaktapps-ui-builder/builder/services/event.ts +19 -4
  59. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +20 -2
  60. package/src/impaktapps-ui-builder/builder/services/utils.ts +2 -2
  61. package/src/impaktapps-ui-builder/runtime/services/events.ts +24 -20
  62. package/src/impaktapps-ui-builder/runtime/services/service.ts +151 -47
@@ -2,23 +2,20 @@ import { uploadFile } from "./uischema/file";
2
2
  import _ from "lodash";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildUploadFile = (config,componentScope)=>{
6
- const UploadFile: any = _.cloneDeep(uploadFile);
7
-
8
- UploadFile.scope = componentScope;
9
- UploadFile.config.main.label = config.label;
10
- if (config.layout) {
11
- UploadFile.config.layout = config.layout;
12
- }
13
- if(config.layout){
14
- uploadFile.config.layout = createLayoutFormat(config.layout)
15
- }
16
- if (config.style) {
17
- UploadFile.config.style = config.style;
18
- }
19
- if (config.required) {
20
- UploadFile.config.main.required = true;
21
- }
22
- UploadFile.config.main.errorMessage = config.errorMessage;
23
- return UploadFile;
5
+ export const buildUploadFile = (config, componentScope) => {
6
+ const UploadFile: any = _.cloneDeep(uploadFile);
7
+
8
+ UploadFile.scope = componentScope;
9
+ UploadFile.config.main.label = config.label;
10
+ if (config.layout) {
11
+ UploadFile.config.layout = createLayoutFormat(config.layout)
12
+ }
13
+ if (config.style) {
14
+ UploadFile.config.style = config.style;
15
+ }
16
+ if (config.required) {
17
+ UploadFile.config.main.required = true;
18
+ }
19
+ UploadFile.config.main.errorMessage = config.errorMessage;
20
+ return UploadFile;
24
21
  }
@@ -343,19 +343,18 @@ export const buildPropertiesSection = function (type: String) {
343
343
  case "RankCard":
344
344
  uiSchema.elements = [
345
345
  getInputField("rank", "Rank"),
346
- getInputField("image", "Image Url"),
347
- getInputField("title", "Card Title"),
348
- getInputField("description", "Card Description"),
349
- emptyBox("RankCardEmpty1"), emptyBox("RankCardEmpty2")];
346
+ getInputField("height", "Height"),
347
+ emptyBox("RankCardEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 })];
350
348
  break;
351
349
  case "LeaderBoard":
352
350
  uiSchema.elements = [
353
- getInputField("valueLabel", "Value Label"),
354
351
  getInputField("firstImage", "First Image url"),
355
352
  getInputField("secondImage", "Second Image url"),
356
353
  getInputField("thirdImage", "Third Image url"),
357
- emptyBox("LeaderBoardEmpty1"), emptyBox("LeaderBoardEmpty2"),
358
- getTextArea("functionCode", "Write Compare Code", false),
354
+ getInputField("nameKey", "Key for Name"),
355
+ getInputField("imageKey", "Key for Image"),
356
+ getInputField("scoreKey", "Key for comparing parameter"),
357
+ emptyBox("LeaderBoardEmpty1", {xs: 6, sm: 6, md: 0, lg: 0 }),
359
358
  ];
360
359
  break;
361
360
  case "CardSlider":
@@ -376,8 +375,9 @@ export const buildPropertiesSection = function (type: String) {
376
375
  uiSchema.elements = [
377
376
  getInputField("url", "Image Url"),
378
377
  getInputField("label", "Label"),
378
+ getInputField("titleIcon", "Unicode of Icon for title"),
379
379
  getInputField("description", "Description"),
380
- emptyBox("cardEmpty", {xs: 6, sm: 6, md: 0, lg: 0 })
380
+ emptyBox("cardEmpty", {xs: 0, sm: 0, md: 8, lg: 8 })
381
381
  ];
382
382
  break;
383
383
  case "Button":
@@ -485,6 +485,11 @@ export const buildPropertiesSection = function (type: String) {
485
485
  emptyBox("MultipleSelectEmpty2")
486
486
  ]
487
487
  break;
488
+ case "Thought":
489
+ uiSchema.elements = [
490
+ getTextArea("thought", "Today's thought", false),
491
+ ]
492
+ break;
488
493
  }
489
494
  return uiSchema;
490
495
  };
@@ -9,7 +9,6 @@ export default {
9
9
  main: {
10
10
  name: "Compare",
11
11
  variant: "contained",
12
- color: "info",
13
12
  type: "text",
14
13
  startIcon:"",
15
14
  styleDefault:false,
@@ -2,34 +2,39 @@ export default function Card(theme){
2
2
  const uiSchema = {
3
3
  type: "WrapperLayout",
4
4
  config: {
5
- main: {
6
- },
5
+ main: {},
7
6
  wrapperStyle: {
8
-
7
+ position: "relative",
8
+ top: "50%",
9
+ transform: "translateY(-50%)"
9
10
  },
10
11
  componentsBoxStyle: {
12
+ boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
11
13
  flexDirection: "row",
12
14
  flexWrap: "nowrap",
13
- width: "100%",
15
+ width: "100% !important",
14
16
  background: "transparent",
15
- border: `1.5px solid ${theme.palette.primary.main}`,
16
- borderRadius: "20px",
17
- padding: "0px 20px 0px 20px",
17
+ border: `1.5px solid ${theme.palette.primary.light}`,
18
+ borderRadius: "8px",
19
+ padding: "0px 4px",
20
+ height: "100%",
21
+ alignItems: "center",
22
+ marginLeft: "0px",
18
23
  "&: hover": {
19
- background: `${theme.palette.primary.main}`,
20
- border: `1.5px solid black`,
21
- "& p": {
22
- color: "white"
23
- }
24
- }
24
+ background: `${theme.palette.primary.main}`,
25
+ border: `1.5px solid black`,
26
+ "& p": {
27
+ color: "white",
28
+ },
29
+ },
25
30
  },
26
- layout: { xs: 12, sm: 12, md: 6, lg: 6, },
31
+ layout: { xs: 12, sm: 12, md: 6, lg: 6 },
27
32
  },
28
33
  elements: [
29
34
  {
30
35
  type: "HorizontalLayout",
31
36
  config: {
32
- layout: 8
37
+ layout: 8,
33
38
  },
34
39
  elements: [
35
40
  {
@@ -37,17 +42,16 @@ export default function Card(theme){
37
42
  config: {
38
43
  main: {
39
44
  columnSpacing: 0,
40
- gap: 0
45
+ gap: 0,
41
46
  },
42
47
  wrapperStyle: {
43
- marginTop: "4px",
44
- background: "transparent"
48
+ background: "transparent",
45
49
  },
46
50
  componentsBoxStyle: {
47
51
  flexDirection: "column",
48
52
  flexWrap: "nowrap",
49
- width: '100%',
50
- height: 'inherit',
53
+ width: "100%",
54
+ height: "inherit",
51
55
  background: "transparent",
52
56
  borderRadius: "0px",
53
57
  },
@@ -55,27 +59,80 @@ export default function Card(theme){
55
59
  },
56
60
  elements: [
57
61
  {
58
- type: "Control",
59
- scope: "#/properties/programType",
62
+ type: "WrapperLayout",
60
63
  config: {
61
64
  main: {
62
- heading: "$5000.00",
65
+ columnSpacing: 0,
66
+ gap: 0,
63
67
  },
64
- style: {
65
- color: "black",
66
- display: "flex",
67
- fontSize: { xs: "24px", md: "28px" },
68
- fontWeight: "bold",
69
- background: "inherit",
70
- justifyContent: "flex-start",
71
- width: "calc(100%+8px)",
72
- margin: "-8px",
68
+ wrapperStyle: {
69
+ background: "transparent",
70
+ },
71
+ componentsBoxStyle: {
72
+ flexDirection: "row",
73
+ flexWrap: "nowrap",
74
+ width: "100%",
75
+ height: "0",
76
+ background: "transparent",
77
+ borderRadius: "0px",
78
+ marginLeft: "-10px",
79
+ marginTop: "-8px",
80
+ justifyContent: "start",
81
+ position: "relative"
73
82
  },
74
83
  layout: 12,
75
84
  },
76
- options: {
77
- widget: "Box",
78
- },
85
+ elements: [
86
+ {
87
+ type: "Control",
88
+ scope: "#/properties/programType",
89
+ config: {
90
+ main: {
91
+ heading: "",
92
+ },
93
+ style: {
94
+ color: "black",
95
+ display: "flex",
96
+ fontSize: { xs: "24px", md: "28px" },
97
+ fontWeight: "bold",
98
+ background: "inherit",
99
+ justifyContent: "flex-start",
100
+ width: "auto",
101
+ margin: "-8px",
102
+ height: 0
103
+ },
104
+ // layout: 1,
105
+ },
106
+ options: {
107
+ widget: "Box",
108
+ },
109
+ },
110
+ {
111
+ type: "Control",
112
+ scope: "#/properties/programType",
113
+ config: {
114
+ main: {
115
+ heading: "5000.00",
116
+ },
117
+ style: {
118
+ color: "black",
119
+ display: "flex",
120
+ fontSize: { xs: "24px", md: "28px" },
121
+ fontWeight: "bold",
122
+ background: "inherit",
123
+ justifyContent: "flex-start",
124
+ width: "auto",
125
+ margin: "-8px",
126
+ position: "absolute",
127
+ left: "8px"
128
+ },
129
+ // layout: 11,
130
+ },
131
+ options: {
132
+ widget: "Box",
133
+ },
134
+ },
135
+ ],
79
136
  },
80
137
  {
81
138
  type: "Control",
@@ -90,20 +147,21 @@ export default function Card(theme){
90
147
  justifyContent: "center",
91
148
  textWrap: "wrap",
92
149
  background: "inherit",
93
- width: "calc(100%+8pc)",
150
+ width: "calc(100%+8px)",
94
151
  margin: "-8px",
95
- lineHeight: "1"
152
+ marginTop: {xs: "0px", md: "12px"},
153
+ lineHeight: "1",
96
154
  },
97
155
  layout: 12,
98
156
  },
99
-
157
+
100
158
  options: {
101
159
  widget: "Box",
102
160
  },
103
161
  },
104
- ]
162
+ ],
105
163
  },
106
- ]
164
+ ],
107
165
  },
108
166
  {
109
167
  type: "Control",
@@ -114,16 +172,16 @@ export default function Card(theme){
114
172
  },
115
173
  style: {
116
174
  containerStyle: {
117
- height: '100%',
175
+ height: "100%",
118
176
  display: "flex",
119
- justifyContent: "center"
177
+ justifyContent: "end",
120
178
  },
121
179
  imageStyle: {
122
- // width: "none",
123
- height: '100%',
180
+ width: "unset",
124
181
  fontSize: "none",
125
182
  padding: "4px",
126
- marginLeft: "8px"
183
+ margin: "0px 0px 0px 8px",
184
+ height: "64px",
127
185
  },
128
186
  },
129
187
  layout: 4,
@@ -132,7 +190,6 @@ export default function Card(theme){
132
190
  widget: "Image",
133
191
  },
134
192
  },
135
-
136
193
  ],
137
194
  };
138
195
 
@@ -35,6 +35,29 @@ export const EventSection = (theme)=>{
35
35
  },
36
36
  }
37
37
  },
38
+ {
39
+ widget: {
40
+ type: "Control",
41
+ scope: "#/properties/Paste_Event",
42
+
43
+ options: {
44
+ widget: "IconButton",
45
+ },
46
+ config: {
47
+ main: {
48
+ // color: "info",
49
+ onClick: "copyPasteElement",
50
+ size: "small",
51
+ icon: "PasteIcon",
52
+ iconLabel: "Paste",
53
+ styleDefault: true,
54
+ },
55
+ style: {
56
+ mt: "6px",
57
+ },
58
+ },
59
+ }
60
+ },
38
61
  ]
39
62
  },
40
63
  disableAction: true,
@@ -98,6 +121,27 @@ export const EventSection = (theme)=>{
98
121
  },
99
122
  },
100
123
  },
124
+ {
125
+ header: "Copy",
126
+ field: "Copy_Event",
127
+ flex: 1,
128
+ widget: {
129
+ type: "Control",
130
+ scope: "#/properties/Copy_Event",
131
+ options: {
132
+ widget: "IconButton",
133
+ },
134
+ config: {
135
+ main: {
136
+ icon: "FileCopyIcon",
137
+ // color: "error",
138
+ onClick: "copyPasteElement",
139
+ tooltipMessage: "Reject This Record",
140
+ styleDefault: true,
141
+ },
142
+ },
143
+ },
144
+ },
101
145
  ]
102
146
  }]}
103
147
  return uiSchema
@@ -8,8 +8,10 @@ export const BarGraph = {
8
8
  config: {
9
9
  layout: {xs :12,sm:12,md:12,lg:6},
10
10
  main: {
11
+ type: "BarGraph",
12
+ legendLabels: null
11
13
  },
12
- style: { containerStyle: {} }
14
+ style: { containerStyle: {},labelStyle:{margin:{}} ,barStyle:{} }
13
15
  },
14
16
  };
15
17
 
@@ -23,8 +25,9 @@ export const PieGraph = {
23
25
  layout: {xs :12,sm:12,md:12,lg:6},
24
26
  main: {
25
27
  type: "PieGraph",
28
+ legendLabels: null
26
29
  },
27
- style:{}
30
+ style:{ containerStyle: {},labelStyle:{margin:{}} ,pieStyle:{} }
28
31
  },
29
32
  };
30
33
  export const LineGraph = {
@@ -37,29 +40,9 @@ export const LineGraph = {
37
40
  layout: {xs :12,sm:12,md:12,lg:6},
38
41
  main: {
39
42
  type: "LineGraph",
40
- header: "Quartely Incentive in Thousand",
41
- bottomLabel: "Years",
42
- leftLabel: "Incentive",
43
- gridHidden: true,
44
- numHidden: false,
45
- tooltipDataKey: ["MAMA New Project", "Second", "Third"],
46
- axisLeft: true,
47
- axisBottom: true,
48
- hideLeftAxisLine: false,
49
- hideBottomAxisLine: false,
50
- legend: {
51
- labelColor: "green",
52
- direction: "row",
53
- align: "right",
54
- colorRectWidth: 20,
55
- },
56
- },
57
- style: {
58
- containerStyle: {},
59
- headerStyle: {},
60
- labelStyle: {},
61
- lineStyle: {},
43
+ legendLabels: null
62
44
  },
45
+ style: { containerStyle: {},labelStyle:{margin:{}} ,lineStyle:{} },
63
46
  },
64
47
  };
65
48
 
@@ -73,9 +56,8 @@ export const HorizontalBarGraph = {
73
56
  layout: {xs :12,sm:12,md:12,lg:6},
74
57
  main: {
75
58
  type: "HorizontalBarGraph",
59
+ legendLabels: null
76
60
  },
77
- style:{
78
-
79
- }
61
+ style:{ containerStyle: {},labelStyle:{margin:{}} ,barStyle:{} }
80
62
  },
81
63
  };