impaktapps-ui-builder 1.0.450 → 1.0.451
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 +64 -15
- 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/tableSection.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +11 -6
- package/src/impaktapps-ui-builder/builder/services/component.ts +40 -9
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -6711,7 +6711,12 @@ const ComponentSchema = {
|
|
|
6711
6711
|
{ title: "Clone Icon", const: "CloneIcon" },
|
|
6712
6712
|
{ title: "Detail Icon", const: "DetailIcon" },
|
|
6713
6713
|
{ title: "Report View Icon", const: "ReportViewIcon" },
|
|
6714
|
-
{ title: "Payout", const: "Payout" }
|
|
6714
|
+
{ title: "Payout", const: "Payout" },
|
|
6715
|
+
{ title: "Info Outlined", const: "InfoOutlinedIcon" },
|
|
6716
|
+
{ title: "Territory Add", const: "TerritoryAdd" },
|
|
6717
|
+
{ title: "Territory Edit", const: "TerritoryEdit" },
|
|
6718
|
+
{ title: "Territory Delete", const: "TerritoryDelete" },
|
|
6719
|
+
{ title: "Git Compare", const: "GitCompare" }
|
|
6715
6720
|
]
|
|
6716
6721
|
},
|
|
6717
6722
|
color: {
|
|
@@ -8160,7 +8165,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8160
8165
|
getInputField("description", "Description"),
|
|
8161
8166
|
getSelectField("growthRate", "Growth Rate"),
|
|
8162
8167
|
getInputField("color", "Card Color"),
|
|
8163
|
-
emptyBox$1("MetricEmpty1", { xs: 6, sm:
|
|
8168
|
+
emptyBox$1("MetricEmpty1", { xs: 6, sm: 6, md: 4, lg: 3 })
|
|
8164
8169
|
];
|
|
8165
8170
|
break;
|
|
8166
8171
|
case "Button":
|
|
@@ -8258,6 +8263,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8258
8263
|
buildWrapper("Tree Table Properties", [
|
|
8259
8264
|
getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
|
|
8260
8265
|
getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
|
|
8266
|
+
getRadioInputField("lazyLoadTree", "Lazy Load Tree", ["YES", "NO"]),
|
|
8261
8267
|
getRadioInputField("paginateExpandedRows", "Multi Page Expansion", ["YES", "NO"]),
|
|
8262
8268
|
getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
|
|
8263
8269
|
getRadioInputField("filterFromLeafRows", "Filter from tree rows", ["YES", "NO"]),
|
|
@@ -8395,13 +8401,13 @@ const StyleSection = {
|
|
|
8395
8401
|
}
|
|
8396
8402
|
]
|
|
8397
8403
|
};
|
|
8398
|
-
const TableSection = (theme) => {
|
|
8404
|
+
const TableSection = (theme, scopeName = "elements") => {
|
|
8399
8405
|
const uiSchema = {
|
|
8400
8406
|
type: "HorizontalLayout",
|
|
8401
8407
|
elements: [
|
|
8402
8408
|
{
|
|
8403
8409
|
type: "Control",
|
|
8404
|
-
scope:
|
|
8410
|
+
scope: `#/properties/${scopeName}`,
|
|
8405
8411
|
options: {
|
|
8406
8412
|
widget: "Table"
|
|
8407
8413
|
},
|
|
@@ -8412,7 +8418,7 @@ const TableSection = (theme) => {
|
|
|
8412
8418
|
{
|
|
8413
8419
|
widget: {
|
|
8414
8420
|
type: "Control",
|
|
8415
|
-
scope:
|
|
8421
|
+
scope: `#/properties/${scopeName}_New_Record`,
|
|
8416
8422
|
options: {
|
|
8417
8423
|
widget: "IconButton"
|
|
8418
8424
|
},
|
|
@@ -8439,7 +8445,7 @@ const TableSection = (theme) => {
|
|
|
8439
8445
|
{
|
|
8440
8446
|
widget: {
|
|
8441
8447
|
type: "Control",
|
|
8442
|
-
scope: "
|
|
8448
|
+
scope: scopeName === "elements" ? `#/properties/Paste_Component` : `#/properties/Paste_TabsComponent`,
|
|
8443
8449
|
options: {
|
|
8444
8450
|
widget: "IconButton"
|
|
8445
8451
|
},
|
|
@@ -8504,7 +8510,7 @@ const TableSection = (theme) => {
|
|
|
8504
8510
|
},
|
|
8505
8511
|
{
|
|
8506
8512
|
type: "Control",
|
|
8507
|
-
scope: "
|
|
8513
|
+
scope: scopeName === "elements" ? `#/properties/Copy_Component` : `#/properties/Copy_TabsComponent`,
|
|
8508
8514
|
options: {
|
|
8509
8515
|
widget: "Button"
|
|
8510
8516
|
},
|
|
@@ -8697,6 +8703,10 @@ var buildConfig = (FormData) => {
|
|
|
8697
8703
|
if (formData.events) {
|
|
8698
8704
|
delete formData.events;
|
|
8699
8705
|
}
|
|
8706
|
+
if (formData.tabLabelElements) {
|
|
8707
|
+
component.tabLabelElements = formData.tabLabelElements || [];
|
|
8708
|
+
delete formData.tabLabelElements;
|
|
8709
|
+
}
|
|
8700
8710
|
component = { ...formData, ...component };
|
|
8701
8711
|
return component;
|
|
8702
8712
|
};
|
|
@@ -8855,7 +8865,7 @@ const sectionLabels = {
|
|
|
8855
8865
|
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style"],
|
|
8856
8866
|
WrapperSection: ["Core", "Components", "Properties", "Style"],
|
|
8857
8867
|
HorizontalLayout: ["Core", "Components", "Properties", "Style"],
|
|
8858
|
-
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
8868
|
+
TabSection: ["Core", "Components", "TabTitles", "Properties", "Style", "Validation"],
|
|
8859
8869
|
SpeedoMeter: ["Core", "Properties", "Events", "Style"],
|
|
8860
8870
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8861
8871
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
@@ -8903,6 +8913,7 @@ function refreshPage(type, store2) {
|
|
|
8903
8913
|
Style: StyleSection,
|
|
8904
8914
|
Events: EventSection(store2.theme.myTheme),
|
|
8905
8915
|
Components: TableSection(store2.theme.myTheme),
|
|
8916
|
+
TabTitles: TableSection(store2.theme.myTheme, "tabLabelElements"),
|
|
8906
8917
|
Properties: buildPropertiesSection(type),
|
|
8907
8918
|
Validation: ValidationSection
|
|
8908
8919
|
};
|
|
@@ -9100,8 +9111,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9100
9111
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
9101
9112
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9102
9113
|
if (path) {
|
|
9103
|
-
|
|
9104
|
-
|
|
9114
|
+
let finalPath = `${path}`;
|
|
9115
|
+
if ((_c = dynamicData2 == null ? void 0 : dynamicData2.path) == null ? void 0 : _c.startsWith("tabLabel")) {
|
|
9116
|
+
finalPath = `${finalPath}.tabLabelElements[${rowId}]`;
|
|
9117
|
+
} else {
|
|
9118
|
+
finalPath = `${finalPath}.elements[${rowId}]`;
|
|
9119
|
+
}
|
|
9105
9120
|
store2.searchParams.set("path", finalPath);
|
|
9106
9121
|
store2.setSearchParams(store2.searchParams);
|
|
9107
9122
|
this.setPage();
|
|
@@ -9113,7 +9128,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9113
9128
|
var _a;
|
|
9114
9129
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9115
9130
|
const rowId = sessionStorage.getItem("rowId");
|
|
9116
|
-
|
|
9131
|
+
const isTabLabelElements = sessionStorage.getItem("isTabLabelElements") === "true";
|
|
9132
|
+
if (isTabLabelElements) {
|
|
9133
|
+
store2.formData.tabLabelElements.splice(rowId, 1);
|
|
9134
|
+
} else {
|
|
9135
|
+
store2.formData.elements.splice(rowId, 1);
|
|
9136
|
+
}
|
|
9117
9137
|
const response = saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9118
9138
|
const data = path ? _.get(response, path) : response;
|
|
9119
9139
|
store2.setFormdata(data);
|
|
@@ -9121,6 +9141,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9121
9141
|
store2.updateDialog("popUpComponentSection");
|
|
9122
9142
|
}
|
|
9123
9143
|
sessionStorage.removeItem("rowId");
|
|
9144
|
+
sessionStorage.removeItem("isTabLabelElements");
|
|
9124
9145
|
},
|
|
9125
9146
|
deleteEvent: function(shouldUpdateDialog = true) {
|
|
9126
9147
|
var _a;
|
|
@@ -9141,9 +9162,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9141
9162
|
if (!Array.isArray(store2.formData.elements)) {
|
|
9142
9163
|
store2.formData.elements = [];
|
|
9143
9164
|
}
|
|
9165
|
+
if (!Array.isArray(store2.formData.tabLabelElements)) {
|
|
9166
|
+
store2.formData.tabLabelElements = [];
|
|
9167
|
+
}
|
|
9144
9168
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9145
9169
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9146
|
-
|
|
9170
|
+
let finalPath = `${path}`;
|
|
9171
|
+
if (dynamicData2.path.startsWith("tabLabel")) {
|
|
9172
|
+
finalPath = `${finalPath}.tabLabelElements[${store2.formData.tabLabelElements.length}]`;
|
|
9173
|
+
} else {
|
|
9174
|
+
finalPath = `${finalPath}.elements[${store2.formData.elements.length}]`;
|
|
9175
|
+
}
|
|
9147
9176
|
store2.searchParams.set("path", finalPath);
|
|
9148
9177
|
store2.setSearchParams(store2.searchParams);
|
|
9149
9178
|
this.setPage();
|
|
@@ -9178,6 +9207,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9178
9207
|
deletePopUpComponent: function() {
|
|
9179
9208
|
const rowId = dynamicData2.path.split(".")[1];
|
|
9180
9209
|
sessionStorage.setItem("rowId", rowId);
|
|
9210
|
+
sessionStorage.setItem("isTabLabelElements", dynamicData2.path.startsWith("tabLabel") ? "true" : "false");
|
|
9181
9211
|
store2.updateDialog("popUpComponentSection");
|
|
9182
9212
|
},
|
|
9183
9213
|
deletePopUpEvent: function() {
|
|
@@ -9224,9 +9254,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9224
9254
|
if (!Array.isArray(store2.formData.events)) {
|
|
9225
9255
|
store2.formData.events = [];
|
|
9226
9256
|
}
|
|
9257
|
+
if (!Array.isArray(store2.formData.tabLabelElements)) {
|
|
9258
|
+
store2.formData.tabLabelElements = [];
|
|
9259
|
+
}
|
|
9227
9260
|
saveFormdataInSessionStorage(store2.ctx.core.data, pastedElementParentPath);
|
|
9228
9261
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
9229
|
-
const
|
|
9262
|
+
const currentLength = {
|
|
9263
|
+
"TabsComponent": formData.tabLabelElements.length,
|
|
9264
|
+
"Component": formData.elements.length,
|
|
9265
|
+
"Events": formData.events.length
|
|
9266
|
+
};
|
|
9267
|
+
const insertElementIndex = currentLength[elementType] || 0;
|
|
9230
9268
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
9231
9269
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
9232
9270
|
const notificationMessages = {
|
|
@@ -9261,6 +9299,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9261
9299
|
if (elementType === "Component") {
|
|
9262
9300
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
9263
9301
|
}
|
|
9302
|
+
if (elementType === "TabsComponent") {
|
|
9303
|
+
return `${parentPath}.tabLabelElements[${rowId}]`;
|
|
9304
|
+
}
|
|
9264
9305
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
9265
9306
|
},
|
|
9266
9307
|
ElementPathSetter: function(uiSchema, copiedFormData) {
|
|
@@ -10924,14 +10965,14 @@ var service = (funcParams) => {
|
|
|
10924
10965
|
return response == null ? void 0 : response.data;
|
|
10925
10966
|
},
|
|
10926
10967
|
onPaginationChange: async function(paginationValues) {
|
|
10927
|
-
var _a
|
|
10968
|
+
var _a;
|
|
10928
10969
|
const apiBody = [
|
|
10929
10970
|
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
10930
10971
|
{ key: "pageIndex", value: paginationValues.pagination.pageIndex },
|
|
10931
10972
|
{ key: "sorting", value: paginationValues.sorting || [] },
|
|
10932
10973
|
{ key: "filters", value: paginationValues.tableColumnConfig || [] },
|
|
10933
10974
|
{ key: "globalFilter", value: (_a = paginationValues.globalFilter) != null ? _a : "" },
|
|
10934
|
-
{ key: "
|
|
10975
|
+
{ key: "parentIds", value: paginationValues.parentIds }
|
|
10935
10976
|
];
|
|
10936
10977
|
const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
|
|
10937
10978
|
return response == null ? void 0 : response.data;
|
|
@@ -11744,6 +11785,9 @@ const buildTable = (config2, componentScope2) => {
|
|
|
11744
11785
|
if (config2.lazyLoading) {
|
|
11745
11786
|
table.config.main.lazyLoading = config2.lazyLoading === "YES" ? true : false;
|
|
11746
11787
|
}
|
|
11788
|
+
if (config2.lazyLoadTree) {
|
|
11789
|
+
table.config.main.lazyTree = config2.lazyLoadTree === "YES" ? true : false;
|
|
11790
|
+
}
|
|
11747
11791
|
if (config2.defaultColumnSize) {
|
|
11748
11792
|
table.config.main.defaultColumnSize = config2.defaultColumnSize;
|
|
11749
11793
|
}
|
|
@@ -13649,6 +13693,11 @@ const buildUiSchema = (config2, store2) => {
|
|
|
13649
13693
|
});
|
|
13650
13694
|
}
|
|
13651
13695
|
}
|
|
13696
|
+
if (config2.tabLabelElements) {
|
|
13697
|
+
elements.tabLabelElements = config2.tabLabelElements.map((e, elemInd) => {
|
|
13698
|
+
return buildUiSchema(e, store2);
|
|
13699
|
+
});
|
|
13700
|
+
}
|
|
13652
13701
|
return elements;
|
|
13653
13702
|
};
|
|
13654
13703
|
export { buildConfig, buildSchema, buildUiSchema, clearFromSessionStorage, downloadFile$1 as downloadFile, downloadFileFromUrl, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|