impaktapps-ui-builder 0.0.375 → 0.0.376
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 +8 -38
- 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 +2 -5
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -16
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -14
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/event.ts +0 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +8 -8
- package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -2
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ const Stepper = {
|
|
|
10
10
|
|
|
11
11
|
config: {
|
|
12
12
|
main: {
|
|
13
|
-
steps:
|
|
13
|
+
steps:[{label:"First"}, {label:"Second"},{label: "Third"}],
|
|
14
14
|
resetButton: false,
|
|
15
15
|
resetText: "Reset",
|
|
16
16
|
orientation: "vertical"
|
|
@@ -24,14 +24,11 @@ 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
|
-
}
|
|
30
27
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
31
28
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
32
29
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
33
30
|
if (config.sectionLabels) {
|
|
34
|
-
stepper.config.main.
|
|
31
|
+
stepper.config.main.label = config.sectionLabels.map((e, i: number) => {
|
|
35
32
|
return { label: e.label, id: i }
|
|
36
33
|
});
|
|
37
34
|
}
|
|
@@ -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" ? true : false
|
|
20
20
|
};
|
|
21
21
|
if (config.DragAvailable) {
|
|
22
22
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
|
|
@@ -67,14 +67,14 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
70
|
-
if (configObj.type === "Select") {
|
|
70
|
+
if (configObj.type === "Select" ) {
|
|
71
71
|
schema.properties[configObj.name] = {
|
|
72
72
|
oneOf: configObj.value.map((e) => {
|
|
73
73
|
return { const: e.value, title: e.label }
|
|
74
74
|
})
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
else if (configObj.type === "MultipleSelect") {
|
|
77
|
+
else if (configObj.type === "MultipleSelect" ) {
|
|
78
78
|
schema.properties[configObj.name] = {
|
|
79
79
|
items: {
|
|
80
80
|
oneOf: configObj.value.map((e) => {
|
|
@@ -182,15 +182,15 @@ const buildUiSchema = (config: any) => {
|
|
|
182
182
|
case "AadharcardText":
|
|
183
183
|
elements = buildAdhaarField(config, componentScope);
|
|
184
184
|
break;
|
|
185
|
-
|
|
185
|
+
case "PanCardText":
|
|
186
186
|
elements = buildPanField(config, componentScope);
|
|
187
187
|
break;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
case "TabSection":
|
|
189
|
+
elements = buildTabSection(config, componentScope);
|
|
190
|
+
break;
|
|
191
191
|
case "RunnerBoyProgressBar":
|
|
192
192
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
193
|
-
|
|
193
|
+
break;
|
|
194
194
|
case "WrapperSection":
|
|
195
195
|
elements = buildWrapperSection(config, componentScope);
|
|
196
196
|
break;
|
|
@@ -299,25 +299,17 @@ const buildUiSchema = (config: any) => {
|
|
|
299
299
|
return elements;
|
|
300
300
|
}
|
|
301
301
|
else if (config.type == "Table") {
|
|
302
|
-
const sizeMap = {}
|
|
303
|
-
if (config.sizeHolder) {
|
|
304
|
-
config.sizeHolder.map((e, i) => {
|
|
305
|
-
sizeMap[e.keyName] = e.value
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
302
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
309
303
|
if (e.type) {
|
|
310
304
|
return {
|
|
311
305
|
accessorKey: e.name,
|
|
312
306
|
header: e.label || e.name,
|
|
313
|
-
size: sizeMap[e.name]|| 180,
|
|
314
307
|
widget: buildUiSchema(e)
|
|
315
308
|
}
|
|
316
309
|
}
|
|
317
310
|
return {
|
|
318
311
|
accessorKey: e.name,
|
|
319
|
-
header: e.label || e.name
|
|
320
|
-
size: sizeMap[e.name]|| 180
|
|
312
|
+
header: e.label || e.name
|
|
321
313
|
}
|
|
322
314
|
})
|
|
323
315
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
2
1
|
import WrapperSection from "./uischema/wrapperSection";
|
|
3
2
|
import _ from "lodash";
|
|
4
3
|
|
|
@@ -9,8 +8,5 @@ export const buildWrapperSection = (config,componentScope) =>{
|
|
|
9
8
|
if (config.style) {
|
|
10
9
|
wrapper.config.style = JSON.parse(config.style)
|
|
11
10
|
}
|
|
12
|
-
if (config.layout) {
|
|
13
|
-
wrapper.config.layout = createLayoutFormat(config.layout)
|
|
14
|
-
}
|
|
15
11
|
return wrapper;
|
|
16
12
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import _ from "lodash";
|
|
3
2
|
const EmptyBox = {
|
|
4
3
|
type: "Control",
|
|
@@ -247,14 +246,13 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
247
246
|
case "Stepper":
|
|
248
247
|
uiSchema.elements = [
|
|
249
248
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
250
|
-
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
251
249
|
getInputField("resetText", "Reset Text"),
|
|
252
250
|
getInputField("completeText", "Complete Text"),
|
|
253
251
|
getSelectField("orientation", "Orientation Type", [
|
|
254
252
|
{ label: "Horizontal", value: "horizontal" },
|
|
255
253
|
{ label: "Vertical", value: "vertical" },
|
|
256
254
|
]),
|
|
257
|
-
|
|
255
|
+
EmptyBox,
|
|
258
256
|
getArrayControl("sectionLabels", "label")
|
|
259
257
|
|
|
260
258
|
]
|
|
@@ -376,7 +374,6 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
376
374
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
377
375
|
getInputField("selectKey", "Selection Key"),
|
|
378
376
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
379
|
-
sizeHolder
|
|
380
377
|
]
|
|
381
378
|
break;
|
|
382
379
|
case "Radio":
|
|
@@ -163,20 +163,6 @@ export const ComponentSchema: any = {
|
|
|
163
163
|
},
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
|
-
sizeHolder: {
|
|
167
|
-
type: "array",
|
|
168
|
-
items: {
|
|
169
|
-
type: "object",
|
|
170
|
-
properties: {
|
|
171
|
-
keyName: {
|
|
172
|
-
type: "string",
|
|
173
|
-
},
|
|
174
|
-
value:{
|
|
175
|
-
type:"string"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
166
|
legendLabels: {
|
|
181
167
|
type: "array",
|
|
182
168
|
items: {
|
|
@@ -35,7 +35,6 @@ const sectionLabels = {
|
|
|
35
35
|
TextArea:["Core","Properties","style", "Event","Validation"],
|
|
36
36
|
PopUp: ["Core", "Components","Properties", "style"],
|
|
37
37
|
Stepper: ["Core", "Components","Properties","Event", "style"],
|
|
38
|
-
DataGrid: ["Core", "Components","Properties","Event", "style"],
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
|
|
@@ -36,7 +36,6 @@ export default (
|
|
|
36
36
|
uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
|
|
37
37
|
{ label: "RankProvider", value: "RankProvider" },
|
|
38
38
|
{ label: "Download File", value: "downloadFile" },
|
|
39
|
-
{ label: "Download Blob File", value: "downloadBlobFile" }
|
|
40
39
|
])
|
|
41
40
|
uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
|
|
42
41
|
schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
|
|
@@ -17,11 +17,11 @@ export const downloadFile = (obj: any) => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const download = (response: any) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
21
|
+
const link = document.createElement('a');
|
|
22
|
+
link.href = url;
|
|
23
|
+
link.setAttribute('download', `${response.headers.filename}`);
|
|
24
|
+
document.body.appendChild(link);
|
|
25
|
+
link.click();
|
|
26
|
+
link.parentNode.removeChild(link);
|
|
27
|
+
};
|
|
@@ -62,7 +62,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
62
62
|
let executeEventsParameters: handlersProps = {
|
|
63
63
|
config: {}, componentName: "",
|
|
64
64
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
65
|
-
serviceHolder: { downloadFile }, eventGroups
|
|
65
|
+
serviceHolder: { downloadFile,download }, eventGroups
|
|
66
66
|
};
|
|
67
67
|
return {
|
|
68
68
|
setPage: async function () {
|
|
@@ -192,7 +192,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
downloadFile: downloadFile,
|
|
195
|
-
download:download
|
|
195
|
+
download:download
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
|