@thryveai/theme-interfaces 2.6.8 → 2.7.1

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 (22) hide show
  1. package/dist/interfaces/admin-settings-interfaces.d.ts +41 -35
  2. package/dist/interfaces/default-settings.interfaces.d.ts +2 -1
  3. package/dist/interfaces/retailer-settings.interfaces.d.ts +6 -0
  4. package/dist/storefront/SFUISettingsTemplate.AdminUi.js +39 -980
  5. package/dist/storefront/SFUISettingsTemplates/accountPage.template.d.ts +3 -0
  6. package/dist/storefront/SFUISettingsTemplates/accountPage.template.js +76 -0
  7. package/dist/storefront/SFUISettingsTemplates/addressSettings.template.d.ts +3 -0
  8. package/dist/storefront/SFUISettingsTemplates/addressSettings.template.js +136 -0
  9. package/dist/storefront/SFUISettingsTemplates/adminPanelOnly.template.d.ts +3 -0
  10. package/dist/storefront/SFUISettingsTemplates/adminPanelOnly.template.js +16 -0
  11. package/dist/storefront/SFUISettingsTemplates/cartSummary.template.d.ts +3 -0
  12. package/dist/storefront/SFUISettingsTemplates/cartSummary.template.js +24 -0
  13. package/dist/storefront/SFUISettingsTemplates/common.d.ts +2 -0
  14. package/dist/storefront/SFUISettingsTemplates/common.js +28 -0
  15. package/dist/storefront/SFUISettingsTemplates/features.template.d.ts +3 -0
  16. package/dist/storefront/SFUISettingsTemplates/features.template.js +317 -0
  17. package/dist/storefront/SFUISettingsTemplates/siteSettings.template.d.ts +3 -0
  18. package/dist/storefront/SFUISettingsTemplates/siteSettings.template.js +180 -0
  19. package/dist/storefront/SFUISettingsTemplates/welcomeModal.template.d.ts +3 -0
  20. package/dist/storefront/SFUISettingsTemplates/welcomeModal.template.js +27 -0
  21. package/dist/storefront/defaultSettingsStorefront.js +1 -0
  22. package/package.json +1 -1
@@ -1,48 +1,54 @@
1
- import { IDefaultCounty, IValidationType } from "./retailer-settings.interfaces";
1
+ import { IDefaultCounty, IValidationType, LinkTarget } from "./retailer-settings.interfaces";
2
2
  import { IDefaultColors, IDefaultThemeInterface } from "./default-theme.interface";
3
+ import { IDefaultRetailerSettingsVersion2 } from "./default-settings.interfaces";
4
+ import { IThemeImages } from "./theme.interfaces";
5
+ /**
6
+ * Helper types
7
+ */
8
+ export declare type ITemplateObject<T> = {
9
+ [key in keyof T]: IAdminControl<Flatten<T[key]>>;
10
+ };
11
+ declare type Flatten<Type> = Type extends Array<infer Item> ? Item : Type;
12
+ declare type IPartialKeys<T> = {
13
+ [key in keyof T]: Partial<T[key]>;
14
+ };
15
+ declare type IAdminAvailableSettings = IPartialKeys<Omit<IDefaultRetailerSettingsVersion2, "pdpSettings" | "productCard">>;
16
+ /** ===== */
17
+ export interface IMessageProps {
18
+ caption?: string | string[];
19
+ type?: IMessageTypes;
20
+ showLabel?: boolean;
21
+ }
22
+ declare type IMessageTypes = "info" | "success" | "note" | "warning" | "error" | "notification";
23
+ export declare type IAdminSettingsTemplate = ITemplateObject<IAdminAvailableSettings>;
3
24
  export declare type IAdminTemplateInputTypes = {
4
25
  [key in IAdminControlType]: IAdminControlType;
5
26
  };
6
- export interface IAdminSettingsTemplate {
7
- adminPanelOnly: IAdminControl;
8
- accountPage: IAdminControl;
9
- addressSettings: IAdminControl;
10
- cartSummary: IAdminControl;
11
- checkout: IAdminControl;
12
- features: IAdminControl;
13
- pdpSettings: IAdminControl;
14
- productCard: IAdminControl;
15
- siteSettings: IAdminControl;
16
- }
17
- export interface IAdminControl {
27
+ export interface IAdminControl<T> {
18
28
  title: string;
19
29
  description: string;
20
- helpLink?: string;
21
30
  type: IAdminControlType;
22
- options?: string[] | number[] | IDefaultCounty[] | IValidationType[];
23
- value?: {
24
- [key: string]: IAdminControl;
25
- };
31
+ visible?: boolean;
32
+ group?: IAdminGroupType;
33
+ message?: IMessageProps;
34
+ helpLink?: string;
35
+ options?: string[] | number[] | IDefaultCounty[] | IValidationType[] | LinkTarget;
36
+ value?: ITemplateObject<T>;
37
+ }
38
+ export interface IAdminGroupType {
39
+ id: number;
40
+ name: string;
26
41
  }
27
- export declare type IAdminControlType = "checkbox" | "collapsableObject" | "color" | "dropdown" | "inputChar" | "inputNumber" | "multiDropdown" | "nullObject" | "object" | "images" | "string";
42
+ export declare type IAdminControlType = "checkbox" | "collapsableObject" | "color" | "dropdown" | "inputChar" | "inputNumber" | "multiDropdown" | "nullObject" | "object" | "images" | "string" | "array";
28
43
  export interface IAdminSettingsTemplateSTS {
29
- hasEUTerms: IAdminControl;
30
- hasTwoStepRegistration: IAdminControl;
31
- customTermPolicy: IAdminControl;
32
- gtmId: IAdminControl;
44
+ hasEUTerms: IAdminControl<boolean>;
45
+ hasTwoStepRegistration: IAdminControl<boolean>;
46
+ customTermPolicy: IAdminControl<string>;
47
+ gtmId: IAdminControl<string>;
33
48
  }
34
- export declare type IAdminImagesTemplateSTS = {
35
- [key in IAdminImagesKeysSTS]: IAdminControl;
36
- };
37
- export declare type IAdminImagesTemplateSFUI = {
38
- [key in IAdminImagesKeys]: IAdminControl;
39
- };
40
- export declare type IAdminThemeTemplateSFUI = {
41
- [key in IAdminThemeKeys]: IAdminControl;
42
- };
43
- declare type IAdminThemeKeys = "colors";
44
- declare type IAdminImagesKeysSTS = "logos" | "stsCheckBox" | "stsFavicon";
45
- declare type IAdminImagesKeys = "icons" | "logos" | "confirmationPageImage" | "stsCheckBox" | "stsFavicon" | "favicon" | "rewards" | "verifySiteImage" | "missingImg";
49
+ export declare type IAdminImagesTemplateSTS = ITemplateObject<IPartialKeys<Pick<IThemeImages, "logos" | "stsCheckBox" | "stsFavicon">>>;
50
+ export declare type IAdminImagesTemplateSFUI = ITemplateObject<IPartialKeys<IThemeImages>>;
51
+ export declare type IAdminThemeTemplateSFUI = ITemplateObject<IPartialKeys<Pick<IDefaultThemeInterface, "colors">>>;
46
52
  export interface IAdminThemeTemplateOptions {
47
53
  title: string;
48
54
  description: string;
@@ -1,4 +1,4 @@
1
- import { IAccountPageSettings, IAccountPageV2, IAddressValidationTypes, IAddressesSettings, IAddressesSettingsV2, IAdminOnlyV2, IAdvertSettings, ICartSummaryV2, ICheckoutSettingsV2, ICheckoutValidation, ICtaButtons, IDefaultCounty, IDefaultSearchParams, IDefaultStoreLocation, IFeatureSwitch, IFeaturesV2, IFlippConfig, IFlippConfigV2, IGlobalAnimations, IGlobalCheckoutProps, IGlobalLayouts, IGoogleAutocompleteSettings, ILayoutSettings, ILoggingLevel, INutritionZone, IPaymentCards, IPdpSettingsV2, IProductCardSettingsV2, IProductCardsProps, IProductDetailsPageLayout, IRegistrationField, IRestrictMapPlaces, IRetailerCountry, ISMSConfig, ISearchPreviewVisibility, ISecondTierAuthorization, ISiteSettings, ISiteSettingsV2, ISodiumWarning, ITimeslotModalSettings } from "./retailer-settings.interfaces";
1
+ import { IAccountPageSettings, IAccountPageV2, IAddressValidationTypes, IAddressesSettings, IAddressesSettingsV2, IAdminOnlyV2, IAdvertSettings, ICartSummaryV2, ICheckoutSettingsV2, ICheckoutValidation, ICtaButtons, IDefaultCounty, IDefaultSearchParams, IDefaultStoreLocation, IFeatureSwitch, IFeaturesV2, IFlippConfig, IFlippConfigV2, IGlobalAnimations, IGlobalCheckoutProps, IGlobalLayouts, IGoogleAutocompleteSettings, ILayoutSettings, ILoggingLevel, INutritionZone, IPaymentCards, IPdpSettingsV2, IProductCardSettingsV2, IProductCardsProps, IProductDetailsPageLayout, IRegistrationField, IRestrictMapPlaces, IRetailerCountry, ISMSConfig, ISearchPreviewVisibility, ISecondTierAuthorization, ISiteSettings, ISiteSettingsV2, ISodiumWarning, ITimeslotModalSettings, IWelcomeModalV2 } from "./retailer-settings.interfaces";
2
2
  export interface IDefaultRetailerSettings {
3
3
  adminPanelOnly: {
4
4
  bannerName: string;
@@ -87,4 +87,5 @@ export interface IDefaultRetailerSettingsVersion2 {
87
87
  pdpSettings: IPdpSettingsV2;
88
88
  productCard: IProductCardSettingsV2;
89
89
  siteSettings: ISiteSettingsV2;
90
+ welcomeModal: IWelcomeModalV2[];
90
91
  }
@@ -374,6 +374,12 @@ export interface ISiteSettingsV2 {
374
374
  timeslotModalSettings: ITimeslotModalSettings;
375
375
  useContentEngineV2Components: IUseContentEngineV2Components;
376
376
  }
377
+ export interface IWelcomeModalV2 {
378
+ label: string;
379
+ href: string;
380
+ target: LinkTarget;
381
+ icon: string;
382
+ }
377
383
  export declare type IUseContentEngineV2Components = {
378
384
  [key in CMSNames]: boolean;
379
385
  };