impaktapps-ui-builder 0.0.322 → 0.0.324

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.
@@ -0,0 +1 @@
1
+ export declare const buildInputSlider: (config: any, componentScope: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.322",
3
+ "version": "0.0.324",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -0,0 +1,46 @@
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
+ }
@@ -34,6 +34,7 @@ import { buildEmptyBox } from "./buildEmptyBox";
34
34
  import { buildArray } from "./buildArray";
35
35
  import { buildAdhaarField, buildPanField } from "./buildAadharCard";
36
36
  import { buildFileInput } from "./buildFileInput";
37
+ import { buildInputSlider } from "./buildInputSlider";
37
38
  export let schema = {
38
39
  type: "object",
39
40
  properties: {},
@@ -164,6 +165,9 @@ const buildUiSchema = (config: any) => {
164
165
  let elements: any = {};
165
166
  const componentScope = `#/properties/${config.name}`;
166
167
  switch (config.type) {
168
+ case "InputSlider":
169
+ elements = buildInputSlider(config, componentScope);
170
+ break;
167
171
  case "FileInput":
168
172
  elements = buildFileInput(config, componentScope);
169
173
  break;
@@ -160,6 +160,14 @@ const GraphSection = {
160
160
  export const buildPropertiesSection = function (type: String) {
161
161
  let uiSchema = _.cloneDeep(GraphSection);
162
162
  switch (type) {
163
+ case "InputSlider":
164
+ uiSchema.elements = [
165
+ getInputField("max", "Max Limit"),
166
+ getInputField("step", "Step"),
167
+ getInputField("min", "Min Limit"),
168
+ getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"]),
169
+ ]
170
+ break;
163
171
  case "Text":
164
172
  uiSchema.elements = [
165
173
  getInputField("placeholder", "Placeholder"),
@@ -15,6 +15,7 @@ export const ComponentSchema: any = {
15
15
  { title: "Empty Box", const: "EmptyBox" },
16
16
  { title: "File", const: "FileInput" },
17
17
  { title: "Graph", const: "Graph" },
18
+ { title: "Input Slider", const: "InputSlider" },
18
19
  { title: "Label", const: "Box" },
19
20
  { title: "LeaderBoard", const: "LeaderBoard" },
20
21
  { title: "MultipleSelect", const: "MultipleSelect" },
@@ -33,6 +33,7 @@ const sectionLabels = {
33
33
  Radio:["Core", "Properties", "style", "Event","Validation"],
34
34
  Text:["Core","Properties","style", "Event","Validation"],
35
35
  TextArea:["Core","Properties","style", "Event","Validation"],
36
+ InputSlider:["Core","Properties","style", "Event","Validation"],
36
37
  }
37
38
 
38
39
  export const refreshPage = (type:string,store:any) => {