impaktapps-ui-builder 0.0.319 → 0.0.321
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 +145 -103
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +1 -5
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +128 -112
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +12 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ const TextField = {
|
|
|
13
13
|
config:{
|
|
14
14
|
main:{
|
|
15
15
|
label:"Adhaar Card",
|
|
16
|
-
formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","
|
|
16
|
+
formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],
|
|
17
17
|
placeholder:"XXXX XXXX XXXX"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -8,6 +8,12 @@ export const buildTextField = (config:any,componentScope:string) =>{
|
|
|
8
8
|
if (config.style) {
|
|
9
9
|
inputField.config.style = JSON.parse(config.style)
|
|
10
10
|
}
|
|
11
|
+
if (config.InputFormatingAndMasking) {
|
|
12
|
+
inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
|
|
13
|
+
}
|
|
14
|
+
if (config.placeholder) {
|
|
15
|
+
inputField.config.main.placeholder = config.placeholder;
|
|
16
|
+
}
|
|
11
17
|
if (config.layout) {
|
|
12
18
|
inputField.config.layout = createLayoutFormat(config.layout)
|
|
13
19
|
}
|
|
@@ -42,6 +42,9 @@ export const buildTextArea = (config:any,componentScope:string) =>{
|
|
|
42
42
|
if (config.style) {
|
|
43
43
|
textArea.config.style = JSON.parse(config.style)
|
|
44
44
|
}
|
|
45
|
+
if (config.placeholder) {
|
|
46
|
+
textArea.config.main.placeholder = config.placeholder;
|
|
47
|
+
}
|
|
45
48
|
textArea.scope = componentScope;
|
|
46
49
|
return textArea;
|
|
47
50
|
}
|
|
@@ -178,11 +178,7 @@ const buildUiSchema = (config: any) => {
|
|
|
178
178
|
break;
|
|
179
179
|
case "RunnerBoyProgressBar":
|
|
180
180
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
181
|
-
|
|
182
|
-
break;
|
|
183
|
-
case "TabSection":
|
|
184
|
-
elements = buildTabSection(config, componentScope);
|
|
185
|
-
break;
|
|
181
|
+
break;
|
|
186
182
|
case "WrapperSection":
|
|
187
183
|
elements = buildWrapperSection(config, componentScope);
|
|
188
184
|
break;
|
|
@@ -158,119 +158,135 @@ const GraphSection = {
|
|
|
158
158
|
|
|
159
159
|
export const buildPropertiesSection = function (type: String) {
|
|
160
160
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
else if (type === "RankCard") {
|
|
177
|
-
uiSchema.elements = [
|
|
178
|
-
getInputField("rank", "Rank"),
|
|
179
|
-
getInputField("image", "Image Url"),
|
|
180
|
-
getInputField("title", "Card Title"),
|
|
181
|
-
getInputField("description", "Card Description")];
|
|
182
|
-
}
|
|
183
|
-
else if (type === "LeaderBoard") {
|
|
184
|
-
uiSchema.elements = [getInputField("valueLabel", "Value Label"),
|
|
185
|
-
getInputField("firstImage", "First Image url"),
|
|
186
|
-
getInputField("secondImage", "Second Image url"),
|
|
187
|
-
getInputField("thirdImage", "Third Image url"),
|
|
188
|
-
getTextArea("functionCode", "Write Compare Code", false)
|
|
189
|
-
];
|
|
190
|
-
}
|
|
191
|
-
else if (type === "CardSlider") {
|
|
192
|
-
const heading = getInputField("heading", "Heading");
|
|
193
|
-
const iconName = getInputField("iconName", "Icon Name");
|
|
194
|
-
uiSchema.elements = [heading, iconName];
|
|
195
|
-
} else if (type === "ProgressBar" || type === "ProgressBarCard") {
|
|
196
|
-
const heading = getInputField("heading", "Heading");
|
|
197
|
-
const bottomLabel_1 = getInputField("bottomLabel_1", "First BottomLabel");
|
|
198
|
-
const bottomLabel_2 = getInputField("bottomLabel_2", "Second BottomLabel");
|
|
199
|
-
const bottomLabel_3 = getInputField("bottomLabel_3", "Third BottomLabel");
|
|
200
|
-
uiSchema.elements = [heading, bottomLabel_1, bottomLabel_2, bottomLabel_3];
|
|
201
|
-
} else if (type === "card") {
|
|
202
|
-
uiSchema.elements = [getInputField("url", "Image Url"), getInputField("label", "Label"), getInputField("description", "Description"),EmptyBox];
|
|
203
|
-
}
|
|
204
|
-
else if (type === "Button") {
|
|
205
|
-
const color = getSelectField("color", "Color",[]);
|
|
206
|
-
const iconName = getSelectField("iconName", "Icon Name",[]);
|
|
207
|
-
uiSchema.elements = [getSelectField("buttonType", "Button Type", []), iconName, color,
|
|
208
|
-
getInputField("tooltipMessage", "Tooltip Message"),
|
|
209
|
-
getSelectField("defaultStyle", "Default Style", [
|
|
210
|
-
{ label: "Apply Default Style", value: "true" },
|
|
211
|
-
{ label: "No Style", value: "false" },
|
|
212
|
-
]),
|
|
213
|
-
JSON.parse(JSON.stringify(EmptyBox))
|
|
214
|
-
];
|
|
215
|
-
} else if (type === "Graph") {
|
|
216
|
-
const height = getInputField("height", "Height");
|
|
217
|
-
const heading = getInputField("heading", "Heading");
|
|
218
|
-
const leftLabel = getInputField("leftLabel", "Left Label");
|
|
219
|
-
const bottomLabel = getInputField("bottomLabel", "Bottom Label");
|
|
220
|
-
const legendAvailabe = getRadioInputField("legendHide", "Legend Hide", ["YES", "No"])
|
|
161
|
+
switch (type) {
|
|
162
|
+
case "Text":
|
|
163
|
+
uiSchema.elements = [
|
|
164
|
+
getInputField("placeholder", "Placeholder"),
|
|
165
|
+
EmptyBox,
|
|
166
|
+
getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
|
|
167
|
+
]
|
|
168
|
+
break;
|
|
169
|
+
case "TextArea":
|
|
170
|
+
uiSchema.elements = [
|
|
171
|
+
getInputField("placeholder", "Placeholder"),
|
|
172
|
+
EmptyBox,]
|
|
173
|
+
break;
|
|
221
174
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
175
|
+
case "SpeedoMeter":
|
|
176
|
+
uiSchema.elements = [
|
|
177
|
+
getInputField("segments", "Segments Count"),
|
|
178
|
+
getInputField("heading", "Container Heading"),
|
|
179
|
+
getInputField("heading", "Container Heading"),
|
|
180
|
+
getInputField("speedoCaption", "Speedometer Caption"),
|
|
181
|
+
getInputField("width", "Speedometer Width")
|
|
182
|
+
]
|
|
183
|
+
break;
|
|
184
|
+
case "RankCard":
|
|
185
|
+
uiSchema.elements = [
|
|
186
|
+
getInputField("rank", "Rank"),
|
|
187
|
+
getInputField("image", "Image Url"),
|
|
188
|
+
getInputField("title", "Card Title"),
|
|
189
|
+
getInputField("description", "Card Description")];
|
|
190
|
+
break;
|
|
191
|
+
case "LeaderBoard":
|
|
192
|
+
uiSchema.elements = [
|
|
193
|
+
getInputField("valueLabel", "Value Label"),
|
|
194
|
+
getInputField("firstImage", "First Image url"),
|
|
195
|
+
getInputField("secondImage", "Second Image url"),
|
|
196
|
+
getInputField("thirdImage", "Third Image url"),
|
|
197
|
+
getTextArea("functionCode", "Write Compare Code", false)
|
|
198
|
+
];
|
|
199
|
+
break;
|
|
200
|
+
case "CardSlider":
|
|
201
|
+
uiSchema.elements = [getInputField("heading", "Heading"),
|
|
202
|
+
getInputField("iconName", "Icon Name")];
|
|
203
|
+
break;
|
|
204
|
+
case "ProgressBar":
|
|
205
|
+
case "ProgressBarCard":
|
|
206
|
+
uiSchema.elements = [
|
|
207
|
+
getInputField("heading", "Heading"),
|
|
208
|
+
getInputField("bottomLabel_1", "First BottomLabel"),
|
|
209
|
+
getInputField("bottomLabel_2", "Second BottomLabel"),
|
|
210
|
+
getInputField("bottomLabel_3", "Third BottomLabel")
|
|
211
|
+
];
|
|
212
|
+
break;
|
|
213
|
+
case "card":
|
|
214
|
+
uiSchema.elements = [
|
|
215
|
+
getInputField("url", "Image Url"),
|
|
216
|
+
getInputField("label", "Label"),
|
|
217
|
+
getInputField("description", "Description"),
|
|
218
|
+
EmptyBox
|
|
219
|
+
];
|
|
220
|
+
break;
|
|
221
|
+
case "Button":
|
|
222
|
+
uiSchema.elements = [
|
|
223
|
+
getSelectField("buttonType", "Button Type", []),
|
|
224
|
+
getSelectField("iconName", "Icon Name", []),
|
|
225
|
+
getSelectField("color", "Color", []),
|
|
226
|
+
getInputField("tooltipMessage", "Tooltip Message"),
|
|
227
|
+
getSelectField("defaultStyle", "Default Style", [
|
|
228
|
+
{ label: "Apply Default Style", value: "true" },
|
|
229
|
+
{ label: "No Style", value: "false" },
|
|
230
|
+
]),
|
|
231
|
+
EmptyBox
|
|
232
|
+
];
|
|
233
|
+
break;
|
|
234
|
+
case "Graph":
|
|
235
|
+
uiSchema.elements = [
|
|
236
|
+
getInputField("height", "Height"),
|
|
237
|
+
getInputField("heading", "Heading"),
|
|
238
|
+
getSelectField("graphType", "Graph Type", [
|
|
239
|
+
{ label: "Bar Graph", value: "BarGraph" },
|
|
240
|
+
{ label: "Stack Bar Graph", value: "StackBarGraph" },
|
|
241
|
+
{ label: "Line Graph", value: "LineGraph" },
|
|
242
|
+
{ label: "Pie Graph", value: "PieGraph" },
|
|
243
|
+
{ label: "Horizontal Bar Graph", value: "HorizontalBarGraph" },
|
|
244
|
+
]),
|
|
245
|
+
getInputField("leftLabel", "Left Label"),
|
|
246
|
+
getInputField("bottomLabel", "Bottom Label"),
|
|
247
|
+
getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
|
|
248
|
+
getArrayControl("legendLabels", "label"),
|
|
249
|
+
getArrayControl("pieArcColors", "color"),
|
|
250
|
+
];
|
|
251
|
+
break;
|
|
252
|
+
case "WrapperSection":
|
|
253
|
+
uiSchema.elements = [getRadioInputField("divider", "Divider", ["YES", "No"]), EmptyBox]
|
|
254
|
+
break;
|
|
274
255
|
|
|
256
|
+
case "TabSection":
|
|
257
|
+
uiSchema.elements = [
|
|
258
|
+
getArrayControl("sectionLabels", "label"),
|
|
259
|
+
]
|
|
260
|
+
break;
|
|
261
|
+
case "Table":
|
|
262
|
+
case "LazyLoadingTable":
|
|
263
|
+
uiSchema.elements = [
|
|
264
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
265
|
+
getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
|
|
266
|
+
getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
|
|
267
|
+
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
268
|
+
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
269
|
+
getInputField("selectKey", "Selection Key"),
|
|
270
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
271
|
+
]
|
|
272
|
+
break;
|
|
273
|
+
case "Radio":
|
|
274
|
+
uiSchema.elements = [
|
|
275
|
+
getArrayControl("sectionLabels", "label", "Options Of Radio"),
|
|
276
|
+
]
|
|
277
|
+
break;
|
|
278
|
+
case "Select":
|
|
279
|
+
uiSchema.elements = [
|
|
280
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
281
|
+
getRadioInputField("freeSolo", "FreeSolo", ["YES", "NO"]),
|
|
282
|
+
]
|
|
283
|
+
break;
|
|
284
|
+
case "MultipleSelect":
|
|
285
|
+
uiSchema.elements = [
|
|
286
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
287
|
+
EmptyBox
|
|
288
|
+
]
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
275
291
|
return uiSchema;
|
|
276
292
|
};
|
|
@@ -158,6 +158,18 @@ export const ComponentSchema: any = {
|
|
|
158
158
|
},
|
|
159
159
|
},
|
|
160
160
|
},
|
|
161
|
+
InputFormatingAndMasking: {
|
|
162
|
+
type: "array",
|
|
163
|
+
items: {
|
|
164
|
+
type: "object",
|
|
165
|
+
properties: {
|
|
166
|
+
formatElement: {
|
|
167
|
+
type: "string",
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
161
173
|
validation: {
|
|
162
174
|
type: "array",
|
|
163
175
|
items: {
|
|
@@ -31,7 +31,8 @@ const sectionLabels = {
|
|
|
31
31
|
Button: ["Core", "Properties", "style", "Event","Validation"],
|
|
32
32
|
Array:["Core","Components","Validation"],
|
|
33
33
|
Radio:["Core", "Properties", "style", "Event","Validation"],
|
|
34
|
-
Text:["Core","style", "Event","Validation"]
|
|
34
|
+
Text:["Core","Properties","style", "Event","Validation"],
|
|
35
|
+
TextArea:["Core","Properties","style", "Event","Validation"],
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export const refreshPage = (type:string,store:any) => {
|