@wlloyalty/wll-react-sdk 1.0.54 → 1.0.56

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.
@@ -2,11 +2,11 @@ import { Meta } from '@storybook/react';
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const SeasonalPromotionBanner: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
- tile: import("../../../types/tile").Tile;
5
+ tile: import("../../..").Tile;
6
6
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
7
  export declare const LoyaltyTierUpgrade: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
- tile: import("../../../types/tile").Tile;
8
+ tile: import("../../..").Tile;
9
9
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
10
  export declare const RewardsHighlight: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
- tile: import("../../../types/tile").Tile;
11
+ tile: import("../../..").Tile;
12
12
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -1,2 +1 @@
1
- import { Tile } from '../../../types/tile';
2
- export declare const ContentTileMock: Tile;
1
+ export {};
@@ -1,3 +1 @@
1
1
  import '@testing-library/jest-dom';
2
- import { Tile } from '../../../types/tile';
3
- export declare const PointsTileMock: Tile;
@@ -1,17 +1 @@
1
1
  import '@testing-library/jest-dom';
2
- import { TileHeight, TileType } from '../../../types/tile';
3
- export declare const RewardCategoryTileMock: {
4
- tileHeight: TileHeight;
5
- active: boolean;
6
- type: TileType;
7
- configuration: {
8
- showName: boolean;
9
- rewardCategoryId: string;
10
- artworkUrl: string;
11
- name: string;
12
- };
13
- id: string;
14
- createdAt: string;
15
- updatedAt: string;
16
- priority: number;
17
- };
@@ -2,23 +2,23 @@ import { Meta } from '@storybook/react';
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const DiningRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
- tile: import("../../../types/tile").Tile;
5
+ tile: import("../../..").Tile;
6
6
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
7
  export declare const ExclusiveExperiences: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
- tile: import("../../../types/tile").Tile;
8
+ tile: import("../../..").Tile;
9
9
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
10
  export declare const InstantRedemption: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
- tile: import("../../../types/tile").Tile;
11
+ tile: import("../../..").Tile;
12
12
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
13
13
  export declare const TravelPerks: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
14
- tile: import("../../../types/tile").Tile;
14
+ tile: import("../../..").Tile;
15
15
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
16
16
  export declare const GiftCardsAndVouchers: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
17
- tile: import("../../../types/tile").Tile;
17
+ tile: import("../../..").Tile;
18
18
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
19
19
  export declare const CharitableDonations: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
20
- tile: import("../../../types/tile").Tile;
20
+ tile: import("../../..").Tile;
21
21
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
22
22
  export declare const LifestyleRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
23
- tile: import("../../../types/tile").Tile;
23
+ tile: import("../../..").Tile;
24
24
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -1,2 +1 @@
1
- import { Tile } from '../../../types/tile';
2
- export declare const RewardTileMock: Tile;
1
+ export {};
@@ -2,11 +2,11 @@ import { Meta } from '@storybook/react';
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
- tile: import("../../../types/tile").Tile;
5
+ tile: import("../../..").Tile;
6
6
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
7
  export declare const DefaultWithPoints: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
- tile: import("../../../types/tile").Tile;
8
+ tile: import("../../..").Tile;
9
9
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
10
  export declare const ArtworkOnly: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
- tile: import("../../../types/tile").Tile;
11
+ tile: import("../../..").Tile;
12
12
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -2,6 +2,6 @@ import { Meta } from '@storybook/react';
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const TravelRewardsSection: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
5
- section?: import("../../../types/section").TSection;
5
+ section?: import("../../..").TSection;
6
6
  sectionId?: string;
7
7
  }>;
package/dist/index.d.ts CHANGED
@@ -248,8 +248,8 @@ declare class RewardTileConfig {
248
248
  purchaseExpiration: string | null;
249
249
  hideCode: boolean;
250
250
  notificationConfig: any | null;
251
- artworkUrl: string;
252
- pointsMultiplier: string;
251
+ artworkUrl: string | undefined;
252
+ pointsMultiplier: number;
253
253
  pointsPrefix: string | null;
254
254
  pointsSuffix: string | null;
255
255
  }
package/dist/index.js CHANGED
@@ -18840,8 +18840,8 @@ var RewardTileConfig = /** @class */function () {
18840
18840
  this.purchaseExpiration = null;
18841
18841
  this.hideCode = false;
18842
18842
  this.notificationConfig = null;
18843
- this.artworkUrl = '';
18844
- this.pointsMultiplier = '';
18843
+ this.artworkUrl = undefined;
18844
+ this.pointsMultiplier = 1;
18845
18845
  this.pointsPrefix = null;
18846
18846
  this.pointsSuffix = null;
18847
18847
  }
@@ -19544,7 +19544,8 @@ var BadgeTileMedia = function (_a) {
19544
19544
  var count = configuration.count,
19545
19545
  artworkUrl = configuration.artworkUrl,
19546
19546
  emptyBadgeArtworkUrl = configuration.emptyBadgeArtworkUrl,
19547
- type = configuration.type;
19547
+ type = configuration.type,
19548
+ name = configuration.name;
19548
19549
  var displayUrl = type === exports.BadgeTileType.Specific ? artworkUrl : count === 0 ? emptyBadgeArtworkUrl : artworkUrl;
19549
19550
  if (!displayUrl) return null;
19550
19551
  return /*#__PURE__*/React.createElement(View$2, {
@@ -19556,7 +19557,8 @@ var BadgeTileMedia = function (_a) {
19556
19557
  },
19557
19558
  style: styles.image,
19558
19559
  resizeMode: "contain",
19559
- isDesaturated: shouldDesaturate(type, count)
19560
+ isDesaturated: shouldDesaturate(type, count),
19561
+ alt: "Badge ".concat(name).concat(type === exports.BadgeTileType.Latest && count === 0 ? ' (not earned)' : '')
19560
19562
  })), children);
19561
19563
  };
19562
19564
 
@@ -19737,6 +19739,7 @@ var BannerTileMedia = function (_a) {
19737
19739
  uri: artworkUrl
19738
19740
  },
19739
19741
  style: styles.media,
19742
+ alt: "Banner image".concat(title ? " for ".concat(title) : ''),
19740
19743
  accessibilityElementsHidden: true,
19741
19744
  importantForAccessibility: "no-hide-descendants"
19742
19745
  }));
@@ -20477,9 +20480,9 @@ var Section = function (_a) {
20477
20480
  });
20478
20481
  }
20479
20482
  // Filter out inactive tiles before passing to child components
20480
- var activeTiles = sectionData.tiles.filter(function (tile) {
20483
+ var activeTiles = sortByPriority(sectionData.tiles.filter(function (tile) {
20481
20484
  return tile.active;
20482
- });
20485
+ }));
20483
20486
  var sectionWithActiveTiles = __assign(__assign({}, sectionData), {
20484
20487
  tiles: activeTiles
20485
20488
  });
@@ -21144,7 +21147,8 @@ var RewardTileMedia = function (_a) {
21144
21147
  var _b = configuration,
21145
21148
  artworkUrl = _b.artworkUrl,
21146
21149
  _c = _b.showArtwork,
21147
- showArtwork = _c === void 0 ? true : _c;
21150
+ showArtwork = _c === void 0 ? true : _c,
21151
+ name = _b.name;
21148
21152
  if (!artworkUrl || !showArtwork) return null;
21149
21153
  var containerStyle = {
21150
21154
  flexBasis: isArtworkOnly ? '100%' : '50%'
@@ -21158,7 +21162,8 @@ var RewardTileMedia = function (_a) {
21158
21162
  source: {
21159
21163
  uri: artworkUrl
21160
21164
  },
21161
- style: styles.image
21165
+ style: styles.image,
21166
+ alt: "Reward image for ".concat(name)
21162
21167
  }));
21163
21168
  };
21164
21169