impaktapps-ui-builder 0.0.321 → 0.0.323
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.
- package/dist/impaktapps-ui-builder.es.js +58 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +49 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +9 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildInputSlider: (config: any, componentScope: any) => any;
|
package/package.json
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
style: {
|
|
21
|
+
|
|
22
|
+
// fontWeight:300
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const buildInputSlider = (config, componentScope) => {
|
|
27
|
+
const inputSlider: any = _.cloneDeep(InputSlider);
|
|
28
|
+
inputSlider.scope = componentScope;
|
|
29
|
+
inputSlider.config.main.heading = config.label
|
|
30
|
+
if (config.layout) {
|
|
31
|
+
inputSlider.config.layout = createLayoutFormat(config.layout)
|
|
32
|
+
}
|
|
33
|
+
if (config.limitToMax) {
|
|
34
|
+
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
35
|
+
}
|
|
36
|
+
if (config.max) {
|
|
37
|
+
inputSlider.config.main.max = config.max
|
|
38
|
+
}
|
|
39
|
+
if (config.step) {
|
|
40
|
+
inputSlider.config.main.step = config.step;
|
|
41
|
+
}
|
|
42
|
+
if (config.min) {
|
|
43
|
+
inputSlider.config.main.min = config.min;
|
|
44
|
+
}
|
|
45
|
+
if (config.style) {
|
|
46
|
+
inputSlider.config.main.defaultStyle = JSON.parse(config.style)
|
|
47
|
+
}
|
|
48
|
+
return inputSlider;
|
|
49
|
+
}
|
|
@@ -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;
|
|
@@ -48,6 +48,7 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
+
EmptyBox
|
|
51
52
|
],
|
|
52
53
|
},
|
|
53
54
|
},
|
|
@@ -159,6 +160,14 @@ const GraphSection = {
|
|
|
159
160
|
export const buildPropertiesSection = function (type: String) {
|
|
160
161
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
161
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;
|
|
162
171
|
case "Text":
|
|
163
172
|
uiSchema.elements = [
|
|
164
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) => {
|