impaktapps-ui-builder 0.0.382 → 0.0.384
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 +23 -186
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +6 -0
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +6 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +2 -5
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -20
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +2 -88
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -36
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +42 -33
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +8 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/event.ts +0 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +0 -51
|
@@ -22,6 +22,13 @@ const PageMasterSchema = {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
+
template: {
|
|
26
|
+
oneOf: [
|
|
27
|
+
{ const: "template1", title: "template1" },
|
|
28
|
+
{ const: "template2", title: "template2" },
|
|
29
|
+
{ const: "template3", title: "template3" }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
25
32
|
sectionLabels: {
|
|
26
33
|
type: "array",
|
|
27
34
|
items: {
|
|
@@ -34,7 +41,7 @@ const PageMasterSchema = {
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
},
|
|
37
|
-
required: ["
|
|
44
|
+
required: ["template", "name"]
|
|
38
45
|
};
|
|
39
46
|
const PageMasterUiSchema = {
|
|
40
47
|
type: "HorizontalLayout",
|
|
@@ -114,15 +121,19 @@ const PageMasterUiSchema = {
|
|
|
114
121
|
},
|
|
115
122
|
{
|
|
116
123
|
type: "Control",
|
|
117
|
-
scope: "#/properties/
|
|
124
|
+
scope: "#/properties/template",
|
|
118
125
|
options: {
|
|
119
|
-
widget: "
|
|
126
|
+
widget: "SelectInputField"
|
|
120
127
|
},
|
|
121
128
|
config: {
|
|
122
129
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
123
130
|
main: {
|
|
124
|
-
label: "
|
|
125
|
-
options: [
|
|
131
|
+
label: "Template",
|
|
132
|
+
options: [
|
|
133
|
+
{ const: "template1", title: "template1" },
|
|
134
|
+
{ const: "template2", title: "template2" },
|
|
135
|
+
{ const: "template3", title: "template3" }
|
|
136
|
+
],
|
|
126
137
|
color: "secondary",
|
|
127
138
|
required: true
|
|
128
139
|
}
|
|
@@ -5871,7 +5882,6 @@ const ComponentSchema = {
|
|
|
5871
5882
|
{ title: "Card", const: "card" },
|
|
5872
5883
|
{ title: "CheckBox", const: "CheckBox" },
|
|
5873
5884
|
{ title: "Container", const: "WrapperSection" },
|
|
5874
|
-
{ title: "DataGrid", const: "DataGrid" },
|
|
5875
5885
|
{ title: "Date", const: "Date" },
|
|
5876
5886
|
{ title: "Download File", const: "DownloadFile" },
|
|
5877
5887
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
@@ -5933,24 +5943,6 @@ const ComponentSchema = {
|
|
|
5933
5943
|
}
|
|
5934
5944
|
}
|
|
5935
5945
|
},
|
|
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
|
-
},
|
|
5954
5946
|
value: {
|
|
5955
5947
|
type: "array",
|
|
5956
5948
|
items: {
|
|
@@ -6018,20 +6010,6 @@ const ComponentSchema = {
|
|
|
6018
6010
|
}
|
|
6019
6011
|
}
|
|
6020
6012
|
},
|
|
6021
|
-
sizeHolder: {
|
|
6022
|
-
type: "array",
|
|
6023
|
-
items: {
|
|
6024
|
-
type: "object",
|
|
6025
|
-
properties: {
|
|
6026
|
-
keyName: {
|
|
6027
|
-
type: "string"
|
|
6028
|
-
},
|
|
6029
|
-
value: {
|
|
6030
|
-
type: "string"
|
|
6031
|
-
}
|
|
6032
|
-
}
|
|
6033
|
-
}
|
|
6034
|
-
},
|
|
6035
6013
|
legendLabels: {
|
|
6036
6014
|
type: "array",
|
|
6037
6015
|
items: {
|
|
@@ -6689,57 +6667,6 @@ const EmptyBox = {
|
|
|
6689
6667
|
main: {}
|
|
6690
6668
|
}
|
|
6691
6669
|
};
|
|
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
|
-
};
|
|
6743
6670
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6744
6671
|
return {
|
|
6745
6672
|
type: "Control",
|
|
@@ -6774,25 +6701,6 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
|
6774
6701
|
}
|
|
6775
6702
|
};
|
|
6776
6703
|
};
|
|
6777
|
-
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
6778
|
-
sizeHolder.options.detail.elements[1] = {
|
|
6779
|
-
type: "Control",
|
|
6780
|
-
scope: `#/properties/value`,
|
|
6781
|
-
options: {
|
|
6782
|
-
widget: "InputField"
|
|
6783
|
-
},
|
|
6784
|
-
config: {
|
|
6785
|
-
layout: {
|
|
6786
|
-
xs: 11,
|
|
6787
|
-
sm: 11,
|
|
6788
|
-
md: 5.5,
|
|
6789
|
-
lg: 5.5
|
|
6790
|
-
},
|
|
6791
|
-
main: {
|
|
6792
|
-
label: "Size"
|
|
6793
|
-
}
|
|
6794
|
-
}
|
|
6795
|
-
};
|
|
6796
6704
|
const getInputField = (scope, label) => {
|
|
6797
6705
|
return {
|
|
6798
6706
|
type: "Control",
|
|
@@ -6884,22 +6792,13 @@ const GraphSection = {
|
|
|
6884
6792
|
const buildPropertiesSection = function(type) {
|
|
6885
6793
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6886
6794
|
switch (type) {
|
|
6887
|
-
case "DataGrid":
|
|
6888
|
-
uiSchema.elements = [
|
|
6889
|
-
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
6890
|
-
getInputField("elevation", "Card Elevation"),
|
|
6891
|
-
getInputField("height", "Grid height"),
|
|
6892
|
-
getInputField("justifyContent", "justifyContent"),
|
|
6893
|
-
cardLayout
|
|
6894
|
-
];
|
|
6895
|
-
break;
|
|
6896
6795
|
case "Stepper":
|
|
6897
6796
|
uiSchema.elements = [
|
|
6898
6797
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6899
|
-
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
6900
6798
|
getInputField("resetText", "Reset Text"),
|
|
6901
6799
|
getInputField("completeText", "Complete Text"),
|
|
6902
6800
|
getSelectField("orientation", "Orientation Type"),
|
|
6801
|
+
EmptyBox,
|
|
6903
6802
|
getArrayControl("sectionLabels", "label")
|
|
6904
6803
|
];
|
|
6905
6804
|
break;
|
|
@@ -7012,8 +6911,7 @@ const buildPropertiesSection = function(type) {
|
|
|
7012
6911
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
7013
6912
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
7014
6913
|
getInputField("selectKey", "Selection Key"),
|
|
7015
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7016
|
-
sizeHolder
|
|
6914
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7017
6915
|
];
|
|
7018
6916
|
break;
|
|
7019
6917
|
case "Radio":
|
|
@@ -7466,8 +7364,7 @@ const sectionLabels = {
|
|
|
7466
7364
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7467
7365
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7468
7366
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7469
|
-
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7470
|
-
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7367
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7471
7368
|
};
|
|
7472
7369
|
const refreshPage = (type, store2) => {
|
|
7473
7370
|
var _a;
|
|
@@ -8409,7 +8306,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8409
8306
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8410
8307
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8411
8308
|
}
|
|
8412
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter
|
|
8309
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8413
8310
|
}
|
|
8414
8311
|
async function executeCustomHandler(params) {
|
|
8415
8312
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -9568,9 +9465,6 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9568
9465
|
if (config.style) {
|
|
9569
9466
|
wrapper.config.style = JSON.parse(config.style);
|
|
9570
9467
|
}
|
|
9571
|
-
if (config.layout) {
|
|
9572
|
-
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9573
|
-
}
|
|
9574
9468
|
return wrapper;
|
|
9575
9469
|
};
|
|
9576
9470
|
var TextInputField = {
|
|
@@ -9754,7 +9648,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9754
9648
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9755
9649
|
}
|
|
9756
9650
|
if (config.ColumnResizingAvailable) {
|
|
9757
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9651
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
|
|
9758
9652
|
}
|
|
9759
9653
|
if (config.DragAvailable) {
|
|
9760
9654
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10477,14 +10371,11 @@ const buildStepper = (config, componentScope) => {
|
|
|
10477
10371
|
const stepper = _.cloneDeep(Stepper);
|
|
10478
10372
|
stepper.scope = componentScope;
|
|
10479
10373
|
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10480
|
-
if (config.defaultButtonAvailable) {
|
|
10481
|
-
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10482
|
-
}
|
|
10483
10374
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10484
10375
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10485
10376
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10486
10377
|
if (config.sectionLabels) {
|
|
10487
|
-
stepper.config.main.
|
|
10378
|
+
stepper.config.main.label = config.sectionLabels.map((e, i) => {
|
|
10488
10379
|
return { label: e.label, id: i };
|
|
10489
10380
|
});
|
|
10490
10381
|
}
|
|
@@ -10535,49 +10426,6 @@ const buildPopUp = (config, componentScope) => {
|
|
|
10535
10426
|
}
|
|
10536
10427
|
return popup;
|
|
10537
10428
|
};
|
|
10538
|
-
const dataGrid = {
|
|
10539
|
-
"type": "Control",
|
|
10540
|
-
"scope": "#/properties/dataGrid",
|
|
10541
|
-
"layout": 12,
|
|
10542
|
-
"options": {
|
|
10543
|
-
"widget": "DataGrid"
|
|
10544
|
-
},
|
|
10545
|
-
elements: [],
|
|
10546
|
-
"config": {
|
|
10547
|
-
"main": {
|
|
10548
|
-
elevation: 0,
|
|
10549
|
-
useWrapper: false
|
|
10550
|
-
},
|
|
10551
|
-
style: {}
|
|
10552
|
-
}
|
|
10553
|
-
};
|
|
10554
|
-
const buildDataGrid = (config, componentScope) => {
|
|
10555
|
-
const DataGrid = _.cloneDeep(dataGrid);
|
|
10556
|
-
DataGrid.scope = componentScope;
|
|
10557
|
-
if (config.elevation) {
|
|
10558
|
-
DataGrid.config.main.elevation = +config.elevation;
|
|
10559
|
-
}
|
|
10560
|
-
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10561
|
-
if (config.height) {
|
|
10562
|
-
DataGrid.config.main.height = `${config.height}px`;
|
|
10563
|
-
}
|
|
10564
|
-
if (config.justifyContent) {
|
|
10565
|
-
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10566
|
-
}
|
|
10567
|
-
if (config.label) {
|
|
10568
|
-
DataGrid.config.main.label = config.label;
|
|
10569
|
-
}
|
|
10570
|
-
if (config.layout) {
|
|
10571
|
-
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10572
|
-
}
|
|
10573
|
-
if (config.cardLayout) {
|
|
10574
|
-
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10575
|
-
}
|
|
10576
|
-
if (config.style) {
|
|
10577
|
-
DataGrid.config.style = JSON.parse(config.style);
|
|
10578
|
-
}
|
|
10579
|
-
return DataGrid;
|
|
10580
|
-
};
|
|
10581
10429
|
let schema = {
|
|
10582
10430
|
type: "object",
|
|
10583
10431
|
properties: {},
|
|
@@ -10696,9 +10544,6 @@ const buildUiSchema = (config) => {
|
|
|
10696
10544
|
let elements = {};
|
|
10697
10545
|
const componentScope = `#/properties/${config.name}`;
|
|
10698
10546
|
switch (config.type) {
|
|
10699
|
-
case "DataGrid":
|
|
10700
|
-
elements = buildDataGrid(config, componentScope);
|
|
10701
|
-
break;
|
|
10702
10547
|
case "Stepper":
|
|
10703
10548
|
elements = buildStepper(config, componentScope);
|
|
10704
10549
|
break;
|
|
@@ -10824,25 +10669,17 @@ const buildUiSchema = (config) => {
|
|
|
10824
10669
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10825
10670
|
return elements;
|
|
10826
10671
|
} else if (config.type == "Table") {
|
|
10827
|
-
const sizeMap = {};
|
|
10828
|
-
if (config.sizeHolder) {
|
|
10829
|
-
config.sizeHolder.map((e, i) => {
|
|
10830
|
-
sizeMap[e.keyName] = e.value;
|
|
10831
|
-
});
|
|
10832
|
-
}
|
|
10833
10672
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10834
10673
|
if (e.type) {
|
|
10835
10674
|
return {
|
|
10836
10675
|
accessorKey: e.name,
|
|
10837
10676
|
header: e.label || e.name,
|
|
10838
|
-
size: sizeMap[e.name] || 180,
|
|
10839
10677
|
widget: buildUiSchema(e)
|
|
10840
10678
|
};
|
|
10841
10679
|
}
|
|
10842
10680
|
return {
|
|
10843
10681
|
accessorKey: e.name,
|
|
10844
|
-
header: e.label || e.name
|
|
10845
|
-
size: sizeMap[e.name] || 180
|
|
10682
|
+
header: e.label || e.name
|
|
10846
10683
|
};
|
|
10847
10684
|
});
|
|
10848
10685
|
} else if (config.type == "Array") {
|