impaktapps-ui-builder 0.0.409-o → 0.0.409-q
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 +54 -128
- 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/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +4 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +0 -30
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +9 -6
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +26 -47
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -22
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +0 -23
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +4 -9
- package/src/impaktapps-ui-builder/runtime/services/service.ts +17 -31
|
@@ -5913,7 +5913,8 @@ const ComponentSchema = {
|
|
|
5913
5913
|
{ title: "Upload File", const: "UploadFile" },
|
|
5914
5914
|
{ title: "Timer", const: "Timer" },
|
|
5915
5915
|
{ title: "Upload File", const: "UploadFile" },
|
|
5916
|
-
{ title: "TreeMap", const: "TreeMap" }
|
|
5916
|
+
{ title: "TreeMap", const: "TreeMap" },
|
|
5917
|
+
{ title: "ColumnGroup", const: "ColumnGroup" }
|
|
5917
5918
|
]
|
|
5918
5919
|
},
|
|
5919
5920
|
columnFormat: {
|
|
@@ -6314,27 +6315,6 @@ const componentBasicUiSchema = {
|
|
|
6314
6315
|
}
|
|
6315
6316
|
}
|
|
6316
6317
|
},
|
|
6317
|
-
{
|
|
6318
|
-
type: "Control",
|
|
6319
|
-
scope: "#/properties/parent",
|
|
6320
|
-
options: {
|
|
6321
|
-
widget: "InputField"
|
|
6322
|
-
},
|
|
6323
|
-
config: {
|
|
6324
|
-
layout: {
|
|
6325
|
-
xs: 12,
|
|
6326
|
-
sm: 12,
|
|
6327
|
-
md: 6,
|
|
6328
|
-
lg: 6
|
|
6329
|
-
},
|
|
6330
|
-
main: {
|
|
6331
|
-
label: "parent",
|
|
6332
|
-
options: [],
|
|
6333
|
-
color: "secondary",
|
|
6334
|
-
required: true
|
|
6335
|
-
}
|
|
6336
|
-
}
|
|
6337
|
-
},
|
|
6338
6318
|
{
|
|
6339
6319
|
type: "Control",
|
|
6340
6320
|
scope: "#/properties/columnFormat",
|
|
@@ -6547,27 +6527,6 @@ const CoreSection = {
|
|
|
6547
6527
|
}
|
|
6548
6528
|
}
|
|
6549
6529
|
},
|
|
6550
|
-
{
|
|
6551
|
-
type: "Control",
|
|
6552
|
-
scope: "#/properties/parent",
|
|
6553
|
-
options: {
|
|
6554
|
-
widget: "InputField"
|
|
6555
|
-
},
|
|
6556
|
-
config: {
|
|
6557
|
-
layout: {
|
|
6558
|
-
xs: 12,
|
|
6559
|
-
sm: 12,
|
|
6560
|
-
md: 6,
|
|
6561
|
-
lg: 6
|
|
6562
|
-
},
|
|
6563
|
-
main: {
|
|
6564
|
-
label: "parent",
|
|
6565
|
-
options: [],
|
|
6566
|
-
color: "secondary",
|
|
6567
|
-
required: true
|
|
6568
|
-
}
|
|
6569
|
-
}
|
|
6570
|
-
},
|
|
6571
6530
|
{
|
|
6572
6531
|
type: "Control",
|
|
6573
6532
|
scope: "#/properties/columnFormat",
|
|
@@ -7598,7 +7557,8 @@ const sectionLabels = {
|
|
|
7598
7557
|
Stepper: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7599
7558
|
DataGrid: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7600
7559
|
InputSlider: ["Core", "Properties", "Event", "Style", "Validation"],
|
|
7601
|
-
TreeMap: ["Core", "Components", "Properties", "Event", "Style"]
|
|
7560
|
+
TreeMap: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7561
|
+
ColumnGroup: ["Core", "Components"]
|
|
7602
7562
|
};
|
|
7603
7563
|
const refreshPage = (type, store2) => {
|
|
7604
7564
|
var _a;
|
|
@@ -7728,14 +7688,8 @@ var pageMaster = (funcParams) => {
|
|
|
7728
7688
|
},
|
|
7729
7689
|
getFormdata: async function() {
|
|
7730
7690
|
var _a;
|
|
7731
|
-
|
|
7732
|
-
let config =
|
|
7733
|
-
if (id) {
|
|
7734
|
-
await service2.get(`/page/getById?id=${id}`).then((res) => {
|
|
7735
|
-
var _a2;
|
|
7736
|
-
config = (_a2 = res.data) == null ? void 0 : _a2.config;
|
|
7737
|
-
});
|
|
7738
|
-
}
|
|
7691
|
+
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7692
|
+
let config = await funcParams.pageConfigProvider();
|
|
7739
7693
|
const formData = getFormdataFromLocalStorage();
|
|
7740
7694
|
if (formData) {
|
|
7741
7695
|
return formData;
|
|
@@ -8799,30 +8753,14 @@ var service = (funcParams) => {
|
|
|
8799
8753
|
};
|
|
8800
8754
|
return {
|
|
8801
8755
|
setPage: async function() {
|
|
8802
|
-
var _a
|
|
8756
|
+
var _a;
|
|
8803
8757
|
funcParams.store.setFormdata({});
|
|
8804
|
-
const data = JSON.stringify({
|
|
8805
|
-
pageName: funcParams.store.pageName
|
|
8806
|
-
});
|
|
8807
8758
|
let pageData;
|
|
8808
8759
|
const pageBasicDetailString = localStorage.getItem("pagemasterMetaData");
|
|
8809
8760
|
if (pageBasicDetailString) {
|
|
8810
8761
|
pageData = JSON.parse(pageBasicDetailString);
|
|
8811
8762
|
} else {
|
|
8812
|
-
|
|
8813
|
-
headers: {
|
|
8814
|
-
"Content-Type": "application/json"
|
|
8815
|
-
}
|
|
8816
|
-
});
|
|
8817
|
-
const response = await funcParams.service.get(
|
|
8818
|
-
`/page/getById?id=${(_a = pageId == null ? void 0 : pageId.data) == null ? void 0 : _a.id}`,
|
|
8819
|
-
{
|
|
8820
|
-
headers: {
|
|
8821
|
-
"Content-Type": "application/json"
|
|
8822
|
-
}
|
|
8823
|
-
}
|
|
8824
|
-
);
|
|
8825
|
-
pageData = response.data;
|
|
8763
|
+
pageData = funcParams.pageDataProvider();
|
|
8826
8764
|
localStorage.setItem("pagemasterMetaData", JSON.stringify({
|
|
8827
8765
|
schema: pageData == null ? void 0 : pageData.schema,
|
|
8828
8766
|
uiSchema: pageData == null ? void 0 : pageData.uiSchema,
|
|
@@ -8831,7 +8769,7 @@ var service = (funcParams) => {
|
|
|
8831
8769
|
}
|
|
8832
8770
|
const config = pageData == null ? void 0 : pageData.config;
|
|
8833
8771
|
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
8834
|
-
const schema2 = (
|
|
8772
|
+
const schema2 = (_a = pageData == null ? void 0 : pageData.schema) != null ? _a : { type: "object", properties: {} };
|
|
8835
8773
|
eventGroups = {};
|
|
8836
8774
|
eventGroups = extractEvents(config);
|
|
8837
8775
|
executeEventsParameters = {
|
|
@@ -8867,19 +8805,21 @@ var service = (funcParams) => {
|
|
|
8867
8805
|
funcParams.store.setUiSchema(uiSchema);
|
|
8868
8806
|
},
|
|
8869
8807
|
onCellRenderer: (cellParams) => {
|
|
8870
|
-
var _a;
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8808
|
+
var _a, _b, _c;
|
|
8809
|
+
if (eventGroups.onCellRenderer) {
|
|
8810
|
+
let finalResponse = {};
|
|
8811
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || ((_c = (_b = funcParams == null ? void 0 : funcParams.dynamicData) == null ? void 0 : _b.path) == null ? void 0 : _c.split(".")[0]);
|
|
8812
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
|
|
8813
|
+
executeEventsParameters.store.functionParameters = cellParams;
|
|
8814
|
+
finalResponse = executeEvents({
|
|
8815
|
+
...executeEventsParameters,
|
|
8816
|
+
config: eventConfig,
|
|
8817
|
+
componentName: path
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8820
|
+
return finalResponse;
|
|
8880
8821
|
}
|
|
8881
|
-
|
|
8882
|
-
return finalResponse;
|
|
8822
|
+
return {};
|
|
8883
8823
|
},
|
|
8884
8824
|
onClick: function() {
|
|
8885
8825
|
this.callHandler("onClick");
|
|
@@ -10485,8 +10425,10 @@ const buildMultiSelect = (config, componentScope) => {
|
|
|
10485
10425
|
const buildBasicUiSchema = (config) => {
|
|
10486
10426
|
return {
|
|
10487
10427
|
"type": "HorizontalLayout",
|
|
10488
|
-
pageName:
|
|
10489
|
-
|
|
10428
|
+
pageName: config.name,
|
|
10429
|
+
name: config.name,
|
|
10430
|
+
accessorKey: config.name,
|
|
10431
|
+
header: config.label || config.name,
|
|
10490
10432
|
"elements": []
|
|
10491
10433
|
};
|
|
10492
10434
|
};
|
|
@@ -11202,6 +11144,13 @@ const buildUiSchema = (config) => {
|
|
|
11202
11144
|
case "Timer":
|
|
11203
11145
|
elements = buildTimer(config, componentScope);
|
|
11204
11146
|
break;
|
|
11147
|
+
case "ColumnGroup":
|
|
11148
|
+
elements = {
|
|
11149
|
+
accessorKey: config.name,
|
|
11150
|
+
header: config.label || config.name,
|
|
11151
|
+
elements: []
|
|
11152
|
+
};
|
|
11153
|
+
break;
|
|
11205
11154
|
case "MultipleSelect":
|
|
11206
11155
|
elements = buildMultiSelect(config, componentScope);
|
|
11207
11156
|
break;
|
|
@@ -11219,55 +11168,32 @@ const buildUiSchema = (config) => {
|
|
|
11219
11168
|
if (config == null ? void 0 : config.elements) {
|
|
11220
11169
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
11221
11170
|
return elements;
|
|
11222
|
-
} else if (config.type == "Table") {
|
|
11223
|
-
let nodeProvider2 = function(element) {
|
|
11224
|
-
if (element.type) {
|
|
11225
|
-
return {
|
|
11226
|
-
accessorKey: element.name,
|
|
11227
|
-
type: element.columnFormat,
|
|
11228
|
-
header: element.label || element.name,
|
|
11229
|
-
size: sizeMap[element.name] || 180,
|
|
11230
|
-
widget: buildUiSchema(element)
|
|
11231
|
-
};
|
|
11232
|
-
}
|
|
11233
|
-
return {
|
|
11234
|
-
accessorKey: element.name,
|
|
11235
|
-
type: element.columnFormat,
|
|
11236
|
-
header: element.label || element.name,
|
|
11237
|
-
size: sizeMap[element.name] || 180
|
|
11238
|
-
};
|
|
11239
|
-
}, buildHierarchy2 = function(elements2, parentName = null) {
|
|
11240
|
-
const result = [];
|
|
11241
|
-
for (const element of elements2) {
|
|
11242
|
-
if ((element == null ? void 0 : element.parent) === parentName) {
|
|
11243
|
-
const children = buildHierarchy2(elements2, element.name);
|
|
11244
|
-
const node = nodeProvider2(element);
|
|
11245
|
-
if (children.length > 0) {
|
|
11246
|
-
node.columns = children;
|
|
11247
|
-
node.type = "group";
|
|
11248
|
-
}
|
|
11249
|
-
result.push(node);
|
|
11250
|
-
}
|
|
11251
|
-
}
|
|
11252
|
-
return result;
|
|
11253
|
-
}, transformConfigToOutput2 = function(config2) {
|
|
11254
|
-
const output = [];
|
|
11255
|
-
const hierarchy = buildHierarchy2(config2.elements, config2.name);
|
|
11256
|
-
for (const element of config2.elements) {
|
|
11257
|
-
const parentExists = config2.elements.some((e) => e.name === element.parent);
|
|
11258
|
-
if (!parentExists && element.parent !== config2.name) {
|
|
11259
|
-
output.push(nodeProvider2(element));
|
|
11260
|
-
}
|
|
11261
|
-
}
|
|
11262
|
-
return [...hierarchy, ...output];
|
|
11263
|
-
};
|
|
11171
|
+
} else if (config.type == "Table" || config.type == "ColumnGroup") {
|
|
11264
11172
|
const sizeMap = {};
|
|
11265
11173
|
if (config.sizeHolder) {
|
|
11266
11174
|
config.sizeHolder.map((e, i) => {
|
|
11267
11175
|
sizeMap[e.keyName] = e.value;
|
|
11268
11176
|
});
|
|
11269
11177
|
}
|
|
11270
|
-
elements.elements =
|
|
11178
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
11179
|
+
if (cellElem.type) {
|
|
11180
|
+
return {
|
|
11181
|
+
accessorKey: cellElem.name,
|
|
11182
|
+
header: cellElem.label || cellElem.name,
|
|
11183
|
+
size: sizeMap[cellElem.name] || 180,
|
|
11184
|
+
type: cellElem.columnFormat,
|
|
11185
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem) : void 0,
|
|
11186
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
11187
|
+
};
|
|
11188
|
+
} else {
|
|
11189
|
+
return {
|
|
11190
|
+
accessorKey: cellElem.name,
|
|
11191
|
+
type: cellElem.columnFormat,
|
|
11192
|
+
header: cellElem.label || cellElem.name,
|
|
11193
|
+
size: sizeMap[cellElem.name] || 180
|
|
11194
|
+
};
|
|
11195
|
+
}
|
|
11196
|
+
});
|
|
11271
11197
|
} else if (config.type == "Array") {
|
|
11272
11198
|
elements.options.detail.elements = config.elements.map((e, elemInd) => {
|
|
11273
11199
|
return buildUiSchema(e);
|