impaktapps-ui-builder 0.0.284 → 0.0.286

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 (23) hide show
  1. package/dist/impaktapps-ui-builder.es.js +214 -291
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +12 -12
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +4 -4
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +2 -1
  8. package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +11 -0
  9. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -1
  10. package/package.json +1 -1
  11. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +18 -16
  12. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +17 -14
  13. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
  14. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +34 -20
  15. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  16. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +36 -36
  17. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +1 -1
  18. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +10 -10
  19. package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
  20. package/src/impaktapps-ui-builder/builder/services/event.ts +2 -2
  21. package/src/impaktapps-ui-builder/runtime/services/events.ts +56 -135
  22. package/src/impaktapps-ui-builder/runtime/services/interface.ts +11 -0
  23. package/src/impaktapps-ui-builder/runtime/services/service.ts +54 -31
@@ -24,8 +24,8 @@ export declare const getTextArea: (scope: string, heading: string, hideButton: b
24
24
  };
25
25
  };
26
26
  export declare const getSelectField: (scope: string, label: string, options: {
27
- title: string;
28
- const: string;
27
+ label: string;
28
+ value: string;
29
29
  }[]) => {
30
30
  type: string;
31
31
  scope: string;
@@ -43,8 +43,8 @@ export declare const getSelectField: (scope: string, label: string, options: {
43
43
  label: string;
44
44
  type: string;
45
45
  options: {
46
- title: string;
47
- const: string;
46
+ label: string;
47
+ value: string;
48
48
  }[];
49
49
  };
50
50
  };
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  main: {
15
15
  label: string;
16
16
  type: string;
17
+ freeSole: boolean;
17
18
  };
18
19
  };
19
20
  };
@@ -1,4 +1,5 @@
1
- export declare const executeEvents: (config: any, componentName: string, store: any, dynamicData: any, userValue: any, service: any, serviceHolder: any, eventGroups?: any, parentEventOutput?: any) => Promise<any>;
1
+ import { handlersProps } from "./interface";
2
+ export declare const executeEvents: (params: handlersProps) => Promise<any>;
2
3
  export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
3
4
  body: any;
4
5
  headers: any;
@@ -0,0 +1,11 @@
1
+ export interface handlersProps {
2
+ config: any;
3
+ componentName: string;
4
+ store: any;
5
+ dynamicData: any;
6
+ userValue: any;
7
+ service: any;
8
+ serviceHolder: any;
9
+ eventGroups?: any;
10
+ parentEventOutput?: any;
11
+ }
@@ -11,7 +11,7 @@ interface funcParamsProps {
11
11
  declare const _default: (funcParams: funcParamsProps) => {
12
12
  setPage: () => Promise<void>;
13
13
  onClick: () => Promise<void>;
14
- onPaginationChange: (paginationValues: any) => Promise<void>;
14
+ onPaginationChange: (paginationValues: any) => Promise<any>;
15
15
  onChange: () => Promise<void>;
16
16
  downloadFile: (obj: any) => void;
17
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.284",
3
+ "version": "0.0.286",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -2,21 +2,23 @@ import MultipleSelect from "./uischema/multiSelect";
2
2
  import _ from "lodash";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildMultiSelect = (config,componentScope) =>{
6
- const multipleSelect: any = _.cloneDeep(MultipleSelect);
7
- multipleSelect.scope = componentScope;
8
- if (config.label) {
9
-
10
- multipleSelect.config.main.label = config.label;
11
- }
12
- if(config.layout){
13
- multipleSelect.config.layout = createLayoutFormat(config.layout)
14
- }
15
- if(config.value){
16
- const options = config.value.map((e:any)=>{
17
- return {title:e.label,const:e.value}
18
- });
19
- multipleSelect.config.main.options = options??[];
5
+ export const buildMultiSelect = (config, componentScope) => {
6
+ const multipleSelect: any = _.cloneDeep(MultipleSelect);
7
+ multipleSelect.scope = componentScope;
8
+ if (config.label) {
9
+
10
+ multipleSelect.config.main.label = config.label;
11
+ }
12
+ if (config.layout) {
13
+ multipleSelect.config.layout = createLayoutFormat(config.layout)
14
+ }
15
+ if (config.value) {
16
+ multipleSelect.config.main.options = config.value;
17
+ }
18
+ if (config.lazyLoading) {
19
+ multipleSelect.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
20
20
  }
21
- return multipleSelect;
21
+
22
+
23
+ return multipleSelect;
22
24
  }
@@ -2,18 +2,21 @@ import SelectInputField from "./uischema/selectInputField";
2
2
  import _ from "lodash";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildSelect = (config:any,componentScope:string) =>{
6
- const selectInputField:any = _.cloneDeep(SelectInputField);
7
- selectInputField.config.main.label = config.label;
8
- if(config.value){
9
- const options = config.value.map((e:any)=>{
10
- return {title:e.label,const:e.value}
11
- });
12
- selectInputField.config.main.options = options;
13
- };
14
- if(config.layout){
15
- selectInputField.config.layout = createLayoutFormat(config.layout)
16
- }
17
- selectInputField.scope = componentScope;
18
- return selectInputField;
5
+ export const buildSelect = (config: any, componentScope: string) => {
6
+ const selectInputField: any = _.cloneDeep(SelectInputField);
7
+ selectInputField.config.main.label = config.label;
8
+ if (config.value) {
9
+ selectInputField.config.main.options = config.value;
10
+ };
11
+ if (config.freeSolo) {
12
+ selectInputField.config.main.freeSolo = config.freeSolo === "YES" ? true : false;;
13
+ }
14
+ if (config.lazyLoading) {
15
+ selectInputField.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
16
+ }
17
+ if (config.layout) {
18
+ selectInputField.config.layout = createLayoutFormat(config.layout)
19
+ }
20
+ selectInputField.scope = componentScope;
21
+ return selectInputField;
19
22
  }
@@ -9,6 +9,9 @@ export const buildTable = (config: any, componentScope: string) => {
9
9
  if (config.style) {
10
10
  table.config.style = JSON.parse(config.style)
11
11
  }
12
+ if (config.lazyLoading) {
13
+ table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
14
+ }
12
15
  if (config.SelectionAvailable) {
13
16
  table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
14
17
  };
@@ -131,7 +131,7 @@ export const getTextArea = (scope: string, heading: string, hideButton: boolean,
131
131
  },
132
132
  }
133
133
  }
134
- export const getSelectField = (scope: string, label: string, options: { title: string, const: string }[]) => {
134
+ export const getSelectField = (scope: string, label: string, options: { label: string, value: string }[]) => {
135
135
  return {
136
136
  type: "Control",
137
137
  scope: `#/properties/${scope}`,
@@ -198,8 +198,8 @@ export const buildPropertiesSection = function (type: String) {
198
198
  else if (type === "Box") {
199
199
  const iconName = getInputField("value", "Value");
200
200
  uiSchema.elements = [getSelectField("graphType", "Label Type", [
201
- { title: "URL", const: "url" },
202
- { title: "Heading", const: "heading" }
201
+ { label: "URL", value: "url" },
202
+ { label: "Heading", value: "heading" }
203
203
  ]), iconName];
204
204
  }
205
205
  else if (type === "Button") {
@@ -207,13 +207,13 @@ export const buildPropertiesSection = function (type: String) {
207
207
  const size = getInputField("size", "Size");
208
208
  const iconName = getInputField("iconName", "Icon Name");
209
209
  uiSchema.elements = [getSelectField("buttonType", "Button Type", [
210
- { title: "Button With Text", const: "Button" },
211
- { title: "Button With Icon", const: "IconButton" },
212
- { title: "Button With Icon and Text", const: "ButtonWithIconAndText" },
210
+ { label: "Button With Text", value: "Button" },
211
+ { label: "Button With Icon", value: "IconButton" },
212
+ { label: "Button With Icon and Text", value: "ButtonWithIconAndText" },
213
213
  ]), iconName, size, caption,
214
214
  getSelectField("defaultStyle", "Default Style", [
215
- { title: "Apply Default Style", const: "true" },
216
- { title: "No Style", const: "false" },
215
+ { label: "Apply Default Style", value: "true" },
216
+ { label: "No Style", value: "false" },
217
217
  ]),
218
218
  JSON.parse(JSON.stringify(EmptyBox))
219
219
  ];
@@ -228,11 +228,11 @@ export const buildPropertiesSection = function (type: String) {
228
228
  heading,
229
229
  height,
230
230
  getSelectField("graphType", "Graph Type", [
231
- { title: "Bar Graph", const: "BarGraph" },
232
- { title: "Stack Bar Graph", const: "StackBarGraph" },
233
- { title: "Line Graph", const: "LineGraph" },
234
- { title: "Pie Graph", const: "PieGraph" },
235
- { title: "Horizontal Bar Graph", const: "HorizontalBarGraph" },
231
+ { label: "Bar Graph", value: "BarGraph" },
232
+ { label: "Stack Bar Graph", value: "StackBarGraph" },
233
+ { label: "Line Graph", value: "LineGraph" },
234
+ { label: "Pie Graph", value: "PieGraph" },
235
+ { label: "Horizontal Bar Graph", value: "HorizontalBarGraph" },
236
236
  ]),
237
237
  leftLabel,
238
238
  bottomLabel,
@@ -248,19 +248,33 @@ export const buildPropertiesSection = function (type: String) {
248
248
  getArrayControl("sectionLabels", "label"),
249
249
  ]
250
250
  }
251
- else if(type === "Table"||type === "LazyLoadingTable"){
252
- uiSchema.elements =[
253
- getRadioInputField("SelectionAvailable","Selection Available",["YES","NO"]),
254
- getRadioInputField("ColumnResizingAvailable","ColumnResizing Available",["YES","NO"]),
255
- getRadioInputField("DragAvailable","Drag Available",["YES","NO"]),
256
- getInputField("selectKey","Selection Key")
251
+ else if (type === "Table" || type === "LazyLoadingTable") {
252
+ uiSchema.elements = [
253
+ getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
254
+ getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
255
+ getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
256
+ getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
257
+ getInputField("selectKey", "Selection Key"),
258
+ EmptyBox
257
259
  ]
258
- }
260
+ }
259
261
  else if (type === "Radio") {
260
262
  uiSchema.elements = [
261
263
  getArrayControl("sectionLabels", "label", "Options Of Radio"),
262
264
  ]
263
265
  }
266
+ else if (type === "Select") {
267
+ uiSchema.elements = [
268
+ getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
269
+ getRadioInputField("freeSolo", "FreeSolo", ["YES", "NO"]),
270
+ ]
271
+ }
272
+ else if (type === "MultipleSelect") {
273
+ uiSchema.elements = [
274
+ getRadioInputField("lazyLoading", "Lazy Loading", ["YES", "NO"]),
275
+ EmptyBox
276
+ ]
277
+ }
264
278
 
265
279
  return uiSchema;
266
280
  };
@@ -15,7 +15,7 @@ export default {
15
15
  main: {
16
16
  label: "",
17
17
  type: "text",
18
- // options: [{}],
18
+ freeSole:false
19
19
  },
20
20
  },
21
21
  };
@@ -102,34 +102,34 @@ export const componentBasicUiSchema: any = {
102
102
  main: {
103
103
  label: "Type",
104
104
  options: [
105
- { title: "Select", const: "Select" },
106
- { title: "Date", const: "Date" },
107
- { title: "CheckBox", const: "CheckBox" },
108
- { title: "Table", const: "Table" },
109
- { title: "Lazy Loading Table", const: "LazyLoadingTable" },
110
- { title: "Array", const: "Array" },
111
- { title: "Container", const: "WrapperSection" },
112
- { title: "Tabs", const: "TabSection" },
113
- { title: "Text", const: "Text" },
114
- { title: "Radio", const: "Radio" },
115
- { title: "Text Area", const: "TextArea" },
116
- { title: "Button", const: "Button" },
117
- { title: "Card", const: "card" },
118
- { title: "Rank", const: "Rank" },
119
- { title: "SpeedoMeter", const: "SpeedoMeter" },
120
- { title: "ProgressBar", const: "ProgressBar" },
121
- { title: "Graph", const: "Graph" },
122
- { title: "Label", const: "Box" },
123
- { title: "Upload File", const: "UploadFile" },
124
- { title: "Download File", const: "DownloadFile" },
125
- { title: "Empty Box", const: "EmptyBox" },
126
- { title: "ProgressBar Card", const: "ProgressBarCard" },
127
- { title: "Rank Card", const: "RankCard" },
128
- { title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
129
- { title: "Slider", const: "Slider" },
130
- { title: "Timer", const: "Timer" },
131
- { title: "MultipleSelect", const: "MultipleSelect" },
132
- { title: "LeaderBoard", const: "LeaderBoard" }
105
+ { label: "Select", value: "Select" },
106
+ { label: "Date", value: "Date" },
107
+ { label: "CheckBox", value: "CheckBox" },
108
+ { label: "Table", value: "Table" },
109
+ { label: "Lazy Loading Table", value: "LazyLoadingTable" },
110
+ { label: "Array", value: "Array" },
111
+ { label: "Container", value: "WrapperSection" },
112
+ { label: "Tabs", value: "TabSection" },
113
+ { label: "Text", value: "Text" },
114
+ { label: "Radio", value: "Radio" },
115
+ { label: "Text Area", value: "TextArea" },
116
+ { label: "Button", value: "Button" },
117
+ { label: "Card", value: "card" },
118
+ { label: "Rank", value: "Rank" },
119
+ { label: "SpeedoMeter", value: "SpeedoMeter" },
120
+ { label: "ProgressBar", value: "ProgressBar" },
121
+ { label: "Graph", value: "Graph" },
122
+ { label: "Label", value: "Box" },
123
+ { label: "Upload File", value: "UploadFile" },
124
+ { label: "Download File", value: "DownloadFile" },
125
+ { label: "Empty Box", value: "EmptyBox" },
126
+ { label: "ProgressBar Card", value: "ProgressBarCard" },
127
+ { label: "Rank Card", value: "RankCard" },
128
+ { label: "Runner Boy Progress Bar", value: "RunnerBoyProgressBar" },
129
+ { label: "Slider", value: "Slider" },
130
+ { label: "Timer", value: "Timer" },
131
+ { label: "MultipleSelect", value: "MultipleSelect" },
132
+ { label: "LeaderBoard", value: "LeaderBoard" }
133
133
  ],
134
134
  },
135
135
  },
@@ -213,10 +213,10 @@ export const componentBasicUiSchema: any = {
213
213
  main: {
214
214
  label: "Screen Size",
215
215
  options: [
216
- { title: "Extra Small", const: "xs" },
217
- { title: "Small", const: "sm" },
218
- { title: "Medium", const: "md" },
219
- { title: "Large", const: "lg" },
216
+ { label: "Extra Small", value: "xs" },
217
+ { label: "Small", value: "sm" },
218
+ { label: "Medium", value: "md" },
219
+ { label: "Large", value: "lg" },
220
220
  ],
221
221
  },
222
222
  },
@@ -238,10 +238,10 @@ export const componentBasicUiSchema: any = {
238
238
  main: {
239
239
  label: "Value",
240
240
  options: [
241
- { title: "3", const: "3" },
242
- { title: "5.5", const: "5.5" },
243
- { title: "8", const: "8" },
244
- { title: "12", const: "12" },
241
+ { label: "3", value: "3" },
242
+ { label: "5.5", value: "5.5" },
243
+ { label: "8", value: "8" },
244
+ { label: "12", value: "12" },
245
245
  ],
246
246
  },
247
247
  },
@@ -88,7 +88,7 @@ export const PageMasterUiSchema: any = {
88
88
  main: {
89
89
  label: "Template",
90
90
  programType: true,
91
- options: [{ title: "Basic Template", const: 1 }],
91
+ options: [{ label: "Basic Template", value: 1 }],
92
92
 
93
93
  required: true,
94
94
  },
@@ -103,22 +103,22 @@ export const EventUiSchema: any = {
103
103
  label: "Event Type",
104
104
  type: "text",
105
105
  options: [
106
- { title: "Click Event", const: "onClick" },
107
- { title: "onStart", const: "onStart" },
108
- { title: "Load Event", const: "onLoad" },
109
- { title: "Change Event", const: "onChange" },
110
- { title: "Success", const: "Success" },
111
- { title: "Fail", const: "Fail" }
106
+ { label: "Click Event", value: "onClick" },
107
+ { label: "onStart", value: "onStart" },
108
+ { label: "Load Event", value: "onLoad" },
109
+ { label: "Change Event", value: "onChange" },
110
+ { label: "Success", value: "Success" },
111
+ { label: "Fail", value: "Fail" }
112
112
  ]
113
113
 
114
114
  },
115
115
  },
116
116
  },
117
117
  getSelectField("Handler", "Handler", [
118
- { title: "Custom", const: "custom" },
119
- { title: "Api", const: "api" },
120
- { title: "Inbuilt Function", const: "inBuiltFunction" },
121
- { title: "Refresh", const: "refresh" },
118
+ { label: "Custom", value: "custom" },
119
+ { label: "Api", value: "api" },
120
+ { label: "Inbuilt Function", value: "inBuiltFunction" },
121
+ { label: "Refresh", value: "refresh" },
122
122
  ]),
123
123
  ],
124
124
  },
@@ -10,8 +10,8 @@ import { TableSection } from "../build/uischema/tableSection";
10
10
  import { ValueTab } from "../build/uischema/valueTab";
11
11
  import { ValidationSection } from "../build/uischema/validationSections";
12
12
  const sectionLabels = {
13
- Select: ["Core", "Value", "style", "Event","Validation"],
14
- MultipleSelect: ["Core", "Value", "style", "Event","Validation"],
13
+ Select: ["Core", "Properties","Value", "style", "Event","Validation"],
14
+ MultipleSelect: ["Core", "Properties","Value", "style", "Event","Validation"],
15
15
  Table: ["Core", "Components", "Properties","style", "Event","Validation"],
16
16
  LazyLoadingTable:["Core", "Components", "Properties", "style", "Event","Validation"],
17
17
  LeaderBoard: ["Core", "Components", "Properties", "style", "Event","Validation"],
@@ -29,8 +29,8 @@ export default (
29
29
 
30
30
  } else if (handlerType === "inBuiltFunction") {
31
31
  uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
32
- { title: "RankProvider", const: "RankProvider" },
33
- { title: "Download File", const: "downloadFile" },
32
+ { label: "RankProvider", value: "RankProvider" },
33
+ { label: "Download File", value: "downloadFile" },
34
34
  ])
35
35
  uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 })
36
36
  } else if (handlerType === "refresh") {