impaktapps-ui-builder 0.0.303 → 0.0.304

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.
@@ -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,84 @@ const buildArray = (config, componentScope) => {
9983
9985
  array.scope = componentScope;
9984
9986
  return array;
9985
9987
  };
9988
+ const TextField = {
9989
+ type: "Control",
9990
+ scope: "#/properties/text",
9991
+ options: {
9992
+ widget: "InputField"
9993
+ },
9994
+ config: {
9995
+ layout: {
9996
+ xs: 11,
9997
+ sm: 11,
9998
+ md: 5.5,
9999
+ lg: 5.5
10000
+ },
10001
+ main: {
10002
+ label: "Aadhaar No.",
10003
+ max: 2e3,
10004
+ step: 200,
10005
+ autoFormat: true,
10006
+ patternRegex: "^[0-9\\s]*$",
10007
+ spaceIndex: 4,
10008
+ autoMaskLength: 4,
10009
+ autoMask: true,
10010
+ defaultStyle: true
10011
+ },
10012
+ style: {}
10013
+ }
10014
+ };
10015
+ const buildAdhaarField = (config, componentScope) => {
10016
+ const inputField = _.cloneDeep(TextField);
10017
+ inputField.config.main.label = config.label;
10018
+ if (config.style) {
10019
+ inputField.config.style = JSON.parse(config.style);
10020
+ }
10021
+ if (config.layout) {
10022
+ inputField.config.layout = createLayoutFormat(config.layout);
10023
+ }
10024
+ inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
10025
+ inputField.scope = componentScope;
10026
+ return inputField;
10027
+ };
10028
+ const PanField = {
10029
+ type: "Control",
10030
+ scope: "#/properties/text",
10031
+ options: {
10032
+ widget: "InputField"
10033
+ },
10034
+ config: {
10035
+ layout: {
10036
+ xs: 11,
10037
+ sm: 11,
10038
+ md: 5.5,
10039
+ lg: 5.5
10040
+ },
10041
+ main: {
10042
+ label: "Aadhaar No.",
10043
+ max: 2e3,
10044
+ step: 200,
10045
+ patternRegex: "^[A-Z]{5}[0-9]{4}[A-Z]$",
10046
+ spaceIndex: 4,
10047
+ autoMaskLength: 4,
10048
+ defaultStyle: true
10049
+ },
10050
+ style: {}
10051
+ }
10052
+ };
10053
+ const buildPanField = (config, componentScope) => {
10054
+ const inputField = _.cloneDeep(PanField);
10055
+ inputField.config.main.label = config.label;
10056
+ if (config.style) {
10057
+ inputField.config.style = JSON.parse(config.style);
10058
+ }
10059
+ if (config.layout) {
10060
+ inputField.config.layout = createLayoutFormat(config.layout);
10061
+ }
10062
+ inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
10063
+ inputField.scope = componentScope;
10064
+ return inputField;
10065
+ };
9986
10066
  let schema = {
9987
10067
  type: "object",
9988
10068
  properties: {},
@@ -10101,6 +10181,15 @@ const buildUiSchema = (config) => {
10101
10181
  let elements = {};
10102
10182
  const componentScope = `#/properties/${config.name}`;
10103
10183
  switch (config.type) {
10184
+ case "AadharcardText":
10185
+ elements = buildAdhaarField(config, componentScope);
10186
+ break;
10187
+ case "PanCardText":
10188
+ elements = buildPanField(config, componentScope);
10189
+ break;
10190
+ case "TabSection":
10191
+ elements = buildTabSection(config);
10192
+ break;
10104
10193
  case "RunnerBoyProgressBar":
10105
10194
  elements = RunnerBoyProgressbar(config, componentScope);
10106
10195
  break;