impaktapps-ui-builder 0.0.412-mtreemap.9 → 0.0.591

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 (53) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1082 -351
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +13 -13
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +1 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +2 -2
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +18 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -6
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -12
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +2 -2
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +6 -6
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +5 -0
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +58 -45
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +25 -1
  17. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -2
  18. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -1
  19. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +3 -1
  20. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +1 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +5 -5
  24. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +1 -1
  25. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
  26. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  27. package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +0 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +1 -5
  29. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +17 -1
  30. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +3 -2
  32. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +78 -33
  33. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +2 -7
  34. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +88 -90
  35. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +10 -0
  36. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +3 -3
  37. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +6 -55
  38. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -12
  39. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +6 -118
  40. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +82 -72
  41. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +5 -7
  42. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +93 -137
  43. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -2
  44. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +206 -74
  45. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +195 -120
  46. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -0
  47. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +118 -128
  48. package/src/impaktapps-ui-builder/builder/services/component.ts +26 -9
  49. package/src/impaktapps-ui-builder/builder/services/event.ts +17 -9
  50. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -2
  51. package/src/impaktapps-ui-builder/builder/services/utils.ts +0 -1
  52. package/src/impaktapps-ui-builder/runtime/services/events.ts +14 -20
  53. package/src/impaktapps-ui-builder/runtime/services/service.ts +128 -9
@@ -89,6 +89,118 @@ export default (funcParams: funcParamsProps) => {
89
89
  }
90
90
  const config = pageData?.config;
91
91
  const uiSchema = pageData?.uiSchema;
92
+ const event = new CustomEvent('pageNameChanged', {
93
+ detail: { pageName: config.label }
94
+ });
95
+ window.dispatchEvent(event)
96
+ const theme = funcParams?.store?.theme?.myTheme;
97
+ uiSchema.elements.push(
98
+
99
+ {
100
+ type: "HorizontalLayout",
101
+ config: {
102
+ main: {
103
+ direction: 'row'
104
+ },
105
+ style: {
106
+ flexDirection: "row",
107
+ position: "absolute",
108
+ bottom: 0,
109
+ marginBottom: '-8px',
110
+ height: 'fit-content',
111
+ overflow: 'hidden',
112
+ zIndex: 1000,
113
+ width: 'inherit'
114
+ }
115
+ },
116
+ elements: [
117
+ {
118
+
119
+ type: "Control",
120
+ scope: "#/properties/FooterText",
121
+ options: {
122
+ widget: "Box",
123
+ },
124
+ config: {
125
+ main: {
126
+ heading: "Copywriter@ACT21.IO"
127
+ },
128
+ style: {
129
+ color: theme?.palette?.text.disabled || "#AFAFAF",
130
+ fontSize: '12px',
131
+ textAlign: 'center',
132
+ lineHeight: 1,
133
+ width: 'fit-content',
134
+ left: '50%',
135
+ position: 'relative',
136
+ margin: 0,
137
+ flexGrow: 1,
138
+ height: 0
139
+ }
140
+ },
141
+ },
142
+ {
143
+ type: "Control",
144
+ scope: "#/properties/backIcon",
145
+ options: {
146
+ widget: "Box",
147
+ },
148
+ config: {
149
+ main: {
150
+ iconName: 'PrevIcon',
151
+ onClick: "backHandler",
152
+ width: 'fit-content',
153
+ },
154
+ style: {
155
+ fill: theme.palette.primary.main,
156
+ width: 20,
157
+ height: 0,
158
+ margin: 0,
159
+ top: 0,
160
+ right: '82px',
161
+ position: 'absolute',
162
+ fontSize: '12px',
163
+ cursor: 'pointer',
164
+ ':hover': {
165
+ fill: theme.palette.primary.dark,
166
+ }
167
+ }
168
+ }
169
+ },
170
+ {
171
+ type: "Control",
172
+ scope: "#/properties/text",
173
+
174
+ options: {
175
+ widget: "Box",
176
+ },
177
+ config: {
178
+ main: {
179
+ heading: "Previous Page",
180
+ onClick: "backHandler"
181
+ },
182
+ style: {
183
+ textAlign: 'left',
184
+ lineHeight: 1,
185
+ height: 0,
186
+ width: 'fit-content',
187
+ color: theme.palette.primary.main,
188
+ fontSize: "12px",
189
+ cursor: 'pointer',
190
+ marginLeft: '2px',
191
+ marginRight: 0,
192
+ top: 3,
193
+ right: '12px',
194
+ position: 'absolute',
195
+ ':hover': {
196
+ color: theme.palette.primary.dark,
197
+ }
198
+ }
199
+ },
200
+ },
201
+ ]
202
+ }
203
+ );
92
204
  const schema = pageData?.schema ?? { type: "object", properties: {} };
93
205
  eventGroups = {}
94
206
  eventGroups = extractEvents(config);
@@ -96,15 +208,13 @@ export default (funcParams: funcParamsProps) => {
96
208
  config: {}, componentName: "",
97
209
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
98
210
  functionsProvider: funcParams.functionsProvider,
99
- serviceHolder: this, eventGroups
211
+ serviceHolder: this, eventGroups, formDataHolder
100
212
  }
101
213
  await executeRefreshHandler({
102
214
  config: {}, componentName: "",
103
215
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
104
- serviceHolder: this, eventGroups,formDataHolder
216
+ serviceHolder: this, eventGroups, formDataHolder
105
217
  })
106
- const jsonres = await fetch('https://jsonplaceholder.typicode.com/todos/1');
107
- const result = await jsonres.json()
108
218
  funcParams.store.setSchema(
109
219
  (pre: any) => {
110
220
  return {
@@ -147,6 +257,16 @@ export default (funcParams: funcParamsProps) => {
147
257
  backHandler: function () {
148
258
  funcParams.store.navigate(-1)
149
259
  },
260
+ onRowMovement: async function (paginationValues) {
261
+ const apiBody = [
262
+ { key: "direction", value: paginationValues.rowMovement.direction },
263
+ { key: "movedRowId", value: paginationValues.rowMovement.movedRowId },
264
+ { key: "targetRowId", value: paginationValues.rowMovement.targetRowId || [] }
265
+ ]
266
+ await this.callExecuteEvents({ path: paginationValues?.path }, apiBody, "onRowMovement");
267
+ const response = await this.callExecuteEvents({ path: paginationValues?.path }, apiBody, "onLoad");
268
+ return response?.data;
269
+ },
150
270
  onPaginationChange: async function (paginationValues) {
151
271
  const apiBody = [
152
272
  { key: "size", value: paginationValues.pagination.pageSize },
@@ -155,7 +275,7 @@ export default (funcParams: funcParamsProps) => {
155
275
  { key: "filters", value: paginationValues.columnFilters || [] },
156
276
  { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
157
277
  ]
158
- const response = await this.updateConfigApiBody(paginationValues, apiBody);
278
+ const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
159
279
  return response?.data;
160
280
  },
161
281
  getSelectOptions: async function (param) {
@@ -164,7 +284,7 @@ export default (funcParams: funcParamsProps) => {
164
284
  { key: "searchValue", value: param.serachValue },
165
285
  { key: "currentValue", value: param.currentValue }
166
286
  ]
167
- const response = await this.updateConfigApiBody(param, apiBody);
287
+ const response = await this.callExecuteEvents(param, apiBody);
168
288
  return response?.data;
169
289
  }
170
290
  },
@@ -187,9 +307,9 @@ export default (funcParams: funcParamsProps) => {
187
307
  }))
188
308
  }
189
309
  },
190
- updateConfigApiBody: async function (paramValue, apiBody) {
310
+ callExecuteEvents: async function (paramValue, apiBody, eventType: string) {
191
311
  let LastCallResponse = undefined;
192
- for (const eventConfig of eventGroups?.onLoad[paramValue.path]) {
312
+ for (const eventConfig of eventGroups?.[eventType]?.[paramValue.path]) {
193
313
  if (eventConfig.body) {
194
314
  eventConfig.body = [
195
315
  ...eventConfig.body,
@@ -230,7 +350,6 @@ export default (funcParams: funcParamsProps) => {
230
350
  }
231
351
  },
232
352
  callHandler: async function (eventType: string, functionParameters?: any) {
233
- formDataHolder = {}
234
353
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
235
354
  if (eventGroups?.[eventType]?.[path] !== undefined) {
236
355
  Promise.all(eventGroups?.[eventType]?.[path].map((eventConfig) => {