impaktapps-ui-builder 0.0.382-alpha.3 → 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,341 +1,375 @@
1
- export const componentBasicUiSchema: any = {
2
- type: "HorizontalLayout",
3
- elements: [
4
- {
5
- type: "WrapperLayout",
6
- config: {
7
- main: {
8
- rowSpacing: 1,
9
- header:true
10
- },
11
- defaultStyle:true
12
- },
13
- elements: [
14
-
15
- {
16
- type: "Control",
17
- scope: "#/properties/Component",
1
+ export const componentBasicUiSchema: any = (theme) => {
2
+ const uiSchema = {
3
+ type: "HorizontalLayout",
4
+ heading: "Component",
5
+ elements: [
6
+ // {
7
+ // type: "WrapperLayout",
8
+ // config: {
9
+ // main: {
10
+ // rowSpacing: 1,
11
+ // header:true
12
+ // },
13
+ // defaultStyle:true
14
+ // },
15
+ // elements: [
18
16
 
19
- options: {
20
- widget: "Box",
21
- },
22
- config: {
23
- layout: {xs:12,sm:12,md:2},
24
- main: {
25
- heading: "Component",
26
- },
27
- style:{
28
- "float":"left",
29
- }
30
- },
31
- },
32
-
33
- {
34
- type: "Control",
35
- scope: "#/properties/pageName",
36
-
37
- options: {
38
- widget: "Box",
39
- },
40
- config: {
41
- layout: {xs:7,sm:7,md:9},
42
- main: {
43
- heading: " ",
44
- },
45
- style: {
46
- float: "right",
47
- width:"auto",
48
- fontSize:"12px",
49
- color:"gray",
50
- paddingTop:"10px"
51
- },
52
- },
53
- },
54
-
55
- {
56
- type: "Control",
57
- scope: "#/properties/Back_Button",
58
-
59
- options: {
60
- widget: "IconButton",
61
- },
62
- config: {
63
- layout: {xs:2,sm:2,md:0.5},
64
- main: {
65
- icon: "BackIcon",
66
- styleDefault: true,
67
- size: "small",
68
- onClick: "backHandler",
69
- tooltipMessage: "Back",
70
- },
71
- style: {
72
- float: "right",
73
- },
17
+ // {
18
+ // type: "Control",
19
+ // scope: "#/properties/Component",
20
+
21
+ // options: {
22
+ // widget: "Box",
23
+ // },
24
+ // config: {
25
+ // layout: {xs:12,sm:12,md:2},
26
+ // main: {
27
+ // heading: "Component",
28
+ // },
29
+ // style:{
30
+ // "float":"left",
31
+ // }
32
+ // },
33
+ // },
34
+
35
+ // {
36
+ // type: "Control",
37
+ // scope: "#/properties/pageName",
38
+
39
+ // options: {
40
+ // widget: "Box",
41
+ // },
42
+ // config: {
43
+ // layout: {xs:7,sm:7,md:9},
44
+ // main: {
45
+ // heading: " ",
46
+ // },
47
+ // style: {
48
+ // float: "right",
49
+ // width:"auto",
50
+ // fontSize:"12px",
51
+ // color:"gray",
52
+ // paddingTop:"10px"
53
+ // },
54
+ // },
55
+ // },
56
+
57
+ // {
58
+ // type: "Control",
59
+ // scope: "#/properties/Back_Button",
60
+
61
+ // options: {
62
+ // widget: "IconButton",
63
+ // },
64
+ // config: {
65
+ // layout: {xs:2,sm:2,md:0.5},
66
+ // main: {
67
+ // icon: "BackIcon",
68
+ // styleDefault: true,
69
+ // size: "small",
70
+ // onClick: "backHandler",
71
+ // tooltipMessage: "Back",
72
+ // },
73
+ // style: {
74
+ // float: "right",
75
+ // },
76
+ // },
77
+ // },
78
+
79
+ // ],
80
+ // },
81
+ {
82
+ type: "TabLayout",
83
+ config: {
84
+ main: {
85
+ tabLabels: ["Core"],
86
+ defaultStyle: true,
87
+ id: `component`
74
88
  },
75
89
  },
76
-
77
- ],
78
- },
79
- {
80
- type: "TabLayout",
81
- config: {
82
- main: {
83
- tabLabels: ["Core"],
84
- defaultStyle: true,
85
- id:`component`
86
- },
87
- },
88
90
 
89
- elements: [
90
- {
91
- type: "HorizontalLayout",
92
- elements: [
93
- {
94
- type: "Control",
95
- scope: "#/properties/type",
91
+ elements: [
92
+ {
93
+ type: "HorizontalLayout",
94
+ elements: [
95
+ {
96
+ type: "Control",
97
+ scope: "#/properties/type",
96
98
 
97
- options: {
98
- widget: "SelectInputField",
99
- },
100
- config: {
101
- layout: { xs: 12, sm: 12, md: 6, lg: 6 },
102
- main: {
103
- label: "Type",
99
+ options: {
100
+ widget: "SelectInputField",
101
+ },
102
+ config: {
103
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
104
+ main: {
105
+ label: "Type",
106
+ },
104
107
  },
105
108
  },
106
- },
107
- {
108
- type: "Control",
109
- scope: "#/properties/name",
109
+ {
110
+ type: "Control",
111
+ scope: "#/properties/name",
110
112
 
111
- options: {
112
- widget: "InputField",
113
- },
114
- config: {
115
- layout: {
116
- xs: 12,
117
- sm: 12,
118
- md: 6,
119
- lg: 6,
113
+ options: {
114
+ widget: "InputField",
120
115
  },
121
- main: {
122
- label: "Name",
123
- options: [],
124
- color: "secondary",
125
- required: true,
116
+ config: {
117
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
118
+ main: {
119
+ label: "Name",
120
+ options: [],
121
+ color: "secondary",
122
+ required: true,
123
+ },
126
124
  },
127
125
  },
128
- },
129
- {
130
- type: "Control",
131
- scope: "#/properties/label",
126
+ {
127
+ type: "Control",
128
+ scope: "#/properties/label",
132
129
 
133
- options: {
134
- widget: "InputField",
135
- },
136
- config: {
137
- layout: {
138
- xs: 12,
139
- sm: 12,
140
- md: 6,
141
- lg: 6,
130
+ options: {
131
+ widget: "InputField",
142
132
  },
143
- main: {
144
- label: "Label",
145
- options: [],
146
- color: "secondary",
147
- required: true,
133
+ config: {
134
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
135
+ main: {
136
+ label: "Label",
137
+ options: [],
138
+ color: "secondary",
139
+ required: true,
140
+ },
148
141
  },
149
142
  },
150
- },
151
-
152
- {
153
- type: "Control",
154
- scope: "#/properties/proc",
155
- config: {
156
- layout: { xs: 11, sm: 11, md: 6, lg: 6 },
157
- },
158
- options: {
159
- widget: "EmptyBox",
160
- },
161
- },
162
- {
163
- type: "Control",
164
- scope: "#/properties/layout",
165
- layout: 11.5,
166
- options: {
167
- detail: {
168
- type: "HorizontalLayout",
169
- elements: [
170
- {
171
- type: "Control",
172
- scope: "#/properties/key",
173
- options: {
174
- widget: "SelectInputField",
175
- },
176
- config: {
177
- layout: {
178
- xs: 11,
179
- sm: 11,
180
- md: 5.5,
181
- lg: 5.5,
143
+ {
144
+ type: "HorizontalLayout",
145
+ scope: "#/properties/layout",
146
+ layout: 12,
147
+ options: {
148
+ detail: {
149
+ elements: [
150
+ {
151
+ type: "Control",
152
+ scope: "#/properties/key",
153
+ options: {
154
+ widget: "SelectInputField",
182
155
  },
183
- main: {
184
- label: "Screen Size",
185
-
156
+ config: {
157
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
158
+ main: {
159
+ label: "Screen Size",
160
+
161
+ },
186
162
  },
187
163
  },
188
- },
189
- {
190
- type: "Control",
191
- scope: "#/properties/value",
164
+ {
165
+ type: "Control",
166
+ scope: "#/properties/value",
192
167
 
193
- options: {
194
- widget: "InputField",
195
- },
196
- config: {
197
- layout: {
198
- xs: 11,
199
- sm: 11,
200
- md: 5.5,
201
- lg: 5.5,
168
+ options: {
169
+ widget: "InputField",
202
170
  },
203
- main: {
204
- label: "Value",
205
- type:"number",
206
- // freeSolo:true,
207
- helperText:'Number should be in range of 0 to 12',
208
- errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
209
-
171
+ config: {
172
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
173
+ main: {
174
+ label: "Value",
175
+ type: "number",
176
+ // freeSolo:true,
177
+ helperText: 'Number should be in range of 0 to 12',
178
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
179
+
180
+ },
210
181
  },
211
182
  },
212
- },
213
- ],
183
+ {
184
+ type: "Control",
185
+ scope: "#/properties/emptyBox",
186
+ options: {
187
+ widget: "EmptyBox"
188
+ },
189
+ config: {
190
+ layout: { xs: 0, sm: 4 }
191
+ }
192
+ }
193
+ ],
194
+ },
214
195
  },
215
196
  },
216
- },
217
- ],
218
- },
219
- ],
220
- },
221
-
222
- {
223
- type: "Control",
224
- scope: "#/properties/proc",
225
- config: {
226
- layout: { xs: 11, sm: 11, md: 6, lg: 6 },
227
- },
228
- options: {
229
- widget: "EmptyBox",
230
- },
231
- },
232
- {
233
- type: "Control",
234
- scope: "#/properties/btn",
235
- options: {
236
- widget: "Button",
197
+ ],
198
+ },
199
+ ],
237
200
  },
238
-
239
- config: {
240
- layout: {
241
- xs: 11,
242
- sm: 11,
243
- md: 2.5,
244
- lg: 2.5,
245
- },
246
- main: {
247
- name: "Ok",
248
- startIcon: "ApproveIcon",
249
- variant: "contained",
250
- color: "info",
251
- type: "text",
252
- onClick: "okHandler",
253
- size: "small",
254
- },
255
- style: {
256
- marginBottom: "8px",
257
- float: "right",
201
+ {
202
+ type: "Control",
203
+ scope: "#/properties/btn",
204
+ options: {
205
+ widget: "Button",
258
206
  },
259
- },
260
- },
261
- {
262
- type: "Control",
263
- scope: "#/properties/btnSubmit",
264
- options: {
265
- widget: "Button",
266
- },
267
207
 
268
- config: {
269
- layout: {
270
- xs: 11,
271
- sm: 11,
272
- md: 2.5,
273
- lg: 2.5,
208
+ config: {
209
+ layout: {
210
+ xs: 11,
211
+ sm: 11,
212
+ md: 2.5,
213
+ lg: 2.5,
214
+ },
215
+ main: {
216
+ name: "Ok",
217
+ startIcon: "ApproveIcon",
218
+ variant: "contained",
219
+ color: "info",
220
+ type: "text",
221
+ onClick: "okHandler",
222
+ size: "small",
223
+ },
224
+ style: {
225
+ marginBottom: "8px",
226
+ float: "right",
227
+ },
274
228
  },
275
- main: {
276
- name: "Save & Exit",
277
- startIcon: "ApproveIcon",
278
- variant: "contained",
279
- color: "info",
280
- type: "text",
281
- onClick: "saveHandler",
282
- size: "small",
229
+ },
230
+ {
231
+ type: "Control",
232
+ scope: "#/properties/btnSubmit",
233
+ options: {
234
+ widget: "Button",
283
235
  },
284
- style: {
285
- marginBottom: "8px",
286
- float: "right",
236
+
237
+ config: {
238
+ layout: {
239
+ xs: 11,
240
+ sm: 11,
241
+ md: 2.5,
242
+ lg: 2.5,
243
+ },
244
+ main: {
245
+ name: "Save & Exit",
246
+ startIcon: "ApproveIcon",
247
+ variant: "contained",
248
+ color: "info",
249
+ type: "text",
250
+ onClick: "saveHandler",
251
+ size: "small",
252
+ },
253
+ style: {
254
+ marginBottom: "8px",
255
+ float: "right",
256
+ },
287
257
  },
288
258
  },
289
- },
290
- {
291
- type: "Control",
292
- scope: "#/properties/notify",
293
- options: {
294
- widget: "Notify",
259
+ {
260
+ type: "Control",
261
+ scope: "#/properties/notify",
262
+ options: {
263
+ widget: "Notify",
264
+ },
265
+ layout: 6,
295
266
  },
296
- layout: 6,
297
- }
298
- ],
299
- };
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
267
+ {
268
+ type: "HorizontalLayout",
269
+ config: {
270
+ style: {
271
+ position: "fixed",
272
+ bottom: 5,
273
+ overflow: 'visible',
274
+ margin: "0",
275
+ width: "100vw",
276
+ }
277
+ },
278
+ elements: [
279
+ {
280
+ type: "Control",
281
+ scope: "#/properties/EmptyBox",
282
+ options: {
283
+ widget: "EmptyBox",
284
+ },
285
+ config: {
286
+ layout: { xs: 0, sm: 4, md: 4, lg: 4 },
287
+ },
288
+ },
289
+ {
316
290
 
317
- // {
318
- // type: "Control",
319
- // scope: "#/properties/homeBtn",
320
-
321
- // options: {
322
- // widget: "Button",
323
- // },
324
- // config: {
325
- // layout: {xs:2,sm:2,md:1},
326
- // main: {
327
- // name: "🏠",
328
- // },
329
- // style: {
330
- // marginRight:'auto',
331
- // marginLeft:"auto",
332
- // width:"20px",
291
+ type: "Control",
292
+ scope: "#/properties/FooterText",
293
+ options: {
294
+ widget: "Box",
295
+ },
296
+ config: {
297
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
298
+ main: {
299
+ heading: "Copywriter@ACT21.IO"
300
+ },
301
+ style: {
302
+ color: theme?.palette?.text.disabled || "#AFAFAF",
303
+ fontSize: '12px',
304
+ }
305
+ },
306
+ },
307
+ {
308
+ type: "HorizontalLayout",
309
+ config: {
310
+ layout: { xs: 11, sm: 4, md: 4, lg: 4 },
311
+ },
312
+ elements: [
313
+ {
314
+ type: "Control",
315
+ scope: "#/properties/EmptyBox",
316
+ options: {
317
+ widget: "EmptyBox",
318
+ },
319
+ config: {
320
+ layout: 2,
321
+ },
322
+ },
323
+ {
324
+ type: "Control",
325
+ scope: "#/properties/backIcon",
326
+ options: {
327
+ widget: "Box",
328
+ },
329
+ config: {
330
+ layout: 1,
331
+ main: {
332
+ iconName: 'PrevIcon',
333
+ onClick: "backHandler"
334
+ },
335
+ style: {
336
+ fill: theme.palette.primary.dark,
337
+ width: 20,
338
+ height: 20,
339
+ display: 'flex',
340
+ alignItems: 'center',
341
+ justifyContent: 'center',
342
+ marginRight: '-8px',
343
+ cursor: 'pointer'
344
+ }
345
+ }
346
+ },
347
+ {
348
+ type: "Control",
349
+ scope: "#/properties/text",
333
350
 
334
- // // background:"inherit",
335
- // // boxShadow:"none",
336
- // float:"left",
337
- // borderRadius:"50%"
338
-
339
- // },
340
- // },
341
- // },
351
+ options: {
352
+ widget: "Box",
353
+ },
354
+ config: {
355
+ layout: 9,
356
+ main: {
357
+ heading: "Previous Page",
358
+ onClick: "backHandler"
359
+ },
360
+ style: {
361
+ color: theme.palette.primary.dark,
362
+ fontSize: "12px",
363
+ cursor: 'pointer',
364
+ marginLeft: '-6px'
365
+ }
366
+ },
367
+ },
368
+ ],
369
+ },
370
+ ]
371
+ }
372
+ ],
373
+ };
374
+ return uiSchema
375
+ }