impaktapps-ui-builder 0.0.596 → 0.0.962

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 (55) hide show
  1. package/dist/impaktapps-ui-builder.es.js +509 -376
  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/buildCard.d.ts +1 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildTable.d.ts +0 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -1
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +23 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +104 -83
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +0 -1
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +1 -1
  13. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +4 -4
  14. package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
  15. package/package.json +1 -1
  16. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +6 -6
  17. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
  18. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +4 -0
  19. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +3 -1
  20. package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +1 -1
  21. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  22. package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +3 -0
  24. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +23 -29
  25. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +6 -0
  26. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +20 -12
  27. package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +16 -19
  28. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +10 -10
  29. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +98 -50
  30. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +132 -90
  32. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +11 -11
  33. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +3 -3
  34. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
  35. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +0 -1
  36. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +6 -7
  37. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  38. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +3 -3
  39. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  40. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  41. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +3 -3
  42. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +3 -3
  43. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +32 -1
  44. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +15 -31
  45. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +18 -11
  46. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +7 -16
  47. package/src/impaktapps-ui-builder/builder/services/component.ts +15 -22
  48. package/src/impaktapps-ui-builder/builder/services/event.ts +33 -7
  49. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +12 -12
  50. package/src/impaktapps-ui-builder/builder/services/utils.ts +12 -12
  51. package/src/impaktapps-ui-builder/lib/index.ts +1 -1
  52. package/src/impaktapps-ui-builder/runtime/services/events.ts +4 -5
  53. package/src/impaktapps-ui-builder/runtime/services/service.ts +61 -62
  54. package/dist/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.d.ts +0 -15
  55. package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -15
@@ -45,7 +45,7 @@ export const componentBasicUiSchema: any = (theme)=>{
45
45
  widget: "SelectInputField",
46
46
  },
47
47
  config: {
48
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
48
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
49
49
  main: {
50
50
  label: "Type",
51
51
  },
@@ -59,7 +59,7 @@ export const componentBasicUiSchema: any = (theme)=>{
59
59
  widget: "InputField",
60
60
  },
61
61
  config: {
62
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
62
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
63
63
  main: {
64
64
  label: "Name",
65
65
  options: [],
@@ -76,7 +76,7 @@ export const componentBasicUiSchema: any = (theme)=>{
76
76
  widget: "InputField",
77
77
  },
78
78
  config: {
79
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
79
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
80
80
  main: {
81
81
  label: "Label",
82
82
  options: [],
@@ -92,7 +92,7 @@ export const componentBasicUiSchema: any = (theme)=>{
92
92
  widget: "SelectInputField",
93
93
  },
94
94
  config: {
95
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
95
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
96
96
  main: {
97
97
  label: "Column Format",
98
98
 
@@ -103,7 +103,7 @@ export const componentBasicUiSchema: any = (theme)=>{
103
103
  type: "Control",
104
104
  scope: "#/properties/proc",
105
105
  config: {
106
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
106
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
107
107
  },
108
108
  options: {
109
109
  widget: "EmptyBox",
@@ -113,7 +113,7 @@ export const componentBasicUiSchema: any = (theme)=>{
113
113
  type: "Control",
114
114
  scope: "#/properties/proc",
115
115
  config: {
116
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
116
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
117
117
  },
118
118
  options: {
119
119
  widget: "EmptyBox",
@@ -134,7 +134,7 @@ export const componentBasicUiSchema: any = (theme)=>{
134
134
  widget: "SelectInputField",
135
135
  },
136
136
  config: {
137
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
137
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
138
138
  main: {
139
139
  label: "Screen Size",
140
140
 
@@ -149,7 +149,7 @@ export const componentBasicUiSchema: any = (theme)=>{
149
149
  widget: "InputField",
150
150
  },
151
151
  config: {
152
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
152
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
153
153
  main: {
154
154
  label: "Value",
155
155
  type:"number",
@@ -164,7 +164,7 @@ export const componentBasicUiSchema: any = (theme)=>{
164
164
  type: "Control",
165
165
  scope: "#/properties/proc",
166
166
  config: {
167
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
167
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
168
168
  },
169
169
  options: {
170
170
  widget: "EmptyBox",
@@ -364,17 +364,6 @@ export const componentBasicUiSchema: any = (theme)=>{
364
364
  },
365
365
  ]
366
366
  },
367
-
368
- {
369
- type: "Control",
370
- scope: "#/properties/EmptyBox",
371
- options: {
372
- widget: "EmptyBox",
373
- },
374
- config: {
375
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
376
- },
377
- },
378
367
  {
379
368
  type: "Control",
380
369
  scope: "#/properties/EmptyBox",
@@ -382,7 +371,7 @@ export const componentBasicUiSchema: any = (theme)=>{
382
371
  widget: "EmptyBox",
383
372
  },
384
373
  config: {
385
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
374
+ layout: { xs: 4, sm: 8 },
386
375
  },
387
376
  },
388
377
  {
@@ -393,7 +382,7 @@ export const componentBasicUiSchema: any = (theme)=>{
393
382
  },
394
383
 
395
384
  config: {
396
- layout: 1.8,
385
+ layout: { xs: 4, sm: 2 },
397
386
  main: {
398
387
  name: "Ok",
399
388
  startIcon: "ApproveIcon",
@@ -403,9 +392,6 @@ export const componentBasicUiSchema: any = (theme)=>{
403
392
  onClick: "okHandler",
404
393
  size: "medium",
405
394
  },
406
- style: {
407
- float: "right",
408
- },
409
395
  },
410
396
  },
411
397
  {
@@ -416,7 +402,7 @@ export const componentBasicUiSchema: any = (theme)=>{
416
402
  },
417
403
 
418
404
  config: {
419
- layout: 1.8,
405
+ layout: { xs: 4, sm: 2 },
420
406
  main: {
421
407
  name: "Save & Exit",
422
408
  startIcon: "ApproveIcon",
@@ -426,9 +412,6 @@ export const componentBasicUiSchema: any = (theme)=>{
426
412
  onClick: "saveHandler",
427
413
  size: "medium",
428
414
  },
429
- style: {
430
- float: "right",
431
- },
432
415
  },
433
416
  },
434
417
  {
@@ -500,7 +483,7 @@ export const componentBasicUiSchema: any = (theme)=>{
500
483
  height: 0,
501
484
  margin: 0,
502
485
  top: 0,
503
- right: '90px',
486
+ right: {xs: '12px', sm: '84px'},
504
487
  position: 'absolute',
505
488
  fontSize: '12px',
506
489
  cursor: 'pointer',
@@ -523,6 +506,7 @@ export const componentBasicUiSchema: any = (theme)=>{
523
506
  onClick: "backHandler"
524
507
  },
525
508
  style: {
509
+ display: {xs: 'none', sm: "flex"},
526
510
  textAlign: 'left',
527
511
  lineHeight: 1,
528
512
  height: 0,
@@ -533,7 +517,7 @@ export const componentBasicUiSchema: any = (theme)=>{
533
517
  marginLeft: '2px',
534
518
  marginRight: 0,
535
519
  top: 3,
536
- right: '20px',
520
+ right: '12px',
537
521
  position: 'absolute',
538
522
  ':hover': {
539
523
  color: theme.palette.primary.dark,
@@ -23,7 +23,7 @@ export const PageMasterUiSchema: any = (theme) => {
23
23
  widget: "InputField",
24
24
  },
25
25
  config: {
26
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
26
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
27
27
  main: {
28
28
  label: "Name",
29
29
  options: [],
@@ -42,7 +42,7 @@ export const PageMasterUiSchema: any = (theme) => {
42
42
  widget: "SelectInputField",
43
43
  },
44
44
  config: {
45
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
45
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
46
46
  main: {
47
47
  label: "Template",
48
48
  options: [
@@ -63,7 +63,7 @@ export const PageMasterUiSchema: any = (theme) => {
63
63
  widget: "InputField",
64
64
  },
65
65
  config: {
66
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
66
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
67
67
  main: {
68
68
  label: "Label",
69
69
  options: [],
@@ -72,6 +72,16 @@ export const PageMasterUiSchema: any = (theme) => {
72
72
  },
73
73
  },
74
74
  },
75
+ {
76
+ type: "Control",
77
+ scope: "#/properties/EmptyBox",
78
+ config: {
79
+ layout: { xs: 6, sm: 6, md: 0, lg: 0 },
80
+ },
81
+ options: {
82
+ widget: "EmptyBox",
83
+ },
84
+ },
75
85
  ],
76
86
  },
77
87
  {
@@ -287,7 +297,7 @@ export const PageMasterUiSchema: any = (theme) => {
287
297
  widget: "EmptyBox",
288
298
  },
289
299
  config: {
290
- layout: { xs: 0, sm: 8, md: 8, lg: 8 },
300
+ layout: { xs: 8, sm: 10 },
291
301
  }
292
302
  },
293
303
  {
@@ -298,7 +308,7 @@ export const PageMasterUiSchema: any = (theme) => {
298
308
  },
299
309
 
300
310
  config: {
301
- layout: 11.9,
311
+ layout: { xs: 4, sm: 2 },
302
312
  main: {
303
313
  name: "Save",
304
314
  startIcon: "ApproveIcon",
@@ -308,10 +318,6 @@ export const PageMasterUiSchema: any = (theme) => {
308
318
  onClick: "saveHandler",
309
319
  size: "medium",
310
320
  },
311
- style: {
312
- width: { xs: "90%", sm: "90%", md: "20%", lg: "10%" },
313
- float: "right",
314
- },
315
321
  },
316
322
  },
317
323
  {
@@ -570,7 +576,7 @@ export const PageMasterUiSchema: any = (theme) => {
570
576
  height: 0,
571
577
  margin: 0,
572
578
  top: 0,
573
- right: '82px',
579
+ right: {xs: '12px', sm: '84px'},
574
580
  position: 'absolute',
575
581
  fontSize: '12px',
576
582
  cursor: 'pointer',
@@ -583,7 +589,7 @@ export const PageMasterUiSchema: any = (theme) => {
583
589
  {
584
590
  type: "Control",
585
591
  scope: "#/properties/text",
586
-
592
+
587
593
  options: {
588
594
  widget: "Box",
589
595
  },
@@ -593,6 +599,7 @@ export const PageMasterUiSchema: any = (theme) => {
593
599
  onClick: "backHandler"
594
600
  },
595
601
  style: {
602
+ display: {xs: 'none', sm: "flex"},
596
603
  textAlign: 'left',
597
604
  lineHeight: 1,
598
605
  height: 0,
@@ -47,7 +47,7 @@ export const EventUiSchema: any = (theme) => {
47
47
  widget: "SelectInputField",
48
48
  },
49
49
  config: {
50
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
50
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
51
51
  main: {
52
52
  label: "Event Type",
53
53
  type: "text",
@@ -178,17 +178,7 @@ export const EventUiSchema: any = (theme) => {
178
178
  widget: "EmptyBox",
179
179
  },
180
180
  config: {
181
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
182
- },
183
- },
184
- {
185
- type: "Control",
186
- scope: "#/properties/EmptyBox",
187
- options: {
188
- widget: "EmptyBox",
189
- },
190
- config: {
191
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
181
+ layout: { xs: 4, sm: 8 },
192
182
  },
193
183
  },
194
184
  {
@@ -199,7 +189,7 @@ export const EventUiSchema: any = (theme) => {
199
189
  },
200
190
 
201
191
  config: {
202
- layout: 1.8,
192
+ layout: { xs: 4, sm: 2 },
203
193
  main: {
204
194
  name: "Ok",
205
195
  startIcon: "ApproveIcon",
@@ -222,7 +212,7 @@ export const EventUiSchema: any = (theme) => {
222
212
  },
223
213
 
224
214
  config: {
225
- layout: 1.8,
215
+ layout: { xs: 4, sm: 2 },
226
216
  main: {
227
217
  name: "Save & Exit",
228
218
  startIcon: "ApproveIcon",
@@ -402,7 +392,7 @@ export const EventUiSchema: any = (theme) => {
402
392
  height: 0,
403
393
  margin: 0,
404
394
  top: 0,
405
- right: '82px',
395
+ right: {xs: '12px', sm: '84px'},
406
396
  position: 'absolute',
407
397
  fontSize: '12px',
408
398
  cursor: 'pointer',
@@ -415,7 +405,7 @@ export const EventUiSchema: any = (theme) => {
415
405
  {
416
406
  type: "Control",
417
407
  scope: "#/properties/text",
418
-
408
+
419
409
  options: {
420
410
  widget: "Box",
421
411
  },
@@ -425,6 +415,7 @@ export const EventUiSchema: any = (theme) => {
425
415
  onClick: "backHandler"
426
416
  },
427
417
  style: {
418
+ display: {xs: 'none', sm: "flex"},
428
419
  textAlign: 'left',
429
420
  lineHeight: 1,
430
421
  height: 0,
@@ -8,7 +8,7 @@ import { StyleSection } from "../build/uischema/styleSection";
8
8
  import { TableSection } from "../build/uischema/tableSection";
9
9
  import { ValueTab } from "../build/uischema/valueTab";
10
10
  import { ValidationSection } from "../build/uischema/validationSections";
11
- import { getFormdataFromLocalStorage, okHandler, saveFormdataInLocalStorage, saveHandler } from "./utils";
11
+ import { getFormdataFromSessionStorage, okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
12
12
  const sectionLabels = {
13
13
  Select: ["Core", "Properties", "Value", "Event", "Style", "Validation"],
14
14
  MultipleSelect: ["Core", "Properties", "Value", "Event", "Style", "Validation"],
@@ -76,7 +76,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
76
76
  refreshPage: refreshPage,
77
77
  getFormdata: function () {
78
78
  const path = store.searchParams?.get("path");
79
- return getFormdataFromLocalStorage(path)
79
+ return getFormdataFromSessionStorage(path)
80
80
  },
81
81
  getSchema: function () {
82
82
  return ComponentSchema;
@@ -95,7 +95,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
95
95
  const rowId = dynamicData.path.split(".")[1];
96
96
  const path = store.searchParams?.get("path");
97
97
  const id = store.searchParams?.get("id");
98
- saveFormdataInLocalStorage(store.ctx.core.data, path)
98
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
99
99
  if (path) {
100
100
  const path = store.searchParams?.get("path");
101
101
  const finalPath = `${path}.elements[${rowId}]`
@@ -108,33 +108,33 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
108
108
  },
109
109
  deleteComponents: function (shouldUpdateDialog: boolean = true) {
110
110
  const path = store.searchParams?.get("path");
111
- const rowId = localStorage.getItem('rowId');
111
+ const rowId = sessionStorage.getItem('rowId');
112
112
  store.formData.elements.splice(rowId, 1);
113
- const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
113
+ const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
114
114
  const data = path ? _.get(response, path) : response;
115
115
  store.setFormdata(data);
116
116
  if (shouldUpdateDialog) {
117
117
  store.updateDialog("popUpComponentSection");
118
118
  }
119
- localStorage.removeItem('rowId');
119
+ sessionStorage.removeItem('rowId');
120
120
  },
121
121
  deleteEvent: function (shouldUpdateDialog: boolean = true) {
122
122
  const path = store.searchParams?.get("path");
123
- const rowId = localStorage.getItem('rowId');
123
+ const rowId = sessionStorage.getItem('rowId');
124
124
  store.formData.events.splice(rowId, 1);
125
- const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
125
+ const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
126
126
  store.setFormdata(_.get(response, path));
127
127
  if (shouldUpdateDialog) {
128
128
  store.updateDialog("popUpEventSection")
129
129
  }
130
- localStorage.removeItem('rowId');
130
+ sessionStorage.removeItem('rowId');
131
131
  },
132
132
  widgetAddClickHandler: function () {
133
133
  if (!Array.isArray(store.formData.elements)) {
134
134
  store.formData.elements = []
135
135
  }
136
136
  const path = store.searchParams?.get("path");
137
- saveFormdataInLocalStorage(store.ctx.core.data, path)
137
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
138
138
  const finalPath = `${path}.elements[${store.formData.elements.length}]`
139
139
  store.searchParams.set("path", finalPath)
140
140
  store.setSearchParams(store.searchParams)
@@ -145,7 +145,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
145
145
  const rowId = dynamicData.path.split(".")[1];
146
146
  const path = store.searchParams?.get("path");
147
147
  const id = store.searchParams?.get("id");
148
- saveFormdataInLocalStorage(store.ctx.core.data, path)
148
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
149
149
  const finalPath = `${path}.events[${rowId}]`
150
150
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
151
151
  },
@@ -155,7 +155,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
155
155
  if (!Array.isArray(store.formData.events)) {
156
156
  store.formData.events = []
157
157
  }
158
- saveFormdataInLocalStorage(store.ctx.core.data, path)
158
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
159
159
  const finalPath = `${path}.events[${store.formData.events.length}]`
160
160
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
161
161
  },
@@ -164,20 +164,13 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
164
164
  },
165
165
  deletePopUpComponent: function () {
166
166
  const rowId = dynamicData.path.split(".")[1];
167
- localStorage.setItem('rowId', rowId);
167
+ sessionStorage.setItem('rowId',rowId);
168
168
  store.updateDialog("popUpComponentSection");
169
169
  },
170
170
  deletePopUpEvent: function () {
171
171
  const rowId = dynamicData.path.split(".")[1];
172
- localStorage.setItem('rowId', rowId);
172
+ sessionStorage.setItem('rowId',rowId);
173
173
  store.updateDialog("popUpEventSection");
174
174
  },
175
175
  }
176
- };
177
-
178
-
179
-
180
-
181
-
182
-
183
-
176
+ };
@@ -1,7 +1,7 @@
1
1
  import { EventSchema } from "../elements/UiSchema/event/schema";
2
2
  import { EventUiSchema } from "../elements/UiSchema/event/uiSchema";
3
3
  import Component from "./component";
4
- import { okHandler, saveFormdataInLocalStorage, saveHandler } from "./utils";
4
+ import { okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
5
5
  import { APISection } from "../build/uischema/apiSection";
6
6
  import { getRadioInputField, getSelectField, getTextArea } from "../build/uischema/buildPropertiesSection";
7
7
  import { refreshSectionUiSchema } from "../build/uischema/refresh";
@@ -29,8 +29,20 @@ export default (
29
29
  if (handlerType) {
30
30
  if (handlerType === "custom") {
31
31
  uiSchema.elements[1].elements[0].elements[2] = getRadioInputField("isSync","Run in Sync",["Yes","No"])
32
- // uiSchema.elements[0].elements[0].elements[3] = emptyBox;
33
- uiSchema.elements[1].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false)
32
+ uiSchema.elements[1].elements[0].elements[3] = {
33
+ type: "Control",
34
+ scope: "#/properties/emptyBox",
35
+ options: {
36
+ widget: "EmptyBox",
37
+ },
38
+
39
+ config: {
40
+ layout: { xs: 0, sm: 6, md: 0, lg: 0 },
41
+ main: {},
42
+ style:{}
43
+ },
44
+ };
45
+ uiSchema.elements[1].elements[0].elements[4] = getTextArea("eventCode", "Write Custom Code", false)
34
46
  schema.required = ["eventType", "Handler", "eventCode"]
35
47
 
36
48
  } else if (handlerType === "api") {
@@ -38,12 +50,26 @@ export default (
38
50
  uiSchema.elements[1].elements[0].elements[3] = APISection;
39
51
  schema.required = ["eventType", "Handler", "method", "path"]
40
52
  } else if (handlerType === "inBuiltFunction") {
53
+
41
54
  uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
42
55
  { label: "RankProvider", value: "RankProvider" },
43
56
  { label: "Download File", value: "downloadFile" },
44
57
  { label: "Download Blob File", value: "downloadBlobFile" }
45
58
  ])
46
- uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
59
+ uiSchema.elements[1].elements[0].elements[3] = {
60
+ type: "Control",
61
+ scope: "#/properties/emptyBox",
62
+ options: {
63
+ widget: "EmptyBox",
64
+ },
65
+
66
+ config: {
67
+ layout: { xs: 6, sm: 6, md: 0, lg: 0 },
68
+ main: {},
69
+ style:{}
70
+ },
71
+ };
72
+ uiSchema.elements[1].elements[0].elements[4] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
47
73
  schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
48
74
  } else if (handlerType === "refresh") {
49
75
  uiSchema.elements[1].elements[0].elements[2] = emptyBox;
@@ -85,7 +111,7 @@ export default (
85
111
  if (!Array.isArray(store.formData.events)) {
86
112
  store.formData.events = []
87
113
  }
88
- saveFormdataInLocalStorage(store.ctx.core.data, path)
114
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
89
115
  const finalPath = `${path}.events[${store.formData?.events?.length}]`
90
116
  store.searchParams.set("path", finalPath)
91
117
  store.setSearchParams(store.searchParams)
@@ -94,7 +120,7 @@ export default (
94
120
  editEvent: function () {
95
121
  const rowId = dynamicData.path.split(".")[1];
96
122
  const path = store.searchParams?.get("path");
97
- saveFormdataInLocalStorage(store.ctx.core.data, path)
123
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
98
124
  const finalPath = `${path}.events[${rowId}]`
99
125
  store.searchParams.set("path", finalPath)
100
126
  store.setSearchParams(store.searchParams)
@@ -110,7 +136,7 @@ export default (
110
136
  },
111
137
  deletePopUpEvent: function(){
112
138
  const rowId = dynamicData.path.split(".")[1];
113
- localStorage.setItem('rowId',rowId);
139
+ sessionStorage.setItem('rowId',rowId);
114
140
  store.updateDialog("popUpEvent");
115
141
  }
116
142
  }
@@ -2,7 +2,7 @@ import { PageMasterSchema } from "../elements/UiSchema/PageMaster/schema";
2
2
  import { PageMasterUiSchema } from "../elements/UiSchema/PageMaster/uiSchema";
3
3
  import _ from "lodash";
4
4
  import Component from "./component";
5
- import { getFormdataFromLocalStorage, saveFormdataInLocalStorage, saveHandler } from "./utils";
5
+ import { getFormdataFromSessionStorage, saveFormdataInSessionStorage, saveHandler } from "./utils";
6
6
 
7
7
 
8
8
  interface funcParamsProps {
@@ -26,11 +26,11 @@ export default (funcParams: funcParamsProps) => {
26
26
  getFormdata: async function () {
27
27
  const id = store.searchParams?.get("id");
28
28
  const config: any = await funcParams.pageConfigProvider(id)
29
- const formData = getFormdataFromLocalStorage()
29
+ const formData = getFormdataFromSessionStorage()
30
30
  if (formData) {
31
31
  return formData;
32
32
  }
33
- saveFormdataInLocalStorage(config)
33
+ saveFormdataInSessionStorage(config)
34
34
  return config
35
35
  },
36
36
  getUiSchema: function () {
@@ -40,7 +40,7 @@ export default (funcParams: funcParamsProps) => {
40
40
  return PageMasterSchema;
41
41
  },
42
42
  backHandler: () => {
43
- localStorage.removeItem("pageFormdata")
43
+ sessionStorage.removeItem("pageFormdata")
44
44
  store.navigate("/PageMasterRecords");
45
45
  },
46
46
  onAddClickHandler: function () {
@@ -48,7 +48,7 @@ export default (funcParams: funcParamsProps) => {
48
48
  if (!Array.isArray(store.formData.elements)) {
49
49
  store.formData.elements = []
50
50
  }
51
- const response = saveFormdataInLocalStorage(store.ctx.core.data)
51
+ const response = saveFormdataInSessionStorage(store.ctx.core.data)
52
52
  if (id) {
53
53
  store.navigate(
54
54
  `/Component?path=${`elements[${response?.elements.length}]`}&id=${id}`
@@ -72,33 +72,33 @@ export default (funcParams: funcParamsProps) => {
72
72
  if (!Array.isArray(store.formData.events)) {
73
73
  store.formData.events = []
74
74
  }
75
- saveFormdataInLocalStorage(store.ctx.core.data)
75
+ saveFormdataInSessionStorage(store.ctx.core.data)
76
76
  const finalPath = `events[${store.formData.events.length}]`
77
77
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
78
78
  },
79
79
  editEvent: function () {
80
80
  const rowId = dynamicData.path.split(".")[1];
81
81
  const id = store.searchParams?.get("id");
82
- saveFormdataInLocalStorage(store.ctx.core.data)
82
+ saveFormdataInSessionStorage(store.ctx.core.data)
83
83
  const finalPath = `events[${rowId}]`
84
84
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
85
85
  },
86
86
  deleteEvent: function () {
87
- const rowId = localStorage.getItem('rowId');
87
+ const rowId = sessionStorage.getItem('rowId');
88
88
  store.formData.events.splice(rowId, 1);
89
- const response = saveFormdataInLocalStorage(store.ctx.core.data)
89
+ const response = saveFormdataInSessionStorage(store.ctx.core.data)
90
90
  store.setFormdata(response);
91
91
  store.updateDialog("popUpPageMasterEvent");
92
- localStorage.removeItem('rowId');
92
+ sessionStorage.removeItem('rowId');
93
93
  },
94
94
  deletePopUpComponent: function(){
95
95
  const rowId = dynamicData.path.split(".")[1];
96
- localStorage.setItem('rowId',rowId);
96
+ sessionStorage.setItem('rowId',rowId);
97
97
  store.updateDialog("popUpPageMasterComponent");
98
98
  },
99
99
  deletePopUpEvent: function(){
100
100
  const rowId = dynamicData.path.split(".")[1];
101
- localStorage.setItem('rowId',rowId);
101
+ sessionStorage.setItem('rowId',rowId);
102
102
  store.updateDialog("popUpPageMasterEvent");
103
103
  },
104
104
  }
@@ -1,10 +1,10 @@
1
1
  import buildConfig from "../build/buildConfig";
2
2
  import _ from "lodash";
3
3
 
4
- const clearFromLocalStorage = () => {
5
- localStorage.removeItem("pageFormdata")
4
+ const clearFromSessionStorage = () => {
5
+ sessionStorage.removeItem("pageFormdata")
6
6
  }
7
- export default clearFromLocalStorage;
7
+ export default clearFromSessionStorage;
8
8
  export const getNavigationHistory = (config: any, path: string | undefined) => {
9
9
  if (path) {
10
10
  let urlRoutes: string = config.name;
@@ -31,20 +31,20 @@ export const getNavigationHistory = (config: any, path: string | undefined) => {
31
31
  return undefined;
32
32
  }
33
33
 
34
- export const saveFormdataInLocalStorage = (formData: any, path?: string) => {
34
+ export const saveFormdataInSessionStorage = (formData: any, path?: string) => {
35
35
  let updatedFormdata: any;
36
36
  if (path) {
37
- const pageFormdata = getFormdataFromLocalStorage()
37
+ const pageFormdata = getFormdataFromSessionStorage()
38
38
  updatedFormdata = _.set(pageFormdata, path, buildConfig(formData));
39
39
  } else {
40
40
  updatedFormdata = buildConfig(formData)
41
41
  }
42
- localStorage.setItem("pageFormdata", JSON.stringify(updatedFormdata))
42
+ sessionStorage.setItem("pageFormdata", JSON.stringify(updatedFormdata))
43
43
  return updatedFormdata;
44
44
  }
45
45
 
46
- export const getFormdataFromLocalStorage = (path?: string) => {
47
- const pageFormdata = localStorage.getItem("pageFormdata") ? JSON.parse(localStorage.getItem("pageFormdata")) : undefined;
46
+ export const getFormdataFromSessionStorage = (path?: string) => {
47
+ const pageFormdata = sessionStorage.getItem("pageFormdata") ? JSON.parse(sessionStorage.getItem("pageFormdata")) : undefined;
48
48
  let returnValue: any;
49
49
  if (path) {
50
50
  returnValue = _.get(pageFormdata, path)
@@ -60,8 +60,8 @@ export const getFormdataFromLocalStorage = (path?: string) => {
60
60
  export async function saveHandler(store, service, submitHandler, pageName?: string) {
61
61
  const id = store.searchParams?.get("id");
62
62
  const path = store.searchParams?.get("path");
63
- saveFormdataInLocalStorage(store.ctx.core.data, path);
64
- const config = JSON.parse(localStorage.getItem("pageFormdata"));
63
+ saveFormdataInSessionStorage(store.ctx.core.data, path);
64
+ const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
65
65
  if (_.isEmpty(store.ctx.core.errors)) {
66
66
  try {
67
67
  const saveReturn = await submitHandler(store, service, config);
@@ -74,7 +74,7 @@ export async function saveHandler(store, service, submitHandler, pageName?: stri
74
74
 
75
75
  export const navigateHandler = (store, isSubmitted, pageName?: string | boolean) => {
76
76
  if (isSubmitted) {
77
- localStorage.removeItem("pageFormdata");
77
+ sessionStorage.removeItem("pageFormdata");
78
78
  store.navigate(pageName || -1)
79
79
  store.setNotify({
80
80
  SuccessMessage: "Submit Successfully",
@@ -92,7 +92,7 @@ export const navigateHandler = (store, isSubmitted, pageName?: string | boolean)
92
92
  export function okHandler(store) {
93
93
  const path = store.searchParams?.get("path");
94
94
  if (_.isEmpty(store.ctx.core.errors)) {
95
- saveFormdataInLocalStorage(store.ctx.core.data, path)
95
+ saveFormdataInSessionStorage(store.ctx.core.data, path)
96
96
  store.navigate(-1)
97
97
  store.setNotify({
98
98
  SuccessMessage: "Save Successfully",