impaktapps-ui-builder 1.0.50-alpha.10 → 1.0.50-alpha.20
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 +53 -79
- 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/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +1 -6
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -6
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +4 -16
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +2 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -60
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +27 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -11
- package/dist/src/impaktapps-ui-builder/builder/build/buildPhoneInput.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.d.ts +0 -20
- package/src/impaktapps-ui-builder/builder/build/buildPhoneInput.ts +0 -26
- package/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.ts +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: (FormData: any) => any;
|
|
2
2
|
export default _default;
|
|
3
|
-
export declare const createLayoutFormat: (
|
|
3
|
+
export declare const createLayoutFormat: (config: any[]) => any;
|
|
4
4
|
export declare const flatObjectValueInArray: (config?: any[]) => any[];
|
|
@@ -5,7 +5,6 @@ interface funcParamsProps {
|
|
|
5
5
|
userValue: any;
|
|
6
6
|
pageDataProvider: any;
|
|
7
7
|
functionsProvider?: Record<string, any>;
|
|
8
|
-
setExternaldata?: any;
|
|
9
8
|
}
|
|
10
9
|
export declare const extractEvents: (eventConfig: any) => any;
|
|
11
10
|
declare const _default: (funcParams: funcParamsProps) => {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ const TextField = {
|
|
|
11
11
|
"widget": "InputField"
|
|
12
12
|
},
|
|
13
13
|
config:{
|
|
14
|
-
layout: { xs:
|
|
14
|
+
layout: { xs: 12, sm: 6, md: 4, lg: 4 },
|
|
15
15
|
main:{
|
|
16
16
|
label:"Adhaar Card",
|
|
17
17
|
formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],
|
|
@@ -43,7 +43,7 @@ const PanField = {
|
|
|
43
43
|
"widget": "InputField"
|
|
44
44
|
},
|
|
45
45
|
config:{
|
|
46
|
-
layout: { xs:
|
|
46
|
+
layout: { xs: 12, sm: 6, md: 4, lg: 4 },
|
|
47
47
|
main:{
|
|
48
48
|
label:"Pan Card",
|
|
49
49
|
placeholder:"AAAAA0000A",
|
|
@@ -4,11 +4,11 @@ import { createLayoutFormat } from "./buildConfig";
|
|
|
4
4
|
const Checkbox = {
|
|
5
5
|
"type": "Control",
|
|
6
6
|
"scope": "#/properties/username1",
|
|
7
|
+
"layout": 12,
|
|
7
8
|
"options": {
|
|
8
9
|
"widget": "CheckBox"
|
|
9
10
|
},
|
|
10
11
|
"config": {
|
|
11
|
-
"layout": { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
12
12
|
"main": {
|
|
13
13
|
"label": "Welcome to Hyperform",
|
|
14
14
|
}
|
|
@@ -26,25 +26,13 @@ export default (FormData: any) => {
|
|
|
26
26
|
return component;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export const createLayoutFormat = (
|
|
30
|
-
if (_.isEmpty(
|
|
31
|
-
|
|
32
|
-
if(fullLayoutComponents.includes(type)){
|
|
33
|
-
return { xs: 12, sm: 12, md: 12, lg: 12 }
|
|
34
|
-
}
|
|
35
|
-
else if(type === "Graph"){
|
|
36
|
-
return {xs :12,sm:12,md:12,lg:6}
|
|
37
|
-
}
|
|
38
|
-
else if(type === "Button"){
|
|
39
|
-
return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
|
|
40
|
-
}
|
|
41
|
-
else{
|
|
42
|
-
return { xs: 6, sm: 6, md: 4, lg: 3 }
|
|
43
|
-
}
|
|
29
|
+
export const createLayoutFormat = (config: any[]) => {
|
|
30
|
+
if (_.isEmpty(config)) {
|
|
31
|
+
return { xs: 12, sm: 6, md: 4, lg: 3 }
|
|
44
32
|
}
|
|
45
33
|
let data: any = { };
|
|
46
34
|
|
|
47
|
-
|
|
35
|
+
config.map((e: any) => {
|
|
48
36
|
data[e.key || "xs"] = +e.value || 5.5;
|
|
49
37
|
|
|
50
38
|
})
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
+
import emptyBox from "./uischema/emptyBox";
|
|
3
|
+
import cardSlider from "./uischema/cardSlider";
|
|
2
4
|
import { buildLeaderBoard } from "./buildLeaderboard";
|
|
3
5
|
import { buildProgressBarCard } from "./buildProgressBarCard";
|
|
4
6
|
import { buildProgressBar } from "./buildProgressBar";
|
|
@@ -38,7 +40,6 @@ import { buildDataGrid } from "./buildDataGrid";
|
|
|
38
40
|
import { buildInputSlider } from "./buildInputSlider";
|
|
39
41
|
import { buildTreeMap } from "./buildTreeMap";
|
|
40
42
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
41
|
-
import { buildPhoneInputField } from "./buildPhoneInput";
|
|
42
43
|
export let schema = {
|
|
43
44
|
type: "object",
|
|
44
45
|
properties: {},
|
|
@@ -306,8 +307,6 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
306
307
|
case "Thought":
|
|
307
308
|
elements = buildThoughtOfTheDay(config, componentScope);
|
|
308
309
|
break;
|
|
309
|
-
case "PhoneInput":
|
|
310
|
-
elements = buildPhoneInputField(config, componentScope);
|
|
311
310
|
break;
|
|
312
311
|
default:
|
|
313
312
|
schema = {
|
|
@@ -26,66 +26,6 @@ export const emptyBox = (scope: string, layout?: any) => {
|
|
|
26
26
|
},
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
// const cardLayout = {
|
|
30
|
-
// type: "Control",
|
|
31
|
-
// scope: "#/properties/cardLayout",
|
|
32
|
-
// options: {
|
|
33
|
-
// widget: "Array",
|
|
34
|
-
// },
|
|
35
|
-
// config: {
|
|
36
|
-
// layout: 12,
|
|
37
|
-
// main: {
|
|
38
|
-
// label: "Card Layout",
|
|
39
|
-
// childElementLabel: "Card Layout",
|
|
40
|
-
// },
|
|
41
|
-
// style: {
|
|
42
|
-
// marginLeft: "-24px",
|
|
43
|
-
// marginBottom: "24px !important",
|
|
44
|
-
// labelStyle: {
|
|
45
|
-
// marginLeft: "24px",
|
|
46
|
-
// },
|
|
47
|
-
// detailsStyle: {
|
|
48
|
-
// marginLeft: "24px",
|
|
49
|
-
// }
|
|
50
|
-
// }
|
|
51
|
-
// },
|
|
52
|
-
// elements: [
|
|
53
|
-
// {
|
|
54
|
-
// type: "Control",
|
|
55
|
-
// scope: "#/properties/key",
|
|
56
|
-
// options: {
|
|
57
|
-
// widget: "SelectInputField",
|
|
58
|
-
// },
|
|
59
|
-
// config: {
|
|
60
|
-
// layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
61
|
-
// main: {
|
|
62
|
-
// label: "Screen Size",
|
|
63
|
-
|
|
64
|
-
// },
|
|
65
|
-
// },
|
|
66
|
-
// },
|
|
67
|
-
// {
|
|
68
|
-
// type: "Control",
|
|
69
|
-
// scope: "#/properties/value",
|
|
70
|
-
|
|
71
|
-
// options: {
|
|
72
|
-
// widget: "InputField",
|
|
73
|
-
// },
|
|
74
|
-
// config: {
|
|
75
|
-
// layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
76
|
-
// main: {
|
|
77
|
-
// label: "Value",
|
|
78
|
-
// type: "number",
|
|
79
|
-
// // freeSolo:true,
|
|
80
|
-
// helperText: 'Number should be in range of 0 to 12',
|
|
81
|
-
// errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
|
|
82
|
-
|
|
83
|
-
// },
|
|
84
|
-
// },
|
|
85
|
-
// },
|
|
86
|
-
// emptyBox("cardEmpty")
|
|
87
|
-
// ],
|
|
88
|
-
// };
|
|
89
29
|
const cardLayout = {
|
|
90
30
|
type: "Control",
|
|
91
31
|
scope: "#/properties/cardLayout",
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
},
|
|
7
7
|
|
|
8
8
|
config: {
|
|
9
|
-
layout: { xs: 6, sm: 6, md: 4, lg:
|
|
9
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
10
10
|
main: {
|
|
11
11
|
label: "",
|
|
12
12
|
type: "date",
|
|
@@ -21,7 +21,7 @@ export const DateTime = {
|
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
config: {
|
|
24
|
-
layout: { xs: 6, sm: 6, md: 4, lg:
|
|
24
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
25
25
|
main: {
|
|
26
26
|
label: "DateTime",
|
|
27
27
|
type: "date",
|
|
@@ -13,7 +13,7 @@ export const uploadFile = {
|
|
|
13
13
|
"style": {
|
|
14
14
|
"backgroundColor": "none"
|
|
15
15
|
},
|
|
16
|
-
layout: { xs: 6, sm: 6, md: 4, lg:
|
|
16
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 }
|
|
17
17
|
},
|
|
18
18
|
"options": {
|
|
19
19
|
"widget": "UploadFile"
|
|
@@ -30,7 +30,7 @@ export const downloadFile = {
|
|
|
30
30
|
"style": {
|
|
31
31
|
"backgroundColor": "none"
|
|
32
32
|
},
|
|
33
|
-
layout: { xs: 12, sm: 6, md: 4, lg:
|
|
33
|
+
layout: { xs: 12, sm: 6, md: 4, lg: 4 }
|
|
34
34
|
},
|
|
35
35
|
"options": {
|
|
36
36
|
"widget": "DownloadFile"
|
|
@@ -41,8 +41,7 @@ export const ComponentSchema: any = {
|
|
|
41
41
|
{ title: "Upload", const: "UploadFile" },
|
|
42
42
|
{ title: "Tree ", const: "TreeMap" },
|
|
43
43
|
{ title: "Column Group", const: "ColumnGroup" },
|
|
44
|
-
{ title: "Thought of the day", const: "Thought" }
|
|
45
|
-
{ title: "Phone Input", const: "PhoneInput" }
|
|
44
|
+
{ title: "Thought of the day", const: "Thought" }
|
|
46
45
|
]
|
|
47
46
|
},
|
|
48
47
|
elementType: {
|
|
@@ -331,6 +330,32 @@ export const ComponentSchema: any = {
|
|
|
331
330
|
{ title: "Refresh Icon", const: "RefreshIcon" },
|
|
332
331
|
{ title: "Download Icon", const: "DownloadIcon" },
|
|
333
332
|
{ title: "Exception Icon", const: "ExceptionIcon" },
|
|
333
|
+
{ "title": "Alarm Icon", "const": "AlarmIcon" },
|
|
334
|
+
{ "title": "Click Icon", "const": "ClickIcon" },
|
|
335
|
+
{ "title": "Content Copy Icon", "const": "ContentCopyIcon" },
|
|
336
|
+
{ "title": "File Copy Icon", "const": "FileCopyIcon" },
|
|
337
|
+
{ "title": "Pause Icon", "const": "PauseIcon" },
|
|
338
|
+
{ "title": "Play Icon", "const": "PlayIcon" },
|
|
339
|
+
{ "title": "Close Icon", "const": "CloseIcon" },
|
|
340
|
+
{ "title": "Replay Icon", "const": "ReplayIcon" },
|
|
341
|
+
{ "title": "Delete Icon", "const": "DeleteIcon" },
|
|
342
|
+
{ "title": "Drafts Icon", "const": "DraftsIcon" },
|
|
343
|
+
{ "title": "Perm Phone Msg Icon", "const": "PermPhoneMsgIcon" },
|
|
344
|
+
{ "title": "Paste Icon", "const": "PasteIcon" },
|
|
345
|
+
{ "title": "Prev Icon", "const": "PrevIcon" },
|
|
346
|
+
{ "title": "Verified Icon", "const": "VerifiedIcon" },
|
|
347
|
+
{ "title": "Table Add Icon", "const": "TableAddIcon" },
|
|
348
|
+
{ "title": "Table Download Icon", "const": "TableDownloadIcon" },
|
|
349
|
+
{ "title": "Audit Trail Icon", "const": "AuditTrailIcon" },
|
|
350
|
+
{ "title": "View Component", "const": "View" },
|
|
351
|
+
{ "title": "Table Edit Icon", "const": "TableEditIcon" },
|
|
352
|
+
{ "title": "Maximize Icon", "const": "Maximize" },
|
|
353
|
+
{ "title": "Minimize Icon", "const": "Minimize" },
|
|
354
|
+
{ "title": "Subtract Icon", "const": "Subtract" },
|
|
355
|
+
{ "title": "Bin Icon", "const": "Bin" },
|
|
356
|
+
{ "title": "Export Icon", "const": "Export" },
|
|
357
|
+
{ "title": "Table Paste Icon", "const": "TablePaste" },
|
|
358
|
+
{ "title": "Clone Icon", "const": "CloneIcon" }
|
|
334
359
|
]
|
|
335
360
|
},
|
|
336
361
|
color: {
|
|
@@ -19,8 +19,7 @@ interface funcParamsProps {
|
|
|
19
19
|
service: any,
|
|
20
20
|
userValue: any,
|
|
21
21
|
pageDataProvider: any,
|
|
22
|
-
functionsProvider?: Record<string, any
|
|
23
|
-
setExternaldata?: any
|
|
22
|
+
functionsProvider?: Record<string, any>
|
|
24
23
|
}
|
|
25
24
|
let pageData: any = false;
|
|
26
25
|
export const extractEvents = (eventConfig: any) => {
|
|
@@ -66,7 +65,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
66
65
|
let executeEventsParameters: handlersProps = {
|
|
67
66
|
config: {}, componentName: "",
|
|
68
67
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
69
|
-
serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider },eventGroups,
|
|
68
|
+
serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider }, eventGroups,
|
|
70
69
|
functionsProvider: funcParams.functionsProvider, formDataHolder
|
|
71
70
|
};
|
|
72
71
|
return {
|
|
@@ -78,9 +77,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
78
77
|
eventGroups = {};
|
|
79
78
|
pageData = await funcParams.pageDataProvider();
|
|
80
79
|
const config = pageData?.config;
|
|
81
|
-
|
|
82
|
-
funcParams?.setExternaldata();
|
|
83
|
-
|
|
84
80
|
const uiSchema = pageData?.uiSchema;
|
|
85
81
|
const event = new CustomEvent('pageNameChanged', {
|
|
86
82
|
detail: { pageName: config.label }
|
|
@@ -194,19 +190,17 @@ export default (funcParams: funcParamsProps) => {
|
|
|
194
190
|
}
|
|
195
191
|
);
|
|
196
192
|
const schema = pageData?.schema ?? { type: "object", properties: {} };
|
|
197
|
-
|
|
198
|
-
console.log("newEventGroups", newEventGroups,eventGroups)
|
|
199
|
-
eventGroups = newEventGroups;
|
|
193
|
+
eventGroups = extractEvents(config);
|
|
200
194
|
executeEventsParameters = {
|
|
201
195
|
config: {}, componentName: "",
|
|
202
196
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
203
197
|
functionsProvider: funcParams.functionsProvider,
|
|
204
|
-
serviceHolder: this, eventGroups
|
|
198
|
+
serviceHolder: this, eventGroups, formDataHolder
|
|
205
199
|
}
|
|
206
200
|
await executeRefreshHandler({
|
|
207
201
|
config: {}, componentName: "",
|
|
208
202
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
209
|
-
serviceHolder: this, eventGroups
|
|
203
|
+
serviceHolder: this, eventGroups, formDataHolder: {}
|
|
210
204
|
})
|
|
211
205
|
funcParams.store.setSchema(
|
|
212
206
|
(pre: any) => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildPhoneInputField: (config: any, componentScope: string) => any;
|
|
@@ -1,20 +0,0 @@
|
|
|
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;
|
|
@@ -1,26 +0,0 @@
|
|
|
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,16 +0,0 @@
|
|
|
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;
|