profinansy-ui-lib 4.1.22 → 4.1.24

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 (58) hide show
  1. package/dist/api/banner/banner.typed.d.ts +13 -1
  2. package/dist/api/quizFunnel/quizFunnel.bitrix.api.d.ts +10 -0
  3. package/dist/api/quizFunnel/quizFunnel.bitrix.const.d.ts +1 -0
  4. package/dist/api/quizFunnel/quizFunnel.bitrix.typed.d.ts +29 -0
  5. package/dist/api/quizFunnel/quizFunnel.enkod.api.d.ts +6 -0
  6. package/dist/api/quizFunnel/quizFunnel.enkod.const.d.ts +2 -0
  7. package/dist/api/quizFunnel/quizFunnel.enkod.typed.d.ts +15 -0
  8. package/dist/api/quizFunnel/quizFunnel.tilda.const.d.ts +2 -0
  9. package/dist/api/quizFunnel/quizFunnel.tilda.typed.d.ts +13 -0
  10. package/dist/components/blocks/QuizFunnel/QuizFunnel.d.ts +2 -0
  11. package/dist/components/blocks/QuizFunnel/QuizFunnel.styled.d.ts +145 -0
  12. package/dist/components/blocks/QuizFunnel/QuizFunnel.typed.d.ts +136 -0
  13. package/dist/components/blocks/QuizFunnel/constants/QuizFunnel.const.d.ts +49 -0
  14. package/dist/components/blocks/QuizFunnel/constants/QuizFunnel.layout.const.d.ts +35 -0
  15. package/dist/components/blocks/QuizFunnel/constants/QuizFunnel.metrika.const.d.ts +42 -0
  16. package/dist/components/blocks/QuizFunnel/constants/index.d.ts +4 -0
  17. package/dist/components/blocks/QuizFunnel/hooks/index.d.ts +5 -0
  18. package/dist/components/blocks/QuizFunnel/hooks/useQuizFunnelBanner.d.ts +15 -0
  19. package/dist/components/blocks/QuizFunnel/hooks/useQuizFunnelBitrix.d.ts +11 -0
  20. package/dist/components/blocks/QuizFunnel/hooks/useQuizFunnelLayout.d.ts +5 -0
  21. package/dist/components/blocks/QuizFunnel/index.d.ts +21 -0
  22. package/dist/components/blocks/QuizFunnel/utils/QuizFunnel.funnels.d.ts +11 -0
  23. package/dist/components/blocks/QuizFunnel/utils/index.d.ts +13 -0
  24. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.banner.d.ts +26 -0
  25. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.bitrix.d.ts +20 -0
  26. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.enkod.d.ts +17 -0
  27. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.leadForm.validation.d.ts +29 -0
  28. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.messenger.d.ts +33 -0
  29. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.metrika.d.ts +8 -0
  30. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.metrika.funnels.d.ts +8 -0
  31. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.referrer.d.ts +12 -0
  32. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.steps.d.ts +11 -0
  33. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.tilda.d.ts +18 -0
  34. package/dist/components/blocks/QuizFunnel/utils/quizFunnel.user.d.ts +13 -0
  35. package/dist/components/uikit/PhoneInput/PhoneInput.const.d.ts +2 -0
  36. package/dist/components/uikit/PhoneInput/PhoneInput.d.ts +3 -0
  37. package/dist/components/uikit/PhoneInput/PhoneInput.styled.d.ts +7 -0
  38. package/dist/components/uikit/PhoneInput/PhoneInput.typed.d.ts +20 -0
  39. package/dist/components/uikit/PhoneInput/index.d.ts +2 -0
  40. package/dist/components/uikit/PhoneInput/phoneInputChevron.const.d.ts +2 -0
  41. package/dist/components/uikit/Tooltip/Tooltip.d.ts +2 -1
  42. package/dist/components/uikit/Tooltip/Tooltip.styled.d.ts +1 -0
  43. package/dist/components/uikit/Tooltip/Tooltip.typed.d.ts +2 -0
  44. package/dist/components/uikit/Typography/Typography.typed.d.ts +1 -1
  45. package/dist/fonts/unbounded-cyrillic-ext.woff2 +0 -0
  46. package/dist/fonts/unbounded-cyrillic.woff2 +0 -0
  47. package/dist/fonts/unbounded-latin-ext.woff2 +0 -0
  48. package/dist/fonts/unbounded-latin.woff2 +0 -0
  49. package/dist/index.d.ts +4 -0
  50. package/dist/profinansy-ui-lib.cjs +2732 -1082
  51. package/dist/profinansy-ui-lib.cjs.map +1 -1
  52. package/dist/profinansy-ui-lib.css +1 -0
  53. package/dist/profinansy-ui-lib.es.js +15982 -11454
  54. package/dist/profinansy-ui-lib.es.js.map +1 -1
  55. package/dist/theme/fonts/UnboundedFontFace.d.ts +6 -0
  56. package/dist/theme/fonts/index.d.ts +1 -0
  57. package/dist/theme/theme.const.d.ts +4 -0
  58. package/package.json +3 -1
@@ -0,0 +1,11 @@
1
+ export type TQuizFunnelBitrixStatus = 'idle' | 'loading' | 'allowed' | 'denied';
2
+ /**
3
+ * Gate для authorized: проверка дубликата в Bitrix по email/phone из профиля.
4
+ * 409 duplicate — квиз не показываем.
5
+ * Гость или нет контактов в профиле — проверка не нужна.
6
+ */
7
+ export declare const useQuizFunnelBitrix: (enabled: boolean, isGuest: boolean) => {
8
+ status: TQuizFunnelBitrixStatus;
9
+ isAllowed: boolean;
10
+ isLoading: boolean;
11
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useQuizFunnelLayout: () => {
2
+ viewportWidth: number;
3
+ isCompactLayout: boolean;
4
+ isMobileLayout: boolean;
5
+ };
@@ -0,0 +1,21 @@
1
+ export { QuizFunnel } from './QuizFunnel';
2
+ export { resolveQuizTargetFunnel, QUIZ_TARGET_FUNNELS } from './utils';
3
+ export { buildQuizFunnelEnkodPayload, getQuizFunnelAuthToken, getQuizFunnelUserContacts, getQuizFunnelUserDisplayName, normalizeQuizFunnelCrmValue, sendQuizFunnelEnkodContact, splitQuizFunnelFullName } from './utils';
4
+ export { sendQuizEnkodContact } from '../../../api/quizFunnel/quizFunnel.enkod.api';
5
+ export { QUIZ_FUNNEL_ENKOD_SEND_PATH } from '../../../api/quizFunnel/quizFunnel.enkod.const';
6
+ export type { IQuizEnkodSendPayload, IQuizEnkodSendResponse } from '../../../api/quizFunnel/quizFunnel.enkod.typed';
7
+ export { getQuizBannerRulesOrProductIds, getQuizFunnelUserProductIdsFromJwt, isQuizFunnelAllowedByBanner, isQuizFunnelAllowedByBannerProductRules } from './utils';
8
+ export { useQuizFunnelBanner, useQuizFunnelBitrix } from './hooks';
9
+ export type { TQuizFunnelBannerStatus, TQuizFunnelBitrixStatus } from './hooks';
10
+ export { buildQuizBitrixDealCheckPayload, buildQuizBitrixDealPayload, buildQuizBitrixDealQuestionAnswers } from './utils';
11
+ export { checkQuizBitrixDeal, submitQuizBitrixDeal } from '../../../api/quizFunnel/quizFunnel.bitrix.api';
12
+ export type { IQuizBitrixDealCheckPayload, IQuizBitrixDealSubmitBasePayload, IQuizBitrixDealSubmitPayload, IQuizBitrixDealResponse, TQuizBitrixDealResult, TQuizBitrixDealStatus } from '../../../api/quizFunnel/quizFunnel.bitrix.typed';
13
+ export { QUIZ_FUNNEL_BITRIX_DEAL_URL } from '../../../api/quizFunnel/quizFunnel.bitrix.const';
14
+ export { QUIZ_FUNNEL_TILDA_SAVE_CONTACT_URL } from '../../../api/quizFunnel/quizFunnel.tilda.const';
15
+ export type { IQuizFunnelTildaContactQuery, IQuizFunnelTildaSaveContactResponse } from '../../../api/quizFunnel/quizFunnel.tilda.typed';
16
+ export { QUIZ_FUNNEL_AUTO_OPENED_STORAGE_KEY, QUIZ_FUNNEL_BANNER_CODE, QUIZ_FUNNEL_COMPLETED_STORAGE_KEY, QUIZ_FUNNEL_DISMISSED_STORAGE_KEY, QUIZ_FUNNEL_EXCLUDED_PATHS, QUIZ_FUNNEL_INTRO_IMAGE_URL, QUIZ_FUNNEL_MANAGER_LINKS, clearQuizFunnelCompleted, clearQuizFunnelDismissed, isQuizFunnelPathExcluded, markQuizFunnelAutoOpened, markQuizFunnelCompleted, markQuizFunnelDismissed, normalizeQuizFunnelPathname, wasQuizFunnelAutoOpened, wasQuizFunnelCompleted, wasQuizFunnelDismissed } from './constants';
17
+ export { QUIZ_FUNNEL_METRIKA_GOALS } from './constants';
18
+ export { createTrackQuizFunnelMetrika, trackQuizFunnelMetrika } from './utils';
19
+ export type { IQuizFunnelProps, TQuizFunnelMetrikaGoalsOverride } from './QuizFunnel.typed';
20
+ export type { TQuizFunnelMetrikaGoalKey } from './constants';
21
+ export type { IQuizTargetFunnel, IQuizTargetFunnelCrmPayload, IQuizTargetFunnelMessengerRedirects, IQuizTargetFunnelTildaSubmit, TQuizFunnelAnswersById, TQuizFunnelCrmValue, TQuizTargetFunnelId } from './QuizFunnel.typed';
@@ -0,0 +1,11 @@
1
+ import { IQuizTargetFunnel, TQuizFunnelAnswersById, TQuizTargetFunnelId } from '../QuizFunnel.typed';
2
+ export declare const QUIZ_TARGET_FUNNELS: Record<TQuizTargetFunnelId, IQuizTargetFunnel>;
3
+ /**
4
+ * Приоритет правил — как в таблице маршрутизации:
5
+ * 1. В3 = «Кредиты и долги»
6
+ * 2. В1 = «Избавиться от долгов»
7
+ * 3. В2 = 4 или 5, В1 ≠ 5, В3 ≠ 5
8
+ * 4. В1 = 4, В2 = 1–3, В3 ≠ 5
9
+ * 5. В1 = 1–3, В2 = 1–3, В3 ≠ 5
10
+ */
11
+ export declare const resolveQuizTargetFunnel: (answers: TQuizFunnelAnswersById) => IQuizTargetFunnel;
@@ -0,0 +1,13 @@
1
+ export { addQuizFunnelQueryToUrl, addQuizFunnelUlidToStart, buildQuizFunnelMessengerRedirectUrl, buildQuizFunnelMessengerRedirectUrls, buildQuizFunnelQueryString, buildQuizFunnelTelegramBaseUrl, buildQuizFunnelTelegramMaxRedirectUrl, buildQuizFunnelVkRedirectUrl, getQuizFunnelMessengerBaseUrls, getQuizFunnelQueryParams, getQuizFunnelQueryParamsWithoutUlid, getQuizFunnelTildaUtmSearch } from './quizFunnel.messenger';
2
+ export type { IBuildQuizFunnelMessengerRedirectOptions, TQuizFunnelMessengerTarget } from './quizFunnel.messenger';
3
+ export { buildQuizFunnelTelegramDeepLink, buildQuizFunnelTildaContactQuery, buildQuizFunnelTildaSaveContactUrl, saveQuizFunnelTildaContact } from './quizFunnel.tilda';
4
+ export { resolveQuizTargetFunnel, QUIZ_TARGET_FUNNELS } from './QuizFunnel.funnels';
5
+ export { getQuizFunnelAuthToken, getQuizFunnelUserContacts, getQuizFunnelUserDisplayName, splitQuizFunnelFullName } from './quizFunnel.user';
6
+ export { buildQuizFunnelEnkodPayload, normalizeQuizFunnelCrmValue, sendQuizFunnelEnkodContact } from './quizFunnel.enkod';
7
+ export { getQuizBannerRulesOrProductIds, getQuizFunnelUserProductIdsFromJwt, isQuizFunnelAllowedByBanner, isQuizFunnelAllowedByBannerProductRules } from './quizFunnel.banner';
8
+ export { buildQuizFunnelMetrikaParams, createTrackQuizFunnelMetrika, trackQuizFunnelMetrika } from './quizFunnel.metrika';
9
+ export { getQuizFunnelAwOfferViewGoal, getQuizFunnelMessengerClickGoal, getQuizFunnelQuestionAnswerGoal, getQuizFunnelQuestionViewGoal, getQuizFunnelRegistrationSuccessGoal } from './quizFunnel.metrika.funnels';
10
+ export type { TQuizFunnelMessengerMetrikaTarget } from './quizFunnel.metrika.funnels';
11
+ export type { TQuizFunnelMetrikaGoalsOverride, TQuizFunnelMetrikaParams } from './quizFunnel.metrika';
12
+ export { buildQuizBitrixDealCheckPayload, buildQuizBitrixDealPayload, buildQuizBitrixDealQuestionAnswers } from './quizFunnel.bitrix';
13
+ export { collectQuizFunnelInternalHostsFromConfig, getQuizFunnelExternalReferrer, isQuizFunnelInternalReferrerHost } from './quizFunnel.referrer';
@@ -0,0 +1,26 @@
1
+ import { IBanner } from '../../../../api/banner/banner.typed';
2
+ export interface IQuizBannerRuleOr {
3
+ has_registration?: boolean | null;
4
+ has_profinansy?: boolean | null;
5
+ has_course?: boolean | null;
6
+ tariff_id?: number | null;
7
+ product_id?: number | null;
8
+ stream_number?: number | null;
9
+ }
10
+ type TQuizBannerWithRules = Pick<IBanner, 'id' | 'banner_platform_id'> & {
11
+ rules?: {
12
+ rules_and?: unknown[];
13
+ rules_or?: IQuizBannerRuleOr[];
14
+ };
15
+ };
16
+ /** product_id из rules_or баннера quiz_funnel */
17
+ export declare const getQuizBannerRulesOrProductIds: (banner: TQuizBannerWithRules | null | undefined) => number[];
18
+ /** product_id из JWT: tariff[].p (как в MethodBanner / header) */
19
+ export declare const getQuizFunnelUserProductIdsFromJwt: (token: string) => number[];
20
+ /**
21
+ * Квиз показываем, если у пользователя нет ни одного product_id из rules_or
22
+ * (не «выпускник» перечисленных продуктов).
23
+ */
24
+ export declare const isQuizFunnelAllowedByBannerProductRules: (rulesOrProductIds: number[], userProductIds: number[]) => boolean;
25
+ export declare const isQuizFunnelAllowedByBanner: (banner: TQuizBannerWithRules | null | undefined, token: string | null | undefined) => boolean;
26
+ export {};
@@ -0,0 +1,20 @@
1
+ import { IQuizBitrixDealCheckPayload, IQuizBitrixDealSubmitPayload } from '../../../../api/quizFunnel/quizFunnel.bitrix.typed';
2
+ import { IQuizFunnelCopy } from '../QuizFunnel.typed';
3
+ /** Текст вопроса → текст выбранного ответа */
4
+ export declare const buildQuizBitrixDealQuestionAnswers: (questions: IQuizFunnelCopy['questions'], answersByQuestionId: Record<string, string>) => Record<string, string>;
5
+ export interface IBuildQuizBitrixDealPayloadOptions {
6
+ url: string;
7
+ fio: string;
8
+ email?: string;
9
+ phone?: string;
10
+ questions?: IQuizFunnelCopy['questions'];
11
+ answers?: Record<string, string>;
12
+ internalReferrerHosts?: string[];
13
+ }
14
+ /** POST /webhook/quiz/deal/add — полная отправка после формы */
15
+ export declare const buildQuizBitrixDealPayload: (options: IBuildQuizBitrixDealPayloadOptions) => IQuizBitrixDealSubmitPayload;
16
+ /** Только email/phone — gate дубликата в Bitrix */
17
+ export declare const buildQuizBitrixDealCheckPayload: (contacts: {
18
+ email?: string;
19
+ phone?: string;
20
+ }) => IQuizBitrixDealCheckPayload;
@@ -0,0 +1,17 @@
1
+ import { IQuizEnkodSendPayload, TQuizEnkodCrmValue } from '../../../../api/quizFunnel/quizFunnel.enkod.typed';
2
+ import { IQuizTargetFunnelCrmPayload, TQuizFunnelCrmValue } from '../QuizFunnel.typed';
3
+ import { IUser } from '../../../../common.types';
4
+ export interface IQuizFunnelEnkodForm {
5
+ name: string;
6
+ email: string;
7
+ phone: string;
8
+ }
9
+ /** Одно значение → строка, несколько → массив (как в API enKod) */
10
+ export declare const normalizeQuizFunnelCrmValue: (value: TQuizFunnelCrmValue | undefined) => TQuizEnkodCrmValue | undefined;
11
+ /**
12
+ * Один POST на отправку формы.
13
+ * Для гостя email обязателен.
14
+ */
15
+ export declare const buildQuizFunnelEnkodPayload: (form: IQuizFunnelEnkodForm, crm: IQuizTargetFunnelCrmPayload | undefined, isGuest: boolean) => IQuizEnkodSendPayload | null;
16
+ /** POST enKod один раз на форму; ошибки не пробрасываем */
17
+ export declare const sendQuizFunnelEnkodContact: (user: IUser | null | undefined, form: IQuizFunnelEnkodForm, crmPayloads: [IQuizTargetFunnelCrmPayload], isGuest: boolean) => Promise<void>;
@@ -0,0 +1,29 @@
1
+ export declare const QUIZ_FUNNEL_LEAD_FORM_ERRORS: {
2
+ readonly nameRequired: "Введите имя";
3
+ readonly emailRequired: "Введите почту";
4
+ readonly emailInvalid: "Введите корректный email";
5
+ readonly phoneRequired: "Введите телефон";
6
+ readonly phoneInvalid: "Введите корректный номер телефона";
7
+ readonly privacyRequired: "Необходимо согласие с политикой обработки персональных данных";
8
+ readonly mailingRequired: "Необходимо согласие на получение рекламно-информационных сообщений";
9
+ };
10
+ export interface IQuizFunnelLeadFormErrors {
11
+ name?: string;
12
+ email?: string;
13
+ phone?: string;
14
+ privacy?: string;
15
+ mailing?: string;
16
+ }
17
+ export declare const validateQuizFunnelLeadFormName: (name: string) => string | undefined;
18
+ export declare const validateQuizFunnelLeadFormEmail: (email: string) => string | undefined;
19
+ export declare const validateQuizFunnelLeadFormPhone: (phone: string, countryCode: string) => string | undefined;
20
+ export interface IQuizFunnelLeadFormValues {
21
+ name: string;
22
+ email: string;
23
+ phone: string;
24
+ phoneCountry: string;
25
+ isPrivacyAccepted: boolean;
26
+ isMailingAccepted: boolean;
27
+ }
28
+ export declare const validateQuizFunnelLeadForm: (values: IQuizFunnelLeadFormValues) => IQuizFunnelLeadFormErrors;
29
+ export declare const hasQuizFunnelLeadFormErrors: (errors: IQuizFunnelLeadFormErrors) => boolean;
@@ -0,0 +1,33 @@
1
+ import { IQuizTargetFunnelMessengerRedirects, IQuizTargetFunnelTildaSubmit } from '../QuizFunnel.typed';
2
+ export type TQuizFunnelMessengerTarget = 'vk' | 'telegram' | 'max';
3
+ /** Query страницы без параметров s_* (как в Tilda-скрипте) */
4
+ export declare const getQuizFunnelQueryParams: (search?: string) => Record<string, string>;
5
+ export declare const buildQuizFunnelQueryString: (params: Record<string, string>) => string;
6
+ export declare const getQuizFunnelQueryParamsWithoutUlid: (params: Record<string, string>) => Record<string, string>;
7
+ /** UTM-строка для save-tilda-contact2 (совместимо с прежним getQuizFunnelTildaUtmSearch) */
8
+ export declare const getQuizFunnelTildaUtmSearch: (search?: string) => string;
9
+ /** Добавить query к URL, hash сохраняется в конце */
10
+ export declare const addQuizFunnelQueryToUrl: (url: string, query: string) => string;
11
+ /**
12
+ * Дописать ulid в start (Telegram / Max): start=7_11 → start=7_11_{ulid}.
13
+ * Если start нет — start={ulid}.
14
+ */
15
+ export declare const addQuizFunnelUlidToStart: (url: string, ulid: string) => string;
16
+ /** VK: ref_source = ulid или query без ulid */
17
+ export declare const buildQuizFunnelVkRedirectUrl: (baseUrl: string, params: Record<string, string>) => string;
18
+ export declare const buildQuizFunnelTelegramMaxRedirectUrl: (baseUrl: string, params: Record<string, string>) => string;
19
+ export interface IBuildQuizFunnelMessengerRedirectOptions {
20
+ /** Базовые URL из конфига воронки (позже подставятся финальные ссылки) */
21
+ bases: Partial<IQuizTargetFunnelMessengerRedirects>;
22
+ /** ULID из save-tilda-contact2 */
23
+ ulid?: string | null;
24
+ /** Query с лендинга; по умолчанию — window.location.search */
25
+ search?: string;
26
+ /** Доп. query поверх страницы */
27
+ extraParams?: Record<string, string>;
28
+ }
29
+ export declare const buildQuizFunnelMessengerRedirectUrl: (target: TQuizFunnelMessengerTarget, options: IBuildQuizFunnelMessengerRedirectOptions) => string | null;
30
+ export declare const buildQuizFunnelMessengerRedirectUrls: (options: IBuildQuizFunnelMessengerRedirectOptions) => Partial<Record<TQuizFunnelMessengerTarget, string>>;
31
+ /** Базовый Telegram URL из telegramDeepLink, если в конфиге нет полного href */
32
+ export declare const buildQuizFunnelTelegramBaseUrl: (tilda: IQuizTargetFunnelTildaSubmit) => string | undefined;
33
+ export declare const getQuizFunnelMessengerBaseUrls: (tilda: IQuizTargetFunnelTildaSubmit) => Partial<IQuizTargetFunnelMessengerRedirects>;
@@ -0,0 +1,8 @@
1
+ import { TQuizFunnelMetrikaGoalKey } from '../constants/QuizFunnel.metrika.const';
2
+ import { TQuizFunnelOfferVariant } from '../QuizFunnel.typed';
3
+ export type TQuizFunnelMetrikaParams = Record<string, string | number | boolean | string[]>;
4
+ export type TQuizFunnelMetrikaGoalsOverride = Partial<Record<TQuizFunnelMetrikaGoalKey, string>>;
5
+ export declare const buildQuizFunnelMetrikaParams: (params?: TQuizFunnelMetrikaParams, offerVariant?: TQuizFunnelOfferVariant) => TQuizFunnelMetrikaParams;
6
+ export declare const createTrackQuizFunnelMetrika: (goalsOverride?: TQuizFunnelMetrikaGoalsOverride) => (goalKey: TQuizFunnelMetrikaGoalKey, params?: TQuizFunnelMetrikaParams, offerVariant?: TQuizFunnelOfferVariant) => void;
7
+ /** Одноразовый трекер с дефолтными целями из QUIZ_FUNNEL_METRIKA_GOALS */
8
+ export declare const trackQuizFunnelMetrika: (goalKey: TQuizFunnelMetrikaGoalKey, params?: TQuizFunnelMetrikaParams, offerVariant?: TQuizFunnelOfferVariant) => void;
@@ -0,0 +1,8 @@
1
+ import { TQuizFunnelMetrikaGoalKey } from '../constants/QuizFunnel.metrika.const';
2
+ import { TQuizFunnelStep, TQuizTargetFunnelId } from '../QuizFunnel.typed';
3
+ export type TQuizFunnelMessengerMetrikaTarget = 'telegram' | 'vk' | 'max';
4
+ export declare const getQuizFunnelAwOfferViewGoal: (funnelId: TQuizTargetFunnelId) => TQuizFunnelMetrikaGoalKey;
5
+ export declare const getQuizFunnelRegistrationSuccessGoal: (funnelId: TQuizTargetFunnelId) => TQuizFunnelMetrikaGoalKey;
6
+ export declare const getQuizFunnelMessengerClickGoal: (funnelId: TQuizTargetFunnelId, messenger: TQuizFunnelMessengerMetrikaTarget) => TQuizFunnelMetrikaGoalKey | null;
7
+ export declare const getQuizFunnelQuestionViewGoal: (step: TQuizFunnelStep) => TQuizFunnelMetrikaGoalKey | null;
8
+ export declare const getQuizFunnelQuestionAnswerGoal: (step: TQuizFunnelStep) => TQuizFunnelMetrikaGoalKey | null;
@@ -0,0 +1,12 @@
1
+ export declare const parseQuizFunnelReferrerHostname: (url: string) => string | null;
2
+ /** Hostname из hostnames ConfigLibrary (qa/prod URL других проектов) */
3
+ export declare const collectQuizFunnelInternalHostsFromConfig: (hostnames: {
4
+ hostname: string;
5
+ hostnameLMS: string;
6
+ hostnameLenta: string;
7
+ }) => string[];
8
+ export declare const isQuizFunnelInternalReferrerHost: (hostname: string, extraInternalHosts?: string[]) => boolean;
9
+ /**
10
+ * document.referrer только если источник не наш (4 проекта / *.profinansy.ru|dev).
11
+ */
12
+ export declare const getQuizFunnelExternalReferrer: (documentReferrer?: string, extraInternalHosts?: string[]) => string | undefined;
@@ -0,0 +1,11 @@
1
+ import { TQuizFunnelQuestionStep, TQuizFunnelStep } from '../QuizFunnel.typed';
2
+ export declare const QUIZ_FUNNEL_QUESTION_STEPS: readonly TQuizFunnelQuestionStep[];
3
+ export declare const isQuizFunnelQuestionStep: (step: TQuizFunnelStep) => step is TQuizFunnelQuestionStep;
4
+ export declare const getQuizFunnelQuestionIndex: (step: TQuizFunnelQuestionStep) => 0 | 1 | 2;
5
+ export declare const getQuizFunnelQuestionProgress: (step: TQuizFunnelQuestionStep) => {
6
+ current: number;
7
+ total: number;
8
+ };
9
+ export declare const canQuizFunnelQuestionGoBack: (step: TQuizFunnelQuestionStep) => boolean;
10
+ export declare const getQuizFunnelQuestionNextButtonText: (step: TQuizFunnelQuestionStep) => string;
11
+ export declare const isQuizFunnelFlushStep: (step: TQuizFunnelStep) => boolean;
@@ -0,0 +1,18 @@
1
+ import { IQuizFunnelTildaContactQuery, IQuizFunnelTildaSaveContactResponse } from '../../../../api/quizFunnel/quizFunnel.tilda.typed';
2
+ import { IQuizTargetFunnelTildaSubmit } from '../QuizFunnel.typed';
3
+ import { getQuizFunnelTildaUtmSearch } from './quizFunnel.messenger';
4
+ export { getQuizFunnelTildaUtmSearch };
5
+ export declare const buildQuizFunnelTildaContactQuery: (tilda: IQuizTargetFunnelTildaSubmit, form: Pick<IQuizFunnelTildaContactQuery, 'name' | 'email' | 'phone'>, options?: {
6
+ utmSearch?: string;
7
+ internalReferrerHosts?: string[];
8
+ }) => IQuizFunnelTildaContactQuery & {
9
+ utmSearch?: string;
10
+ };
11
+ export declare const buildQuizFunnelTildaSaveContactUrl: (query: IQuizFunnelTildaContactQuery & {
12
+ utmSearch?: string;
13
+ }, baseUrl?: string) => string;
14
+ /** @deprecated Используйте buildQuizFunnelMessengerRedirectUrl('telegram', …) */
15
+ export declare const buildQuizFunnelTelegramDeepLink: (tilda: IQuizTargetFunnelTildaSubmit, contactId?: number | string, search?: string) => string | null;
16
+ export declare const saveQuizFunnelTildaContact: (query: IQuizFunnelTildaContactQuery & {
17
+ utmSearch?: string;
18
+ }, baseUrl?: string) => Promise<IQuizFunnelTildaSaveContactResponse | null>;
@@ -0,0 +1,13 @@
1
+ import { IUser } from '../../../../common.types';
2
+ export declare const getQuizFunnelAuthToken: (user: IUser | null | undefined) => string | null;
3
+ /** Имя из формы → firstName / lastName для enKod */
4
+ export declare const splitQuizFunnelFullName: (fullName: string) => {
5
+ firstName: string;
6
+ lastName: string;
7
+ };
8
+ export declare const getQuizFunnelUserContacts: (user: IUser | null | undefined) => {
9
+ email: string;
10
+ phone: string;
11
+ };
12
+ /** Имя для формы: name или ФИО */
13
+ export declare const getQuizFunnelUserDisplayName: (user: IUser | null | undefined) => string;
@@ -0,0 +1,2 @@
1
+ /** max-height списка стран по умолчанию (px) */
2
+ export declare const PHONE_INPUT_DEFAULT_DROPDOWN_MAX_HEIGHT = 380;
@@ -0,0 +1,3 @@
1
+ import 'react-phone-input-2/lib/style.css';
2
+ import { IPhoneInput } from './PhoneInput.typed';
3
+ export declare const PhoneInput: ({ name, value, placeholder, disabled, country, useFieldBackground, dropdownMaxHeight, error, onChange }: IPhoneInput) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const PhoneInputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $disabled: boolean;
4
+ $useFieldBackground?: boolean;
5
+ $dropdownMaxHeight?: number;
6
+ $error?: boolean;
7
+ }>> & string;
@@ -0,0 +1,20 @@
1
+ export interface IPhoneInput {
2
+ /** Значение телефона. Можно передавать с плюсом или только цифры. */
3
+ value: string;
4
+ /** Название поля */
5
+ name: string;
6
+ /** Плейсхолдер */
7
+ placeholder?: string;
8
+ /** Заблокированное поле */
9
+ disabled?: boolean;
10
+ /** Страна по умолчанию для react-phone-input-2 */
11
+ country?: string;
12
+ /** Фон и бордер как у Input (`background.field`) */
13
+ useFieldBackground?: boolean;
14
+ /** max-height списка стран в px (по умолчанию 380) */
15
+ dropdownMaxHeight?: number;
16
+ /** Текст ошибки или флаг ошибки */
17
+ error?: boolean | string;
18
+ /** Возвращает только цифры и код страны (если известен) */
19
+ onChange: (value: string, countryCode?: string) => void;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { PhoneInput } from './PhoneInput';
2
+ export type { IPhoneInput } from './PhoneInput.typed';
@@ -0,0 +1,2 @@
1
+ export declare const PHONE_INPUT_CHEVRON_MASK = "data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.8082 9.1173L17.8023 9.11145C17.5153 8.82439 17.0433 8.82439 16.7562 9.11145L12.4096 13.4581C12.1833 13.6844 11.8153 13.6844 11.589 13.4581L7.24233 9.11145C6.95527 8.82439 6.48331 8.82439 6.19625 9.11145C5.90919 9.39851 5.90919 9.87047 6.19625 10.1575L10.5429 14.5042C11.3433 15.3046 12.6553 15.3046 13.4557 14.5042L17.8023 10.1575C17.9497 10.0102 18.0193 9.82138 18.0193 9.63449C18.0193 9.44055 17.9383 9.25677 17.8082 9.1173Z' fill='%23000'/%3E%3C/svg%3E";
2
+ export declare const PHONE_INPUT_CHEVRON_MASK_IMAGE: string;
@@ -58,13 +58,14 @@ declare const Tooltip: React.ForwardRefExoticComponent<ITooltipProps & React.Ref
58
58
  export declare const TooltipTrigger: ({ targetElement }: {
59
59
  targetElement: React.ReactNode;
60
60
  }) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
61
- export declare const TooltipContent: ({ children, width, height, zIndex, padding, borderRadius, showArrow }: {
61
+ export declare const TooltipContent: ({ children, width, height, zIndex, padding, borderRadius, boxShadow, showArrow }: {
62
62
  children: ReactNode;
63
63
  width: string;
64
64
  height: string;
65
65
  zIndex: number;
66
66
  padding: string;
67
67
  borderRadius: string;
68
+ boxShadow?: string;
68
69
  showArrow: boolean;
69
70
  }) => import("react/jsx-runtime").JSX.Element;
70
71
  export { Tooltip };
@@ -4,6 +4,7 @@ export declare const Tooltip: import("styled-components/dist/types").IStyledComp
4
4
  $width?: string;
5
5
  $height?: string;
6
6
  $borderRadius?: string;
7
+ $boxShadow?: string;
7
8
  $mode: string;
8
9
  }>> & string;
9
10
  export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -18,6 +18,8 @@ export interface ITooltipProps {
18
18
  borderRadius?: string;
19
19
  /** Можно передать кастомный z-index для выпадашки*/
20
20
  zIndex?: number;
21
+ /** Кастомная тень контейнера (по умолчанию theme.shadow.overlay) */
22
+ boxShadow?: string;
21
23
  /**Показывать по наведению на триггер*/
22
24
  isHover?: boolean;
23
25
  /**Показывать стрелку*/
@@ -21,7 +21,7 @@ export interface ITypographyProps {
21
21
  /**Клик на элемент */
22
22
  onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
23
23
  /**Цвет из палитры */
24
- colorName?: keyof TTheme['text'] | keyof TTheme['background'] | keyof TTheme['icons'] | keyof TTheme['stroke'] | keyof TTheme['interactiveButtons'] | keyof TTheme['interactiveControls'] | keyof TTheme['other'];
24
+ colorName?: keyof TTheme['text'] | keyof TTheme['background'] | keyof TTheme['icons'] | keyof TTheme['stroke'] | keyof TTheme['interactiveButtons'] | keyof TTheme['interactiveControls'] | keyof TTheme['other'] | keyof TTheme['nav'];
25
25
  /**Категория цвета из палитры. По умолчанию text */
26
26
  colorCategory?: keyof TTheme;
27
27
  }
Binary file
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { Views } from './components/blocks/Views';
8
8
  export { Comment } from './components/blocks/Comment';
9
9
  export { ShareList } from './components/blocks/ShareList';
10
10
  export { Support } from './components/blocks/Support';
11
+ export { QuizFunnel, QUIZ_FUNNEL_METRIKA_GOALS } from './components/blocks/QuizFunnel';
12
+ export type { IQuizFunnelProps, TQuizFunnelMetrikaGoalKey, TQuizFunnelMetrikaGoalsOverride } from './components/blocks/QuizFunnel';
11
13
  export { Notification } from './components/blocks/Notification';
12
14
  export { NotificationShort } from './components/blocks/Notification';
13
15
  export { SearchSideMenu } from './components/blocks/SearchSideMenu';
@@ -50,6 +52,8 @@ export { Tabs } from './components/uikit/Tabs';
50
52
  export { TextButton } from './components/uikit/TextButton';
51
53
  export { TextButtonLink } from './components/uikit/TextButtonLink';
52
54
  export { Input } from './components/uikit/Input';
55
+ export { PhoneInput } from './components/uikit/PhoneInput';
56
+ export type { IPhoneInput } from './components/uikit/PhoneInput';
53
57
  export { InputNumber } from './components/uikit/InputNumber';
54
58
  export { ErrorText } from './components/uikit/ErrorText';
55
59
  export { Avatar } from './components/uikit/Avatar';