impaktapps-ui-builder 0.0.288 → 0.0.289
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 +148 -78
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +7 -7
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +0 -9
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +2 -24
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +28 -0
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +28 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +2 -41
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +0 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +85 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +36 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +1 -9
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +15 -0
|
@@ -5879,16 +5879,70 @@ var _ = lodash.exports;
|
|
|
5879
5879
|
const ComponentSchema = {
|
|
5880
5880
|
type: "object",
|
|
5881
5881
|
properties: {
|
|
5882
|
+
type: {
|
|
5883
|
+
type: "string",
|
|
5884
|
+
oneOf: [
|
|
5885
|
+
{ title: "Select", const: "Select" },
|
|
5886
|
+
{ title: "Date", const: "Date" },
|
|
5887
|
+
{ title: "CheckBox", const: "CheckBox" },
|
|
5888
|
+
{ title: "Table", const: "Table" },
|
|
5889
|
+
{ title: "Lazy Loading Table", const: "LazyLoadingTable" },
|
|
5890
|
+
{ title: "Array", const: "Array" },
|
|
5891
|
+
{ title: "Container", const: "WrapperSection" },
|
|
5892
|
+
{ title: "Tabs", const: "TabSection" },
|
|
5893
|
+
{ title: "Text", const: "Text" },
|
|
5894
|
+
{ title: "Text Area", const: "TextArea" },
|
|
5895
|
+
{ title: "Button", const: "Button" },
|
|
5896
|
+
{ title: "Card", const: "card" },
|
|
5897
|
+
{ title: "Radio", const: "Radio" },
|
|
5898
|
+
{ title: "Rank", const: "Rank" },
|
|
5899
|
+
{ title: "SpeedoMeter", const: "SpeedoMeter" },
|
|
5900
|
+
{ title: "ProgressBar", const: "ProgressBar" },
|
|
5901
|
+
{ title: "Graph", const: "Graph" },
|
|
5902
|
+
{ title: "Label", const: "Box" },
|
|
5903
|
+
{ title: "Upload File", const: "UploadFile" },
|
|
5904
|
+
{ title: "Download File", const: "DownloadFile" },
|
|
5905
|
+
{ title: "Empty Box", const: "EmptyBox" },
|
|
5906
|
+
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
5907
|
+
{ title: "Rank Card", const: "RankCard" },
|
|
5908
|
+
{ title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
|
|
5909
|
+
{ title: "Slider", const: "Slider" },
|
|
5910
|
+
{ title: "Timer", const: "Timer" },
|
|
5911
|
+
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
5912
|
+
{ title: "LeaderBoard", const: "LeaderBoard" }
|
|
5913
|
+
]
|
|
5914
|
+
},
|
|
5915
|
+
method: {
|
|
5916
|
+
type: "string",
|
|
5917
|
+
oneOf: [
|
|
5918
|
+
{ title: "Get", const: "get" },
|
|
5919
|
+
{ title: "Post", const: "post" },
|
|
5920
|
+
{ title: "Delete", const: "delete" },
|
|
5921
|
+
{ title: "Put", const: "put" }
|
|
5922
|
+
]
|
|
5923
|
+
},
|
|
5882
5924
|
layout: {
|
|
5883
5925
|
type: "array",
|
|
5884
5926
|
items: {
|
|
5885
5927
|
type: "object",
|
|
5886
5928
|
properties: {
|
|
5887
5929
|
key: {
|
|
5888
|
-
type: "string"
|
|
5930
|
+
type: "string",
|
|
5931
|
+
oneOf: [
|
|
5932
|
+
{ title: "Extra Small", const: "xs" },
|
|
5933
|
+
{ title: "Small", const: "sm" },
|
|
5934
|
+
{ title: "Medium", const: "md" },
|
|
5935
|
+
{ title: "Large", const: "lg" }
|
|
5936
|
+
]
|
|
5889
5937
|
},
|
|
5890
5938
|
value: {
|
|
5891
|
-
type: "string"
|
|
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
|
+
]
|
|
5892
5946
|
}
|
|
5893
5947
|
}
|
|
5894
5948
|
}
|
|
@@ -5980,13 +6034,44 @@ const ComponentSchema = {
|
|
|
5980
6034
|
type: "string"
|
|
5981
6035
|
},
|
|
5982
6036
|
validationType: {
|
|
5983
|
-
type: "string"
|
|
6037
|
+
type: "string",
|
|
6038
|
+
oneOf: [
|
|
6039
|
+
{ const: "required", title: "Required" },
|
|
6040
|
+
{ const: "minLength", title: "Minimum Length" },
|
|
6041
|
+
{ const: "maxLength", title: "Maximum Length" },
|
|
6042
|
+
{ const: "pattern", title: "Pattern" }
|
|
6043
|
+
]
|
|
5984
6044
|
},
|
|
5985
6045
|
validationValue: {
|
|
5986
6046
|
type: "string"
|
|
5987
6047
|
}
|
|
5988
6048
|
}
|
|
5989
6049
|
}
|
|
6050
|
+
},
|
|
6051
|
+
buttonType: {
|
|
6052
|
+
type: "string",
|
|
6053
|
+
oneOf: [
|
|
6054
|
+
{ title: "Button With Text", const: "Button" },
|
|
6055
|
+
{ title: "Button With Icon", const: "IconButton" },
|
|
6056
|
+
{ title: "Button With Icon and Text", const: "ButtonWithIconAndText" }
|
|
6057
|
+
]
|
|
6058
|
+
},
|
|
6059
|
+
defaultStyle: {
|
|
6060
|
+
type: "string",
|
|
6061
|
+
oneOf: [
|
|
6062
|
+
{ title: "Apply Default Style", const: "true" },
|
|
6063
|
+
{ title: "No Style", const: "false" }
|
|
6064
|
+
]
|
|
6065
|
+
},
|
|
6066
|
+
graphType: {
|
|
6067
|
+
type: "string",
|
|
6068
|
+
oneOf: [
|
|
6069
|
+
{ title: "Bar Graph", const: "BarGraph" },
|
|
6070
|
+
{ title: "Stack Bar Graph", const: "StackBarGraph" },
|
|
6071
|
+
{ title: "Line Graph", const: "LineGraph" },
|
|
6072
|
+
{ title: "Pie Graph", const: "PieGraph" },
|
|
6073
|
+
{ title: "Horizontal Bar Graph", const: "HorizontalBarGraph" }
|
|
6074
|
+
]
|
|
5990
6075
|
}
|
|
5991
6076
|
}
|
|
5992
6077
|
};
|
|
@@ -6377,37 +6462,7 @@ const CoreSection = {
|
|
|
6377
6462
|
layout: { xs: 12, sm: 12, md: 6, lg: 6 },
|
|
6378
6463
|
main: {
|
|
6379
6464
|
label: "Type",
|
|
6380
|
-
type: "text"
|
|
6381
|
-
options: [
|
|
6382
|
-
{ label: "Select", value: "Select" },
|
|
6383
|
-
{ label: "Date", value: "Date" },
|
|
6384
|
-
{ label: "CheckBox", value: "CheckBox" },
|
|
6385
|
-
{ label: "Table", value: "Table" },
|
|
6386
|
-
{ label: "Lazy Loading Table", value: "LazyLoadingTable" },
|
|
6387
|
-
{ label: "Array", value: "Array" },
|
|
6388
|
-
{ label: "Container", value: "WrapperSection" },
|
|
6389
|
-
{ label: "Tabs", value: "TabSection" },
|
|
6390
|
-
{ label: "Text", value: "Text" },
|
|
6391
|
-
{ label: "Text Area", value: "TextArea" },
|
|
6392
|
-
{ label: "Button", value: "Button" },
|
|
6393
|
-
{ label: "Card", value: "card" },
|
|
6394
|
-
{ label: "Radio", value: "Radio" },
|
|
6395
|
-
{ label: "Rank", value: "Rank" },
|
|
6396
|
-
{ label: "SpeedoMeter", value: "SpeedoMeter" },
|
|
6397
|
-
{ label: "ProgressBar", value: "ProgressBar" },
|
|
6398
|
-
{ label: "Graph", value: "Graph" },
|
|
6399
|
-
{ label: "Label", value: "Box" },
|
|
6400
|
-
{ label: "Upload File", value: "UploadFile" },
|
|
6401
|
-
{ label: "Download File", value: "DownloadFile" },
|
|
6402
|
-
{ label: "Empty Box", value: "EmptyBox" },
|
|
6403
|
-
{ label: "ProgressBar Card", value: "ProgressBarCard" },
|
|
6404
|
-
{ label: "Rank Card", value: "RankCard" },
|
|
6405
|
-
{ label: "Runner Boy Progress Bar", value: "RunnerBoyProgressBar" },
|
|
6406
|
-
{ label: "Slider", value: "Slider" },
|
|
6407
|
-
{ label: "Timer", value: "Timer" },
|
|
6408
|
-
{ label: "MultipleSelect", value: "MultipleSelect" },
|
|
6409
|
-
{ label: "LeaderBoard", value: "LeaderBoard" }
|
|
6410
|
-
]
|
|
6465
|
+
type: "text"
|
|
6411
6466
|
}
|
|
6412
6467
|
}
|
|
6413
6468
|
},
|
|
@@ -6480,13 +6535,7 @@ const CoreSection = {
|
|
|
6480
6535
|
lg: 5.5
|
|
6481
6536
|
},
|
|
6482
6537
|
main: {
|
|
6483
|
-
label: "Screen Size"
|
|
6484
|
-
options: [
|
|
6485
|
-
{ label: "Extra Small", value: "xs" },
|
|
6486
|
-
{ label: "Small", value: "sm" },
|
|
6487
|
-
{ label: "Medium", value: "md" },
|
|
6488
|
-
{ label: "Large", value: "lg" }
|
|
6489
|
-
]
|
|
6538
|
+
label: "Screen Size"
|
|
6490
6539
|
}
|
|
6491
6540
|
}
|
|
6492
6541
|
},
|
|
@@ -6504,13 +6553,7 @@ const CoreSection = {
|
|
|
6504
6553
|
lg: 5.5
|
|
6505
6554
|
},
|
|
6506
6555
|
main: {
|
|
6507
|
-
label: "Value"
|
|
6508
|
-
options: [
|
|
6509
|
-
{ label: "3", value: "3" },
|
|
6510
|
-
{ label: "5.5", value: "5.5" },
|
|
6511
|
-
{ label: "8", value: "8" },
|
|
6512
|
-
{ label: "12", value: "12" }
|
|
6513
|
-
]
|
|
6556
|
+
label: "Value"
|
|
6514
6557
|
}
|
|
6515
6558
|
}
|
|
6516
6559
|
}
|
|
@@ -6867,12 +6910,6 @@ const buildPropertiesSection = function(type) {
|
|
|
6867
6910
|
uiSchema.elements = [heading, bottomLabel_1, bottomLabel_2, bottomLabel_3];
|
|
6868
6911
|
} else if (type === "card") {
|
|
6869
6912
|
uiSchema.elements = [getInputField("url", "Image Url"), getInputField("label", "Label"), getInputField("description", "Description")];
|
|
6870
|
-
} else if (type === "Box") {
|
|
6871
|
-
const iconName = getInputField("value", "Value");
|
|
6872
|
-
uiSchema.elements = [getSelectField("graphType", "Label Type", [
|
|
6873
|
-
{ label: "URL", value: "url" },
|
|
6874
|
-
{ label: "Heading", value: "heading" }
|
|
6875
|
-
]), iconName];
|
|
6876
6913
|
} else if (type === "Button") {
|
|
6877
6914
|
const caption = getInputField("color", "Color");
|
|
6878
6915
|
const size = getInputField("size", "Size");
|
|
@@ -7130,13 +7167,7 @@ const ValidationSection = {
|
|
|
7130
7167
|
lg: 5.5
|
|
7131
7168
|
},
|
|
7132
7169
|
main: {
|
|
7133
|
-
label: "Validation Type"
|
|
7134
|
-
options: [
|
|
7135
|
-
{ value: "required", label: "Required" },
|
|
7136
|
-
{ value: "minLength", label: "Minimum Length" },
|
|
7137
|
-
{ value: "maxLength", label: "Maximum Length" },
|
|
7138
|
-
{ value: "pattern", label: "Pattern" }
|
|
7139
|
-
]
|
|
7170
|
+
label: "Validation Type"
|
|
7140
7171
|
}
|
|
7141
7172
|
}
|
|
7142
7173
|
},
|
|
@@ -7177,7 +7208,7 @@ const sectionLabels = {
|
|
|
7177
7208
|
UploadFile: ["Core", "style", "Event", "Validation"],
|
|
7178
7209
|
Graph: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7179
7210
|
DownloadFile: ["Core", "style", "Event", "Validation"],
|
|
7180
|
-
Box: ["Core", "
|
|
7211
|
+
Box: ["Core", "style", "Event", "Validation"],
|
|
7181
7212
|
Properties: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7182
7213
|
ProgressBarCard: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7183
7214
|
RankCard: ["Core", "Properties", "style", "Event", "Validation"],
|
|
@@ -9167,6 +9198,15 @@ const EventSchema = {
|
|
|
9167
9198
|
}
|
|
9168
9199
|
}
|
|
9169
9200
|
},
|
|
9201
|
+
method: {
|
|
9202
|
+
type: "string",
|
|
9203
|
+
oneOf: [
|
|
9204
|
+
{ title: "Get", const: "get" },
|
|
9205
|
+
{ title: "Post", const: "post" },
|
|
9206
|
+
{ title: "Delete", const: "delete" },
|
|
9207
|
+
{ title: "Put", const: "put" }
|
|
9208
|
+
]
|
|
9209
|
+
},
|
|
9170
9210
|
refreshElements: {
|
|
9171
9211
|
type: "array",
|
|
9172
9212
|
items: {
|
|
@@ -9178,6 +9218,33 @@ const EventSchema = {
|
|
|
9178
9218
|
}
|
|
9179
9219
|
}
|
|
9180
9220
|
},
|
|
9221
|
+
eventType: {
|
|
9222
|
+
type: "string",
|
|
9223
|
+
oneOf: [
|
|
9224
|
+
{ title: "Click Event", const: "onClick" },
|
|
9225
|
+
{ title: "onStart", const: "onStart" },
|
|
9226
|
+
{ title: "Load Event", const: "onLoad" },
|
|
9227
|
+
{ title: "Change Event", const: "onChange" },
|
|
9228
|
+
{ title: "Success", const: "Success" },
|
|
9229
|
+
{ title: "Fail", const: "Fail" }
|
|
9230
|
+
]
|
|
9231
|
+
},
|
|
9232
|
+
Handler: {
|
|
9233
|
+
type: "string",
|
|
9234
|
+
oneOf: [
|
|
9235
|
+
{ title: "Custom", const: "custom" },
|
|
9236
|
+
{ title: "Api", const: "api" },
|
|
9237
|
+
{ title: "Inbuilt Function", const: "inBuiltFunction" },
|
|
9238
|
+
{ title: "Refresh", const: "refresh" }
|
|
9239
|
+
]
|
|
9240
|
+
},
|
|
9241
|
+
inBuiltFunctionType: {
|
|
9242
|
+
type: "string",
|
|
9243
|
+
oneOf: [
|
|
9244
|
+
{ title: "RankProvider", const: "RankProvider" },
|
|
9245
|
+
{ title: "Download File", const: "downloadFile" }
|
|
9246
|
+
]
|
|
9247
|
+
},
|
|
9181
9248
|
body: {
|
|
9182
9249
|
type: "array",
|
|
9183
9250
|
items: {
|
|
@@ -9288,15 +9355,7 @@ const EventUiSchema = {
|
|
|
9288
9355
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
9289
9356
|
main: {
|
|
9290
9357
|
label: "Event Type",
|
|
9291
|
-
type: "text"
|
|
9292
|
-
options: [
|
|
9293
|
-
{ label: "Click Event", value: "onClick" },
|
|
9294
|
-
{ label: "onStart", value: "onStart" },
|
|
9295
|
-
{ label: "Load Event", value: "onLoad" },
|
|
9296
|
-
{ label: "Change Event", value: "onChange" },
|
|
9297
|
-
{ label: "Success", value: "Success" },
|
|
9298
|
-
{ label: "Fail", value: "Fail" }
|
|
9299
|
-
]
|
|
9358
|
+
type: "text"
|
|
9300
9359
|
}
|
|
9301
9360
|
}
|
|
9302
9361
|
},
|
|
@@ -9489,13 +9548,7 @@ const APISection = {
|
|
|
9489
9548
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
9490
9549
|
main: {
|
|
9491
9550
|
label: "Method",
|
|
9492
|
-
type: "text"
|
|
9493
|
-
options: [
|
|
9494
|
-
{ label: "Get", value: "get" },
|
|
9495
|
-
{ label: "Post", value: "post" },
|
|
9496
|
-
{ label: "Delete", value: "delete" },
|
|
9497
|
-
{ label: "Put", value: "put" }
|
|
9498
|
-
]
|
|
9551
|
+
type: "text"
|
|
9499
9552
|
}
|
|
9500
9553
|
}
|
|
9501
9554
|
},
|
|
@@ -9832,6 +9885,23 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
9832
9885
|
}
|
|
9833
9886
|
};
|
|
9834
9887
|
});
|
|
9888
|
+
} else if (eventConfig.type = !(_.isEmpty(handlerResponse) && handlerResponse)) {
|
|
9889
|
+
store2.setSchema((pre) => {
|
|
9890
|
+
var _a;
|
|
9891
|
+
return {
|
|
9892
|
+
...pre,
|
|
9893
|
+
properties: {
|
|
9894
|
+
...pre.properties,
|
|
9895
|
+
[componentName]: {
|
|
9896
|
+
...(_a = pre.properties) == null ? void 0 : _a[componentName],
|
|
9897
|
+
type: "array",
|
|
9898
|
+
items: {
|
|
9899
|
+
oneOf: handlerResponse.data
|
|
9900
|
+
}
|
|
9901
|
+
}
|
|
9902
|
+
}
|
|
9903
|
+
};
|
|
9904
|
+
});
|
|
9835
9905
|
} else if (eventConfig.type === "page") {
|
|
9836
9906
|
store2.setFormdata((pre) => {
|
|
9837
9907
|
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|