impaktapps-ui-builder 0.0.101-alpha.266 → 0.0.101-alpha.268
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 +47 -39
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +13 -13
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPhoneInput.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.d.ts +20 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +0 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPhoneInput.ts +26 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +13 -28
- package/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +0 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -9
- package/src/impaktapps-ui-builder/builder/services/component.ts +7 -10
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildPhoneInputField: (config: any, componentScope: string) => any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const PhoneInput: {
|
|
2
|
+
scope: string;
|
|
3
|
+
type: string;
|
|
4
|
+
options: {
|
|
5
|
+
widget: string;
|
|
6
|
+
};
|
|
7
|
+
config: {
|
|
8
|
+
layout: {
|
|
9
|
+
xs: number;
|
|
10
|
+
sm: number;
|
|
11
|
+
md: number;
|
|
12
|
+
lg: number;
|
|
13
|
+
};
|
|
14
|
+
main: {
|
|
15
|
+
defaultCountry: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default PhoneInput;
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import PhoneInput from "./uischema/phoneInput";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildPhoneInputField = (config: any, componentScope: string) => {
|
|
6
|
+
const phonInputField: any = _.cloneDeep(PhoneInput);
|
|
7
|
+
phonInputField.config.main.label = config.label;
|
|
8
|
+
if (config.style) {
|
|
9
|
+
phonInputField.config.style = JSON.parse(config.style)
|
|
10
|
+
}
|
|
11
|
+
// if (config.multiline) {
|
|
12
|
+
// phonInputField.config.main.multiline = config.multiline === "YES" ? true : false;
|
|
13
|
+
// }
|
|
14
|
+
if (config.InputFormatingAndMasking) {
|
|
15
|
+
phonInputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
|
|
16
|
+
}
|
|
17
|
+
if (config.placeholder) {
|
|
18
|
+
phonInputField.config.main.placeholder = config.placeholder;
|
|
19
|
+
}
|
|
20
|
+
if (config.layout) {
|
|
21
|
+
phonInputField.config.layout = createLayoutFormat(config.layout)
|
|
22
|
+
}
|
|
23
|
+
phonInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
24
|
+
phonInputField.scope = componentScope;
|
|
25
|
+
return phonInputField;
|
|
26
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
-
import emptyBox from "./uischema/emptyBox";
|
|
3
|
-
import cardSlider from "./uischema/cardSlider";
|
|
4
2
|
import { buildLeaderBoard } from "./buildLeaderboard";
|
|
5
3
|
import { buildProgressBarCard } from "./buildProgressBarCard";
|
|
6
4
|
import { buildProgressBar } from "./buildProgressBar";
|
|
@@ -40,6 +38,7 @@ import { buildDataGrid } from "./buildDataGrid";
|
|
|
40
38
|
import { buildInputSlider } from "./buildInputSlider";
|
|
41
39
|
import { buildTreeMap } from "./buildTreeMap";
|
|
42
40
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
41
|
+
import { buildPhoneInputField } from "./buildPhoneInput";
|
|
43
42
|
export let schema = {
|
|
44
43
|
type: "object",
|
|
45
44
|
properties: {},
|
|
@@ -307,6 +306,8 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
307
306
|
case "Thought":
|
|
308
307
|
elements = buildThoughtOfTheDay(config, componentScope);
|
|
309
308
|
break;
|
|
309
|
+
case "PhoneInput":
|
|
310
|
+
elements = buildPhoneInputField(config, componentScope);
|
|
310
311
|
break;
|
|
311
312
|
default:
|
|
312
313
|
schema = {
|
|
@@ -337,56 +338,40 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
337
338
|
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
|
|
338
339
|
}
|
|
339
340
|
})
|
|
340
|
-
}
|
|
341
|
+
} else if (config.type == "Table") {
|
|
341
342
|
const sizeMap = {}
|
|
342
|
-
|
|
343
|
+
|
|
343
344
|
if (config.sizeHolder) {
|
|
344
345
|
config.sizeHolder.map((e, i) => {
|
|
345
346
|
sizeMap[e.keyName] = e.value
|
|
346
347
|
});
|
|
347
348
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
const rowElements = []
|
|
351
|
-
config.elements.filter((cellElem, elemInd) => {
|
|
349
|
+
|
|
350
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
352
351
|
const commonProperties = {
|
|
353
352
|
accessorKey: cellElem.name,
|
|
354
353
|
type: cellElem.columnFormat,
|
|
355
354
|
header: cellElem.label || cellElem.name,
|
|
356
355
|
size: sizeMap[cellElem.name] || 180,
|
|
357
|
-
enableColumnFilter: cellElem.enableFilter === "No"
|
|
356
|
+
enableColumnFilter: cellElem.enableFilter === "No"?false:true,
|
|
358
357
|
columnFilterModeOptions: cellElem.filteringOptions,
|
|
359
358
|
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
360
359
|
columnKey: cellElem.columnKey
|
|
361
360
|
}
|
|
362
361
|
if (cellElem.type) {
|
|
363
|
-
|
|
364
|
-
const actionElem = buildUiSchema(cellElem, store);
|
|
365
|
-
tableActionElement.push(actionElem);
|
|
366
|
-
return false;
|
|
367
|
-
}
|
|
368
|
-
if (cellElem.elementType == "tableHeader") {
|
|
369
|
-
const headerElem = buildUiSchema(cellElem, store);
|
|
370
|
-
tableHeaderElements.push({widget:headerElem});
|
|
371
|
-
return false;
|
|
372
|
-
}
|
|
373
|
-
const tableElem = {
|
|
362
|
+
return {
|
|
374
363
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
375
364
|
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
|
|
376
365
|
...commonProperties
|
|
377
|
-
|
|
366
|
+
|
|
378
367
|
}
|
|
379
|
-
rowElements.push(tableElem)
|
|
380
368
|
} else {
|
|
381
|
-
|
|
369
|
+
return commonProperties
|
|
382
370
|
}
|
|
383
|
-
|
|
371
|
+
|
|
384
372
|
})
|
|
385
|
-
elements.elements = rowElements;
|
|
386
|
-
elements.config.action = tableActionElement;
|
|
387
|
-
elements.config.main.headerIcons.elements = tableHeaderElements;
|
|
388
373
|
}
|
|
389
|
-
|
|
374
|
+
|
|
390
375
|
else if (config.type == "Array") {
|
|
391
376
|
elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
|
|
392
377
|
return buildUiSchema(e, store)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const PhoneInput = {
|
|
2
|
+
scope: "#/properties/testPhone",
|
|
3
|
+
type: "Control",
|
|
4
|
+
options: {
|
|
5
|
+
widget: "PhoneInput"
|
|
6
|
+
},
|
|
7
|
+
config: {
|
|
8
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
9
|
+
main: {
|
|
10
|
+
defaultCountry: "in",
|
|
11
|
+
label: "Phone"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default PhoneInput;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//headerIcons //action //elements
|
|
2
1
|
export const ComponentSchema: any = {
|
|
3
2
|
type: "object",
|
|
4
3
|
properties: {
|
|
@@ -41,14 +40,8 @@ export const ComponentSchema: any = {
|
|
|
41
40
|
{ title: "Upload", const: "UploadFile" },
|
|
42
41
|
{ title: "Tree ", const: "TreeMap" },
|
|
43
42
|
{ title: "Column Group", const: "ColumnGroup" },
|
|
44
|
-
{ title: "Thought of the day", const: "Thought" }
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
elementType: {
|
|
48
|
-
oneOf: [
|
|
49
|
-
{ title: "Table Action Element", const: "action" },
|
|
50
|
-
{ title: "Table Header Element", const: "tableHeader" },
|
|
51
|
-
{ title: "Table Element", const: "element" },
|
|
43
|
+
{ title: "Thought of the day", const: "Thought" },
|
|
44
|
+
{ title: "Phone Input", const: "PhoneInput" }
|
|
52
45
|
]
|
|
53
46
|
},
|
|
54
47
|
columnFormat: {
|
|
@@ -143,19 +143,16 @@ export function refreshPage(type: string, store: any) {
|
|
|
143
143
|
},
|
|
144
144
|
},
|
|
145
145
|
UiSchema.elements[0].elements[0].elements[9] =
|
|
146
|
-
|
|
146
|
+
{
|
|
147
147
|
type: "Control",
|
|
148
|
-
scope: "#/properties/
|
|
149
|
-
options: {
|
|
150
|
-
widget: "SelectInputField",
|
|
151
|
-
},
|
|
148
|
+
scope: "#/properties/proc",
|
|
152
149
|
config: {
|
|
153
|
-
layout: { xs:
|
|
154
|
-
main: {
|
|
155
|
-
label: "Element Type",
|
|
156
|
-
},
|
|
150
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 0 },
|
|
157
151
|
},
|
|
158
|
-
|
|
152
|
+
options: {
|
|
153
|
+
widget: "EmptyBox",
|
|
154
|
+
},
|
|
155
|
+
};
|
|
159
156
|
}
|
|
160
157
|
|
|
161
158
|
if (sessionStorage.getItem("copiedConfig") ) {
|
|
@@ -78,7 +78,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
78
78
|
setPage: async function () {
|
|
79
79
|
funcParams.store.setAdditionalErrors([]);
|
|
80
80
|
funcParams.store.setFormdata({});
|
|
81
|
-
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
82
81
|
funcParams.store.newData = {};
|
|
83
82
|
const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData")
|
|
84
83
|
if (pageBasicDetailString) {
|
|
@@ -286,7 +285,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
286
285
|
{ key: "searchValue", value: param.serachValue },
|
|
287
286
|
{ key: "currentValue", value: param.currentValue }
|
|
288
287
|
]
|
|
289
|
-
const response = await this.callExecuteEvents(param, apiBody
|
|
288
|
+
const response = await this.callExecuteEvents(param, apiBody);
|
|
290
289
|
return response?.data;
|
|
291
290
|
}
|
|
292
291
|
},
|