impaktapps-ui-builder 0.0.412-mtreemap.6 → 0.0.412-mtreemap.8

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.
@@ -1,402 +1,545 @@
1
1
  import { EventUiSchema } from "../event/uiSchema"
2
- export const PageMasterUiSchema: any = {
3
- type: "HorizontalLayout",
4
- elements: [
5
- {
6
- type: "WrapperLayout",
7
- config: {
8
- main: {
9
- rowSpacing: 1,
10
- header: true,
11
- },
12
- defaultStyle: true,
13
- },
14
- elements: [
15
- {
16
- type: "Control",
17
- scope: "#/properties/pageMaster",
2
+ export const PageMasterUiSchema: any = (theme) => {
3
+ const uiSchema = {
4
+ type: "HorizontalLayout",
5
+ heading: "Page Master",
6
+ elements: [
7
+ // {
8
+ // type: "WrapperLayout",
9
+ // config: {
10
+ // main: {
11
+ // rowSpacing: 1,
12
+ // header: true,
13
+ // },
14
+ // defaultStyle: true,
15
+ // },
16
+ // elements: [
17
+ // {
18
+ // type: "Control",
19
+ // scope: "#/properties/pageMaster",
18
20
 
19
- options: {
20
- widget: "Box",
21
+ // options: {
22
+ // widget: "Box",
23
+ // },
24
+ // config: {
25
+ // layout: 8,
26
+ // main: {
27
+ // heading: "Page Master",
28
+ // },
29
+ // },
30
+ // },
31
+ // {
32
+ // type: "Control",
33
+ // scope: "#/properties/Back_Button",
34
+
35
+ // options: {
36
+ // widget: "IconButton",
37
+ // },
38
+ // config: {
39
+ // layout: 3,
40
+ // main: {
41
+ // icon: "BackIcon",
42
+ // styleDefault: true,
43
+ // size: "small",
44
+ // onClick: "backHandler",
45
+ // tooltipMessage: "Back",
46
+ // },
47
+ // style: {
48
+ // float: "right",
49
+ // },
50
+ // },
51
+ // },
52
+ // ],
53
+ // },
54
+ {
55
+ type: "WrapperLayout",
56
+ config: {
57
+ main: {
58
+ // label: "Page Template",
59
+ // isAccordion: true,
21
60
  },
22
- config: {
23
- layout: 8,
24
- main: {
25
- heading: "Page Master",
26
- },
61
+ wrapperStyle: {
62
+ backgroundColor: theme.palette.background.default
27
63
  },
64
+ defaultStyle: true,
28
65
  },
29
- {
30
- type: "Control",
31
- scope: "#/properties/Back_Button",
66
+ elements: [
67
+ {
68
+ type: "Control",
69
+ scope: "#/properties/name",
32
70
 
33
- options: {
34
- widget: "IconButton",
35
- },
36
- config: {
37
- layout: 3,
38
- main: {
39
- icon: "BackIcon",
40
- styleDefault: true,
41
- size: "small",
42
- onClick: "backHandler",
43
- tooltipMessage: "Back",
71
+ options: {
72
+ widget: "InputField",
44
73
  },
45
- style: {
46
- float: "right",
74
+ config: {
75
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
76
+ main: {
77
+ label: "Name",
78
+ options: [],
79
+ color: "secondary",
80
+ errorMessage: "Name should be start with 'page_'",
81
+ helperText: 'Name should be start with "page_"',
82
+ required: true,
83
+ },
47
84
  },
48
85
  },
49
- },
50
- ],
51
- },
52
- {
53
- type: "WrapperLayout",
54
- config: {
55
- main: {
56
- label: "Page Template",
57
- divider: true,
58
- },
59
- defaultStyle: true,
60
- },
61
- elements: [
62
- {
63
- type: "Control",
64
- scope: "#/properties/name",
86
+ {
87
+ type: "Control",
88
+ scope: "#/properties/template",
65
89
 
66
- options: {
67
- widget: "InputField",
68
- },
69
- config: {
70
- layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
71
- main: {
72
- label: "Name",
73
- options: [],
74
- color: "secondary",
75
- errorMessage:"Name should be start with 'page_'",
76
- helperText:'Name should be start with "page_"',
77
- required: true,
90
+ options: {
91
+ widget: "SelectInputField",
92
+ },
93
+ config: {
94
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
95
+ main: {
96
+ label: "Template",
97
+ options: [
98
+ { const: "template1", title: "template1" },
99
+ { const: "template2", title: "template2" },
100
+ { const: "template3", title: "template3" }
101
+ ],
102
+ color: "secondary",
103
+ required: true,
104
+ },
78
105
  },
79
106
  },
80
- },
81
- {
82
- type: "Control",
83
- scope: "#/properties/template",
107
+ {
108
+ type: "Control",
109
+ scope: "#/properties/label",
84
110
 
85
- options: {
86
- widget: "SelectInputField",
87
- },
88
- config: {
89
- layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
90
- main: {
91
- label: "Template",
92
- options: [
93
- {const:"template1",title:"template1"},
94
- {const:"template2",title:"template2"},
95
- {const:"template3",title:"template3"}
96
- ],
97
- color: "secondary",
98
- required: true,
111
+ options: {
112
+ widget: "InputField",
113
+ },
114
+ config: {
115
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
116
+ main: {
117
+ label: "Label",
118
+ options: [],
119
+ color: "secondary",
120
+ required: true,
121
+ },
99
122
  },
100
123
  },
101
- }
102
- ],
103
- },
104
- {
105
- type: "TabLayout",
106
- config: {
107
- main: {
108
- tabLabels: ["Components", "events"],
109
- divider: true,
110
- },
111
- defaultStyle: true,
124
+ ],
112
125
  },
113
- elements: [
114
- {
115
- type: "WrapperLayout",
116
- config: {
117
- main: {
118
- // label: "Success Case Event",
119
- divider: true,
120
- },
121
- wrapperStyle: {
122
- border: "1px solid gray"
123
- },
126
+ {
127
+ type: "TabLayout",
128
+ config: {
129
+ main: {
130
+ tabLabels: ["Components", "events"],
131
+ divider: true,
124
132
  },
125
- elements: [
126
- {
127
- type: "Control",
128
- scope: "#/properties/heading",
129
-
130
- options: {
131
- widget: "Box",
132
- },
133
- config: {
134
- layout: 8,
135
- main: {
136
- heading: "Components Table",
137
- },
138
- style: {
139
- fontFamily: "Roboto",
140
- fontWeight: "500",
141
- paddingLeft: "-10px",
142
- fontSize: "20px",
143
- },
144
- },
133
+ defaultStyle: true,
134
+ },
135
+ elements: [
136
+ // {
137
+ // type: "WrapperLayout",
138
+ // config: {
139
+ // main: {
140
+ // // label: "Success Case Event",
141
+ // divider: true,
142
+ // },
143
+ // // wrapperStyle: {
144
+ // // border: "1px solid gray"
145
+ // // },
146
+ // },
147
+ // elements: [
148
+ {
149
+ type: "Control",
150
+ scope: "#/properties/elements",
151
+ options: {
152
+ widget: "Table",
145
153
  },
146
- {
147
- type: "Control",
148
- scope: "#/properties/AddButton",
149
- options: {
150
- widget: "IconButton",
151
- },
152
- config: {
153
- layout: 3,
154
- main: {
155
- icon: "AddIcon",
156
- styleDefault: true,
157
- size: "small",
158
- onClick: "onAddClickHandler",
159
- tooltipMessage: "Add New",
160
- },
161
- style: {
162
- float: "right",
154
+ config: {
155
+ main: {
156
+ headerIcons: {
157
+ elements: [
158
+ {
159
+ widget: {
160
+ type: "Control",
161
+ scope: "#/properties/New_Record",
162
+
163
+ options: {
164
+ widget: "IconButton",
165
+ },
166
+ config: {
167
+ main: {
168
+ // color: "info",
169
+ onClick: "onAddClickHandler",
170
+ size: "small",
171
+ icon: "AddIcon",
172
+ iconLabel: "Add New",
173
+ styleDefault: true,
174
+ },
175
+ style: {
176
+ mt: "6px",
177
+ },
178
+ },
179
+ }
180
+ },
181
+ ]
163
182
  },
164
- },
183
+ disableAction: true,
184
+ disableSelection: true,
185
+ enableDrag: true,
186
+ }
165
187
  },
166
- {
167
- type: "Control",
168
- scope: "#/properties/elements",
169
- options: {
170
- widget: "Table",
171
- },
172
- config: {
173
- main: {
174
- disableAction: true,
175
- disableSelection: true,
176
- enableDrag: true,
177
- }
178
- },
179
- elements: [
180
- {
181
- accessorKey: "name",
188
+ elements: [
189
+ {
190
+ accessorKey: "name",
182
191
 
183
- header: "Name",
184
- },
185
- {
186
- accessorKey: "type",
192
+ header: "Name",
193
+ },
194
+ {
195
+ accessorKey: "type",
187
196
 
188
- header: "Type",
189
- },
190
- {
191
- header: "Edit",
192
- field: "Reject_Records",
193
- flex: 1,
194
- widget: {
195
- type: "Control",
196
- scope: "#/properties/RejectButton",
197
- options: {
198
- widget: "IconButton",
199
- },
200
- config: {
201
- main: {
202
- icon: "EditIcon",
203
- color: "primary",
204
- onClick: "Edit_Components",
205
- tooltipMessage: "Edit This Record",
197
+ header: "Type",
198
+ },
199
+ {
200
+ header: "Edit",
201
+ field: "Reject_Records",
202
+ flex: 1,
203
+ widget: {
204
+ type: "Control",
205
+ scope: "#/properties/RejectButton",
206
+ options: {
207
+ widget: "IconButton",
208
+ },
209
+ config: {
210
+ main: {
211
+ icon: "EditIcon",
212
+ color: "primary",
213
+ onClick: "Edit_Components",
214
+ tooltipMessage: "Edit This Record",
215
+ },
206
216
  },
207
217
  },
208
218
  },
209
- },
210
- {
211
- header: "Delete",
212
- field: "Reject_Records",
213
- flex: 1,
214
- widget: {
215
- type: "Control",
216
- scope: "#/properties/RejectButton",
217
- options: {
218
- widget: "IconButton",
219
- },
220
- config: {
221
- main: {
222
- icon: "RejectIcon",
223
- color: "error",
224
- onClick: "Delete_Components",
225
- tooltipMessage: "Reject This Record",
219
+ {
220
+ header: "Delete",
221
+ field: "Reject_Records",
222
+ flex: 1,
223
+ widget: {
224
+ type: "Control",
225
+ scope: "#/properties/RejectButton",
226
+ options: {
227
+ widget: "IconButton",
228
+ },
229
+ config: {
230
+ main: {
231
+ icon: "RejectIcon",
232
+ color: "error",
233
+ onClick: "Delete_Components",
234
+ tooltipMessage: "Reject This Record",
235
+ },
226
236
  },
227
237
  },
228
- },
229
- }
230
- ]
231
- }]},
232
- {
233
- type: "WrapperLayout",
234
- config: {
235
- main: {
236
- // label: "Success Case Event",
237
- divider: true,
238
- },
239
- wrapperStyle: {
240
- border: "1px solid gray"
241
- },
238
+ }
239
+ ]
240
+ // }]
242
241
  },
243
- elements: [
244
- {
245
- type: "Control",
246
- scope: "#/properties/heading",
247
-
248
- options: {
249
- widget: "Box",
250
- },
251
- config: {
252
- layout: 8,
253
- main: {
254
- heading: "Event Table",
255
- },
256
- style: {
257
- fontFamily: "Roboto",
258
- fontWeight: "500",
259
- paddingLeft: "-10px",
260
- fontSize: "20px",
261
- },
262
- },
242
+ // {
243
+ // type: "WrapperLayout",
244
+ // config: {
245
+ // main: {
246
+ // // label: "Success Case Event",
247
+ // // divider: true,
248
+ // },
249
+ // wrapperStyle: {
250
+ // border: "1px solid gray"
251
+ // },
252
+ // },
253
+ // elements: [
254
+ // {
255
+ // type: "Control",
256
+ // scope: "#/properties/heading",
257
+
258
+ // options: {
259
+ // widget: "Box",
260
+ // },
261
+ // config: {
262
+ // layout: 8,
263
+ // main: {
264
+ // heading: "Event Table",
265
+ // },
266
+ // style: {
267
+ // fontFamily: "Roboto",
268
+ // fontWeight: "500",
269
+ // paddingLeft: "-10px",
270
+ // fontSize: "20px",
271
+ // },
272
+ // },
273
+ // },
274
+ // {
275
+ // type: "Control",
276
+ // scope: "#/properties/AddButton",
277
+ // options: {
278
+ // widget: "IconButton",
279
+ // },
280
+ // config: {
281
+ // layout: 3,
282
+ // main: {
283
+ // icon: "AddIcon",
284
+ // styleDefault: true,
285
+ // size: "small",
286
+ // onClick: "eventAddHandler",
287
+ // tooltipMessage: "Back",
288
+ // },
289
+ // style: {
290
+ // float: "right",
291
+ // },
292
+ // },
293
+ // },
294
+
295
+ {
296
+ type: "Control",
297
+ scope: "#/properties/events",
298
+ options: {
299
+ widget: "Table",
263
300
  },
264
- {
265
- type: "Control",
266
- scope: "#/properties/AddButton",
267
- options: {
268
- widget: "IconButton",
269
- },
270
- config: {
271
- layout: 3,
272
- main: {
273
- icon: "AddIcon",
274
- styleDefault: true,
275
- size: "small",
276
- onClick: "eventAddHandler",
277
- tooltipMessage: "Back",
278
- },
279
- style: {
280
- float: "right",
301
+ config: {
302
+ main: {
303
+ headerIcons: {
304
+ elements: [
305
+ {
306
+ widget: {
307
+ type: "Control",
308
+ scope: "#/properties/New_Record",
309
+
310
+ options: {
311
+ widget: "IconButton",
312
+ },
313
+ config: {
314
+ main: {
315
+ // color: "info",
316
+ onClick: "eventAddHandler",
317
+ size: "small",
318
+ icon: "AddIcon",
319
+ iconLabel: "Add New",
320
+ styleDefault: true,
321
+ },
322
+ style: {
323
+ mt: "6px",
324
+ },
325
+ },
326
+ }
327
+ },
328
+ ]
281
329
  },
330
+
331
+ disableAction: true,
332
+ disableSelection: true,
333
+ enableDrag: true,
334
+
282
335
  },
283
336
  },
284
-
285
- {
286
- type: "Control",
287
- scope: "#/properties/events",
288
- options: {
289
- widget: "Table",
337
+ elements: [
338
+
339
+ {
340
+ accessorKey: "eventType",
341
+ header: "Event Type",
290
342
  },
291
- config: {
292
- main: {
293
- disableAction: true,
294
- disableSelection: true,
295
- enableDrag: true,
296
-
297
- },
343
+ {
344
+ accessorKey: "Handler",
345
+ header: "Handler",
298
346
  },
299
- elements: [
300
-
301
- {
302
- accessorKey: "eventType",
303
- header: "Event Type",
304
- },
305
- {
306
- accessorKey: "Handler",
307
- header: "Handler",
308
- },
309
- {
310
- accessorKey: "Edit_Approve_Records",
311
- header: "Edit Widget",
312
- widget: {
313
- type: "Control",
314
- scope: "#/properties/Edit_Records",
315
- options: {
316
- widget: "IconButton",
347
+ {
348
+ accessorKey: "Edit_Approve_Records",
349
+ header: "Edit Widget",
350
+ widget: {
351
+ type: "Control",
352
+ scope: "#/properties/Edit_Records",
353
+ options: {
354
+ widget: "IconButton",
355
+ },
356
+ config: {
357
+ main: {
358
+ color: "info",
359
+ size: "small",
360
+ icon: "EditIcon",
361
+ tooltipMessage: "Edit This Record",
362
+ onClick: "editEvent",
317
363
  },
318
- config: {
319
- main: {
320
- color: "info",
321
- size: "small",
322
- icon: "EditIcon",
323
- tooltipMessage: "Edit This Record",
324
- onClick: "editEvent",
325
- },
326
- style: {
327
- color: "#3949ab",
328
- },
364
+ style: {
365
+ color: "#3949ab",
329
366
  },
330
367
  },
331
368
  },
332
- {
333
- accessorKey: "Reject_Records",
334
- header: "Delete",
335
- widget: {
336
- type: "Control",
337
- scope: "#/properties/RejectButton",
338
- options: {
339
- widget: "IconButton",
340
- },
341
- config: {
342
- main: {
343
- icon: "RejectIcon",
344
- color: "error",
345
- tooltipMessage: "Reject This Record",
346
- onClick: "deleteEvent",
347
- },
369
+ },
370
+ {
371
+ accessorKey: "Reject_Records",
372
+ header: "Delete",
373
+ widget: {
374
+ type: "Control",
375
+ scope: "#/properties/RejectButton",
376
+ options: {
377
+ widget: "IconButton",
378
+ },
379
+ config: {
380
+ main: {
381
+ icon: "RejectIcon",
382
+ color: "error",
383
+ tooltipMessage: "Reject This Record",
384
+ onClick: "deleteEvent",
348
385
  },
349
386
  },
350
387
  },
351
- ]
352
- }]
353
- },
354
-
355
- ],
356
- },
357
- {
358
- type: "Control",
359
- scope: "#/properties/btn",
360
- options: {
361
- widget: "EmptyBox",
388
+ },
389
+ ]
390
+ // }]
391
+ },
392
+
393
+ ],
362
394
  },
363
- config: {
364
- layout: { xs: 0, sm: 0, md: 8, lg: 7 },
365
- }
366
- },
367
- {
368
- type: "Control",
369
- scope: "#/properties/btn",
370
- options: {
371
- widget: "Button",
395
+ {
396
+ type: "Control",
397
+ scope: "#/properties/btn",
398
+ options: {
399
+ widget: "EmptyBox",
400
+ },
401
+ config: {
402
+ layout: { xs: 0, sm: 0, md: 8, lg: 7 },
403
+ }
372
404
  },
373
-
374
- config: {
375
- layout: 11.7,
376
- main: {
377
- name: "Save",
378
- startIcon: "ApproveIcon",
379
- variant: "contained",
380
- color: "info",
381
- type: "text",
382
- onClick: "saveHandler",
383
- size: "small",
405
+ {
406
+ type: "Control",
407
+ scope: "#/properties/btn",
408
+ options: {
409
+ widget: "Button",
384
410
  },
385
- style: {
386
- marginBottom: "8px",
387
- width:{xs:"100%",sm:"100%",md:"25%",lg:"20%"},
388
- float: "right",
411
+
412
+ config: {
413
+ layout: 11.9,
414
+ main: {
415
+ name: "Save",
416
+ startIcon: "ApproveIcon",
417
+ variant: "contained",
418
+ // color: "info",
419
+ type: "text",
420
+ onClick: "saveHandler",
421
+ size: "medium",
422
+ },
423
+ style: {
424
+ width: { xs: "90%", sm: "90%", md: "20%", lg: "10%" },
425
+ float: "right",
426
+ },
389
427
  },
390
428
  },
391
- },
392
- {
393
- type: "Control",
394
- scope: "#/properties/notify",
395
- options: {
396
- widget: "Notify",
429
+ {
430
+ type: "Control",
431
+ scope: "#/properties/notify",
432
+ options: {
433
+ widget: "Notify",
434
+ },
435
+ layout: 6,
397
436
  },
398
- layout: 6,
399
- }
400
- ]
437
+ {
438
+ type: "HorizontalLayout",
439
+ config: {
440
+ main: {
441
+ direction: 'row'
442
+ },
443
+ style: {
444
+ flexDirection: "row",
445
+ position: "absolute",
446
+ bottom: 0,
447
+ marginBottom: '-8px',
448
+ height: 'fit-content',
449
+ overflow: 'hidden',
450
+ zIndex: 1000,
451
+ width: 'inherit'
452
+ }
453
+ },
454
+ elements: [
455
+ {
456
+
457
+ type: "Control",
458
+ scope: "#/properties/FooterText",
459
+ options: {
460
+ widget: "Box",
461
+ },
462
+ config: {
463
+ main: {
464
+ heading: "Copywriter@ACT21.IO"
465
+ },
466
+ style: {
467
+ color: theme?.palette?.text.disabled || "#AFAFAF",
468
+ fontSize: '12px',
469
+ textAlign: 'center',
470
+ lineHeight: 1,
471
+ width: 'fit-content',
472
+ left: '50%',
473
+ position: 'relative',
474
+ margin: 0,
475
+ flexGrow: 1,
476
+ height: 0
477
+ }
478
+ },
479
+ },
480
+ {
481
+ type: "Control",
482
+ scope: "#/properties/backIcon",
483
+ options: {
484
+ widget: "Box",
485
+ },
486
+ config: {
487
+ main: {
488
+ iconName: 'PrevIcon',
489
+ onClick: "backHandler",
490
+ width: 'fit-content',
491
+ },
492
+ style: {
493
+ fill: theme.palette.primary.main,
494
+ width: 20,
495
+ height: 0,
496
+ margin: 0,
497
+ top: 0,
498
+ right: '82px',
499
+ position: 'absolute',
500
+ fontSize: '12px',
501
+ cursor: 'pointer',
502
+ ':hover': {
503
+ fill: theme.palette.primary.dark,
504
+ }
505
+ }
506
+ }
507
+ },
508
+ {
509
+ type: "Control",
510
+ scope: "#/properties/text",
511
+
512
+ options: {
513
+ widget: "Box",
514
+ },
515
+ config: {
516
+ main: {
517
+ heading: "Previous Page",
518
+ onClick: "backHandler"
519
+ },
520
+ style: {
521
+ textAlign: 'left',
522
+ lineHeight: 1,
523
+ height: 0,
524
+ width: 'fit-content',
525
+ color: theme.palette.primary.main,
526
+ fontSize: "12px",
527
+ cursor: 'pointer',
528
+ marginLeft: '2px',
529
+ marginRight: 0,
530
+ top: 3,
531
+ right: '12px',
532
+ position: 'absolute',
533
+ ':hover': {
534
+ color: theme.palette.primary.dark,
535
+ }
536
+ }
537
+ },
538
+ },
539
+ ]
540
+ }
541
+ ]
542
+ }
543
+ return uiSchema
401
544
  }
402
545