impaktapps-ui-builder 0.0.382460 → 1.0.1-alpha.1

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.
Files changed (49) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1316 -1121
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +16 -16
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildPhoneInput.d.ts +1 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +62 -59
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +17 -21
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -2
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +23 -32
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -33
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.d.ts +20 -0
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +52 -38
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/styleSection.d.ts +7 -8
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +29 -33
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +6 -0
  17. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +56 -36
  18. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
  19. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
  20. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +8 -0
  21. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -0
  24. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +6 -1
  25. package/src/impaktapps-ui-builder/builder/build/buildPhoneInput.ts +26 -0
  26. package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
  27. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +42 -29
  28. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +111 -96
  29. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +113 -61
  30. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +8 -4
  31. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +108 -88
  32. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +39 -17
  33. package/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.ts +16 -0
  34. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +44 -44
  35. package/src/impaktapps-ui-builder/builder/build/uischema/styleSection.ts +9 -13
  36. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  37. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +40 -18
  38. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +73 -2
  39. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +63 -45
  40. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +51 -44
  41. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +232 -309
  42. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +166 -224
  43. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +15 -12
  44. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +147 -205
  45. package/src/impaktapps-ui-builder/builder/services/component.ts +228 -57
  46. package/src/impaktapps-ui-builder/builder/services/event.ts +182 -66
  47. package/src/impaktapps-ui-builder/builder/services/utils.ts +2 -2
  48. package/src/impaktapps-ui-builder/runtime/services/events.ts +32 -21
  49. package/src/impaktapps-ui-builder/runtime/services/service.ts +18 -29
@@ -9,28 +9,7 @@ export declare const TableSection: (theme: any) => {
9
9
  config: {
10
10
  main: {
11
11
  headerIcons: {
12
- elements: ({
13
- widget: {
14
- type: string;
15
- scope: string;
16
- options: {
17
- widget: string;
18
- };
19
- config: {
20
- main: {
21
- color: string;
22
- onClick: string;
23
- size: string;
24
- icon: string;
25
- iconLabel: string;
26
- styleDefault: boolean;
27
- };
28
- style: {
29
- mt: string;
30
- };
31
- };
32
- };
33
- } | {
12
+ elements: {
34
13
  widget: {
35
14
  type: string;
36
15
  scope: string;
@@ -44,14 +23,19 @@ export declare const TableSection: (theme: any) => {
44
23
  icon: string;
45
24
  iconLabel: string;
46
25
  styleDefault: boolean;
47
- color?: undefined;
48
26
  };
49
27
  style: {
50
28
  mt: string;
29
+ color: string;
30
+ fill: string;
31
+ "&:hover": {
32
+ color: string;
33
+ fill: string;
34
+ };
51
35
  };
52
36
  };
53
37
  };
54
- })[];
38
+ }[];
55
39
  };
56
40
  disableAction: boolean;
57
41
  disableSelection: boolean;
@@ -61,13 +45,15 @@ export declare const TableSection: (theme: any) => {
61
45
  elements: ({
62
46
  accessorKey: string;
63
47
  header: string;
48
+ type: string;
49
+ size: number;
64
50
  field?: undefined;
65
- flex?: undefined;
66
51
  widget?: undefined;
67
52
  } | {
68
53
  header: string;
69
54
  field: string;
70
- flex: number;
55
+ size: number;
56
+ type: string;
71
57
  widget: {
72
58
  type: string;
73
59
  scope: string;
@@ -77,14 +63,17 @@ export declare const TableSection: (theme: any) => {
77
63
  config: {
78
64
  main: {
79
65
  icon: string;
80
- color: string;
66
+ size: string;
81
67
  onClick: string;
82
68
  tooltipMessage: string;
83
69
  styleDefault?: undefined;
84
70
  disabled?: undefined;
85
71
  };
86
72
  style: {
87
- color: any;
73
+ fill: any;
74
+ "& :hover": {
75
+ fill: any;
76
+ };
88
77
  };
89
78
  };
90
79
  };
@@ -92,7 +81,8 @@ export declare const TableSection: (theme: any) => {
92
81
  } | {
93
82
  header: string;
94
83
  field: string;
95
- flex: number;
84
+ size: number;
85
+ type: string;
96
86
  widget: {
97
87
  type: string;
98
88
  scope: string;
@@ -102,20 +92,26 @@ export declare const TableSection: (theme: any) => {
102
92
  config: {
103
93
  main: {
104
94
  icon: string;
105
- color: string;
106
95
  onClick: string;
107
96
  tooltipMessage: string;
97
+ size?: undefined;
108
98
  styleDefault?: undefined;
109
99
  disabled?: undefined;
110
100
  };
111
- style?: undefined;
101
+ style: {
102
+ fill: any;
103
+ "& :hover": {
104
+ fill: any;
105
+ };
106
+ };
112
107
  };
113
108
  };
114
109
  accessorKey?: undefined;
115
110
  } | {
116
111
  header: string;
117
112
  field: string;
118
- flex: number;
113
+ size: number;
114
+ type: string;
119
115
  widget: {
120
116
  type: string;
121
117
  scope: string;
@@ -128,7 +124,7 @@ export declare const TableSection: (theme: any) => {
128
124
  onClick: string;
129
125
  styleDefault: boolean;
130
126
  disabled: boolean;
131
- color?: undefined;
127
+ size?: undefined;
132
128
  tooltipMessage?: undefined;
133
129
  };
134
130
  style?: undefined;
@@ -1,5 +1,11 @@
1
1
  export declare const ValidationSection: {
2
2
  type: string;
3
+ config: {
4
+ main: {
5
+ label: string;
6
+ gap: string;
7
+ };
8
+ };
3
9
  elements: {
4
10
  type: string;
5
11
  scope: string;
@@ -1,46 +1,66 @@
1
1
  export declare const ValueTab: {
2
2
  type: string;
3
+ config: {
4
+ main: {
5
+ label: string;
6
+ gap: string;
7
+ };
8
+ };
3
9
  elements: {
4
10
  type: string;
5
11
  scope: string;
6
- layout: number;
7
12
  options: {
8
- detail: {
9
- type: string;
10
- elements: ({
11
- type: string;
12
- scope: string;
13
- options: {
14
- widget: string;
15
- };
16
- config: {
17
- layout: {
18
- xs: number;
19
- sm: number;
20
- md: number;
21
- lg: number;
22
- };
23
- main: {
24
- label: string;
25
- };
26
- };
27
- } | {
28
- type: string;
29
- scope: string;
30
- options: {
31
- widget: string;
32
- };
33
- config: {
34
- layout: {
35
- xs: number;
36
- sm: number;
37
- md: number;
38
- lg: number;
39
- };
40
- main?: undefined;
41
- };
42
- })[];
13
+ widget: string;
14
+ };
15
+ config: {
16
+ layout: number;
17
+ main: {
18
+ label: string;
19
+ childElementLabel: string;
20
+ };
21
+ style: {
22
+ marginLeft: string;
23
+ marginBottom: string;
24
+ labelStyle: {
25
+ marginLeft: string;
26
+ };
27
+ detailsStyle: {
28
+ marginLeft: string;
29
+ };
43
30
  };
44
31
  };
32
+ elements: ({
33
+ type: string;
34
+ scope: string;
35
+ options: {
36
+ widget: string;
37
+ };
38
+ config: {
39
+ layout: {
40
+ xs: number;
41
+ sm: number;
42
+ md: number;
43
+ lg: number;
44
+ };
45
+ main: {
46
+ label: string;
47
+ };
48
+ };
49
+ } | {
50
+ type: string;
51
+ scope: string;
52
+ options: {
53
+ widget: string;
54
+ };
55
+ config: {
56
+ layout: {
57
+ xs: number;
58
+ sm: number;
59
+ md: number;
60
+ lg: number;
61
+ };
62
+ main?: undefined;
63
+ };
64
+ })[];
45
65
  }[];
46
66
  };
@@ -71,6 +71,12 @@ export declare const EventSchema: {
71
71
  RemoveItemButton: {
72
72
  disabled: boolean;
73
73
  };
74
+ pageName: {
75
+ path: {
76
+ label: string;
77
+ path: string;
78
+ }[];
79
+ };
74
80
  };
75
81
  required: string[];
76
82
  };
@@ -22,5 +22,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
22
22
  RemoveItemButton: (paramStore?: any) => void;
23
23
  elementPathHandler: (parentPath: string, rowId: any, elementType: string) => string;
24
24
  ElementPathSetter: (uiSchema: any, copiedFormData?: any) => void;
25
+ onNavigatePopupYes: () => void;
26
+ onNavigatePopupNo: () => void;
25
27
  };
26
28
  export default _default;
@@ -79,6 +79,12 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
79
79
  RemoveItemButton: {
80
80
  disabled: boolean;
81
81
  };
82
+ pageName: {
83
+ path: {
84
+ label: string;
85
+ path: string;
86
+ }[];
87
+ };
82
88
  };
83
89
  required: string[];
84
90
  };
@@ -92,5 +98,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
92
98
  deletePopUpEvent: () => void;
93
99
  copyPasteElement: () => void;
94
100
  RemoveItemButton: () => void;
101
+ onNavigatePopupYes: () => void;
102
+ onNavigatePopupNo: () => void;
95
103
  };
96
104
  export default _default;
@@ -5,6 +5,6 @@ export declare const getNavigationHistory: (config: any, path: string | undefine
5
5
  };
6
6
  export declare const saveFormdataInSessionStorage: (formData: any, path?: string) => any;
7
7
  export declare const getFormdataFromSessionStorage: (path?: string) => any;
8
- export declare function saveHandler(store: any, service: any, submitHandler: any, pageName?: string): Promise<void>;
8
+ export declare function saveHandler(store: any, service: any, submitHandler: any): Promise<void>;
9
9
  export declare const navigateHandler: (store: any, isSubmitted: any, pageName?: string | boolean) => void;
10
10
  export declare function okHandler(store: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.382460",
3
+ "version": "1.0.1-alpha.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -11,6 +11,7 @@ const TextField = {
11
11
  "widget": "InputField"
12
12
  },
13
13
  config:{
14
+ layout: { xs: 12, sm: 6, md: 4, lg: 4 },
14
15
  main:{
15
16
  label:"Adhaar Card",
16
17
  formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],
@@ -42,6 +43,7 @@ const PanField = {
42
43
  "widget": "InputField"
43
44
  },
44
45
  config:{
46
+ layout: { xs: 12, sm: 6, md: 4, lg: 4 },
45
47
  main:{
46
48
  label:"Pan Card",
47
49
  placeholder:"AAAAA0000A",
@@ -35,7 +35,12 @@ export const createLayoutFormat = (config: any[]) => {
35
35
  lg: 12,
36
36
  }
37
37
  }
38
- let data: any = {};
38
+ let data: any = {
39
+ xs: 12,
40
+ sm: 12,
41
+ md: 6,
42
+ lg: 6,
43
+ };
39
44
  config.map((e: any) => {
40
45
  data[e.key || "xs"] = +e.value || 5.5
41
46
  })
@@ -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
+ }
@@ -2,22 +2,25 @@ import _ from "lodash";
2
2
  import TextInputField from "./uischema/textInputField";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildTextField = (config:any,componentScope:string) =>{
6
- const inputField: any = _.cloneDeep(TextInputField);
7
- inputField.config.main.label = config.label;
8
- if (config.style) {
9
- inputField.config.style = JSON.parse(config.style)
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
- }
17
- if (config.layout) {
18
- inputField.config.layout = createLayoutFormat(config.layout)
19
- }
20
- inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
21
- inputField.scope = componentScope;
22
- return inputField;
5
+ export const buildTextField = (config: any, componentScope: string) => {
6
+ const inputField: any = _.cloneDeep(TextInputField);
7
+ inputField.config.main.label = config.label;
8
+ if (config.style) {
9
+ inputField.config.style = JSON.parse(config.style)
10
+ }
11
+ if (config.multiline) {
12
+ inputField.config.main.multiline = config.multiline === "YES" ? true : false;
13
+ }
14
+ if (config.InputFormatingAndMasking) {
15
+ inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
16
+ }
17
+ if (config.placeholder) {
18
+ inputField.config.main.placeholder = config.placeholder;
19
+ }
20
+ if (config.layout) {
21
+ inputField.config.layout = createLayoutFormat(config.layout)
22
+ }
23
+ inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
24
+ inputField.scope = componentScope;
25
+ return inputField;
23
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";
@@ -14,7 +12,7 @@ import { buildWrapperSection } from "./buildWrapperSection";
14
12
  import { buildTextField } from "./buildText";
15
13
  import { buildSelect } from "./buildSelect";
16
14
  import { buildButton } from "./buildButton";
17
- import { buildTable } from "./buildTable";
15
+ import { buildTable } from "./buildTable";
18
16
  import { buildLabel } from "./buildLabel";
19
17
  import { buildUploadFile } from "./buildUplaodFile";
20
18
  import { buildDownloadFile } from "./buildDownloadFile";
@@ -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,9 @@ 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);
311
+ break;
310
312
  default:
311
313
  schema = {
312
314
  type: "object",
@@ -336,53 +338,64 @@ const buildUiSchema = (config: any, store?: any) => {
336
338
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
337
339
  }
338
340
  })
339
- }
340
- else if (config.type == "Table") {
341
+ } else if (config.type == "Table") {
341
342
  const sizeMap = {}
342
- const filterMap = {}
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
- if(config.enableColumnFilter){
349
- config.enableColumnFilter.map((e)=>{
350
- filterMap[e.keyName] = true
351
- })
352
- }
353
- elements.elements = config.elements.map((cellElem, elemInd) => {
349
+ const tableHeaderElements = [];
350
+ const tableActionElement = [];
351
+ const rowElements = []
352
+ config.elements.filter((cellElem, elemInd) => {
353
+ const commonProperties = {
354
+ accessorKey: cellElem.name,
355
+ type: cellElem.columnFormat,
356
+ header: cellElem.label || cellElem.name,
357
+ size: sizeMap[cellElem.name] || 180,
358
+ enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
359
+ columnFilterModeOptions: cellElem.filteringOptions,
360
+ enableSorting: cellElem.enableSorting === "No" ? false : true,
361
+ columnKey: cellElem.columnKey
362
+ }
354
363
  if (cellElem.type) {
355
- return {
356
- accessorKey: cellElem.name,
357
- header: cellElem.label || cellElem.name,
358
- size: sizeMap[cellElem.name] || 180,
359
- type: cellElem.columnFormat,
364
+ if (cellElem.elementType == "action") {
365
+ const actionElem = buildUiSchema(cellElem, store);
366
+ tableActionElement.push(actionElem);
367
+ return false;
368
+ }
369
+ if (cellElem.elementType == "tableHeader") {
370
+ const headerElem = buildUiSchema(cellElem, store);
371
+ tableHeaderElements.push({widget:headerElem});
372
+ return false;
373
+ }
374
+ const tableElem = {
360
375
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
361
376
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
362
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
363
- columnFilterModeOptions: config.filteringOptions
377
+ ...commonProperties
378
+
364
379
  }
380
+ rowElements.push(tableElem)
365
381
  } else {
366
- return {
367
- accessorKey: cellElem.name,
368
- type: cellElem.columnFormat,
369
- header: cellElem.label || cellElem.name,
370
- size: sizeMap[cellElem.name] || 180,
371
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
372
- columnFilterModeOptions: config.filteringOptions
373
- }
382
+ rowElements.push({ ...commonProperties })
374
383
  }
375
384
 
376
385
  })
386
+ elements.elements = rowElements;
387
+ elements.config.action = tableActionElement;
388
+ elements.config.main.headerIcons.elements = tableHeaderElements;
377
389
  }
390
+
378
391
  else if (config.type == "Array") {
379
392
  elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
380
- return buildUiSchema(e,store)
393
+ return buildUiSchema(e, store)
381
394
  });
382
395
  }
383
396
  else {
384
397
  elements.elements = config.elements.map((e: any, elemInd: number) => {
385
- return buildUiSchema(e,store)
398
+ return buildUiSchema(e, store)
386
399
  });
387
400
  }
388
401
  }