impaktapps-ui-builder 0.0.364 → 0.0.366
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 +49 -4
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +4 -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 +24 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +14 -0
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ const Stepper = {
|
|
|
10
10
|
|
|
11
11
|
config: {
|
|
12
12
|
main: {
|
|
13
|
-
steps:[{label:"First"}, {label:"Second"},{label: "Third"}],
|
|
13
|
+
steps: [{ label: "First" }, { label: "Second" }, { label: "Third" }],
|
|
14
14
|
resetButton: false,
|
|
15
15
|
resetText: "Reset",
|
|
16
16
|
orientation: "vertical"
|
|
@@ -24,6 +24,9 @@ export const buildStepper = (config, componentScope) => {
|
|
|
24
24
|
const stepper: any = _.cloneDeep(Stepper);
|
|
25
25
|
stepper.scope = componentScope;
|
|
26
26
|
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
27
|
+
if (config.defaultButtonAvailable) {
|
|
28
|
+
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
29
|
+
}
|
|
27
30
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
28
31
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
29
32
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
@@ -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",
|
|
@@ -163,13 +183,14 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
163
183
|
case "Stepper":
|
|
164
184
|
uiSchema.elements = [
|
|
165
185
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
186
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
166
187
|
getInputField("resetText", "Reset Text"),
|
|
167
188
|
getInputField("completeText", "Complete Text"),
|
|
168
189
|
getSelectField("orientation", "Orientation Type", [
|
|
169
190
|
{ label: "Horizontal", value: "horizontal" },
|
|
170
191
|
{ label: "Vertical", value: "vertical" },
|
|
171
192
|
]),
|
|
172
|
-
|
|
193
|
+
|
|
173
194
|
getArrayControl("sectionLabels", "label")
|
|
174
195
|
|
|
175
196
|
]
|
|
@@ -291,6 +312,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
291
312
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
292
313
|
getInputField("selectKey", "Selection Key"),
|
|
293
314
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
315
|
+
sizeHolder
|
|
294
316
|
]
|
|
295
317
|
break;
|
|
296
318
|
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: {
|