impaktapps-ui-builder 0.0.281 → 0.0.282
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 +97 -8
- 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/buildTable.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.d.ts +14 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +36 -8
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +8 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +14 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +2 -0
- package/src/impaktapps-ui-builder/runtime/services/events.ts +15 -12
- package/src/impaktapps-ui-builder/runtime/services/service.ts +21 -0
|
@@ -6089,6 +6089,7 @@ const componentBasicUiSchema = {
|
|
|
6089
6089
|
{ title: "Date", const: "Date" },
|
|
6090
6090
|
{ title: "CheckBox", const: "CheckBox" },
|
|
6091
6091
|
{ title: "Table", const: "Table" },
|
|
6092
|
+
{ title: "Lazy Loading Table", const: "LazyLoadingTable" },
|
|
6092
6093
|
{ title: "Array", const: "Array" },
|
|
6093
6094
|
{ title: "Container", const: "WrapperSection" },
|
|
6094
6095
|
{ title: "Tabs", const: "TabSection" },
|
|
@@ -6382,6 +6383,7 @@ const CoreSection = {
|
|
|
6382
6383
|
{ title: "Date", const: "Date" },
|
|
6383
6384
|
{ title: "CheckBox", const: "CheckBox" },
|
|
6384
6385
|
{ title: "Table", const: "Table" },
|
|
6386
|
+
{ title: "Lazy Loading Table", const: "LazyLoadingTable" },
|
|
6385
6387
|
{ title: "Array", const: "Array" },
|
|
6386
6388
|
{ title: "Container", const: "WrapperSection" },
|
|
6387
6389
|
{ title: "Tabs", const: "TabSection" },
|
|
@@ -6918,6 +6920,13 @@ const buildPropertiesSection = function(type) {
|
|
|
6918
6920
|
uiSchema.elements = [
|
|
6919
6921
|
getArrayControl("sectionLabels", "label")
|
|
6920
6922
|
];
|
|
6923
|
+
} else if (type === "Table" || type === "LazyLoadingTable") {
|
|
6924
|
+
uiSchema.elements = [
|
|
6925
|
+
getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
|
|
6926
|
+
getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
|
|
6927
|
+
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
6928
|
+
EmptyBox
|
|
6929
|
+
];
|
|
6921
6930
|
} else if (type === "Radio") {
|
|
6922
6931
|
uiSchema.elements = [
|
|
6923
6932
|
getArrayControl("sectionLabels", "label", "Options Of Radio")
|
|
@@ -7146,7 +7155,8 @@ const ValidationSection = {
|
|
|
7146
7155
|
const sectionLabels = {
|
|
7147
7156
|
Select: ["Core", "Value", "style", "Event", "Validation"],
|
|
7148
7157
|
MultipleSelect: ["Core", "Value", "style", "Event", "Validation"],
|
|
7149
|
-
Table: ["Core", "Components", "style", "Event", "Validation"],
|
|
7158
|
+
Table: ["Core", "Components", "Properties", "style", "Event", "Validation"],
|
|
7159
|
+
LazyLoadingTable: ["Core", "Components", "Properties", "style", "Event", "Validation"],
|
|
7150
7160
|
LeaderBoard: ["Core", "Components", "Properties", "style", "Event", "Validation"],
|
|
7151
7161
|
WrapperSection: ["Core", "Components", "Properties", "style", "Validation"],
|
|
7152
7162
|
TabSection: ["Core", "Components", "Properties", "style", "Validation"],
|
|
@@ -8249,12 +8259,51 @@ var Table = {
|
|
|
8249
8259
|
}
|
|
8250
8260
|
}
|
|
8251
8261
|
};
|
|
8262
|
+
var lazyLoadingTable = {
|
|
8263
|
+
type: "Control",
|
|
8264
|
+
scope: "#/properties/LazyLoadingTable",
|
|
8265
|
+
options: {
|
|
8266
|
+
widget: "LazyLoadingTable"
|
|
8267
|
+
},
|
|
8268
|
+
elements: [],
|
|
8269
|
+
config: {
|
|
8270
|
+
main: {
|
|
8271
|
+
columns: {}
|
|
8272
|
+
}
|
|
8273
|
+
}
|
|
8274
|
+
};
|
|
8252
8275
|
const buildTable = (config, componentScope) => {
|
|
8253
8276
|
const table = _.cloneDeep(Table);
|
|
8254
8277
|
table.scope = componentScope;
|
|
8255
8278
|
if (config.style) {
|
|
8256
8279
|
table.config.style = JSON.parse(config.style);
|
|
8257
8280
|
}
|
|
8281
|
+
if (config.SelectionAvailable) {
|
|
8282
|
+
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
8283
|
+
}
|
|
8284
|
+
if (config.ColumnResizingAvailable) {
|
|
8285
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
|
|
8286
|
+
}
|
|
8287
|
+
if (config.DragAvailable) {
|
|
8288
|
+
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
8289
|
+
}
|
|
8290
|
+
return table;
|
|
8291
|
+
};
|
|
8292
|
+
const buildLazyLoadingTable = (config, componentScope) => {
|
|
8293
|
+
const table = _.cloneDeep(lazyLoadingTable);
|
|
8294
|
+
table.scope = componentScope;
|
|
8295
|
+
if (config.style) {
|
|
8296
|
+
table.config.style = JSON.parse(config.style);
|
|
8297
|
+
}
|
|
8298
|
+
if (config.SelectionAvailable) {
|
|
8299
|
+
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
8300
|
+
}
|
|
8301
|
+
if (config.ColumnResizingAvailable) {
|
|
8302
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
|
|
8303
|
+
}
|
|
8304
|
+
if (config.DragAvailable) {
|
|
8305
|
+
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
8306
|
+
}
|
|
8258
8307
|
table.config.main.label = config.label;
|
|
8259
8308
|
return table;
|
|
8260
8309
|
};
|
|
@@ -8897,6 +8946,9 @@ const buildUiSchema = (config) => {
|
|
|
8897
8946
|
case "Table":
|
|
8898
8947
|
elements = buildTable(config, componentScope);
|
|
8899
8948
|
break;
|
|
8949
|
+
case "LazyLoadingTable":
|
|
8950
|
+
elements = buildLazyLoadingTable(config, componentScope);
|
|
8951
|
+
break;
|
|
8900
8952
|
case "Box":
|
|
8901
8953
|
elements = buildLabel(config, componentScope);
|
|
8902
8954
|
break;
|
|
@@ -9843,6 +9895,10 @@ async function mergeFormdata(handlerResponse, componentName2, eventConfig, store
|
|
|
9843
9895
|
}
|
|
9844
9896
|
};
|
|
9845
9897
|
});
|
|
9898
|
+
} else if (eventConfig.type === "LazyLoadingTable") {
|
|
9899
|
+
store2.setFormdata((pre) => {
|
|
9900
|
+
return { ...pre, [`${componentName2}Backend`]: handlerResponse };
|
|
9901
|
+
});
|
|
9846
9902
|
} else if (eventConfig.type === "page") {
|
|
9847
9903
|
store2.setFormdata((pre) => {
|
|
9848
9904
|
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
@@ -9858,14 +9914,18 @@ const buildBodyFormat = (body2, formData, userValue2) => {
|
|
|
9858
9914
|
const finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
|
|
9859
9915
|
body2.map((elem) => {
|
|
9860
9916
|
var _a, _b;
|
|
9861
|
-
if ((
|
|
9862
|
-
const finalpath = elem.value.substring(11);
|
|
9863
|
-
finalBody[elem.key] = _.get(userValue2, finalpath);
|
|
9864
|
-
} else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
|
|
9865
|
-
const finalpath = elem.value.substring(1);
|
|
9866
|
-
finalBody[elem.key] = _.get(formData, finalpath);
|
|
9867
|
-
} else {
|
|
9917
|
+
if ((elem == null ? void 0 : elem.value) !== "string") {
|
|
9868
9918
|
finalBody[elem.key] = elem.value;
|
|
9919
|
+
} else {
|
|
9920
|
+
if ((_a = elem == null ? void 0 : elem.value) == null ? void 0 : _a.startsWith("$userValue")) {
|
|
9921
|
+
const finalpath = elem.value.substring(11);
|
|
9922
|
+
finalBody[elem.key] = _.get(userValue2, finalpath);
|
|
9923
|
+
} else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
|
|
9924
|
+
const finalpath = elem.value.substring(1);
|
|
9925
|
+
finalBody[elem.key] = _.get(formData, finalpath);
|
|
9926
|
+
} else {
|
|
9927
|
+
finalBody[elem.key] = elem.value;
|
|
9928
|
+
}
|
|
9869
9929
|
}
|
|
9870
9930
|
});
|
|
9871
9931
|
return finalBody;
|
|
@@ -10004,6 +10064,35 @@ var service = (funcParams) => {
|
|
|
10004
10064
|
);
|
|
10005
10065
|
}
|
|
10006
10066
|
},
|
|
10067
|
+
onPaginationChange: async (paginationValues) => {
|
|
10068
|
+
var _a;
|
|
10069
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onLoad[paginationValues.path]) {
|
|
10070
|
+
const bodyValues = [
|
|
10071
|
+
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
10072
|
+
{ key: "start", value: paginationValues.pagination.pageIndex * paginationValues.pagination.pageSize },
|
|
10073
|
+
{ key: "filters", value: paginationValues.columnFilters || [] },
|
|
10074
|
+
{ key: "globalFilter", value: (_a = paginationValues.globalFilter) != null ? _a : "" }
|
|
10075
|
+
];
|
|
10076
|
+
if (eventConfig.body) {
|
|
10077
|
+
eventConfig.body = [
|
|
10078
|
+
...eventConfig.body,
|
|
10079
|
+
...bodyValues
|
|
10080
|
+
];
|
|
10081
|
+
} else {
|
|
10082
|
+
eventConfig.body = bodyValues;
|
|
10083
|
+
}
|
|
10084
|
+
await executeEvents(
|
|
10085
|
+
eventConfig,
|
|
10086
|
+
paginationValues.path,
|
|
10087
|
+
funcParams.store,
|
|
10088
|
+
funcParams.dynamicData,
|
|
10089
|
+
funcParams.userValue,
|
|
10090
|
+
funcParams.service,
|
|
10091
|
+
void 0,
|
|
10092
|
+
eventGroups
|
|
10093
|
+
);
|
|
10094
|
+
}
|
|
10095
|
+
},
|
|
10007
10096
|
onChange: async function() {
|
|
10008
10097
|
if (eventGroups.onChange) {
|
|
10009
10098
|
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|