@redneckz/wildless-cms-uni-blocks 0.14.274 → 0.14.275
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/bin/migration-scripts/0.14.272.js +25 -0
- package/bundle/bundle.umd.js +3 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +3 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +1 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +6 -1
- package/mobile/src/components/ApplicationFormCustom/getFormatData.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +6 -1
- package/src/components/ApplicationFormCustom/getFormatData.tsx +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { deleteProp, traversePageBlocks } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export const description = 'v0.14.272';
|
|
4
|
+
|
|
5
|
+
export default traversePageBlocks(adjustApplicationFormUltraPremiumBlock);
|
|
6
|
+
|
|
7
|
+
function adjustApplicationFormUltraPremiumBlock(block) {
|
|
8
|
+
const content = block?.content;
|
|
9
|
+
const isUltraOrPremium =
|
|
10
|
+
content?.typeForm === 'ULTRASERVICE' || content?.typeForm === 'PREMIUMSERVICE';
|
|
11
|
+
|
|
12
|
+
if (!content?.sections || !isUltraOrPremium || block.type !== 'ApplicationFormCustom') {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
block.content.sections.map((section) => deleteRequired(section?.inputs));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const deleteRequired = (inputs) =>
|
|
19
|
+
inputs?.map((_) => {
|
|
20
|
+
if (_?.name === 'email') {
|
|
21
|
+
deleteProp(_, 'required');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _;
|
|
25
|
+
});
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -1694,6 +1694,7 @@
|
|
|
1694
1694
|
...getVedTypes(vedTypes),
|
|
1695
1695
|
...getRegion(region),
|
|
1696
1696
|
...(partnerComments ? { partnerComments } : {}),
|
|
1697
|
+
...(serviceType ? { typeForm: serviceType } : {}),
|
|
1697
1698
|
...(feedbackType ? { typeForm: feedbackType } : {}),
|
|
1698
1699
|
};
|
|
1699
1700
|
return Object.fromEntries(Object.entries(formatData)?.map(([k, v]) => [k, v?.key || v]));
|
|
@@ -1802,7 +1803,7 @@
|
|
|
1802
1803
|
reset();
|
|
1803
1804
|
}
|
|
1804
1805
|
}, [responseType]);
|
|
1805
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [_?.title ? jsx("div", { className: "@xl:text-center @xl:col-span-2", children: _.title }) : null, (_?.inputs || [])?.map(getField(field, typeForm))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }), isContacts ? renderContacts() : null] }));
|
|
1806
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [_?.title ? (jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: _.title }) })) : null, (_?.inputs || [])?.map(getField(field, typeForm))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }), isContacts ? renderContacts() : null] }));
|
|
1806
1807
|
});
|
|
1807
1808
|
const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
|
|
1808
1809
|
const getConsentDataProcessing = (inputs) => inputs?.find((_) => _?.name === 'consentDataProcessing');
|
|
@@ -6126,7 +6127,7 @@
|
|
|
6126
6127
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6127
6128
|
});
|
|
6128
6129
|
|
|
6129
|
-
const packageVersion = "0.14.
|
|
6130
|
+
const packageVersion = "0.14.274";
|
|
6130
6131
|
|
|
6131
6132
|
exports.Blocks = Blocks;
|
|
6132
6133
|
exports.ContentPage = ContentPage;
|