fansunited-frontend-core 0.0.87 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ in particular **no `@mui/*` package has to be installed**.
29
29
 
30
30
  - Complete TypeScript definitions for all Fans United components
31
31
  - Theme management with light/dark mode support
32
- - Internationalization (i18n) with 15 supported languages, including right-to-left Arabic
32
+ - Internationalization (i18n) with 16 supported languages, including right-to-left Arabic
33
33
  - Shared utilities and helper functions
34
34
  - React providers and hooks
35
35
  - Component primitives
@@ -518,6 +518,7 @@ interface SignInCTADetails {
518
518
  - Romanian (ro)
519
519
  - Serbian (sr)
520
520
  - Slovak (sk)
521
+ - Turkish (tr)
521
522
 
522
523
  ## Usage Examples
523
524
 
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAUpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxE,UAAU,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACvD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,cAAc,GAAG,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+GjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAUpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxE,UAAU,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACvD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,cAAc,GAAG,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiHjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAWxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAyC,CAAC;AAE3E,eAAO,MAAM,SAAS,EAAE,WAAW,EAualC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgBxD,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAWxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAyC,CAAC;AAE3E,eAAO,MAAM,SAAS,EAAE,WAAW,EAualC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiBxD,CAAC"}
@@ -1,5 +1,5 @@
1
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';
2
+ export { stripHtmlTags, hexToRgb, isAndroid, getDefaultCountryByCode, getDefaultCountryByLanguage, extractBrandingModelProperties, extractBrandingProperties, sanitizeBackgroundUrl, mapContentTypeToConsentEntityType, getBrandingClickUrl, getRelatedInfoPageId, getTranslatedPollIds, isWithPrize, extractSdkError, extractSdkErrorMessage, } from './helpers';
3
3
  export { normalizeConsents, initialConsentState, areRequiredConsentsChecked, getCheckedConsentIds, buildConsentContentText, getAcceptedConsentIds, submitConsents, } from './consents';
4
4
  export type { ConsentInput, ConsentEntity } from './consents';
5
5
  export { busyButtonStyles } from './buttonStyles';
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","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,EACL,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"functions.d.ts","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,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -32,6 +32,7 @@ export declare const mapContentTypeToConsentEntityType: (type: string | undefine
32
32
  */
33
33
  export declare const getBrandingClickUrl: (primaryUrl: string | null | undefined, secondaryUrl: string | null | undefined, target: "image" | "logo") => string | null;
34
34
  export declare const getRelatedInfoPageId: (related: RelatedEntityRelationship[] | undefined | null) => string | null;
35
+ export declare const getTranslatedPollIds: (related: RelatedEntityRelationship[] | undefined | null) => string[];
35
36
  export declare const isWithPrize: (flags: string[]) => boolean;
36
37
  export declare const extractSdkError: (err: unknown, sdk: FansUnitedSDKModel) => SdkError;
37
38
  export declare const extractSdkErrorMessage: (err: unknown, sdk: FansUnitedSDKModel, fallback?: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/functions/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EAEjB,kBAAkB,EAClB,yBAAyB,EAE1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE9E,eAAO,M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AAM,eAAe,QACrB,OAAO,OACP,kBAAkB,KACtB,QAkBF,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAC5B,OAAO,OACP,kBAAkB,wBAEtB,MAAuD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/functions/i18n.ts"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,aAAc,MAAM,KAAG,OAAO,CAAC,IAAI,CAsE7D,CAAC"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/functions/i18n.ts"],"names":[],"mappings":"AAoBA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,aAAc,MAAM,KAAG,OAAO,CAAC,IAAI,CAwE7D,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { FansUnitedSDKModel } from 'fansunited-sdk-esm';
2
+
3
+ /**
4
+ * Raw payload from the single-event-by-id endpoint (`GET /v1/events/{event_id}`). `event` carries
5
+ * `sport`, `status` and both competitor objects; the rest is bundled alongside it.
6
+ */
7
+ export interface RawEvent {
8
+ event: Record<string, any>;
9
+ form?: Record<string, any>;
10
+ stats?: Record<string, any>;
11
+ standings?: Record<string, any>;
12
+ head_to_head?: Record<string, any>;
13
+ }
14
+ export interface SportsApiCredentials {
15
+ apiKey: string;
16
+ clientId: string;
17
+ }
18
+ export declare const getSportsApiCredentials: (sdk: FansUnitedSDKModel) => SportsApiCredentials | null;
19
+ /**
20
+ * One event by id. Null on any failure (missing credentials, network error, non-2xx, malformed
21
+ * body), so callers render their "not available" state rather than throwing.
22
+ *
23
+ * `disableCache` is for live polling: a timestamp makes each request a distinct URL, so neither the
24
+ * SDK's cache nor a CDN in front of the API serves the same score back every interval.
25
+ */
26
+ export declare const fetchEventById: (sdk: FansUnitedSDKModel, eventId: string, signal?: AbortSignal, disableCache?: boolean) => Promise<RawEvent | null>;
27
+ //# sourceMappingURL=sportsEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sportsEvents.d.ts","sourceRoot":"","sources":["../../src/functions/sportsEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,QAC7B,kBAAkB,KACtB,oBAAoB,GAAG,IAQzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QACpB,kBAAkB,WACd,MAAM,WACN,WAAW,6BAEnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAmBzB,CAAC"}