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
|
@@ -22,13 +22,6 @@ const PageMasterSchema = {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
template: {
|
|
26
|
-
oneOf: [
|
|
27
|
-
{ const: "Template-1", title: "template1" },
|
|
28
|
-
{ const: "Template-2", title: "template2" },
|
|
29
|
-
{ const: "Template-3", title: "template3" }
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
25
|
sectionLabels: {
|
|
33
26
|
type: "array",
|
|
34
27
|
items: {
|
|
@@ -41,7 +34,7 @@ const PageMasterSchema = {
|
|
|
41
34
|
}
|
|
42
35
|
}
|
|
43
36
|
},
|
|
44
|
-
required: ["
|
|
37
|
+
required: ["label", "name"]
|
|
45
38
|
};
|
|
46
39
|
const PageMasterUiSchema = {
|
|
47
40
|
type: "HorizontalLayout",
|
|
@@ -121,19 +114,15 @@ const PageMasterUiSchema = {
|
|
|
121
114
|
},
|
|
122
115
|
{
|
|
123
116
|
type: "Control",
|
|
124
|
-
scope: "#/properties/
|
|
117
|
+
scope: "#/properties/label",
|
|
125
118
|
options: {
|
|
126
|
-
widget: "
|
|
119
|
+
widget: "InputField"
|
|
127
120
|
},
|
|
128
121
|
config: {
|
|
129
122
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
130
123
|
main: {
|
|
131
|
-
label: "
|
|
132
|
-
options: [
|
|
133
|
-
{ const: "template1", title: "template1" },
|
|
134
|
-
{ const: "template2", title: "template2" },
|
|
135
|
-
{ const: "template3", title: "template3" }
|
|
136
|
-
],
|
|
124
|
+
label: "Label",
|
|
125
|
+
options: [],
|
|
137
126
|
color: "secondary",
|
|
138
127
|
required: true
|
|
139
128
|
}
|
|
@@ -5888,7 +5877,6 @@ const ComponentSchema = {
|
|
|
5888
5877
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
5889
5878
|
{ title: "File", const: "FileInput" },
|
|
5890
5879
|
{ title: "Graph", const: "Graph" },
|
|
5891
|
-
{ title: "Input Slider", const: "InputSlider" },
|
|
5892
5880
|
{ title: "Label", const: "Box" },
|
|
5893
5881
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5894
5882
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
@@ -6896,14 +6884,6 @@ const GraphSection = {
|
|
|
6896
6884
|
const buildPropertiesSection = function(type) {
|
|
6897
6885
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6898
6886
|
switch (type) {
|
|
6899
|
-
case "InputSlider":
|
|
6900
|
-
uiSchema.elements = [
|
|
6901
|
-
getInputField("max", "Max Limit"),
|
|
6902
|
-
getInputField("step", "Step"),
|
|
6903
|
-
getInputField("min", "Min Limit"),
|
|
6904
|
-
getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"])
|
|
6905
|
-
];
|
|
6906
|
-
break;
|
|
6907
6887
|
case "DataGrid":
|
|
6908
6888
|
uiSchema.elements = [
|
|
6909
6889
|
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
@@ -7020,8 +7000,6 @@ const buildPropertiesSection = function(type) {
|
|
|
7020
7000
|
break;
|
|
7021
7001
|
case "TabSection":
|
|
7022
7002
|
uiSchema.elements = [
|
|
7023
|
-
getRadioInputField("verticalOrientation", "Vertical Orientation", ["YES", "NO"]),
|
|
7024
|
-
EmptyBox,
|
|
7025
7003
|
getArrayControl("sectionLabels", "label")
|
|
7026
7004
|
];
|
|
7027
7005
|
break;
|
|
@@ -7415,14 +7393,14 @@ const getFormdataFromLocalStorage = (path) => {
|
|
|
7415
7393
|
};
|
|
7416
7394
|
async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
7417
7395
|
var _a, _b;
|
|
7418
|
-
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7396
|
+
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7419
7397
|
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7420
7398
|
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7421
7399
|
const config = JSON.parse(localStorage.getItem("pageFormdata"));
|
|
7422
7400
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7423
7401
|
try {
|
|
7424
7402
|
const saveReturn = await submitHandler(store2, service2, config);
|
|
7425
|
-
navigateHandler(store2, true, pageName ? `/${pageName}?id=${
|
|
7403
|
+
navigateHandler(store2, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords");
|
|
7426
7404
|
} catch (err) {
|
|
7427
7405
|
navigateHandler(store2, false);
|
|
7428
7406
|
}
|
|
@@ -7489,8 +7467,7 @@ const sectionLabels = {
|
|
|
7489
7467
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7490
7468
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7491
7469
|
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7492
|
-
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7493
|
-
InputSlider: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7470
|
+
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7494
7471
|
};
|
|
7495
7472
|
const refreshPage = (type, store2) => {
|
|
7496
7473
|
var _a;
|
|
@@ -7645,15 +7622,9 @@ var pageMaster = (funcParams) => {
|
|
|
7645
7622
|
store2.formData.elements = [];
|
|
7646
7623
|
}
|
|
7647
7624
|
const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
);
|
|
7652
|
-
} else {
|
|
7653
|
-
store2.navigate(
|
|
7654
|
-
`/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}`
|
|
7655
|
-
);
|
|
7656
|
-
}
|
|
7625
|
+
store2.navigate(
|
|
7626
|
+
`/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
|
|
7627
|
+
);
|
|
7657
7628
|
},
|
|
7658
7629
|
saveHandler: async () => await saveHandler(store2, service2, submitHandler),
|
|
7659
7630
|
Edit_Components: Component(store2, dynamicData2, submitHandler, service2).editComponents,
|
|
@@ -7727,7 +7698,6 @@ const EventSchema = {
|
|
|
7727
7698
|
{ title: "Click Event", const: "onClick" },
|
|
7728
7699
|
{ title: "Load Event", const: "onLoad" },
|
|
7729
7700
|
{ title: "Change Event", const: "onChange" },
|
|
7730
|
-
{ title: "Lazy Load Event", const: "onLazyLoad" },
|
|
7731
7701
|
{ title: "Success", const: "Success" },
|
|
7732
7702
|
{ title: "onStart", const: "onStart" },
|
|
7733
7703
|
{ title: "File Upload Event", const: "onUpload" },
|
|
@@ -8439,7 +8409,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8439
8409
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8440
8410
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8441
8411
|
}
|
|
8442
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter
|
|
8412
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8443
8413
|
}
|
|
8444
8414
|
async function executeCustomHandler(params) {
|
|
8445
8415
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8487,8 +8457,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8487
8457
|
} else {
|
|
8488
8458
|
if (handlerResponse) {
|
|
8489
8459
|
store2.setFormdata((pre) => {
|
|
8490
|
-
|
|
8491
|
-
return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
|
|
8460
|
+
return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
|
|
8492
8461
|
});
|
|
8493
8462
|
await asyncOperation();
|
|
8494
8463
|
}
|
|
@@ -8644,12 +8613,7 @@ var service = (funcParams) => {
|
|
|
8644
8613
|
eventGroups
|
|
8645
8614
|
};
|
|
8646
8615
|
funcParams.store.setSchema(
|
|
8647
|
-
|
|
8648
|
-
return {
|
|
8649
|
-
...funcParams.schema,
|
|
8650
|
-
properties: { ...funcParams.schema.properties, ...pre.properties }
|
|
8651
|
-
};
|
|
8652
|
-
}
|
|
8616
|
+
funcParams.schema
|
|
8653
8617
|
);
|
|
8654
8618
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
8655
8619
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
@@ -8667,9 +8631,6 @@ var service = (funcParams) => {
|
|
|
8667
8631
|
onClick: async function() {
|
|
8668
8632
|
await this.callHandler("onClick");
|
|
8669
8633
|
},
|
|
8670
|
-
onLazyLoad: async function() {
|
|
8671
|
-
await this.callHandler("onLazyLoad");
|
|
8672
|
-
},
|
|
8673
8634
|
onFileDownload: async function() {
|
|
8674
8635
|
await this.callHandler("onDownload");
|
|
8675
8636
|
},
|
|
@@ -9126,7 +9087,6 @@ const buildLeaderBoard = (config) => {
|
|
|
9126
9087
|
});
|
|
9127
9088
|
LeaderBoard.elements[9].elements = modifyColumns;
|
|
9128
9089
|
}
|
|
9129
|
-
LeaderBoard.config.main.label = config.label;
|
|
9130
9090
|
if (config.name) {
|
|
9131
9091
|
LeaderBoard.elements[0].scope = `#/properties/${config.name}/properties/firstImage`;
|
|
9132
9092
|
LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`;
|
|
@@ -9146,7 +9106,7 @@ const buildLeaderBoard = (config) => {
|
|
|
9146
9106
|
LeaderBoard.elements[2].config.main.url = config.thirdImage;
|
|
9147
9107
|
}
|
|
9148
9108
|
if (config.layout) {
|
|
9149
|
-
LeaderBoard.config.layout =
|
|
9109
|
+
LeaderBoard.config.layout = config.layout;
|
|
9150
9110
|
}
|
|
9151
9111
|
return LeaderBoard;
|
|
9152
9112
|
};
|
|
@@ -9579,9 +9539,6 @@ var Tabsection = {
|
|
|
9579
9539
|
};
|
|
9580
9540
|
const buildTabSection = (config, componentScope) => {
|
|
9581
9541
|
const tab = _.cloneDeep(Tabsection);
|
|
9582
|
-
if (config.orientation) {
|
|
9583
|
-
tab.config.main.orientation = config.orientation === "YES" ? "vertical" : "horizontal";
|
|
9584
|
-
}
|
|
9585
9542
|
if (config.sectionLabels) {
|
|
9586
9543
|
tab.config.main.tabLabels = config.sectionLabels.map((e) => e.label);
|
|
9587
9544
|
}
|
|
@@ -10616,47 +10573,6 @@ const buildDataGrid = (config, componentScope) => {
|
|
|
10616
10573
|
}
|
|
10617
10574
|
return DataGrid;
|
|
10618
10575
|
};
|
|
10619
|
-
const InputSlider = {
|
|
10620
|
-
type: "Control",
|
|
10621
|
-
scope: "#/properties/inputSlider",
|
|
10622
|
-
options: {
|
|
10623
|
-
widget: "InputSlider"
|
|
10624
|
-
},
|
|
10625
|
-
config: {
|
|
10626
|
-
layout: 12,
|
|
10627
|
-
main: {
|
|
10628
|
-
limitToMax: false,
|
|
10629
|
-
max: 1e4,
|
|
10630
|
-
step: 1e3,
|
|
10631
|
-
min: 0,
|
|
10632
|
-
label: "Slider"
|
|
10633
|
-
}
|
|
10634
|
-
}
|
|
10635
|
-
};
|
|
10636
|
-
const buildInputSlider = (config, componentScope) => {
|
|
10637
|
-
const inputSlider = _.cloneDeep(InputSlider);
|
|
10638
|
-
inputSlider.scope = componentScope;
|
|
10639
|
-
inputSlider.config.main.label = config.label;
|
|
10640
|
-
if (config.layout) {
|
|
10641
|
-
inputSlider.config.layout = createLayoutFormat(config.layout);
|
|
10642
|
-
}
|
|
10643
|
-
if (config.limitToMax) {
|
|
10644
|
-
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
10645
|
-
}
|
|
10646
|
-
if (config.max) {
|
|
10647
|
-
inputSlider.config.main.max = config.max;
|
|
10648
|
-
}
|
|
10649
|
-
if (config.step) {
|
|
10650
|
-
inputSlider.config.main.step = config.step;
|
|
10651
|
-
}
|
|
10652
|
-
if (config.min) {
|
|
10653
|
-
inputSlider.config.main.min = config.min;
|
|
10654
|
-
}
|
|
10655
|
-
if (config.style) {
|
|
10656
|
-
inputSlider.config.main.defaultStyle = JSON.parse(config.style);
|
|
10657
|
-
}
|
|
10658
|
-
return inputSlider;
|
|
10659
|
-
};
|
|
10660
10576
|
let schema = {
|
|
10661
10577
|
type: "object",
|
|
10662
10578
|
properties: {},
|
|
@@ -10775,9 +10691,6 @@ const buildUiSchema = (config) => {
|
|
|
10775
10691
|
let elements = {};
|
|
10776
10692
|
const componentScope = `#/properties/${config.name}`;
|
|
10777
10693
|
switch (config.type) {
|
|
10778
|
-
case "InputSlider":
|
|
10779
|
-
elements = buildInputSlider(config, componentScope);
|
|
10780
|
-
break;
|
|
10781
10694
|
case "DataGrid":
|
|
10782
10695
|
elements = buildDataGrid(config, componentScope);
|
|
10783
10696
|
break;
|