impaktapps-ui-builder 0.0.320 → 0.0.322
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 +146 -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/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 +129 -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
|
@@ -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;
|
|
@@ -48,6 +48,7 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
+
EmptyBox
|
|
51
52
|
],
|
|
52
53
|
},
|
|
53
54
|
},
|
|
@@ -158,119 +159,135 @@ const GraphSection = {
|
|
|
158
159
|
|
|
159
160
|
export const buildPropertiesSection = function (type: String) {
|
|
160
161
|
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"])
|
|
162
|
+
switch (type) {
|
|
163
|
+
case "Text":
|
|
164
|
+
uiSchema.elements = [
|
|
165
|
+
getInputField("placeholder", "Placeholder"),
|
|
166
|
+
EmptyBox,
|
|
167
|
+
getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
|
|
168
|
+
]
|
|
169
|
+
break;
|
|
170
|
+
case "TextArea":
|
|
171
|
+
uiSchema.elements = [
|
|
172
|
+
getInputField("placeholder", "Placeholder"),
|
|
173
|
+
EmptyBox,]
|
|
174
|
+
break;
|
|
221
175
|
|
|
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
|
-
|
|
176
|
+
case "SpeedoMeter":
|
|
177
|
+
uiSchema.elements = [
|
|
178
|
+
getInputField("segments", "Segments Count"),
|
|
179
|
+
getInputField("heading", "Container Heading"),
|
|
180
|
+
getInputField("heading", "Container Heading"),
|
|
181
|
+
getInputField("speedoCaption", "Speedometer Caption"),
|
|
182
|
+
getInputField("width", "Speedometer Width")
|
|
183
|
+
]
|
|
184
|
+
break;
|
|
185
|
+
case "RankCard":
|
|
186
|
+
uiSchema.elements = [
|
|
187
|
+
getInputField("rank", "Rank"),
|
|
188
|
+
getInputField("image", "Image Url"),
|
|
189
|
+
getInputField("title", "Card Title"),
|
|
190
|
+
getInputField("description", "Card Description")];
|
|
191
|
+
break;
|
|
192
|
+
case "LeaderBoard":
|
|
193
|
+
uiSchema.elements = [
|
|
194
|
+
getInputField("valueLabel", "Value Label"),
|
|
195
|
+
getInputField("firstImage", "First Image url"),
|
|
196
|
+
getInputField("secondImage", "Second Image url"),
|
|
197
|
+
getInputField("thirdImage", "Third Image url"),
|
|
198
|
+
getTextArea("functionCode", "Write Compare Code", false)
|
|
199
|
+
];
|
|
200
|
+
break;
|
|
201
|
+
case "CardSlider":
|
|
202
|
+
uiSchema.elements = [getInputField("heading", "Heading"),
|
|
203
|
+
getInputField("iconName", "Icon Name")];
|
|
204
|
+
break;
|
|
205
|
+
case "ProgressBar":
|
|
206
|
+
case "ProgressBarCard":
|
|
207
|
+
uiSchema.elements = [
|
|
208
|
+
getInputField("heading", "Heading"),
|
|
209
|
+
getInputField("bottomLabel_1", "First BottomLabel"),
|
|
210
|
+
getInputField("bottomLabel_2", "Second BottomLabel"),
|
|
211
|
+
getInputField("bottomLabel_3", "Third BottomLabel")
|
|
212
|
+
];
|
|
213
|
+
break;
|
|
214
|
+
case "card":
|
|
215
|
+
uiSchema.elements = [
|
|
216
|
+
getInputField("url", "Image Url"),
|
|
217
|
+
getInputField("label", "Label"),
|
|
218
|
+
getInputField("description", "Description"),
|
|
219
|
+
EmptyBox
|
|
220
|
+
];
|
|
221
|
+
break;
|
|
222
|
+
case "Button":
|
|
223
|
+
uiSchema.elements = [
|
|
224
|
+
getSelectField("buttonType", "Button Type", []),
|
|
225
|
+
getSelectField("iconName", "Icon Name", []),
|
|
226
|
+
getSelectField("color", "Color", []),
|
|
227
|
+
getInputField("tooltipMessage", "Tooltip Message"),
|
|
228
|
+
getSelectField("defaultStyle", "Default Style", [
|
|
229
|
+
{ label: "Apply Default Style", value: "true" },
|
|
230
|
+
{ label: "No Style", value: "false" },
|
|
231
|
+
]),
|
|
232
|
+
EmptyBox
|
|
233
|
+
];
|
|
234
|
+
break;
|
|
235
|
+
case "Graph":
|
|
236
|
+
uiSchema.elements = [
|
|
237
|
+
getInputField("height", "Height"),
|
|
238
|
+
getInputField("heading", "Heading"),
|
|
239
|
+
getSelectField("graphType", "Graph Type", [
|
|
240
|
+
{ label: "Bar Graph", value: "BarGraph" },
|
|
241
|
+
{ label: "Stack Bar Graph", value: "StackBarGraph" },
|
|
242
|
+
{ label: "Line Graph", value: "LineGraph" },
|
|
243
|
+
{ label: "Pie Graph", value: "PieGraph" },
|
|
244
|
+
{ label: "Horizontal Bar Graph", value: "HorizontalBarGraph" },
|
|
245
|
+
]),
|
|
246
|
+
getInputField("leftLabel", "Left Label"),
|
|
247
|
+
getInputField("bottomLabel", "Bottom Label"),
|
|
248
|
+
getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
|
|
249
|
+
getArrayControl("legendLabels", "label"),
|
|
250
|
+
getArrayControl("pieArcColors", "color"),
|
|
251
|
+
];
|
|
252
|
+
break;
|
|
253
|
+
case "WrapperSection":
|
|
254
|
+
uiSchema.elements = [getRadioInputField("divider", "Divider", ["YES", "No"]), EmptyBox]
|
|
255
|
+
break;
|
|
274
256
|
|
|
257
|
+
case "TabSection":
|
|
258
|
+
uiSchema.elements = [
|
|
259
|
+
getArrayControl("sectionLabels", "label"),
|
|
260
|
+
]
|
|
261
|
+
break;
|
|
262
|
+
case "Table":
|
|
263
|
+
case "LazyLoadingTable":
|
|
264
|
+
uiSchema.elements = [
|
|
265
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
266
|
+
getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
|
|
267
|
+
getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
|
|
268
|
+
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
269
|
+
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
270
|
+
getInputField("selectKey", "Selection Key"),
|
|
271
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
272
|
+
]
|
|
273
|
+
break;
|
|
274
|
+
case "Radio":
|
|
275
|
+
uiSchema.elements = [
|
|
276
|
+
getArrayControl("sectionLabels", "label", "Options Of Radio"),
|
|
277
|
+
]
|
|
278
|
+
break;
|
|
279
|
+
case "Select":
|
|
280
|
+
uiSchema.elements = [
|
|
281
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
282
|
+
getRadioInputField("freeSolo", "FreeSolo", ["YES", "NO"]),
|
|
283
|
+
]
|
|
284
|
+
break;
|
|
285
|
+
case "MultipleSelect":
|
|
286
|
+
uiSchema.elements = [
|
|
287
|
+
getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
|
|
288
|
+
EmptyBox
|
|
289
|
+
]
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
275
292
|
return uiSchema;
|
|
276
293
|
};
|
|
@@ -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) => {
|