@thryveai/theme-interfaces 2.8.32 → 2.8.34

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/dist/index.d.ts CHANGED
@@ -16,8 +16,8 @@ import { IDefaultRetailerSettingsVersion2 } from "./interfaces/default-settings.
16
16
  import { IDefaultStsSettings } from "./interfaces/sts-settings.interfaces";
17
17
  import { IAdvertsData, PdpDetailsElementLayout, IScreenType, IProductCardLayoutObjects, IProductCardILayoutVersions, IProductCardILayoutTypes, ISearchPreview, IRetailerSettings, ISecondTierAuthorization, IFlippConfig, IFlippConfigV2, IFlippScriptUrls, IRedPepperConfig, IAllSettings, ISMSConfig, ICtaButtons, IAddressesSettings, IAccountPageSettings, ILayoutSettings, ILoggingLevel, IDefaultSearchParams, IDefaultStoreLocation, IDefaultCounty, IRetailerCountry, IRestrictMapPlaces, IValidationType, INutritionZone, IFooterTypes, IRegistrationFieldTypes, IRegistrationFieldNames, IValidateLength, IValidateMultipleLengths, IValidateDateRange, IRegistrationField, ICheckoutValidation, ISearchPreviewVisibility, IPaymentCards, IGlobalAnimations, ILayoutAnimationsConfetti, IGlobalCheckoutProps, IAddressIntegration, IAddressFinderType, IAdvertLeaderboards, IAdvertProductGrid, IAdvertSkyScrapers, IPageNamesForAdverts, IAddressValidationTypes, IAdvertSettings, IGoogleAutocompleteSettings, ITimeslotModalSettings, ISodiumWarning, IProductCardsProps, IProductDetailsPageLayout, ICartSummaryLayout, ISmartBanner, ICouponGalleryLayout, IPageAdvertsRow, IEntryModalVersion, IShoppingRuleControl, IAdminOnlyV2, IAccountPageV2, IAddressesSettingsV2, ICartSummaryV2, ICheckoutSettingsV2, IFeaturesV2, IPdpSettingsV2, IProductCardSettingsV2, ISiteSettingsV2, IUseContentEngineV2Components, IPdpNutritionLink, ITypesOfBusiness, IBusinessAccountObject, IPerformanceSettingsV2, IStoreSelectionSettings, ShoppingMode, ILayoutCarousel } from "./interfaces/retailer-settings.interfaces";
18
18
  import { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames } from "./interfaces/icons.interfaces";
19
- import { ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource } from "./interfaces/theme.interfaces";
20
- import { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IBrandColors, IUiColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, IIconPosition } from "./interfaces/default-theme.interface";
19
+ import { ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource, IThemeHeadScript } from "./interfaces/theme.interfaces";
20
+ import { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IBrandColors, IUiColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, IDefaultThemeHeadScript, IIconPosition, ITimeSlotState, ITimeSlotVariant } from "./interfaces/default-theme.interface";
21
21
  import { CMSComponentNames, CMSNames } from "./storefront/contentEngineComponents";
22
22
  import { ProductAttributes, ProductAttrToIcons } from "./storefront/productBadgeAttributes";
23
23
  /** MOBILE */
@@ -38,6 +38,6 @@ export { ProductAttrToIcons, ProductAttributes };
38
38
  export { ITypesOfBusiness, IBusinessAccountObject };
39
39
  export { IAdminTemplateInputTypes, IAdminSettingsTemplate, IAdminSharedSettingsTemplate, IAdminSettingsTemplateSTS, IAdminControl, IAdminControlType, IThemeGenerator, IAdminImagesTemplateSFUI, IAdminImagesTemplateSTS, IAdminThemeTemplateSFUI, IAdminThemeTemplateOptions, IAdminImagesControls, ISecondaryFaviconType, };
40
40
  export { IDefaultRetailerSettingsVersion2, IDefaultStsSettings };
41
- export { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IBrandColors, IUiColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource, IIconPosition, };
41
+ export { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IBrandColors, IUiColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, IDefaultThemeHeadScript, ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource, IThemeHeadScript, IIconPosition, ITimeSlotState, ITimeSlotVariant, };
42
42
  export { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames };
43
43
  export { PdpDetailsElementLayout, ShoppingMode, ISearchPreview, IRetailerSettings, ISecondTierAuthorization, IFlippConfig, IFlippConfigV2, IFlippScriptUrls, IRedPepperConfig, IAllSettings, ISMSConfig, ICtaButtons, IAddressesSettings, IAccountPageSettings, ILayoutSettings, ILayoutCarousel, ILoggingLevel, IDefaultSearchParams, IDefaultStoreLocation, IDefaultCounty, IRetailerCountry, IRestrictMapPlaces, IValidationType, INutritionZone, IFooterTypes, IRegistrationFieldTypes, IRegistrationFieldNames, IValidateLength, IValidateMultipleLengths, IValidateDateRange, IRegistrationField, ICheckoutValidation, ISearchPreviewVisibility, IPaymentCards, IGlobalAnimations, ILayoutAnimationsConfetti, IGlobalCheckoutProps, IAddressIntegration, IAddressFinderType, IAdvertLeaderboards, IAdvertProductGrid, IAdvertSkyScrapers, IPageNamesForAdverts, IAddressValidationTypes, IUseContentEngineV2Components, IAdvertSettings, IGoogleAutocompleteSettings, ITimeslotModalSettings, IPdpNutritionLink, ISodiumWarning, IProductCardsProps, IProductDetailsPageLayout, ICartSummaryLayout, ISmartBanner, IEntryModalVersion, IShoppingRuleControl, ICouponGalleryLayout, IPageAdvertsRow, IScreenType, IProductCardLayoutObjects, IProductCardILayoutVersions, IProductCardILayoutTypes, IAdvertsData, IAdminOnlyV2, IAccountPageV2, IAddressesSettingsV2, ICartSummaryV2, ICheckoutSettingsV2, IFeaturesV2, IPdpSettingsV2, IProductCardSettingsV2, ISiteSettingsV2, ISharedSettings, IPerformanceSettingsV2, IStoreSelectionSettings, };
@@ -522,6 +522,7 @@ export interface IDefaultThemeInterface {
522
522
  globalAnimations: IDefaultThemeGlobalAnimations;
523
523
  metadata: IDefaultThemeMetadata;
524
524
  scripts: IDefaultThemeScripts;
525
+ headScripts: IDefaultThemeHeadScript[];
525
526
  timeSlotGrid: {
526
527
  timeSlot: ITimeSlot;
527
528
  expressDeliveryBanner: {
@@ -534,6 +535,14 @@ export interface IDefaultThemeInterface {
534
535
  export interface IDefaultThemeScripts {
535
536
  [key: string]: string;
536
537
  }
538
+ export interface IDefaultThemeHeadScript {
539
+ src: string;
540
+ attributes?: IDefaultThemeHeadScriptAttribute[];
541
+ }
542
+ interface IDefaultThemeHeadScriptAttribute {
543
+ name: string;
544
+ value: string;
545
+ }
537
546
  interface IMiniCartPadding {
538
547
  top: string;
539
548
  bottom: string;
@@ -807,56 +816,42 @@ export interface IDefaultEmbeddedFontSource {
807
816
  url: string;
808
817
  format: string;
809
818
  }
810
- interface ITimeSlotThemeTextType {
811
- default: string;
812
- expressTimeframe: string;
813
- }
814
- interface ITimeSlotFontWeightType {
815
- default: IFontWeights;
816
- expressTimeframe: IFontWeights;
817
- }
818
- interface ITimeSlotStateThemeString {
819
- available: ITimeSlotThemeTextType;
820
- reserved: ITimeSlotThemeTextType;
821
- unavailable: ITimeSlotThemeTextType;
822
- }
823
- interface ITimeSlotStateFontWeight {
824
- available: ITimeSlotFontWeightType;
825
- reserved: ITimeSlotFontWeightType;
826
- unavailable: ITimeSlotFontWeightType;
827
- }
819
+ export declare type ITimeSlotState = "available" | "reserved" | "unavailable";
820
+ export declare type ITimeSlotVariant = "default" | "expressTimeframe";
821
+ export declare type ITimeSlotVarType<T> = Record<ITimeSlotVariant, T>;
822
+ export declare type ITimeSlotStateMap<T> = Record<ITimeSlotState, T>;
828
823
  export interface ITimeSlotWrapper {
829
- color: ITimeSlotStateThemeString;
830
- backgroundColor: ITimeSlotStateThemeString;
831
- iconColor: ITimeSlotStateThemeString;
832
- fontSize: ITimeSlotStateThemeString;
833
- fontWeight: ITimeSlotStateFontWeight;
824
+ color: ITimeSlotStateMap<ITimeSlotVarType<string>>;
825
+ backgroundColor: ITimeSlotStateMap<ITimeSlotVarType<string>>;
826
+ iconColor: ITimeSlotStateMap<ITimeSlotVarType<string>>;
827
+ fontSize: ITimeSlotStateMap<ITimeSlotVarType<string>>;
828
+ fontWeight: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
834
829
  }
835
830
  export interface ITimeSlotThemeTimeRange {
836
- color: ITimeSlotStateThemeString;
837
- fontSize: ITimeSlotStateThemeString;
838
- fontWeight: ITimeSlotStateFontWeight;
839
- textTransform: ITimeSlotStateThemeString;
840
- lineHeight: ITimeSlotStateThemeString;
831
+ color: ITimeSlotStateMap<ITimeSlotVarType<string>>;
832
+ fontSize: ITimeSlotStateMap<ITimeSlotVarType<string>>;
833
+ fontWeight: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
834
+ textTransform: ITimeSlotStateMap<ITimeSlotVarType<string>>;
835
+ lineHeight: ITimeSlotStateMap<ITimeSlotVarType<string>>;
841
836
  }
842
837
  export interface ITimeSlot {
843
838
  wrapper: ITimeSlotWrapper;
844
839
  radio: {
845
- iconColor: ITimeSlotStateThemeString;
840
+ iconColor: ITimeSlotStateMap<ITimeSlotVarType<string>>;
846
841
  };
847
842
  timeRangeText: ITimeSlotThemeTimeRange;
848
843
  priceText: {
849
- color: ITimeSlotStateThemeString;
844
+ color: ITimeSlotStateMap<ITimeSlotVarType<string>>;
850
845
  };
851
846
  titleText: {
852
- color: ITimeSlotStateThemeString;
853
- fontSize: ITimeSlotStateThemeString;
854
- lineHeight: ITimeSlotStateThemeString;
847
+ color: ITimeSlotStateMap<ITimeSlotVarType<string>>;
848
+ fontSize: ITimeSlotStateMap<ITimeSlotVarType<string>>;
849
+ lineHeight: ITimeSlotStateMap<ITimeSlotVarType<string>>;
855
850
  };
856
851
  descriptionText: {
857
- fontSize: ITimeSlotStateThemeString;
858
- lineHeight: ITimeSlotStateThemeString;
859
- fontWeight: ITimeSlotStateFontWeight;
852
+ fontSize: ITimeSlotStateMap<ITimeSlotVarType<string>>;
853
+ lineHeight: ITimeSlotStateMap<ITimeSlotVarType<string>>;
854
+ fontWeight: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
860
855
  };
861
856
  }
862
857
  export declare type DefaultImagesForSchema = DeepPartial<IDefaultThemeImages>;
@@ -1,3 +1,4 @@
1
+ import { ITimeSlotStateMap, ITimeSlotVarType } from "./default-theme.interface";
1
2
  import { IconNames } from "./icons.interfaces";
2
3
  export interface ITheme extends IInitializedEmptyTheme {
3
4
  theme?: IThemeInterface;
@@ -491,6 +492,7 @@ export interface IThemeInterface {
491
492
  globalAnimations?: IThemeGlobalAnimations;
492
493
  metadata?: IThemeMetadata;
493
494
  scripts?: IThemeScripts;
495
+ headScripts?: IThemeHeadScript[];
494
496
  timeSlotGrid?: {
495
497
  timeSlot?: ITimeSlot;
496
498
  expressDeliveryBanner?: {
@@ -503,6 +505,14 @@ export interface IThemeInterface {
503
505
  export interface IThemeScripts {
504
506
  [key: string]: string;
505
507
  }
508
+ export interface IThemeHeadScript {
509
+ src: string;
510
+ attributes?: IThemeHeadScriptAttribute[];
511
+ }
512
+ export interface IThemeHeadScriptAttribute {
513
+ name: string;
514
+ value: string;
515
+ }
506
516
  interface IMiniCartTabletSettings {
507
517
  enabled?: boolean;
508
518
  iconColor?: string;
@@ -722,56 +732,38 @@ export interface IEmbeddedFontSource {
722
732
  format?: string;
723
733
  }
724
734
  export declare type IDateFormat = "DD/MM/YYYY" | "MM/DD/YYYY";
725
- interface ITimeSlotThemeTextType {
726
- default?: string;
727
- expressTimeframe?: string;
728
- }
729
- interface ITimeSlotFontWeightType {
730
- default?: IFontWeights;
731
- expressTimeframe?: IFontWeights;
732
- }
733
- interface ITimeSlotStateThemeString {
734
- available?: ITimeSlotThemeTextType;
735
- reserved?: ITimeSlotThemeTextType;
736
- unavailable?: ITimeSlotThemeTextType;
737
- }
738
- interface ITimeSlotStateFontWeight {
739
- available?: ITimeSlotFontWeightType;
740
- reserved?: ITimeSlotFontWeightType;
741
- unavailable?: ITimeSlotFontWeightType;
742
- }
743
735
  export interface ITimeSlotWrapper {
744
- color?: ITimeSlotStateThemeString;
745
- backgroundColor?: ITimeSlotStateThemeString;
746
- iconColor?: ITimeSlotStateThemeString;
747
- fontSize?: ITimeSlotStateThemeString;
748
- fontWeight?: ITimeSlotStateFontWeight;
736
+ color?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
737
+ backgroundColor?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
738
+ iconColor?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
739
+ fontSize?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
740
+ fontWeight?: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
749
741
  }
750
742
  export interface ITimeSlotThemeTimeRange {
751
- color?: ITimeSlotStateThemeString;
752
- fontSize?: ITimeSlotStateThemeString;
753
- fontWeight?: ITimeSlotStateFontWeight;
754
- textTransform?: ITimeSlotStateThemeString;
755
- lineHeight?: ITimeSlotStateThemeString;
743
+ color?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
744
+ fontSize?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
745
+ fontWeight?: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
746
+ textTransform?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
747
+ lineHeight?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
756
748
  }
757
749
  export interface ITimeSlot {
758
750
  wrapper?: ITimeSlotWrapper;
759
751
  radio?: {
760
- iconColor?: ITimeSlotStateThemeString;
752
+ iconColor?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
761
753
  };
762
754
  timeRangeText?: ITimeSlotThemeTimeRange;
763
755
  priceText?: {
764
- color?: ITimeSlotStateThemeString;
756
+ color?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
765
757
  };
766
758
  titleText?: {
767
- color?: ITimeSlotStateThemeString;
768
- fontSize?: ITimeSlotStateThemeString;
769
- lineHeight?: ITimeSlotStateThemeString;
759
+ color?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
760
+ fontSize?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
761
+ lineHeight?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
770
762
  };
771
763
  descriptionText?: {
772
- fontSize?: ITimeSlotStateThemeString;
773
- lineHeight?: ITimeSlotStateThemeString;
774
- fontWeight?: ITimeSlotStateFontWeight;
764
+ fontSize?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
765
+ lineHeight?: ITimeSlotStateMap<ITimeSlotVarType<string>>;
766
+ fontWeight?: ITimeSlotStateMap<ITimeSlotVarType<IFontWeights>>;
775
767
  };
776
768
  }
777
769
  export {};