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

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