impaktapps-ui-builder 0.0.369 → 0.0.371
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 +10 -102
- 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/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +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 -20
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +2 -30
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -15
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -0
- 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 +9 -9
- package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -2
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +0 -45
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const downloadFile: (obj: any) => void;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const download: (response: any) => void;
|
|
@@ -22,6 +22,6 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
22
22
|
onReset: (functionParameters: any) => Promise<void>;
|
|
23
23
|
callHandler: (eventType: string, functionParameters?: any) => Promise<void>;
|
|
24
24
|
downloadFile: (obj: any) => void;
|
|
25
|
-
|
|
25
|
+
download: (response: any) => void;
|
|
26
26
|
};
|
|
27
27
|
export default _default;
|
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
|
|
@@ -36,7 +36,6 @@ import { buildAdhaarField, buildPanField } from "./buildAadharCard";
|
|
|
36
36
|
import { buildFileInput } from "./buildFileInput";
|
|
37
37
|
import { buildStepper } from "./buildStepper";
|
|
38
38
|
import { buildPopUp } from "./buildPop";
|
|
39
|
-
import { buildDataGrid } from "./buildDataGrid";
|
|
40
39
|
export let schema = {
|
|
41
40
|
type: "object",
|
|
42
41
|
properties: {},
|
|
@@ -67,14 +66,14 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
70
|
-
if (configObj.type === "Select") {
|
|
69
|
+
if (configObj.type === "Select" ) {
|
|
71
70
|
schema.properties[configObj.name] = {
|
|
72
71
|
oneOf: configObj.value.map((e) => {
|
|
73
72
|
return { const: e.value, title: e.label }
|
|
74
73
|
})
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
else if (configObj.type === "MultipleSelect") {
|
|
76
|
+
else if (configObj.type === "MultipleSelect" ) {
|
|
78
77
|
schema.properties[configObj.name] = {
|
|
79
78
|
items: {
|
|
80
79
|
oneOf: configObj.value.map((e) => {
|
|
@@ -167,9 +166,6 @@ const buildUiSchema = (config: any) => {
|
|
|
167
166
|
let elements: any = {};
|
|
168
167
|
const componentScope = `#/properties/${config.name}`;
|
|
169
168
|
switch (config.type) {
|
|
170
|
-
case "DataGrid":
|
|
171
|
-
elements = buildDataGrid(config, componentScope);
|
|
172
|
-
break;
|
|
173
169
|
case "Stepper":
|
|
174
170
|
elements = buildStepper(config, componentScope);
|
|
175
171
|
break;
|
|
@@ -182,15 +178,15 @@ const buildUiSchema = (config: any) => {
|
|
|
182
178
|
case "AadharcardText":
|
|
183
179
|
elements = buildAdhaarField(config, componentScope);
|
|
184
180
|
break;
|
|
185
|
-
|
|
181
|
+
case "PanCardText":
|
|
186
182
|
elements = buildPanField(config, componentScope);
|
|
187
183
|
break;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
184
|
+
case "TabSection":
|
|
185
|
+
elements = buildTabSection(config, componentScope);
|
|
186
|
+
break;
|
|
191
187
|
case "RunnerBoyProgressBar":
|
|
192
188
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
193
|
-
|
|
189
|
+
break;
|
|
194
190
|
case "WrapperSection":
|
|
195
191
|
elements = buildWrapperSection(config, componentScope);
|
|
196
192
|
break;
|
|
@@ -299,25 +295,17 @@ const buildUiSchema = (config: any) => {
|
|
|
299
295
|
return elements;
|
|
300
296
|
}
|
|
301
297
|
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
298
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
309
299
|
if (e.type) {
|
|
310
300
|
return {
|
|
311
301
|
accessorKey: e.name,
|
|
312
302
|
header: e.label || e.name,
|
|
313
|
-
size: sizeMap[e.name]|| 180,
|
|
314
303
|
widget: buildUiSchema(e)
|
|
315
304
|
}
|
|
316
305
|
}
|
|
317
306
|
return {
|
|
318
307
|
accessorKey: e.name,
|
|
319
|
-
header: e.label || e.name
|
|
320
|
-
size: sizeMap[e.name]|| 180
|
|
308
|
+
header: e.label || e.name
|
|
321
309
|
}
|
|
322
310
|
})
|
|
323
311
|
}
|
|
@@ -53,27 +53,7 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
}
|
|
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
|
-
};
|
|
56
|
+
}
|
|
77
57
|
const getInputField = (scope: String, label: String) => {
|
|
78
58
|
return {
|
|
79
59
|
type: "Control",
|
|
@@ -180,23 +160,16 @@ const GraphSection = {
|
|
|
180
160
|
export const buildPropertiesSection = function (type: String) {
|
|
181
161
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
182
162
|
switch (type) {
|
|
183
|
-
case "DataGrid":
|
|
184
|
-
uiSchema.elements = [
|
|
185
|
-
getRadioInputField("useWrapper", "use Item Wrapper", ["YES", "NO"]),
|
|
186
|
-
getInputField("elevation", "Item Wrapper Elevation"),
|
|
187
|
-
]
|
|
188
|
-
break;
|
|
189
163
|
case "Stepper":
|
|
190
164
|
uiSchema.elements = [
|
|
191
165
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
192
|
-
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
193
166
|
getInputField("resetText", "Reset Text"),
|
|
194
167
|
getInputField("completeText", "Complete Text"),
|
|
195
168
|
getSelectField("orientation", "Orientation Type", [
|
|
196
169
|
{ label: "Horizontal", value: "horizontal" },
|
|
197
170
|
{ label: "Vertical", value: "vertical" },
|
|
198
171
|
]),
|
|
199
|
-
|
|
172
|
+
EmptyBox,
|
|
200
173
|
getArrayControl("sectionLabels", "label")
|
|
201
174
|
|
|
202
175
|
]
|
|
@@ -318,7 +291,6 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
318
291
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
319
292
|
getInputField("selectKey", "Selection Key"),
|
|
320
293
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
321
|
-
sizeHolder
|
|
322
294
|
]
|
|
323
295
|
break;
|
|
324
296
|
case "Radio":
|
|
@@ -10,7 +10,6 @@ export const ComponentSchema: any = {
|
|
|
10
10
|
{ title: "Card", const: "card" },
|
|
11
11
|
{ title: "CheckBox", const: "CheckBox" },
|
|
12
12
|
{ title: "Container", const: "WrapperSection" },
|
|
13
|
-
{ title: "DataGrid", const: "DataGrid" },
|
|
14
13
|
{ title: "Date", const: "Date" },
|
|
15
14
|
{ title: "Download File", const: "DownloadFile" },
|
|
16
15
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
@@ -142,20 +141,6 @@ export const ComponentSchema: any = {
|
|
|
142
141
|
},
|
|
143
142
|
},
|
|
144
143
|
},
|
|
145
|
-
sizeHolder: {
|
|
146
|
-
type: "array",
|
|
147
|
-
items: {
|
|
148
|
-
type: "object",
|
|
149
|
-
properties: {
|
|
150
|
-
keyName: {
|
|
151
|
-
type: "string",
|
|
152
|
-
},
|
|
153
|
-
value:{
|
|
154
|
-
type:"string"
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
144
|
legendLabels: {
|
|
160
145
|
type: "array",
|
|
161
146
|
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"]
|
|
@@ -16,12 +16,12 @@ export const downloadFile = (obj: any) => {
|
|
|
16
16
|
document.body.removeChild(link);
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
export const download = (response: any) => {
|
|
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.data}`);
|
|
24
|
+
document.body.appendChild(link);
|
|
25
|
+
link.click();
|
|
26
|
+
link.parentNode.removeChild(link);
|
|
27
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _, { isEmpty } from "lodash";
|
|
2
|
-
import {
|
|
2
|
+
import { download, downloadFile } from "./downloadFile";
|
|
3
3
|
import { executeEvents, executeRefreshHandler } from "./events";
|
|
4
4
|
import { handlersProps } from "./interface";
|
|
5
5
|
let compType: string;
|
|
@@ -192,7 +192,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
downloadFile: downloadFile,
|
|
195
|
-
|
|
195
|
+
download:download
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildDataGrid: (config: any, componentScope: any) => any;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
2
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
-
|
|
4
|
-
const dataGrid = {
|
|
5
|
-
"type": "Control",
|
|
6
|
-
"scope": "#/properties/dataGrid",
|
|
7
|
-
"layout": 12,
|
|
8
|
-
"options": {
|
|
9
|
-
"widget": "DataGrid"
|
|
10
|
-
},
|
|
11
|
-
elements: [
|
|
12
|
-
],
|
|
13
|
-
"config": {
|
|
14
|
-
"main": {
|
|
15
|
-
// "label": "Data Grid",
|
|
16
|
-
elevation: 0,
|
|
17
|
-
useWrapper: false
|
|
18
|
-
},
|
|
19
|
-
style: {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const buildDataGrid = (config, componentScope) => {
|
|
26
|
-
const DataGrid: any = _.cloneDeep(dataGrid);
|
|
27
|
-
DataGrid.scope = componentScope;
|
|
28
|
-
DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
|
|
29
|
-
if (config.elevation) {
|
|
30
|
-
DataGrid.config.main.elevation = +config.elevation;
|
|
31
|
-
}
|
|
32
|
-
if (config.height) {
|
|
33
|
-
DataGrid.config.main.height = `${config.height}px`;
|
|
34
|
-
}
|
|
35
|
-
if (config.label) {
|
|
36
|
-
DataGrid.config.main.label = config.label;
|
|
37
|
-
}
|
|
38
|
-
if (config.layout) {
|
|
39
|
-
DataGrid.config.layout = createLayoutFormat(config.layout)
|
|
40
|
-
}
|
|
41
|
-
if (config.style) {
|
|
42
|
-
DataGrid.config.style = JSON.parse(config.style)
|
|
43
|
-
}
|
|
44
|
-
return DataGrid;
|
|
45
|
-
}
|