impaktapps-ui-builder 0.0.303 → 0.0.305
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 +80 -0
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +6 -6
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildAadharCard.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +78 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +10 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -0
|
@@ -5866,6 +5866,7 @@ const ComponentSchema = {
|
|
|
5866
5866
|
type: {
|
|
5867
5867
|
type: "string",
|
|
5868
5868
|
oneOf: [
|
|
5869
|
+
{ title: "AadharcardText", const: "AadharcardText" },
|
|
5869
5870
|
{ title: "Array", const: "Array" },
|
|
5870
5871
|
{ title: "Button", const: "Button" },
|
|
5871
5872
|
{ title: "Card", const: "card" },
|
|
@@ -5878,6 +5879,7 @@ const ComponentSchema = {
|
|
|
5878
5879
|
{ title: "Label", const: "Box" },
|
|
5879
5880
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5880
5881
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
5882
|
+
{ title: "PanCardText", const: "PanCardText" },
|
|
5881
5883
|
{ title: "ProgressBar", const: "ProgressBar" },
|
|
5882
5884
|
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
5883
5885
|
{ title: "Select", const: "Select" },
|
|
@@ -9983,6 +9985,75 @@ const buildArray = (config, componentScope) => {
|
|
|
9983
9985
|
array.scope = componentScope;
|
|
9984
9986
|
return array;
|
|
9985
9987
|
};
|
|
9988
|
+
const TextField = {
|
|
9989
|
+
"type": "Control",
|
|
9990
|
+
"scope": "#/properties/AAdhar",
|
|
9991
|
+
"layout": 12,
|
|
9992
|
+
"options": {
|
|
9993
|
+
"widget": "InputField"
|
|
9994
|
+
},
|
|
9995
|
+
config: {
|
|
9996
|
+
main: {
|
|
9997
|
+
label: "Adhaar Card",
|
|
9998
|
+
max: 2e3,
|
|
9999
|
+
step: 200,
|
|
10000
|
+
placeholder: "XXXX XXXX XXXX",
|
|
10001
|
+
autoFormat: true,
|
|
10002
|
+
patternRegex: "^[0-9\\s]*$",
|
|
10003
|
+
valueLength: 14,
|
|
10004
|
+
spaceIndex: 4,
|
|
10005
|
+
autoMaskLength: 4,
|
|
10006
|
+
autoMask: true,
|
|
10007
|
+
defaultStyle: true
|
|
10008
|
+
}
|
|
10009
|
+
}
|
|
10010
|
+
};
|
|
10011
|
+
const buildAdhaarField = (config, componentScope) => {
|
|
10012
|
+
const inputField = _.cloneDeep(TextField);
|
|
10013
|
+
inputField.config.main.label = config.label;
|
|
10014
|
+
if (config.style) {
|
|
10015
|
+
inputField.config.style = JSON.parse(config.style);
|
|
10016
|
+
}
|
|
10017
|
+
if (config.layout) {
|
|
10018
|
+
inputField.config.layout = createLayoutFormat(config.layout);
|
|
10019
|
+
}
|
|
10020
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
10021
|
+
inputField.scope = componentScope;
|
|
10022
|
+
return inputField;
|
|
10023
|
+
};
|
|
10024
|
+
const PanField = {
|
|
10025
|
+
"type": "Control",
|
|
10026
|
+
"scope": "#/properties/pan",
|
|
10027
|
+
"layout": 12,
|
|
10028
|
+
"options": {
|
|
10029
|
+
"widget": "InputField"
|
|
10030
|
+
},
|
|
10031
|
+
config: {
|
|
10032
|
+
main: {
|
|
10033
|
+
label: "Pan Card",
|
|
10034
|
+
placeholder: "Enter Pan card",
|
|
10035
|
+
patternRegex: "^[A-Z]{0,5}\\d{0,4}[A-Z]?$",
|
|
10036
|
+
valueLength: 10,
|
|
10037
|
+
spaceIndex: 4,
|
|
10038
|
+
autoMaskLength: 5,
|
|
10039
|
+
autoMask: true,
|
|
10040
|
+
defaultStyle: true
|
|
10041
|
+
}
|
|
10042
|
+
}
|
|
10043
|
+
};
|
|
10044
|
+
const buildPanField = (config, componentScope) => {
|
|
10045
|
+
const inputField = _.cloneDeep(PanField);
|
|
10046
|
+
inputField.config.main.label = config.label;
|
|
10047
|
+
if (config.style) {
|
|
10048
|
+
inputField.config.style = JSON.parse(config.style);
|
|
10049
|
+
}
|
|
10050
|
+
if (config.layout) {
|
|
10051
|
+
inputField.config.layout = createLayoutFormat(config.layout);
|
|
10052
|
+
}
|
|
10053
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
10054
|
+
inputField.scope = componentScope;
|
|
10055
|
+
return inputField;
|
|
10056
|
+
};
|
|
9986
10057
|
let schema = {
|
|
9987
10058
|
type: "object",
|
|
9988
10059
|
properties: {},
|
|
@@ -10101,6 +10172,15 @@ const buildUiSchema = (config) => {
|
|
|
10101
10172
|
let elements = {};
|
|
10102
10173
|
const componentScope = `#/properties/${config.name}`;
|
|
10103
10174
|
switch (config.type) {
|
|
10175
|
+
case "AadharcardText":
|
|
10176
|
+
elements = buildAdhaarField(config, componentScope);
|
|
10177
|
+
break;
|
|
10178
|
+
case "PanCardText":
|
|
10179
|
+
elements = buildPanField(config, componentScope);
|
|
10180
|
+
break;
|
|
10181
|
+
case "TabSection":
|
|
10182
|
+
elements = buildTabSection(config);
|
|
10183
|
+
break;
|
|
10104
10184
|
case "RunnerBoyProgressBar":
|
|
10105
10185
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
10106
10186
|
break;
|