impaktapps-ui-builder 0.0.292 → 0.0.294
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 +77 -28
- 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/buildUiSchema.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +61 -21
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +2 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +2 -7
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/schema/arraySchemaBuilder.d.ts +0 -7
|
@@ -5936,13 +5936,7 @@ const ComponentSchema = {
|
|
|
5936
5936
|
]
|
|
5937
5937
|
},
|
|
5938
5938
|
value: {
|
|
5939
|
-
type: "string"
|
|
5940
|
-
oneOf: [
|
|
5941
|
-
{ title: "3", const: "3" },
|
|
5942
|
-
{ title: "5.5", const: "5.5" },
|
|
5943
|
-
{ title: "8", const: "8" },
|
|
5944
|
-
{ title: "12", const: "12" }
|
|
5945
|
-
]
|
|
5939
|
+
type: "string"
|
|
5946
5940
|
}
|
|
5947
5941
|
}
|
|
5948
5942
|
}
|
|
@@ -6276,13 +6270,7 @@ const componentBasicUiSchema = {
|
|
|
6276
6270
|
lg: 5.5
|
|
6277
6271
|
},
|
|
6278
6272
|
main: {
|
|
6279
|
-
label: "Screen Size"
|
|
6280
|
-
options: [
|
|
6281
|
-
{ label: "Extra Small", value: "xs" },
|
|
6282
|
-
{ label: "Small", value: "sm" },
|
|
6283
|
-
{ label: "Medium", value: "md" },
|
|
6284
|
-
{ label: "Large", value: "lg" }
|
|
6285
|
-
]
|
|
6273
|
+
label: "Screen Size"
|
|
6286
6274
|
}
|
|
6287
6275
|
}
|
|
6288
6276
|
},
|
|
@@ -6290,7 +6278,7 @@ const componentBasicUiSchema = {
|
|
|
6290
6278
|
type: "Control",
|
|
6291
6279
|
scope: "#/properties/value",
|
|
6292
6280
|
options: {
|
|
6293
|
-
widget: "
|
|
6281
|
+
widget: "InputField"
|
|
6294
6282
|
},
|
|
6295
6283
|
config: {
|
|
6296
6284
|
layout: {
|
|
@@ -6543,7 +6531,7 @@ const CoreSection = {
|
|
|
6543
6531
|
type: "Control",
|
|
6544
6532
|
scope: "#/properties/value",
|
|
6545
6533
|
options: {
|
|
6546
|
-
widget: "
|
|
6534
|
+
widget: "InputField"
|
|
6547
6535
|
},
|
|
6548
6536
|
config: {
|
|
6549
6537
|
layout: {
|
|
@@ -6575,7 +6563,7 @@ const OptionArray = {
|
|
|
6575
6563
|
type: "Control",
|
|
6576
6564
|
scope: "#/properties/label",
|
|
6577
6565
|
options: {
|
|
6578
|
-
widget: "
|
|
6566
|
+
widget: "SelectInputField"
|
|
6579
6567
|
},
|
|
6580
6568
|
config: {
|
|
6581
6569
|
layout: {
|
|
@@ -6952,7 +6940,7 @@ const buildPropertiesSection = function(type) {
|
|
|
6952
6940
|
getArrayControl("pieArcColors", "color")
|
|
6953
6941
|
];
|
|
6954
6942
|
} else if (type === "WrapperSection") {
|
|
6955
|
-
uiSchema.elements = [getRadioInputField("divider", "Divider", ["YES", "No"]),
|
|
6943
|
+
uiSchema.elements = [getRadioInputField("divider", "Divider", ["YES", "No"]), EmptyBox];
|
|
6956
6944
|
} else if (type === "TabSection") {
|
|
6957
6945
|
uiSchema.elements = [
|
|
6958
6946
|
getArrayControl("sectionLabels", "label")
|
|
@@ -8908,22 +8896,76 @@ const buildEmptyBox = (config, componentScope) => {
|
|
|
8908
8896
|
}
|
|
8909
8897
|
return EmptyBox2;
|
|
8910
8898
|
};
|
|
8899
|
+
const ArrayUiSchema = {
|
|
8900
|
+
type: "Control",
|
|
8901
|
+
scope: "#/properties/adjustments",
|
|
8902
|
+
layout: 11.5,
|
|
8903
|
+
options: {
|
|
8904
|
+
detail: {
|
|
8905
|
+
type: "HorizontalLayout",
|
|
8906
|
+
elements: []
|
|
8907
|
+
}
|
|
8908
|
+
}
|
|
8909
|
+
};
|
|
8910
|
+
const buildArray = (config, componentScope) => {
|
|
8911
|
+
const array = _.cloneDeep(ArrayUiSchema);
|
|
8912
|
+
array.scope = componentScope;
|
|
8913
|
+
return array;
|
|
8914
|
+
};
|
|
8911
8915
|
let schema = {
|
|
8912
8916
|
type: "object",
|
|
8913
8917
|
properties: {},
|
|
8914
8918
|
required: []
|
|
8915
8919
|
};
|
|
8916
|
-
function buildRule(configObj, tableName) {
|
|
8920
|
+
function buildRule(configObj, tableName, arrayHolderName) {
|
|
8921
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
8922
|
+
if (arrayHolderName) {
|
|
8923
|
+
if ((_c = (_b = (_a = schema.properties) == null ? void 0 : _a[tableName]) == null ? void 0 : _b.items) == null ? void 0 : _c.properties) {
|
|
8924
|
+
if (!((_g = (_f = (_e = (_d = schema.properties) == null ? void 0 : _d[tableName]) == null ? void 0 : _e.items) == null ? void 0 : _f.properties) == null ? void 0 : _g[configObj.name])) {
|
|
8925
|
+
schema.properties[tableName].items.properties[configObj.name] = {};
|
|
8926
|
+
if (configObj.type === "Select" || ((_h = configObj.value) == null ? void 0 : _h.length) > 0) {
|
|
8927
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
8928
|
+
oneOf: configObj.value.map((e) => {
|
|
8929
|
+
return { const: e.value, title: e.label };
|
|
8930
|
+
})
|
|
8931
|
+
};
|
|
8932
|
+
} else if (configObj.type === "MultipleSelect" || ((_i = configObj.value) == null ? void 0 : _i.length) > 0) {
|
|
8933
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
8934
|
+
items: {
|
|
8935
|
+
oneOf: configObj.value.map((e) => {
|
|
8936
|
+
return { const: e.value, title: e.label };
|
|
8937
|
+
})
|
|
8938
|
+
}
|
|
8939
|
+
};
|
|
8940
|
+
}
|
|
8941
|
+
}
|
|
8942
|
+
}
|
|
8943
|
+
}
|
|
8917
8944
|
if (configObj.validation) {
|
|
8918
8945
|
configObj.validation.forEach((rule) => {
|
|
8919
|
-
var
|
|
8946
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _k, _l;
|
|
8920
8947
|
if (tableName) {
|
|
8921
|
-
if ((
|
|
8922
|
-
if (!((
|
|
8948
|
+
if ((_c2 = (_b2 = (_a2 = schema.properties) == null ? void 0 : _a2[tableName]) == null ? void 0 : _b2.items) == null ? void 0 : _c2.properties) {
|
|
8949
|
+
if (!((_g2 = (_f2 = (_e2 = (_d2 = schema.properties) == null ? void 0 : _d2[tableName]) == null ? void 0 : _e2.items) == null ? void 0 : _f2.properties) == null ? void 0 : _g2[configObj.name])) {
|
|
8923
8950
|
schema.properties[tableName].items.properties[configObj.name] = {};
|
|
8951
|
+
if (configObj.type === "Select" || ((_h2 = configObj.value) == null ? void 0 : _h2.length) > 0) {
|
|
8952
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
8953
|
+
oneOf: configObj.value.map((e) => {
|
|
8954
|
+
return { const: e.value, title: e.label };
|
|
8955
|
+
})
|
|
8956
|
+
};
|
|
8957
|
+
} else if (configObj.type === "MultipleSelect" || ((_i2 = configObj.value) == null ? void 0 : _i2.length) > 0) {
|
|
8958
|
+
schema.properties[tableName].items.properties[configObj.name] = {
|
|
8959
|
+
items: {
|
|
8960
|
+
oneOf: configObj.value.map((e) => {
|
|
8961
|
+
return { const: e.value, title: e.label };
|
|
8962
|
+
})
|
|
8963
|
+
}
|
|
8964
|
+
};
|
|
8965
|
+
}
|
|
8924
8966
|
}
|
|
8925
8967
|
if (rule.validationType === "required") {
|
|
8926
|
-
(
|
|
8968
|
+
(_l = (_k = (_j = schema.properties) == null ? void 0 : _j[tableName]) == null ? void 0 : _k.items) == null ? void 0 : _l.required.push(configObj.name);
|
|
8927
8969
|
} else {
|
|
8928
8970
|
schema.properties[tableName].items.properties[configObj.name]["type"] = "string";
|
|
8929
8971
|
schema.properties[tableName].items.properties[configObj.name][rule.validationType] = isNaN(rule.validationValue) ? rule.validationValue : Number(rule.validationValue);
|
|
@@ -8943,10 +8985,10 @@ function buildRule(configObj, tableName) {
|
|
|
8943
8985
|
});
|
|
8944
8986
|
}
|
|
8945
8987
|
}
|
|
8946
|
-
const buildSchema = (config, tableName) => {
|
|
8947
|
-
buildRule(config, tableName);
|
|
8988
|
+
const buildSchema = (config, tableName, isArrayType) => {
|
|
8989
|
+
buildRule(config, tableName, isArrayType);
|
|
8948
8990
|
if (config == null ? void 0 : config.elements) {
|
|
8949
|
-
if (config.type == "Table") {
|
|
8991
|
+
if (config.type == "Table" || config.type == "Array") {
|
|
8950
8992
|
if (!schema.properties[config.name]) {
|
|
8951
8993
|
schema.properties[config.name] = {
|
|
8952
8994
|
type: "array",
|
|
@@ -8958,7 +9000,7 @@ const buildSchema = (config, tableName) => {
|
|
|
8958
9000
|
};
|
|
8959
9001
|
}
|
|
8960
9002
|
config.elements.map((e, elemInd) => {
|
|
8961
|
-
buildSchema(e, config.name);
|
|
9003
|
+
buildSchema(e, config.name, config.type === "Array" ? true : false);
|
|
8962
9004
|
});
|
|
8963
9005
|
} else {
|
|
8964
9006
|
config.elements.map((e, elemInd) => {
|
|
@@ -9002,6 +9044,9 @@ const buildUiSchema = (config) => {
|
|
|
9002
9044
|
case "Table":
|
|
9003
9045
|
elements = buildTable(config, componentScope);
|
|
9004
9046
|
break;
|
|
9047
|
+
case "Array":
|
|
9048
|
+
elements = buildArray(config, componentScope);
|
|
9049
|
+
break;
|
|
9005
9050
|
case "LazyLoadingTable":
|
|
9006
9051
|
elements = buildLazyLoadingTable(config, componentScope);
|
|
9007
9052
|
break;
|
|
@@ -9092,6 +9137,10 @@ const buildUiSchema = (config) => {
|
|
|
9092
9137
|
header: e.label || e.name
|
|
9093
9138
|
};
|
|
9094
9139
|
});
|
|
9140
|
+
} else if (config.type == "Array") {
|
|
9141
|
+
elements.options.detail.elements = config.elements.map((e, elemInd) => {
|
|
9142
|
+
return buildUiSchema(e);
|
|
9143
|
+
});
|
|
9095
9144
|
} else {
|
|
9096
9145
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
9097
9146
|
return buildUiSchema(e);
|
|
@@ -10075,7 +10124,7 @@ var service = (funcParams) => {
|
|
|
10075
10124
|
var _a;
|
|
10076
10125
|
const apiBody = [
|
|
10077
10126
|
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
10078
|
-
{ key: "
|
|
10127
|
+
{ key: "pageIndex", value: paginationValues.pagination.pageIndex },
|
|
10079
10128
|
{ key: "sorting", value: paginationValues.sorting || [] },
|
|
10080
10129
|
{ key: "filters", value: paginationValues.columnFilters || [] },
|
|
10081
10130
|
{ key: "globalFilter", value: (_a = paginationValues.globalFilter) != null ? _a : "" }
|