impaktapps-ui-builder 0.0.284 → 0.0.285
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 +220 -293
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +11 -0
- 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/buildMultiSelect.ts +18 -16
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +17 -14
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +34 -20
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +36 -36
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +10 -10
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/events.ts +70 -137
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +11 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +54 -31
|
@@ -24,8 +24,8 @@ export declare const getTextArea: (scope: string, heading: string, hideButton: b
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export declare const getSelectField: (scope: string, label: string, options: {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
29
|
}[]) => {
|
|
30
30
|
type: string;
|
|
31
31
|
scope: string;
|
|
@@ -43,8 +43,8 @@ export declare const getSelectField: (scope: string, label: string, options: {
|
|
|
43
43
|
label: string;
|
|
44
44
|
type: string;
|
|
45
45
|
options: {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
48
|
}[];
|
|
49
49
|
};
|
|
50
50
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { handlersProps } from "./interface";
|
|
2
|
+
export declare const executeEvents: (params: handlersProps) => Promise<any>;
|
|
2
3
|
export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
|
|
3
4
|
body: any;
|
|
4
5
|
headers: any;
|
|
@@ -11,7 +11,7 @@ interface funcParamsProps {
|
|
|
11
11
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
12
12
|
setPage: () => Promise<void>;
|
|
13
13
|
onClick: () => Promise<void>;
|
|
14
|
-
onPaginationChange: (paginationValues: any) => Promise<
|
|
14
|
+
onPaginationChange: (paginationValues: any) => Promise<any>;
|
|
15
15
|
onChange: () => Promise<void>;
|
|
16
16
|
downloadFile: (obj: any) => void;
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -2,21 +2,23 @@ import MultipleSelect from "./uischema/multiSelect";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildMultiSelect = (config,componentScope) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
export const buildMultiSelect = (config, componentScope) => {
|
|
6
|
+
const multipleSelect: any = _.cloneDeep(MultipleSelect);
|
|
7
|
+
multipleSelect.scope = componentScope;
|
|
8
|
+
if (config.label) {
|
|
9
|
+
|
|
10
|
+
multipleSelect.config.main.label = config.label;
|
|
11
|
+
}
|
|
12
|
+
if (config.layout) {
|
|
13
|
+
multipleSelect.config.layout = createLayoutFormat(config.layout)
|
|
14
|
+
}
|
|
15
|
+
if (config.value) {
|
|
16
|
+
multipleSelect.config.main.options = config.value;
|
|
17
|
+
}
|
|
18
|
+
if (config.lazyLoading) {
|
|
19
|
+
multipleSelect.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
return multipleSelect;
|
|
22
24
|
}
|
|
@@ -2,18 +2,21 @@ import SelectInputField from "./uischema/selectInputField";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildSelect = (config:any,componentScope:string) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
export const buildSelect = (config: any, componentScope: string) => {
|
|
6
|
+
const selectInputField: any = _.cloneDeep(SelectInputField);
|
|
7
|
+
selectInputField.config.main.label = config.label;
|
|
8
|
+
if (config.value) {
|
|
9
|
+
selectInputField.config.main.options = config.value;
|
|
10
|
+
};
|
|
11
|
+
if (config.freeSolo) {
|
|
12
|
+
selectInputField.config.main.freeSolo = config.freeSolo === "YES" ? true : false;;
|
|
13
|
+
}
|
|
14
|
+
if (config.lazyLoading) {
|
|
15
|
+
selectInputField.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
16
|
+
}
|
|
17
|
+
if (config.layout) {
|
|
18
|
+
selectInputField.config.layout = createLayoutFormat(config.layout)
|
|
19
|
+
}
|
|
20
|
+
selectInputField.scope = componentScope;
|
|
21
|
+
return selectInputField;
|
|
19
22
|
}
|
|
@@ -9,6 +9,9 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
9
9
|
if (config.style) {
|
|
10
10
|
table.config.style = JSON.parse(config.style)
|
|
11
11
|
}
|
|
12
|
+
if (config.lazyLoading) {
|
|
13
|
+
table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
14
|
+
}
|
|
12
15
|
if (config.SelectionAvailable) {
|
|
13
16
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
|
|
14
17
|
};
|
|
@@ -131,7 +131,7 @@ export const getTextArea = (scope: string, heading: string, hideButton: boolean,
|
|
|
131
131
|
},
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
export const getSelectField = (scope: string, label: string, options: {
|
|
134
|
+
export const getSelectField = (scope: string, label: string, options: { label: string, value: string }[]) => {
|
|
135
135
|
return {
|
|
136
136
|
type: "Control",
|
|
137
137
|
scope: `#/properties/${scope}`,
|
|
@@ -198,8 +198,8 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
198
198
|
else if (type === "Box") {
|
|
199
199
|
const iconName = getInputField("value", "Value");
|
|
200
200
|
uiSchema.elements = [getSelectField("graphType", "Label Type", [
|
|
201
|
-
{
|
|
202
|
-
{
|
|
201
|
+
{ label: "URL", value: "url" },
|
|
202
|
+
{ label: "Heading", value: "heading" }
|
|
203
203
|
]), iconName];
|
|
204
204
|
}
|
|
205
205
|
else if (type === "Button") {
|
|
@@ -207,13 +207,13 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
207
207
|
const size = getInputField("size", "Size");
|
|
208
208
|
const iconName = getInputField("iconName", "Icon Name");
|
|
209
209
|
uiSchema.elements = [getSelectField("buttonType", "Button Type", [
|
|
210
|
-
{
|
|
211
|
-
{
|
|
212
|
-
{
|
|
210
|
+
{ label: "Button With Text", value: "Button" },
|
|
211
|
+
{ label: "Button With Icon", value: "IconButton" },
|
|
212
|
+
{ label: "Button With Icon and Text", value: "ButtonWithIconAndText" },
|
|
213
213
|
]), iconName, size, caption,
|
|
214
214
|
getSelectField("defaultStyle", "Default Style", [
|
|
215
|
-
{
|
|
216
|
-
{
|
|
215
|
+
{ label: "Apply Default Style", value: "true" },
|
|
216
|
+
{ label: "No Style", value: "false" },
|
|
217
217
|
]),
|
|
218
218
|
JSON.parse(JSON.stringify(EmptyBox))
|
|
219
219
|
];
|
|
@@ -228,11 +228,11 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
228
228
|
heading,
|
|
229
229
|
height,
|
|
230
230
|
getSelectField("graphType", "Graph Type", [
|
|
231
|
-
{
|
|
232
|
-
{
|
|
233
|
-
{
|
|
234
|
-
{
|
|
235
|
-
{
|
|
231
|
+
{ label: "Bar Graph", value: "BarGraph" },
|
|
232
|
+
{ label: "Stack Bar Graph", value: "StackBarGraph" },
|
|
233
|
+
{ label: "Line Graph", value: "LineGraph" },
|
|
234
|
+
{ label: "Pie Graph", value: "PieGraph" },
|
|
235
|
+
{ label: "Horizontal Bar Graph", value: "HorizontalBarGraph" },
|
|
236
236
|
]),
|
|
237
237
|
leftLabel,
|
|
238
238
|
bottomLabel,
|
|
@@ -248,19 +248,33 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
248
248
|
getArrayControl("sectionLabels", "label"),
|
|
249
249
|
]
|
|
250
250
|
}
|
|
251
|
-
else if(type === "Table"||type === "LazyLoadingTable"){
|
|
252
|
-
uiSchema.elements =[
|
|
253
|
-
getRadioInputField("
|
|
254
|
-
getRadioInputField("
|
|
255
|
-
getRadioInputField("
|
|
256
|
-
|
|
251
|
+
else if (type === "Table" || type === "LazyLoadingTable") {
|
|
252
|
+
uiSchema.elements = [
|
|
253
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
254
|
+
getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
|
|
255
|
+
getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
|
|
256
|
+
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
257
|
+
getInputField("selectKey", "Selection Key"),
|
|
258
|
+
EmptyBox
|
|
257
259
|
]
|
|
258
|
-
|
|
260
|
+
}
|
|
259
261
|
else if (type === "Radio") {
|
|
260
262
|
uiSchema.elements = [
|
|
261
263
|
getArrayControl("sectionLabels", "label", "Options Of Radio"),
|
|
262
264
|
]
|
|
263
265
|
}
|
|
266
|
+
else if (type === "Select") {
|
|
267
|
+
uiSchema.elements = [
|
|
268
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
269
|
+
getRadioInputField("freeSolo", "FreeSolo", ["YES", "NO"]),
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
else if (type === "MultipleSelect") {
|
|
273
|
+
uiSchema.elements = [
|
|
274
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
275
|
+
EmptyBox
|
|
276
|
+
]
|
|
277
|
+
}
|
|
264
278
|
|
|
265
279
|
return uiSchema;
|
|
266
280
|
};
|
|
@@ -102,34 +102,34 @@ export const componentBasicUiSchema: any = {
|
|
|
102
102
|
main: {
|
|
103
103
|
label: "Type",
|
|
104
104
|
options: [
|
|
105
|
-
{
|
|
106
|
-
{
|
|
107
|
-
{
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
{
|
|
111
|
-
{
|
|
112
|
-
{
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
{
|
|
116
|
-
{
|
|
117
|
-
{
|
|
118
|
-
{
|
|
119
|
-
{
|
|
120
|
-
{
|
|
121
|
-
{
|
|
122
|
-
{
|
|
123
|
-
{
|
|
124
|
-
{
|
|
125
|
-
{
|
|
126
|
-
{
|
|
127
|
-
{
|
|
128
|
-
{
|
|
129
|
-
{
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
105
|
+
{ label: "Select", value: "Select" },
|
|
106
|
+
{ label: "Date", value: "Date" },
|
|
107
|
+
{ label: "CheckBox", value: "CheckBox" },
|
|
108
|
+
{ label: "Table", value: "Table" },
|
|
109
|
+
{ label: "Lazy Loading Table", value: "LazyLoadingTable" },
|
|
110
|
+
{ label: "Array", value: "Array" },
|
|
111
|
+
{ label: "Container", value: "WrapperSection" },
|
|
112
|
+
{ label: "Tabs", value: "TabSection" },
|
|
113
|
+
{ label: "Text", value: "Text" },
|
|
114
|
+
{ label: "Radio", value: "Radio" },
|
|
115
|
+
{ label: "Text Area", value: "TextArea" },
|
|
116
|
+
{ label: "Button", value: "Button" },
|
|
117
|
+
{ label: "Card", value: "card" },
|
|
118
|
+
{ label: "Rank", value: "Rank" },
|
|
119
|
+
{ label: "SpeedoMeter", value: "SpeedoMeter" },
|
|
120
|
+
{ label: "ProgressBar", value: "ProgressBar" },
|
|
121
|
+
{ label: "Graph", value: "Graph" },
|
|
122
|
+
{ label: "Label", value: "Box" },
|
|
123
|
+
{ label: "Upload File", value: "UploadFile" },
|
|
124
|
+
{ label: "Download File", value: "DownloadFile" },
|
|
125
|
+
{ label: "Empty Box", value: "EmptyBox" },
|
|
126
|
+
{ label: "ProgressBar Card", value: "ProgressBarCard" },
|
|
127
|
+
{ label: "Rank Card", value: "RankCard" },
|
|
128
|
+
{ label: "Runner Boy Progress Bar", value: "RunnerBoyProgressBar" },
|
|
129
|
+
{ label: "Slider", value: "Slider" },
|
|
130
|
+
{ label: "Timer", value: "Timer" },
|
|
131
|
+
{ label: "MultipleSelect", value: "MultipleSelect" },
|
|
132
|
+
{ label: "LeaderBoard", value: "LeaderBoard" }
|
|
133
133
|
],
|
|
134
134
|
},
|
|
135
135
|
},
|
|
@@ -213,10 +213,10 @@ export const componentBasicUiSchema: any = {
|
|
|
213
213
|
main: {
|
|
214
214
|
label: "Screen Size",
|
|
215
215
|
options: [
|
|
216
|
-
{
|
|
217
|
-
{
|
|
218
|
-
{
|
|
219
|
-
{
|
|
216
|
+
{ label: "Extra Small", value: "xs" },
|
|
217
|
+
{ label: "Small", value: "sm" },
|
|
218
|
+
{ label: "Medium", value: "md" },
|
|
219
|
+
{ label: "Large", value: "lg" },
|
|
220
220
|
],
|
|
221
221
|
},
|
|
222
222
|
},
|
|
@@ -238,10 +238,10 @@ export const componentBasicUiSchema: any = {
|
|
|
238
238
|
main: {
|
|
239
239
|
label: "Value",
|
|
240
240
|
options: [
|
|
241
|
-
{
|
|
242
|
-
{
|
|
243
|
-
{
|
|
244
|
-
{
|
|
241
|
+
{ label: "3", value: "3" },
|
|
242
|
+
{ label: "5.5", value: "5.5" },
|
|
243
|
+
{ label: "8", value: "8" },
|
|
244
|
+
{ label: "12", value: "12" },
|
|
245
245
|
],
|
|
246
246
|
},
|
|
247
247
|
},
|
|
@@ -103,22 +103,22 @@ export const EventUiSchema: any = {
|
|
|
103
103
|
label: "Event Type",
|
|
104
104
|
type: "text",
|
|
105
105
|
options: [
|
|
106
|
-
{
|
|
107
|
-
{
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
{
|
|
111
|
-
{
|
|
106
|
+
{ label: "Click Event", value: "onClick" },
|
|
107
|
+
{ label: "onStart", value: "onStart" },
|
|
108
|
+
{ label: "Load Event", value: "onLoad" },
|
|
109
|
+
{ label: "Change Event", value: "onChange" },
|
|
110
|
+
{ label: "Success", value: "Success" },
|
|
111
|
+
{ label: "Fail", value: "Fail" }
|
|
112
112
|
]
|
|
113
113
|
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
getSelectField("Handler", "Handler", [
|
|
118
|
-
{
|
|
119
|
-
{
|
|
120
|
-
{
|
|
121
|
-
{
|
|
118
|
+
{ label: "Custom", value: "custom" },
|
|
119
|
+
{ label: "Api", value: "api" },
|
|
120
|
+
{ label: "Inbuilt Function", value: "inBuiltFunction" },
|
|
121
|
+
{ label: "Refresh", value: "refresh" },
|
|
122
122
|
]),
|
|
123
123
|
],
|
|
124
124
|
},
|
|
@@ -10,8 +10,8 @@ import { TableSection } from "../build/uischema/tableSection";
|
|
|
10
10
|
import { ValueTab } from "../build/uischema/valueTab";
|
|
11
11
|
import { ValidationSection } from "../build/uischema/validationSections";
|
|
12
12
|
const sectionLabels = {
|
|
13
|
-
Select: ["Core", "Value", "style", "Event","Validation"],
|
|
14
|
-
MultipleSelect: ["Core", "Value", "style", "Event","Validation"],
|
|
13
|
+
Select: ["Core", "Properties","Value", "style", "Event","Validation"],
|
|
14
|
+
MultipleSelect: ["Core", "Properties","Value", "style", "Event","Validation"],
|
|
15
15
|
Table: ["Core", "Components", "Properties","style", "Event","Validation"],
|
|
16
16
|
LazyLoadingTable:["Core", "Components", "Properties", "style", "Event","Validation"],
|
|
17
17
|
LeaderBoard: ["Core", "Components", "Properties", "style", "Event","Validation"],
|
|
@@ -29,8 +29,8 @@ export default (
|
|
|
29
29
|
|
|
30
30
|
} else if (handlerType === "inBuiltFunction") {
|
|
31
31
|
uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
|
|
32
|
-
{
|
|
33
|
-
{
|
|
32
|
+
{ label: "RankProvider", value: "RankProvider" },
|
|
33
|
+
{ label: "Download File", value: "downloadFile" },
|
|
34
34
|
])
|
|
35
35
|
uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 })
|
|
36
36
|
} else if (handlerType === "refresh") {
|