impaktapps-ui-builder 1.0.290 → 1.0.291
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 +51 -26
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- 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/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -2
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
- package/src/impaktapps-ui-builder/builder/services/component.ts +40 -9
- package/src/impaktapps-ui-builder/runtime/services/service.ts +0 -15
|
@@ -8414,13 +8414,13 @@ const StyleSection = {
|
|
|
8414
8414
|
}
|
|
8415
8415
|
]
|
|
8416
8416
|
};
|
|
8417
|
-
const TableSection = (theme) => {
|
|
8417
|
+
const TableSection = (theme, scopeName = "elements") => {
|
|
8418
8418
|
const uiSchema = {
|
|
8419
8419
|
type: "HorizontalLayout",
|
|
8420
8420
|
elements: [
|
|
8421
8421
|
{
|
|
8422
8422
|
type: "Control",
|
|
8423
|
-
scope:
|
|
8423
|
+
scope: `#/properties/${scopeName}`,
|
|
8424
8424
|
options: {
|
|
8425
8425
|
widget: "Table"
|
|
8426
8426
|
},
|
|
@@ -8431,7 +8431,7 @@ const TableSection = (theme) => {
|
|
|
8431
8431
|
{
|
|
8432
8432
|
widget: {
|
|
8433
8433
|
type: "Control",
|
|
8434
|
-
scope:
|
|
8434
|
+
scope: `#/properties/${scopeName}_New_Record`,
|
|
8435
8435
|
options: {
|
|
8436
8436
|
widget: "IconButton"
|
|
8437
8437
|
},
|
|
@@ -8458,7 +8458,7 @@ const TableSection = (theme) => {
|
|
|
8458
8458
|
{
|
|
8459
8459
|
widget: {
|
|
8460
8460
|
type: "Control",
|
|
8461
|
-
scope: "
|
|
8461
|
+
scope: scopeName === "elements" ? `#/properties/Paste_Component` : `#/properties/Paste_TabsComponent`,
|
|
8462
8462
|
options: {
|
|
8463
8463
|
widget: "IconButton"
|
|
8464
8464
|
},
|
|
@@ -8523,7 +8523,7 @@ const TableSection = (theme) => {
|
|
|
8523
8523
|
},
|
|
8524
8524
|
{
|
|
8525
8525
|
type: "Control",
|
|
8526
|
-
scope: "
|
|
8526
|
+
scope: scopeName === "elements" ? `#/properties/Copy_Component` : `#/properties/Copy_TabsComponent`,
|
|
8527
8527
|
options: {
|
|
8528
8528
|
widget: "Button"
|
|
8529
8529
|
},
|
|
@@ -8716,6 +8716,10 @@ var buildConfig = (FormData) => {
|
|
|
8716
8716
|
if (formData.events) {
|
|
8717
8717
|
delete formData.events;
|
|
8718
8718
|
}
|
|
8719
|
+
if (formData.tabLabelElements) {
|
|
8720
|
+
component.tabLabelElements = formData.tabLabelElements || [];
|
|
8721
|
+
delete formData.tabLabelElements;
|
|
8722
|
+
}
|
|
8719
8723
|
component = { ...formData, ...component };
|
|
8720
8724
|
return component;
|
|
8721
8725
|
};
|
|
@@ -8874,7 +8878,7 @@ const sectionLabels = {
|
|
|
8874
8878
|
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style"],
|
|
8875
8879
|
WrapperSection: ["Core", "Components", "Properties", "Style"],
|
|
8876
8880
|
HorizontalLayout: ["Core", "Components", "Properties", "Style"],
|
|
8877
|
-
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
8881
|
+
TabSection: ["Core", "Components", "TabTitles", "Properties", "Style", "Validation"],
|
|
8878
8882
|
SpeedoMeter: ["Core", "Properties", "Events", "Style"],
|
|
8879
8883
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8880
8884
|
UploadFile: ["Core", "Events", "Style", "Validation"],
|
|
@@ -8923,6 +8927,7 @@ function refreshPage(type, store2) {
|
|
|
8923
8927
|
Style: StyleSection,
|
|
8924
8928
|
Events: EventSection(store2.theme.myTheme),
|
|
8925
8929
|
Components: TableSection(store2.theme.myTheme),
|
|
8930
|
+
TabTitles: TableSection(store2.theme.myTheme, "tabLabelElements"),
|
|
8926
8931
|
Properties: buildPropertiesSection(type),
|
|
8927
8932
|
Validation: ValidationSection
|
|
8928
8933
|
};
|
|
@@ -9120,8 +9125,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9120
9125
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
9121
9126
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9122
9127
|
if (path) {
|
|
9123
|
-
|
|
9124
|
-
|
|
9128
|
+
let finalPath = `${path}`;
|
|
9129
|
+
if ((_c = dynamicData2 == null ? void 0 : dynamicData2.path) == null ? void 0 : _c.startsWith("tabLabel")) {
|
|
9130
|
+
finalPath = `${finalPath}.tabLabelElements[${rowId}]`;
|
|
9131
|
+
} else {
|
|
9132
|
+
finalPath = `${finalPath}.elements[${rowId}]`;
|
|
9133
|
+
}
|
|
9125
9134
|
store2.searchParams.set("path", finalPath);
|
|
9126
9135
|
store2.setSearchParams(store2.searchParams);
|
|
9127
9136
|
this.setPage();
|
|
@@ -9133,7 +9142,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9133
9142
|
var _a;
|
|
9134
9143
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9135
9144
|
const rowId = sessionStorage.getItem("rowId");
|
|
9136
|
-
|
|
9145
|
+
const isTabLabelElements = sessionStorage.getItem("isTabLabelElements") === "true";
|
|
9146
|
+
if (isTabLabelElements) {
|
|
9147
|
+
store2.formData.tabLabelElements.splice(rowId, 1);
|
|
9148
|
+
} else {
|
|
9149
|
+
store2.formData.elements.splice(rowId, 1);
|
|
9150
|
+
}
|
|
9137
9151
|
const response = saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9138
9152
|
const data = path ? _.get(response, path) : response;
|
|
9139
9153
|
store2.setFormdata(data);
|
|
@@ -9141,6 +9155,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9141
9155
|
store2.updateDialog("popUpComponentSection");
|
|
9142
9156
|
}
|
|
9143
9157
|
sessionStorage.removeItem("rowId");
|
|
9158
|
+
sessionStorage.removeItem("isTabLabelElements");
|
|
9144
9159
|
},
|
|
9145
9160
|
deleteEvent: function(shouldUpdateDialog = true) {
|
|
9146
9161
|
var _a;
|
|
@@ -9161,9 +9176,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9161
9176
|
if (!Array.isArray(store2.formData.elements)) {
|
|
9162
9177
|
store2.formData.elements = [];
|
|
9163
9178
|
}
|
|
9179
|
+
if (!Array.isArray(store2.formData.tabLabelElements)) {
|
|
9180
|
+
store2.formData.tabLabelElements = [];
|
|
9181
|
+
}
|
|
9164
9182
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
9165
9183
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
9166
|
-
|
|
9184
|
+
let finalPath = `${path}`;
|
|
9185
|
+
if (dynamicData2.path.startsWith("tabLabel")) {
|
|
9186
|
+
finalPath = `${finalPath}.tabLabelElements[${store2.formData.tabLabelElements.length}]`;
|
|
9187
|
+
} else {
|
|
9188
|
+
finalPath = `${finalPath}.elements[${store2.formData.elements.length}]`;
|
|
9189
|
+
}
|
|
9167
9190
|
store2.searchParams.set("path", finalPath);
|
|
9168
9191
|
store2.setSearchParams(store2.searchParams);
|
|
9169
9192
|
this.setPage();
|
|
@@ -9198,6 +9221,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9198
9221
|
deletePopUpComponent: function() {
|
|
9199
9222
|
const rowId = dynamicData2.path.split(".")[1];
|
|
9200
9223
|
sessionStorage.setItem("rowId", rowId);
|
|
9224
|
+
sessionStorage.setItem("isTabLabelElements", dynamicData2.path.startsWith("tabLabel") ? "true" : "false");
|
|
9201
9225
|
store2.updateDialog("popUpComponentSection");
|
|
9202
9226
|
},
|
|
9203
9227
|
deletePopUpEvent: function() {
|
|
@@ -9244,9 +9268,17 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9244
9268
|
if (!Array.isArray(store2.formData.events)) {
|
|
9245
9269
|
store2.formData.events = [];
|
|
9246
9270
|
}
|
|
9271
|
+
if (!Array.isArray(store2.formData.tabLabelElements)) {
|
|
9272
|
+
store2.formData.tabLabelElements = [];
|
|
9273
|
+
}
|
|
9247
9274
|
saveFormdataInSessionStorage(store2.ctx.core.data, pastedElementParentPath);
|
|
9248
9275
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
9249
|
-
const
|
|
9276
|
+
const currentLength = {
|
|
9277
|
+
"TabsComponent": formData.tabLabelElements.length,
|
|
9278
|
+
"Component": formData.elements.length,
|
|
9279
|
+
"Events": formData.events.length
|
|
9280
|
+
};
|
|
9281
|
+
const insertElementIndex = currentLength[elementType] || 0;
|
|
9250
9282
|
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
9251
9283
|
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
9252
9284
|
const notificationMessages = {
|
|
@@ -9281,6 +9313,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
9281
9313
|
if (elementType === "Component") {
|
|
9282
9314
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
9283
9315
|
}
|
|
9316
|
+
if (elementType === "TabsComponent") {
|
|
9317
|
+
return `${parentPath}.tabLabelElements[${rowId}]`;
|
|
9318
|
+
}
|
|
9284
9319
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
9285
9320
|
},
|
|
9286
9321
|
ElementPathSetter: function(uiSchema, copiedFormData) {
|
|
@@ -10963,21 +10998,6 @@ var service = (funcParams) => {
|
|
|
10963
10998
|
const response = await this.callExecuteEvents(param, apiBody, "onLoad");
|
|
10964
10999
|
return response == null ? void 0 : response.data;
|
|
10965
11000
|
},
|
|
10966
|
-
onNodeSearchChange: async function(param) {
|
|
10967
|
-
const apiBody = [
|
|
10968
|
-
{ key: "searchTerm", value: param.searchTerm }
|
|
10969
|
-
];
|
|
10970
|
-
const response = await this.callExecuteEvents(param, apiBody, "onLoad");
|
|
10971
|
-
return response == null ? void 0 : response.data;
|
|
10972
|
-
},
|
|
10973
|
-
onSearchNodeSelect: async function(param) {
|
|
10974
|
-
const apiBody = [
|
|
10975
|
-
{ key: "selectedNodeId", value: param.selectedNodeId },
|
|
10976
|
-
{ key: "uncollapsedIds", value: param.uncollapsedIds }
|
|
10977
|
-
];
|
|
10978
|
-
const response = await this.callExecuteEvents(param, apiBody, "onLoad");
|
|
10979
|
-
return response == null ? void 0 : response.data;
|
|
10980
|
-
},
|
|
10981
11001
|
getSelectOptions: async function(param) {
|
|
10982
11002
|
if (param.serachValue !== "" && param.serachValue !== void 0) {
|
|
10983
11003
|
const apiBody = [
|
|
@@ -13729,6 +13749,11 @@ const buildUiSchema = (config2, store2) => {
|
|
|
13729
13749
|
});
|
|
13730
13750
|
}
|
|
13731
13751
|
}
|
|
13752
|
+
if (config2.tabLabelElements) {
|
|
13753
|
+
elements.tabLabelElements = config2.tabLabelElements.map((e, elemInd) => {
|
|
13754
|
+
return buildUiSchema(e, store2);
|
|
13755
|
+
});
|
|
13756
|
+
}
|
|
13732
13757
|
return elements;
|
|
13733
13758
|
};
|
|
13734
13759
|
export { buildConfig, buildSchema, buildUiSchema, clearFromSessionStorage, downloadFile$1 as downloadFile, downloadFileFromUrl, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|