impaktapps-ui-builder 0.0.365 → 0.0.368
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 +24 -3
- 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 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +42 -0
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +4 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +11 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +11 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -2
|
@@ -22,5 +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
|
+
downloadBlobFile: (response: any) => void;
|
|
25
26
|
};
|
|
26
27
|
export default _default;
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
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.label) {
|
|
33
|
+
DataGrid.config.main.label = config.label;
|
|
34
|
+
}
|
|
35
|
+
if (config.layout) {
|
|
36
|
+
DataGrid.config.layout = createLayoutFormat(config.layout)
|
|
37
|
+
}
|
|
38
|
+
if (config.style) {
|
|
39
|
+
DataGrid.config.style = JSON.parse(config.style)
|
|
40
|
+
}
|
|
41
|
+
return DataGrid;
|
|
42
|
+
}
|
|
@@ -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";
|
|
@@ -53,9 +53,9 @@ 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] =
|
|
56
|
+
};
|
|
57
|
+
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
58
|
+
sizeHolder.options.detail.elements[1] = {
|
|
59
59
|
type: "Control",
|
|
60
60
|
scope: `#/properties/value`,
|
|
61
61
|
|
|
@@ -180,16 +180,23 @@ const GraphSection = {
|
|
|
180
180
|
export const buildPropertiesSection = function (type: String) {
|
|
181
181
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
182
182
|
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;
|
|
183
189
|
case "Stepper":
|
|
184
190
|
uiSchema.elements = [
|
|
185
191
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
192
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
186
193
|
getInputField("resetText", "Reset Text"),
|
|
187
194
|
getInputField("completeText", "Complete Text"),
|
|
188
195
|
getSelectField("orientation", "Orientation Type", [
|
|
189
196
|
{ label: "Horizontal", value: "horizontal" },
|
|
190
197
|
{ label: "Vertical", value: "vertical" },
|
|
191
198
|
]),
|
|
192
|
-
|
|
199
|
+
|
|
193
200
|
getArrayControl("sectionLabels", "label")
|
|
194
201
|
|
|
195
202
|
]
|
|
@@ -10,6 +10,7 @@ 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" },
|
|
13
14
|
{ title: "Date", const: "Date" },
|
|
14
15
|
{ title: "Download File", const: "DownloadFile" },
|
|
15
16
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
@@ -35,6 +35,7 @@ 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"],
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
|
|
@@ -14,4 +14,14 @@ export const downloadFile = (obj: any) => {
|
|
|
14
14
|
|
|
15
15
|
URL.revokeObjectURL(url);
|
|
16
16
|
document.body.removeChild(link);
|
|
17
|
-
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const downloadBlobFile = (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 { downloadFile } from "./downloadFile";
|
|
2
|
+
import { downloadBlobFile, downloadFile } from "./downloadFile";
|
|
3
3
|
import { executeEvents, executeRefreshHandler } from "./events";
|
|
4
4
|
import { handlersProps } from "./interface";
|
|
5
5
|
let compType: string;
|
|
@@ -191,7 +191,8 @@ export default (funcParams: funcParamsProps) => {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
|
-
downloadFile: downloadFile
|
|
194
|
+
downloadFile: downloadFile,
|
|
195
|
+
downloadBlobFile:downloadBlobFile,
|
|
195
196
|
};
|
|
196
197
|
};
|
|
197
198
|
|