impaktapps-ui-builder 0.0.392 → 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 +17 -108
- 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/build/uischema/lazyLoadingTable.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +0 -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 -5
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -9
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +0 -1
- 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: "Mount Event", const: "onMount" },
|
|
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
|
-
onMount: async function() {
|
|
8671
|
-
await this.callHandler("onMount");
|
|
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,10 +9539,6 @@ var Tabsection = {
|
|
|
9579
9539
|
};
|
|
9580
9540
|
const buildTabSection = (config, componentScope) => {
|
|
9581
9541
|
const tab = _.cloneDeep(Tabsection);
|
|
9582
|
-
tab.scopeName = componentScope;
|
|
9583
|
-
if (config.orientation) {
|
|
9584
|
-
tab.config.main.orientation = config.orientation === "YES" ? "vertical" : "horizontal";
|
|
9585
|
-
}
|
|
9586
9542
|
if (config.sectionLabels) {
|
|
9587
9543
|
tab.config.main.tabLabels = config.sectionLabels.map((e) => e.label);
|
|
9588
9544
|
}
|
|
@@ -9602,7 +9558,6 @@ var WrapperSection = {
|
|
|
9602
9558
|
};
|
|
9603
9559
|
const buildWrapperSection = (config, componentScope) => {
|
|
9604
9560
|
const wrapper = _.cloneDeep(WrapperSection);
|
|
9605
|
-
wrapper.scopeName = componentScope;
|
|
9606
9561
|
wrapper.config.main.label = config.label;
|
|
9607
9562
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9608
9563
|
if (config.style) {
|
|
@@ -9759,7 +9714,6 @@ var Table = {
|
|
|
9759
9714
|
elements: [],
|
|
9760
9715
|
config: {
|
|
9761
9716
|
main: {
|
|
9762
|
-
onMount: "onMount",
|
|
9763
9717
|
allRowData: [],
|
|
9764
9718
|
downloadAllData: false,
|
|
9765
9719
|
columns: {
|
|
@@ -9778,7 +9732,6 @@ var lazyLoadingTable = {
|
|
|
9778
9732
|
elements: [],
|
|
9779
9733
|
config: {
|
|
9780
9734
|
main: {
|
|
9781
|
-
onMount: "onMount",
|
|
9782
9735
|
columns: {}
|
|
9783
9736
|
}
|
|
9784
9737
|
}
|
|
@@ -10620,47 +10573,6 @@ const buildDataGrid = (config, componentScope) => {
|
|
|
10620
10573
|
}
|
|
10621
10574
|
return DataGrid;
|
|
10622
10575
|
};
|
|
10623
|
-
const InputSlider = {
|
|
10624
|
-
type: "Control",
|
|
10625
|
-
scope: "#/properties/inputSlider",
|
|
10626
|
-
options: {
|
|
10627
|
-
widget: "InputSlider"
|
|
10628
|
-
},
|
|
10629
|
-
config: {
|
|
10630
|
-
layout: 12,
|
|
10631
|
-
main: {
|
|
10632
|
-
limitToMax: false,
|
|
10633
|
-
max: 1e4,
|
|
10634
|
-
step: 1e3,
|
|
10635
|
-
min: 0,
|
|
10636
|
-
label: "Slider"
|
|
10637
|
-
}
|
|
10638
|
-
}
|
|
10639
|
-
};
|
|
10640
|
-
const buildInputSlider = (config, componentScope) => {
|
|
10641
|
-
const inputSlider = _.cloneDeep(InputSlider);
|
|
10642
|
-
inputSlider.scope = componentScope;
|
|
10643
|
-
inputSlider.config.main.label = config.label;
|
|
10644
|
-
if (config.layout) {
|
|
10645
|
-
inputSlider.config.layout = createLayoutFormat(config.layout);
|
|
10646
|
-
}
|
|
10647
|
-
if (config.limitToMax) {
|
|
10648
|
-
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
10649
|
-
}
|
|
10650
|
-
if (config.max) {
|
|
10651
|
-
inputSlider.config.main.max = config.max;
|
|
10652
|
-
}
|
|
10653
|
-
if (config.step) {
|
|
10654
|
-
inputSlider.config.main.step = config.step;
|
|
10655
|
-
}
|
|
10656
|
-
if (config.min) {
|
|
10657
|
-
inputSlider.config.main.min = config.min;
|
|
10658
|
-
}
|
|
10659
|
-
if (config.style) {
|
|
10660
|
-
inputSlider.config.main.defaultStyle = JSON.parse(config.style);
|
|
10661
|
-
}
|
|
10662
|
-
return inputSlider;
|
|
10663
|
-
};
|
|
10664
10576
|
let schema = {
|
|
10665
10577
|
type: "object",
|
|
10666
10578
|
properties: {},
|
|
@@ -10779,9 +10691,6 @@ const buildUiSchema = (config) => {
|
|
|
10779
10691
|
let elements = {};
|
|
10780
10692
|
const componentScope = `#/properties/${config.name}`;
|
|
10781
10693
|
switch (config.type) {
|
|
10782
|
-
case "InputSlider":
|
|
10783
|
-
elements = buildInputSlider(config, componentScope);
|
|
10784
|
-
break;
|
|
10785
10694
|
case "DataGrid":
|
|
10786
10695
|
elements = buildDataGrid(config, componentScope);
|
|
10787
10696
|
break;
|
|
@@ -10801,13 +10710,13 @@ const buildUiSchema = (config) => {
|
|
|
10801
10710
|
elements = buildPanField(config, componentScope);
|
|
10802
10711
|
break;
|
|
10803
10712
|
case "TabSection":
|
|
10804
|
-
elements = buildTabSection(config
|
|
10713
|
+
elements = buildTabSection(config);
|
|
10805
10714
|
break;
|
|
10806
10715
|
case "RunnerBoyProgressBar":
|
|
10807
10716
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
10808
10717
|
break;
|
|
10809
10718
|
case "WrapperSection":
|
|
10810
|
-
elements = buildWrapperSection(config
|
|
10719
|
+
elements = buildWrapperSection(config);
|
|
10811
10720
|
break;
|
|
10812
10721
|
case "Text":
|
|
10813
10722
|
elements = buildTextField(config, componentScope);
|