@redneckz/wildless-cms-uni-blocks 0.14.915 → 0.14.917
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 +48 -28
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/bundle/components/Footer/LinkList.d.ts +0 -1
- package/bundle/model/AspectsProps.d.ts +9 -1
- package/bundle/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/bundle/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/Footer/LinkList.d.ts +0 -1
- package/dist/components/Footer/LinkList.js +2 -2
- package/dist/components/Footer/LinkList.js.map +1 -1
- package/dist/model/AspectsProps.d.ts +9 -1
- package/dist/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/dist/retail/hooks/useReferalProgramm.js +43 -0
- package/dist/retail/hooks/useReferalProgramm.js.map +1 -0
- package/dist/ui-kit/Sitemap/Sitemap.js +3 -3
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/Footer/LinkList.d.ts +0 -1
- package/lib/components/Footer/LinkList.js +2 -2
- package/lib/components/Footer/LinkList.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/model/AspectsProps.d.ts +9 -1
- package/lib/retail/components/DraftDialog/utils.d.ts +3 -3
- package/lib/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/lib/retail/hooks/useReferalProgramm.js +40 -0
- package/lib/retail/hooks/useReferalProgramm.js.map +1 -0
- package/lib/ui-kit/Sitemap/Sitemap.js +3 -3
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +45 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/mobile/bundle/components/Footer/LinkList.d.ts +0 -1
- package/mobile/bundle/model/AspectsProps.d.ts +9 -1
- package/mobile/bundle/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/mobile/bundle/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/Footer/LinkList.d.ts +0 -1
- package/mobile/dist/components/Footer/LinkList.js +2 -2
- package/mobile/dist/components/Footer/LinkList.js.map +1 -1
- package/mobile/dist/model/AspectsProps.d.ts +9 -1
- package/mobile/dist/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/mobile/dist/retail/hooks/useReferalProgramm.js +43 -0
- package/mobile/dist/retail/hooks/useReferalProgramm.js.map +1 -0
- package/mobile/dist/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/Footer/LinkList.d.ts +0 -1
- package/mobile/lib/components/Footer/LinkList.js +2 -2
- package/mobile/lib/components/Footer/LinkList.js.map +1 -1
- package/mobile/lib/model/AspectsProps.d.ts +9 -1
- package/mobile/lib/retail/hooks/useReferalProgramm.d.ts +1 -0
- package/mobile/lib/retail/hooks/useReferalProgramm.js +40 -0
- package/mobile/lib/retail/hooks/useReferalProgramm.js.map +1 -0
- package/mobile/lib/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +6 -32
- package/mobile/src/components/Footer/LinkList.tsx +2 -7
- package/mobile/src/model/AspectsProps.ts +11 -1
- package/mobile/src/retail/hooks/useReferalProgramm.ts +45 -0
- package/mobile/src/ui-kit/Sitemap/SitemapProps.ts +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +6 -32
- package/src/components/Footer/LinkList.tsx +2 -7
- package/src/model/AspectsProps.ts +11 -1
- package/src/retail/hooks/useReferalProgramm.ts +45 -0
- package/src/ui-kit/Sitemap/Sitemap.tsx +29 -29
- package/src/ui-kit/Sitemap/SitemapProps.ts +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -6328,6 +6328,7 @@
|
|
|
6328
6328
|
const [ok, setOK] = useState();
|
|
6329
6329
|
const saveUserData = useSaveUserData();
|
|
6330
6330
|
const sessionStore = useSessionStore();
|
|
6331
|
+
const leadFormStore = useLeadFormStore();
|
|
6331
6332
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
6332
6333
|
const navigator = locationNavigator();
|
|
6333
6334
|
const goToNextStep = useCallback(() => {
|
|
@@ -6343,7 +6344,7 @@
|
|
|
6343
6344
|
const profileId = await createUserProfile({
|
|
6344
6345
|
profile: { phone: formatPhone(transformedFormData.phone) },
|
|
6345
6346
|
});
|
|
6346
|
-
const referalData =
|
|
6347
|
+
const referalData = leadFormStore.referalData;
|
|
6347
6348
|
const marketingInfo = sessionStore.marketingInfo;
|
|
6348
6349
|
if (!profileId) {
|
|
6349
6350
|
throw new Error();
|
|
@@ -6540,6 +6541,42 @@
|
|
|
6540
6541
|
return res;
|
|
6541
6542
|
});
|
|
6542
6543
|
|
|
6544
|
+
const useReferalProgramm = () => {
|
|
6545
|
+
const leadFormStore = useLeadFormStore();
|
|
6546
|
+
const aspects = useAspects();
|
|
6547
|
+
useEffect(() => {
|
|
6548
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6549
|
+
const referalCode = params.get('referalCode');
|
|
6550
|
+
const refererCode = params.get('refererCode');
|
|
6551
|
+
const productId = params.get('productId');
|
|
6552
|
+
if (referalCode) {
|
|
6553
|
+
leadFormStore.referalData = {
|
|
6554
|
+
refererCode,
|
|
6555
|
+
referalCode,
|
|
6556
|
+
productId,
|
|
6557
|
+
};
|
|
6558
|
+
const eventJSON = JSON.stringify({
|
|
6559
|
+
refererCode,
|
|
6560
|
+
referalCode,
|
|
6561
|
+
productId,
|
|
6562
|
+
});
|
|
6563
|
+
handleAspects({
|
|
6564
|
+
aspectsAttributes: [
|
|
6565
|
+
{
|
|
6566
|
+
aspectName: 'snowplowEvent',
|
|
6567
|
+
params: {
|
|
6568
|
+
eventName: 'ownfin_referal_link_attributes',
|
|
6569
|
+
eventJSON,
|
|
6570
|
+
},
|
|
6571
|
+
},
|
|
6572
|
+
],
|
|
6573
|
+
aspects,
|
|
6574
|
+
ev: {},
|
|
6575
|
+
});
|
|
6576
|
+
}
|
|
6577
|
+
}, []);
|
|
6578
|
+
};
|
|
6579
|
+
|
|
6543
6580
|
const initialFormState = {
|
|
6544
6581
|
surname: '',
|
|
6545
6582
|
name: '',
|
|
@@ -6748,6 +6785,7 @@
|
|
|
6748
6785
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6749
6786
|
const sessionStore = useSessionStore();
|
|
6750
6787
|
const queryFromStorage = globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY);
|
|
6788
|
+
useReferalProgramm();
|
|
6751
6789
|
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6752
6790
|
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6753
6791
|
setEsiaStatus(EsiaStatuses.Pending);
|
|
@@ -6773,15 +6811,7 @@
|
|
|
6773
6811
|
}, []);
|
|
6774
6812
|
useEffect(() => {
|
|
6775
6813
|
leadFormStore.productType = productType;
|
|
6776
|
-
|
|
6777
|
-
if (referalCode) {
|
|
6778
|
-
sessionStore.referalData = {
|
|
6779
|
-
refererCode,
|
|
6780
|
-
referalCode,
|
|
6781
|
-
productId,
|
|
6782
|
-
};
|
|
6783
|
-
}
|
|
6784
|
-
sessionStore.marketingInfo = marketingInfo;
|
|
6814
|
+
sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
|
|
6785
6815
|
}, [queryFromStorage]);
|
|
6786
6816
|
useEffect(() => {
|
|
6787
6817
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
@@ -6797,15 +6827,11 @@
|
|
|
6797
6827
|
}, []);
|
|
6798
6828
|
return initialFormState;
|
|
6799
6829
|
};
|
|
6800
|
-
const
|
|
6801
|
-
const referalData = sessionStore.referalData;
|
|
6830
|
+
const getMarketingInfo = (queryFromStorage, sessionStore) => {
|
|
6802
6831
|
const marketingInfoFromStorage = sessionStore.marketingInfo;
|
|
6803
6832
|
const queryStorage = new URLSearchParams(decodeURIComponent(queryFromStorage || ''));
|
|
6804
6833
|
const code = queryStorage.get('code');
|
|
6805
|
-
|
|
6806
|
-
const refererCode = code ? referalData?.refererCode : queryStorage.get('refererCode');
|
|
6807
|
-
const productId = code ? referalData?.productId : queryStorage.get('productId');
|
|
6808
|
-
const marketingInfo = code
|
|
6834
|
+
return code
|
|
6809
6835
|
? marketingInfoFromStorage
|
|
6810
6836
|
: {
|
|
6811
6837
|
utm_campaign: queryStorage.get('utm_campaign'),
|
|
@@ -6816,12 +6842,6 @@
|
|
|
6816
6842
|
bannerId: queryStorage.get('bannerId'),
|
|
6817
6843
|
userId: queryStorage.get('userId'),
|
|
6818
6844
|
};
|
|
6819
|
-
return {
|
|
6820
|
-
referalCode,
|
|
6821
|
-
refererCode,
|
|
6822
|
-
productId,
|
|
6823
|
-
marketingInfo,
|
|
6824
|
-
};
|
|
6825
6845
|
};
|
|
6826
6846
|
|
|
6827
6847
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
@@ -10503,9 +10523,9 @@
|
|
|
10503
10523
|
});
|
|
10504
10524
|
const getCurrencyRates = (currencies) => currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
10505
10525
|
|
|
10506
|
-
const LinkList = JSX(({ className
|
|
10526
|
+
const LinkList = JSX(({ className, items }) => {
|
|
10507
10527
|
const link = useLink();
|
|
10508
|
-
return
|
|
10528
|
+
return jsx("ul", { className: style('w-full', className), children: items?.map(renderLinkListItem(link)) });
|
|
10509
10529
|
});
|
|
10510
10530
|
const renderLinkListItem = (link) => ({ dataFooter, ...linkProps }, i) => {
|
|
10511
10531
|
const { text, href, target, onClick } = link(linkProps);
|
|
@@ -10519,16 +10539,16 @@
|
|
|
10519
10539
|
|
|
10520
10540
|
const FOOTER_AREA_KEYS = ['all', 'footer'];
|
|
10521
10541
|
const IS_SINGLE_SEARCH_INDEX$1 = Boolean(env.SINGLE_SEARCH_INDEX);
|
|
10522
|
-
const Sitemap = JSX(({ className, navigationItems }) => {
|
|
10542
|
+
const Sitemap = JSX(({ className, navigationItems, isSearchPanel = false }) => {
|
|
10523
10543
|
const link = useLink();
|
|
10524
10544
|
const filteredItems = navigationItems?.filter(isVisibleItem(FOOTER_AREA_KEYS))?.map(link) ?? [];
|
|
10525
10545
|
const [firstItem] = filteredItems;
|
|
10526
|
-
return (jsx("div", { className: "space-y-2", children: IS_SINGLE_SEARCH_INDEX$1 ? (jsx("div", { children: jsx(LinkList, { className: "columns-3 space-y-3 gap-x-6xl", items: firstItem?.items
|
|
10546
|
+
return (jsx("div", { className: "space-y-2", children: IS_SINGLE_SEARCH_INDEX$1 && isSearchPanel ? (jsx("div", { children: jsx(LinkList, { className: "block columns-3 space-y-3 gap-x-6xl", items: firstItem?.items }) })) : (jsx("div", { role: "menu", className: style('w-full flex items-start justify-between flex-col md:flex-row gap-m lg:order-2', className), children: filteredItems?.map(renderColumn) })) }));
|
|
10527
10547
|
});
|
|
10528
10548
|
const renderColumn = (menuItem, index) => {
|
|
10529
10549
|
const { text, items = [], href, target = '_self', onClick, dataFooter } = menuItem;
|
|
10530
10550
|
const visibleSubItems = items.filter(isVisibleItem(FOOTER_AREA_KEYS));
|
|
10531
|
-
return (jsxs("div", { role: "menuitem", className: "flex flex-col gap-s w-full @md:w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target, onClick: onClick, ...getAspectsAttributes(dataFooter), children: text }), visibleSubItems ? jsx(LinkList, { items: visibleSubItems }) : null] }, String(index)));
|
|
10551
|
+
return (jsxs("div", { role: "menuitem", className: "flex flex-col gap-s w-full @md:w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target, onClick: onClick, ...getAspectsAttributes(dataFooter), children: text }), visibleSubItems ? (jsx(LinkList, { className: "flex flex-col gap-s", items: visibleSubItems })) : null] }, String(index)));
|
|
10532
10552
|
};
|
|
10533
10553
|
|
|
10534
10554
|
const Contacts = JSX(({ className = '', items = [] }) => items?.length ? (jsx("div", { className: style('space-y-m', className), children: items.map(renderContactsGroup) })) : null);
|
|
@@ -12104,7 +12124,7 @@
|
|
|
12104
12124
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12105
12125
|
});
|
|
12106
12126
|
|
|
12107
|
-
const packageVersion = "0.14.
|
|
12127
|
+
const packageVersion = "0.14.916";
|
|
12108
12128
|
|
|
12109
12129
|
exports.Blocks = Blocks;
|
|
12110
12130
|
exports.ContentPage = ContentPage;
|