impaktapps-ui-builder 0.0.103 → 0.0.105-4.alpha-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 +161 -55
- 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/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +18 -19
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +19 -21
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +590 -563
- package/src/impaktapps-ui-builder/builder/services/component.ts +118 -29
- package/src/impaktapps-ui-builder/runtime/services/events.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/service.ts +9 -0
|
@@ -6475,23 +6475,20 @@ const ComponentSchema = {
|
|
|
6475
6475
|
}
|
|
6476
6476
|
},
|
|
6477
6477
|
filteringOptions: {
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
{ const: "lessThanOrEqualTo", title: "Less than or equal to" }
|
|
6493
|
-
]
|
|
6494
|
-
}
|
|
6478
|
+
oneOf: [
|
|
6479
|
+
{ const: "fuzzy", title: "Fuzzy" },
|
|
6480
|
+
{ const: "contains", title: "Contain" },
|
|
6481
|
+
{ const: "startsWith", title: "Starts with" },
|
|
6482
|
+
{ const: "endsWith", title: "Ends with" },
|
|
6483
|
+
{ const: "equals", title: "Equals" },
|
|
6484
|
+
{ const: "notEquals", title: "Not Equals" },
|
|
6485
|
+
{ const: "between", title: "Between" },
|
|
6486
|
+
{ const: "betweenInclusive", title: "Between inclusive" },
|
|
6487
|
+
{ const: "greaterThan", title: "Greater than" },
|
|
6488
|
+
{ const: "greaterThanOrEqualTo", title: "Greater than or equal to" },
|
|
6489
|
+
{ const: "lessThan", title: "Less than" },
|
|
6490
|
+
{ const: "lessThanOrEqualTo", title: "Less than or equal to" }
|
|
6491
|
+
]
|
|
6495
6492
|
},
|
|
6496
6493
|
legendLabels: {
|
|
6497
6494
|
type: "array",
|
|
@@ -6702,20 +6699,37 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6702
6699
|
},
|
|
6703
6700
|
{
|
|
6704
6701
|
type: "Control",
|
|
6705
|
-
scope: "#/properties/
|
|
6702
|
+
scope: "#/properties/proc1",
|
|
6703
|
+
config: {
|
|
6704
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6705
|
+
},
|
|
6706
6706
|
options: {
|
|
6707
|
-
widget: "
|
|
6707
|
+
widget: "EmptyBox"
|
|
6708
|
+
}
|
|
6709
|
+
},
|
|
6710
|
+
{
|
|
6711
|
+
type: "Control",
|
|
6712
|
+
scope: "#/properties/proc2",
|
|
6713
|
+
config: {
|
|
6714
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6708
6715
|
},
|
|
6716
|
+
options: {
|
|
6717
|
+
widget: "EmptyBox"
|
|
6718
|
+
}
|
|
6719
|
+
},
|
|
6720
|
+
{
|
|
6721
|
+
type: "Control",
|
|
6722
|
+
scope: "#/properties/proc3",
|
|
6709
6723
|
config: {
|
|
6710
|
-
layout: { xs:
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6724
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6725
|
+
},
|
|
6726
|
+
options: {
|
|
6727
|
+
widget: "EmptyBox"
|
|
6714
6728
|
}
|
|
6715
6729
|
},
|
|
6716
6730
|
{
|
|
6717
6731
|
type: "Control",
|
|
6718
|
-
scope: "#/properties/
|
|
6732
|
+
scope: "#/properties/proc4",
|
|
6719
6733
|
config: {
|
|
6720
6734
|
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6721
6735
|
},
|
|
@@ -6725,7 +6739,17 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6725
6739
|
},
|
|
6726
6740
|
{
|
|
6727
6741
|
type: "Control",
|
|
6728
|
-
scope: "#/properties/
|
|
6742
|
+
scope: "#/properties/proc5",
|
|
6743
|
+
config: {
|
|
6744
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6745
|
+
},
|
|
6746
|
+
options: {
|
|
6747
|
+
widget: "EmptyBox"
|
|
6748
|
+
}
|
|
6749
|
+
},
|
|
6750
|
+
{
|
|
6751
|
+
type: "Control",
|
|
6752
|
+
scope: "#/properties/proc8",
|
|
6729
6753
|
config: {
|
|
6730
6754
|
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6731
6755
|
},
|
|
@@ -8431,8 +8455,9 @@ const sectionLabels = {
|
|
|
8431
8455
|
Thought: ["Core", "Properties", "Event", "Style", "Validation"]
|
|
8432
8456
|
};
|
|
8433
8457
|
function refreshPage(type, store2) {
|
|
8434
|
-
var _a;
|
|
8458
|
+
var _a, _b;
|
|
8435
8459
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
|
|
8460
|
+
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
8436
8461
|
if (type) {
|
|
8437
8462
|
const sectionUiSchema = {
|
|
8438
8463
|
Core: CoreSection,
|
|
@@ -8447,6 +8472,81 @@ function refreshPage(type, store2) {
|
|
|
8447
8472
|
UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
|
|
8448
8473
|
UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
|
|
8449
8474
|
}
|
|
8475
|
+
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
8476
|
+
const lastDotIndex = path.lastIndexOf(".");
|
|
8477
|
+
const parentPath = path.slice(0, lastDotIndex);
|
|
8478
|
+
const parentObj = _.get(currentConfig, parentPath);
|
|
8479
|
+
if ((parentObj == null ? void 0 : parentObj.type) === "Table") {
|
|
8480
|
+
UiSchema.elements[1].elements[0].elements[3] = {
|
|
8481
|
+
type: "Control",
|
|
8482
|
+
scope: "#/properties/columnFormat",
|
|
8483
|
+
options: {
|
|
8484
|
+
widget: "SelectInputField"
|
|
8485
|
+
},
|
|
8486
|
+
config: {
|
|
8487
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
8488
|
+
main: {
|
|
8489
|
+
label: "Column Format"
|
|
8490
|
+
}
|
|
8491
|
+
}
|
|
8492
|
+
};
|
|
8493
|
+
UiSchema.elements[1].elements[0].elements[4] = {
|
|
8494
|
+
type: "Control",
|
|
8495
|
+
scope: "#/properties/enableFilter",
|
|
8496
|
+
options: {
|
|
8497
|
+
widget: "RadioInputField"
|
|
8498
|
+
},
|
|
8499
|
+
config: {
|
|
8500
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
8501
|
+
main: {
|
|
8502
|
+
label: "Enable Filter",
|
|
8503
|
+
options: ["Yes", "No"]
|
|
8504
|
+
}
|
|
8505
|
+
}
|
|
8506
|
+
}, UiSchema.elements[1].elements[0].elements[5] = {
|
|
8507
|
+
type: "Control",
|
|
8508
|
+
scope: "#/properties/filteringOptions",
|
|
8509
|
+
options: {
|
|
8510
|
+
widget: "SelectInputField"
|
|
8511
|
+
},
|
|
8512
|
+
config: {
|
|
8513
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
8514
|
+
main: {
|
|
8515
|
+
label: "Filter Mode",
|
|
8516
|
+
multiple: true
|
|
8517
|
+
}
|
|
8518
|
+
}
|
|
8519
|
+
};
|
|
8520
|
+
UiSchema.elements[1].elements[0].elements[6] = {
|
|
8521
|
+
type: "Control",
|
|
8522
|
+
scope: "#/properties/enableSorting",
|
|
8523
|
+
options: {
|
|
8524
|
+
widget: "RadioInputField"
|
|
8525
|
+
},
|
|
8526
|
+
config: {
|
|
8527
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
8528
|
+
main: {
|
|
8529
|
+
label: "Enable Sorting",
|
|
8530
|
+
options: ["Yes", "No"]
|
|
8531
|
+
}
|
|
8532
|
+
}
|
|
8533
|
+
}, UiSchema.elements[1].elements[0].elements[7] = {
|
|
8534
|
+
type: "Control",
|
|
8535
|
+
scope: "#/properties/columnKey",
|
|
8536
|
+
options: {
|
|
8537
|
+
widget: "InputField"
|
|
8538
|
+
},
|
|
8539
|
+
config: {
|
|
8540
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
8541
|
+
main: {
|
|
8542
|
+
label: "Column Key",
|
|
8543
|
+
options: [],
|
|
8544
|
+
color: "secondary",
|
|
8545
|
+
required: true
|
|
8546
|
+
}
|
|
8547
|
+
}
|
|
8548
|
+
};
|
|
8549
|
+
}
|
|
8450
8550
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8451
8551
|
this.ElementPathSetter(UiSchema);
|
|
8452
8552
|
}
|
|
@@ -9898,16 +9998,17 @@ function executeCustomHandler(params) {
|
|
|
9898
9998
|
}
|
|
9899
9999
|
}
|
|
9900
10000
|
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
|
|
10001
|
+
var _a, _b, _c;
|
|
9901
10002
|
if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9902
10003
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9903
10004
|
store2.setSchema((pre) => {
|
|
9904
|
-
var
|
|
10005
|
+
var _a2;
|
|
9905
10006
|
return {
|
|
9906
10007
|
...pre,
|
|
9907
10008
|
properties: {
|
|
9908
10009
|
...pre.properties,
|
|
9909
10010
|
[componentName]: {
|
|
9910
|
-
...(
|
|
10011
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9911
10012
|
oneOf: handlerResponse.data
|
|
9912
10013
|
}
|
|
9913
10014
|
}
|
|
@@ -9917,13 +10018,13 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9917
10018
|
} else if (eventConfig.type === "MultipleSelect" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9918
10019
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9919
10020
|
store2.setSchema((pre) => {
|
|
9920
|
-
var
|
|
10021
|
+
var _a2;
|
|
9921
10022
|
return {
|
|
9922
10023
|
...pre,
|
|
9923
10024
|
properties: {
|
|
9924
10025
|
...pre.properties,
|
|
9925
10026
|
[componentName]: {
|
|
9926
|
-
...(
|
|
10027
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9927
10028
|
type: "array",
|
|
9928
10029
|
items: {
|
|
9929
10030
|
oneOf: handlerResponse == null ? void 0 : handlerResponse.data
|
|
@@ -9945,8 +10046,8 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9945
10046
|
}
|
|
9946
10047
|
} else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
9947
10048
|
if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9948
|
-
formDataHolder[componentName] = handlerResponse.data;
|
|
9949
|
-
formDataHolder[`${componentName}_RowCount`] = handlerResponse.data;
|
|
10049
|
+
formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
|
|
10050
|
+
formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
|
|
9950
10051
|
store2.setFormdata((pre) => {
|
|
9951
10052
|
return { ...pre, ...formDataHolder };
|
|
9952
10053
|
});
|
|
@@ -10107,7 +10208,7 @@ var service = (funcParams) => {
|
|
|
10107
10208
|
};
|
|
10108
10209
|
return {
|
|
10109
10210
|
setPage: async function() {
|
|
10110
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
10211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
10111
10212
|
funcParams.store.setFormdata({});
|
|
10112
10213
|
funcParams.store.newData = {};
|
|
10113
10214
|
const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData");
|
|
@@ -10122,12 +10223,19 @@ var service = (funcParams) => {
|
|
|
10122
10223
|
}));
|
|
10123
10224
|
}
|
|
10124
10225
|
const config2 = pageData == null ? void 0 : pageData.config;
|
|
10226
|
+
const pathParts = funcParams.store.location.pathname.split("/");
|
|
10227
|
+
const programId = ((_a = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")) == null ? void 0 : _a.value) || "programID";
|
|
10228
|
+
if ((pathParts == null ? void 0 : pathParts[1]) === "page") {
|
|
10229
|
+
if (programId !== "programID") {
|
|
10230
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, programId }));
|
|
10231
|
+
}
|
|
10232
|
+
}
|
|
10125
10233
|
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
10126
10234
|
const event2 = new CustomEvent("pageNameChanged", {
|
|
10127
10235
|
detail: { pageName: config2.label }
|
|
10128
10236
|
});
|
|
10129
10237
|
window.dispatchEvent(event2);
|
|
10130
|
-
const theme = (
|
|
10238
|
+
const theme = (_c = (_b = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _b.theme) == null ? void 0 : _c.myTheme;
|
|
10131
10239
|
uiSchema.elements.push(
|
|
10132
10240
|
{
|
|
10133
10241
|
type: "HorizontalLayout",
|
|
@@ -10157,7 +10265,7 @@ var service = (funcParams) => {
|
|
|
10157
10265
|
heading: "Copywriter@ACT21.IO"
|
|
10158
10266
|
},
|
|
10159
10267
|
style: {
|
|
10160
|
-
color: ((
|
|
10268
|
+
color: ((_e = (_d = theme == null ? void 0 : theme.palette) == null ? void 0 : _d.text) == null ? void 0 : _e.disabled) || "#AFAFAF",
|
|
10161
10269
|
fontSize: "12px",
|
|
10162
10270
|
textAlign: "center",
|
|
10163
10271
|
lineHeight: 2,
|
|
@@ -10184,7 +10292,7 @@ var service = (funcParams) => {
|
|
|
10184
10292
|
width: "fit-content"
|
|
10185
10293
|
},
|
|
10186
10294
|
style: {
|
|
10187
|
-
fill: (
|
|
10295
|
+
fill: (_g = (_f = theme == null ? void 0 : theme.palette) == null ? void 0 : _f.primary) == null ? void 0 : _g.main,
|
|
10188
10296
|
width: 20,
|
|
10189
10297
|
height: 0,
|
|
10190
10298
|
top: 0,
|
|
@@ -10193,7 +10301,7 @@ var service = (funcParams) => {
|
|
|
10193
10301
|
fontSize: "12px",
|
|
10194
10302
|
cursor: "pointer",
|
|
10195
10303
|
":hover": {
|
|
10196
|
-
fill: (
|
|
10304
|
+
fill: (_i = (_h = theme == null ? void 0 : theme.palette) == null ? void 0 : _h.primary) == null ? void 0 : _i.dark
|
|
10197
10305
|
},
|
|
10198
10306
|
marginRight: "13px"
|
|
10199
10307
|
}
|
|
@@ -10216,7 +10324,7 @@ var service = (funcParams) => {
|
|
|
10216
10324
|
lineHeight: 1,
|
|
10217
10325
|
height: 0,
|
|
10218
10326
|
width: "fit-content",
|
|
10219
|
-
color: (
|
|
10327
|
+
color: (_k = (_j = theme == null ? void 0 : theme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main,
|
|
10220
10328
|
fontSize: "14px",
|
|
10221
10329
|
cursor: "pointer",
|
|
10222
10330
|
marginLeft: "2px",
|
|
@@ -10224,7 +10332,7 @@ var service = (funcParams) => {
|
|
|
10224
10332
|
right: "12px",
|
|
10225
10333
|
position: "absolute",
|
|
10226
10334
|
":hover": {
|
|
10227
|
-
color: (
|
|
10335
|
+
color: (_m = (_l = theme == null ? void 0 : theme.palette) == null ? void 0 : _l.primary) == null ? void 0 : _m.dark
|
|
10228
10336
|
},
|
|
10229
10337
|
marginRight: "4px"
|
|
10230
10338
|
}
|
|
@@ -10233,7 +10341,7 @@ var service = (funcParams) => {
|
|
|
10233
10341
|
]
|
|
10234
10342
|
}
|
|
10235
10343
|
);
|
|
10236
|
-
const schema2 = (
|
|
10344
|
+
const schema2 = (_n = pageData == null ? void 0 : pageData.schema) != null ? _n : { type: "object", properties: {} };
|
|
10237
10345
|
eventGroups = extractEvents(config2);
|
|
10238
10346
|
executeEventsParameters = {
|
|
10239
10347
|
config: {},
|
|
@@ -12366,27 +12474,25 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12366
12474
|
});
|
|
12367
12475
|
}
|
|
12368
12476
|
elements.elements = config2.elements.map((cellElem, elemInd) => {
|
|
12369
|
-
var _a
|
|
12477
|
+
var _a;
|
|
12478
|
+
const commonProperties = {
|
|
12479
|
+
accessorKey: cellElem.name,
|
|
12480
|
+
type: cellElem.columnFormat,
|
|
12481
|
+
header: cellElem.label || cellElem.name,
|
|
12482
|
+
size: sizeMap[cellElem.name] || 180,
|
|
12483
|
+
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_a = filterMap[cellElem.name]) != null ? _a : false,
|
|
12484
|
+
columnFilterModeOptions: config2.filteringOptions,
|
|
12485
|
+
enableSorting: config2.enableSorting === "No" ? false : true,
|
|
12486
|
+
columnKey: config2.columnKey
|
|
12487
|
+
};
|
|
12370
12488
|
if (cellElem.type) {
|
|
12371
12489
|
return {
|
|
12372
|
-
accessorKey: cellElem.name,
|
|
12373
|
-
header: cellElem.label || cellElem.name,
|
|
12374
|
-
size: sizeMap[cellElem.name] || 180,
|
|
12375
|
-
type: cellElem.columnFormat,
|
|
12376
12490
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
|
|
12377
12491
|
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store2)) : [],
|
|
12378
|
-
|
|
12379
|
-
columnFilterModeOptions: config2.filteringOptions
|
|
12492
|
+
...commonProperties
|
|
12380
12493
|
};
|
|
12381
12494
|
} else {
|
|
12382
|
-
return
|
|
12383
|
-
accessorKey: cellElem.name,
|
|
12384
|
-
type: cellElem.columnFormat,
|
|
12385
|
-
header: cellElem.label || cellElem.name,
|
|
12386
|
-
size: sizeMap[cellElem.name] || 180,
|
|
12387
|
-
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_b = filterMap[cellElem.name]) != null ? _b : false,
|
|
12388
|
-
columnFilterModeOptions: config2.filteringOptions
|
|
12389
|
-
};
|
|
12495
|
+
return commonProperties;
|
|
12390
12496
|
}
|
|
12391
12497
|
});
|
|
12392
12498
|
} else if (config2.type == "Array") {
|