@wlloyalty/wll-react-sdk 1.0.23 → 1.0.25
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/README.md +21 -18
- package/dist/index.d.ts +13 -3
- package/dist/index.js +258 -117
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,15 +25,16 @@
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
# npm
|
|
28
|
-
npm install @wll
|
|
28
|
+
npm install @wlloyalty/wll-react-sdk
|
|
29
29
|
|
|
30
30
|
# yarn
|
|
31
|
-
yarn add @wll
|
|
31
|
+
yarn add @wlloyalty/wll-react-sdk
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## 💻 System Requirements
|
|
35
35
|
|
|
36
36
|
The SDK is compatible with:
|
|
37
|
+
|
|
37
38
|
- React: ^18.0.0
|
|
38
39
|
- React Native: >=0.70.0 <0.73.0
|
|
39
40
|
|
|
@@ -54,25 +55,27 @@ type(scope?): subject
|
|
|
54
55
|
```
|
|
55
56
|
|
|
56
57
|
### Types
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
58
|
+
|
|
59
|
+
| Type | Description |
|
|
60
|
+
| ---------- | --------------------------------------------------------- |
|
|
61
|
+
| `feat` | New features (e.g., `feat(auth): add Google OAuth login`) |
|
|
62
|
+
| `fix` | Bug fixes (e.g., `fix(api): correct rate limiting logic`) |
|
|
63
|
+
| `hotfix` | Critical bug fixes requiring immediate deployment |
|
|
64
|
+
| `docs` | Documentation changes |
|
|
65
|
+
| `style` | Code style changes (formatting, etc) |
|
|
66
|
+
| `refactor` | Code changes that neither fix bugs nor add features |
|
|
67
|
+
| `perf` | Performance improvements |
|
|
68
|
+
| `test` | Adding or updating tests |
|
|
69
|
+
| `build` | Changes to build system or dependencies |
|
|
70
|
+
| `ci` | Changes to CI configuration |
|
|
71
|
+
| `chore` | Other changes that don't modify src or test files |
|
|
72
|
+
| `revert` | Reverting previous changes |
|
|
73
|
+
| `wip` | Work in progress |
|
|
72
74
|
|
|
73
75
|
### Development Workflow
|
|
74
76
|
|
|
75
77
|
We use several tools to maintain code quality:
|
|
78
|
+
|
|
76
79
|
- **Commitlint**: Validates commit message format
|
|
77
80
|
- **Commitizen**: Interactive commit message formatter
|
|
78
81
|
- **Husky**: Git hooks for enforcing conventions
|
|
@@ -98,4 +101,4 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
98
101
|
## 🆘 Support
|
|
99
102
|
|
|
100
103
|
- [Documentation](https://react-sdk.whitelabel-loyalty.com/)
|
|
101
|
-
- [Issues](https://github.com/white-label-loyalty/wll-react-sdk/issues)
|
|
104
|
+
- [Issues](https://github.com/white-label-loyalty/wll-react-sdk/issues)
|
package/dist/index.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ declare class PointsTileConfig {
|
|
|
188
188
|
}
|
|
189
189
|
declare class ContentTileConfig {
|
|
190
190
|
title?: string | null;
|
|
191
|
-
|
|
191
|
+
body?: string | null;
|
|
192
192
|
artworkUrl?: string | null;
|
|
193
193
|
ctaLinkTarget?: CTALinkTarget;
|
|
194
194
|
ctaLink?: string | null;
|
|
@@ -285,6 +285,7 @@ declare class TierTileConfig {
|
|
|
285
285
|
emptyArtworkUrl?: string;
|
|
286
286
|
pointsToTierPrefix?: string;
|
|
287
287
|
pointsToTierSuffix?: string;
|
|
288
|
+
locale: string;
|
|
288
289
|
}
|
|
289
290
|
type Tile = {
|
|
290
291
|
id: string | null;
|
|
@@ -296,7 +297,7 @@ type Tile = {
|
|
|
296
297
|
configuration: TileConfig;
|
|
297
298
|
priority: number;
|
|
298
299
|
};
|
|
299
|
-
declare const getConfigForTileType: (tileType: TileType) => typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
300
|
+
declare const getConfigForTileType: (tileType: TileType) => typeof BannerTileConfig | typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
300
301
|
type TileConfig = InstanceType<ReturnType<typeof getConfigForTileType>>;
|
|
301
302
|
|
|
302
303
|
type LoadingIndicatorProps = {
|
|
@@ -364,6 +365,15 @@ type BaseTileComponent = FC<BaseTileProps> & {
|
|
|
364
365
|
};
|
|
365
366
|
declare const BaseTile: BaseTileComponent;
|
|
366
367
|
|
|
368
|
+
interface SkeletonProps {
|
|
369
|
+
width?: number | `${number}%`;
|
|
370
|
+
height?: number | `${number}%`;
|
|
371
|
+
borderRadius?: number;
|
|
372
|
+
style?: ViewStyle;
|
|
373
|
+
numberOfSquares?: number;
|
|
374
|
+
}
|
|
375
|
+
declare const Skeleton: React.FC<SkeletonProps>;
|
|
376
|
+
|
|
367
377
|
type TileContainerProps = {
|
|
368
378
|
tiles: Tile[];
|
|
369
379
|
};
|
|
@@ -619,4 +629,4 @@ type WllSdkProviderProps = {
|
|
|
619
629
|
declare const WllSdkProvider: React__default.FC<WllSdkProviderProps>;
|
|
620
630
|
declare const useWllSdk: () => WllSdkContextType;
|
|
621
631
|
|
|
622
|
-
export { type APIResponse, type Availability, type Badge, type BadgeDetail, BadgeTile$1 as BadgeTile, BadgeTileConfig, BadgeTileType, BadgeTile as BadgeTileUpdated, BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, Column as Content, ContentTile, ContentTileConfig, type DerivedProperties, Grid, Group, Icon, type ImagePropsNoSource, LoadingIndicator, PointsTile, PointsTileConfig, type ProgessType, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, type RewardCategory, RewardCategoryTile, RewardCategoryTileConfig, RewardTile, RewardTileConfig, RowHeader, type SDKConfig, Section, SectionHeader, SectionType, type Size, type TSection, Text, type ThemeContextType, type ThemeObject, type ThemeProviderProps, TierTile$1 as TierTile, TierTileConfig, TierTileType, TierTile as TierTileUpdated, type TierType, type Tile, type TileConfig, TileContainer, TileHeight, TileType, type Variant, WllSdkProvider, useWllSdk };
|
|
632
|
+
export { type APIResponse, type Availability, type Badge, type BadgeDetail, BadgeTile$1 as BadgeTile, BadgeTileConfig, BadgeTileType, BadgeTile as BadgeTileUpdated, BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, Column as Content, ContentTile, ContentTileConfig, type DerivedProperties, Grid, Group, Icon, type ImagePropsNoSource, LoadingIndicator, PointsTile, PointsTileConfig, type ProgessType, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, type RewardCategory, RewardCategoryTile, RewardCategoryTileConfig, RewardTile, RewardTileConfig, RowHeader, type SDKConfig, Section, SectionHeader, SectionType, type Size, Skeleton, type TSection, Text, type ThemeContextType, type ThemeObject, type ThemeProviderProps, TierTile$1 as TierTile, TierTileConfig, TierTileType, TierTile as TierTileUpdated, type TierType, type Tile, type TileConfig, TileContainer, TileHeight, TileType, type Variant, WllSdkProvider, useWllSdk };
|