@sonic-equipment/ui 0.0.78 → 0.0.80

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 (2) hide show
  1. package/dist/index.js +26 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -359,6 +359,14 @@ function useFeatureFlags() {
359
359
  return useMemo(() => {
360
360
  const queryParams = qs.parse(search);
361
361
  const showNewPageQueryValue = String(queryParams['new']).toLowerCase() === 'true';
362
+ const hasQueryStringFeatures = Boolean(queryParams['features']);
363
+ if (!showNewPageQueryValue && !hasQueryStringFeatures) {
364
+ /* When no new feature flags are set get them from localStorage */
365
+ return Object.entries(features).reduce((acc, [, value]) => ({
366
+ ...acc,
367
+ [value]: localStorage.getItem(value) === 'true',
368
+ }), {});
369
+ }
362
370
  const queryStringFeatures = String(queryParams['features'])
363
371
  .toLowerCase()
364
372
  .split(',');
@@ -8020,15 +8028,15 @@ function useFetchProductDetailsPageData({ languageCode, pageUrl, }) {
8020
8028
  {
8021
8029
  heading: 'Safety first',
8022
8030
  icon: {
8023
- 1: 'images/usps/usp-1-icon.svg',
8024
- 2: 'images/usps/usp-1-icon.svg',
8025
- 3: 'images/usps/usp-1-icon.svg',
8031
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8032
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8033
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8026
8034
  altText: 'Icon',
8027
8035
  },
8028
8036
  image: {
8029
- 1: '/images/usps/usp-1.png',
8030
- 2: '/images/usps/usp-1.png',
8031
- 3: '/images/usps/usp-1.png',
8037
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8038
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8039
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8032
8040
  altText: 'Image',
8033
8041
  },
8034
8042
  text: `
@@ -8040,15 +8048,15 @@ function useFetchProductDetailsPageData({ languageCode, pageUrl, }) {
8040
8048
  {
8041
8049
  heading: 'Safety second',
8042
8050
  icon: {
8043
- 1: 'images/usps/usp-1-icon.svg',
8044
- 2: 'images/usps/usp-1-icon.svg',
8045
- 3: 'images/usps/usp-1-icon.svg',
8051
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8052
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8053
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8046
8054
  altText: 'Icon',
8047
8055
  },
8048
8056
  image: {
8049
- 1: '/images/usps/usp-2.png',
8050
- 2: '/images/usps/usp-2.png',
8051
- 3: '/images/usps/usp-2.png',
8057
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-2.png',
8058
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-2.png',
8059
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-2.png',
8052
8060
  altText: 'Image',
8053
8061
  },
8054
8062
  text: `
@@ -8061,15 +8069,15 @@ function useFetchProductDetailsPageData({ languageCode, pageUrl, }) {
8061
8069
  {
8062
8070
  heading: 'Safety first',
8063
8071
  icon: {
8064
- 1: 'images/usps/usp-1-icon.svg',
8065
- 2: 'images/usps/usp-1-icon.svg',
8066
- 3: 'images/usps/usp-1-icon.svg',
8072
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8073
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8074
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-1-icon.svg',
8067
8075
  altText: 'Icon',
8068
8076
  },
8069
8077
  image: {
8070
- 1: '/images/usps/usp-1.png',
8071
- 2: '/images/usps/usp-1.png',
8072
- 3: '/images/usps/usp-1.png',
8078
+ 1: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8079
+ 2: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8080
+ 3: 'https://ui.sonic-equipment.com/images/usps/usp-1.png',
8073
8081
  altText: 'Image',
8074
8082
  },
8075
8083
  text: `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {