impaktapps-ui-builder 1.0.63 → 1.0.64-alpha.100
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 +34 -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/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildHorizontalLayout: (config: any, componentScope: any) => any;
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ export default (FormData: any) => {
|
|
|
28
28
|
|
|
29
29
|
export const createLayoutFormat = (layout: any[], type?: string) => {
|
|
30
30
|
if (_.isEmpty(layout)) {
|
|
31
|
-
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought"]
|
|
31
|
+
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout"]
|
|
32
32
|
if(fullLayoutComponents.includes(type)){
|
|
33
33
|
return { xs: 12, sm: 12, md: 12, lg: 12 }
|
|
34
34
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
2
|
+
import horizontalLayout from "./uischema/horizontalLayout";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
|
|
5
|
+
export const buildHorizontalLayout = (config, componentScope) => {
|
|
6
|
+
const horizontal: any = _.cloneDeep(horizontalLayout);
|
|
7
|
+
horizontal.scope = componentScope;
|
|
8
|
+
if (config.style) {
|
|
9
|
+
horizontal.config.style = JSON.parse(config.style)
|
|
10
|
+
}
|
|
11
|
+
if (config.layout) {
|
|
12
|
+
horizontal.config.layout = createLayoutFormat(config.layout, config.type)
|
|
13
|
+
}
|
|
14
|
+
return horizontal;
|
|
15
|
+
}
|
|
@@ -14,6 +14,9 @@ export const buildTabSection = (config:any,componentScope:string) => {
|
|
|
14
14
|
if (config.sectionLabels) {
|
|
15
15
|
tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
|
|
16
16
|
}
|
|
17
|
+
if (config.style) {
|
|
18
|
+
tab.config.style = JSON.parse(config.style)
|
|
19
|
+
}
|
|
17
20
|
tab.config.main.id = config.name;
|
|
18
21
|
return tab
|
|
19
22
|
}
|
|
@@ -40,6 +40,7 @@ import { buildDataGrid } from "./buildDataGrid";
|
|
|
40
40
|
import { buildInputSlider } from "./buildInputSlider";
|
|
41
41
|
import { buildTreeMap } from "./buildTreeMap";
|
|
42
42
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
43
|
+
import { buildHorizontalLayout } from "./buildHorizontalLayout";
|
|
43
44
|
export let schema = {
|
|
44
45
|
type: "object",
|
|
45
46
|
properties: {},
|
|
@@ -206,6 +207,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
206
207
|
case "WrapperSection":
|
|
207
208
|
elements = buildWrapperSection(config, componentScope);
|
|
208
209
|
break;
|
|
210
|
+
case "HorizontalLayout":
|
|
211
|
+
elements = buildHorizontalLayout(config, componentScope);
|
|
212
|
+
break;
|
|
209
213
|
case "Text":
|
|
210
214
|
elements = buildTextField(config, componentScope);
|
|
211
215
|
break;
|
|
@@ -351,7 +355,7 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
351
355
|
config.elements.filter((cellElem, elemInd) => {
|
|
352
356
|
const commonProperties = {
|
|
353
357
|
accessorKey: cellElem.name,
|
|
354
|
-
type: cellElem.columnFormat,
|
|
358
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
355
359
|
header: cellElem.label || cellElem.name,
|
|
356
360
|
size: sizeMap[cellElem.name] || 180,
|
|
357
361
|
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
@@ -10,6 +10,7 @@ export const ComponentSchema: any = {
|
|
|
10
10
|
{ title: "Data Card", const: "card" },
|
|
11
11
|
{ title: "Check Box", const: "CheckBox" },
|
|
12
12
|
{ title: "Container", const: "WrapperSection" },
|
|
13
|
+
{ title: "Tab Container", const: "HorizontalLayout" },
|
|
13
14
|
{ title: "Data Grid", const: "DataGrid" },
|
|
14
15
|
{ title: "Date", const: "Date" },
|
|
15
16
|
{ title: "Time Stamp", const: "DateTime" },
|
|
@@ -15,6 +15,7 @@ const sectionLabels = {
|
|
|
15
15
|
Table: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
16
16
|
LeaderBoard: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
|
|
17
17
|
WrapperSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
18
|
+
HorizontalLayout: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
18
19
|
TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
|
|
19
20
|
SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
20
21
|
card: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
@@ -69,7 +70,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
69
70
|
|
|
70
71
|
const parentObj = _.get(currentConfig, parentPath)
|
|
71
72
|
|
|
72
|
-
if(parentObj?.type === "Table"){
|
|
73
|
+
if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
|
|
73
74
|
UiSchema.elements[0].elements[0].elements[4] =
|
|
74
75
|
{
|
|
75
76
|
type: "Control",
|