impaktapps-ui-builder 0.0.392 → 0.0.393-alpha.3

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 (28) hide show
  1. package/dist/impaktapps-ui-builder.es.js +26 -102
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +9 -9
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.d.ts +0 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +0 -1
  7. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +0 -6
  8. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +0 -6
  9. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
  10. package/package.json +1 -1
  11. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +6 -8
  12. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -5
  13. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -4
  14. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -1
  15. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -9
  16. package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -1
  17. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +0 -1
  18. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -1
  19. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -8
  20. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +4 -8
  21. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -2
  22. package/src/impaktapps-ui-builder/builder/services/component.ts +0 -1
  23. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +4 -11
  24. package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
  25. package/src/impaktapps-ui-builder/runtime/services/events.ts +2 -2
  26. package/src/impaktapps-ui-builder/runtime/services/service.ts +6 -4
  27. package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +0 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +0 -46
@@ -7,7 +7,6 @@ declare const _default: {
7
7
  elements: any[];
8
8
  config: {
9
9
  main: {
10
- onMount: string;
11
10
  columns: {};
12
11
  };
13
12
  };
@@ -7,7 +7,6 @@ declare const _default: {
7
7
  elements: any[];
8
8
  config: {
9
9
  main: {
10
- onMount: string;
11
10
  allRowData: any[];
12
11
  downloadAllData: boolean;
13
12
  columns: {
@@ -22,12 +22,6 @@ export declare const PageMasterSchema: {
22
22
  };
23
23
  };
24
24
  };
25
- template: {
26
- oneOf: {
27
- const: string;
28
- title: string;
29
- }[];
30
- };
31
25
  sectionLabels: {
32
26
  type: string;
33
27
  items: {
@@ -33,12 +33,6 @@ declare const _default: (funcParams: funcParamsProps) => {
33
33
  };
34
34
  };
35
35
  };
36
- template: {
37
- oneOf: {
38
- const: string;
39
- title: string;
40
- }[];
41
- };
42
36
  sectionLabels: {
43
37
  type: string;
44
38
  items: {
@@ -11,7 +11,6 @@ interface funcParamsProps {
11
11
  declare const _default: (funcParams: funcParamsProps) => {
12
12
  setPage: () => Promise<void>;
13
13
  onClick: () => Promise<void>;
14
- onMount: () => Promise<void>;
15
14
  onFileDownload: () => Promise<void>;
16
15
  onFileUpload: () => Promise<void>;
17
16
  onPaginationChange: (paginationValues: any) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.392",
3
+ "version": "0.0.393-alpha.3",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -1,22 +1,20 @@
1
1
  import leaderBoard from "./uischema/leaderBoard";
2
- import buildUiSchema from "./buildUiSchema";
2
+ import buildUiSchema from "./buildUiSchema";
3
3
  import _ from "lodash";
4
- import { createLayoutFormat } from "./buildConfig";
5
4
 
6
5
 
7
6
  export const buildLeaderBoard = (config) => {
8
- const LeaderBoard: any = _.cloneDeep(leaderBoard)
7
+ const LeaderBoard:any = _.cloneDeep(leaderBoard)
9
8
  if (config.elements) {
10
9
  const modifyColumns = config.elements.map((e, i) => {
11
10
  if (!e.type) {
12
- return { accessorKey: e.name, header: e.label || e.name, }
11
+ return {accessorKey: e.name, header: e.label||e.name, }
13
12
  }
14
- const widgetSchema = { widget: buildUiSchema(e), accessorKey: e.name, header: e.label || e.name, };
15
- return { ...widgetSchema };
13
+ const widgetSchema = {widget:buildUiSchema(e), accessorKey: e.name,header: e.label||e.name, };
14
+ return {...widgetSchema };
16
15
  })
17
16
  LeaderBoard.elements[9].elements = modifyColumns;
18
17
  }
19
- LeaderBoard.config.main.label = config.label
20
18
  if (config.name) {
21
19
  LeaderBoard.elements[0].scope = `#/properties/${config.name}/properties/firstImage`;
22
20
  LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`
@@ -36,7 +34,7 @@ export const buildLeaderBoard = (config) => {
36
34
  LeaderBoard.elements[2].config.main.url = config.thirdImage;
37
35
  }
38
36
  if (config.layout) {
39
- LeaderBoard.config.layout = createLayoutFormat(config.layout);
37
+ LeaderBoard.config.layout = config.layout;
40
38
  }
41
39
  return LeaderBoard
42
40
  }
@@ -1,12 +1,9 @@
1
1
  import Tabsection from "./uischema/tabsection";
2
2
  import _ from "lodash";
3
-
3
+ import buildUiSchema from "./buildUiSchema";
4
+
4
5
  export const buildTabSection = (config:any,componentScope:string) => {
5
6
  const tab: any = _.cloneDeep(Tabsection);
6
- tab.scopeName = componentScope;
7
- if(config.orientation){
8
- tab.config.main.orientation = config.orientation === "YES" ?'vertical':'horizontal';
9
- }
10
7
  if (config.sectionLabels) {
11
8
  tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
12
9
  }
@@ -37,7 +37,6 @@ import { buildFileInput } from "./buildFileInput";
37
37
  import { buildStepper } from "./buildStepper";
38
38
  import { buildPopUp } from "./buildPop";
39
39
  import { buildDataGrid } from "./buildDataGrid";
40
- import { buildInputSlider } from "./buildInputSlider";
41
40
  export let schema = {
42
41
  type: "object",
43
42
  properties: {},
@@ -168,9 +167,6 @@ const buildUiSchema = (config: any) => {
168
167
  let elements: any = {};
169
168
  const componentScope = `#/properties/${config.name}`;
170
169
  switch (config.type) {
171
- case "InputSlider":
172
- elements = buildInputSlider(config, componentScope);
173
- break;
174
170
  case "DataGrid":
175
171
  elements = buildDataGrid(config, componentScope);
176
172
  break;
@@ -4,7 +4,6 @@ import _ from "lodash";
4
4
 
5
5
  export const buildWrapperSection = (config,componentScope) =>{
6
6
  const wrapper: any = _.cloneDeep(WrapperSection);
7
- wrapper.scopeName = componentScope;
8
7
  wrapper.config.main.label = config.label;
9
8
  wrapper.config.main.divider = config.divider === "YES" ? true : false;
10
9
  if (config.style) {
@@ -235,14 +235,6 @@ const GraphSection = {
235
235
  export const buildPropertiesSection = function (type: String) {
236
236
  let uiSchema = _.cloneDeep(GraphSection);
237
237
  switch (type) {
238
- case "InputSlider":
239
- uiSchema.elements = [
240
- getInputField("max", "Max Limit"),
241
- getInputField("step", "Step"),
242
- getInputField("min", "Min Limit"),
243
- getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"]),
244
- ]
245
- break;
246
238
  case "DataGrid":
247
239
  uiSchema.elements = [
248
240
  getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
@@ -371,7 +363,6 @@ export const buildPropertiesSection = function (type: String) {
371
363
 
372
364
  case "TabSection":
373
365
  uiSchema.elements = [
374
- getRadioInputField("verticalOrientation", "Vertical Orientation", ["YES", "NO"]),EmptyBox,
375
366
  getArrayControl("sectionLabels", "label"),
376
367
  ]
377
368
  break;
@@ -7,7 +7,6 @@ export default {
7
7
  elements:[],
8
8
  config: {
9
9
  main: {
10
- onMount:"onMount",
11
10
  columns: {
12
11
  },
13
12
  },
@@ -7,7 +7,6 @@ export default {
7
7
  elements:[],
8
8
  config: {
9
9
  main: {
10
- onMount:"onMount",
11
10
  //@ts-ignore
12
11
  allRowData:[],
13
12
  downloadAllData:false,
@@ -16,7 +16,6 @@ export const ComponentSchema: any = {
16
16
  { title: "Empty Box", const: "EmptyBox" },
17
17
  { title: "File", const: "FileInput" },
18
18
  { title: "Graph", const: "Graph" },
19
- { title: "Input Slider", const: "InputSlider" },
20
19
  { title: "Label", const: "Box" },
21
20
  { title: "LeaderBoard", const: "LeaderBoard" },
22
21
  { title: "MultipleSelect", const: "MultipleSelect" },
@@ -23,13 +23,6 @@ export const PageMasterSchema = {
23
23
  },
24
24
  },
25
25
  },
26
- template: {
27
- oneOf: [
28
- { const: "Template-1", title: "template1" },
29
- { const: "Template-2", title: "template2" },
30
- { const: "Template-3", title: "template3" }
31
- ]
32
- },
33
26
  sectionLabels: {
34
27
  type: "array",
35
28
  items: {
@@ -42,5 +35,5 @@ export const PageMasterSchema = {
42
35
  },
43
36
  }
44
37
  },
45
- required:["template","name"]
38
+ required:["label","name"]
46
39
  }
@@ -80,20 +80,16 @@ export const PageMasterUiSchema: any = {
80
80
  },
81
81
  {
82
82
  type: "Control",
83
- scope: "#/properties/template",
83
+ scope: "#/properties/label",
84
84
 
85
85
  options: {
86
- widget: "SelectInputField",
86
+ widget: "InputField",
87
87
  },
88
88
  config: {
89
89
  layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
90
90
  main: {
91
- label: "Template",
92
- options: [
93
- {const:"template1",title:"template1"},
94
- {const:"template2",title:"template2"},
95
- {const:"template3",title:"template3"}
96
- ],
91
+ label: "Label",
92
+ options: [],
97
93
  color: "secondary",
98
94
  required: true,
99
95
  },
@@ -41,7 +41,6 @@ export const EventSchema = {
41
41
  { title: "Click Event", const: "onClick" },
42
42
  { title: "Load Event", const: "onLoad" },
43
43
  { title: "Change Event", const: "onChange" },
44
- { title: "Mount Event", const: "onMount" },
45
44
  { title: "Success", const: "Success" },
46
45
  { title: "onStart", const: "onStart" },
47
46
 
@@ -66,7 +65,7 @@ export const EventSchema = {
66
65
  oneOf: [
67
66
  { title: "RankProvider", const: "RankProvider" },
68
67
  { title: "Download File", const: "downloadFile" },
69
- { title: "Download", const: "download" }
68
+ { title: "Download", const: "download" },
70
69
  ]
71
70
  },
72
71
  body: {
@@ -36,7 +36,6 @@ const sectionLabels = {
36
36
  PopUp: ["Core", "Components","Properties", "style"],
37
37
  Stepper: ["Core", "Components","Properties","Event", "style"],
38
38
  DataGrid: ["Core", "Components","Properties","Event", "style"],
39
- InputSlider:["Core","Properties","style", "Event","Validation"],
40
39
  }
41
40
 
42
41
 
@@ -49,18 +49,11 @@ export default (funcParams: funcParamsProps) => {
49
49
  store.formData.elements = []
50
50
  }
51
51
  const response = saveFormdataInLocalStorage(store.ctx.core.data)
52
- if (id) {
53
- store.navigate(
54
- `/Component?path=${`elements[${response?.elements.length}]`}&id=${id}`
55
- );
56
- }else{
57
- store.navigate(
58
- `/Component?path=${`elements[${response?.elements.length}]`}`
59
- );
60
- }
61
-
52
+ store.navigate(
53
+ `/Component?path=${`elements[${response?.elements.length}]`}&id=${id}`
54
+ );
62
55
  },
63
- saveHandler: async () => await saveHandler(store, service, submitHandler),
56
+ saveHandler: async ()=> await saveHandler(store,service,submitHandler),
64
57
  Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
65
58
  Delete_Components: Component(store, dynamicData, submitHandler, service).deleteComponents,
66
59
  eventAddHandler: function () {
@@ -65,7 +65,7 @@ export async function saveHandler(store, service, submitHandler, pageName?: stri
65
65
  if (_.isEmpty(store.ctx.core.errors)) {
66
66
  try {
67
67
  const saveReturn = await submitHandler(store, service, config);
68
- navigateHandler(store, true, pageName ? `/${pageName}?id=${saveReturn.id}` : "/PageMasterRecords")
68
+ navigateHandler(store, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords")
69
69
  } catch (err) {
70
70
  navigateHandler(store, false)
71
71
  }
@@ -87,7 +87,7 @@ async function executeInBuiltFunctionHandler(params: handlersProps) {
87
87
  const makeFunc = eval(params.config.funcParametersCode)
88
88
  parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
89
89
  }
90
- params.serviceHolder[params.config.inBuiltFunctionType](parameter,params.service)
90
+ params.serviceHolder[params.config.inBuiltFunctionType](parameter)
91
91
  }
92
92
 
93
93
  async function executeCustomHandler(params: handlersProps) {
@@ -131,7 +131,7 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
131
131
  }
132
132
  else {
133
133
  if (handlerResponse) {
134
- store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse?.data?.data : handlerResponse.data } });
134
+ store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
135
135
  const demoData = await asyncOperation();
136
136
  }
137
137
  }
@@ -62,7 +62,7 @@ export default (funcParams: funcParamsProps) => {
62
62
  let executeEventsParameters: handlersProps = {
63
63
  config: {}, componentName: "",
64
64
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
65
- serviceHolder: { downloadFile ,download:doDownload}, eventGroups
65
+ serviceHolder: { downloadFile,download:doDownload }, eventGroups
66
66
  };
67
67
  return {
68
68
  setPage: async function () {
@@ -72,6 +72,11 @@ export default (funcParams: funcParamsProps) => {
72
72
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
73
73
  serviceHolder: this, eventGroups
74
74
  }
75
+ await executeRefreshHandler({
76
+ config: {}, componentName: "",
77
+ store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
78
+ serviceHolder: this, eventGroups
79
+ })
75
80
  funcParams.store.setSchema(
76
81
  (pre: any) => {
77
82
  return {
@@ -91,9 +96,6 @@ export default (funcParams: funcParamsProps) => {
91
96
  onClick: async function () {
92
97
  await this.callHandler("onClick")
93
98
  },
94
- onMount: async function () {
95
- await this.callHandler("onMount")
96
- },
97
99
  onFileDownload: async function () {
98
100
  await this.callHandler("onDownload")
99
101
  },
@@ -1 +0,0 @@
1
- export declare const buildInputSlider: (config: any, componentScope: any) => any;
@@ -1,46 +0,0 @@
1
-
2
- import _ from "lodash";
3
- import { createLayoutFormat } from "./buildConfig";
4
- const InputSlider = {
5
- type: "Control",
6
- scope: "#/properties/inputSlider",
7
- options: {
8
- widget: "InputSlider",
9
- },
10
-
11
- config: {
12
- layout: 12,
13
- main: {
14
- limitToMax: false,
15
- max: 10000,
16
- step: 1000,
17
- min: 0,
18
- label: "Slider"
19
- },
20
-
21
- },
22
- };
23
- export const buildInputSlider = (config, componentScope) => {
24
- const inputSlider: any = _.cloneDeep(InputSlider);
25
- inputSlider.scope = componentScope;
26
- inputSlider.config.main.label = config.label
27
- if (config.layout) {
28
- inputSlider.config.layout = createLayoutFormat(config.layout)
29
- }
30
- if (config.limitToMax) {
31
- inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
32
- }
33
- if (config.max) {
34
- inputSlider.config.main.max = config.max
35
- }
36
- if (config.step) {
37
- inputSlider.config.main.step = config.step;
38
- }
39
- if (config.min) {
40
- inputSlider.config.main.min = config.min;
41
- }
42
- if (config.style) {
43
- inputSlider.config.main.defaultStyle = JSON.parse(config.style)
44
- }
45
- return inputSlider;
46
- }