impaktapps-ui-builder 0.0.352 → 0.0.353
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/README.md +92 -0
- package/dist/impaktapps-ui-builder.es.js +391 -248
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPop.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStepper.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +9 -8
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +10 -9
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +10 -10
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +10 -0
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +4 -0
- package/package.json +2 -1
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +43 -0
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +49 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +7 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +20 -5
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +14 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +33 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +2 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +7 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +33 -4
- package/src/impaktapps-ui-builder/builder/services/component.ts +21 -34
- package/src/impaktapps-ui-builder/builder/services/event.ts +22 -20
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -36
- package/src/impaktapps-ui-builder/builder/services/utils.ts +109 -0
- package/src/impaktapps-ui-builder/lib/index.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +33 -32
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/services/clearLocalStorage.d.ts +0 -2
- package/dist/src/impaktapps-ui-builder/builder/services/getNavigationHistory.d.ts +0 -3
- package/dist/src/impaktapps-ui-builder/builder/services/saveHandler.d.ts +0 -2
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +0 -46
- package/src/impaktapps-ui-builder/builder/services/clearLocalStorage.ts +0 -3
- package/src/impaktapps-ui-builder/builder/services/getNavigationHistory.ts +0 -27
- package/src/impaktapps-ui-builder/builder/services/saveHandler.ts +0 -29
|
@@ -395,12 +395,12 @@ const PageMasterUiSchema = {
|
|
|
395
395
|
config: {
|
|
396
396
|
layout: 11.7,
|
|
397
397
|
main: {
|
|
398
|
-
name: "
|
|
398
|
+
name: "Save",
|
|
399
399
|
startIcon: "ApproveIcon",
|
|
400
400
|
variant: "contained",
|
|
401
401
|
color: "info",
|
|
402
402
|
type: "text",
|
|
403
|
-
onClick: "
|
|
403
|
+
onClick: "saveHandler",
|
|
404
404
|
size: "small"
|
|
405
405
|
},
|
|
406
406
|
style: {
|
|
@@ -5876,16 +5876,17 @@ const ComponentSchema = {
|
|
|
5876
5876
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
5877
5877
|
{ title: "File", const: "FileInput" },
|
|
5878
5878
|
{ title: "Graph", const: "Graph" },
|
|
5879
|
-
{ title: "Input Slider", const: "InputSlider" },
|
|
5880
5879
|
{ title: "Label", const: "Box" },
|
|
5881
5880
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5882
5881
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
5883
5882
|
{ title: "PanCardText", const: "PanCardText" },
|
|
5883
|
+
{ title: "Popup Container", const: "PopUp" },
|
|
5884
5884
|
{ title: "ProgressBar", const: "ProgressBar" },
|
|
5885
5885
|
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
5886
5886
|
{ title: "Select", const: "Select" },
|
|
5887
5887
|
{ title: "Slider", const: "Slider" },
|
|
5888
5888
|
{ title: "SpeedoMeter", const: "SpeedoMeter" },
|
|
5889
|
+
{ title: "Stepper Container", const: "Stepper" },
|
|
5889
5890
|
{ title: "Radio", const: "Radio" },
|
|
5890
5891
|
{ title: "Rank", const: "Rank" },
|
|
5891
5892
|
{ title: "Rank Card", const: "RankCard" },
|
|
@@ -5981,6 +5982,17 @@ const ComponentSchema = {
|
|
|
5981
5982
|
}
|
|
5982
5983
|
}
|
|
5983
5984
|
},
|
|
5985
|
+
skipAvailable: {
|
|
5986
|
+
type: "array",
|
|
5987
|
+
items: {
|
|
5988
|
+
type: "object",
|
|
5989
|
+
properties: {
|
|
5990
|
+
skipId: {
|
|
5991
|
+
type: "string"
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
}
|
|
5995
|
+
},
|
|
5984
5996
|
Table_Download_Keys_Name: {
|
|
5985
5997
|
type: "array",
|
|
5986
5998
|
items: {
|
|
@@ -6320,7 +6332,7 @@ const componentBasicUiSchema = {
|
|
|
6320
6332
|
type: "Control",
|
|
6321
6333
|
scope: "#/properties/proc",
|
|
6322
6334
|
config: {
|
|
6323
|
-
layout: { xs: 11, sm: 11, md:
|
|
6335
|
+
layout: { xs: 11, sm: 11, md: 6, lg: 6 }
|
|
6324
6336
|
},
|
|
6325
6337
|
options: {
|
|
6326
6338
|
widget: "EmptyBox"
|
|
@@ -6336,11 +6348,39 @@ const componentBasicUiSchema = {
|
|
|
6336
6348
|
layout: {
|
|
6337
6349
|
xs: 11,
|
|
6338
6350
|
sm: 11,
|
|
6339
|
-
md:
|
|
6340
|
-
lg:
|
|
6351
|
+
md: 2.5,
|
|
6352
|
+
lg: 2.5
|
|
6341
6353
|
},
|
|
6342
6354
|
main: {
|
|
6343
|
-
name: "
|
|
6355
|
+
name: "Ok",
|
|
6356
|
+
startIcon: "ApproveIcon",
|
|
6357
|
+
variant: "contained",
|
|
6358
|
+
color: "info",
|
|
6359
|
+
type: "text",
|
|
6360
|
+
onClick: "okHandler",
|
|
6361
|
+
size: "small"
|
|
6362
|
+
},
|
|
6363
|
+
style: {
|
|
6364
|
+
marginBottom: "8px",
|
|
6365
|
+
float: "right"
|
|
6366
|
+
}
|
|
6367
|
+
}
|
|
6368
|
+
},
|
|
6369
|
+
{
|
|
6370
|
+
type: "Control",
|
|
6371
|
+
scope: "#/properties/btnSubmit",
|
|
6372
|
+
options: {
|
|
6373
|
+
widget: "Button"
|
|
6374
|
+
},
|
|
6375
|
+
config: {
|
|
6376
|
+
layout: {
|
|
6377
|
+
xs: 11,
|
|
6378
|
+
sm: 11,
|
|
6379
|
+
md: 2.5,
|
|
6380
|
+
lg: 2.5
|
|
6381
|
+
},
|
|
6382
|
+
main: {
|
|
6383
|
+
name: "Save & Exit",
|
|
6344
6384
|
startIcon: "ApproveIcon",
|
|
6345
6385
|
variant: "contained",
|
|
6346
6386
|
color: "info",
|
|
@@ -6364,97 +6404,6 @@ const componentBasicUiSchema = {
|
|
|
6364
6404
|
}
|
|
6365
6405
|
]
|
|
6366
6406
|
};
|
|
6367
|
-
var buildConfig = (FormData) => {
|
|
6368
|
-
const formData = _.cloneDeep(FormData);
|
|
6369
|
-
let component = {};
|
|
6370
|
-
if (formData.pageName) {
|
|
6371
|
-
delete formData.pageName;
|
|
6372
|
-
}
|
|
6373
|
-
if (formData.eventsSelected) {
|
|
6374
|
-
delete formData.eventsSelected;
|
|
6375
|
-
}
|
|
6376
|
-
if (formData.type === "Table" || formData.type === "WrapperSection" || formData.type === "TabSection") {
|
|
6377
|
-
component.elements = formData.elements || [];
|
|
6378
|
-
if (formData.elements) {
|
|
6379
|
-
delete formData.elements;
|
|
6380
|
-
}
|
|
6381
|
-
}
|
|
6382
|
-
component.events = formData.events || [];
|
|
6383
|
-
if (formData.events) {
|
|
6384
|
-
delete formData.events;
|
|
6385
|
-
}
|
|
6386
|
-
component = { ...formData, ...component };
|
|
6387
|
-
return component;
|
|
6388
|
-
};
|
|
6389
|
-
const createLayoutFormat = (config) => {
|
|
6390
|
-
if (_.isEmpty(config)) {
|
|
6391
|
-
return {
|
|
6392
|
-
xs: 11,
|
|
6393
|
-
sm: 11,
|
|
6394
|
-
md: 5.5,
|
|
6395
|
-
lg: 5.5
|
|
6396
|
-
};
|
|
6397
|
-
}
|
|
6398
|
-
let data2 = {};
|
|
6399
|
-
config.map((e) => {
|
|
6400
|
-
data2[e.key || "xs"] = +e.value || 5.5;
|
|
6401
|
-
});
|
|
6402
|
-
return data2;
|
|
6403
|
-
};
|
|
6404
|
-
const flatObjectValueInArray = (config) => {
|
|
6405
|
-
const keyName = Object.keys(config[0])[0];
|
|
6406
|
-
const data2 = config.map((e) => {
|
|
6407
|
-
return e[keyName];
|
|
6408
|
-
});
|
|
6409
|
-
return data2;
|
|
6410
|
-
};
|
|
6411
|
-
const getNavigationHistory = (config, path) => {
|
|
6412
|
-
if (path) {
|
|
6413
|
-
let urlRoutes = config.name;
|
|
6414
|
-
const pathArrayAll = path.split(".");
|
|
6415
|
-
const arr = [];
|
|
6416
|
-
pathArrayAll.map((e, i) => {
|
|
6417
|
-
if (i === 0) {
|
|
6418
|
-
arr.push(e);
|
|
6419
|
-
return;
|
|
6420
|
-
}
|
|
6421
|
-
arr.push(`${arr[i - 1]}.${e}`);
|
|
6422
|
-
});
|
|
6423
|
-
arr.map((e) => {
|
|
6424
|
-
const data2 = _.get(config, e);
|
|
6425
|
-
if (data2) {
|
|
6426
|
-
urlRoutes = urlRoutes + ` > ${(data2 == null ? void 0 : data2.name) || (data2 == null ? void 0 : data2.eventType)}`;
|
|
6427
|
-
} else {
|
|
6428
|
-
urlRoutes = urlRoutes + " > NewComponent";
|
|
6429
|
-
}
|
|
6430
|
-
});
|
|
6431
|
-
return { pageName: urlRoutes };
|
|
6432
|
-
}
|
|
6433
|
-
return void 0;
|
|
6434
|
-
};
|
|
6435
|
-
const saveFormdataInLocalStorage = (formData, path) => {
|
|
6436
|
-
let updatedFormdata;
|
|
6437
|
-
if (path) {
|
|
6438
|
-
const pageFormdata = getFormdataFromLocalStorage();
|
|
6439
|
-
updatedFormdata = _.set(pageFormdata, path, buildConfig(formData));
|
|
6440
|
-
} else {
|
|
6441
|
-
updatedFormdata = buildConfig(formData);
|
|
6442
|
-
}
|
|
6443
|
-
localStorage.setItem("pageFormdata", JSON.stringify(updatedFormdata));
|
|
6444
|
-
return updatedFormdata;
|
|
6445
|
-
};
|
|
6446
|
-
const getFormdataFromLocalStorage = (path) => {
|
|
6447
|
-
const pageFormdata = localStorage.getItem("pageFormdata") ? JSON.parse(localStorage.getItem("pageFormdata")) : void 0;
|
|
6448
|
-
let returnValue;
|
|
6449
|
-
if (path) {
|
|
6450
|
-
returnValue = _.get(pageFormdata, path);
|
|
6451
|
-
returnValue = { ...returnValue, ...getNavigationHistory(pageFormdata, path) };
|
|
6452
|
-
}
|
|
6453
|
-
if (!returnValue) {
|
|
6454
|
-
returnValue = getNavigationHistory(pageFormdata, path);
|
|
6455
|
-
}
|
|
6456
|
-
return returnValue || pageFormdata;
|
|
6457
|
-
};
|
|
6458
6407
|
const CoreSection = {
|
|
6459
6408
|
type: "HorizontalLayout",
|
|
6460
6409
|
elements: [
|
|
@@ -6837,12 +6786,24 @@ const GraphSection = {
|
|
|
6837
6786
|
const buildPropertiesSection = function(type) {
|
|
6838
6787
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6839
6788
|
switch (type) {
|
|
6840
|
-
case "
|
|
6789
|
+
case "Stepper":
|
|
6841
6790
|
uiSchema.elements = [
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
getInputField("
|
|
6845
|
-
|
|
6791
|
+
getRadioInputField("complete", "Complete Needed", ["YES", "NO"]),
|
|
6792
|
+
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6793
|
+
getInputField("resetText", "Reset Text"),
|
|
6794
|
+
getInputField("completeText", "Complete Text"),
|
|
6795
|
+
getSelectField("orientation", "Orientation Type"),
|
|
6796
|
+
getArrayControl("sectionLabels", "label"),
|
|
6797
|
+
getArrayControl("skipAvailable", "skipId"),
|
|
6798
|
+
EmptyBox
|
|
6799
|
+
];
|
|
6800
|
+
break;
|
|
6801
|
+
case "PopUp":
|
|
6802
|
+
uiSchema.elements = [
|
|
6803
|
+
getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
|
|
6804
|
+
getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
|
|
6805
|
+
getInputField("maxWidth", "Max. Width"),
|
|
6806
|
+
EmptyBox
|
|
6846
6807
|
];
|
|
6847
6808
|
break;
|
|
6848
6809
|
case "Text":
|
|
@@ -7230,6 +7191,150 @@ const ValidationSection = {
|
|
|
7230
7191
|
}
|
|
7231
7192
|
]
|
|
7232
7193
|
};
|
|
7194
|
+
var buildConfig = (FormData) => {
|
|
7195
|
+
const formData = _.cloneDeep(FormData);
|
|
7196
|
+
let component = {};
|
|
7197
|
+
if (formData.pageName) {
|
|
7198
|
+
delete formData.pageName;
|
|
7199
|
+
}
|
|
7200
|
+
if (formData.eventsSelected) {
|
|
7201
|
+
delete formData.eventsSelected;
|
|
7202
|
+
}
|
|
7203
|
+
if (formData.type === "Table" || formData.type === "WrapperSection" || formData.type === "TabSection") {
|
|
7204
|
+
component.elements = formData.elements || [];
|
|
7205
|
+
if (formData.elements) {
|
|
7206
|
+
delete formData.elements;
|
|
7207
|
+
}
|
|
7208
|
+
}
|
|
7209
|
+
component.events = formData.events || [];
|
|
7210
|
+
if (formData.events) {
|
|
7211
|
+
delete formData.events;
|
|
7212
|
+
}
|
|
7213
|
+
component = { ...formData, ...component };
|
|
7214
|
+
return component;
|
|
7215
|
+
};
|
|
7216
|
+
const createLayoutFormat = (config) => {
|
|
7217
|
+
if (_.isEmpty(config)) {
|
|
7218
|
+
return {
|
|
7219
|
+
xs: 11,
|
|
7220
|
+
sm: 11,
|
|
7221
|
+
md: 5.5,
|
|
7222
|
+
lg: 5.5
|
|
7223
|
+
};
|
|
7224
|
+
}
|
|
7225
|
+
let data2 = {};
|
|
7226
|
+
config.map((e) => {
|
|
7227
|
+
data2[e.key || "xs"] = +e.value || 5.5;
|
|
7228
|
+
});
|
|
7229
|
+
return data2;
|
|
7230
|
+
};
|
|
7231
|
+
const flatObjectValueInArray = (config) => {
|
|
7232
|
+
const keyName = Object.keys(config[0])[0];
|
|
7233
|
+
const data2 = config.map((e) => {
|
|
7234
|
+
return e[keyName];
|
|
7235
|
+
});
|
|
7236
|
+
return data2;
|
|
7237
|
+
};
|
|
7238
|
+
const clearFromLocalStorage = () => {
|
|
7239
|
+
localStorage.removeItem("pageFormdata");
|
|
7240
|
+
};
|
|
7241
|
+
const getNavigationHistory = (config, path) => {
|
|
7242
|
+
if (path) {
|
|
7243
|
+
let urlRoutes = config.name;
|
|
7244
|
+
const pathArrayAll = path.split(".");
|
|
7245
|
+
const arr = [];
|
|
7246
|
+
pathArrayAll.map((e, i) => {
|
|
7247
|
+
if (i === 0) {
|
|
7248
|
+
arr.push(e);
|
|
7249
|
+
return;
|
|
7250
|
+
}
|
|
7251
|
+
arr.push(`${arr[i - 1]}.${e}`);
|
|
7252
|
+
});
|
|
7253
|
+
arr.map((e) => {
|
|
7254
|
+
const data2 = _.get(config, e);
|
|
7255
|
+
if (data2) {
|
|
7256
|
+
urlRoutes = urlRoutes + ` > ${(data2 == null ? void 0 : data2.name) || (data2 == null ? void 0 : data2.eventType)}`;
|
|
7257
|
+
} else {
|
|
7258
|
+
urlRoutes = urlRoutes + " > NewComponent";
|
|
7259
|
+
}
|
|
7260
|
+
});
|
|
7261
|
+
return { pageName: urlRoutes };
|
|
7262
|
+
}
|
|
7263
|
+
return void 0;
|
|
7264
|
+
};
|
|
7265
|
+
const saveFormdataInLocalStorage = (formData, path) => {
|
|
7266
|
+
let updatedFormdata;
|
|
7267
|
+
if (path) {
|
|
7268
|
+
const pageFormdata = getFormdataFromLocalStorage();
|
|
7269
|
+
updatedFormdata = _.set(pageFormdata, path, buildConfig(formData));
|
|
7270
|
+
} else {
|
|
7271
|
+
updatedFormdata = buildConfig(formData);
|
|
7272
|
+
}
|
|
7273
|
+
localStorage.setItem("pageFormdata", JSON.stringify(updatedFormdata));
|
|
7274
|
+
return updatedFormdata;
|
|
7275
|
+
};
|
|
7276
|
+
const getFormdataFromLocalStorage = (path) => {
|
|
7277
|
+
const pageFormdata = localStorage.getItem("pageFormdata") ? JSON.parse(localStorage.getItem("pageFormdata")) : void 0;
|
|
7278
|
+
let returnValue;
|
|
7279
|
+
if (path) {
|
|
7280
|
+
returnValue = _.get(pageFormdata, path);
|
|
7281
|
+
returnValue = { ...returnValue, ...getNavigationHistory(pageFormdata, path) };
|
|
7282
|
+
}
|
|
7283
|
+
if (!returnValue) {
|
|
7284
|
+
returnValue = getNavigationHistory(pageFormdata, path);
|
|
7285
|
+
}
|
|
7286
|
+
return returnValue || pageFormdata;
|
|
7287
|
+
};
|
|
7288
|
+
async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
7289
|
+
var _a, _b;
|
|
7290
|
+
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7291
|
+
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7292
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7293
|
+
const config = JSON.parse(localStorage.getItem("pageFormdata"));
|
|
7294
|
+
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7295
|
+
try {
|
|
7296
|
+
const saveReturn = await submitHandler(store2, service2, config);
|
|
7297
|
+
navigateHandler(store2, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords");
|
|
7298
|
+
} catch (err) {
|
|
7299
|
+
navigateHandler(store2, false);
|
|
7300
|
+
}
|
|
7301
|
+
}
|
|
7302
|
+
}
|
|
7303
|
+
const navigateHandler = (store2, isSubmitted, pageName) => {
|
|
7304
|
+
if (isSubmitted) {
|
|
7305
|
+
localStorage.removeItem("pageFormdata");
|
|
7306
|
+
store2.navigate(pageName || -1);
|
|
7307
|
+
store2.setNotify({
|
|
7308
|
+
SuccessMessage: "Submit Successfully",
|
|
7309
|
+
Success: true
|
|
7310
|
+
});
|
|
7311
|
+
} else {
|
|
7312
|
+
store2.setValidation("ValidateAndShow");
|
|
7313
|
+
store2.setNotify({
|
|
7314
|
+
Fail: true,
|
|
7315
|
+
FailMessage: "Errors on Page"
|
|
7316
|
+
});
|
|
7317
|
+
}
|
|
7318
|
+
};
|
|
7319
|
+
function okHandler(store2) {
|
|
7320
|
+
var _a;
|
|
7321
|
+
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7322
|
+
console.log(store2.ctx.core.errors);
|
|
7323
|
+
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7324
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7325
|
+
store2.navigate(-1);
|
|
7326
|
+
store2.setNotify({
|
|
7327
|
+
SuccessMessage: "Save Successfully",
|
|
7328
|
+
Success: true
|
|
7329
|
+
});
|
|
7330
|
+
} else {
|
|
7331
|
+
store2.setValidation("ValidateAndShow");
|
|
7332
|
+
store2.setNotify({
|
|
7333
|
+
Fail: true,
|
|
7334
|
+
FailMessage: "Errors on Page"
|
|
7335
|
+
});
|
|
7336
|
+
}
|
|
7337
|
+
}
|
|
7233
7338
|
const sectionLabels = {
|
|
7234
7339
|
Select: ["Core", "Properties", "Value", "style", "Event", "Validation"],
|
|
7235
7340
|
MultipleSelect: ["Core", "Properties", "Value", "style", "Event", "Validation"],
|
|
@@ -7254,7 +7359,8 @@ const sectionLabels = {
|
|
|
7254
7359
|
Radio: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7255
7360
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7256
7361
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7257
|
-
|
|
7362
|
+
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7363
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7258
7364
|
};
|
|
7259
7365
|
const refreshPage = (type, store2) => {
|
|
7260
7366
|
var _a;
|
|
@@ -7275,7 +7381,7 @@ const refreshPage = (type, store2) => {
|
|
|
7275
7381
|
}
|
|
7276
7382
|
store2.setUiSchema(UiSchema);
|
|
7277
7383
|
};
|
|
7278
|
-
var Component = (store2, dynamicData2) => {
|
|
7384
|
+
var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
7279
7385
|
return {
|
|
7280
7386
|
setPage: async function() {
|
|
7281
7387
|
const formdata = await this.getFormdata();
|
|
@@ -7285,7 +7391,7 @@ var Component = (store2, dynamicData2) => {
|
|
|
7285
7391
|
this.refreshPage(formdata == null ? void 0 : formdata.type, store2);
|
|
7286
7392
|
},
|
|
7287
7393
|
refreshPage,
|
|
7288
|
-
getFormdata:
|
|
7394
|
+
getFormdata: function() {
|
|
7289
7395
|
var _a;
|
|
7290
7396
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7291
7397
|
return getFormdataFromLocalStorage(path);
|
|
@@ -7293,37 +7399,20 @@ var Component = (store2, dynamicData2) => {
|
|
|
7293
7399
|
getSchema: function() {
|
|
7294
7400
|
return ComponentSchema;
|
|
7295
7401
|
},
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7299
|
-
console.log(store2.ctx.core.errors);
|
|
7300
|
-
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7301
|
-
saveFormdataInLocalStorage(store2.formData, path);
|
|
7302
|
-
store2.navigate(-1);
|
|
7303
|
-
store2.setNotify({
|
|
7304
|
-
SuccessMessage: "Save Successfully",
|
|
7305
|
-
Success: true
|
|
7306
|
-
});
|
|
7307
|
-
} else {
|
|
7308
|
-
store2.setValidation("ValidateAndShow");
|
|
7309
|
-
store2.setNotify({
|
|
7310
|
-
Fail: true,
|
|
7311
|
-
FailMessage: "Errors on Page"
|
|
7312
|
-
});
|
|
7313
|
-
}
|
|
7314
|
-
},
|
|
7402
|
+
okHandler: () => okHandler(store2),
|
|
7403
|
+
saveHandler: async () => await saveHandler(store2, service2, submitHandler, "PageMaster"),
|
|
7315
7404
|
onChange: function() {
|
|
7316
7405
|
var _a, _b, _c, _d;
|
|
7317
7406
|
if (((_a = store2 == null ? void 0 : store2.formData) == null ? void 0 : _a.type) !== ((_b = store2 == null ? void 0 : store2.newData) == null ? void 0 : _b.type) && ((_c = store2 == null ? void 0 : store2.newData) == null ? void 0 : _c.type) !== void 0) {
|
|
7318
7407
|
this.refreshPage((_d = store2 == null ? void 0 : store2.newData) == null ? void 0 : _d.type, store2);
|
|
7319
7408
|
}
|
|
7320
7409
|
},
|
|
7321
|
-
editComponents:
|
|
7410
|
+
editComponents: function() {
|
|
7322
7411
|
var _a, _b, _c;
|
|
7323
7412
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7324
7413
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7325
7414
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
7326
|
-
saveFormdataInLocalStorage(store2.
|
|
7415
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7327
7416
|
if (path) {
|
|
7328
7417
|
const path2 = (_c = store2.searchParams) == null ? void 0 : _c.get("path");
|
|
7329
7418
|
const finalPath = `${path2}.elements[${rowId}]`;
|
|
@@ -7334,52 +7423,52 @@ var Component = (store2, dynamicData2) => {
|
|
|
7334
7423
|
store2.navigate(`/Component?path=${`elements[${rowId}]`}&id=${id}`);
|
|
7335
7424
|
}
|
|
7336
7425
|
},
|
|
7337
|
-
deleteComponents:
|
|
7426
|
+
deleteComponents: function() {
|
|
7338
7427
|
var _a;
|
|
7339
7428
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7340
7429
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7341
7430
|
store2.formData.elements.splice(rowId, 1);
|
|
7342
|
-
const response2 = saveFormdataInLocalStorage(store2.
|
|
7431
|
+
const response2 = saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7343
7432
|
const data2 = path ? _.get(response2, path) : response2;
|
|
7344
7433
|
store2.setFormdata(data2);
|
|
7345
7434
|
},
|
|
7346
|
-
deleteEvent:
|
|
7435
|
+
deleteEvent: function() {
|
|
7347
7436
|
var _a;
|
|
7348
7437
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7349
7438
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7350
7439
|
store2.formData.events.splice(rowId, 1);
|
|
7351
|
-
const response2 = saveFormdataInLocalStorage(store2.
|
|
7440
|
+
const response2 = saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7352
7441
|
store2.setFormdata(_.get(response2, path));
|
|
7353
7442
|
},
|
|
7354
|
-
widgetAddClickHandler:
|
|
7443
|
+
widgetAddClickHandler: function() {
|
|
7355
7444
|
var _a;
|
|
7356
7445
|
if (!Array.isArray(store2.formData.elements)) {
|
|
7357
7446
|
store2.formData.elements = [];
|
|
7358
7447
|
}
|
|
7359
7448
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7360
|
-
saveFormdataInLocalStorage(store2.
|
|
7449
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7361
7450
|
const finalPath = `${path}.elements[${store2.formData.elements.length}]`;
|
|
7362
7451
|
store2.searchParams.set("path", finalPath);
|
|
7363
7452
|
store2.setSearchParams(store2.searchParams);
|
|
7364
7453
|
this.setPage();
|
|
7365
7454
|
},
|
|
7366
|
-
eventEditHandler:
|
|
7455
|
+
eventEditHandler: function() {
|
|
7367
7456
|
var _a, _b;
|
|
7368
7457
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7369
7458
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7370
7459
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
7371
|
-
saveFormdataInLocalStorage(store2.
|
|
7460
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7372
7461
|
const finalPath = `${path}.events[${rowId}]`;
|
|
7373
7462
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
7374
7463
|
},
|
|
7375
|
-
eventAddHandler:
|
|
7464
|
+
eventAddHandler: function() {
|
|
7376
7465
|
var _a, _b;
|
|
7377
7466
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7378
7467
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
7379
7468
|
if (!Array.isArray(store2.formData.events)) {
|
|
7380
7469
|
store2.formData.events = [];
|
|
7381
7470
|
}
|
|
7382
|
-
saveFormdataInLocalStorage(store2.
|
|
7471
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7383
7472
|
const finalPath = `${path}.events[${store2.formData.events.length}]`;
|
|
7384
7473
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
7385
7474
|
},
|
|
@@ -7389,7 +7478,7 @@ var Component = (store2, dynamicData2) => {
|
|
|
7389
7478
|
};
|
|
7390
7479
|
};
|
|
7391
7480
|
var pageMaster = (funcParams) => {
|
|
7392
|
-
const { store: store2, dynamicData: dynamicData2, config, submitHandler } = funcParams;
|
|
7481
|
+
const { store: store2, dynamicData: dynamicData2, config, submitHandler, service: service2 } = funcParams;
|
|
7393
7482
|
return {
|
|
7394
7483
|
setPage: async function() {
|
|
7395
7484
|
const formdata = await this.getFormdata();
|
|
@@ -7399,7 +7488,7 @@ var pageMaster = (funcParams) => {
|
|
|
7399
7488
|
store2.setSchema(schema2);
|
|
7400
7489
|
store2.setUiSchema(uiSchema);
|
|
7401
7490
|
},
|
|
7402
|
-
getFormdata:
|
|
7491
|
+
getFormdata: function() {
|
|
7403
7492
|
var _a;
|
|
7404
7493
|
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7405
7494
|
const formData = getFormdataFromLocalStorage();
|
|
@@ -7409,7 +7498,7 @@ var pageMaster = (funcParams) => {
|
|
|
7409
7498
|
saveFormdataInLocalStorage(config);
|
|
7410
7499
|
return config;
|
|
7411
7500
|
},
|
|
7412
|
-
getUiSchema:
|
|
7501
|
+
getUiSchema: function() {
|
|
7413
7502
|
return PageMasterUiSchema;
|
|
7414
7503
|
},
|
|
7415
7504
|
getSchema: () => {
|
|
@@ -7419,60 +7508,42 @@ var pageMaster = (funcParams) => {
|
|
|
7419
7508
|
localStorage.removeItem("pageFormdata");
|
|
7420
7509
|
store2.navigate("/PageMasterRecords");
|
|
7421
7510
|
},
|
|
7422
|
-
onAddClickHandler:
|
|
7511
|
+
onAddClickHandler: function() {
|
|
7423
7512
|
var _a;
|
|
7424
7513
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7425
7514
|
if (!Array.isArray(store2.formData.elements)) {
|
|
7426
7515
|
store2.formData.elements = [];
|
|
7427
7516
|
}
|
|
7428
|
-
const response2 = saveFormdataInLocalStorage(store2.
|
|
7517
|
+
const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
|
|
7429
7518
|
store2.navigate(
|
|
7430
7519
|
`/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
|
|
7431
7520
|
);
|
|
7432
7521
|
},
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
localStorage.removeItem("pageFormdata");
|
|
7438
|
-
store2.navigate(-1);
|
|
7439
|
-
store2.setNotify({
|
|
7440
|
-
SuccessMessage: "Submit Successfully",
|
|
7441
|
-
Success: true
|
|
7442
|
-
});
|
|
7443
|
-
});
|
|
7444
|
-
} else {
|
|
7445
|
-
funcParams.store.setValidation("ValidateAndShow");
|
|
7446
|
-
funcParams.store.setNotify({
|
|
7447
|
-
Fail: true,
|
|
7448
|
-
FailMessage: "Errors on Page"
|
|
7449
|
-
});
|
|
7450
|
-
}
|
|
7451
|
-
},
|
|
7452
|
-
Edit_Components: Component(store2, dynamicData2).editComponents,
|
|
7453
|
-
Delete_Components: Component(store2, dynamicData2).deleteComponents,
|
|
7454
|
-
eventAddHandler: async function() {
|
|
7522
|
+
saveHandler: async () => await saveHandler(store2, service2, submitHandler),
|
|
7523
|
+
Edit_Components: Component(store2, dynamicData2, submitHandler, service2).editComponents,
|
|
7524
|
+
Delete_Components: Component(store2, dynamicData2, submitHandler, service2).deleteComponents,
|
|
7525
|
+
eventAddHandler: function() {
|
|
7455
7526
|
var _a;
|
|
7456
7527
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7457
7528
|
if (!Array.isArray(store2.formData.events)) {
|
|
7458
7529
|
store2.formData.events = [];
|
|
7459
7530
|
}
|
|
7460
|
-
saveFormdataInLocalStorage(store2.
|
|
7531
|
+
saveFormdataInLocalStorage(store2.ctx.core.data);
|
|
7461
7532
|
const finalPath = `events[${store2.formData.events.length}]`;
|
|
7462
7533
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
7463
7534
|
},
|
|
7464
|
-
editEvent:
|
|
7535
|
+
editEvent: function() {
|
|
7465
7536
|
var _a;
|
|
7466
7537
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7467
7538
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7468
|
-
saveFormdataInLocalStorage(store2.
|
|
7539
|
+
saveFormdataInLocalStorage(store2.ctx.core.data);
|
|
7469
7540
|
const finalPath = `events[${rowId}]`;
|
|
7470
7541
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
7471
7542
|
},
|
|
7472
|
-
deleteEvent:
|
|
7543
|
+
deleteEvent: function() {
|
|
7473
7544
|
const rowId = dynamicData2.path.split(".")[1];
|
|
7474
7545
|
store2.formData.events.splice(rowId, 1);
|
|
7475
|
-
const response2 = saveFormdataInLocalStorage(store2.
|
|
7546
|
+
const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
|
|
7476
7547
|
store2.setFormdata(response2);
|
|
7477
7548
|
}
|
|
7478
7549
|
};
|
|
@@ -7518,12 +7589,15 @@ const EventSchema = {
|
|
|
7518
7589
|
type: "string",
|
|
7519
7590
|
oneOf: [
|
|
7520
7591
|
{ title: "Click Event", const: "onClick" },
|
|
7521
|
-
{ title: "onStart", const: "onStart" },
|
|
7522
7592
|
{ title: "Load Event", const: "onLoad" },
|
|
7523
|
-
{ title: "File Upload Event", const: "onUpload" },
|
|
7524
|
-
{ title: "File Download Event", const: "onDownload" },
|
|
7525
7593
|
{ title: "Change Event", const: "onChange" },
|
|
7526
7594
|
{ title: "Success", const: "Success" },
|
|
7595
|
+
{ title: "onStart", const: "onStart" },
|
|
7596
|
+
{ title: "File Upload Event", const: "onUpload" },
|
|
7597
|
+
{ title: "Stepper Back Event", const: "onStepperBack" },
|
|
7598
|
+
{ title: "Stepper Next Event", const: "onStepperNext" },
|
|
7599
|
+
{ title: "Stepper Skip Event", const: "onStepperSkip" },
|
|
7600
|
+
{ title: "File Download Event", const: "onDownload" },
|
|
7527
7601
|
{ title: "Fail", const: "Fail" }
|
|
7528
7602
|
]
|
|
7529
7603
|
},
|
|
@@ -7785,7 +7859,7 @@ const EventUiSchema = {
|
|
|
7785
7859
|
type: "Control",
|
|
7786
7860
|
scope: "#/properties/proc",
|
|
7787
7861
|
config: {
|
|
7788
|
-
layout: { xs: 11, sm: 11, md:
|
|
7862
|
+
layout: { xs: 11, sm: 11, md: 6, lg: 6 }
|
|
7789
7863
|
},
|
|
7790
7864
|
options: {
|
|
7791
7865
|
widget: "EmptyBox"
|
|
@@ -7801,11 +7875,39 @@ const EventUiSchema = {
|
|
|
7801
7875
|
layout: {
|
|
7802
7876
|
xs: 11,
|
|
7803
7877
|
sm: 11,
|
|
7804
|
-
md:
|
|
7805
|
-
lg:
|
|
7878
|
+
md: 2.5,
|
|
7879
|
+
lg: 2.5
|
|
7806
7880
|
},
|
|
7807
7881
|
main: {
|
|
7808
|
-
name: "
|
|
7882
|
+
name: "Ok",
|
|
7883
|
+
startIcon: "ApproveIcon",
|
|
7884
|
+
variant: "contained",
|
|
7885
|
+
color: "info",
|
|
7886
|
+
type: "text",
|
|
7887
|
+
onClick: "okHandler",
|
|
7888
|
+
size: "small"
|
|
7889
|
+
},
|
|
7890
|
+
style: {
|
|
7891
|
+
marginBottom: "8px",
|
|
7892
|
+
float: "right"
|
|
7893
|
+
}
|
|
7894
|
+
}
|
|
7895
|
+
},
|
|
7896
|
+
{
|
|
7897
|
+
type: "Control",
|
|
7898
|
+
scope: "#/properties/btnSubmit",
|
|
7899
|
+
options: {
|
|
7900
|
+
widget: "Button"
|
|
7901
|
+
},
|
|
7902
|
+
config: {
|
|
7903
|
+
layout: {
|
|
7904
|
+
xs: 11,
|
|
7905
|
+
sm: 11,
|
|
7906
|
+
md: 2.5,
|
|
7907
|
+
lg: 2.5
|
|
7908
|
+
},
|
|
7909
|
+
main: {
|
|
7910
|
+
name: "Save & Exit",
|
|
7809
7911
|
startIcon: "ApproveIcon",
|
|
7810
7912
|
variant: "contained",
|
|
7811
7913
|
color: "info",
|
|
@@ -8014,7 +8116,7 @@ const refreshSectionUiSchema = {
|
|
|
8014
8116
|
}
|
|
8015
8117
|
]
|
|
8016
8118
|
};
|
|
8017
|
-
var event = (store2, dynamicData2) => {
|
|
8119
|
+
var event = (store2, dynamicData2, submitHandler, service2) => {
|
|
8018
8120
|
return {
|
|
8019
8121
|
setPage: async function() {
|
|
8020
8122
|
const formdata = await this.getFormData();
|
|
@@ -8047,43 +8149,44 @@ var event = (store2, dynamicData2) => {
|
|
|
8047
8149
|
store22.setSchema(schema2);
|
|
8048
8150
|
store22.setUiSchema(uiSchema);
|
|
8049
8151
|
},
|
|
8050
|
-
getFormData: Component(store2, dynamicData2).getFormdata,
|
|
8051
|
-
getUiSchema:
|
|
8152
|
+
getFormData: Component(store2, dynamicData2, submitHandler, service2).getFormdata,
|
|
8153
|
+
getUiSchema: function() {
|
|
8052
8154
|
return EventUiSchema;
|
|
8053
8155
|
},
|
|
8054
|
-
getSchema:
|
|
8156
|
+
getSchema: () => {
|
|
8055
8157
|
return EventSchema;
|
|
8056
8158
|
},
|
|
8159
|
+
okHandler: () => okHandler(store2),
|
|
8160
|
+
saveHandler: async () => await saveHandler(store2, service2, submitHandler, "PageMaster"),
|
|
8057
8161
|
onChange: function() {
|
|
8058
8162
|
var _a, _b, _c;
|
|
8059
8163
|
if (((_a = store2 == null ? void 0 : store2.formData) == null ? void 0 : _a.Handler) !== ((_b = store2 == null ? void 0 : store2.newData) == null ? void 0 : _b.Handler) && ((_c = store2 == null ? void 0 : store2.newData) == null ? void 0 : _c.Handler) !== void 0) {
|
|
8060
8164
|
this.refreshPage(store2.newData.Handler || store2.formdata.Handler, store2);
|
|
8061
8165
|
}
|
|
8062
8166
|
},
|
|
8063
|
-
|
|
8064
|
-
addEvent: async function() {
|
|
8167
|
+
addEvent: function() {
|
|
8065
8168
|
var _a, _b, _c;
|
|
8066
8169
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8067
8170
|
if (!Array.isArray(store2.formData.events)) {
|
|
8068
8171
|
store2.formData.events = [];
|
|
8069
8172
|
}
|
|
8070
|
-
saveFormdataInLocalStorage(store2.
|
|
8173
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
8071
8174
|
const finalPath = `${path}.events[${(_c = (_b = store2.formData) == null ? void 0 : _b.events) == null ? void 0 : _c.length}]`;
|
|
8072
8175
|
store2.searchParams.set("path", finalPath);
|
|
8073
8176
|
store2.setSearchParams(store2.searchParams);
|
|
8074
8177
|
this.setPage();
|
|
8075
8178
|
},
|
|
8076
|
-
editEvent:
|
|
8179
|
+
editEvent: function() {
|
|
8077
8180
|
var _a;
|
|
8078
8181
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8079
8182
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8080
|
-
saveFormdataInLocalStorage(store2.
|
|
8183
|
+
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
8081
8184
|
const finalPath = `${path}.events[${rowId}]`;
|
|
8082
8185
|
store2.searchParams.set("path", finalPath);
|
|
8083
8186
|
store2.setSearchParams(store2.searchParams);
|
|
8084
8187
|
this.setPage();
|
|
8085
8188
|
},
|
|
8086
|
-
deleteEvent: Component(store2, dynamicData2).deleteEvent,
|
|
8189
|
+
deleteEvent: Component(store2, dynamicData2, submitHandler, service2).deleteEvent,
|
|
8087
8190
|
backHandler: function() {
|
|
8088
8191
|
store2.navigate(-1);
|
|
8089
8192
|
}
|
|
@@ -8390,37 +8493,13 @@ var service = (funcParams) => {
|
|
|
8390
8493
|
});
|
|
8391
8494
|
},
|
|
8392
8495
|
onClick: async function() {
|
|
8393
|
-
|
|
8394
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8395
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onClick[path]) {
|
|
8396
|
-
await executeEvents({
|
|
8397
|
-
...executeEventsParameters,
|
|
8398
|
-
config: eventConfig,
|
|
8399
|
-
componentName: path
|
|
8400
|
-
});
|
|
8401
|
-
}
|
|
8496
|
+
await this.callHandler("onClick");
|
|
8402
8497
|
},
|
|
8403
|
-
onFileDownload: async ()
|
|
8404
|
-
|
|
8405
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8406
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onDownload[path]) {
|
|
8407
|
-
await executeEvents({
|
|
8408
|
-
...executeEventsParameters,
|
|
8409
|
-
config: eventConfig,
|
|
8410
|
-
componentName: path
|
|
8411
|
-
});
|
|
8412
|
-
}
|
|
8498
|
+
onFileDownload: async function() {
|
|
8499
|
+
await this.callHandler("onDownload");
|
|
8413
8500
|
},
|
|
8414
|
-
onFileUpload: async ()
|
|
8415
|
-
|
|
8416
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8417
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onUpload[path]) {
|
|
8418
|
-
await executeEvents({
|
|
8419
|
-
...executeEventsParameters,
|
|
8420
|
-
config: eventConfig,
|
|
8421
|
-
componentName: path
|
|
8422
|
-
});
|
|
8423
|
-
}
|
|
8501
|
+
onFileUpload: async function() {
|
|
8502
|
+
await this.callHandler("onUpload");
|
|
8424
8503
|
},
|
|
8425
8504
|
onPaginationChange: async function(paginationValues) {
|
|
8426
8505
|
var _a;
|
|
@@ -8484,6 +8563,29 @@ var service = (funcParams) => {
|
|
|
8484
8563
|
}
|
|
8485
8564
|
return LastCallResponse;
|
|
8486
8565
|
},
|
|
8566
|
+
StepperBackHandler: async function(param) {
|
|
8567
|
+
await this.callHandler("onStepperBack");
|
|
8568
|
+
param.handleBack();
|
|
8569
|
+
},
|
|
8570
|
+
StepperSkipHandler: async function(param) {
|
|
8571
|
+
await this.callHandler("onStepperSkip");
|
|
8572
|
+
param.handleSkip();
|
|
8573
|
+
},
|
|
8574
|
+
StepperNextHandler: async function(param) {
|
|
8575
|
+
await this.callHandler("onStepperNext");
|
|
8576
|
+
param.handleNext();
|
|
8577
|
+
},
|
|
8578
|
+
callHandler: async function(eventType) {
|
|
8579
|
+
var _a, _b;
|
|
8580
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8581
|
+
for (const eventConfig of (_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) {
|
|
8582
|
+
await executeEvents({
|
|
8583
|
+
...executeEventsParameters,
|
|
8584
|
+
config: eventConfig,
|
|
8585
|
+
componentName: path
|
|
8586
|
+
});
|
|
8587
|
+
}
|
|
8588
|
+
},
|
|
8487
8589
|
downloadFile: downloadFile$1
|
|
8488
8590
|
};
|
|
8489
8591
|
};
|
|
@@ -10173,7 +10275,7 @@ const FileInput = {
|
|
|
10173
10275
|
required: false,
|
|
10174
10276
|
onUpload: "onFileUpload",
|
|
10175
10277
|
onDownload: "onFileDownload",
|
|
10176
|
-
label: "
|
|
10278
|
+
label: "Aggrement Copy"
|
|
10177
10279
|
},
|
|
10178
10280
|
style: {
|
|
10179
10281
|
backgroundColor: "none"
|
|
@@ -10192,46 +10294,87 @@ const buildFileInput = (config, componentScope) => {
|
|
|
10192
10294
|
}
|
|
10193
10295
|
return box;
|
|
10194
10296
|
};
|
|
10195
|
-
const
|
|
10297
|
+
const Stepper = {
|
|
10196
10298
|
type: "Control",
|
|
10197
|
-
scope: "#/properties/
|
|
10299
|
+
scope: "#/properties/Stepper",
|
|
10198
10300
|
options: {
|
|
10199
|
-
widget: "
|
|
10301
|
+
widget: "Stepper"
|
|
10200
10302
|
},
|
|
10201
10303
|
config: {
|
|
10202
|
-
layout: 12,
|
|
10203
10304
|
main: {
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10305
|
+
label: ["First", "Second", "Third"],
|
|
10306
|
+
stepsSkip: { 0: "false", 1: "false" },
|
|
10307
|
+
resetButton: false,
|
|
10308
|
+
resetText: "RESETdaad",
|
|
10309
|
+
orientation: "vertical"
|
|
10209
10310
|
}
|
|
10210
|
-
}
|
|
10311
|
+
},
|
|
10312
|
+
"elements": []
|
|
10211
10313
|
};
|
|
10212
|
-
const
|
|
10213
|
-
const
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10314
|
+
const buildStepper = (config, componentScope) => {
|
|
10315
|
+
const stepper = _.cloneDeep(Stepper);
|
|
10316
|
+
stepper.scope = componentScope;
|
|
10317
|
+
stepper.config.main.complete = config.fullScreen === "YES" ? true : false;
|
|
10318
|
+
stepper.config.main.resetButton = config.fullWidth === "YES" ? true : false;
|
|
10319
|
+
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10320
|
+
stepper.config.main.completeText = config.completeText || "CompleteText";
|
|
10321
|
+
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10322
|
+
if (config.sectionLabels) {
|
|
10323
|
+
stepper.config.main.tabLabels = config.sectionLabels.map((e, i) => {
|
|
10324
|
+
return { label: e.label, id: i };
|
|
10325
|
+
});
|
|
10218
10326
|
}
|
|
10219
|
-
if (config.
|
|
10220
|
-
|
|
10327
|
+
if (config.skipAvailable) {
|
|
10328
|
+
stepper.config.main.tabLabels = config.skipAvailable.map((e, i) => {
|
|
10329
|
+
return { [e.skipId]: true };
|
|
10330
|
+
});
|
|
10221
10331
|
}
|
|
10222
|
-
if (config.
|
|
10223
|
-
|
|
10332
|
+
if (config.layout) {
|
|
10333
|
+
stepper.config.layout = createLayoutFormat(config.layout);
|
|
10224
10334
|
}
|
|
10225
|
-
if (config.
|
|
10226
|
-
|
|
10335
|
+
if (config.style) {
|
|
10336
|
+
stepper.config.style = JSON.parse(config.style);
|
|
10227
10337
|
}
|
|
10228
|
-
|
|
10229
|
-
|
|
10338
|
+
return stepper;
|
|
10339
|
+
};
|
|
10340
|
+
const PopUP = {
|
|
10341
|
+
type: "Control",
|
|
10342
|
+
scope: "#/properties/text",
|
|
10343
|
+
options: {
|
|
10344
|
+
widget: "PopUp"
|
|
10345
|
+
},
|
|
10346
|
+
config: {
|
|
10347
|
+
layout: {
|
|
10348
|
+
xs: 12,
|
|
10349
|
+
sm: 12,
|
|
10350
|
+
md: 12,
|
|
10351
|
+
lg: 12
|
|
10352
|
+
},
|
|
10353
|
+
main: {
|
|
10354
|
+
label: "PopUp",
|
|
10355
|
+
fullScreen: false,
|
|
10356
|
+
fullWidth: false,
|
|
10357
|
+
maxWidth: false,
|
|
10358
|
+
alignItems: false,
|
|
10359
|
+
spacing: 2
|
|
10360
|
+
},
|
|
10361
|
+
style: {}
|
|
10362
|
+
}
|
|
10363
|
+
};
|
|
10364
|
+
const buildPopUp = (config, componentScope) => {
|
|
10365
|
+
const popup = _.cloneDeep(PopUP);
|
|
10366
|
+
popup.scope = componentScope;
|
|
10367
|
+
popup.config.main.label = config.label;
|
|
10368
|
+
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
10369
|
+
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
10370
|
+
popup.config.main.maxWidth = config.maxWidth || false;
|
|
10371
|
+
if (config.layout) {
|
|
10372
|
+
popup.config.layout = createLayoutFormat(config.layout);
|
|
10230
10373
|
}
|
|
10231
10374
|
if (config.style) {
|
|
10232
|
-
|
|
10375
|
+
PopUP.config.style = JSON.parse(config.style);
|
|
10233
10376
|
}
|
|
10234
|
-
return
|
|
10377
|
+
return popup;
|
|
10235
10378
|
};
|
|
10236
10379
|
let schema = {
|
|
10237
10380
|
type: "object",
|
|
@@ -10351,8 +10494,11 @@ const buildUiSchema = (config) => {
|
|
|
10351
10494
|
let elements = {};
|
|
10352
10495
|
const componentScope = `#/properties/${config.name}`;
|
|
10353
10496
|
switch (config.type) {
|
|
10354
|
-
case "
|
|
10355
|
-
elements =
|
|
10497
|
+
case "Stepper":
|
|
10498
|
+
elements = buildStepper(config, componentScope);
|
|
10499
|
+
break;
|
|
10500
|
+
case "PopUp":
|
|
10501
|
+
elements = buildPopUp(config, componentScope);
|
|
10356
10502
|
break;
|
|
10357
10503
|
case "FileInput":
|
|
10358
10504
|
elements = buildFileInput(config, componentScope);
|
|
@@ -10498,8 +10644,5 @@ const buildUiSchema = (config) => {
|
|
|
10498
10644
|
}
|
|
10499
10645
|
return elements;
|
|
10500
10646
|
};
|
|
10501
|
-
|
|
10502
|
-
localStorage.removeItem("pageFormdata");
|
|
10503
|
-
};
|
|
10504
|
-
export { buildConfig, buildSchema, buildUiSchema, clearLocalStorage as clearPreviousCache, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|
|
10647
|
+
export { buildConfig, buildSchema, buildUiSchema, clearFromLocalStorage, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|
|
10505
10648
|
//# sourceMappingURL=impaktapps-ui-builder.es.js.map
|