impaktapps-ui-builder 1.0.320 → 1.0.330

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 (35) hide show
  1. package/dist/impaktapps-ui-builder.es.js +330 -43
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +8 -8
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.d.ts +1 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +25 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.d.ts +22 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +1 -1
  12. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -0
  13. package/package.json +1 -1
  14. package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +3 -3
  15. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +11 -7
  16. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +0 -2
  17. package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +3 -0
  18. package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +35 -0
  19. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
  20. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
  21. package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
  22. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +6 -3
  23. package/src/impaktapps-ui-builder/builder/build/buildText.ts +3 -0
  24. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +17 -0
  25. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +2 -0
  26. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +46 -15
  27. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
  28. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +16 -0
  29. package/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.ts +13 -0
  30. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  31. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
  32. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +20 -5
  33. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -4
  34. package/src/impaktapps-ui-builder/builder/services/component.ts +40 -8
  35. package/src/impaktapps-ui-builder/runtime/services/service.ts +32 -3
@@ -0,0 +1,18 @@
1
+ export default {
2
+ type: "Control",
3
+ scope: "#/properties/pdfviewer",
4
+ options: {
5
+ widget: "PdfViewer",
6
+ },
7
+ config: {
8
+ layout: {
9
+ xs: 12,
10
+ sm: 12,
11
+ md: 12,
12
+ lg: 12,
13
+ },
14
+ main: {
15
+ title: "PDF"
16
+ },
17
+ },
18
+ }
@@ -1,10 +1,10 @@
1
- export const TableSection = (theme) => {
1
+ export const TableSection = (theme,scopeName="elements") => {
2
2
  const uiSchema = {
3
3
  type: "HorizontalLayout",
4
4
  elements: [
5
5
  {
6
6
  type: "Control",
7
- scope: "#/properties/elements",
7
+ scope: `#/properties/${scopeName}`,
8
8
  options: {
9
9
  widget: "Table",
10
10
  },
@@ -15,8 +15,7 @@ export const TableSection = (theme) => {
15
15
  {
16
16
  widget: {
17
17
  type: "Control",
18
- scope: "#/properties/New_Record",
19
-
18
+ scope: `#/properties/${scopeName}_New_Record`,
20
19
  options: {
21
20
  widget: "IconButton",
22
21
  },
@@ -43,7 +42,7 @@ export const TableSection = (theme) => {
43
42
  {
44
43
  widget: {
45
44
  type: "Control",
46
- scope: "#/properties/Paste_Component",
45
+ scope: scopeName === "elements" ? `#/properties/Paste_Component` : `#/properties/Paste_TabsComponent`,
47
46
  options: {
48
47
  widget: "IconButton",
49
48
  },
@@ -109,7 +108,7 @@ export const TableSection = (theme) => {
109
108
  },
110
109
  {
111
110
  type: "Control",
112
- scope: "#/properties/Copy_Component",
111
+ scope: scopeName === "elements" ? `#/properties/Copy_Component` : `#/properties/Copy_TabsComponent`,
113
112
  options: {
114
113
  widget: "Button",
115
114
  },
@@ -40,7 +40,8 @@ export const ComponentSchema: any = {
40
40
  { title: "Rank", const: "Rank" },
41
41
  { title: "Rank Card", const: "RankCard" },
42
42
  { title: "Metric Card", const: "MetricCard" },
43
- { title: "Bow and Arrow", const: "RunnerBoyProgressBar" },
43
+ { title: "Hierarchy Chart", const: "HierarchyChart" },
44
+ { title: "Runner Boy", const: "RunnerBoyProgressBar" },
44
45
  { title: "Table", const: "Table" },
45
46
  { title: "Tabs", const: "TabSection" },
46
47
  { title: "Text", const: "Text" },
@@ -49,6 +50,7 @@ export const ComponentSchema: any = {
49
50
  { title: "Upload", const: "UploadFile" },
50
51
  { title: "Tree ", const: "TreeMap" },
51
52
  { title: "Thought of the day", const: "Thought" },
53
+ { title: "PDF", const: "PdfViewer" }
52
54
  ],
53
55
  },
54
56
  elementType: {
@@ -102,6 +104,13 @@ export const ComponentSchema: any = {
102
104
  { title: "Standard", const: "standard" },
103
105
  ],
104
106
  },
107
+ linkType:{
108
+ oneOf:[
109
+ { title: "Step", const: "step" },
110
+ { title: "Diagonal", const: "diagonal" },
111
+ { title: "Line", const: "line" },
112
+ ]
113
+ },
105
114
  positionVertical:{
106
115
  oneOf: [
107
116
  { title: "Top", const: "top" },
@@ -109,28 +118,28 @@ export const ComponentSchema: any = {
109
118
  { title: "Bottom", const: "bottom" }
110
119
  ],
111
120
  },
112
- positionHorizontal:{
121
+ positionHorizontal: {
113
122
  oneOf: [
114
123
  { title: "Left", const: "left" },
115
124
  { title: "Center", const: "center" },
116
125
  { title: "Right", const: "right" }
117
126
  ],
118
127
  },
119
- contentVertical:{
128
+ contentVertical: {
120
129
  oneOf: [
121
130
  { title: "Top", const: "top" },
122
131
  { title: "Center", const: "center" },
123
132
  { title: "Bottom", const: "bottom" }
124
133
  ],
125
134
  },
126
- contentHorizontal:{
135
+ contentHorizontal: {
127
136
  oneOf: [
128
137
  { title: "Left", const: "left" },
129
138
  { title: "Center", const: "center" },
130
139
  { title: "Right", const: "right" }
131
140
  ],
132
141
  },
133
- toolTipPosition:{
142
+ toolTipPosition: {
134
143
  oneOf: [
135
144
  { title: "Top", const: "top" },
136
145
  { title: "Left", const: "left" },
@@ -440,6 +449,7 @@ export const ComponentSchema: any = {
440
449
  const: "HorizontalStackBarGraph",
441
450
  },
442
451
  { title: "Area Graph", const: "AreaGraph" },
452
+ { title: "StackBar And Line Graph", const: "StackBarLineGraph" },
443
453
  ],
444
454
  },
445
455
  iconName: {
@@ -493,6 +503,11 @@ export const ComponentSchema: any = {
493
503
  { title: "Detail Icon", const: "DetailIcon" },
494
504
  { title: "Report View Icon", const: "ReportViewIcon" },
495
505
  { title: "Payout", const: "Payout" },
506
+ { title: "Info Outlined", const: "InfoOutlinedIcon" },
507
+ { title: "Territory Add", const: "TerritoryAdd" },
508
+ { title: "Territory Edit", const: "TerritoryEdit" },
509
+ { title: "Territory Delete", const: "TerritoryDelete" },
510
+ { title: "Git Compare", const: "GitCompare" },
496
511
  ],
497
512
  },
498
513
  color: {
@@ -1,5 +1,3 @@
1
- import { title } from "process";
2
-
3
1
  export const EventSchema = {
4
2
  type: "object",
5
3
  properties: {
@@ -55,9 +53,10 @@ export const EventSchema = {
55
53
  { title: "Row Movement", const: "onRowMovement" },
56
54
  { title: "Download", const: "onDownload" },
57
55
  { title: "Fail", const: "Fail" },
56
+ { title: "onClose", const: "onClose" },
58
57
  { title: "Key Down", const: "onKeyDown" },
59
-
60
-
58
+ { title: "Set Style", const: "setStyle" },
59
+ { title: "Expand Node", const: "onNodeExpandChange" },
61
60
  ]
62
61
  },
63
62
  Handler: {
@@ -16,7 +16,7 @@ const sectionLabels = {
16
16
  LeaderBoard: ["Core", "Components", "Properties", "Events", "Style",],
17
17
  WrapperSection: ["Core", "Components", "Properties", "Style",],
18
18
  HorizontalLayout: ["Core", "Components", "Properties", "Style",],
19
- TabSection: ["Core", "Components", "Properties", "Style", "Validation"],
19
+ TabSection: ["Core", "Components", "TabTitles", "Properties", "Style", "Validation"],
20
20
  SpeedoMeter: ["Core", "Properties", "Events", "Style",],
21
21
  card: ["Core", "Properties", "Events", "Style", "Validation"],
22
22
  UploadFile: ["Core", "Events", "Style", "Validation"],
@@ -28,6 +28,7 @@ const sectionLabels = {
28
28
  ProgressBar: ["Core", "Properties", "Events", "Style",],
29
29
  RankCard: ["Core", "Properties", "Events", "Style",],
30
30
  MetricCard: ["Core", "Properties", "Events", "Style", "Validation"],
31
+ HierarchyChart: ["Core","Components","Properties", "Events", "Style", "Validation"],
31
32
  Slider: ["Core", "Components", "Events", "Style", "Validation"],
32
33
  Timer: ["Core", "Events", "Style",],
33
34
  Rank: ["Core", "Events", "Style",],
@@ -37,8 +38,9 @@ const sectionLabels = {
37
38
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
38
39
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
39
40
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
40
- PopUp: ["Core", "Components", "Properties", "Style"],
41
+ PopUp: ["Core", "Components", "Properties", "Events", "Style"],
41
42
  PopOver: ["Core", "Components", "Properties", "Style"],
43
+ PdfViewer: ["Core", "Properties", "Style"],
42
44
  Stepper: ["Core", "Components", "Properties", "Events", "Style"],
43
45
  DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
44
46
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -52,7 +54,6 @@ const sectionLabels = {
52
54
  Camera: ["Core", "Properties", "Events", "Style", "Validation"],
53
55
  OTP_Input: ["Core", "Properties", "Events", "Style", "Validation"],
54
56
  }
55
-
56
57
  export function refreshPage(type: string, store: any) {
57
58
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
58
59
  const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
@@ -63,6 +64,7 @@ export function refreshPage(type: string, store: any) {
63
64
  Style: StyleSection,
64
65
  Events: EventSection(store.theme.myTheme),
65
66
  Components: TableSection(store.theme.myTheme),
67
+ TabTitles: TableSection(store.theme.myTheme, "tabLabelElements"),
66
68
  Properties: buildPropertiesSection(type),
67
69
  Validation: ValidationSection
68
70
  }
@@ -283,8 +285,12 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
283
285
  const id = store.searchParams?.get("id");
284
286
  saveFormdataInSessionStorage(store.ctx.core.data, path)
285
287
  if (path) {
286
- const path = store.searchParams?.get("path");
287
- const finalPath = `${path}.elements[${rowId}]`
288
+ let finalPath = `${path}`;
289
+ if (dynamicData?.path?.startsWith("tabLabel")) {
290
+ finalPath = `${finalPath}.tabLabelElements[${rowId}]`
291
+ } else {
292
+ finalPath = `${finalPath}.elements[${rowId}]`
293
+ }
288
294
  store.searchParams.set("path", finalPath)
289
295
  store.setSearchParams(store.searchParams)
290
296
  this.setPage()
@@ -295,7 +301,12 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
295
301
  deleteComponents: function (shouldUpdateDialog: boolean = true) {
296
302
  const path = store.searchParams?.get("path");
297
303
  const rowId = sessionStorage.getItem('rowId');
298
- store.formData.elements.splice(rowId, 1);
304
+ const isTabLabelElements = sessionStorage.getItem('isTabLabelElements') === "true";
305
+ if (isTabLabelElements) {
306
+ store.formData.tabLabelElements.splice(rowId, 1);
307
+ } else {
308
+ store.formData.elements.splice(rowId, 1);
309
+ }
299
310
  const response = saveFormdataInSessionStorage(store.ctx.core.data, path)
300
311
  const data = path ? _.get(response, path) : response;
301
312
  store.setFormdata(data);
@@ -303,6 +314,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
303
314
  store.updateDialog("popUpComponentSection");
304
315
  }
305
316
  sessionStorage.removeItem('rowId');
317
+ sessionStorage.removeItem('isTabLabelElements');
306
318
  },
307
319
  deleteEvent: function (shouldUpdateDialog: boolean = true) {
308
320
  const path = store.searchParams?.get("path");
@@ -321,9 +333,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
321
333
  if (!Array.isArray(store.formData.elements)) {
322
334
  store.formData.elements = []
323
335
  }
336
+ if (!Array.isArray(store.formData.tabLabelElements)) {
337
+ store.formData.tabLabelElements = []
338
+ }
324
339
  const path = store.searchParams?.get("path");
325
340
  saveFormdataInSessionStorage(store.ctx.core.data, path)
326
- const finalPath = `${path}.elements[${store.formData.elements.length}]`
341
+ let finalPath = `${path}`;
342
+ if (dynamicData.path.startsWith("tabLabel")) {
343
+ finalPath = `${finalPath}.tabLabelElements[${store.formData.tabLabelElements.length}]`
344
+ } else {
345
+ finalPath = `${finalPath}.elements[${store.formData.elements.length}]`
346
+ }
327
347
  store.searchParams.set("path", finalPath)
328
348
  store.setSearchParams(store.searchParams)
329
349
  this.setPage()
@@ -355,6 +375,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
355
375
  deletePopUpComponent: function () {
356
376
  const rowId = dynamicData.path.split(".")[1];
357
377
  sessionStorage.setItem('rowId', rowId);
378
+ sessionStorage.setItem('isTabLabelElements', dynamicData.path.startsWith("tabLabel") ? "true" : "false");
358
379
  store.updateDialog("popUpComponentSection");
359
380
  },
360
381
  deletePopUpEvent: function () {
@@ -401,9 +422,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
401
422
  if (!Array.isArray(store.formData.events)) {
402
423
  store.formData.events = []
403
424
  }
425
+ if (!Array.isArray(store.formData.tabLabelElements)) {
426
+ store.formData.tabLabelElements = []
427
+ }
404
428
  saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
405
429
  const formData = getFormdataFromSessionStorage(pastedElementParentPath);
406
- const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
430
+ const currentLength = {
431
+ "TabsComponent": formData.tabLabelElements.length,
432
+ "Component": formData.elements.length,
433
+ "Events": formData.events.length
434
+ };
435
+ const insertElementIndex = currentLength[elementType] || 0;
407
436
  const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
408
437
 
409
438
  const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
@@ -440,6 +469,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
440
469
  elementPathHandler: function (parentPath: string, rowId: any, elementType: string) {
441
470
  if (elementType === "Component") {
442
471
  return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
472
+ }
473
+ if(elementType === "TabsComponent"){
474
+ return `${parentPath}.tabLabelElements[${rowId}]`
443
475
  }
444
476
  return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
445
477
  },
@@ -101,6 +101,7 @@ export default (funcParams: funcParamsProps) => {
101
101
  }
102
102
  }
103
103
  )
104
+
104
105
  executeRefreshHandler({
105
106
  config: {}, componentName: "",
106
107
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
@@ -111,6 +112,24 @@ export default (funcParams: funcParamsProps) => {
111
112
  funcParams.store.setUiSchema(uiSchema);
112
113
  });
113
114
  },
115
+ getStyle: () => {
116
+ const cloneEventGroup = _.cloneDeep(eventGroups)
117
+ if (cloneEventGroup.setStyle) {
118
+ let finalResponse = {};
119
+ const path = funcParams.dynamicData?.tableButtonPath || funcParams?.dynamicData.path?.split(".").pop();
120
+ if (cloneEventGroup?.setStyle?.[path]) {
121
+ for (const eventConfig of cloneEventGroup?.setStyle?.[path]) {
122
+ finalResponse = executeEvents({
123
+ ...executeEventsParameters,
124
+ config: eventConfig,
125
+ componentName: path
126
+ })
127
+ }
128
+ return finalResponse
129
+ }
130
+ }
131
+ return {}
132
+ },
114
133
  onCellRenderer: (cellParams) => {
115
134
  const cloneEventGroup = _.cloneDeep(eventGroups)
116
135
  if (cloneEventGroup.onCellRenderer) {
@@ -139,6 +158,9 @@ export default (funcParams: funcParamsProps) => {
139
158
  onFileDelete: async function () {
140
159
  this.callHandler("onFileDelete")
141
160
  },
161
+ onClose: function () {
162
+ this.callHandler("onClose")
163
+ },
142
164
  onMount: function () {
143
165
  this.callHandler("onMount")
144
166
  },
@@ -168,11 +190,19 @@ export default (funcParams: funcParamsProps) => {
168
190
  { key: "sorting", value: paginationValues.sorting || [] },
169
191
  { key: "filters", value: paginationValues.tableColumnConfig || [] },
170
192
  { key: "globalFilter", value: paginationValues.globalFilter ?? '' },
171
- { key: "expandedRowIds", value: paginationValues.expandedRowIds ?? [] }
193
+ { key: "parentIds", value: paginationValues.parentIds},
194
+ { key: "isExpandAll", value: paginationValues.isExpandAll},
172
195
  ]
173
196
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
174
197
  return response?.data;
175
198
  },
199
+ onNodeExpandChange: async function (param) {
200
+ const apiBody = [
201
+ { key: "expandedNodeId", value: param.expandedNodeId }
202
+ ]
203
+ const response = await this.callExecuteEvents(param, apiBody, "onNodeExpandChange");
204
+ return response?.data;
205
+ },
176
206
  getSelectOptions: async function (param) {
177
207
  if (param.serachValue !== "" && param.serachValue !== undefined) {
178
208
  const apiBody = [
@@ -190,8 +220,7 @@ export default (funcParams: funcParamsProps) => {
190
220
 
191
221
  const promises = ChangeEventsKeysArray.flatMap((componentName: string) => {
192
222
  if (
193
- funcParams.store?.formData[componentName] === funcParams.store.newData[componentName] ||
194
- funcParams.store?.newData[componentName] === undefined
223
+ funcParams.store?.formData[componentName] === funcParams.store.newData[componentName]
195
224
  ) {
196
225
  return [];
197
226
  }