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
@@ -22,13 +22,6 @@ const PageMasterSchema = {
22
22
  }
23
23
  }
24
24
  },
25
- template: {
26
- oneOf: [
27
- { const: "Template-1", title: "template1" },
28
- { const: "Template-2", title: "template2" },
29
- { const: "Template-3", title: "template3" }
30
- ]
31
- },
32
25
  sectionLabels: {
33
26
  type: "array",
34
27
  items: {
@@ -41,7 +34,7 @@ const PageMasterSchema = {
41
34
  }
42
35
  }
43
36
  },
44
- required: ["template", "name"]
37
+ required: ["label", "name"]
45
38
  };
46
39
  const PageMasterUiSchema = {
47
40
  type: "HorizontalLayout",
@@ -121,19 +114,15 @@ const PageMasterUiSchema = {
121
114
  },
122
115
  {
123
116
  type: "Control",
124
- scope: "#/properties/template",
117
+ scope: "#/properties/label",
125
118
  options: {
126
- widget: "SelectInputField"
119
+ widget: "InputField"
127
120
  },
128
121
  config: {
129
122
  layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
130
123
  main: {
131
- label: "Template",
132
- options: [
133
- { const: "template1", title: "template1" },
134
- { const: "template2", title: "template2" },
135
- { const: "template3", title: "template3" }
136
- ],
124
+ label: "Label",
125
+ options: [],
137
126
  color: "secondary",
138
127
  required: true
139
128
  }
@@ -5888,7 +5877,6 @@ const ComponentSchema = {
5888
5877
  { title: "Empty Box", const: "EmptyBox" },
5889
5878
  { title: "File", const: "FileInput" },
5890
5879
  { title: "Graph", const: "Graph" },
5891
- { title: "Input Slider", const: "InputSlider" },
5892
5880
  { title: "Label", const: "Box" },
5893
5881
  { title: "LeaderBoard", const: "LeaderBoard" },
5894
5882
  { title: "MultipleSelect", const: "MultipleSelect" },
@@ -6896,14 +6884,6 @@ const GraphSection = {
6896
6884
  const buildPropertiesSection = function(type) {
6897
6885
  let uiSchema = _.cloneDeep(GraphSection);
6898
6886
  switch (type) {
6899
- case "InputSlider":
6900
- uiSchema.elements = [
6901
- getInputField("max", "Max Limit"),
6902
- getInputField("step", "Step"),
6903
- getInputField("min", "Min Limit"),
6904
- getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"])
6905
- ];
6906
- break;
6907
6887
  case "DataGrid":
6908
6888
  uiSchema.elements = [
6909
6889
  getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
@@ -7020,8 +7000,6 @@ const buildPropertiesSection = function(type) {
7020
7000
  break;
7021
7001
  case "TabSection":
7022
7002
  uiSchema.elements = [
7023
- getRadioInputField("verticalOrientation", "Vertical Orientation", ["YES", "NO"]),
7024
- EmptyBox,
7025
7003
  getArrayControl("sectionLabels", "label")
7026
7004
  ];
7027
7005
  break;
@@ -7415,14 +7393,14 @@ const getFormdataFromLocalStorage = (path) => {
7415
7393
  };
7416
7394
  async function saveHandler(store2, service2, submitHandler, pageName) {
7417
7395
  var _a, _b;
7418
- (_a = store2.searchParams) == null ? void 0 : _a.get("id");
7396
+ const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
7419
7397
  const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
7420
7398
  saveFormdataInLocalStorage(store2.ctx.core.data, path);
7421
7399
  const config = JSON.parse(localStorage.getItem("pageFormdata"));
7422
7400
  if (_.isEmpty(store2.ctx.core.errors)) {
7423
7401
  try {
7424
7402
  const saveReturn = await submitHandler(store2, service2, config);
7425
- navigateHandler(store2, true, pageName ? `/${pageName}?id=${saveReturn.id}` : "/PageMasterRecords");
7403
+ navigateHandler(store2, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords");
7426
7404
  } catch (err) {
7427
7405
  navigateHandler(store2, false);
7428
7406
  }
@@ -7489,8 +7467,7 @@ const sectionLabels = {
7489
7467
  TextArea: ["Core", "Properties", "style", "Event", "Validation"],
7490
7468
  PopUp: ["Core", "Components", "Properties", "style"],
7491
7469
  Stepper: ["Core", "Components", "Properties", "Event", "style"],
7492
- DataGrid: ["Core", "Components", "Properties", "Event", "style"],
7493
- InputSlider: ["Core", "Properties", "style", "Event", "Validation"]
7470
+ DataGrid: ["Core", "Components", "Properties", "Event", "style"]
7494
7471
  };
7495
7472
  const refreshPage = (type, store2) => {
7496
7473
  var _a;
@@ -7645,15 +7622,9 @@ var pageMaster = (funcParams) => {
7645
7622
  store2.formData.elements = [];
7646
7623
  }
7647
7624
  const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
7648
- if (id) {
7649
- store2.navigate(
7650
- `/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
7651
- );
7652
- } else {
7653
- store2.navigate(
7654
- `/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}`
7655
- );
7656
- }
7625
+ store2.navigate(
7626
+ `/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
7627
+ );
7657
7628
  },
7658
7629
  saveHandler: async () => await saveHandler(store2, service2, submitHandler),
7659
7630
  Edit_Components: Component(store2, dynamicData2, submitHandler, service2).editComponents,
@@ -7727,7 +7698,6 @@ const EventSchema = {
7727
7698
  { title: "Click Event", const: "onClick" },
7728
7699
  { title: "Load Event", const: "onLoad" },
7729
7700
  { title: "Change Event", const: "onChange" },
7730
- { title: "Mount Event", const: "onMount" },
7731
7701
  { title: "Success", const: "Success" },
7732
7702
  { title: "onStart", const: "onStart" },
7733
7703
  { title: "File Upload Event", const: "onUpload" },
@@ -8439,7 +8409,7 @@ async function executeInBuiltFunctionHandler(params) {
8439
8409
  const makeFunc = eval(params.config.funcParametersCode);
8440
8410
  parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
8441
8411
  }
8442
- params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
8412
+ params.serviceHolder[params.config.inBuiltFunctionType](parameter);
8443
8413
  }
8444
8414
  async function executeCustomHandler(params) {
8445
8415
  const makeFunc = eval(params.config.eventCode);
@@ -8487,8 +8457,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
8487
8457
  } else {
8488
8458
  if (handlerResponse) {
8489
8459
  store2.setFormdata((pre) => {
8490
- var _a;
8491
- return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
8460
+ return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
8492
8461
  });
8493
8462
  await asyncOperation();
8494
8463
  }
@@ -8643,6 +8612,16 @@ var service = (funcParams) => {
8643
8612
  serviceHolder: this,
8644
8613
  eventGroups
8645
8614
  };
8615
+ await executeRefreshHandler({
8616
+ config: {},
8617
+ componentName: "",
8618
+ store: funcParams.store,
8619
+ dynamicData: funcParams.dynamicData,
8620
+ userValue: funcParams.userValue,
8621
+ service: funcParams.service,
8622
+ serviceHolder: this,
8623
+ eventGroups
8624
+ });
8646
8625
  funcParams.store.setSchema(
8647
8626
  (pre) => {
8648
8627
  return {
@@ -8667,9 +8646,6 @@ var service = (funcParams) => {
8667
8646
  onClick: async function() {
8668
8647
  await this.callHandler("onClick");
8669
8648
  },
8670
- onMount: async function() {
8671
- await this.callHandler("onMount");
8672
- },
8673
8649
  onFileDownload: async function() {
8674
8650
  await this.callHandler("onDownload");
8675
8651
  },
@@ -9126,7 +9102,6 @@ const buildLeaderBoard = (config) => {
9126
9102
  });
9127
9103
  LeaderBoard.elements[9].elements = modifyColumns;
9128
9104
  }
9129
- LeaderBoard.config.main.label = config.label;
9130
9105
  if (config.name) {
9131
9106
  LeaderBoard.elements[0].scope = `#/properties/${config.name}/properties/firstImage`;
9132
9107
  LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`;
@@ -9146,7 +9121,7 @@ const buildLeaderBoard = (config) => {
9146
9121
  LeaderBoard.elements[2].config.main.url = config.thirdImage;
9147
9122
  }
9148
9123
  if (config.layout) {
9149
- LeaderBoard.config.layout = createLayoutFormat(config.layout);
9124
+ LeaderBoard.config.layout = config.layout;
9150
9125
  }
9151
9126
  return LeaderBoard;
9152
9127
  };
@@ -9579,10 +9554,6 @@ var Tabsection = {
9579
9554
  };
9580
9555
  const buildTabSection = (config, componentScope) => {
9581
9556
  const tab = _.cloneDeep(Tabsection);
9582
- tab.scopeName = componentScope;
9583
- if (config.orientation) {
9584
- tab.config.main.orientation = config.orientation === "YES" ? "vertical" : "horizontal";
9585
- }
9586
9557
  if (config.sectionLabels) {
9587
9558
  tab.config.main.tabLabels = config.sectionLabels.map((e) => e.label);
9588
9559
  }
@@ -9602,7 +9573,6 @@ var WrapperSection = {
9602
9573
  };
9603
9574
  const buildWrapperSection = (config, componentScope) => {
9604
9575
  const wrapper = _.cloneDeep(WrapperSection);
9605
- wrapper.scopeName = componentScope;
9606
9576
  wrapper.config.main.label = config.label;
9607
9577
  wrapper.config.main.divider = config.divider === "YES" ? true : false;
9608
9578
  if (config.style) {
@@ -9759,7 +9729,6 @@ var Table = {
9759
9729
  elements: [],
9760
9730
  config: {
9761
9731
  main: {
9762
- onMount: "onMount",
9763
9732
  allRowData: [],
9764
9733
  downloadAllData: false,
9765
9734
  columns: {
@@ -9778,7 +9747,6 @@ var lazyLoadingTable = {
9778
9747
  elements: [],
9779
9748
  config: {
9780
9749
  main: {
9781
- onMount: "onMount",
9782
9750
  columns: {}
9783
9751
  }
9784
9752
  }
@@ -10620,47 +10588,6 @@ const buildDataGrid = (config, componentScope) => {
10620
10588
  }
10621
10589
  return DataGrid;
10622
10590
  };
10623
- const InputSlider = {
10624
- type: "Control",
10625
- scope: "#/properties/inputSlider",
10626
- options: {
10627
- widget: "InputSlider"
10628
- },
10629
- config: {
10630
- layout: 12,
10631
- main: {
10632
- limitToMax: false,
10633
- max: 1e4,
10634
- step: 1e3,
10635
- min: 0,
10636
- label: "Slider"
10637
- }
10638
- }
10639
- };
10640
- const buildInputSlider = (config, componentScope) => {
10641
- const inputSlider = _.cloneDeep(InputSlider);
10642
- inputSlider.scope = componentScope;
10643
- inputSlider.config.main.label = config.label;
10644
- if (config.layout) {
10645
- inputSlider.config.layout = createLayoutFormat(config.layout);
10646
- }
10647
- if (config.limitToMax) {
10648
- inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
10649
- }
10650
- if (config.max) {
10651
- inputSlider.config.main.max = config.max;
10652
- }
10653
- if (config.step) {
10654
- inputSlider.config.main.step = config.step;
10655
- }
10656
- if (config.min) {
10657
- inputSlider.config.main.min = config.min;
10658
- }
10659
- if (config.style) {
10660
- inputSlider.config.main.defaultStyle = JSON.parse(config.style);
10661
- }
10662
- return inputSlider;
10663
- };
10664
10591
  let schema = {
10665
10592
  type: "object",
10666
10593
  properties: {},
@@ -10779,9 +10706,6 @@ const buildUiSchema = (config) => {
10779
10706
  let elements = {};
10780
10707
  const componentScope = `#/properties/${config.name}`;
10781
10708
  switch (config.type) {
10782
- case "InputSlider":
10783
- elements = buildInputSlider(config, componentScope);
10784
- break;
10785
10709
  case "DataGrid":
10786
10710
  elements = buildDataGrid(config, componentScope);
10787
10711
  break;
@@ -10801,13 +10725,13 @@ const buildUiSchema = (config) => {
10801
10725
  elements = buildPanField(config, componentScope);
10802
10726
  break;
10803
10727
  case "TabSection":
10804
- elements = buildTabSection(config, componentScope);
10728
+ elements = buildTabSection(config);
10805
10729
  break;
10806
10730
  case "RunnerBoyProgressBar":
10807
10731
  elements = RunnerBoyProgressbar(config, componentScope);
10808
10732
  break;
10809
10733
  case "WrapperSection":
10810
- elements = buildWrapperSection(config, componentScope);
10734
+ elements = buildWrapperSection(config);
10811
10735
  break;
10812
10736
  case "Text":
10813
10737
  elements = buildTextField(config, componentScope);