ublo-lib 1.47.107 → 1.47.109

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.
@@ -101,6 +101,8 @@ function getTag(type) {
101
101
  return Checkbox;
102
102
  case "number":
103
103
  return NumberPicker;
104
+ case "input-number":
105
+ return Input;
104
106
  default:
105
107
  return Input;
106
108
  }
@@ -129,6 +131,9 @@ function getProps(type, name, className, data, required, placeholder, autoSizing
129
131
  if (type === "number") {
130
132
  return { withInput: true, onChange, min, max, ...commonProps };
131
133
  }
134
+ if (type === "input-number") {
135
+ return { type: "number", onValueChange: onChange, ...commonProps };
136
+ }
132
137
  return { type, onValueChange: onChange, ...commonProps };
133
138
  }
134
139
  function getLabel(lang, label, required) {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/common/components/custom-contact-form/messages.js"],"names":[],"mappings":"AA8FA,6CAIC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/common/components/custom-contact-form/messages.js"],"names":[],"mappings":"AAgGA,6CAIC"}
@@ -33,6 +33,7 @@ const locales = {
33
33
  TESTS_PHONE_ERROR: 'Le téléphone doit être au format "0612345678" ou "+33612345678"',
34
34
  TESTS_TEXTAREA_ERROR: "Ce champ ne doit pas être vide",
35
35
  TESTS_SELECT_ERROR: "Ce champ ne doit pas être vide",
36
+ TESTS_NUMBER_ERROR: "Ce champ doit être supérieur à 0.",
36
37
  TESTS_MULTIPLE_SELECT_ERROR: "Ce champ ne doit pas être vide",
37
38
  optionnal: "optionnel",
38
39
  },
@@ -69,6 +70,7 @@ const locales = {
69
70
  TESTS_PHONE_ERROR: 'The phone number must be in the following formats: "0612345678" or "+33612345678"',
70
71
  TESTS_TEXTAREA_ERROR: "This field cannot be empty",
71
72
  TESTS_SELECT_ERROR: "This field cannot be empty",
73
+ TESTS_NUMBER_ERROR: "This field must be greater than 0.",
72
74
  TESTS_MULTIPLE_SELECT_ERROR: "This field cannot be empty",
73
75
  optionnal: "optionnal",
74
76
  },
@@ -15,6 +15,7 @@ export const FIELD_TESTS_ERROR_CODES: {
15
15
  phone: string;
16
16
  textarea: string;
17
17
  select: string;
18
+ number: string;
18
19
  "multiple-select": string;
19
20
  };
20
21
  export function validate(type: any, value: any, required: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/components/custom-contact-form/utils.js"],"names":[],"mappings":"AAwBA,yFAiCC;AAyDD,qDAQC;;;;;;;;;AA9GD;;;;;;;;EAQE;AAuCK,oEAQN;AAEM,uDAIN;AAEM;;;;;;;iBAqCN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/components/custom-contact-form/utils.js"],"names":[],"mappings":"AAyBA,yFAiCC;AAyDD,qDAQC;;;;;;;;;AA/GD;;;;;;;;;EASE;AAuCK,oEAQN;AAEM,uDAIN;AAEM;;;;;;;iBAqCN"}
@@ -14,6 +14,7 @@ export const FIELD_TESTS_ERROR_CODES = {
14
14
  phone: "TESTS_PHONE_ERROR",
15
15
  textarea: "TESTS_TEXTAREA_ERROR",
16
16
  select: "TESTS_SELECT_ERROR",
17
+ number: "TESTS_NUMBER_ERROR",
17
18
  "multiple-select": "TESTS_MULTIPLE_SELECT_ERROR",
18
19
  };
19
20
  const IGNORED_FIELDS = ["title", "subject", "attachment", "checkbox"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.47.107",
3
+ "version": "1.47.109",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.12.0",