impaktapps-ui-builder 1.0.305-test.2 → 1.0.306-test.1
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 -8
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -7
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +3 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +12 -1
|
@@ -7926,7 +7926,7 @@ const buildWrapper = (label, elements) => {
|
|
|
7926
7926
|
elements: elements || []
|
|
7927
7927
|
};
|
|
7928
7928
|
};
|
|
7929
|
-
const getTextArea = (scope, heading, hideButton, layout) => {
|
|
7929
|
+
const getTextArea = (scope, heading, hideButton, layout, defaultValue) => {
|
|
7930
7930
|
return {
|
|
7931
7931
|
type: "Control",
|
|
7932
7932
|
scope: `#/properties/${scope}`,
|
|
@@ -7939,7 +7939,8 @@ const getTextArea = (scope, heading, hideButton, layout) => {
|
|
|
7939
7939
|
label: heading,
|
|
7940
7940
|
minRows: 8,
|
|
7941
7941
|
hideButton,
|
|
7942
|
-
enableCodeEditor: true
|
|
7942
|
+
enableCodeEditor: true,
|
|
7943
|
+
defaultValue
|
|
7943
7944
|
}
|
|
7944
7945
|
}
|
|
7945
7946
|
};
|
|
@@ -10206,7 +10207,7 @@ const APISection = {
|
|
|
10206
10207
|
}
|
|
10207
10208
|
]
|
|
10208
10209
|
},
|
|
10209
|
-
getTextArea("apiBody", "Transformer", true, 12)
|
|
10210
|
+
getTextArea("apiBody", "Transformer", true, 12, boilerplate)
|
|
10210
10211
|
]
|
|
10211
10212
|
};
|
|
10212
10213
|
const refreshSectionUiSchema = {
|
|
@@ -10261,6 +10262,7 @@ const refreshSectionUiSchema = {
|
|
|
10261
10262
|
}
|
|
10262
10263
|
]
|
|
10263
10264
|
};
|
|
10265
|
+
const boilerplate = "(store, dynamicData, user, body, service) => {\n}";
|
|
10264
10266
|
var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
10265
10267
|
return {
|
|
10266
10268
|
setPage: async function() {
|
|
@@ -10272,7 +10274,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10272
10274
|
this.refreshPage(formdata.Handler, store2);
|
|
10273
10275
|
},
|
|
10274
10276
|
refreshPage: (handlerType, store22) => {
|
|
10275
|
-
var _a, _b, _c;
|
|
10277
|
+
var _a, _b, _c, _d, _e;
|
|
10276
10278
|
const uiSchema = _.cloneDeep(EventUiSchema(store22.theme.myTheme));
|
|
10277
10279
|
const schema2 = _.cloneDeep(EventSchema);
|
|
10278
10280
|
if (handlerType) {
|
|
@@ -10297,8 +10299,12 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10297
10299
|
uiSchema.elements[0].elements[0].elements[4] = getTextArea(
|
|
10298
10300
|
"eventCode",
|
|
10299
10301
|
"Write Custom Code",
|
|
10300
|
-
false
|
|
10302
|
+
false,
|
|
10303
|
+
void 0
|
|
10301
10304
|
);
|
|
10305
|
+
if (!((_a = store22.formData) == null ? void 0 : _a.eventCode)) {
|
|
10306
|
+
store22.setFormdata((prev) => ({ ...prev, eventCode: boilerplate }));
|
|
10307
|
+
}
|
|
10302
10308
|
schema2.required = ["eventType", "Handler", "eventCode"];
|
|
10303
10309
|
} else if (handlerType === "api") {
|
|
10304
10310
|
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
@@ -10308,6 +10314,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10308
10314
|
lg: 6
|
|
10309
10315
|
});
|
|
10310
10316
|
uiSchema.elements[0].elements[0].elements[3] = APISection;
|
|
10317
|
+
if (!((_b = store22.formData) == null ? void 0 : _b.apiBody)) {
|
|
10318
|
+
store22.setFormdata((prev) => ({ ...prev, apiBody: boilerplate }));
|
|
10319
|
+
}
|
|
10311
10320
|
schema2.required = ["eventType", "Handler", "method", "path"];
|
|
10312
10321
|
} else if (handlerType === "inBuiltFunction") {
|
|
10313
10322
|
uiSchema.elements[0].elements[0].elements[2] = getSelectField(
|
|
@@ -10358,9 +10367,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10358
10367
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
10359
10368
|
}
|
|
10360
10369
|
const config2 = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
10361
|
-
const path = (
|
|
10362
|
-
const id = (
|
|
10363
|
-
let pathArray = [{ label: (
|
|
10370
|
+
const path = (_c = store22.searchParams) == null ? void 0 : _c.get("path");
|
|
10371
|
+
const id = (_d = store22.searchParams) == null ? void 0 : _d.get("id");
|
|
10372
|
+
let pathArray = [{ label: (_e = config2.name) != null ? _e : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
|
|
10364
10373
|
if (path) {
|
|
10365
10374
|
const pathArrayAll = path.split(".");
|
|
10366
10375
|
const arr = [];
|