@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.
Files changed (87) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +48 -28
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  5. package/bundle/components/Footer/LinkList.d.ts +0 -1
  6. package/bundle/model/AspectsProps.d.ts +9 -1
  7. package/bundle/retail/hooks/useReferalProgramm.d.ts +1 -0
  8. package/bundle/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  9. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
  10. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  11. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  12. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
  13. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  14. package/dist/components/Footer/LinkList.d.ts +0 -1
  15. package/dist/components/Footer/LinkList.js +2 -2
  16. package/dist/components/Footer/LinkList.js.map +1 -1
  17. package/dist/model/AspectsProps.d.ts +9 -1
  18. package/dist/retail/hooks/useReferalProgramm.d.ts +1 -0
  19. package/dist/retail/hooks/useReferalProgramm.js +43 -0
  20. package/dist/retail/hooks/useReferalProgramm.js.map +1 -0
  21. package/dist/ui-kit/Sitemap/Sitemap.js +3 -3
  22. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  23. package/dist/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  24. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
  25. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  26. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  27. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
  28. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  29. package/lib/components/Footer/LinkList.d.ts +0 -1
  30. package/lib/components/Footer/LinkList.js +2 -2
  31. package/lib/components/Footer/LinkList.js.map +1 -1
  32. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  33. package/lib/model/AspectsProps.d.ts +9 -1
  34. package/lib/retail/components/DraftDialog/utils.d.ts +3 -3
  35. package/lib/retail/hooks/useReferalProgramm.d.ts +1 -0
  36. package/lib/retail/hooks/useReferalProgramm.js +40 -0
  37. package/lib/retail/hooks/useReferalProgramm.js.map +1 -0
  38. package/lib/ui-kit/Sitemap/Sitemap.js +3 -3
  39. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  40. package/lib/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  41. package/mobile/bundle/bundle.umd.js +45 -25
  42. package/mobile/bundle/bundle.umd.min.js +1 -1
  43. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  44. package/mobile/bundle/components/Footer/LinkList.d.ts +0 -1
  45. package/mobile/bundle/model/AspectsProps.d.ts +9 -1
  46. package/mobile/bundle/retail/hooks/useReferalProgramm.d.ts +1 -0
  47. package/mobile/bundle/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  48. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
  49. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  50. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  51. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
  52. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  53. package/mobile/dist/components/Footer/LinkList.d.ts +0 -1
  54. package/mobile/dist/components/Footer/LinkList.js +2 -2
  55. package/mobile/dist/components/Footer/LinkList.js.map +1 -1
  56. package/mobile/dist/model/AspectsProps.d.ts +9 -1
  57. package/mobile/dist/retail/hooks/useReferalProgramm.d.ts +1 -0
  58. package/mobile/dist/retail/hooks/useReferalProgramm.js +43 -0
  59. package/mobile/dist/retail/hooks/useReferalProgramm.js.map +1 -0
  60. package/mobile/dist/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  61. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -1
  62. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  63. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +0 -2
  64. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +5 -21
  65. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  66. package/mobile/lib/components/Footer/LinkList.d.ts +0 -1
  67. package/mobile/lib/components/Footer/LinkList.js +2 -2
  68. package/mobile/lib/components/Footer/LinkList.js.map +1 -1
  69. package/mobile/lib/model/AspectsProps.d.ts +9 -1
  70. package/mobile/lib/retail/hooks/useReferalProgramm.d.ts +1 -0
  71. package/mobile/lib/retail/hooks/useReferalProgramm.js +40 -0
  72. package/mobile/lib/retail/hooks/useReferalProgramm.js.map +1 -0
  73. package/mobile/lib/ui-kit/Sitemap/SitemapProps.d.ts +1 -0
  74. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -1
  75. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +6 -32
  76. package/mobile/src/components/Footer/LinkList.tsx +2 -7
  77. package/mobile/src/model/AspectsProps.ts +11 -1
  78. package/mobile/src/retail/hooks/useReferalProgramm.ts +45 -0
  79. package/mobile/src/ui-kit/Sitemap/SitemapProps.ts +1 -0
  80. package/package.json +1 -1
  81. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +3 -1
  82. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +6 -32
  83. package/src/components/Footer/LinkList.tsx +2 -7
  84. package/src/model/AspectsProps.ts +11 -1
  85. package/src/retail/hooks/useReferalProgramm.ts +45 -0
  86. package/src/ui-kit/Sitemap/Sitemap.tsx +29 -29
  87. package/src/ui-kit/Sitemap/SitemapProps.ts +1 -0
@@ -0,0 +1,40 @@
1
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useLeadFormStore } from '../../components/ApplicationLeadForm/useLeadFormStore.js';
3
+ import { handleAspects } from '../../hooks/useAspects/handleAspects.js';
4
+ import { useAspects } from '../../hooks/useAspects/useAspects.js';
5
+ export const useReferalProgramm = () => {
6
+ const leadFormStore = useLeadFormStore();
7
+ const aspects = useAspects();
8
+ useEffect(() => {
9
+ const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
10
+ const referalCode = params.get('referalCode');
11
+ const refererCode = params.get('refererCode');
12
+ const productId = params.get('productId');
13
+ if (referalCode) {
14
+ leadFormStore.referalData = {
15
+ refererCode,
16
+ referalCode,
17
+ productId,
18
+ };
19
+ const eventJSON = JSON.stringify({
20
+ refererCode,
21
+ referalCode,
22
+ productId,
23
+ });
24
+ handleAspects({
25
+ aspectsAttributes: [
26
+ {
27
+ aspectName: 'snowplowEvent',
28
+ params: {
29
+ eventName: 'ownfin_referal_link_attributes',
30
+ eventJSON,
31
+ },
32
+ },
33
+ ],
34
+ aspects,
35
+ ev: {},
36
+ });
37
+ }
38
+ }, []);
39
+ };
40
+ //# sourceMappingURL=useReferalProgramm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReferalProgramm.js","sourceRoot":"","sources":["../../../src/retail/hooks/useReferalProgramm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QAEpF,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAE1C,IAAI,WAAW,EAAE;YACf,aAAa,CAAC,WAAW,GAAG;gBAC1B,WAAW;gBACX,WAAW;gBACX,SAAS;aACV,CAAC;YACF,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;gBAC/B,WAAW;gBACX,WAAW;gBACX,SAAS;aACV,CAAC,CAAC;YAEH,aAAa,CAAC;gBACZ,iBAAiB,EAAE;oBACjB;wBACE,UAAU,EAAE,eAAe;wBAC3B,MAAM,EAAE;4BACN,SAAS,EAAE,gCAAgC;4BAC3C,SAAS;yBACV;qBACF;iBACF;gBACD,OAAO;gBACP,EAAE,EAAE,EAAgC;aACrC,CAAC,CAAC;SACJ;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC"}
@@ -8,15 +8,15 @@ import { style } from '../../utils/style.js';
8
8
  import { isVisibleItem } from './isVisibleItem.js';
9
9
  const FOOTER_AREA_KEYS = ['all', 'footer'];
10
10
  const IS_SINGLE_SEARCH_INDEX = Boolean(env.SINGLE_SEARCH_INDEX);
11
- export const Sitemap = JSX(({ className, navigationItems }) => {
11
+ export const Sitemap = JSX(({ className, navigationItems, isSearchPanel = false }) => {
12
12
  const link = useLink();
13
13
  const filteredItems = navigationItems?.filter(isVisibleItem(FOOTER_AREA_KEYS))?.map(link) ?? [];
14
14
  const [firstItem] = filteredItems;
15
- return (_jsx("div", { className: "space-y-2", children: IS_SINGLE_SEARCH_INDEX ? (_jsx("div", { children: _jsx(LinkList, { className: "columns-3 space-y-3 gap-x-6xl", items: firstItem?.items, isFlex: false }) })) : (_jsx("div", { role: "menu", className: style('w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2', className), children: filteredItems?.map(renderColumn) })) }));
15
+ return (_jsx("div", { className: "space-y-2", children: IS_SINGLE_SEARCH_INDEX && 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) })) }));
16
16
  });
17
17
  const renderColumn = (menuItem, index) => {
18
18
  const { text, items = [], href, target = '_self', onClick, dataFooter } = menuItem;
19
19
  const visibleSubItems = items.filter(isVisibleItem(FOOTER_AREA_KEYS));
20
- 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)));
20
+ 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)));
21
21
  };
22
22
  //# sourceMappingURL=Sitemap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sitemap.js","sourceRoot":"","sources":["../../../src/ui-kit/Sitemap/Sitemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;A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C,SAAS,EAAC,qBAAqB,EAAC,KAAK,EAAE,eAAe,GAAI,CACrE,CAAC,CAAC,CAAC,IAAI,KAbgB,MAAM,CAAC,KAAK,CAAC,CAcjC,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -2,4 +2,5 @@ import { type TopMenuItemProps } from '../../data/NavigationData';
2
2
  import { type ComponentType } from '../../model/ComponentType';
3
3
  export interface SitemapProps extends ComponentType {
4
4
  navigationItems?: TopMenuItemProps[];
5
+ isSearchPanel?: boolean;
5
6
  }
@@ -6336,6 +6336,7 @@
6336
6336
  const [ok, setOK] = useState();
6337
6337
  const saveUserData = useSaveUserData();
6338
6338
  const sessionStore = useSessionStore();
6339
+ const leadFormStore = useLeadFormStore();
6339
6340
  const sendAspects = useSendLeadFormAspects({ data });
6340
6341
  const navigator = locationNavigator();
6341
6342
  const goToNextStep = useCallback(() => {
@@ -6351,7 +6352,7 @@
6351
6352
  const profileId = await createUserProfile({
6352
6353
  profile: { phone: formatPhone(transformedFormData.phone) },
6353
6354
  });
6354
- const referalData = sessionStore.referalData;
6355
+ const referalData = leadFormStore.referalData;
6355
6356
  const marketingInfo = sessionStore.marketingInfo;
6356
6357
  if (!profileId) {
6357
6358
  throw new Error();
@@ -6548,6 +6549,42 @@
6548
6549
  return res;
6549
6550
  });
6550
6551
 
6552
+ const useReferalProgramm = () => {
6553
+ const leadFormStore = useLeadFormStore();
6554
+ const aspects = useAspects();
6555
+ useEffect(() => {
6556
+ const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
6557
+ const referalCode = params.get('referalCode');
6558
+ const refererCode = params.get('refererCode');
6559
+ const productId = params.get('productId');
6560
+ if (referalCode) {
6561
+ leadFormStore.referalData = {
6562
+ refererCode,
6563
+ referalCode,
6564
+ productId,
6565
+ };
6566
+ const eventJSON = JSON.stringify({
6567
+ refererCode,
6568
+ referalCode,
6569
+ productId,
6570
+ });
6571
+ handleAspects({
6572
+ aspectsAttributes: [
6573
+ {
6574
+ aspectName: 'snowplowEvent',
6575
+ params: {
6576
+ eventName: 'ownfin_referal_link_attributes',
6577
+ eventJSON,
6578
+ },
6579
+ },
6580
+ ],
6581
+ aspects,
6582
+ ev: {},
6583
+ });
6584
+ }
6585
+ }, []);
6586
+ };
6587
+
6551
6588
  const initialFormState = {
6552
6589
  surname: '',
6553
6590
  name: '',
@@ -6756,6 +6793,7 @@
6756
6793
  const saveForm = useSetter(leadFormStore, 'leadForm');
6757
6794
  const sessionStore = useSessionStore();
6758
6795
  const queryFromStorage = globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY);
6796
+ useReferalProgramm();
6759
6797
  const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
6760
6798
  const requestEsiaProfile = useCallback(async (code, state) => {
6761
6799
  setEsiaStatus(EsiaStatuses.Pending);
@@ -6781,15 +6819,7 @@
6781
6819
  }, []);
6782
6820
  useEffect(() => {
6783
6821
  leadFormStore.productType = productType;
6784
- const { referalCode, refererCode, productId, marketingInfo } = getLeadQueryParams(queryFromStorage, sessionStore);
6785
- if (referalCode) {
6786
- sessionStore.referalData = {
6787
- refererCode,
6788
- referalCode,
6789
- productId,
6790
- };
6791
- }
6792
- sessionStore.marketingInfo = marketingInfo;
6822
+ sessionStore.marketingInfo = getMarketingInfo(queryFromStorage, sessionStore);
6793
6823
  }, [queryFromStorage]);
6794
6824
  useEffect(() => {
6795
6825
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
@@ -6805,15 +6835,11 @@
6805
6835
  }, []);
6806
6836
  return initialFormState;
6807
6837
  };
6808
- const getLeadQueryParams = (queryFromStorage, sessionStore) => {
6809
- const referalData = sessionStore.referalData;
6838
+ const getMarketingInfo = (queryFromStorage, sessionStore) => {
6810
6839
  const marketingInfoFromStorage = sessionStore.marketingInfo;
6811
6840
  const queryStorage = new URLSearchParams(decodeURIComponent(queryFromStorage || ''));
6812
6841
  const code = queryStorage.get('code');
6813
- const referalCode = code ? referalData?.referalCode : queryStorage.get('referalCode');
6814
- const refererCode = code ? referalData?.refererCode : queryStorage.get('refererCode');
6815
- const productId = code ? referalData?.productId : queryStorage.get('productId');
6816
- const marketingInfo = code
6842
+ return code
6817
6843
  ? marketingInfoFromStorage
6818
6844
  : {
6819
6845
  utm_campaign: queryStorage.get('utm_campaign'),
@@ -6824,12 +6850,6 @@
6824
6850
  bannerId: queryStorage.get('bannerId'),
6825
6851
  userId: queryStorage.get('userId'),
6826
6852
  };
6827
- return {
6828
- referalCode,
6829
- refererCode,
6830
- productId,
6831
- marketingInfo,
6832
- };
6833
6853
  };
6834
6854
 
6835
6855
  const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
@@ -10495,9 +10515,9 @@
10495
10515
  });
10496
10516
  const getCurrencyRates = (currencies) => currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
10497
10517
 
10498
- const LinkList = JSX(({ className = '', items, isFlex = true }) => {
10518
+ const LinkList = JSX(({ className, items }) => {
10499
10519
  const link = useLink();
10500
- return (jsx("ul", { className: style(isFlex ? 'flex flex-col gap-s' : 'block', 'w-full', className), children: items?.map(renderLinkListItem(link)) }));
10520
+ return jsx("ul", { className: style('w-full', className), children: items?.map(renderLinkListItem(link)) });
10501
10521
  });
10502
10522
  const renderLinkListItem = (link) => ({ dataFooter, ...linkProps }, i) => {
10503
10523
  const { text, href, target, onClick } = link(linkProps);
@@ -11835,7 +11855,7 @@
11835
11855
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11836
11856
  });
11837
11857
 
11838
- const packageVersion = "0.14.914";
11858
+ const packageVersion = "0.14.916";
11839
11859
 
11840
11860
  exports.Blocks = Blocks;
11841
11861
  exports.ContentPage = ContentPage;