impaktapps-ui-builder 1.0.66-alpha1 → 1.0.67-alpha.1
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.
- package/dist/impaktapps-ui-builder.es.js +81 -80
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +7 -7
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +19 -7
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +59 -71
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
package/package.json
CHANGED
|
@@ -333,12 +333,25 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
336
|
-
|
|
336
|
+
const commonProperties = {
|
|
337
337
|
accessorKey: cellElem.name,
|
|
338
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
338
339
|
header: cellElem.label || cellElem.name,
|
|
339
340
|
size: sizeMap[cellElem.name] || 180,
|
|
340
|
-
|
|
341
|
-
|
|
341
|
+
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
342
|
+
columnFilterModeOptions: cellElem.filteringOptions,
|
|
343
|
+
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
344
|
+
columnKey: cellElem.columnKey
|
|
345
|
+
}
|
|
346
|
+
if (cellElem.type) {
|
|
347
|
+
const tableElem = {
|
|
348
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
349
|
+
...commonProperties,
|
|
350
|
+
...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
|
|
351
|
+
}
|
|
352
|
+
return tableElem
|
|
353
|
+
} else {
|
|
354
|
+
return { ...commonProperties }
|
|
342
355
|
}
|
|
343
356
|
})
|
|
344
357
|
} else if (config.type == "Table") {
|
|
@@ -355,7 +368,7 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
355
368
|
config.elements.filter((cellElem, elemInd) => {
|
|
356
369
|
const commonProperties = {
|
|
357
370
|
accessorKey: cellElem.name,
|
|
358
|
-
type: cellElem.columnFormat,
|
|
371
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
359
372
|
header: cellElem.label || cellElem.name,
|
|
360
373
|
size: sizeMap[cellElem.name] || 180,
|
|
361
374
|
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
@@ -376,9 +389,8 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
376
389
|
}
|
|
377
390
|
const tableElem = {
|
|
378
391
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
379
|
-
|
|
380
|
-
...
|
|
381
|
-
|
|
392
|
+
...commonProperties,
|
|
393
|
+
...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
|
|
382
394
|
}
|
|
383
395
|
rowElements.push(tableElem)
|
|
384
396
|
} else {
|
|
@@ -174,6 +174,65 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
174
174
|
disableAction: true,
|
|
175
175
|
disableSelection: true,
|
|
176
176
|
enableDrag: true,
|
|
177
|
+
action: [
|
|
178
|
+
{
|
|
179
|
+
type: "Control",
|
|
180
|
+
scope: "#/properties/RejectButton",
|
|
181
|
+
options: {
|
|
182
|
+
widget: "Button",
|
|
183
|
+
},
|
|
184
|
+
config: {
|
|
185
|
+
main: {
|
|
186
|
+
startIcon: "EditIcon",
|
|
187
|
+
onClick: "Edit_Components",
|
|
188
|
+
tooltipMessage: "Edit This Record",
|
|
189
|
+
name: "Edit"
|
|
190
|
+
},
|
|
191
|
+
style: {
|
|
192
|
+
fill: theme.palette.primary.main,
|
|
193
|
+
"& :hover": {
|
|
194
|
+
fill: theme.palette.primary.dark,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
type: "Control",
|
|
201
|
+
scope: "#/properties/RejectButton",
|
|
202
|
+
options: {
|
|
203
|
+
widget: "Button",
|
|
204
|
+
},
|
|
205
|
+
config: {
|
|
206
|
+
main: {
|
|
207
|
+
startIcon: "Bin",
|
|
208
|
+
onClick: "deletePopUpComponent",
|
|
209
|
+
tooltipMessage: "Reject This Record",
|
|
210
|
+
name: "Delete"
|
|
211
|
+
},
|
|
212
|
+
style: {
|
|
213
|
+
fill: theme.palette.primary.main,
|
|
214
|
+
"& :hover": {
|
|
215
|
+
fill: theme.palette.primary.dark,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: "Control",
|
|
222
|
+
scope: "#/properties/Copy_Component",
|
|
223
|
+
options: {
|
|
224
|
+
widget: "IconButton",
|
|
225
|
+
},
|
|
226
|
+
config: {
|
|
227
|
+
main: {
|
|
228
|
+
startIcon: "FileCopyIcon",
|
|
229
|
+
onClick: "copyPasteElement",
|
|
230
|
+
styleDefault: true,
|
|
231
|
+
name: "Copy"
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
]
|
|
177
236
|
}
|
|
178
237
|
},
|
|
179
238
|
elements: [
|
|
@@ -189,77 +248,6 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
189
248
|
size: 300,
|
|
190
249
|
type: "string"
|
|
191
250
|
},
|
|
192
|
-
{
|
|
193
|
-
header: "Edit",
|
|
194
|
-
field: "Reject_Records",
|
|
195
|
-
size: 150,
|
|
196
|
-
type: "action",
|
|
197
|
-
widget: {
|
|
198
|
-
type: "Control",
|
|
199
|
-
scope: "#/properties/RejectButton",
|
|
200
|
-
options: {
|
|
201
|
-
widget: "IconButton",
|
|
202
|
-
},
|
|
203
|
-
config: {
|
|
204
|
-
main: {
|
|
205
|
-
icon: "TableEditIcon",
|
|
206
|
-
onClick: "Edit_Components",
|
|
207
|
-
tooltipMessage: "Edit This Record",
|
|
208
|
-
},
|
|
209
|
-
style: {
|
|
210
|
-
fill: theme.palette.primary.main,
|
|
211
|
-
"& :hover": {
|
|
212
|
-
fill: theme.palette.primary.dark,
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
header: "Delete",
|
|
220
|
-
field: "Reject_Records",
|
|
221
|
-
size: 150,
|
|
222
|
-
type: "action",
|
|
223
|
-
widget: {
|
|
224
|
-
type: "Control",
|
|
225
|
-
scope: "#/properties/RejectButton",
|
|
226
|
-
options: {
|
|
227
|
-
widget: "IconButton",
|
|
228
|
-
},
|
|
229
|
-
config: {
|
|
230
|
-
main: {
|
|
231
|
-
icon: "Bin",
|
|
232
|
-
onClick: "deletePopUpComponent",
|
|
233
|
-
tooltipMessage: "Reject This Record",
|
|
234
|
-
},
|
|
235
|
-
style: {
|
|
236
|
-
fill: theme.palette.primary.main,
|
|
237
|
-
"& :hover": {
|
|
238
|
-
fill: theme.palette.primary.dark,
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
header: "Copy",
|
|
246
|
-
field: "Copy_Component",
|
|
247
|
-
flex: 1,
|
|
248
|
-
widget: {
|
|
249
|
-
type: "Control",
|
|
250
|
-
scope: "#/properties/Copy_Component",
|
|
251
|
-
options: {
|
|
252
|
-
widget: "IconButton",
|
|
253
|
-
},
|
|
254
|
-
config: {
|
|
255
|
-
main: {
|
|
256
|
-
icon: "FileCopyIcon",
|
|
257
|
-
onClick: "copyPasteElement",
|
|
258
|
-
styleDefault: true,
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
251
|
]
|
|
264
252
|
},
|
|
265
253
|
{
|
|
@@ -70,7 +70,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
70
70
|
|
|
71
71
|
const parentObj = _.get(currentConfig, parentPath)
|
|
72
72
|
|
|
73
|
-
if(parentObj?.type === "Table"){
|
|
73
|
+
if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
|
|
74
74
|
UiSchema.elements[0].elements[0].elements[4] =
|
|
75
75
|
{
|
|
76
76
|
type: "Control",
|
|
@@ -80,7 +80,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
80
80
|
const config = pageData?.config;
|
|
81
81
|
const uiSchema = pageData?.uiSchema;
|
|
82
82
|
const event = new CustomEvent('pageNameChanged', {
|
|
83
|
-
detail: { pageName: config.label
|
|
83
|
+
detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
|
|
84
84
|
});
|
|
85
85
|
window.dispatchEvent(event)
|
|
86
86
|
const theme = funcParams?.store?.theme?.myTheme;
|