fansunited-frontend-core 0.0.45 → 0.0.46

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 (43) hide show
  1. package/functions/functions.d.ts +3 -3
  2. package/functions/helpers.d.ts +6 -5
  3. package/index.es.js +42 -0
  4. package/interfaces/interfaces.d.ts +6 -5
  5. package/locales/bg.json +3 -0
  6. package/locales/bg.json.d.ts +3 -0
  7. package/locales/de.json +3 -0
  8. package/locales/de.json.d.ts +3 -0
  9. package/locales/el.json +3 -0
  10. package/locales/el.json.d.ts +3 -0
  11. package/locales/en.json +3 -0
  12. package/locales/en.json.d.ts +3 -0
  13. package/locales/es.json +3 -0
  14. package/locales/es.json.d.ts +3 -0
  15. package/locales/fr-be.json +3 -0
  16. package/locales/fr-be.json.d.ts +3 -0
  17. package/locales/fr.json +3 -0
  18. package/locales/fr.json.d.ts +3 -0
  19. package/locales/it.json +3 -0
  20. package/locales/it.json.d.ts +3 -0
  21. package/locales/pl.json +3 -0
  22. package/locales/pl.json.d.ts +3 -0
  23. package/locales/pt-br.json +3 -0
  24. package/locales/pt-br.json.d.ts +3 -0
  25. package/locales/pt.json +3 -0
  26. package/locales/pt.json.d.ts +3 -0
  27. package/locales/ro.json +3 -0
  28. package/locales/ro.json.d.ts +3 -0
  29. package/locales/sk.json +3 -0
  30. package/locales/sk.json.d.ts +3 -0
  31. package/locales/sr.json +3 -0
  32. package/locales/sr.json.d.ts +3 -0
  33. package/package.json +1 -1
  34. package/components/Notification.js +0 -36
  35. package/components/Notification.js.map +0 -1
  36. package/functions/functions.js +0 -4
  37. package/functions/functions.js.map +0 -1
  38. package/functions/helpers.js +0 -152
  39. package/functions/helpers.js.map +0 -1
  40. package/interfaces/interfaces.js +0 -2
  41. package/interfaces/interfaces.js.map +0 -1
  42. package/types/types.js +0 -2
  43. package/types/types.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export { useSpacingScale, getSpacing, isMobile, isExtraSmall, isTablet, isDesktop, useFontFamily, useCornerRadius, useColors, useBorderSize, useInternalTheme, useImageBackgroundGradient, isLarge, useCurrentThemeMode, } from "./theme";
2
- export { stripHtmlTags, hexToRgb, isAndroid, getDefaultCountryByCode, getDefaultCountryByLanguage, extractBrandingModelProperties, extractBrandingProperties, sanitizeBackgroundUrl, mapContentTypeToConsentEntityType, getBrandingClickUrl, getRelatedInfoPageId, isWithPrize, extractSdkError, extractSdkErrorMessage, } from "./helpers";
3
- export { initializeI18n } from "./i18n";
1
+ export { useSpacingScale, getSpacing, isMobile, isExtraSmall, isTablet, isDesktop, useFontFamily, useCornerRadius, useColors, useBorderSize, useInternalTheme, useImageBackgroundGradient, isLarge, useCurrentThemeMode, } from './theme';
2
+ export { stripHtmlTags, hexToRgb, isAndroid, getDefaultCountryByCode, getDefaultCountryByLanguage, extractBrandingModelProperties, extractBrandingProperties, sanitizeBackgroundUrl, mapContentTypeToConsentEntityType, getBrandingClickUrl, getRelatedInfoPageId, isWithPrize, extractSdkError, extractSdkErrorMessage, } from './helpers';
3
+ export { initializeI18n } from './i18n';
4
4
  //# sourceMappingURL=functions.d.ts.map
@@ -1,11 +1,12 @@
1
- import { BrandingColorsModel, BrandingModel, ConsentEntityType, FansUnitedSDKModel, RelatedEntityRelationship } from "fansunited-sdk-esm";
2
- import { Branding, BrandingColors, SdkError } from "../interfaces/interfaces";
1
+ import { BrandingColorsModel, BrandingModel, ConsentEntityType, FansUnitedSDKModel, RelatedEntityRelationship } from 'fansunited-sdk-esm';
2
+ import { Branding, BrandingColors, SdkError } from '../interfaces/interfaces';
3
+
3
4
  export declare const stripHtmlTags: (html: string | null) => string;
4
5
  export declare const hexToRgb: (hex: string) => string;
5
6
  export declare const isAndroid: () => boolean;
6
- export declare const getDefaultCountryByCode: (phoneCountryCode: string | null) => import("..").CountryType | null;
7
- export declare const getDefaultCountryByLanguage: (language: string | null) => import("..").CountryType | null;
8
- export declare const getCountryByCode: (code: string) => import("..").CountryType | null;
7
+ export declare const getDefaultCountryByCode: (phoneCountryCode: string | null) => import('..').CountryType | null;
8
+ export declare const getDefaultCountryByLanguage: (language: string | null) => import('..').CountryType | null;
9
+ export declare const getCountryByCode: (code: string) => import('..').CountryType | null;
9
10
  export declare const extractBrandingModelProperties: (branding: BrandingModel | null) => {
10
11
  brandingImage: string | null;
11
12
  brandingColors: BrandingColorsModel | null;
package/index.es.js CHANGED
@@ -9197,6 +9197,8 @@ const ab = (e, t) => {
9197
9197
  invitationCode: "Код за покана",
9198
9198
  enterLeagueCode: "Въведи код на лигата",
9199
9199
  copyCode: "Копирай кода",
9200
+ copyCodeSuccessTitle: "Копирано!",
9201
+ copyCodeSuccessMessage: "Кодът за покана за {{name}} беше копиран.",
9200
9202
  members: "Членове",
9201
9203
  members_one: "{{count}} Член",
9202
9204
  members_other: "{{count}} Членове",
@@ -9331,6 +9333,7 @@ const ab = (e, t) => {
9331
9333
  accuracy: "Точност",
9332
9334
  streak: "Серия",
9333
9335
  bestRound: "Най-добър",
9336
+ latestRound: "Последен",
9334
9337
  avgPts: "Ср. точки",
9335
9338
  predictionsCount: "Прогнози",
9336
9339
  predictionsCount_one: "Прогноза",
@@ -9943,6 +9946,8 @@ const ab = (e, t) => {
9943
9946
  invitationCode: "Einladungscode",
9944
9947
  enterLeagueCode: "Ligacode eingeben",
9945
9948
  copyCode: "Code kopieren",
9949
+ copyCodeSuccessTitle: "Kopiert!",
9950
+ copyCodeSuccessMessage: "Einladungscode für {{name}} wurde kopiert.",
9946
9951
  members: "Mitglieder",
9947
9952
  members_one: "{{count}} Mitglied",
9948
9953
  members_other: "{{count}} Mitglieder",
@@ -10069,6 +10074,7 @@ const ab = (e, t) => {
10069
10074
  accuracy: "Accuracy",
10070
10075
  streak: "Streak",
10071
10076
  bestRound: "Best round",
10077
+ latestRound: "Latest",
10072
10078
  avgPts: "Ø Punkte",
10073
10079
  predictionsCount: "Predictions",
10074
10080
  predictionsCount_one: "Prognose",
@@ -10680,6 +10686,8 @@ const ab = (e, t) => {
10680
10686
  invitationCode: "Κωδικός πρόσκλησης",
10681
10687
  enterLeagueCode: "Εισαγωγή κωδικού πρωταθλήματος",
10682
10688
  copyCode: "Αντιγραφή κωδικού",
10689
+ copyCodeSuccessTitle: "Αντιγράφηκε!",
10690
+ copyCodeSuccessMessage: "Ο κωδικός πρόσκλησης για {{name}} αντιγράφηκε.",
10683
10691
  members: "Μέλη",
10684
10692
  members_one: "{{count}} Μέλος",
10685
10693
  members_other: "{{count}} Μέλη",
@@ -10806,6 +10814,7 @@ const ab = (e, t) => {
10806
10814
  accuracy: "Accuracy",
10807
10815
  streak: "Streak",
10808
10816
  bestRound: "Best round",
10817
+ latestRound: "Latest",
10809
10818
  avgPts: "Avg pts",
10810
10819
  predictionsCount: "Predictions",
10811
10820
  predictionsCount_one: "πρόβλεψη",
@@ -11418,6 +11427,8 @@ const ab = (e, t) => {
11418
11427
  invitationCode: "Invitation code",
11419
11428
  enterLeagueCode: "Enter league code",
11420
11429
  copyCode: "Copy code",
11430
+ copyCodeSuccessTitle: "Copied!",
11431
+ copyCodeSuccessMessage: "Invitation code for {{name}} has been copied to clipboard.",
11421
11432
  members: "Members",
11422
11433
  members_one: "{{count}} Member",
11423
11434
  members_other: "{{count}} Members",
@@ -11552,6 +11563,7 @@ const ab = (e, t) => {
11552
11563
  accuracy: "Accuracy",
11553
11564
  streak: "Streak",
11554
11565
  bestRound: "Best round",
11566
+ latestRound: "Latest",
11555
11567
  avgPts: "Avg pts",
11556
11568
  predictionsCount: "Predictions",
11557
11569
  predictionsCount_one: "prediction",
@@ -12161,6 +12173,8 @@ const ab = (e, t) => {
12161
12173
  invitationCode: "Código de invitación",
12162
12174
  enterLeagueCode: "Introduce el código de liga",
12163
12175
  copyCode: "Copiar código",
12176
+ copyCodeSuccessTitle: "¡Copiado!",
12177
+ copyCodeSuccessMessage: "El código de invitación para {{name}} ha sido copiado.",
12164
12178
  members: "Miembros",
12165
12179
  members_one: "{{count}} Miembro",
12166
12180
  members_other: "{{count}} Miembros",
@@ -12287,6 +12301,7 @@ const ab = (e, t) => {
12287
12301
  accuracy: "Accuracy",
12288
12302
  streak: "Streak",
12289
12303
  bestRound: "Best round",
12304
+ latestRound: "Latest",
12290
12305
  avgPts: "Prom. pts",
12291
12306
  predictionsCount: "Predictions",
12292
12307
  predictionsCount_one: "predicción",
@@ -12898,6 +12913,8 @@ const ab = (e, t) => {
12898
12913
  invitationCode: "Code d'invitation",
12899
12914
  enterLeagueCode: "Entrez le code de la ligue",
12900
12915
  copyCode: "Copier le code",
12916
+ copyCodeSuccessTitle: "Copié !",
12917
+ copyCodeSuccessMessage: "Le code d'invitation pour {{name}} a été copié.",
12901
12918
  members: "Membres",
12902
12919
  members_one: "{{count}} Membre",
12903
12920
  members_other: "{{count}} Membres",
@@ -13024,6 +13041,7 @@ const ab = (e, t) => {
13024
13041
  accuracy: "Accuracy",
13025
13042
  streak: "Streak",
13026
13043
  bestRound: "Best round",
13044
+ latestRound: "Latest",
13027
13045
  avgPts: "Moy. pts",
13028
13046
  predictionsCount: "Predictions",
13029
13047
  predictionsCount_one: "prédiction",
@@ -13635,6 +13653,8 @@ const ab = (e, t) => {
13635
13653
  invitationCode: "Code d'invitation",
13636
13654
  enterLeagueCode: "Entrez le code de la ligue",
13637
13655
  copyCode: "Copier le code",
13656
+ copyCodeSuccessTitle: "Copié !",
13657
+ copyCodeSuccessMessage: "Le code d'invitation pour {{name}} a été copié.",
13638
13658
  members: "Membres",
13639
13659
  members_one: "{{count}} Membre",
13640
13660
  members_other: "{{count}} Membres",
@@ -13761,6 +13781,7 @@ const ab = (e, t) => {
13761
13781
  accuracy: "Accuracy",
13762
13782
  streak: "Streak",
13763
13783
  bestRound: "Best round",
13784
+ latestRound: "Latest",
13764
13785
  avgPts: "Moy. pts",
13765
13786
  predictionsCount: "Predictions",
13766
13787
  predictionsCount_one: "prédiction",
@@ -14372,6 +14393,8 @@ const ab = (e, t) => {
14372
14393
  invitationCode: "Codice invito",
14373
14394
  enterLeagueCode: "Inserisci il codice della lega",
14374
14395
  copyCode: "Copia codice",
14396
+ copyCodeSuccessTitle: "Copiato!",
14397
+ copyCodeSuccessMessage: "Il codice d'invito per {{name}} è stato copiato.",
14375
14398
  members: "Membri",
14376
14399
  members_one: "{{count}} Membro",
14377
14400
  members_other: "{{count}} Membri",
@@ -14498,6 +14521,7 @@ const ab = (e, t) => {
14498
14521
  accuracy: "Accuracy",
14499
14522
  streak: "Streak",
14500
14523
  bestRound: "Best round",
14524
+ latestRound: "Latest",
14501
14525
  avgPts: "Media pt.",
14502
14526
  predictionsCount: "Predictions",
14503
14527
  predictionsCount_one: "pronostico",
@@ -15109,6 +15133,8 @@ const ab = (e, t) => {
15109
15133
  invitationCode: "Kod zaproszenia",
15110
15134
  enterLeagueCode: "Wprowadź kod ligi",
15111
15135
  copyCode: "Kopiuj kod",
15136
+ copyCodeSuccessTitle: "Skopiowano!",
15137
+ copyCodeSuccessMessage: "Kod zaproszenia dla {{name}} został skopiowany.",
15112
15138
  members: "Członkowie",
15113
15139
  members_one: "{{count}} Członek",
15114
15140
  members_other: "{{count}} Członkowie",
@@ -15235,6 +15261,7 @@ const ab = (e, t) => {
15235
15261
  accuracy: "Accuracy",
15236
15262
  streak: "Streak",
15237
15263
  bestRound: "Best round",
15264
+ latestRound: "Latest",
15238
15265
  avgPts: "Śr. pkt",
15239
15266
  predictionsCount: "Predictions",
15240
15267
  predictionsCount_one: "prognoza",
@@ -15846,6 +15873,8 @@ const ab = (e, t) => {
15846
15873
  invitationCode: "Código de convite",
15847
15874
  enterLeagueCode: "Insira o código da liga",
15848
15875
  copyCode: "Copiar código",
15876
+ copyCodeSuccessTitle: "Copiado!",
15877
+ copyCodeSuccessMessage: "O código de convite para {{name}} foi copiado.",
15849
15878
  members: "Membros",
15850
15879
  members_one: "{{count}} Membro",
15851
15880
  members_other: "{{count}} Membros",
@@ -15972,6 +16001,7 @@ const ab = (e, t) => {
15972
16001
  accuracy: "Accuracy",
15973
16002
  streak: "Streak",
15974
16003
  bestRound: "Best round",
16004
+ latestRound: "Latest",
15975
16005
  avgPts: "Média pts",
15976
16006
  predictionsCount: "Predictions",
15977
16007
  predictionsCount_one: "prognóstico",
@@ -16583,6 +16613,8 @@ const ab = (e, t) => {
16583
16613
  invitationCode: "Código de convite",
16584
16614
  enterLeagueCode: "Insira o código da liga",
16585
16615
  copyCode: "Copiar código",
16616
+ copyCodeSuccessTitle: "Copiado!",
16617
+ copyCodeSuccessMessage: "O código de convite para {{name}} foi copiado.",
16586
16618
  members: "Membros",
16587
16619
  members_one: "{{count}} Membro",
16588
16620
  members_other: "{{count}} Membros",
@@ -16709,6 +16741,7 @@ const ab = (e, t) => {
16709
16741
  accuracy: "Accuracy",
16710
16742
  streak: "Streak",
16711
16743
  bestRound: "Best round",
16744
+ latestRound: "Latest",
16712
16745
  avgPts: "Média pts",
16713
16746
  predictionsCount: "Predictions",
16714
16747
  predictionsCount_one: "prognóstico",
@@ -17320,6 +17353,8 @@ const ab = (e, t) => {
17320
17353
  invitationCode: "Cod de invitație",
17321
17354
  enterLeagueCode: "Introdu codul ligii",
17322
17355
  copyCode: "Copiază codul",
17356
+ copyCodeSuccessTitle: "Copiat!",
17357
+ copyCodeSuccessMessage: "Codul de invitație pentru {{name}} a fost copiat.",
17323
17358
  members: "Membri",
17324
17359
  members_one: "{{count}} Membru",
17325
17360
  members_other: "{{count}} Membri",
@@ -17446,6 +17481,7 @@ const ab = (e, t) => {
17446
17481
  accuracy: "Accuracy",
17447
17482
  streak: "Streak",
17448
17483
  bestRound: "Best round",
17484
+ latestRound: "Latest",
17449
17485
  avgPts: "Med. pct.",
17450
17486
  predictionsCount: "Predictions",
17451
17487
  predictionsCount_one: "pronostic",
@@ -18057,6 +18093,8 @@ const ab = (e, t) => {
18057
18093
  invitationCode: "Pozivni kod",
18058
18094
  enterLeagueCode: "Unesite kod lige",
18059
18095
  copyCode: "Kopiraj kod",
18096
+ copyCodeSuccessTitle: "Kopirano!",
18097
+ copyCodeSuccessMessage: "Kod pozivnice za {{name}} je kopiran.",
18060
18098
  members: "Članovi",
18061
18099
  members_one: "{{count}} Član",
18062
18100
  members_other: "{{count}} Članovi",
@@ -18183,6 +18221,7 @@ const ab = (e, t) => {
18183
18221
  accuracy: "Accuracy",
18184
18222
  streak: "Streak",
18185
18223
  bestRound: "Best round",
18224
+ latestRound: "Latest",
18186
18225
  avgPts: "Pros. bod.",
18187
18226
  predictionsCount: "Predictions",
18188
18227
  predictionsCount_one: "prognoza",
@@ -18794,6 +18833,8 @@ const ab = (e, t) => {
18794
18833
  invitationCode: "Pozvánkový kód",
18795
18834
  enterLeagueCode: "Zadajte kód ligy",
18796
18835
  copyCode: "Kopírovať kód",
18836
+ copyCodeSuccessTitle: "Skopírované!",
18837
+ copyCodeSuccessMessage: "Kód pozvánky pre {{name}} bol skopírovaný.",
18797
18838
  members: "Členovia",
18798
18839
  members_one: "{{count}} Člen",
18799
18840
  members_other: "{{count}} Členovia",
@@ -18920,6 +18961,7 @@ const ab = (e, t) => {
18920
18961
  accuracy: "Accuracy",
18921
18962
  streak: "Streak",
18922
18963
  bestRound: "Best round",
18964
+ latestRound: "Latest",
18923
18965
  avgPts: "Priem. b.",
18924
18966
  predictionsCount: "Predictions",
18925
18967
  predictionsCount_one: "prognóza",
@@ -1,8 +1,9 @@
1
- import { ActionType, CTAType, ContentViewType, JourneyType, LinkTargetType, StageType, LanguageType, LeadField, LeadPosition, OptionsLayout, DiscussionSortType, PredictorTab } from "../types/types";
2
- import { ChanceGameTemplate, ChanceGameVariant, PickThePairTemplate, WidgetTemplate } from "../enums/enums";
3
- import { BrandingModel, ContextModel, FansUnitedSDKModel, ImagesModel } from "fansunited-sdk-esm";
4
- import { ColorSystemOptions, CssVarsThemeOptions } from "@mui/joy/styles/extendTheme";
5
- import { DefaultColorScheme, DefaultPaletteRange, ExtendedColorScheme } from "@mui/joy/styles/types";
1
+ import { ActionType, CTAType, ContentViewType, JourneyType, LinkTargetType, StageType, LanguageType, LeadField, LeadPosition, OptionsLayout, DiscussionSortType, PredictorTab } from '../types/types';
2
+ import { ChanceGameTemplate, ChanceGameVariant, PickThePairTemplate, WidgetTemplate } from '../enums/enums';
3
+ import { BrandingModel, ContextModel, FansUnitedSDKModel, ImagesModel } from 'fansunited-sdk-esm';
4
+ import { ColorSystemOptions, CssVarsThemeOptions } from '@mui/joy/styles/extendTheme';
5
+ import { DefaultColorScheme, DefaultPaletteRange, ExtendedColorScheme } from '@mui/joy/styles/types';
6
+
6
7
  export interface AnalyticsEvent {
7
8
  journey: JourneyType;
8
9
  stage: StageType;
package/locales/bg.json CHANGED
@@ -425,6 +425,8 @@
425
425
  "invitationCode": "Код за покана",
426
426
  "enterLeagueCode": "Въведи код на лигата",
427
427
  "copyCode": "Копирай кода",
428
+ "copyCodeSuccessTitle": "Копирано!",
429
+ "copyCodeSuccessMessage": "Кодът за покана за {{name}} беше копиран.",
428
430
  "members": "Членове",
429
431
  "members_one": "{{count}} Член",
430
432
  "members_other": "{{count}} Членове",
@@ -559,6 +561,7 @@
559
561
  "accuracy": "Точност",
560
562
  "streak": "Серия",
561
563
  "bestRound": "Най-добър",
564
+ "latestRound": "Последен",
562
565
  "avgPts": "Ср. точки",
563
566
  "predictionsCount": "Прогнози",
564
567
  "predictionsCount_one": "Прогноза",
@@ -425,6 +425,8 @@ declare const _default: {
425
425
  "invitationCode": "Код за покана",
426
426
  "enterLeagueCode": "Въведи код на лигата",
427
427
  "copyCode": "Копирай кода",
428
+ "copyCodeSuccessTitle": "Копирано!",
429
+ "copyCodeSuccessMessage": "Кодът за покана за {{name}} беше копиран.",
428
430
  "members": "Членове",
429
431
  "members_one": "{{count}} Член",
430
432
  "members_other": "{{count}} Членове",
@@ -559,6 +561,7 @@ declare const _default: {
559
561
  "accuracy": "Точност",
560
562
  "streak": "Серия",
561
563
  "bestRound": "Най-добър",
564
+ "latestRound": "Последен",
562
565
  "avgPts": "Ср. точки",
563
566
  "predictionsCount": "Прогнози",
564
567
  "predictionsCount_one": "Прогноза",
package/locales/de.json CHANGED
@@ -425,6 +425,8 @@
425
425
  "invitationCode": "Einladungscode",
426
426
  "enterLeagueCode": "Ligacode eingeben",
427
427
  "copyCode": "Code kopieren",
428
+ "copyCodeSuccessTitle": "Kopiert!",
429
+ "copyCodeSuccessMessage": "Einladungscode für {{name}} wurde kopiert.",
428
430
  "members": "Mitglieder",
429
431
  "members_one": "{{count}} Mitglied",
430
432
  "members_other": "{{count}} Mitglieder",
@@ -551,6 +553,7 @@
551
553
  "accuracy": "Accuracy",
552
554
  "streak": "Streak",
553
555
  "bestRound": "Best round",
556
+ "latestRound": "Latest",
554
557
  "avgPts": "Ø Punkte",
555
558
  "predictionsCount": "Predictions",
556
559
  "predictionsCount_one": "Prognose",
@@ -425,6 +425,8 @@ declare const _default: {
425
425
  "invitationCode": "Einladungscode",
426
426
  "enterLeagueCode": "Ligacode eingeben",
427
427
  "copyCode": "Code kopieren",
428
+ "copyCodeSuccessTitle": "Kopiert!",
429
+ "copyCodeSuccessMessage": "Einladungscode für {{name}} wurde kopiert.",
428
430
  "members": "Mitglieder",
429
431
  "members_one": "{{count}} Mitglied",
430
432
  "members_other": "{{count}} Mitglieder",
@@ -551,6 +553,7 @@ declare const _default: {
551
553
  "accuracy": "Accuracy",
552
554
  "streak": "Streak",
553
555
  "bestRound": "Best round",
556
+ "latestRound": "Latest",
554
557
  "avgPts": "Ø Punkte",
555
558
  "predictionsCount": "Predictions",
556
559
  "predictionsCount_one": "Prognose",
package/locales/el.json CHANGED
@@ -425,6 +425,8 @@
425
425
  "invitationCode": "Κωδικός πρόσκλησης",
426
426
  "enterLeagueCode": "Εισαγωγή κωδικού πρωταθλήματος",
427
427
  "copyCode": "Αντιγραφή κωδικού",
428
+ "copyCodeSuccessTitle": "Αντιγράφηκε!",
429
+ "copyCodeSuccessMessage": "Ο κωδικός πρόσκλησης για {{name}} αντιγράφηκε.",
428
430
  "members": "Μέλη",
429
431
  "members_one": "{{count}} Μέλος",
430
432
  "members_other": "{{count}} Μέλη",
@@ -551,6 +553,7 @@
551
553
  "accuracy": "Accuracy",
552
554
  "streak": "Streak",
553
555
  "bestRound": "Best round",
556
+ "latestRound": "Latest",
554
557
  "avgPts": "Avg pts",
555
558
  "predictionsCount": "Predictions",
556
559
  "predictionsCount_one": "πρόβλεψη",
@@ -425,6 +425,8 @@ declare const _default: {
425
425
  "invitationCode": "Κωδικός πρόσκλησης",
426
426
  "enterLeagueCode": "Εισαγωγή κωδικού πρωταθλήματος",
427
427
  "copyCode": "Αντιγραφή κωδικού",
428
+ "copyCodeSuccessTitle": "Αντιγράφηκε!",
429
+ "copyCodeSuccessMessage": "Ο κωδικός πρόσκλησης για {{name}} αντιγράφηκε.",
428
430
  "members": "Μέλη",
429
431
  "members_one": "{{count}} Μέλος",
430
432
  "members_other": "{{count}} Μέλη",
@@ -551,6 +553,7 @@ declare const _default: {
551
553
  "accuracy": "Accuracy",
552
554
  "streak": "Streak",
553
555
  "bestRound": "Best round",
556
+ "latestRound": "Latest",
554
557
  "avgPts": "Avg pts",
555
558
  "predictionsCount": "Predictions",
556
559
  "predictionsCount_one": "πρόβλεψη",
package/locales/en.json CHANGED
@@ -426,6 +426,8 @@
426
426
  "invitationCode": "Invitation code",
427
427
  "enterLeagueCode": "Enter league code",
428
428
  "copyCode": "Copy code",
429
+ "copyCodeSuccessTitle": "Copied!",
430
+ "copyCodeSuccessMessage": "Invitation code for {{name}} has been copied to clipboard.",
429
431
  "members": "Members",
430
432
  "members_one": "{{count}} Member",
431
433
  "members_other": "{{count}} Members",
@@ -560,6 +562,7 @@
560
562
  "accuracy": "Accuracy",
561
563
  "streak": "Streak",
562
564
  "bestRound": "Best round",
565
+ "latestRound": "Latest",
563
566
  "avgPts": "Avg pts",
564
567
  "predictionsCount": "Predictions",
565
568
  "predictionsCount_one": "prediction",
@@ -426,6 +426,8 @@ declare const _default: {
426
426
  "invitationCode": "Invitation code",
427
427
  "enterLeagueCode": "Enter league code",
428
428
  "copyCode": "Copy code",
429
+ "copyCodeSuccessTitle": "Copied!",
430
+ "copyCodeSuccessMessage": "Invitation code for {{name}} has been copied to clipboard.",
429
431
  "members": "Members",
430
432
  "members_one": "{{count}} Member",
431
433
  "members_other": "{{count}} Members",
@@ -560,6 +562,7 @@ declare const _default: {
560
562
  "accuracy": "Accuracy",
561
563
  "streak": "Streak",
562
564
  "bestRound": "Best round",
565
+ "latestRound": "Latest",
563
566
  "avgPts": "Avg pts",
564
567
  "predictionsCount": "Predictions",
565
568
  "predictionsCount_one": "prediction",
package/locales/es.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Código de invitación",
419
419
  "enterLeagueCode": "Introduce el código de liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "¡Copiado!",
422
+ "copyCodeSuccessMessage": "El código de invitación para {{name}} ha sido copiado.",
421
423
  "members": "Miembros",
422
424
  "members_one": "{{count}} Miembro",
423
425
  "members_other": "{{count}} Miembros",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Prom. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "predicción",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Código de invitación",
419
419
  "enterLeagueCode": "Introduce el código de liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "¡Copiado!",
422
+ "copyCodeSuccessMessage": "El código de invitación para {{name}} ha sido copiado.",
421
423
  "members": "Miembros",
422
424
  "members_one": "{{count}} Miembro",
423
425
  "members_other": "{{count}} Miembros",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Prom. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "predicción",
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Code d'invitation",
419
419
  "enterLeagueCode": "Entrez le code de la ligue",
420
420
  "copyCode": "Copier le code",
421
+ "copyCodeSuccessTitle": "Copié !",
422
+ "copyCodeSuccessMessage": "Le code d'invitation pour {{name}} a été copié.",
421
423
  "members": "Membres",
422
424
  "members_one": "{{count}} Membre",
423
425
  "members_other": "{{count}} Membres",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Moy. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prédiction",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Code d'invitation",
419
419
  "enterLeagueCode": "Entrez le code de la ligue",
420
420
  "copyCode": "Copier le code",
421
+ "copyCodeSuccessTitle": "Copié !",
422
+ "copyCodeSuccessMessage": "Le code d'invitation pour {{name}} a été copié.",
421
423
  "members": "Membres",
422
424
  "members_one": "{{count}} Membre",
423
425
  "members_other": "{{count}} Membres",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Moy. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prédiction",
package/locales/fr.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Code d'invitation",
419
419
  "enterLeagueCode": "Entrez le code de la ligue",
420
420
  "copyCode": "Copier le code",
421
+ "copyCodeSuccessTitle": "Copié !",
422
+ "copyCodeSuccessMessage": "Le code d'invitation pour {{name}} a été copié.",
421
423
  "members": "Membres",
422
424
  "members_one": "{{count}} Membre",
423
425
  "members_other": "{{count}} Membres",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Moy. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prédiction",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Code d'invitation",
419
419
  "enterLeagueCode": "Entrez le code de la ligue",
420
420
  "copyCode": "Copier le code",
421
+ "copyCodeSuccessTitle": "Copié !",
422
+ "copyCodeSuccessMessage": "Le code d'invitation pour {{name}} a été copié.",
421
423
  "members": "Membres",
422
424
  "members_one": "{{count}} Membre",
423
425
  "members_other": "{{count}} Membres",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Moy. pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prédiction",
package/locales/it.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Codice invito",
419
419
  "enterLeagueCode": "Inserisci il codice della lega",
420
420
  "copyCode": "Copia codice",
421
+ "copyCodeSuccessTitle": "Copiato!",
422
+ "copyCodeSuccessMessage": "Il codice d'invito per {{name}} è stato copiato.",
421
423
  "members": "Membri",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membri",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Media pt.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "pronostico",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Codice invito",
419
419
  "enterLeagueCode": "Inserisci il codice della lega",
420
420
  "copyCode": "Copia codice",
421
+ "copyCodeSuccessTitle": "Copiato!",
422
+ "copyCodeSuccessMessage": "Il codice d'invito per {{name}} è stato copiato.",
421
423
  "members": "Membri",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membri",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Media pt.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "pronostico",
package/locales/pl.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Kod zaproszenia",
419
419
  "enterLeagueCode": "Wprowadź kod ligi",
420
420
  "copyCode": "Kopiuj kod",
421
+ "copyCodeSuccessTitle": "Skopiowano!",
422
+ "copyCodeSuccessMessage": "Kod zaproszenia dla {{name}} został skopiowany.",
421
423
  "members": "Członkowie",
422
424
  "members_one": "{{count}} Członek",
423
425
  "members_other": "{{count}} Członkowie",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Śr. pkt",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognoza",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Kod zaproszenia",
419
419
  "enterLeagueCode": "Wprowadź kod ligi",
420
420
  "copyCode": "Kopiuj kod",
421
+ "copyCodeSuccessTitle": "Skopiowano!",
422
+ "copyCodeSuccessMessage": "Kod zaproszenia dla {{name}} został skopiowany.",
421
423
  "members": "Członkowie",
422
424
  "members_one": "{{count}} Członek",
423
425
  "members_other": "{{count}} Członkowie",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Śr. pkt",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognoza",
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Código de convite",
419
419
  "enterLeagueCode": "Insira o código da liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "Copiado!",
422
+ "copyCodeSuccessMessage": "O código de convite para {{name}} foi copiado.",
421
423
  "members": "Membros",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membros",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Média pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóstico",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Código de convite",
419
419
  "enterLeagueCode": "Insira o código da liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "Copiado!",
422
+ "copyCodeSuccessMessage": "O código de convite para {{name}} foi copiado.",
421
423
  "members": "Membros",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membros",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Média pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóstico",
package/locales/pt.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Código de convite",
419
419
  "enterLeagueCode": "Insira o código da liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "Copiado!",
422
+ "copyCodeSuccessMessage": "O código de convite para {{name}} foi copiado.",
421
423
  "members": "Membros",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membros",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Média pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóstico",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Código de convite",
419
419
  "enterLeagueCode": "Insira o código da liga",
420
420
  "copyCode": "Copiar código",
421
+ "copyCodeSuccessTitle": "Copiado!",
422
+ "copyCodeSuccessMessage": "O código de convite para {{name}} foi copiado.",
421
423
  "members": "Membros",
422
424
  "members_one": "{{count}} Membro",
423
425
  "members_other": "{{count}} Membros",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Média pts",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóstico",
package/locales/ro.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Cod de invitație",
419
419
  "enterLeagueCode": "Introdu codul ligii",
420
420
  "copyCode": "Copiază codul",
421
+ "copyCodeSuccessTitle": "Copiat!",
422
+ "copyCodeSuccessMessage": "Codul de invitație pentru {{name}} a fost copiat.",
421
423
  "members": "Membri",
422
424
  "members_one": "{{count}} Membru",
423
425
  "members_other": "{{count}} Membri",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Med. pct.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "pronostic",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Cod de invitație",
419
419
  "enterLeagueCode": "Introdu codul ligii",
420
420
  "copyCode": "Copiază codul",
421
+ "copyCodeSuccessTitle": "Copiat!",
422
+ "copyCodeSuccessMessage": "Codul de invitație pentru {{name}} a fost copiat.",
421
423
  "members": "Membri",
422
424
  "members_one": "{{count}} Membru",
423
425
  "members_other": "{{count}} Membri",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Med. pct.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "pronostic",
package/locales/sk.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Pozvánkový kód",
419
419
  "enterLeagueCode": "Zadajte kód ligy",
420
420
  "copyCode": "Kopírovať kód",
421
+ "copyCodeSuccessTitle": "Skopírované!",
422
+ "copyCodeSuccessMessage": "Kód pozvánky pre {{name}} bol skopírovaný.",
421
423
  "members": "Členovia",
422
424
  "members_one": "{{count}} Člen",
423
425
  "members_other": "{{count}} Členovia",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Priem. b.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóza",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Pozvánkový kód",
419
419
  "enterLeagueCode": "Zadajte kód ligy",
420
420
  "copyCode": "Kopírovať kód",
421
+ "copyCodeSuccessTitle": "Skopírované!",
422
+ "copyCodeSuccessMessage": "Kód pozvánky pre {{name}} bol skopírovaný.",
421
423
  "members": "Členovia",
422
424
  "members_one": "{{count}} Člen",
423
425
  "members_other": "{{count}} Členovia",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Priem. b.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognóza",
package/locales/sr.json CHANGED
@@ -418,6 +418,8 @@
418
418
  "invitationCode": "Pozivni kod",
419
419
  "enterLeagueCode": "Unesite kod lige",
420
420
  "copyCode": "Kopiraj kod",
421
+ "copyCodeSuccessTitle": "Kopirano!",
422
+ "copyCodeSuccessMessage": "Kod pozivnice za {{name}} je kopiran.",
421
423
  "members": "Članovi",
422
424
  "members_one": "{{count}} Član",
423
425
  "members_other": "{{count}} Članovi",
@@ -544,6 +546,7 @@
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Pros. bod.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognoza",
@@ -418,6 +418,8 @@ declare const _default: {
418
418
  "invitationCode": "Pozivni kod",
419
419
  "enterLeagueCode": "Unesite kod lige",
420
420
  "copyCode": "Kopiraj kod",
421
+ "copyCodeSuccessTitle": "Kopirano!",
422
+ "copyCodeSuccessMessage": "Kod pozivnice za {{name}} je kopiran.",
421
423
  "members": "Članovi",
422
424
  "members_one": "{{count}} Član",
423
425
  "members_other": "{{count}} Članovi",
@@ -544,6 +546,7 @@ declare const _default: {
544
546
  "accuracy": "Accuracy",
545
547
  "streak": "Streak",
546
548
  "bestRound": "Best round",
549
+ "latestRound": "Latest",
547
550
  "avgPts": "Pros. bod.",
548
551
  "predictionsCount": "Predictions",
549
552
  "predictionsCount_one": "prognoza",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-frontend-core",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "Core types, components, providers and constants for Fans United widgets",
5
5
  "main": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import ReactDOM from "react-dom";
3
- import { Box, Typography, Snackbar } from "@mui/joy";
4
- import CheckCircleIcon from "@mui/icons-material/CheckCircle";
5
- import ErrorIcon from "@mui/icons-material/Error";
6
- import { useCornerRadius, useFontFamily } from "../functions/theme";
7
- import { useConstantContext } from "../hooks/useConstantContext";
8
- import { ConstantsContext } from "../providers/ConstantsProvider";
9
- const Notification = ({ notification, onClose, }) => {
10
- const borderRadius = useCornerRadius();
11
- const fontFamily = useFontFamily();
12
- const { shadowRootElement } = useConstantContext(ConstantsContext);
13
- if (!notification.open) {
14
- return null;
15
- }
16
- return ReactDOM.createPortal(_jsx(Snackbar, { open: notification.open, onClose: onClose, autoHideDuration: notification.variant === "error" ? 5000 : 3000, anchorOrigin: { vertical: "top", horizontal: "center" }, color: notification.variant === "success" ? "success" : "danger", variant: "soft", startDecorator: notification.variant === "success" ? _jsx(CheckCircleIcon, {}) : _jsx(ErrorIcon, {}), sx: {
17
- borderRadius: borderRadius.sm,
18
- fontFamily: fontFamily.secondary,
19
- minWidth: "300px",
20
- maxWidth: "400px",
21
- zIndex: 9999,
22
- position: "fixed",
23
- }, children: _jsxs(Box, { sx: { display: "flex", flexDirection: "column", gap: "4px" }, children: [notification.title && (_jsx(Typography, { level: "title-md", sx: {
24
- fontWeight: 600,
25
- fontSize: "16px",
26
- lineHeight: 1.2,
27
- color: "inherit",
28
- }, children: notification.title })), notification.message && (_jsx(Typography, { level: "body-sm", sx: {
29
- fontSize: "14px",
30
- lineHeight: 1.3,
31
- color: "inherit",
32
- opacity: 0.9,
33
- }, children: notification.message }))] }) }), shadowRootElement ?? document.body);
34
- };
35
- export default Notification;
36
- //# sourceMappingURL=Notification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../src/components/Notification.tsx"],"names":[],"mappings":";AACA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAclE,MAAM,YAAY,GAAgC,CAAC,EACjD,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,i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CACvB,KAAC,UAAU,IACT,KAAK,EAAC,SAAS,EACf,EAAE,EAAE;wBACF,QAAQ,EAAE,MAAM;wBAChB,UAAU,EAAE,GAAG;wBACf,KAAK,EAAE,SAAS;wBAChB,OAAO,EAAE,GAAG;qBACb,YAEA,YAAY,CAAC,OAAO,GACV,CACd,IACG,GACG,EACX,iBAAiB,IAAI,QAAQ,CAAC,IAAI,CACnC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,4 +0,0 @@
1
- export { useSpacingScale, getSpacing, isMobile, isExtraSmall, isTablet, isDesktop, useFontFamily, useCornerRadius, useColors, useBorderSize, useInternalTheme, useImageBackgroundGradient, isLarge, useCurrentThemeMode, } from "./theme";
2
- export { stripHtmlTags, hexToRgb, isAndroid, getDefaultCountryByCode, getDefaultCountryByLanguage, extractBrandingModelProperties, extractBrandingProperties, sanitizeBackgroundUrl, mapContentTypeToConsentEntityType, getBrandingClickUrl, getRelatedInfoPageId, isWithPrize, extractSdkError, extractSdkErrorMessage, } from "./helpers";
3
- export { initializeI18n } from "./i18n";
4
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/functions/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,eAAe,EACf,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,OAAO,EACP,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,iCAAiC,EACjC,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,152 +0,0 @@
1
- import { countries, languageToCountryCode } from "../constants/constants";
2
- import { isMobile } from "./theme";
3
- export const stripHtmlTags = (html) => {
4
- const tmp = document.createElement("div");
5
- tmp.innerHTML = html || "";
6
- return tmp.textContent || tmp.innerText || "";
7
- };
8
- export const hexToRgb = (hex) => {
9
- // Remove the hash if present
10
- hex = hex.replace(/^#/, "");
11
- // Parse the hex values
12
- const r = parseInt(hex.substring(0, 2), 16);
13
- const g = parseInt(hex.substring(2, 4), 16);
14
- const b = parseInt(hex.substring(4, 6), 16);
15
- return `${r}, ${g}, ${b}`;
16
- };
17
- // Helper function to check if running on Android
18
- export const isAndroid = () => {
19
- return /Android/i.test(navigator.userAgent);
20
- };
21
- export const getDefaultCountryByCode = (phoneCountryCode) => {
22
- const code = phoneCountryCode || "44";
23
- return countries.find((country) => country.phone === code) || null;
24
- };
25
- export const getDefaultCountryByLanguage = (language) => {
26
- const code = language ? languageToCountryCode[language] : "GB";
27
- return countries.find((country) => country.code === code) || null;
28
- };
29
- export const getCountryByCode = (code) => {
30
- return countries.find((country) => country.code === code) || null;
31
- };
32
- export const extractBrandingModelProperties = (branding) => {
33
- const mobile = isMobile();
34
- let brandingImage = branding?.images?.backgroundImage || null;
35
- let brandingLogo = branding?.images?.mainLogo || null;
36
- let brandingColors = null;
37
- if (mobile && branding?.images) {
38
- brandingImage =
39
- branding.images.mobileBackgroundImage ||
40
- branding.images.backgroundImage ||
41
- null;
42
- brandingLogo = branding.images.mobileLogo || branding.images.mainLogo;
43
- }
44
- if (branding?.colors) {
45
- brandingColors = branding.colors;
46
- }
47
- return { brandingImage, brandingColors, brandingLogo };
48
- };
49
- export const extractBrandingProperties = (branding) => {
50
- const mobile = isMobile();
51
- let brandingImage = branding?.images?.background_image || null;
52
- let brandingLogo = branding?.images?.main_logo || null;
53
- let brandingColors = null;
54
- if (mobile && branding?.images) {
55
- brandingImage =
56
- branding.images.mobile_background_image ||
57
- branding.images.background_image ||
58
- null;
59
- brandingLogo = branding.images.mobile_logo || branding.images.main_logo;
60
- }
61
- if (branding?.colors) {
62
- brandingColors = branding.colors;
63
- }
64
- return { brandingImage, brandingColors, brandingLogo };
65
- };
66
- export const sanitizeBackgroundUrl = (url) => {
67
- try {
68
- return `url("${url}")`;
69
- }
70
- catch {
71
- return "none";
72
- }
73
- };
74
- export const mapContentTypeToConsentEntityType = (type) => {
75
- if (!type)
76
- return undefined;
77
- // Backward compatibility: map generic "quiz" to "classic_quiz"
78
- if (type === "quiz")
79
- return "classic_quiz";
80
- // If already valid, pass through
81
- const valid = [
82
- "template",
83
- "classic_quiz",
84
- "personality_quiz",
85
- "either_or",
86
- "match_quiz",
87
- "top_x",
88
- "bracket",
89
- "standing",
90
- "poll",
91
- ];
92
- if (valid.includes(type))
93
- return type;
94
- // Fallback: don't set entityType if unknown
95
- console.warn(`[CollectLead] Unknown content type "${type}" for consents; omitting entityType.`);
96
- return undefined;
97
- };
98
- /**
99
- * Get the appropriate URL for branding elements based on primaryUrl and secondaryUrl
100
- * @param primaryUrl - Primary URL from branding.urls.primaryUrl
101
- * @param secondaryUrl - Secondary URL from branding.urls.secondaryUrl
102
- * @param target - Target element type: 'image' or 'logo'
103
- * @returns The appropriate URL or null
104
- *
105
- * Logic:
106
- * - For images: use primaryUrl if available, otherwise null
107
- * - For logos: use secondaryUrl if available, otherwise primaryUrl if available, otherwise null
108
- */
109
- export const getBrandingClickUrl = (primaryUrl, secondaryUrl, target) => {
110
- const primary = primaryUrl?.trim() || null;
111
- const secondary = secondaryUrl?.trim() || null;
112
- if (target === "image") {
113
- return primary;
114
- }
115
- // For logo: secondary takes priority, fallback to primary
116
- return secondary || primary;
117
- };
118
- export const getRelatedInfoPageId = (related) => {
119
- if (!related?.length)
120
- return null;
121
- const match = related.find((r) => r.entityType === "info_page" && r.entityRelationship === "relatedTo");
122
- return match?.entityId ?? null;
123
- };
124
- export const isWithPrize = (flags) => {
125
- if (!flags)
126
- return false;
127
- return flags.some((flag) => flag.toLowerCase() === "prize");
128
- };
129
- const FALLBACK_SDK_ERROR = {
130
- code: 500,
131
- status: "internal_error",
132
- message: "An error occurred. Please try again.",
133
- };
134
- export const extractSdkError = (err, sdk) => {
135
- const config = sdk.helpers.getSDKConfiguration();
136
- if (config.errorHandlingMode === "standard") {
137
- const e = err;
138
- return {
139
- code: e.error?.code ?? FALLBACK_SDK_ERROR.code,
140
- status: e.error?.status ?? FALLBACK_SDK_ERROR.status,
141
- message: e.error?.message ?? FALLBACK_SDK_ERROR.message,
142
- };
143
- }
144
- const e = err;
145
- return {
146
- code: e.data?.error?.code ?? FALLBACK_SDK_ERROR.code,
147
- status: e.data?.error?.status ?? FALLBACK_SDK_ERROR.status,
148
- message: e.data?.error?.message ?? FALLBACK_SDK_ERROR.message,
149
- };
150
- };
151
- export const extractSdkErrorMessage = (err, sdk, fallback = FALLBACK_SDK_ERROR.message) => extractSdkError(err, sdk).message || fallback;
152
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/functions/helpers.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAmB,EAAU,EAAE;IAC3D,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAE3B,OAAO,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAU,EAAE;IAC9C,6BAA6B;IAC7B,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,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C,OAAO;YACL,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,kBAAkB,CAAC,IAAI;YAC9C,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,kBAAkB,CAAC,MAAM;YACpD,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,kBAAkB,CAAC,OAAO;SACxD,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,GAAG,GAAkC,CAAC;IAC7C,OAAO;QACL,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,kBAAkB,CAAC,IAAI;QACpD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,kBAAkB,CAAC,MAAM;QAC1D,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,IAAI,kBAAkB,CAAC,OAAO;KAC9D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,GAAY,EACZ,GAAuB,EACvB,QAAQ,GAAG,kBAAkB,CAAC,OAAO,EAC7B,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces/interfaces.ts"],"names":[],"mappings":""}
package/types/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":""}