@redneckz/wildless-cms-uni-blocks 0.14.290 → 0.14.292
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/bundle/bundle.umd.js +14 -14
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/LeadServiceAPI.js +2 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/utils/formatDate.js +1 -1
- package/dist/utils/formatDate.js.map +1 -1
- package/lib/api/LeadServiceAPI.js +2 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/utils/formatDate.js +1 -1
- package/lib/utils/formatDate.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +14 -14
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/api/LeadServiceAPI.js +2 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/utils/formatDate.js +1 -1
- package/mobile/dist/utils/formatDate.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.js +2 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/utils/formatDate.js +1 -1
- package/mobile/lib/utils/formatDate.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +2 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +29 -0
- package/mobile/src/utils/formatDate.ts +1 -1
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +2 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +29 -0
- package/src/utils/formatDate.ts +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -824,6 +824,18 @@
|
|
|
824
824
|
});
|
|
825
825
|
const randomNumber = (min = 0, max = 0) => Math.floor(Math.random() * (max - min) + min);
|
|
826
826
|
|
|
827
|
+
const formatDate = (date, toTimeStamp = false) => {
|
|
828
|
+
if (typeof date === 'string') {
|
|
829
|
+
return date.split('-').reverse().join('.');
|
|
830
|
+
}
|
|
831
|
+
else {
|
|
832
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
833
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
834
|
+
const year = String(date.getFullYear());
|
|
835
|
+
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
|
|
827
839
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
828
840
|
|
|
829
841
|
function LeadServiceAPI() {
|
|
@@ -836,7 +848,7 @@
|
|
|
836
848
|
...getRegion$1(region, isNaturalPerson),
|
|
837
849
|
...getEmail(email, isNaturalPerson),
|
|
838
850
|
...getPhone(phone),
|
|
839
|
-
...(isNaturalPerson ? { birthday: birthday
|
|
851
|
+
...(isNaturalPerson ? { birthday: formatDate(birthday) } : { inn, fullName }),
|
|
840
852
|
...(typeForm === 'FEEDBACK'
|
|
841
853
|
? {}
|
|
842
854
|
: {
|
|
@@ -1056,18 +1068,6 @@
|
|
|
1056
1068
|
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
1057
1069
|
}
|
|
1058
1070
|
|
|
1059
|
-
const formatDate = (date, toTimeStamp = false) => {
|
|
1060
|
-
if (typeof date === 'string') {
|
|
1061
|
-
return date.split('-').reverse().join('.');
|
|
1062
|
-
}
|
|
1063
|
-
else {
|
|
1064
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
1065
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
1066
|
-
const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
|
|
1067
|
-
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
|
|
1071
1071
|
const renderLabel = (label) => label ? (jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label })) : null;
|
|
1072
1072
|
|
|
1073
1073
|
const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
|
|
@@ -6155,7 +6155,7 @@
|
|
|
6155
6155
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6156
6156
|
});
|
|
6157
6157
|
|
|
6158
|
-
const packageVersion = "0.14.
|
|
6158
|
+
const packageVersion = "0.14.291";
|
|
6159
6159
|
|
|
6160
6160
|
exports.Blocks = Blocks;
|
|
6161
6161
|
exports.ContentPage = ContentPage;
|