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

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