@sentecacommerce-theme/lib 0.12.100 → 0.13.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 (56) hide show
  1. package/dist/cjs/analytics/Pixel/mainScript.js +1 -2
  2. package/dist/cjs/api/getSDKConfig.js +2 -4
  3. package/dist/cjs/api/myCartApi/index.js +2 -8
  4. package/dist/cjs/config/SentecaProvider.js +1 -3
  5. package/dist/cjs/hooks/useAvailability/index.js +1 -1
  6. package/dist/cjs/hooks/useProduct/index.js +5 -15
  7. package/dist/cjs/hooks/wishlist-hooks/useWishlistItem/index.js +15 -39
  8. package/dist/cjs/listing/api/queries/useListingQuery.js +1 -1
  9. package/dist/cjs/listing/hooks/useListingMeta.js +40 -49
  10. package/dist/cjs/listing/hooks/useSlideFilter.js +3 -24
  11. package/dist/cjs/listing/ssr/prefetchCategories.js +6 -5
  12. package/dist/cjs/listing/ssr/prefetchPredicate.js +4 -4
  13. package/dist/cjs/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  14. package/dist/cjs/navigation/components/SearchBox/index.js +4 -4
  15. package/dist/cjs/seo/components/TranslationsMeta/index.js +14 -43
  16. package/dist/cjs/seo/components/index.js +0 -12
  17. package/dist/cjs/seo/hooks/useSeoTranslations.js +14 -55
  18. package/dist/cjs/ui/components/GridStyles.js +2 -2
  19. package/dist/cjs/ui/components/RangeSliderInput.js +1 -14
  20. package/dist/cjs/utils/index.js +0 -12
  21. package/dist/cjs/utils/isTouchDevice.js +1 -2
  22. package/dist/esm/analytics/Pixel/mainScript.js +1 -2
  23. package/dist/esm/api/getSDKConfig.js +3 -5
  24. package/dist/esm/api/myCartApi/index.js +2 -8
  25. package/dist/esm/config/SentecaProvider.js +1 -3
  26. package/dist/esm/hooks/useAvailability/index.js +1 -1
  27. package/dist/esm/hooks/useProduct/index.js +16 -26
  28. package/dist/esm/hooks/wishlist-hooks/useWishlistItem/index.js +13 -21
  29. package/dist/esm/listing/api/queries/useListingQuery.js +1 -1
  30. package/dist/esm/listing/hooks/useListingMeta.js +40 -49
  31. package/dist/esm/listing/hooks/useSlideFilter.js +3 -24
  32. package/dist/esm/listing/ssr/prefetchCategories.js +7 -6
  33. package/dist/esm/listing/ssr/prefetchPredicate.js +4 -4
  34. package/dist/esm/navigation/components/SearchBox/Components/EmptyBox/index.js +7 -7
  35. package/dist/esm/navigation/components/SearchBox/index.js +4 -4
  36. package/dist/esm/seo/components/TranslationsMeta/index.js +14 -43
  37. package/dist/esm/seo/components/index.js +0 -1
  38. package/dist/esm/seo/hooks/useSeoTranslations.js +14 -55
  39. package/dist/esm/ui/components/GridStyles.js +2 -2
  40. package/dist/esm/ui/components/RangeSliderInput.js +1 -14
  41. package/dist/esm/utils/index.js +0 -1
  42. package/dist/esm/utils/isTouchDevice.js +1 -2
  43. package/dist/types/listing/hooks/useSlideFilter.d.ts +0 -4
  44. package/dist/types/listing/types.d.ts +0 -10
  45. package/dist/types/navigation/components/SearchBox/Components/EmptyBox/index.d.ts +4 -5
  46. package/dist/types/navigation/components/SearchBox/index.d.ts +6 -7
  47. package/dist/types/seo/components/index.d.ts +0 -1
  48. package/dist/types/seo/hooks/useSeoTranslations.d.ts +3 -5
  49. package/dist/types/ui/components/GridStyles.d.ts +1 -2
  50. package/dist/types/ui/components/RangeSliderInput.d.ts +1 -2
  51. package/dist/types/utils/index.d.ts +0 -1
  52. package/package.json +4 -4
  53. package/dist/cjs/utils/getLocaleFromPath.js +0 -13
  54. package/dist/esm/utils/getLocaleFromPath.js +0 -8
  55. package/dist/types/seo/components/TranslationsMeta/index.d.ts +0 -1
  56. package/dist/types/utils/getLocaleFromPath.d.ts +0 -1
@@ -1,13 +1,12 @@
1
1
  import { StringField, GroupField, BooleanField, NumberField } from '@sentecacommerce-theme/cms';
2
2
  interface SearchLabels {
3
- recentSearches: StringField;
4
- popularSearches: StringField;
5
- suggestedBrands: StringField;
6
- suggestedCategories: StringField;
7
- promoOffers: StringField;
8
- products: StringField;
3
+ recentSearchesLabel: StringField;
4
+ popularSearchesLabel: StringField;
5
+ suggestedBrandsLabel: StringField;
6
+ suggestedCategoriesLabel: StringField;
7
+ promoOffersLabel: StringField;
8
+ productsLabel: StringField;
9
9
  blogLabel: StringField;
10
- noResults: StringField;
11
10
  blog: GroupField<{
12
11
  blogTitle: StringField;
13
12
  image: StringField;
@@ -4,4 +4,3 @@ export * from './GlobalSEO';
4
4
  export * from './OpenGraph';
5
5
  export * from './ProductSEO';
6
6
  export * from './HiddenBreadcrumb';
7
- export * from './TranslationsMeta';
@@ -10,15 +10,13 @@ export declare const SeoTranslationsProvider: ({ children, translations, default
10
10
  }) => JSX.Element;
11
11
  export declare const useSeoTranslations: () => SeoTranslationContextType;
12
12
  export declare type SeoTranslationContextType = {
13
- translationsMap: {
14
- [key: string]: SeoTranslationType;
15
- };
13
+ translations: SeoTranslationType[];
16
14
  defaultLocale: string;
17
- allLocales: string[];
15
+ defaultLocaleSlug: string;
18
16
  };
19
17
  export declare type SeoTranslationType = {
20
18
  slug: string;
19
+ title: string;
21
20
  locale: string;
22
21
  isDefault: boolean;
23
- domain: string;
24
22
  };
@@ -1,5 +1,5 @@
1
1
  import { StringField } from '@sentecacommerce-theme/cms';
2
- export declare const GridStyles: ({ spaceX, breakpoints, remSize, spaceBetweenSections, }: {
2
+ export declare const GridStyles: ({ spaceX, breakpoints, remSize, }: {
3
3
  breakpoints?: {
4
4
  [key: string]: {
5
5
  min: StringField;
@@ -7,5 +7,4 @@ export declare const GridStyles: ({ spaceX, breakpoints, remSize, spaceBetweenSe
7
7
  } | undefined;
8
8
  spaceX: number;
9
9
  remSize?: number | undefined;
10
- spaceBetweenSections?: number | undefined;
11
10
  }) => JSX.Element;
@@ -15,12 +15,11 @@ export declare const RangeSlideClasses: {
15
15
  thumbHover: string;
16
16
  thumbActive: string;
17
17
  };
18
- export declare const RangeSliderInput: ({ defaultValue, onChange, onSlide, min, max, step, }: {
18
+ export declare const RangeSliderInput: ({ defaultValue, onChange, min, max, step, }: {
19
19
  min: number;
20
20
  max: number;
21
21
  step: number;
22
22
  defaultValue: ValueType;
23
23
  onChange: (data: ValueType) => void;
24
- onSlide?: ((data: ValueType) => void) | undefined;
25
24
  }) => JSX.Element;
26
25
  export {};
@@ -13,7 +13,6 @@ export * from './getTranslatableField';
13
13
  export * from './formatAsCurrency';
14
14
  export * from './createCatalogBreadcrumb';
15
15
  export * from './adjustColor';
16
- export * from './getLocaleFromPath';
17
16
  export * from './calcDiscount';
18
17
  export * from './canUseDom';
19
18
  export * from './getFirst';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.12.100",
4
+ "version": "0.13.1",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,13 +31,13 @@
31
31
  "watch:cjs": "swc src --out-dir dist/cjs -w",
32
32
  "watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
33
33
  },
34
- "gitHead": "154b2ef905a065ffd2705510e779c4101004a42d",
34
+ "gitHead": "2a9d7fd163520fde743840e137093cc0acc9d2d7",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.12.100",
40
- "@sentecacommerce-theme/cms": "^0.12.100",
39
+ "@sentecacommerce-theme/base": "^0.13.1",
40
+ "@sentecacommerce-theme/cms": "^0.13.1",
41
41
  "@sentecacommerce/sdk": "2.0.161",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",
@@ -1,13 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", {
2
- value: true
3
- });
4
- exports.getLocaleFromPath = void 0;
5
- var _canUseDom = require("./canUseDom");
6
- var getLocaleFromPath = function() {
7
- if (!(0, _canUseDom).canUseDOM()) return '';
8
- var locale = window.location.pathname.split('/')[1] || '';
9
- // the allowed standards: bg bg-BG, en en-US/en-UK
10
- if (locale.length !== 2 && locale.length !== 5) return '';
11
- return locale;
12
- };
13
- exports.getLocaleFromPath = getLocaleFromPath;
@@ -1,8 +0,0 @@
1
- import { canUseDOM } from './canUseDom';
2
- export var getLocaleFromPath = function() {
3
- if (!canUseDOM()) return '';
4
- var locale = window.location.pathname.split('/')[1] || '';
5
- // the allowed standards: bg bg-BG, en en-US/en-UK
6
- if (locale.length !== 2 && locale.length !== 5) return '';
7
- return locale;
8
- };
@@ -1 +0,0 @@
1
- export declare const TranslationsMeta: () => JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare const getLocaleFromPath: () => string;