impaktapps-ui-builder 0.0.409-g → 0.0.409-j
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 +143 -36
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +4 -4
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +30 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +45 -19
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +3 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +41 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +24 -19
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +41 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -5911,13 +5911,16 @@ const ComponentSchema = {
|
|
|
5911
5911
|
{ title: "Text Area", const: "TextArea" },
|
|
5912
5912
|
{ title: "Timer", const: "Timer" },
|
|
5913
5913
|
{ title: "Upload File", const: "UploadFile" },
|
|
5914
|
-
{ title: "Text Area", const: "TextArea" },
|
|
5915
5914
|
{ title: "Timer", const: "Timer" },
|
|
5916
5915
|
{ title: "Upload File", const: "UploadFile" },
|
|
5916
|
+
{ title: "TreeMap", const: "TreeMap" }
|
|
5917
|
+
]
|
|
5918
|
+
},
|
|
5919
|
+
columnFormat: {
|
|
5920
|
+
oneOf: [
|
|
5917
5921
|
{ title: "Date Column", const: "date" },
|
|
5918
5922
|
{ title: "DateTime Column", const: "dateTime" },
|
|
5919
|
-
{ title: "Amount Column", const: "amount" }
|
|
5920
|
-
{ title: "TreeMap", const: "TreeMap" }
|
|
5923
|
+
{ title: "Amount Column", const: "amount" }
|
|
5921
5924
|
]
|
|
5922
5925
|
},
|
|
5923
5926
|
orientation: {
|
|
@@ -6311,6 +6314,45 @@ const componentBasicUiSchema = {
|
|
|
6311
6314
|
}
|
|
6312
6315
|
}
|
|
6313
6316
|
},
|
|
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
|
+
{
|
|
6339
|
+
type: "Control",
|
|
6340
|
+
scope: "#/properties/columnFormat",
|
|
6341
|
+
options: {
|
|
6342
|
+
widget: "SelectInputField"
|
|
6343
|
+
},
|
|
6344
|
+
config: {
|
|
6345
|
+
layout: {
|
|
6346
|
+
xs: 11,
|
|
6347
|
+
sm: 11,
|
|
6348
|
+
md: 5.5,
|
|
6349
|
+
lg: 5.5
|
|
6350
|
+
},
|
|
6351
|
+
main: {
|
|
6352
|
+
label: "Column Format"
|
|
6353
|
+
}
|
|
6354
|
+
}
|
|
6355
|
+
},
|
|
6314
6356
|
{
|
|
6315
6357
|
type: "Control",
|
|
6316
6358
|
scope: "#/properties/proc",
|
|
@@ -6505,6 +6547,45 @@ const CoreSection = {
|
|
|
6505
6547
|
}
|
|
6506
6548
|
}
|
|
6507
6549
|
},
|
|
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
|
+
{
|
|
6572
|
+
type: "Control",
|
|
6573
|
+
scope: "#/properties/columnFormat",
|
|
6574
|
+
options: {
|
|
6575
|
+
widget: "SelectInputField"
|
|
6576
|
+
},
|
|
6577
|
+
config: {
|
|
6578
|
+
layout: {
|
|
6579
|
+
xs: 11,
|
|
6580
|
+
sm: 11,
|
|
6581
|
+
md: 5.5,
|
|
6582
|
+
lg: 5.5
|
|
6583
|
+
},
|
|
6584
|
+
main: {
|
|
6585
|
+
label: "Column Format"
|
|
6586
|
+
}
|
|
6587
|
+
}
|
|
6588
|
+
},
|
|
6508
6589
|
{
|
|
6509
6590
|
type: "Control",
|
|
6510
6591
|
scope: "#/properties/proc",
|
|
@@ -6693,18 +6774,6 @@ const EventSection = {
|
|
|
6693
6774
|
}
|
|
6694
6775
|
]
|
|
6695
6776
|
};
|
|
6696
|
-
var emptyBox = {
|
|
6697
|
-
type: "Control",
|
|
6698
|
-
scope: "#/properties/emptyBox",
|
|
6699
|
-
options: {
|
|
6700
|
-
widget: "EmptyBox"
|
|
6701
|
-
},
|
|
6702
|
-
config: {
|
|
6703
|
-
layout: { xs: 12, sm: 12, md: 5.5, lg: 5.5 },
|
|
6704
|
-
main: {},
|
|
6705
|
-
style: {}
|
|
6706
|
-
}
|
|
6707
|
-
};
|
|
6708
6777
|
const EmptyBox = {
|
|
6709
6778
|
type: "Control",
|
|
6710
6779
|
scope: `#/properties/empty`,
|
|
@@ -7050,7 +7119,7 @@ const buildPropertiesSection = function(type) {
|
|
|
7050
7119
|
getRadioInputField("divider", "Divider", ["YES", "No"]),
|
|
7051
7120
|
getRadioInputField("isAccordion", "Accordion", ["YES", "No"]),
|
|
7052
7121
|
getRadioInputField("defaultStyle", "Default Style", ["YES", "No"]),
|
|
7053
|
-
|
|
7122
|
+
getInputField("rowSpacing", "Row Spacing")
|
|
7054
7123
|
];
|
|
7055
7124
|
break;
|
|
7056
7125
|
case "TabSection":
|
|
@@ -8782,7 +8851,6 @@ var service = (funcParams) => {
|
|
|
8782
8851
|
onCellRenderer: (cellParams) => {
|
|
8783
8852
|
var _a;
|
|
8784
8853
|
let finalResponse = {};
|
|
8785
|
-
cellParams.spanRef.current.style.color = "yellow";
|
|
8786
8854
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8787
8855
|
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
|
|
8788
8856
|
executeEventsParameters.store.functionParameters = cellParams;
|
|
@@ -9732,7 +9800,7 @@ var WrapperSection = {
|
|
|
9732
9800
|
type: "WrapperLayout",
|
|
9733
9801
|
config: {
|
|
9734
9802
|
main: {
|
|
9735
|
-
|
|
9803
|
+
rowSpacing: 3,
|
|
9736
9804
|
divider: true
|
|
9737
9805
|
},
|
|
9738
9806
|
defaultStyle: true
|
|
@@ -9746,7 +9814,7 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9746
9814
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9747
9815
|
wrapper.config.main.isAccordion = config.isAccordion === "YES" ? true : false;
|
|
9748
9816
|
if (config.defaultStyle) {
|
|
9749
|
-
wrapper.config.
|
|
9817
|
+
wrapper.config.defaultStyle = config.defaultStyle === "YES" ? true : false;
|
|
9750
9818
|
}
|
|
9751
9819
|
if (config.style) {
|
|
9752
9820
|
wrapper.config.style = JSON.parse(config.style);
|
|
@@ -10556,6 +10624,18 @@ const buildRadio = (config, componentScope) => {
|
|
|
10556
10624
|
}
|
|
10557
10625
|
return Radio;
|
|
10558
10626
|
};
|
|
10627
|
+
var emptyBox = {
|
|
10628
|
+
type: "Control",
|
|
10629
|
+
scope: "#/properties/emptyBox",
|
|
10630
|
+
options: {
|
|
10631
|
+
widget: "EmptyBox"
|
|
10632
|
+
},
|
|
10633
|
+
config: {
|
|
10634
|
+
layout: { xs: 12, sm: 12, md: 5.5, lg: 5.5 },
|
|
10635
|
+
main: {},
|
|
10636
|
+
style: {}
|
|
10637
|
+
}
|
|
10638
|
+
};
|
|
10559
10639
|
const buildEmptyBox = (config, componentScope) => {
|
|
10560
10640
|
const EmptyBox2 = _.cloneDeep(emptyBox);
|
|
10561
10641
|
if (config.layout) {
|
|
@@ -11140,23 +11220,7 @@ const buildUiSchema = (config) => {
|
|
|
11140
11220
|
sizeMap[e.keyName] = e.value;
|
|
11141
11221
|
});
|
|
11142
11222
|
}
|
|
11143
|
-
elements.elements = config
|
|
11144
|
-
if (e.type && e.type !== "date" && e.type !== "dateTime" && e.type !== "amount") {
|
|
11145
|
-
return {
|
|
11146
|
-
accessorKey: e.name,
|
|
11147
|
-
header: e.label || e.name,
|
|
11148
|
-
size: sizeMap[e.name] || 180,
|
|
11149
|
-
type: e.type,
|
|
11150
|
-
widget: buildUiSchema(e)
|
|
11151
|
-
};
|
|
11152
|
-
}
|
|
11153
|
-
return {
|
|
11154
|
-
type: e.type,
|
|
11155
|
-
accessorKey: e.name,
|
|
11156
|
-
header: e.label || e.name,
|
|
11157
|
-
size: sizeMap[e.name] || 180
|
|
11158
|
-
};
|
|
11159
|
-
});
|
|
11223
|
+
elements.elements = transformConfigToOutput(config, sizeMap);
|
|
11160
11224
|
} else if (config.type == "Array") {
|
|
11161
11225
|
elements.options.detail.elements = config.elements.map((e, elemInd) => {
|
|
11162
11226
|
return buildUiSchema(e);
|
|
@@ -11169,5 +11233,48 @@ const buildUiSchema = (config) => {
|
|
|
11169
11233
|
}
|
|
11170
11234
|
return elements;
|
|
11171
11235
|
};
|
|
11236
|
+
function nodeProvider(element, sizeMap) {
|
|
11237
|
+
if (element.type) {
|
|
11238
|
+
return {
|
|
11239
|
+
accessorKey: element.name,
|
|
11240
|
+
type: element.columnFormat,
|
|
11241
|
+
header: element.label || element.name,
|
|
11242
|
+
size: sizeMap[element.name] || 180,
|
|
11243
|
+
widget: buildUiSchema(element)
|
|
11244
|
+
};
|
|
11245
|
+
}
|
|
11246
|
+
return {
|
|
11247
|
+
accessorKey: element.name,
|
|
11248
|
+
type: element.columnFormat,
|
|
11249
|
+
header: element.label || element.name,
|
|
11250
|
+
size: sizeMap[element.name] || 180
|
|
11251
|
+
};
|
|
11252
|
+
}
|
|
11253
|
+
function buildHierarchy(elements, parentName = null, sizeMap) {
|
|
11254
|
+
const result = [];
|
|
11255
|
+
for (const element of elements) {
|
|
11256
|
+
if ((element == null ? void 0 : element.parent) === parentName) {
|
|
11257
|
+
const children = buildHierarchy(elements, element.name, sizeMap);
|
|
11258
|
+
const node = nodeProvider(element, sizeMap);
|
|
11259
|
+
if (children.length > 0) {
|
|
11260
|
+
node.columns = children;
|
|
11261
|
+
node.type = "group";
|
|
11262
|
+
}
|
|
11263
|
+
result.push(node);
|
|
11264
|
+
}
|
|
11265
|
+
}
|
|
11266
|
+
return result;
|
|
11267
|
+
}
|
|
11268
|
+
function transformConfigToOutput(config, sizeMap) {
|
|
11269
|
+
const output = [];
|
|
11270
|
+
const hierarchy = buildHierarchy(config.elements, config.name, schema);
|
|
11271
|
+
for (const element of config.elements) {
|
|
11272
|
+
const parentExists = config.elements.some((e) => e.name === element.parent);
|
|
11273
|
+
if (!parentExists && element.parent !== config.name) {
|
|
11274
|
+
output.push(nodeProvider(element, sizeMap));
|
|
11275
|
+
}
|
|
11276
|
+
}
|
|
11277
|
+
return [...hierarchy, ...output];
|
|
11278
|
+
}
|
|
11172
11279
|
export { buildConfig, buildSchema, buildUiSchema, clearFromLocalStorage, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|
|
11173
11280
|
//# sourceMappingURL=impaktapps-ui-builder.es.js.map
|