impaktapps-ui-builder 0.0.364 → 0.0.365
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 +45 -3
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +16 -8
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +22 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +14 -0
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
16
16
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
|
|
17
17
|
};
|
|
18
18
|
if (config.ColumnResizingAvailable) {
|
|
19
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
19
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true
|
|
20
20
|
};
|
|
21
21
|
if (config.DragAvailable) {
|
|
22
22
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
|
|
@@ -66,14 +66,14 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
69
|
-
if (configObj.type === "Select"
|
|
69
|
+
if (configObj.type === "Select") {
|
|
70
70
|
schema.properties[configObj.name] = {
|
|
71
71
|
oneOf: configObj.value.map((e) => {
|
|
72
72
|
return { const: e.value, title: e.label }
|
|
73
73
|
})
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
else if (configObj.type === "MultipleSelect"
|
|
76
|
+
else if (configObj.type === "MultipleSelect") {
|
|
77
77
|
schema.properties[configObj.name] = {
|
|
78
78
|
items: {
|
|
79
79
|
oneOf: configObj.value.map((e) => {
|
|
@@ -178,15 +178,15 @@ const buildUiSchema = (config: any) => {
|
|
|
178
178
|
case "AadharcardText":
|
|
179
179
|
elements = buildAdhaarField(config, componentScope);
|
|
180
180
|
break;
|
|
181
|
-
|
|
181
|
+
case "PanCardText":
|
|
182
182
|
elements = buildPanField(config, componentScope);
|
|
183
183
|
break;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
case "TabSection":
|
|
185
|
+
elements = buildTabSection(config, componentScope);
|
|
186
|
+
break;
|
|
187
187
|
case "RunnerBoyProgressBar":
|
|
188
188
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
189
|
-
|
|
189
|
+
break;
|
|
190
190
|
case "WrapperSection":
|
|
191
191
|
elements = buildWrapperSection(config, componentScope);
|
|
192
192
|
break;
|
|
@@ -295,17 +295,25 @@ const buildUiSchema = (config: any) => {
|
|
|
295
295
|
return elements;
|
|
296
296
|
}
|
|
297
297
|
else if (config.type == "Table") {
|
|
298
|
+
const sizeMap = {}
|
|
299
|
+
if (config.sizeHolder) {
|
|
300
|
+
config.sizeHolder.map((e, i) => {
|
|
301
|
+
sizeMap[e.keyName] = e.value
|
|
302
|
+
});
|
|
303
|
+
}
|
|
298
304
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
299
305
|
if (e.type) {
|
|
300
306
|
return {
|
|
301
307
|
accessorKey: e.name,
|
|
302
308
|
header: e.label || e.name,
|
|
309
|
+
size: sizeMap[e.name]|| 180,
|
|
303
310
|
widget: buildUiSchema(e)
|
|
304
311
|
}
|
|
305
312
|
}
|
|
306
313
|
return {
|
|
307
314
|
accessorKey: e.name,
|
|
308
|
-
header: e.label || e.name
|
|
315
|
+
header: e.label || e.name,
|
|
316
|
+
size: sizeMap[e.name]|| 180
|
|
309
317
|
}
|
|
310
318
|
})
|
|
311
319
|
}
|
|
@@ -53,7 +53,27 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
} ;
|
|
57
|
+
const sizeHolder = getArrayControl("sizeHolder","keyName","Component Name");
|
|
58
|
+
sizeHolder.options.detail.elements[1] = {
|
|
59
|
+
type: "Control",
|
|
60
|
+
scope: `#/properties/value`,
|
|
61
|
+
|
|
62
|
+
options: {
|
|
63
|
+
widget: "InputField",
|
|
64
|
+
},
|
|
65
|
+
config: {
|
|
66
|
+
layout: {
|
|
67
|
+
xs: 11,
|
|
68
|
+
sm: 11,
|
|
69
|
+
md: 5.5,
|
|
70
|
+
lg: 5.5,
|
|
71
|
+
},
|
|
72
|
+
main: {
|
|
73
|
+
label: "Size",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
57
77
|
const getInputField = (scope: String, label: String) => {
|
|
58
78
|
return {
|
|
59
79
|
type: "Control",
|
|
@@ -291,6 +311,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
291
311
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
292
312
|
getInputField("selectKey", "Selection Key"),
|
|
293
313
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
314
|
+
sizeHolder
|
|
294
315
|
]
|
|
295
316
|
break;
|
|
296
317
|
case "Radio":
|
|
@@ -141,6 +141,20 @@ export const ComponentSchema: any = {
|
|
|
141
141
|
},
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
|
+
sizeHolder: {
|
|
145
|
+
type: "array",
|
|
146
|
+
items: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
keyName: {
|
|
150
|
+
type: "string",
|
|
151
|
+
},
|
|
152
|
+
value:{
|
|
153
|
+
type:"string"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
144
158
|
legendLabels: {
|
|
145
159
|
type: "array",
|
|
146
160
|
items: {
|