impaktapps-ui-builder 0.0.324 → 0.0.326
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/README.md +92 -0
- package/dist/impaktapps-ui-builder.es.js +96 -88
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +14 -14
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +4 -1
- package/package.json +2 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -8
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +32 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +32 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +5 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +8 -4
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +29 -24
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +0 -46
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# impaktapps-form-builder
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
8
|
+
|
|
9
|
+
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
10
|
+
|
|
11
|
+
## Add your files
|
|
12
|
+
|
|
13
|
+
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
14
|
+
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
cd existing_repo
|
|
18
|
+
git remote add origin https://git.act21.io/products/impaktapps-form-builder.git
|
|
19
|
+
git branch -M main
|
|
20
|
+
git push -uf origin main
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Integrate with your tools
|
|
24
|
+
|
|
25
|
+
- [ ] [Set up project integrations](https://git.act21.io/products/impaktapps-form-builder/-/settings/integrations)
|
|
26
|
+
|
|
27
|
+
## Collaborate with your team
|
|
28
|
+
|
|
29
|
+
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
|
30
|
+
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
31
|
+
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
32
|
+
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
33
|
+
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
|
34
|
+
|
|
35
|
+
## Test and Deploy
|
|
36
|
+
|
|
37
|
+
Use the built-in continuous integration in GitLab.
|
|
38
|
+
|
|
39
|
+
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
|
40
|
+
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
41
|
+
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
42
|
+
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
43
|
+
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
# Editing this README
|
|
48
|
+
|
|
49
|
+
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
50
|
+
|
|
51
|
+
## Suggestions for a good README
|
|
52
|
+
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
53
|
+
|
|
54
|
+
## Name
|
|
55
|
+
Choose a self-explaining name for your project.
|
|
56
|
+
|
|
57
|
+
## Description
|
|
58
|
+
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
59
|
+
|
|
60
|
+
## Badges
|
|
61
|
+
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
62
|
+
|
|
63
|
+
## Visuals
|
|
64
|
+
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
71
|
+
|
|
72
|
+
## Support
|
|
73
|
+
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
74
|
+
|
|
75
|
+
## Roadmap
|
|
76
|
+
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
77
|
+
|
|
78
|
+
## Contributing
|
|
79
|
+
State if you are open to contributions and what your requirements are for accepting them.
|
|
80
|
+
|
|
81
|
+
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
82
|
+
|
|
83
|
+
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
84
|
+
|
|
85
|
+
## Authors and acknowledgment
|
|
86
|
+
Show your appreciation to those who have contributed to the project.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
For open source projects, say how it is licensed.
|
|
90
|
+
|
|
91
|
+
## Project status
|
|
92
|
+
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
@@ -5876,7 +5876,6 @@ const ComponentSchema = {
|
|
|
5876
5876
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
5877
5877
|
{ title: "File", const: "FileInput" },
|
|
5878
5878
|
{ title: "Graph", const: "Graph" },
|
|
5879
|
-
{ title: "Input Slider", const: "InputSlider" },
|
|
5880
5879
|
{ title: "Label", const: "Box" },
|
|
5881
5880
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5882
5881
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
@@ -6320,7 +6319,7 @@ const componentBasicUiSchema = {
|
|
|
6320
6319
|
type: "Control",
|
|
6321
6320
|
scope: "#/properties/proc",
|
|
6322
6321
|
config: {
|
|
6323
|
-
layout: { xs: 11, sm: 11, md:
|
|
6322
|
+
layout: { xs: 11, sm: 11, md: 6, lg: 6 }
|
|
6324
6323
|
},
|
|
6325
6324
|
options: {
|
|
6326
6325
|
widget: "EmptyBox"
|
|
@@ -6336,8 +6335,8 @@ const componentBasicUiSchema = {
|
|
|
6336
6335
|
layout: {
|
|
6337
6336
|
xs: 11,
|
|
6338
6337
|
sm: 11,
|
|
6339
|
-
md:
|
|
6340
|
-
lg:
|
|
6338
|
+
md: 2.5,
|
|
6339
|
+
lg: 2.5
|
|
6341
6340
|
},
|
|
6342
6341
|
main: {
|
|
6343
6342
|
name: "Save",
|
|
@@ -6354,6 +6353,34 @@ const componentBasicUiSchema = {
|
|
|
6354
6353
|
}
|
|
6355
6354
|
}
|
|
6356
6355
|
},
|
|
6356
|
+
{
|
|
6357
|
+
type: "Control",
|
|
6358
|
+
scope: "#/properties/btnSubmit",
|
|
6359
|
+
options: {
|
|
6360
|
+
widget: "Button"
|
|
6361
|
+
},
|
|
6362
|
+
config: {
|
|
6363
|
+
layout: {
|
|
6364
|
+
xs: 11,
|
|
6365
|
+
sm: 11,
|
|
6366
|
+
md: 2.5,
|
|
6367
|
+
lg: 2.5
|
|
6368
|
+
},
|
|
6369
|
+
main: {
|
|
6370
|
+
name: "Submit",
|
|
6371
|
+
startIcon: "ApproveIcon",
|
|
6372
|
+
variant: "contained",
|
|
6373
|
+
color: "info",
|
|
6374
|
+
type: "text",
|
|
6375
|
+
onClick: "submitPageHandler",
|
|
6376
|
+
size: "small"
|
|
6377
|
+
},
|
|
6378
|
+
style: {
|
|
6379
|
+
marginBottom: "8px",
|
|
6380
|
+
float: "right"
|
|
6381
|
+
}
|
|
6382
|
+
}
|
|
6383
|
+
},
|
|
6357
6384
|
{
|
|
6358
6385
|
type: "Control",
|
|
6359
6386
|
scope: "#/properties/notify",
|
|
@@ -6837,14 +6864,6 @@ const GraphSection = {
|
|
|
6837
6864
|
const buildPropertiesSection = function(type) {
|
|
6838
6865
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6839
6866
|
switch (type) {
|
|
6840
|
-
case "InputSlider":
|
|
6841
|
-
uiSchema.elements = [
|
|
6842
|
-
getInputField("max", "Max Limit"),
|
|
6843
|
-
getInputField("step", "Step"),
|
|
6844
|
-
getInputField("min", "Min Limit"),
|
|
6845
|
-
getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"])
|
|
6846
|
-
];
|
|
6847
|
-
break;
|
|
6848
6867
|
case "Text":
|
|
6849
6868
|
uiSchema.elements = [
|
|
6850
6869
|
getInputField("placeholder", "Placeholder"),
|
|
@@ -7253,8 +7272,7 @@ const sectionLabels = {
|
|
|
7253
7272
|
Array: ["Core", "Components", "Validation"],
|
|
7254
7273
|
Radio: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7255
7274
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7256
|
-
TextArea: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7257
|
-
InputSlider: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7275
|
+
TextArea: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7258
7276
|
};
|
|
7259
7277
|
const refreshPage = (type, store2) => {
|
|
7260
7278
|
var _a;
|
|
@@ -7275,7 +7293,7 @@ const refreshPage = (type, store2) => {
|
|
|
7275
7293
|
}
|
|
7276
7294
|
store2.setUiSchema(UiSchema);
|
|
7277
7295
|
};
|
|
7278
|
-
var Component = (store2, dynamicData2) => {
|
|
7296
|
+
var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
7279
7297
|
return {
|
|
7280
7298
|
setPage: async function() {
|
|
7281
7299
|
const formdata = await this.getFormdata();
|
|
@@ -7312,6 +7330,7 @@ var Component = (store2, dynamicData2) => {
|
|
|
7312
7330
|
});
|
|
7313
7331
|
}
|
|
7314
7332
|
},
|
|
7333
|
+
submitPageHandler: submitPageHandlerProvider(store2, service2, submitHandler).submitPageHandler,
|
|
7315
7334
|
onChange: function() {
|
|
7316
7335
|
var _a, _b, _c, _d;
|
|
7317
7336
|
if (((_a = store2 == null ? void 0 : store2.formData) == null ? void 0 : _a.type) !== ((_b = store2 == null ? void 0 : store2.newData) == null ? void 0 : _b.type) && ((_c = store2 == null ? void 0 : store2.newData) == null ? void 0 : _c.type) !== void 0) {
|
|
@@ -7388,8 +7407,30 @@ var Component = (store2, dynamicData2) => {
|
|
|
7388
7407
|
}
|
|
7389
7408
|
};
|
|
7390
7409
|
};
|
|
7410
|
+
function submitPageHandlerProvider(store2, service2, submitHandler) {
|
|
7411
|
+
return {
|
|
7412
|
+
submitPageHandler: async function() {
|
|
7413
|
+
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7414
|
+
submitHandler(store2, service2).then((saveReturn) => {
|
|
7415
|
+
localStorage.removeItem("pageFormdata");
|
|
7416
|
+
store2.navigate("/PageMasterRecords");
|
|
7417
|
+
store2.setNotify({
|
|
7418
|
+
SuccessMessage: "Submit Successfully",
|
|
7419
|
+
Success: true
|
|
7420
|
+
});
|
|
7421
|
+
});
|
|
7422
|
+
} else {
|
|
7423
|
+
store2.setValidation("ValidateAndShow");
|
|
7424
|
+
store2.setNotify({
|
|
7425
|
+
Fail: true,
|
|
7426
|
+
FailMessage: "Errors on Page"
|
|
7427
|
+
});
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7430
|
+
};
|
|
7431
|
+
}
|
|
7391
7432
|
var pageMaster = (funcParams) => {
|
|
7392
|
-
const { store: store2, dynamicData: dynamicData2, config, submitHandler } = funcParams;
|
|
7433
|
+
const { store: store2, dynamicData: dynamicData2, config, submitHandler, service: service2 } = funcParams;
|
|
7393
7434
|
return {
|
|
7394
7435
|
setPage: async function() {
|
|
7395
7436
|
const formdata = await this.getFormdata();
|
|
@@ -7430,27 +7471,9 @@ var pageMaster = (funcParams) => {
|
|
|
7430
7471
|
`/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
|
|
7431
7472
|
);
|
|
7432
7473
|
},
|
|
7433
|
-
submitPageHandler:
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
submitHandler(store2, funcParams.service).then((saveReturn) => {
|
|
7437
|
-
localStorage.removeItem("pageFormdata");
|
|
7438
|
-
store2.navigate(-1);
|
|
7439
|
-
store2.setNotify({
|
|
7440
|
-
SuccessMessage: "Submit Successfully",
|
|
7441
|
-
Success: true
|
|
7442
|
-
});
|
|
7443
|
-
});
|
|
7444
|
-
} else {
|
|
7445
|
-
funcParams.store.setValidation("ValidateAndShow");
|
|
7446
|
-
funcParams.store.setNotify({
|
|
7447
|
-
Fail: true,
|
|
7448
|
-
FailMessage: "Errors on Page"
|
|
7449
|
-
});
|
|
7450
|
-
}
|
|
7451
|
-
},
|
|
7452
|
-
Edit_Components: Component(store2, dynamicData2).editComponents,
|
|
7453
|
-
Delete_Components: Component(store2, dynamicData2).deleteComponents,
|
|
7474
|
+
submitPageHandler: submitPageHandlerProvider(store2, service2, submitHandler).submitPageHandler,
|
|
7475
|
+
Edit_Components: Component(store2, dynamicData2, submitHandler, service2).editComponents,
|
|
7476
|
+
Delete_Components: Component(store2, dynamicData2, submitHandler, service2).deleteComponents,
|
|
7454
7477
|
eventAddHandler: async function() {
|
|
7455
7478
|
var _a;
|
|
7456
7479
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
@@ -7785,7 +7808,7 @@ const EventUiSchema = {
|
|
|
7785
7808
|
type: "Control",
|
|
7786
7809
|
scope: "#/properties/proc",
|
|
7787
7810
|
config: {
|
|
7788
|
-
layout: { xs: 11, sm: 11, md:
|
|
7811
|
+
layout: { xs: 11, sm: 11, md: 6, lg: 6 }
|
|
7789
7812
|
},
|
|
7790
7813
|
options: {
|
|
7791
7814
|
widget: "EmptyBox"
|
|
@@ -7801,8 +7824,8 @@ const EventUiSchema = {
|
|
|
7801
7824
|
layout: {
|
|
7802
7825
|
xs: 11,
|
|
7803
7826
|
sm: 11,
|
|
7804
|
-
md:
|
|
7805
|
-
lg:
|
|
7827
|
+
md: 2.5,
|
|
7828
|
+
lg: 2.5
|
|
7806
7829
|
},
|
|
7807
7830
|
main: {
|
|
7808
7831
|
name: "Save",
|
|
@@ -7819,6 +7842,34 @@ const EventUiSchema = {
|
|
|
7819
7842
|
}
|
|
7820
7843
|
}
|
|
7821
7844
|
},
|
|
7845
|
+
{
|
|
7846
|
+
type: "Control",
|
|
7847
|
+
scope: "#/properties/btnSubmit",
|
|
7848
|
+
options: {
|
|
7849
|
+
widget: "Button"
|
|
7850
|
+
},
|
|
7851
|
+
config: {
|
|
7852
|
+
layout: {
|
|
7853
|
+
xs: 11,
|
|
7854
|
+
sm: 11,
|
|
7855
|
+
md: 2.5,
|
|
7856
|
+
lg: 2.5
|
|
7857
|
+
},
|
|
7858
|
+
main: {
|
|
7859
|
+
name: "Submit",
|
|
7860
|
+
startIcon: "ApproveIcon",
|
|
7861
|
+
variant: "contained",
|
|
7862
|
+
color: "info",
|
|
7863
|
+
type: "text",
|
|
7864
|
+
onClick: "submitPageHandler",
|
|
7865
|
+
size: "small"
|
|
7866
|
+
},
|
|
7867
|
+
style: {
|
|
7868
|
+
marginBottom: "8px",
|
|
7869
|
+
float: "right"
|
|
7870
|
+
}
|
|
7871
|
+
}
|
|
7872
|
+
},
|
|
7822
7873
|
{
|
|
7823
7874
|
type: "Control",
|
|
7824
7875
|
scope: "#/properties/notify",
|
|
@@ -8014,7 +8065,7 @@ const refreshSectionUiSchema = {
|
|
|
8014
8065
|
}
|
|
8015
8066
|
]
|
|
8016
8067
|
};
|
|
8017
|
-
var event = (store2, dynamicData2) => {
|
|
8068
|
+
var event = (store2, dynamicData2, submitHandler, service2) => {
|
|
8018
8069
|
return {
|
|
8019
8070
|
setPage: async function() {
|
|
8020
8071
|
const formdata = await this.getFormData();
|
|
@@ -8047,7 +8098,7 @@ var event = (store2, dynamicData2) => {
|
|
|
8047
8098
|
store22.setSchema(schema2);
|
|
8048
8099
|
store22.setUiSchema(uiSchema);
|
|
8049
8100
|
},
|
|
8050
|
-
getFormData: Component(store2, dynamicData2).getFormdata,
|
|
8101
|
+
getFormData: Component(store2, dynamicData2, submitHandler, service2).getFormdata,
|
|
8051
8102
|
getUiSchema: async function() {
|
|
8052
8103
|
return EventUiSchema;
|
|
8053
8104
|
},
|
|
@@ -8060,7 +8111,7 @@ var event = (store2, dynamicData2) => {
|
|
|
8060
8111
|
this.refreshPage(store2.newData.Handler || store2.formdata.Handler, store2);
|
|
8061
8112
|
}
|
|
8062
8113
|
},
|
|
8063
|
-
saveHandler: Component(store2, dynamicData2).saveHandler,
|
|
8114
|
+
saveHandler: Component(store2, dynamicData2, submitHandler, service2).saveHandler,
|
|
8064
8115
|
addEvent: async function() {
|
|
8065
8116
|
var _a, _b, _c;
|
|
8066
8117
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
@@ -8073,6 +8124,7 @@ var event = (store2, dynamicData2) => {
|
|
|
8073
8124
|
store2.setSearchParams(store2.searchParams);
|
|
8074
8125
|
this.setPage();
|
|
8075
8126
|
},
|
|
8127
|
+
submitPageHandler: submitPageHandlerProvider(store2, service2, submitHandler).submitPageHandler,
|
|
8076
8128
|
editEvent: async function() {
|
|
8077
8129
|
var _a;
|
|
8078
8130
|
const rowId = dynamicData2.path.split(".")[1];
|
|
@@ -8083,7 +8135,7 @@ var event = (store2, dynamicData2) => {
|
|
|
8083
8135
|
store2.setSearchParams(store2.searchParams);
|
|
8084
8136
|
this.setPage();
|
|
8085
8137
|
},
|
|
8086
|
-
deleteEvent: Component(store2, dynamicData2).deleteEvent,
|
|
8138
|
+
deleteEvent: Component(store2, dynamicData2, submitHandler, service2).deleteEvent,
|
|
8087
8139
|
backHandler: function() {
|
|
8088
8140
|
store2.navigate(-1);
|
|
8089
8141
|
}
|
|
@@ -10192,47 +10244,6 @@ const buildFileInput = (config, componentScope) => {
|
|
|
10192
10244
|
}
|
|
10193
10245
|
return box;
|
|
10194
10246
|
};
|
|
10195
|
-
const InputSlider = {
|
|
10196
|
-
type: "Control",
|
|
10197
|
-
scope: "#/properties/inputSlider",
|
|
10198
|
-
options: {
|
|
10199
|
-
widget: "InputSlider"
|
|
10200
|
-
},
|
|
10201
|
-
config: {
|
|
10202
|
-
layout: 12,
|
|
10203
|
-
main: {
|
|
10204
|
-
limitToMax: false,
|
|
10205
|
-
max: 1e4,
|
|
10206
|
-
step: 1e3,
|
|
10207
|
-
min: 0,
|
|
10208
|
-
label: "Slider"
|
|
10209
|
-
}
|
|
10210
|
-
}
|
|
10211
|
-
};
|
|
10212
|
-
const buildInputSlider = (config, componentScope) => {
|
|
10213
|
-
const inputSlider = _.cloneDeep(InputSlider);
|
|
10214
|
-
inputSlider.scope = componentScope;
|
|
10215
|
-
inputSlider.config.main.label = config.label;
|
|
10216
|
-
if (config.layout) {
|
|
10217
|
-
inputSlider.config.layout = createLayoutFormat(config.layout);
|
|
10218
|
-
}
|
|
10219
|
-
if (config.limitToMax) {
|
|
10220
|
-
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
10221
|
-
}
|
|
10222
|
-
if (config.max) {
|
|
10223
|
-
inputSlider.config.main.max = config.max;
|
|
10224
|
-
}
|
|
10225
|
-
if (config.step) {
|
|
10226
|
-
inputSlider.config.main.step = config.step;
|
|
10227
|
-
}
|
|
10228
|
-
if (config.min) {
|
|
10229
|
-
inputSlider.config.main.min = config.min;
|
|
10230
|
-
}
|
|
10231
|
-
if (config.style) {
|
|
10232
|
-
inputSlider.config.main.defaultStyle = JSON.parse(config.style);
|
|
10233
|
-
}
|
|
10234
|
-
return inputSlider;
|
|
10235
|
-
};
|
|
10236
10247
|
let schema = {
|
|
10237
10248
|
type: "object",
|
|
10238
10249
|
properties: {},
|
|
@@ -10351,9 +10362,6 @@ const buildUiSchema = (config) => {
|
|
|
10351
10362
|
let elements = {};
|
|
10352
10363
|
const componentScope = `#/properties/${config.name}`;
|
|
10353
10364
|
switch (config.type) {
|
|
10354
|
-
case "InputSlider":
|
|
10355
|
-
elements = buildInputSlider(config, componentScope);
|
|
10356
|
-
break;
|
|
10357
10365
|
case "FileInput":
|
|
10358
10366
|
elements = buildFileInput(config, componentScope);
|
|
10359
10367
|
break;
|