@wlloyalty/wll-react-sdk 1.0.3 → 1.0.5
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/dist/index.d.ts +606 -9
- package/dist/index.js +20113 -2
- package/dist/index.js.map +1 -0
- package/package.json +7 -6
- package/dist/components/atoms/BaseBanner/BaseBanner.stories.d.ts +0 -8
- package/dist/components/atoms/BaseBanner/index.d.ts +0 -9
- package/dist/components/atoms/BaseTile/BaseTile.stories.d.ts +0 -14
- package/dist/components/atoms/BaseTile/index.d.ts +0 -17
- package/dist/components/atoms/Button/Button.stories.d.ts +0 -7
- package/dist/components/atoms/Button/index.d.ts +0 -9
- package/dist/components/atoms/Icon/Icon.stories.d.ts +0 -28
- package/dist/components/atoms/Icon/index.d.ts +0 -11
- package/dist/components/atoms/Image/index.d.ts +0 -9
- package/dist/components/atoms/LoadingIndicator/index.d.ts +0 -7
- package/dist/components/atoms/ProgressBar/ProgressBar.stories.d.ts +0 -8
- package/dist/components/atoms/ProgressBar/index.d.ts +0 -9
- package/dist/components/atoms/Text/Text.stories.d.ts +0 -11
- package/dist/components/atoms/Text/index.d.ts +0 -10
- package/dist/components/atoms/TileContainer/index.d.ts +0 -7
- package/dist/components/atoms/index.d.ts +0 -9
- package/dist/components/molecules/Carousel/Carousel.stories.d.ts +0 -13
- package/dist/components/molecules/Carousel/index.d.ts +0 -7
- package/dist/components/molecules/Grid/Grid.stories.d.ts +0 -6
- package/dist/components/molecules/Grid/index.d.ts +0 -7
- package/dist/components/molecules/ProgressIndicator/ProgressIndicator.stories.d.ts +0 -11
- package/dist/components/molecules/ProgressIndicator/index.d.ts +0 -11
- package/dist/components/molecules/SectionHeader/SectionHeader.stories.d.ts +0 -7
- package/dist/components/molecules/SectionHeader/index.d.ts +0 -7
- package/dist/components/molecules/index.d.ts +0 -5
- package/dist/components/organisms/BadgeTile/BadgeTile.stories.d.ts +0 -9
- package/dist/components/organisms/BadgeTile/index.d.ts +0 -13
- package/dist/components/organisms/BannerTile/BannerTile.stories.d.ts +0 -9
- package/dist/components/organisms/BannerTile/index.d.ts +0 -16
- package/dist/components/organisms/ContentTile/ContentTile.stories.d.ts +0 -28
- package/dist/components/organisms/ContentTile/index.d.ts +0 -7
- package/dist/components/organisms/PointsTile/PointsTile.stories.d.ts +0 -9
- package/dist/components/organisms/PointsTile/index.d.ts +0 -17
- package/dist/components/organisms/RewardCategoryTile/RewardCategoryTile.stories.d.ts +0 -12
- package/dist/components/organisms/RewardCategoryTile/index.d.ts +0 -12
- package/dist/components/organisms/RewardTile/RewardTile.stories.d.ts +0 -9
- package/dist/components/organisms/RewardTile/index.d.ts +0 -16
- package/dist/components/organisms/Section/Section.stories.d.ts +0 -3
- package/dist/components/organisms/Section/index.d.ts +0 -19
- package/dist/components/organisms/TierTile/TierTile.stories.d.ts +0 -22
- package/dist/components/organisms/TierTile/index.d.ts +0 -25
- package/dist/components/organisms/index.d.ts +0 -9
- package/dist/constants/device.d.ts +0 -7
- package/dist/context/WllSdkContext.d.ts +0 -25
- package/dist/index.js.LICENSE.txt +0 -6
- package/dist/types/common.d.ts +0 -2
- package/dist/types/section.d.ts +0 -19
- package/dist/types/theme.d.ts +0 -39
- package/dist/types/tile.d.ts +0 -91
- package/dist/types/wll.d.ts +0 -62
- package/dist/utils/responsiveHelper.d.ts +0 -5
- package/dist/utils/storybookHelpers.d.ts +0 -5
- package/dist/utils/styling.d.ts +0 -11
- package/dist/utils/themeHelpers.d.ts +0 -9
- package/dist/utils/transforms.d.ts +0 -0
- package/dist/utils/variant.d.ts +0 -5
package/dist/types/tile.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Badge, Reward, RewardCategory, TierType } from './wll';
|
|
2
|
-
export declare enum UrlTarget {
|
|
3
|
-
sameWindow = "SAME_WINDOW",
|
|
4
|
-
newWindow = "NEW_WINDOW"
|
|
5
|
-
}
|
|
6
|
-
export declare enum BadgeTileType {
|
|
7
|
-
latestEarned = "LATEST_EARNED",
|
|
8
|
-
specificBadge = "SPECIFIC_BADGE"
|
|
9
|
-
}
|
|
10
|
-
export declare enum TierTileType {
|
|
11
|
-
currentTier = "CURRENT_TIER",
|
|
12
|
-
currentTargetNext = "CURRENT_TARGET_NEXT",
|
|
13
|
-
currentTargetSpecific = "CURRENT_TARGET_SPECIFIC"
|
|
14
|
-
}
|
|
15
|
-
export declare enum ProgressType {
|
|
16
|
-
Name = "NAME",
|
|
17
|
-
Points = "POINTS"
|
|
18
|
-
}
|
|
19
|
-
export declare enum TileType {
|
|
20
|
-
Banner = "BANNER",
|
|
21
|
-
Points = "POINTS",
|
|
22
|
-
Content = "CONTENT",
|
|
23
|
-
Reward = "REWARD",
|
|
24
|
-
Badge = "BADGE",
|
|
25
|
-
RewardCategory = "REWARD_CATEGORY",
|
|
26
|
-
Tier = "TIER"
|
|
27
|
-
}
|
|
28
|
-
export declare enum TileHeight {
|
|
29
|
-
Half = "HALF",
|
|
30
|
-
Full = "FULL"
|
|
31
|
-
}
|
|
32
|
-
export type ProgessType = 'NAME' | 'POINTS';
|
|
33
|
-
export declare class BannerTileConfig {
|
|
34
|
-
imageUrl?: string | null;
|
|
35
|
-
title?: string | null;
|
|
36
|
-
description?: string | null;
|
|
37
|
-
buttonText?: string | null;
|
|
38
|
-
url?: string | null;
|
|
39
|
-
urlTarget?: UrlTarget;
|
|
40
|
-
}
|
|
41
|
-
export declare class PointsTileConfig {
|
|
42
|
-
title?: string | null;
|
|
43
|
-
multiplier?: number;
|
|
44
|
-
prefix?: string | null;
|
|
45
|
-
suffix?: string | null;
|
|
46
|
-
imageUrl?: string | null;
|
|
47
|
-
points?: number;
|
|
48
|
-
}
|
|
49
|
-
export declare class ContentTileConfig {
|
|
50
|
-
title?: string | null;
|
|
51
|
-
subtitle?: string | null;
|
|
52
|
-
imageUrl?: string | null;
|
|
53
|
-
linkURL?: string | null;
|
|
54
|
-
}
|
|
55
|
-
export declare class RewardTileConfig {
|
|
56
|
-
reward?: Reward;
|
|
57
|
-
showPrice?: boolean;
|
|
58
|
-
}
|
|
59
|
-
export declare class BadgeTileConfig {
|
|
60
|
-
badgeTileType?: BadgeTileType;
|
|
61
|
-
badgeId?: string | null;
|
|
62
|
-
badge?: Badge;
|
|
63
|
-
count: number;
|
|
64
|
-
}
|
|
65
|
-
export declare class RewardCategoryTileConfig {
|
|
66
|
-
categoryId?: string | null;
|
|
67
|
-
allowDecorationOverlay?: boolean;
|
|
68
|
-
rewardCategory?: RewardCategory;
|
|
69
|
-
}
|
|
70
|
-
export declare class TierTileConfig {
|
|
71
|
-
progressType: ProgressType;
|
|
72
|
-
pointsMultiplier?: number;
|
|
73
|
-
pointsPrefix?: string;
|
|
74
|
-
pointsSuffix?: string;
|
|
75
|
-
tier?: TierType;
|
|
76
|
-
targetTier?: TierType | undefined;
|
|
77
|
-
type?: TierTileType;
|
|
78
|
-
targetTierAttainingPeriod?: Date | null;
|
|
79
|
-
}
|
|
80
|
-
export type Tile = {
|
|
81
|
-
id: string | null;
|
|
82
|
-
type?: TileType;
|
|
83
|
-
active: boolean;
|
|
84
|
-
createdAt: string | null;
|
|
85
|
-
updatedAt: string | null;
|
|
86
|
-
tileHeight: TileHeight;
|
|
87
|
-
configuration: TileConfig;
|
|
88
|
-
};
|
|
89
|
-
declare const getConfigForTileType: (tileType: TileType) => typeof BannerTileConfig | typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
90
|
-
export type TileConfig = InstanceType<ReturnType<typeof getConfigForTileType>>;
|
|
91
|
-
export {};
|
package/dist/types/wll.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export type Badge = {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
artworkUrl: string;
|
|
6
|
-
createdAt: string;
|
|
7
|
-
updatedAt: string;
|
|
8
|
-
};
|
|
9
|
-
export declare class RewardCategory {
|
|
10
|
-
name?: string;
|
|
11
|
-
priority?: number;
|
|
12
|
-
type?: string;
|
|
13
|
-
id?: string;
|
|
14
|
-
createdAt?: string;
|
|
15
|
-
updatedAt?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
metadata?: string;
|
|
18
|
-
pictureUrl?: string;
|
|
19
|
-
rewards?: Reward[];
|
|
20
|
-
parent?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare class Reward {
|
|
23
|
-
id?: string;
|
|
24
|
-
createdAt?: string;
|
|
25
|
-
updatedAt?: string;
|
|
26
|
-
name?: string;
|
|
27
|
-
pictureUrl?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
price?: number;
|
|
30
|
-
value?: number;
|
|
31
|
-
priority?: number;
|
|
32
|
-
availability?: Availability;
|
|
33
|
-
purchasable?: boolean;
|
|
34
|
-
tier?: string;
|
|
35
|
-
summary?: string;
|
|
36
|
-
redemptionMessage?: string;
|
|
37
|
-
visibilityCriteria?: string;
|
|
38
|
-
}
|
|
39
|
-
type Availability = {
|
|
40
|
-
start: string;
|
|
41
|
-
end: string;
|
|
42
|
-
};
|
|
43
|
-
type Effectivity = {
|
|
44
|
-
start: string;
|
|
45
|
-
end: string;
|
|
46
|
-
};
|
|
47
|
-
export type TierType = {
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
artworkUrl?: string;
|
|
52
|
-
priority: number;
|
|
53
|
-
pointsRequirement?: number;
|
|
54
|
-
calculation?: string;
|
|
55
|
-
accumulationPeriod?: string;
|
|
56
|
-
effectivity?: Effectivity;
|
|
57
|
-
createdAt?: string;
|
|
58
|
-
updatedAt?: string;
|
|
59
|
-
earnedPoints?: number;
|
|
60
|
-
attained?: boolean;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
package/dist/utils/styling.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseThemeObject } from "../types/theme";
|
|
2
|
-
export declare const sizes: {
|
|
3
|
-
borderRadiusSm: number;
|
|
4
|
-
borderRadiusLg: number;
|
|
5
|
-
borderRadiusButton: number;
|
|
6
|
-
borderRadiusRounded: number;
|
|
7
|
-
sm: number;
|
|
8
|
-
md: number;
|
|
9
|
-
lg: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const defaultTheme: BaseThemeObject;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const getDerivedColor: (color: string) => string;
|
|
2
|
-
export declare const getReadableTextColor: (backgroundColor: string) => string;
|
|
3
|
-
type PercentageKey = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95;
|
|
4
|
-
export type DerivedColors = {
|
|
5
|
-
[K in PercentageKey]: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const getDerivedColorPercentages: (color: string) => DerivedColors;
|
|
8
|
-
export declare const getAlphaDerivedColors: (color: string) => DerivedColors;
|
|
9
|
-
export {};
|
|
File without changes
|
package/dist/utils/variant.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
import { ThemeObject } from "../types/theme";
|
|
3
|
-
type StyleVariants<V extends string> = Record<V, ViewStyle | TextStyle>;
|
|
4
|
-
export declare function createVariantSystem<V extends string>(baseStyle: ViewStyle | TextStyle, variantStyles: (theme: ThemeObject) => StyleVariants<V>): (theme: ThemeObject, variant: V) => ViewStyle[];
|
|
5
|
-
export {};
|