impaktapps-ui-builder 0.0.382-alpha.2 → 0.0.382-alpha.4

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,412 +1,411 @@
1
- // import { getAppTheme } from "@/Style/AppStyle";
2
-
3
- // const theme = getAppTheme().theme;
4
-
5
- export const PageMasterUiSchema: any = {
6
- type: "HorizontalLayout",
7
- heading: "Page Master",
8
- elements: [
9
- {
10
- type: "WrapperLayout",
11
- config: {
12
- main: {
13
- label: "Page Template",
14
- isAccordion: true,
15
- },
16
- wrapperStyle: {
17
- marginTop: '-6px',
18
- marginBottom: '-8px',
19
- },
20
- componentsBoxStyle: {
21
- marginLeft: "24px",
22
- },
23
- defaultStyle: true,
24
- },
25
- elements: [
26
- {
27
- type: "Control",
28
- scope: "#/properties/name",
29
-
30
- options: {
31
- widget: "InputField",
1
+ export const PageMasterUiSchema: any = (theme) => {
2
+ const uiSchema = {
3
+ type: "HorizontalLayout",
4
+ heading: "Page Master",
5
+ elements: [
6
+ {
7
+ type: "WrapperLayout",
8
+ config: {
9
+ main: {
10
+ label: "Page Template",
11
+ isAccordion: true,
32
12
  },
33
- config: {
34
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
35
- main: {
36
- label: "Name",
37
- options: [],
38
- color: "secondary",
39
- errorMessage: "Name should be start with 'page_'",
40
- helperText: 'Name should be start with "page_"',
41
- required: true,
42
- },
13
+ wrapperStyle: {
14
+ marginTop: '-6px',
15
+ marginBottom: '-8px',
16
+ },
17
+ componentsBoxStyle: {
18
+ marginLeft: "24px",
43
19
  },
20
+ defaultStyle: true,
44
21
  },
45
- {
46
- type: "Control",
47
- scope: "#/properties/label",
22
+ elements: [
23
+ {
24
+ type: "Control",
25
+ scope: "#/properties/name",
48
26
 
49
- options: {
50
- widget: "InputField",
51
- },
52
- config: {
53
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
54
- main: {
55
- label: "Label",
56
- options: [],
57
- color: "secondary",
58
- required: true,
27
+ options: {
28
+ widget: "InputField",
29
+ },
30
+ config: {
31
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
32
+ main: {
33
+ label: "Name",
34
+ options: [],
35
+ color: "secondary",
36
+ errorMessage: "Name should be start with 'page_'",
37
+ helperText: 'Name should be start with "page_"',
38
+ required: true,
39
+ },
59
40
  },
60
41
  },
61
- },
62
- {
63
- type: "Control",
64
- scope: "#/properties/emptyBox",
65
- options: {
66
- widget: "EmptyBox"
42
+ {
43
+ type: "Control",
44
+ scope: "#/properties/label",
45
+
46
+ options: {
47
+ widget: "InputField",
48
+ },
49
+ config: {
50
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
51
+ main: {
52
+ label: "Label",
53
+ options: [],
54
+ color: "secondary",
55
+ required: true,
56
+ },
57
+ },
67
58
  },
68
- config: {
69
- layout: { xs: 0, sm: 4 }
59
+ {
60
+ type: "Control",
61
+ scope: "#/properties/emptyBox",
62
+ options: {
63
+ widget: "EmptyBox"
64
+ },
65
+ config: {
66
+ layout: { xs: 0, sm: 4 }
67
+ }
70
68
  }
71
- }
72
- ],
73
- },
74
- {
75
- type: "TabLayout",
76
- config: {
77
- main: {
78
- tabLabels: ["Components", "events"],
79
- divider: true,
80
- },
81
- defaultStyle: true,
69
+ ],
82
70
  },
83
- elements: [
84
- {
85
- type: "Control",
86
- scope: "#/properties/elements",
87
- options: {
88
- widget: "Table",
71
+ {
72
+ type: "TabLayout",
73
+ config: {
74
+ main: {
75
+ tabLabels: ["Components", "events"],
76
+ divider: true,
89
77
  },
90
- config: {
91
- main: {
92
- headerIcons: {
93
- elements: [
94
- {
95
- widget: {
96
- type: "Control",
97
- scope: "#/properties/New_Record",
78
+ defaultStyle: true,
79
+ },
80
+ elements: [
81
+ {
82
+ type: "Control",
83
+ scope: "#/properties/elements",
84
+ options: {
85
+ widget: "Table",
86
+ },
87
+ config: {
88
+ main: {
89
+ headerIcons: {
90
+ elements: [
91
+ {
92
+ widget: {
93
+ type: "Control",
94
+ scope: "#/properties/New_Record",
98
95
 
99
- options: {
100
- widget: "IconButton",
101
- },
102
- config: {
103
- main: {
104
- color: "info",
105
- onClick: "onAddClickHandler",
106
- size: "small",
107
- icon: "AddIcon",
108
- iconLabel: "Add New",
109
- styleDefault: true,
96
+ options: {
97
+ widget: "IconButton",
110
98
  },
111
- style: {
112
- mt: "6px",
99
+ config: {
100
+ main: {
101
+ color: "info",
102
+ onClick: "onAddClickHandler",
103
+ size: "small",
104
+ icon: "AddIcon",
105
+ iconLabel: "Add New",
106
+ styleDefault: true,
107
+ },
108
+ style: {
109
+ mt: "6px",
110
+ },
113
111
  },
114
- },
115
- }
112
+ }
113
+ },
114
+ ]
115
+ },
116
+ disableAction: true,
117
+ disableSelection: true,
118
+ enableDrag: true,
119
+ }
120
+ },
121
+ elements: [
122
+ {
123
+ accessorKey: "name",
124
+
125
+ header: "Name",
126
+ },
127
+ {
128
+ accessorKey: "type",
129
+
130
+ header: "Type",
131
+ },
132
+ {
133
+ header: "Edit",
134
+ field: "Reject_Records",
135
+ flex: 1,
136
+ widget: {
137
+ type: "Control",
138
+ scope: "#/properties/RejectButton",
139
+ options: {
140
+ widget: "IconButton",
116
141
  },
117
- ]
142
+ config: {
143
+ main: {
144
+ icon: "EditIcon",
145
+ color: "primary",
146
+ onClick: "Edit_Components",
147
+ tooltipMessage: "Edit This Record",
148
+ },
149
+ },
150
+ },
118
151
  },
119
- disableAction: true,
120
- disableSelection: true,
121
- enableDrag: true,
122
- }
152
+ {
153
+ header: "Delete",
154
+ field: "Reject_Records",
155
+ flex: 1,
156
+ widget: {
157
+ type: "Control",
158
+ scope: "#/properties/RejectButton",
159
+ options: {
160
+ widget: "IconButton",
161
+ },
162
+ config: {
163
+ main: {
164
+ icon: "RejectIcon",
165
+ color: "error",
166
+ onClick: "Delete_Components",
167
+ tooltipMessage: "Reject This Record",
168
+ },
169
+ },
170
+ },
171
+ }]
123
172
  },
124
- elements: [
125
- {
126
- accessorKey: "name",
127
-
128
- header: "Name",
173
+ {
174
+ type: "Control",
175
+ scope: "#/properties/events",
176
+ options: {
177
+ widget: "Table",
129
178
  },
130
- {
131
- accessorKey: "type",
179
+ config: {
180
+ main: {
181
+ headerIcons: {
182
+ elements: [
183
+ {
184
+ widget: {
185
+ type: "Control",
186
+ scope: "#/properties/New_Record",
132
187
 
133
- header: "Type",
134
- },
135
- {
136
- header: "Edit",
137
- field: "Reject_Records",
138
- flex: 1,
139
- widget: {
140
- type: "Control",
141
- scope: "#/properties/RejectButton",
142
- options: {
143
- widget: "IconButton",
144
- },
145
- config: {
146
- main: {
147
- icon: "EditIcon",
148
- color: "primary",
149
- onClick: "Edit_Components",
150
- tooltipMessage: "Edit This Record",
151
- },
188
+ options: {
189
+ widget: "IconButton",
190
+ },
191
+ config: {
192
+ main: {
193
+ color: "info",
194
+ onClick: "eventAddHandler",
195
+ size: "small",
196
+ icon: "AddIcon",
197
+ iconLabel: "Add New",
198
+ styleDefault: true,
199
+ },
200
+ style: {
201
+ mt: "6px",
202
+ },
203
+ },
204
+ }
205
+ },
206
+ ]
152
207
  },
208
+ disableAction: true,
209
+ disableSelection: true,
210
+ enableDrag: true,
211
+
153
212
  },
154
213
  },
155
- {
156
- header: "Delete",
157
- field: "Reject_Records",
158
- flex: 1,
159
- widget: {
160
- type: "Control",
161
- scope: "#/properties/RejectButton",
162
- options: {
163
- widget: "IconButton",
214
+ elements: [
215
+
216
+ {
217
+ accessorKey: "eventType",
218
+ header: "Event Type",
219
+ },
220
+ {
221
+ accessorKey: "Handler",
222
+ header: "Handler",
223
+ },
224
+ {
225
+ accessorKey: "Edit_Approve_Records",
226
+ header: "Edit Widget",
227
+ widget: {
228
+ type: "Control",
229
+ scope: "#/properties/Edit_Records",
230
+ options: {
231
+ widget: "IconButton",
232
+ },
233
+ config: {
234
+ main: {
235
+ color: "info",
236
+ size: "small",
237
+ icon: "EditIcon",
238
+ tooltipMessage: "Edit This Record",
239
+ onClick: "editEvent",
240
+ },
241
+ style: {
242
+ color: "#3949ab",
243
+ },
244
+ },
164
245
  },
165
- config: {
166
- main: {
167
- icon: "RejectIcon",
168
- color: "error",
169
- onClick: "Delete_Components",
170
- tooltipMessage: "Reject This Record",
246
+ },
247
+ {
248
+ accessorKey: "Reject_Records",
249
+ header: "Delete",
250
+ widget: {
251
+ type: "Control",
252
+ scope: "#/properties/RejectButton",
253
+ options: {
254
+ widget: "IconButton",
255
+ },
256
+ config: {
257
+ main: {
258
+ icon: "RejectIcon",
259
+ color: "error",
260
+ tooltipMessage: "Reject This Record",
261
+ onClick: "deleteEvent",
262
+ },
171
263
  },
172
264
  },
173
265
  },
174
- }]
175
- },
176
- {
177
- type: "Control",
178
- scope: "#/properties/events",
179
- options: {
180
- widget: "Table",
266
+ ]
181
267
  },
182
- config: {
183
- main: {
184
- headerIcons: {
185
- elements: [
186
- {
187
- widget: {
188
- type: "Control",
189
- scope: "#/properties/New_Record",
190
268
 
191
- options: {
192
- widget: "IconButton",
193
- },
194
- config: {
195
- main: {
196
- color: "info",
197
- onClick: "eventAddHandler",
198
- size: "small",
199
- icon: "AddIcon",
200
- iconLabel: "Add New",
201
- styleDefault: true,
202
- },
203
- style: {
204
- mt: "6px",
205
- },
206
- },
207
- }
208
- },
209
- ]
210
- },
211
- disableAction: true,
212
- disableSelection: true,
213
- enableDrag: true,
269
+ ],
270
+ },
271
+ {
272
+ type: "Control",
273
+ scope: "#/properties/btn",
274
+ options: {
275
+ widget: "Button",
276
+ },
214
277
 
278
+ config: {
279
+ layout: 11.9,
280
+ main: {
281
+ name: "Save",
282
+ startIcon: "ApproveIcon",
283
+ variant: "contained",
284
+ color: "info",
285
+ type: "text",
286
+ onClick: "saveHandler",
287
+ size: "medium",
288
+ },
289
+ style: {
290
+ width: { xs: "90%", sm: "90%", md: "20%", lg: "10%" },
291
+ float: "right",
292
+ },
293
+ },
294
+ },
295
+ {
296
+ type: "Control",
297
+ scope: "#/properties/notify",
298
+ options: {
299
+ widget: "Notify",
300
+ },
301
+ layout: 6,
302
+ },
303
+ {
304
+ type: "HorizontalLayout",
305
+ config: {
306
+ style: {
307
+ position: "fixed",
308
+ bottom: 5,
309
+ overflow: 'visible',
310
+ margin: "0",
311
+ width: "100vw",
312
+ }
313
+ },
314
+ elements: [
315
+ {
316
+ type: "Control",
317
+ scope: "#/properties/EmptyBox",
318
+ options: {
319
+ widget: "EmptyBox",
320
+ },
321
+ config: {
322
+ layout: { xs: 0, sm: 4, md: 4, lg: 4 },
215
323
  },
216
324
  },
217
- elements: [
325
+ {
218
326
 
219
- {
220
- accessorKey: "eventType",
221
- header: "Event Type",
327
+ type: "Control",
328
+ scope: "#/properties/FooterText",
329
+ options: {
330
+ widget: "Box",
222
331
  },
223
- {
224
- accessorKey: "Handler",
225
- header: "Handler",
332
+ config: {
333
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
334
+ main: {
335
+ heading: "Copywriter@ACT21.IO"
336
+ },
337
+ style: {
338
+ color: theme?.palette?.text.disabled || "#AFAFAF",
339
+ fontSize: '12px',
340
+ }
226
341
  },
227
- {
228
- accessorKey: "Edit_Approve_Records",
229
- header: "Edit Widget",
230
- widget: {
342
+ },
343
+ {
344
+ type: "HorizontalLayout",
345
+ config: {
346
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
347
+ },
348
+ elements: [
349
+ {
350
+ type: "Control",
351
+ scope: "#/properties/EmptyBox",
352
+ options: {
353
+ widget: "EmptyBox",
354
+ },
355
+ config: {
356
+ layout: 2,
357
+ },
358
+ },
359
+ {
231
360
  type: "Control",
232
- scope: "#/properties/Edit_Records",
361
+ scope: "#/properties/backIcon",
233
362
  options: {
234
- widget: "IconButton",
363
+ widget: "Box",
235
364
  },
236
365
  config: {
366
+ layout: 1,
237
367
  main: {
238
- color: "info",
239
- size: "small",
240
- icon: "EditIcon",
241
- tooltipMessage: "Edit This Record",
242
- onClick: "editEvent",
368
+ iconName: 'PrevIcon',
369
+ onClick: "backHandler"
243
370
  },
244
371
  style: {
245
- color: "#3949ab",
246
- },
247
- },
372
+ fill: theme.palette.primary.dark,
373
+ width: 20,
374
+ height: 20,
375
+ display: 'flex',
376
+ alignItems: 'center',
377
+ justifyContent: 'center',
378
+ marginRight: '-8px',
379
+ cursor: 'pointer'
380
+ }
381
+ }
248
382
  },
249
- },
250
- {
251
- accessorKey: "Reject_Records",
252
- header: "Delete",
253
- widget: {
383
+ {
254
384
  type: "Control",
255
- scope: "#/properties/RejectButton",
385
+ scope: "#/properties/text",
386
+
256
387
  options: {
257
- widget: "IconButton",
388
+ widget: "Box",
258
389
  },
259
390
  config: {
391
+ layout: 9,
260
392
  main: {
261
- icon: "RejectIcon",
262
- color: "error",
263
- tooltipMessage: "Reject This Record",
264
- onClick: "deleteEvent",
393
+ heading: "Previous Page",
394
+ onClick: "backHandler"
265
395
  },
396
+ style: {
397
+ color: theme.palette.primary.dark,
398
+ fontSize: "12px",
399
+ cursor: 'pointer',
400
+ marginLeft: '-6px'
401
+ }
266
402
  },
267
403
  },
268
- },
269
- ]
270
- },
271
-
272
- ],
273
- },
274
- {
275
- type: "Control",
276
- scope: "#/properties/btn",
277
- options: {
278
- widget: "Button",
279
- },
280
-
281
- config: {
282
- layout: 11.9,
283
- main: {
284
- name: "Save",
285
- startIcon: "ApproveIcon",
286
- variant: "contained",
287
- color: "info",
288
- type: "text",
289
- onClick: "saveHandler",
290
- size: "medium",
291
- },
292
- style: {
293
- width: { xs: "90%", sm: "90%", md: "20%", lg: "10%" },
294
- float: "right",
295
- },
296
- },
297
- },
298
- {
299
- type: "Control",
300
- scope: "#/properties/notify",
301
- options: {
302
- widget: "Notify",
303
- },
304
- layout: 6,
305
- },
306
- // {
307
- // type: "HorizontalLayout",
308
- // config: {
309
- // style: {
310
- // position: "fixed",
311
- // bottom: 5,
312
- // overflow: 'visible',
313
- // margin: "0",
314
- // width: "100vw",
315
- // }
316
- // },
317
- // elements: [
318
- // {
319
- // type: "Control",
320
- // scope: "#/properties/EmptyBox",
321
- // options: {
322
- // widget: "EmptyBox",
323
- // },
324
- // config: {
325
- // layout: { xs: 0, sm: 4, md: 4, lg: 4 },
326
- // },
327
- // },
328
- // {
329
-
330
- // type: "Control",
331
- // scope: "#/properties/FooterText",
332
- // options: {
333
- // widget: "Box",
334
- // },
335
- // config: {
336
- // layout: { xs: 11, sm: 4, md: 4, lg: 4 },
337
- // main: {
338
- // heading: "Copywriter@ACT21.IO"
339
- // },
340
- // style: {
341
- // color: theme?.palette?.text.disabled || "#AFAFAF",
342
- // fontSize: '12px',
343
- // }
344
- // },
345
- // },
346
- // {
347
- // type: "HorizontalLayout",
348
- // config: {
349
- // layout: { xs: 11, sm: 4, md: 4, lg: 4 },
350
- // },
351
- // elements: [
352
- // {
353
- // type: "Control",
354
- // scope: "#/properties/EmptyBox",
355
- // options: {
356
- // widget: "EmptyBox",
357
- // },
358
- // config: {
359
- // layout: 2,
360
- // },
361
- // },
362
- // {
363
- // type: "Control",
364
- // scope: "#/properties/backIcon",
365
- // options: {
366
- // widget: "Box",
367
- // },
368
- // config: {
369
- // layout: 1,
370
- // main: {
371
- // iconName: 'PrevIcon',
372
- // onClick: "backHandler"
373
- // },
374
- // style: {
375
- // fill: theme.palette.primary.dark,
376
- // width: 20,
377
- // height: 20,
378
- // display: 'flex',
379
- // alignItems: 'center',
380
- // justifyContent: 'center',
381
- // marginRight: '-8px',
382
- // cursor: 'pointer'
383
- // }
384
- // }
385
- // },
386
- // {
387
- // type: "Control",
388
- // scope: "#/properties/text",
389
-
390
- // options: {
391
- // widget: "Box",
392
- // },
393
- // config: {
394
- // layout: 9,
395
- // main: {
396
- // heading: "Previous Page",
397
- // onClick: "backHandler"
398
- // },
399
- // style: {
400
- // color: theme.palette.primary.dark,
401
- // fontSize: "12px",
402
- // cursor: 'pointer',
403
- // marginLeft: '-6px'
404
- // }
405
- // },
406
- // },
407
- // ],
408
- // },
409
- // ]
410
- // }
411
- ]
404
+ ],
405
+ },
406
+ ]
407
+ }
408
+ ]
409
+ };
410
+ return uiSchema
412
411
  }