impaktapps-ui-builder 0.0.409-a → 0.0.409-e
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 +76 -6
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildTreeMap.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +1 -2
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +58 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +9 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +8 -3
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -5916,7 +5916,8 @@ const ComponentSchema = {
|
|
|
5916
5916
|
{ title: "Upload File", const: "UploadFile" },
|
|
5917
5917
|
{ title: "Date Column", const: "date" },
|
|
5918
5918
|
{ title: "DateTime Column", const: "dateTime" },
|
|
5919
|
-
{ title: "Amount Column", const: "amount" }
|
|
5919
|
+
{ title: "Amount Column", const: "amount" },
|
|
5920
|
+
{ title: "TreeMap", const: "TreeMap" }
|
|
5920
5921
|
]
|
|
5921
5922
|
},
|
|
5922
5923
|
orientation: {
|
|
@@ -6903,6 +6904,14 @@ const GraphSection = {
|
|
|
6903
6904
|
const buildPropertiesSection = function(type) {
|
|
6904
6905
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6905
6906
|
switch (type) {
|
|
6907
|
+
case "TreeMap":
|
|
6908
|
+
uiSchema.elements = [
|
|
6909
|
+
getSelectField("orientation", "orientation"),
|
|
6910
|
+
getInputField("linkType", "linkType"),
|
|
6911
|
+
getInputField("graphHeight", "Graph Height"),
|
|
6912
|
+
getInputField("graphWidth", "Graph Width"),
|
|
6913
|
+
getInputField("graphZoomHeight", "Zoom Height")
|
|
6914
|
+
];
|
|
6906
6915
|
case "InputSlider":
|
|
6907
6916
|
uiSchema.elements = [
|
|
6908
6917
|
getInputField("max", "Max Limit"),
|
|
@@ -7506,7 +7515,8 @@ const sectionLabels = {
|
|
|
7506
7515
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7507
7516
|
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7508
7517
|
DataGrid: ["Core", "Components", "Properties", "Event", "style"],
|
|
7509
|
-
InputSlider: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7518
|
+
InputSlider: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7519
|
+
TreeMap: ["Core", "Components", "Properties", "style", "Event"]
|
|
7510
7520
|
};
|
|
7511
7521
|
const refreshPage = (type, store2) => {
|
|
7512
7522
|
var _a;
|
|
@@ -7624,7 +7634,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
7624
7634
|
};
|
|
7625
7635
|
};
|
|
7626
7636
|
var pageMaster = (funcParams) => {
|
|
7627
|
-
const { store: store2, dynamicData: dynamicData2,
|
|
7637
|
+
const { store: store2, dynamicData: dynamicData2, submitHandler, service: service2 } = funcParams;
|
|
7628
7638
|
return {
|
|
7629
7639
|
setPage: async function() {
|
|
7630
7640
|
const formdata = await this.getFormdata();
|
|
@@ -7634,9 +7644,16 @@ var pageMaster = (funcParams) => {
|
|
|
7634
7644
|
store2.setSchema(schema2);
|
|
7635
7645
|
store2.setUiSchema(uiSchema);
|
|
7636
7646
|
},
|
|
7637
|
-
getFormdata: function() {
|
|
7647
|
+
getFormdata: async function() {
|
|
7638
7648
|
var _a;
|
|
7639
|
-
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7649
|
+
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7650
|
+
let config = {};
|
|
7651
|
+
if (id) {
|
|
7652
|
+
await service2.get(`/page/getById?id=${id}`).then((res) => {
|
|
7653
|
+
var _a2;
|
|
7654
|
+
config = (_a2 = res.data) == null ? void 0 : _a2.config;
|
|
7655
|
+
});
|
|
7656
|
+
}
|
|
7640
7657
|
const formData = getFormdataFromLocalStorage();
|
|
7641
7658
|
if (formData) {
|
|
7642
7659
|
return formData;
|
|
@@ -8873,7 +8890,7 @@ var service = (funcParams) => {
|
|
|
8873
8890
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8874
8891
|
for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
|
|
8875
8892
|
executeEventsParameters.store.functionParameters = functionParameters;
|
|
8876
|
-
|
|
8893
|
+
executeEvents({
|
|
8877
8894
|
...executeEventsParameters,
|
|
8878
8895
|
config: eventConfig,
|
|
8879
8896
|
componentName: path
|
|
@@ -10807,6 +10824,57 @@ const buildInputSlider = (config, componentScope) => {
|
|
|
10807
10824
|
}
|
|
10808
10825
|
return inputSlider;
|
|
10809
10826
|
};
|
|
10827
|
+
const TreeMap = {
|
|
10828
|
+
"type": "Control",
|
|
10829
|
+
"scope": "#/properties/TreeMap2",
|
|
10830
|
+
"config": {
|
|
10831
|
+
"main": {
|
|
10832
|
+
"layout": "cartsian",
|
|
10833
|
+
orientation: "vertical",
|
|
10834
|
+
header: "Territory Hierarchy",
|
|
10835
|
+
"linkType": "step",
|
|
10836
|
+
graphHeight: "500px"
|
|
10837
|
+
},
|
|
10838
|
+
"style": {
|
|
10839
|
+
BoxStyle: {
|
|
10840
|
+
borderRadius: "5px"
|
|
10841
|
+
}
|
|
10842
|
+
}
|
|
10843
|
+
},
|
|
10844
|
+
"options": {
|
|
10845
|
+
"widget": "TreeMap"
|
|
10846
|
+
},
|
|
10847
|
+
elements: []
|
|
10848
|
+
};
|
|
10849
|
+
const buildTreeMap = (config, componentScope) => {
|
|
10850
|
+
const treMap = _.cloneDeep(TreeMap);
|
|
10851
|
+
treMap.scope = componentScope;
|
|
10852
|
+
if (config.label) {
|
|
10853
|
+
treMap.config.main.header = config.label;
|
|
10854
|
+
}
|
|
10855
|
+
if (config.layout) {
|
|
10856
|
+
treMap.config.layout = createLayoutFormat(config.layout);
|
|
10857
|
+
}
|
|
10858
|
+
if (config.orientation) {
|
|
10859
|
+
treMap.config.main.orientation = config.orientation;
|
|
10860
|
+
}
|
|
10861
|
+
if (config.linkType) {
|
|
10862
|
+
treMap.config.main.linkType = config.linkType;
|
|
10863
|
+
}
|
|
10864
|
+
if (config.graphHeight) {
|
|
10865
|
+
treMap.config.main.graphHeight = config.graphHeight;
|
|
10866
|
+
}
|
|
10867
|
+
if (config.graphWidth) {
|
|
10868
|
+
treMap.config.main.graphWidth = config.graphWidth;
|
|
10869
|
+
}
|
|
10870
|
+
if (config.graphZoomHeight) {
|
|
10871
|
+
treMap.config.main.graphZoomHeight = config.graphZoomHeight;
|
|
10872
|
+
}
|
|
10873
|
+
if (config.graphZoomWidth) {
|
|
10874
|
+
treMap.config.main.graphZoomWidth = config.graphZoomWidth;
|
|
10875
|
+
}
|
|
10876
|
+
return treMap;
|
|
10877
|
+
};
|
|
10810
10878
|
let schema = {
|
|
10811
10879
|
type: "object",
|
|
10812
10880
|
properties: {},
|
|
@@ -10925,6 +10993,8 @@ const buildUiSchema = (config) => {
|
|
|
10925
10993
|
let elements = {};
|
|
10926
10994
|
const componentScope = `#/properties/${config.name}`;
|
|
10927
10995
|
switch (config.type) {
|
|
10996
|
+
case "TreeMap":
|
|
10997
|
+
elements = buildTreeMap(config, componentScope);
|
|
10928
10998
|
case "DateTime":
|
|
10929
10999
|
elements = buildDateTime(config, componentScope);
|
|
10930
11000
|
break;
|