@redneckz/wildless-cms-uni-blocks 0.14.1039 → 0.14.1040
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +17 -23
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.js +8 -14
- package/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.js +7 -13
- package/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +17 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.js +8 -14
- package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.js +7 -13
- package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/mobile/src/components/ReferalForm/referalFormData.ts +8 -14
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/package.json +1 -1
- package/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/src/components/ReferalForm/referalFormData.ts +8 -14
- package/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.js +0 -10
- package/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/lib/components/ReferalForm/renderSections.js +0 -7
- package/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.js +0 -10
- package/mobile/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/lib/components/ReferalForm/renderSections.js +0 -7
- package/mobile/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/src/components/ReferalForm/renderSections.tsx +0 -18
- package/src/components/ReferalForm/renderSections.tsx +0 -18
package/bundle/bundle.umd.js
CHANGED
|
@@ -3833,7 +3833,7 @@
|
|
|
3833
3833
|
|
|
3834
3834
|
const renderTitle = (title) => title ? (jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: title }) })) : null;
|
|
3835
3835
|
|
|
3836
|
-
const renderSections
|
|
3836
|
+
const renderSections = (sections, field, { typeForm, additionalParams }) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field, { typeForm, ...additionalParams }))] }, `section-${i}`)));
|
|
3837
3837
|
|
|
3838
3838
|
const useInterval = (handler, period) => {
|
|
3839
3839
|
const timer = useRef(null);
|
|
@@ -4042,7 +4042,7 @@
|
|
|
4042
4042
|
});
|
|
4043
4043
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4044
4044
|
const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
|
|
4045
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections
|
|
4045
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections(sections, field, { typeForm, additionalParams }), renderAgreementSubmit({
|
|
4046
4046
|
consentDataProcessing,
|
|
4047
4047
|
link,
|
|
4048
4048
|
additionalLink,
|
|
@@ -14186,25 +14186,20 @@
|
|
|
14186
14186
|
return (jsxs(BlockWrapper, { className: style('p-6xl space-y-xl', className), defaultPadding: "p-0", ...rest, children: [jsx(Heading, { className: "mb-xl", children: title }), isArchive ? renderDataPickForm() : null, ratesList.map((list, i) => (jsx(RatesTableItem, { list: list, isRatesValid: isRatesValid, isArchive: isArchive, infoMessage: infoMessage }, String(i)))), href ? renderLink(href) : null] }));
|
|
14187
14187
|
});
|
|
14188
14188
|
|
|
14189
|
-
const
|
|
14190
|
-
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
14189
|
+
const inputs = [
|
|
14191
14190
|
{
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
{
|
|
14199
|
-
name: 'email',
|
|
14200
|
-
required: true,
|
|
14201
|
-
},
|
|
14202
|
-
],
|
|
14191
|
+
name: 'dadataPartyInnSelect',
|
|
14192
|
+
required: true,
|
|
14193
|
+
},
|
|
14194
|
+
{
|
|
14195
|
+
name: 'email',
|
|
14196
|
+
required: true,
|
|
14203
14197
|
},
|
|
14204
14198
|
];
|
|
14205
14199
|
|
|
14206
|
-
const
|
|
14207
|
-
|
|
14200
|
+
const defaultIcon = {
|
|
14201
|
+
icon: 'CopyIcon',
|
|
14202
|
+
};
|
|
14208
14203
|
const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
|
|
14209
14204
|
const onClick = useCallback(async () => {
|
|
14210
14205
|
try {
|
|
@@ -14214,7 +14209,7 @@
|
|
|
14214
14209
|
console.log('Ошибка копирования');
|
|
14215
14210
|
}
|
|
14216
14211
|
}, []);
|
|
14217
|
-
return (jsxs("div", { className: style('relative flex items-center max-w-lg m-auto', className), children: [jsx("input", { className: style('h-14 border-gray text-ellipsis pr-5xl', defaultStyle$1), type: "text", value: value, disabled: true }), jsx("div", { role: "button", className: "absolute right-3", onClick: onClick, children: jsx(Img, { image: copyIcon }) })] }));
|
|
14212
|
+
return (jsxs("div", { className: style('relative flex items-center max-w-lg m-auto', className), children: [jsx("input", { className: style('h-14 border-gray text-ellipsis pr-5xl', defaultStyle$1), type: "text", value: value, disabled: true }), jsx("div", { role: "button", className: "absolute right-3", onClick: onClick, children: jsx(Img, { image: copyIcon ?? defaultIcon, width: "20px" }) })] }));
|
|
14218
14213
|
});
|
|
14219
14214
|
|
|
14220
14215
|
const ResultLink = JSX(({ link, copyIcon }) => {
|
|
@@ -14224,10 +14219,9 @@
|
|
|
14224
14219
|
})] }));
|
|
14225
14220
|
});
|
|
14226
14221
|
|
|
14227
|
-
const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
|
|
14222
|
+
const ReferalForm = UniBlock(({ title, description, link = '', button, copyIcon, ...rest }) => {
|
|
14228
14223
|
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
14229
14224
|
const [referalLink, setReferalLink] = useState('');
|
|
14230
|
-
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
14231
14225
|
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
14232
14226
|
const handleSubmit = useCallback(async (formData) => {
|
|
14233
14227
|
setReferalLink(`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`);
|
|
@@ -14238,9 +14232,9 @@
|
|
|
14238
14232
|
formValidator,
|
|
14239
14233
|
onSubmit: handleSubmit,
|
|
14240
14234
|
});
|
|
14241
|
-
return (jsx(ApplicationFormLayout, { className: "container space-y-m col-span-12", title: getTitle(isShowResultLink), ...rest, children: isShowResultLink ? (jsx(ResultLink, { link: referalLink, copyIcon: copyIcon })) : (jsxs("form", { onSubmit: onSubmit, children: [
|
|
14235
|
+
return (jsx(ApplicationFormLayout, { className: "container space-y-m col-span-12", title: getTitle(title, isShowResultLink), ...rest, children: isShowResultLink ? (jsx(ResultLink, { link: referalLink, copyIcon: copyIcon })) : (jsxs("form", { onSubmit: onSubmit, children: [jsxs("div", { className: "grid @xl:grid-cols-2 gap-x-m", children: [renderTitle(description), inputs.map(getField(field))] }), jsxs(Paragraph, { size: "text-l", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), jsx(Link, { href: "/privacy-policy", target: "_blank", ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F\u043C\u0438 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(SubmitButton$1, { className: "w-full @xl:w-auto mt-xs", children: button?.text ?? 'Получить ссылку' })] })) }));
|
|
14242
14236
|
});
|
|
14243
|
-
const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' :
|
|
14237
|
+
const getTitle = (title = '', isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : title;
|
|
14244
14238
|
|
|
14245
14239
|
const RichTextBlock = UniBlock((props) => {
|
|
14246
14240
|
const { __html, dynamicQueryParamText = {}, dynamicTextSource, richVersion = '', ...rest } = props;
|
|
@@ -14782,7 +14776,7 @@
|
|
|
14782
14776
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14783
14777
|
});
|
|
14784
14778
|
|
|
14785
|
-
const packageVersion = "0.14.
|
|
14779
|
+
const packageVersion = "0.14.1039";
|
|
14786
14780
|
|
|
14787
14781
|
exports.Blocks = Blocks;
|
|
14788
14782
|
exports.ContentPage = ContentPage;
|