impaktapps-ui-builder 1.0.4 → 1.0.9-4.card.2

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 (80) hide show
  1. package/dist/impaktapps-ui-builder.es.js +704 -684
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +14 -14
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +9 -2
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +6 -1
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +2 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +18 -50
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  17. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  18. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +14 -65
  19. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  20. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  21. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +1 -0
  22. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -0
  23. package/package.json +1 -1
  24. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
  25. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +31 -15
  26. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +1 -1
  27. package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +20 -16
  29. package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +2 -2
  30. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +6 -0
  31. package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +1 -0
  32. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +4 -1
  33. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +1 -1
  34. package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
  35. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +35 -0
  36. package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
  37. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +1 -1
  38. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +1 -1
  39. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -0
  40. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +1 -1
  41. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +2 -2
  42. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  43. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
  44. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +1 -1
  45. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +3 -0
  46. package/src/impaktapps-ui-builder/builder/build/buildText.ts +6 -0
  47. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +2 -2
  48. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +1 -1
  49. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +2 -1
  50. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +27 -14
  51. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
  52. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  53. package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
  54. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +4 -2
  55. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +146 -130
  56. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  57. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +5 -3
  58. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +58 -119
  59. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
  60. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  61. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +30 -54
  62. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +3 -3
  63. package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
  64. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -2
  65. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  66. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  67. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  68. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +29 -54
  69. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  70. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  71. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  72. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +1 -0
  73. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +51 -15
  74. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +60 -118
  75. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -1
  76. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +77 -106
  77. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +9 -4
  78. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +31 -55
  79. package/src/impaktapps-ui-builder/builder/services/component.ts +10 -4
  80. package/src/impaktapps-ui-builder/runtime/services/service.ts +22 -118
@@ -15,13 +15,14 @@ const sectionLabels = {
15
15
  Table: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
16
16
  LeaderBoard: ["Core", "Components", "Properties", "Events", "Style", "Validation"],
17
17
  WrapperSection: ["Core", "Components", "Properties", "Style", "Validation"],
18
+ HorizontalLayout: ["Core", "Components", "Properties", "Style", "Validation"],
18
19
  TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
19
20
  SpeedoMeter: ["Core", "Properties", "Events", "Style", "Validation"],
20
21
  card: ["Core", "Properties", "Events", "Style", "Validation"],
21
22
  UploadFile: ["Core", "Events", "Style", "Validation"],
22
23
  Graph: ["Core", "Properties", "Events", "Style", "Validation"],
23
24
  DownloadFile: ["Core", "Events", "Style", "Validation"],
24
- Box: ["Core", "Events", "Style", "Validation"],
25
+ Box: ["Core", "Properties" , "Events", "Style", "Validation"],
25
26
  Properties: ["Core", "Properties", "Events", "Style", "Validation"],
26
27
  ProgressBarCard: ["Core", "Properties", "Events", "Style", "Validation"],
27
28
  RankCard: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -29,7 +30,7 @@ const sectionLabels = {
29
30
  Timer: ["Core", "Events", "Style", "Validation"],
30
31
  Rank: ["Core", "Events", "Style", "Validation"],
31
32
  Button: ["Core", "Properties", "Events", "Style", "Validation"],
32
- Array: ["Core", "Components", "Validation"],
33
+ Array: ["Core", "Components", "Properties","Validation"],
33
34
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
34
35
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
35
36
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -39,7 +40,12 @@ const sectionLabels = {
39
40
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
40
41
  TreeMap: ["Core", "Components", "Properties", "Events", "Style"],
41
42
  ColumnGroup: ["Core", "Components"],
42
- Thought: ["Core", "Properties", "Events", "Style", "Validation"]
43
+ Thought: ["Core", "Properties", "Events", "Style", "Validation"],
44
+ Date: ["Core", "Properties", "Events", "Style", "Validation"],
45
+ DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
46
+ Image: ["Core", "Properties","Style"],
47
+ FileInput: ["Core","Properties","Events", "Style", "Validation"],
48
+
43
49
  }
44
50
 
45
51
  export function refreshPage(type: string, store: any) {
@@ -67,7 +73,7 @@ export function refreshPage(type: string, store: any) {
67
73
 
68
74
  const parentObj = _.get(currentConfig, parentPath)
69
75
 
70
- if(parentObj?.type === "Table"){
76
+ if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
71
77
  UiSchema.elements[0].elements[0].elements[4] =
72
78
  {
73
79
  type: "Control",
@@ -19,7 +19,8 @@ interface funcParamsProps {
19
19
  service: any,
20
20
  userValue: any,
21
21
  pageDataProvider: any,
22
- functionsProvider?: Record<string, any>
22
+ functionsProvider?: Record<string, any>,
23
+ initFormData?: any
23
24
  }
24
25
  let pageData: any = false;
25
26
  export const extractEvents = (eventConfig: any) => {
@@ -71,7 +72,7 @@ export default (funcParams: funcParamsProps) => {
71
72
  return {
72
73
  setPage: async function () {
73
74
  funcParams.store.setAdditionalErrors([]);
74
- funcParams.store.setFormdata({});
75
+ funcParams.store.setFormdata(funcParams?.initFormData() || {});
75
76
  funcParams.store.setSchema({ type: "object", properties: {} });
76
77
  funcParams.store.newData = {};
77
78
  eventGroups = {};
@@ -79,116 +80,10 @@ export default (funcParams: funcParamsProps) => {
79
80
  const config = pageData?.config;
80
81
  const uiSchema = pageData?.uiSchema;
81
82
  const event = new CustomEvent('pageNameChanged', {
82
- detail: { pageName: config.label }
83
+ detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
83
84
  });
84
85
  window.dispatchEvent(event)
85
86
  const theme = funcParams?.store?.theme?.myTheme;
86
- uiSchema.elements.push(
87
- {
88
- type: "HorizontalLayout",
89
- config: {
90
- main: {
91
- direction: "row",
92
- },
93
- style: {
94
- flexDirection: "row",
95
- position: "absolute",
96
- bottom: 0,
97
- height: "fit-content",
98
- overflow: "hidden",
99
- zIndex: 1000,
100
- width: "inherit",
101
- },
102
- },
103
- elements: [
104
- {
105
- type: "Control",
106
- scope: "#/properties/FooterText",
107
- options: {
108
- widget: "Box",
109
- },
110
- config: {
111
- main: {
112
- heading: "Copywriter@ACT21.IO",
113
- },
114
- style: {
115
- color: theme?.palette?.text?.disabled || "#AFAFAF",
116
- fontSize: "11px",
117
- textAlign: "center",
118
- lineHeight: 2,
119
- width: "fit-content",
120
- left: "50%",
121
- position: "relative",
122
- margin: 0,
123
- flexGrow: 1,
124
- height: 0,
125
- transform: "translate(-50%, 0%)",
126
- },
127
- },
128
- },
129
- {
130
- type: "Control",
131
- scope: "#/properties/FooterBackIcon",
132
- options: {
133
- widget: "Box",
134
- },
135
- config: {
136
- main: {
137
- iconName: "PrevIcon",
138
- onClick: "backHandler",
139
- width: "fit-content",
140
- },
141
- style: {
142
- fill: theme?.palette?.primary?.main,
143
- width: 20,
144
- height: 0,
145
- top: 0,
146
- right: { xs: "12px", sm: "84px" },
147
- position: "absolute",
148
- fontSize: "12px",
149
- cursor: "pointer",
150
- ":hover": {
151
- fill: theme?.palette?.primary?.dark,
152
- },
153
- marginRight: "20px",
154
- },
155
- },
156
- },
157
- {
158
- type: "Control",
159
- scope: "#/properties/FooterBackHandlerText",
160
- options: {
161
- widget: "Box",
162
- },
163
- config: {
164
- main: {
165
- heading: "Previous Page",
166
- onClick: "backHandler",
167
- },
168
- style: {
169
- display: { xs: "none", sm: "flex" },
170
- textAlign: "left",
171
- lineHeight: 1,
172
- height: 0,
173
- width: "fit-content",
174
- color: theme?.palette?.primary?.main,
175
- fontSize: "12px",
176
- cursor: "pointer",
177
- marginLeft: "2px",
178
-
179
- top: 3,
180
- right: "12px",
181
- position: "absolute",
182
- ":hover": {
183
- color: theme?.palette?.primary?.dark,
184
- },
185
- marginRight: "4px",
186
- },
187
- },
188
- },
189
- ],
190
- }
191
- );
192
87
  const schema = pageData?.schema ?? { type: "object", properties: {} };
193
88
  eventGroups = extractEvents(config);
194
89
  executeEventsParameters = {
@@ -197,11 +92,7 @@ export default (funcParams: funcParamsProps) => {
197
92
  functionsProvider: funcParams.functionsProvider,
198
93
  serviceHolder: this, eventGroups, formDataHolder
199
94
  }
200
- await executeRefreshHandler({
201
- config: {}, componentName: "",
202
- store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
203
- serviceHolder: this, eventGroups, formDataHolder: {}
204
- })
95
+
205
96
  funcParams.store.setSchema(
206
97
  (pre: any) => {
207
98
  return {
@@ -210,6 +101,12 @@ export default (funcParams: funcParamsProps) => {
210
101
  }
211
102
  }
212
103
  )
104
+ await executeRefreshHandler({
105
+ config: {}, componentName: "",
106
+ store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
107
+ serviceHolder: this, eventGroups, formDataHolder: {}
108
+ })
109
+
213
110
  uiSchema.elements.push(notifyUiSchema);
214
111
  funcParams.store.setUiSchema(uiSchema);
215
112
  },
@@ -233,6 +130,12 @@ export default (funcParams: funcParamsProps) => {
233
130
  onClick: function () {
234
131
  this.callHandler("onClick")
235
132
  },
133
+ onKeyDown: function () {
134
+ this.callHandler("onKeyDown")
135
+ },
136
+ onFileDelete: async function () {
137
+ this.callHandler("onFileDelete")
138
+ },
236
139
  onMount: function () {
237
140
  this.callHandler("onMount")
238
141
  },
@@ -261,7 +164,8 @@ export default (funcParams: funcParamsProps) => {
261
164
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
262
165
  { key: "sorting", value: paginationValues.sorting || [] },
263
166
  { key: "filters", value: paginationValues.tableColumnConfig || [] },
264
- { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
167
+ { key: "globalFilter", value: paginationValues.globalFilter ?? '' },
168
+ { key: "expandedRowIds", value: paginationValues.expandedRowIds ?? []}
265
169
  ]
266
170
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
267
171
  return response?.data;
@@ -297,8 +201,8 @@ export default (funcParams: funcParamsProps) => {
297
201
  },
298
202
  callExecuteEvents: async function (paramValue, apiBody, eventType: string) {
299
203
  let LastCallResponse = undefined;
300
- const eventsGroupClone = _.cloneDeep(eventGroups)
301
- for (const eventConfig of eventsGroupClone?.[eventType]?.[paramValue.path]) {
204
+ const cloneEventGroup = _.cloneDeep(eventGroups)
205
+ for (const eventConfig of cloneEventGroup?.[eventType]?.[paramValue.path]) {
302
206
  if (eventConfig.body) {
303
207
  eventConfig.body = [
304
208
  ...eventConfig.body,
@@ -339,7 +243,7 @@ export default (funcParams: funcParamsProps) => {
339
243
  }
340
244
  },
341
245
  callHandler: async function (eventType: string, functionParameters?: any) {
342
- const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
246
+ const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
343
247
  if (eventGroups?.[eventType]?.[path] !== undefined) {
344
248
  Promise.all(eventGroups?.[eventType]?.[path].map((eventConfig) => {
345
249
  executeEventsParameters.store.functionParameters = functionParameters