impaktapps-ui-builder 0.0.374 → 0.0.375
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 +81 -3
- 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/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +7 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +60 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +21 -0
|
@@ -5933,6 +5933,24 @@ const ComponentSchema = {
|
|
|
5933
5933
|
}
|
|
5934
5934
|
}
|
|
5935
5935
|
},
|
|
5936
|
+
cardLayout: {
|
|
5937
|
+
type: "array",
|
|
5938
|
+
items: {
|
|
5939
|
+
type: "object",
|
|
5940
|
+
properties: {
|
|
5941
|
+
key: {
|
|
5942
|
+
type: "string",
|
|
5943
|
+
oneOf: [
|
|
5944
|
+
{ title: "Extra Small", const: "xs" },
|
|
5945
|
+
{ title: "Small", const: "sm" },
|
|
5946
|
+
{ title: "Medium", const: "md" },
|
|
5947
|
+
{ title: "Large", const: "lg" }
|
|
5948
|
+
]
|
|
5949
|
+
},
|
|
5950
|
+
value: {}
|
|
5951
|
+
}
|
|
5952
|
+
}
|
|
5953
|
+
},
|
|
5936
5954
|
value: {
|
|
5937
5955
|
type: "array",
|
|
5938
5956
|
items: {
|
|
@@ -6671,6 +6689,57 @@ const EmptyBox = {
|
|
|
6671
6689
|
main: {}
|
|
6672
6690
|
}
|
|
6673
6691
|
};
|
|
6692
|
+
const cardLayout = {
|
|
6693
|
+
type: "Control",
|
|
6694
|
+
scope: "#/properties/cardLayout",
|
|
6695
|
+
layout: 11.5,
|
|
6696
|
+
options: {
|
|
6697
|
+
detail: {
|
|
6698
|
+
type: "HorizontalLayout",
|
|
6699
|
+
elements: [
|
|
6700
|
+
{
|
|
6701
|
+
type: "Control",
|
|
6702
|
+
scope: "#/properties/key",
|
|
6703
|
+
options: {
|
|
6704
|
+
widget: "SelectInputField"
|
|
6705
|
+
},
|
|
6706
|
+
config: {
|
|
6707
|
+
layout: {
|
|
6708
|
+
xs: 11,
|
|
6709
|
+
sm: 11,
|
|
6710
|
+
md: 5.5,
|
|
6711
|
+
lg: 5.5
|
|
6712
|
+
},
|
|
6713
|
+
main: {
|
|
6714
|
+
label: "Screen Size"
|
|
6715
|
+
}
|
|
6716
|
+
}
|
|
6717
|
+
},
|
|
6718
|
+
{
|
|
6719
|
+
type: "Control",
|
|
6720
|
+
scope: "#/properties/value",
|
|
6721
|
+
options: {
|
|
6722
|
+
widget: "InputField"
|
|
6723
|
+
},
|
|
6724
|
+
config: {
|
|
6725
|
+
layout: {
|
|
6726
|
+
xs: 11,
|
|
6727
|
+
sm: 11,
|
|
6728
|
+
md: 5.5,
|
|
6729
|
+
lg: 5.5
|
|
6730
|
+
},
|
|
6731
|
+
main: {
|
|
6732
|
+
label: "Value",
|
|
6733
|
+
type: "number",
|
|
6734
|
+
helperText: "Number should be in range of 0 to 12",
|
|
6735
|
+
errorMessage: "Number Can't be greater than 12 and can't be less than 0."
|
|
6736
|
+
}
|
|
6737
|
+
}
|
|
6738
|
+
}
|
|
6739
|
+
]
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6674
6743
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6675
6744
|
return {
|
|
6676
6745
|
type: "Control",
|
|
@@ -6817,8 +6886,11 @@ const buildPropertiesSection = function(type) {
|
|
|
6817
6886
|
switch (type) {
|
|
6818
6887
|
case "DataGrid":
|
|
6819
6888
|
uiSchema.elements = [
|
|
6820
|
-
getRadioInputField("
|
|
6821
|
-
getInputField("elevation", "
|
|
6889
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
6890
|
+
getInputField("elevation", "Card Elevation"),
|
|
6891
|
+
getInputField("height", "Grid height"),
|
|
6892
|
+
getInputField("justifyContent", "justifyContent"),
|
|
6893
|
+
cardLayout
|
|
6822
6894
|
];
|
|
6823
6895
|
break;
|
|
6824
6896
|
case "Stepper":
|
|
@@ -10477,19 +10549,25 @@ const dataGrid = {
|
|
|
10477
10549
|
const buildDataGrid = (config, componentScope) => {
|
|
10478
10550
|
const DataGrid = _.cloneDeep(dataGrid);
|
|
10479
10551
|
DataGrid.scope = componentScope;
|
|
10480
|
-
DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
|
|
10481
10552
|
if (config.elevation) {
|
|
10482
10553
|
DataGrid.config.main.elevation = +config.elevation;
|
|
10483
10554
|
}
|
|
10555
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10484
10556
|
if (config.height) {
|
|
10485
10557
|
DataGrid.config.main.height = `${config.height}px`;
|
|
10486
10558
|
}
|
|
10559
|
+
if (config.justifyContent) {
|
|
10560
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10561
|
+
}
|
|
10487
10562
|
if (config.label) {
|
|
10488
10563
|
DataGrid.config.main.label = config.label;
|
|
10489
10564
|
}
|
|
10490
10565
|
if (config.layout) {
|
|
10491
10566
|
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10492
10567
|
}
|
|
10568
|
+
if (config.cardLayout) {
|
|
10569
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10570
|
+
}
|
|
10493
10571
|
if (config.style) {
|
|
10494
10572
|
DataGrid.config.style = JSON.parse(config.style);
|
|
10495
10573
|
}
|