@redneckz/wildless-cms-uni-blocks 0.14.965 → 0.14.966
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 +23 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/bundle/components/ApplicationForm/handlers.d.ts +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/dist/components/ApplicationForm/handlers.d.ts +2 -1
- package/dist/components/ApplicationForm/handlers.js +20 -3
- package/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/lib/components/ApplicationForm/handlers.d.ts +2 -1
- package/lib/components/ApplicationForm/handlers.js +20 -3
- package/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +23 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/mobile/bundle/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/mobile/dist/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/handlers.js +20 -3
- package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -0
- package/mobile/lib/components/ApplicationForm/handlers.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/handlers.js +20 -3
- package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -0
- package/mobile/src/components/ApplicationForm/handlers.ts +26 -3
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +25 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -0
- package/src/components/ApplicationForm/handlers.ts +26 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -1906,11 +1906,28 @@
|
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
|
-
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, }) => {
|
|
1910
|
-
const
|
|
1909
|
+
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, withSnowplow, }) => {
|
|
1910
|
+
const response = await API$2.send(formatData, router, endpoint === 'lead');
|
|
1911
|
+
const ok = Boolean(response);
|
|
1911
1912
|
responseTypeDialog.open({ ok });
|
|
1912
1913
|
if (ok) {
|
|
1913
|
-
|
|
1914
|
+
const { requestId } = response;
|
|
1915
|
+
const { phone } = formatData;
|
|
1916
|
+
const utms = router.pathname.split('?')[1];
|
|
1917
|
+
const eventJSON = JSON.stringify({
|
|
1918
|
+
id: requestId,
|
|
1919
|
+
phone: String(phone),
|
|
1920
|
+
utm: utms,
|
|
1921
|
+
});
|
|
1922
|
+
const snowplowAspect = {
|
|
1923
|
+
aspectName: 'snowplowEvent',
|
|
1924
|
+
params: {
|
|
1925
|
+
eventAction: 'clickdepapl',
|
|
1926
|
+
eventJSON,
|
|
1927
|
+
},
|
|
1928
|
+
};
|
|
1929
|
+
const aspectsData = withSnowplow ? [...(data ?? []), snowplowAspect] : data;
|
|
1930
|
+
handleAspects({ aspectsAttributes: aspectsData, aspects, ev });
|
|
1914
1931
|
}
|
|
1915
1932
|
};
|
|
1916
1933
|
|
|
@@ -3043,7 +3060,7 @@
|
|
|
3043
3060
|
};
|
|
3044
3061
|
const ApplicationForm = UniBlock(
|
|
3045
3062
|
// eslint-disable-next-line max-lines-per-function
|
|
3046
|
-
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
|
|
3063
|
+
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, withSnowplow, isContacts, data, onSuccess, ...rest }) => {
|
|
3047
3064
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
3048
3065
|
const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
|
|
3049
3066
|
const router = useRouter();
|
|
@@ -3064,6 +3081,7 @@
|
|
|
3064
3081
|
verifyPhoneDialog,
|
|
3065
3082
|
onSuccess,
|
|
3066
3083
|
endpoint,
|
|
3084
|
+
withSnowplow,
|
|
3067
3085
|
});
|
|
3068
3086
|
}, [typeForm]);
|
|
3069
3087
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
@@ -13016,7 +13034,7 @@
|
|
|
13016
13034
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13017
13035
|
});
|
|
13018
13036
|
|
|
13019
|
-
const packageVersion = "0.14.
|
|
13037
|
+
const packageVersion = "0.14.965";
|
|
13020
13038
|
|
|
13021
13039
|
exports.Blocks = Blocks;
|
|
13022
13040
|
exports.ContentPage = ContentPage;
|