impaktapps-ui-builder 0.0.391 → 0.0.393-alpha.2
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 +15 -102
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +9 -9
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +0 -6
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +0 -6
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +6 -8
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -4
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -9
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -8
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +4 -8
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -2
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +4 -11
- 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 +8 -10
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +0 -46
|
@@ -11,7 +11,6 @@ interface funcParamsProps {
|
|
|
11
11
|
declare const _default: (funcParams: funcParamsProps) => {
|
|
12
12
|
setPage: () => Promise<void>;
|
|
13
13
|
onClick: () => Promise<void>;
|
|
14
|
-
onLazyLoad: () => Promise<void>;
|
|
15
14
|
onFileDownload: () => Promise<void>;
|
|
16
15
|
onFileUpload: () => Promise<void>;
|
|
17
16
|
onPaginationChange: (paginationValues: any) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import leaderBoard from "./uischema/leaderBoard";
|
|
2
|
-
import
|
|
2
|
+
import buildUiSchema from "./buildUiSchema";
|
|
3
3
|
import _ from "lodash";
|
|
4
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
export const buildLeaderBoard = (config) => {
|
|
8
|
-
const LeaderBoard:
|
|
7
|
+
const LeaderBoard:any = _.cloneDeep(leaderBoard)
|
|
9
8
|
if (config.elements) {
|
|
10
9
|
const modifyColumns = config.elements.map((e, i) => {
|
|
11
10
|
if (!e.type) {
|
|
12
|
-
return {
|
|
11
|
+
return {accessorKey: e.name, header: e.label||e.name, }
|
|
13
12
|
}
|
|
14
|
-
const widgetSchema = {
|
|
15
|
-
return {
|
|
13
|
+
const widgetSchema = {widget:buildUiSchema(e), accessorKey: e.name,header: e.label||e.name, };
|
|
14
|
+
return {...widgetSchema };
|
|
16
15
|
})
|
|
17
16
|
LeaderBoard.elements[9].elements = modifyColumns;
|
|
18
17
|
}
|
|
19
|
-
LeaderBoard.config.main.label = config.label
|
|
20
18
|
if (config.name) {
|
|
21
19
|
LeaderBoard.elements[0].scope = `#/properties/${config.name}/properties/firstImage`;
|
|
22
20
|
LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`
|
|
@@ -36,7 +34,7 @@ export const buildLeaderBoard = (config) => {
|
|
|
36
34
|
LeaderBoard.elements[2].config.main.url = config.thirdImage;
|
|
37
35
|
}
|
|
38
36
|
if (config.layout) {
|
|
39
|
-
LeaderBoard.config.layout =
|
|
37
|
+
LeaderBoard.config.layout = config.layout;
|
|
40
38
|
}
|
|
41
39
|
return LeaderBoard
|
|
42
40
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import Tabsection from "./uischema/tabsection";
|
|
2
2
|
import _ from "lodash";
|
|
3
|
-
|
|
3
|
+
import buildUiSchema from "./buildUiSchema";
|
|
4
|
+
|
|
4
5
|
export const buildTabSection = (config:any,componentScope:string) => {
|
|
5
6
|
const tab: any = _.cloneDeep(Tabsection);
|
|
6
|
-
if(config.orientation){
|
|
7
|
-
tab.config.main.orientation = config.orientation === "YES" ?'vertical':'horizontal';
|
|
8
|
-
}
|
|
9
7
|
if (config.sectionLabels) {
|
|
10
8
|
tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
|
|
11
9
|
}
|
|
@@ -37,7 +37,6 @@ import { buildFileInput } from "./buildFileInput";
|
|
|
37
37
|
import { buildStepper } from "./buildStepper";
|
|
38
38
|
import { buildPopUp } from "./buildPop";
|
|
39
39
|
import { buildDataGrid } from "./buildDataGrid";
|
|
40
|
-
import { buildInputSlider } from "./buildInputSlider";
|
|
41
40
|
export let schema = {
|
|
42
41
|
type: "object",
|
|
43
42
|
properties: {},
|
|
@@ -168,9 +167,6 @@ const buildUiSchema = (config: any) => {
|
|
|
168
167
|
let elements: any = {};
|
|
169
168
|
const componentScope = `#/properties/${config.name}`;
|
|
170
169
|
switch (config.type) {
|
|
171
|
-
case "InputSlider":
|
|
172
|
-
elements = buildInputSlider(config, componentScope);
|
|
173
|
-
break;
|
|
174
170
|
case "DataGrid":
|
|
175
171
|
elements = buildDataGrid(config, componentScope);
|
|
176
172
|
break;
|
|
@@ -235,14 +235,6 @@ const GraphSection = {
|
|
|
235
235
|
export const buildPropertiesSection = function (type: String) {
|
|
236
236
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
237
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
238
|
case "DataGrid":
|
|
247
239
|
uiSchema.elements = [
|
|
248
240
|
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
@@ -371,7 +363,6 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
371
363
|
|
|
372
364
|
case "TabSection":
|
|
373
365
|
uiSchema.elements = [
|
|
374
|
-
getRadioInputField("verticalOrientation", "Vertical Orientation", ["YES", "NO"]),EmptyBox,
|
|
375
366
|
getArrayControl("sectionLabels", "label"),
|
|
376
367
|
]
|
|
377
368
|
break;
|
|
@@ -16,7 +16,6 @@ export const ComponentSchema: any = {
|
|
|
16
16
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
17
17
|
{ title: "File", const: "FileInput" },
|
|
18
18
|
{ title: "Graph", const: "Graph" },
|
|
19
|
-
{ title: "Input Slider", const: "InputSlider" },
|
|
20
19
|
{ title: "Label", const: "Box" },
|
|
21
20
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
22
21
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
@@ -23,13 +23,6 @@ export const PageMasterSchema = {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
-
template: {
|
|
27
|
-
oneOf: [
|
|
28
|
-
{ const: "Template-1", title: "template1" },
|
|
29
|
-
{ const: "Template-2", title: "template2" },
|
|
30
|
-
{ const: "Template-3", title: "template3" }
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
26
|
sectionLabels: {
|
|
34
27
|
type: "array",
|
|
35
28
|
items: {
|
|
@@ -42,5 +35,5 @@ export const PageMasterSchema = {
|
|
|
42
35
|
},
|
|
43
36
|
}
|
|
44
37
|
},
|
|
45
|
-
required:["
|
|
38
|
+
required:["label","name"]
|
|
46
39
|
}
|
|
@@ -80,20 +80,16 @@ export const PageMasterUiSchema: any = {
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
type: "Control",
|
|
83
|
-
scope: "#/properties/
|
|
83
|
+
scope: "#/properties/label",
|
|
84
84
|
|
|
85
85
|
options: {
|
|
86
|
-
widget: "
|
|
86
|
+
widget: "InputField",
|
|
87
87
|
},
|
|
88
88
|
config: {
|
|
89
89
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
90
90
|
main: {
|
|
91
|
-
label: "
|
|
92
|
-
options: [
|
|
93
|
-
{const:"template1",title:"template1"},
|
|
94
|
-
{const:"template2",title:"template2"},
|
|
95
|
-
{const:"template3",title:"template3"}
|
|
96
|
-
],
|
|
91
|
+
label: "Label",
|
|
92
|
+
options: [],
|
|
97
93
|
color: "secondary",
|
|
98
94
|
required: true,
|
|
99
95
|
},
|
|
@@ -41,7 +41,6 @@ export const EventSchema = {
|
|
|
41
41
|
{ title: "Click Event", const: "onClick" },
|
|
42
42
|
{ title: "Load Event", const: "onLoad" },
|
|
43
43
|
{ title: "Change Event", const: "onChange" },
|
|
44
|
-
{ title: "Lazy Load Event", const: "onLazyLoad" },
|
|
45
44
|
{ title: "Success", const: "Success" },
|
|
46
45
|
{ title: "onStart", const: "onStart" },
|
|
47
46
|
|
|
@@ -66,7 +65,7 @@ export const EventSchema = {
|
|
|
66
65
|
oneOf: [
|
|
67
66
|
{ title: "RankProvider", const: "RankProvider" },
|
|
68
67
|
{ title: "Download File", const: "downloadFile" },
|
|
69
|
-
{ title: "Download", const: "download" }
|
|
68
|
+
{ title: "Download", const: "download" },
|
|
70
69
|
]
|
|
71
70
|
},
|
|
72
71
|
body: {
|
|
@@ -36,7 +36,6 @@ const sectionLabels = {
|
|
|
36
36
|
PopUp: ["Core", "Components","Properties", "style"],
|
|
37
37
|
Stepper: ["Core", "Components","Properties","Event", "style"],
|
|
38
38
|
DataGrid: ["Core", "Components","Properties","Event", "style"],
|
|
39
|
-
InputSlider:["Core","Properties","style", "Event","Validation"],
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
|
|
@@ -49,18 +49,11 @@ export default (funcParams: funcParamsProps) => {
|
|
|
49
49
|
store.formData.elements = []
|
|
50
50
|
}
|
|
51
51
|
const response = saveFormdataInLocalStorage(store.ctx.core.data)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
);
|
|
56
|
-
}else{
|
|
57
|
-
store.navigate(
|
|
58
|
-
`/Component?path=${`elements[${response?.elements.length}]`}`
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
52
|
+
store.navigate(
|
|
53
|
+
`/Component?path=${`elements[${response?.elements.length}]`}&id=${id}`
|
|
54
|
+
);
|
|
62
55
|
},
|
|
63
|
-
saveHandler: async ()
|
|
56
|
+
saveHandler: async ()=> await saveHandler(store,service,submitHandler),
|
|
64
57
|
Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
|
|
65
58
|
Delete_Components: Component(store, dynamicData, submitHandler, service).deleteComponents,
|
|
66
59
|
eventAddHandler: function () {
|
|
@@ -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=${
|
|
68
|
+
navigateHandler(store, true, pageName ? `/${pageName}?id=${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)
|
|
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
|
|
65
|
+
serviceHolder: { downloadFile,download:doDownload }, eventGroups
|
|
66
66
|
};
|
|
67
67
|
return {
|
|
68
68
|
setPage: async function () {
|
|
@@ -73,12 +73,13 @@ export default (funcParams: funcParamsProps) => {
|
|
|
73
73
|
serviceHolder: this, eventGroups
|
|
74
74
|
}
|
|
75
75
|
funcParams.store.setSchema(
|
|
76
|
-
(pre: any) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
76
|
+
// (pre: any) => {
|
|
77
|
+
// return {
|
|
78
|
+
// ...funcParams.schema, properties:
|
|
79
|
+
// { ...funcParams.schema.properties, ...pre.properties, }
|
|
80
|
+
// }
|
|
81
|
+
// }
|
|
82
|
+
funcParams.schema
|
|
82
83
|
)
|
|
83
84
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
84
85
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
@@ -91,9 +92,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
91
92
|
onClick: async function () {
|
|
92
93
|
await this.callHandler("onClick")
|
|
93
94
|
},
|
|
94
|
-
onLazyLoad: async function () {
|
|
95
|
-
await this.callHandler("onLazyLoad")
|
|
96
|
-
},
|
|
97
95
|
onFileDownload: async function () {
|
|
98
96
|
await this.callHandler("onDownload")
|
|
99
97
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildInputSlider: (config: any, componentScope: any) => any;
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
}
|