impaktapps-ui-builder 0.0.384 → 0.0.386
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 +243 -14
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +13 -13
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +51 -0
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +46 -0
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +5 -2
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +24 -8
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +96 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +37 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +40 -42
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -0
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildDataGrid: (config: any, componentScope: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildInputSlider: (config: any, componentScope: any) => any;
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
if (config.elevation) {
|
|
29
|
+
DataGrid.config.main.elevation = +config.elevation;
|
|
30
|
+
}
|
|
31
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
32
|
+
if (config.height) {
|
|
33
|
+
DataGrid.config.main.height = `${config.height}px`;
|
|
34
|
+
}
|
|
35
|
+
if (config.justifyContent) {
|
|
36
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
37
|
+
}
|
|
38
|
+
if (config.label) {
|
|
39
|
+
DataGrid.config.main.label = config.label;
|
|
40
|
+
}
|
|
41
|
+
if (config.layout) {
|
|
42
|
+
DataGrid.config.layout = createLayoutFormat(config.layout)
|
|
43
|
+
}
|
|
44
|
+
if (config.cardLayout) {
|
|
45
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout)
|
|
46
|
+
}
|
|
47
|
+
if (config.style) {
|
|
48
|
+
DataGrid.config.style = JSON.parse(config.style)
|
|
49
|
+
}
|
|
50
|
+
return DataGrid;
|
|
51
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
const InputSlider = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/inputSlider",
|
|
7
|
+
options: {
|
|
8
|
+
widget: "InputSlider",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
config: {
|
|
12
|
+
layout: 12,
|
|
13
|
+
main: {
|
|
14
|
+
limitToMax: false,
|
|
15
|
+
max: 10000,
|
|
16
|
+
step: 1000,
|
|
17
|
+
min: 0,
|
|
18
|
+
label: "Slider"
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export const buildInputSlider = (config, componentScope) => {
|
|
24
|
+
const inputSlider: any = _.cloneDeep(InputSlider);
|
|
25
|
+
inputSlider.scope = componentScope;
|
|
26
|
+
inputSlider.config.main.label = config.label
|
|
27
|
+
if (config.layout) {
|
|
28
|
+
inputSlider.config.layout = createLayoutFormat(config.layout)
|
|
29
|
+
}
|
|
30
|
+
if (config.limitToMax) {
|
|
31
|
+
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
32
|
+
}
|
|
33
|
+
if (config.max) {
|
|
34
|
+
inputSlider.config.main.max = config.max
|
|
35
|
+
}
|
|
36
|
+
if (config.step) {
|
|
37
|
+
inputSlider.config.main.step = config.step;
|
|
38
|
+
}
|
|
39
|
+
if (config.min) {
|
|
40
|
+
inputSlider.config.main.min = config.min;
|
|
41
|
+
}
|
|
42
|
+
if (config.style) {
|
|
43
|
+
inputSlider.config.main.defaultStyle = JSON.parse(config.style)
|
|
44
|
+
}
|
|
45
|
+
return inputSlider;
|
|
46
|
+
}
|
|
@@ -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,11 +24,14 @@ 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";
|
|
30
33
|
if (config.sectionLabels) {
|
|
31
|
-
stepper.config.main.
|
|
34
|
+
stepper.config.main.steps = config.sectionLabels.map((e, i: number) => {
|
|
32
35
|
return { label: e.label, id: i }
|
|
33
36
|
});
|
|
34
37
|
}
|
|
@@ -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
|
|
@@ -36,6 +36,8 @@ 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
|
+
import { buildInputSlider } from "./buildInputSlider";
|
|
39
41
|
export let schema = {
|
|
40
42
|
type: "object",
|
|
41
43
|
properties: {},
|
|
@@ -66,14 +68,14 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
69
|
-
if (configObj.type === "Select"
|
|
71
|
+
if (configObj.type === "Select") {
|
|
70
72
|
schema.properties[configObj.name] = {
|
|
71
73
|
oneOf: configObj.value.map((e) => {
|
|
72
74
|
return { const: e.value, title: e.label }
|
|
73
75
|
})
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
|
-
else if (configObj.type === "MultipleSelect"
|
|
78
|
+
else if (configObj.type === "MultipleSelect") {
|
|
77
79
|
schema.properties[configObj.name] = {
|
|
78
80
|
items: {
|
|
79
81
|
oneOf: configObj.value.map((e) => {
|
|
@@ -166,6 +168,12 @@ const buildUiSchema = (config: any) => {
|
|
|
166
168
|
let elements: any = {};
|
|
167
169
|
const componentScope = `#/properties/${config.name}`;
|
|
168
170
|
switch (config.type) {
|
|
171
|
+
case "InputSlider":
|
|
172
|
+
elements = buildInputSlider(config, componentScope);
|
|
173
|
+
break;
|
|
174
|
+
case "DataGrid":
|
|
175
|
+
elements = buildDataGrid(config, componentScope);
|
|
176
|
+
break;
|
|
169
177
|
case "Stepper":
|
|
170
178
|
elements = buildStepper(config, componentScope);
|
|
171
179
|
break;
|
|
@@ -178,15 +186,15 @@ const buildUiSchema = (config: any) => {
|
|
|
178
186
|
case "AadharcardText":
|
|
179
187
|
elements = buildAdhaarField(config, componentScope);
|
|
180
188
|
break;
|
|
181
|
-
|
|
189
|
+
case "PanCardText":
|
|
182
190
|
elements = buildPanField(config, componentScope);
|
|
183
191
|
break;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
192
|
+
case "TabSection":
|
|
193
|
+
elements = buildTabSection(config, componentScope);
|
|
194
|
+
break;
|
|
187
195
|
case "RunnerBoyProgressBar":
|
|
188
196
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
189
|
-
|
|
197
|
+
break;
|
|
190
198
|
case "WrapperSection":
|
|
191
199
|
elements = buildWrapperSection(config, componentScope);
|
|
192
200
|
break;
|
|
@@ -295,17 +303,25 @@ const buildUiSchema = (config: any) => {
|
|
|
295
303
|
return elements;
|
|
296
304
|
}
|
|
297
305
|
else if (config.type == "Table") {
|
|
306
|
+
const sizeMap = {}
|
|
307
|
+
if (config.sizeHolder) {
|
|
308
|
+
config.sizeHolder.map((e, i) => {
|
|
309
|
+
sizeMap[e.keyName] = e.value
|
|
310
|
+
});
|
|
311
|
+
}
|
|
298
312
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
299
313
|
if (e.type) {
|
|
300
314
|
return {
|
|
301
315
|
accessorKey: e.name,
|
|
302
316
|
header: e.label || e.name,
|
|
317
|
+
size: sizeMap[e.name]|| 180,
|
|
303
318
|
widget: buildUiSchema(e)
|
|
304
319
|
}
|
|
305
320
|
}
|
|
306
321
|
return {
|
|
307
322
|
accessorKey: e.name,
|
|
308
|
-
header: e.label || e.name
|
|
323
|
+
header: e.label || e.name,
|
|
324
|
+
size: sizeMap[e.name]|| 180
|
|
309
325
|
}
|
|
310
326
|
})
|
|
311
327
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
1
2
|
import WrapperSection from "./uischema/wrapperSection";
|
|
2
3
|
import _ from "lodash";
|
|
3
4
|
|
|
@@ -8,5 +9,8 @@ export const buildWrapperSection = (config,componentScope) =>{
|
|
|
8
9
|
if (config.style) {
|
|
9
10
|
wrapper.config.style = JSON.parse(config.style)
|
|
10
11
|
}
|
|
12
|
+
if (config.layout) {
|
|
13
|
+
wrapper.config.layout = createLayoutFormat(config.layout)
|
|
14
|
+
}
|
|
11
15
|
return wrapper;
|
|
12
16
|
}
|
|
@@ -19,6 +19,61 @@ const EmptyBox = {
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
+
const cardLayout = {
|
|
23
|
+
type: "Control",
|
|
24
|
+
scope: "#/properties/cardLayout",
|
|
25
|
+
layout: 11.5,
|
|
26
|
+
options: {
|
|
27
|
+
detail: {
|
|
28
|
+
type: "HorizontalLayout",
|
|
29
|
+
elements: [
|
|
30
|
+
{
|
|
31
|
+
type: "Control",
|
|
32
|
+
scope: "#/properties/key",
|
|
33
|
+
options: {
|
|
34
|
+
widget: "SelectInputField",
|
|
35
|
+
},
|
|
36
|
+
config: {
|
|
37
|
+
layout: {
|
|
38
|
+
xs: 11,
|
|
39
|
+
sm: 11,
|
|
40
|
+
md: 5.5,
|
|
41
|
+
lg: 5.5,
|
|
42
|
+
},
|
|
43
|
+
main: {
|
|
44
|
+
label: "Screen Size",
|
|
45
|
+
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "Control",
|
|
51
|
+
scope: "#/properties/value",
|
|
52
|
+
|
|
53
|
+
options: {
|
|
54
|
+
widget: "InputField",
|
|
55
|
+
},
|
|
56
|
+
config: {
|
|
57
|
+
layout: {
|
|
58
|
+
xs: 11,
|
|
59
|
+
sm: 11,
|
|
60
|
+
md: 5.5,
|
|
61
|
+
lg: 5.5,
|
|
62
|
+
},
|
|
63
|
+
main: {
|
|
64
|
+
label: "Value",
|
|
65
|
+
type:"number",
|
|
66
|
+
// freeSolo:true,
|
|
67
|
+
helperText:'Number should be in range of 0 to 12',
|
|
68
|
+
errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
|
|
69
|
+
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
22
77
|
const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
|
|
23
78
|
return {
|
|
24
79
|
type: "Control",
|
|
@@ -53,7 +108,27 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
53
108
|
},
|
|
54
109
|
},
|
|
55
110
|
}
|
|
56
|
-
}
|
|
111
|
+
};
|
|
112
|
+
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
113
|
+
sizeHolder.options.detail.elements[1] = {
|
|
114
|
+
type: "Control",
|
|
115
|
+
scope: `#/properties/value`,
|
|
116
|
+
|
|
117
|
+
options: {
|
|
118
|
+
widget: "InputField",
|
|
119
|
+
},
|
|
120
|
+
config: {
|
|
121
|
+
layout: {
|
|
122
|
+
xs: 11,
|
|
123
|
+
sm: 11,
|
|
124
|
+
md: 5.5,
|
|
125
|
+
lg: 5.5,
|
|
126
|
+
},
|
|
127
|
+
main: {
|
|
128
|
+
label: "Size",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
57
132
|
const getInputField = (scope: String, label: String) => {
|
|
58
133
|
return {
|
|
59
134
|
type: "Control",
|
|
@@ -160,16 +235,34 @@ const GraphSection = {
|
|
|
160
235
|
export const buildPropertiesSection = function (type: String) {
|
|
161
236
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
162
237
|
switch (type) {
|
|
238
|
+
case "InputSlider":
|
|
239
|
+
uiSchema.elements = [
|
|
240
|
+
getInputField("max", "Max Limit"),
|
|
241
|
+
getInputField("step", "Step"),
|
|
242
|
+
getInputField("min", "Min Limit"),
|
|
243
|
+
getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"]),
|
|
244
|
+
]
|
|
245
|
+
break;
|
|
246
|
+
case "DataGrid":
|
|
247
|
+
uiSchema.elements = [
|
|
248
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
249
|
+
getInputField("elevation", "Card Elevation"),
|
|
250
|
+
getInputField("height", "Grid height"),
|
|
251
|
+
getInputField("justifyContent", "justifyContent"),
|
|
252
|
+
cardLayout,
|
|
253
|
+
]
|
|
254
|
+
break;
|
|
163
255
|
case "Stepper":
|
|
164
256
|
uiSchema.elements = [
|
|
165
257
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
258
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
166
259
|
getInputField("resetText", "Reset Text"),
|
|
167
260
|
getInputField("completeText", "Complete Text"),
|
|
168
261
|
getSelectField("orientation", "Orientation Type", [
|
|
169
262
|
{ label: "Horizontal", value: "horizontal" },
|
|
170
263
|
{ label: "Vertical", value: "vertical" },
|
|
171
264
|
]),
|
|
172
|
-
|
|
265
|
+
|
|
173
266
|
getArrayControl("sectionLabels", "label")
|
|
174
267
|
|
|
175
268
|
]
|
|
@@ -291,6 +384,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
291
384
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
292
385
|
getInputField("selectKey", "Selection Key"),
|
|
293
386
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
387
|
+
sizeHolder
|
|
294
388
|
]
|
|
295
389
|
break;
|
|
296
390
|
case "Radio":
|
|
@@ -10,11 +10,13 @@ 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" },
|
|
16
17
|
{ title: "File", const: "FileInput" },
|
|
17
18
|
{ title: "Graph", const: "Graph" },
|
|
19
|
+
{ title: "Input Slider", const: "InputSlider" },
|
|
18
20
|
{ title: "Label", const: "Box" },
|
|
19
21
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
20
22
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
@@ -72,6 +74,27 @@ export const ComponentSchema: any = {
|
|
|
72
74
|
},
|
|
73
75
|
},
|
|
74
76
|
},
|
|
77
|
+
cardLayout: {
|
|
78
|
+
type: "array",
|
|
79
|
+
items: {
|
|
80
|
+
type: "object",
|
|
81
|
+
properties: {
|
|
82
|
+
key: {
|
|
83
|
+
type: "string",
|
|
84
|
+
oneOf: [
|
|
85
|
+
{ title: "Extra Small", const: "xs" },
|
|
86
|
+
{ title: "Small", const: "sm" },
|
|
87
|
+
{ title: "Medium", const: "md" },
|
|
88
|
+
{ title: "Large", const: "lg" },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
value: {
|
|
92
|
+
// type: "string",
|
|
93
|
+
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
75
98
|
value: {
|
|
76
99
|
type: "array",
|
|
77
100
|
items: {
|
|
@@ -141,6 +164,20 @@ export const ComponentSchema: any = {
|
|
|
141
164
|
},
|
|
142
165
|
},
|
|
143
166
|
},
|
|
167
|
+
sizeHolder: {
|
|
168
|
+
type: "array",
|
|
169
|
+
items: {
|
|
170
|
+
type: "object",
|
|
171
|
+
properties: {
|
|
172
|
+
keyName: {
|
|
173
|
+
type: "string",
|
|
174
|
+
},
|
|
175
|
+
value:{
|
|
176
|
+
type:"string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
144
181
|
legendLabels: {
|
|
145
182
|
type: "array",
|
|
146
183
|
items: {
|
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: "string",
|
|
1
|
+
export const PageMasterSchema = {
|
|
2
|
+
type: "object",
|
|
3
|
+
properties: {
|
|
4
|
+
name:{
|
|
5
|
+
type:"string",
|
|
6
|
+
minLength: 6,
|
|
7
|
+
// pattern: '^page_\\w+$'
|
|
8
|
+
},
|
|
9
|
+
label:{
|
|
10
|
+
type:"string",
|
|
11
|
+
},
|
|
12
|
+
layout: {
|
|
13
|
+
type: "array",
|
|
14
|
+
items: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
layout_key: {
|
|
18
|
+
type: "string",
|
|
19
|
+
},
|
|
20
|
+
layout_value: {
|
|
21
|
+
type: "string",
|
|
22
|
+
},
|
|
24
23
|
},
|
|
25
24
|
},
|
|
26
25
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
26
|
+
template: {
|
|
27
|
+
oneOf: [
|
|
28
|
+
{ const: "Template-1", title: "template1" },
|
|
29
|
+
{ const: "Template-2", title: "template2" },
|
|
30
|
+
{ const: "Template-3", title: "template3" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
35
33
|
sectionLabels: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
type: "array",
|
|
35
|
+
items: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {
|
|
38
|
+
label: {
|
|
39
|
+
type: "string",
|
|
40
|
+
}
|
|
41
|
+
},
|
|
43
42
|
},
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
required: ["template", "name"]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
required:["label","template"]
|
|
48
46
|
}
|
|
@@ -35,6 +35,8 @@ 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
|
+
InputSlider:["Core","Properties","style", "Event","Validation"],
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
|
|
@@ -36,6 +36,7 @@ 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" }
|
|
39
40
|
])
|
|
40
41
|
uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
|
|
41
42
|
schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
|
|
@@ -65,7 +65,7 @@ export async function saveHandler(store, service, submitHandler, pageName?: stri
|
|
|
65
65
|
if (_.isEmpty(store.ctx.core.errors)) {
|
|
66
66
|
try {
|
|
67
67
|
const saveReturn = await submitHandler(store, service, config);
|
|
68
|
-
navigateHandler(store, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords")
|
|
68
|
+
navigateHandler(store, true, pageName ? `/${pageName}?id=${saveReturn.id}` : "/PageMasterRecords")
|
|
69
69
|
} catch (err) {
|
|
70
70
|
navigateHandler(store, false)
|
|
71
71
|
}
|
|
@@ -87,7 +87,7 @@ async function executeInBuiltFunctionHandler(params: handlersProps) {
|
|
|
87
87
|
const makeFunc = eval(params.config.funcParametersCode)
|
|
88
88
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
89
89
|
}
|
|
90
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter)
|
|
90
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter,params.service)
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
async function executeCustomHandler(params: handlersProps) {
|
|
@@ -131,7 +131,7 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
|
|
|
131
131
|
}
|
|
132
132
|
else {
|
|
133
133
|
if (handlerResponse) {
|
|
134
|
-
store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse
|
|
134
|
+
store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse?.data?.data : handlerResponse.data } });
|
|
135
135
|
const demoData = await asyncOperation();
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -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,download:doDownload
|
|
65
|
+
serviceHolder: { downloadFile ,download:doDownload}, eventGroups
|
|
66
66
|
};
|
|
67
67
|
return {
|
|
68
68
|
setPage: async function () {
|