@wlloyalty/wll-react-sdk 1.0.4 → 1.0.7
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/index.d.ts +0 -9
- package/dist/components/atoms/BaseTile/index.d.ts +0 -27
- 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/Content/index.d.ts +0 -14
- 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 -10
- package/dist/components/atoms/ProgressiveImage/ProgressiveImage.stories.d.ts +0 -9
- package/dist/components/atoms/ProgressiveImage/index.d.ts +0 -10
- package/dist/components/atoms/RowHeader/RowHeader.stories.d.ts +0 -8
- package/dist/components/atoms/RowHeader/index.d.ts +0 -8
- 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 -13
- 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 -8
- 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 -14
- package/dist/components/organisms/BadgeTileUpdated/BadgeTileUpdated.stories.d.ts +0 -18
- package/dist/components/organisms/BadgeTileUpdated/index.d.ts +0 -19
- 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 -23
- package/dist/components/organisms/Group/Group.stories.d.ts +0 -6
- package/dist/components/organisms/Group/index.d.ts +0 -6
- 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 -12
- package/dist/components/organisms/RewardTile/index.d.ts +0 -22
- package/dist/components/organisms/Section/Section.stories.d.ts +0 -3
- package/dist/components/organisms/Section/index.d.ts +0 -12
- package/dist/components/organisms/TierTile/TierTile.d.ts +0 -7
- 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/TierTileUpdated/TierTileUpdated.stories.d.ts +0 -33
- package/dist/components/organisms/TierTileUpdated/index.d.ts +0 -15
- package/dist/components/organisms/index.d.ts +0 -12
- package/dist/constants/device.d.ts +0 -7
- package/dist/constants/grid.d.ts +0 -1
- package/dist/context/WllSdkContext.d.ts +0 -30
- package/dist/hooks/useTileSize.d.ts +0 -5
- package/dist/index.js.LICENSE.txt +0 -6
- package/dist/types/common.d.ts +0 -2
- package/dist/types/group.d.ts +0 -9
- package/dist/types/section.d.ts +0 -20
- package/dist/types/theme.d.ts +0 -40
- package/dist/types/tile.d.ts +0 -146
- package/dist/types/wll.d.ts +0 -60
- package/dist/utils/apiHelpers.d.ts +0 -28
- 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 -12
- package/dist/utils/transforms.d.ts +0 -0
- package/dist/utils/variant.d.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,606 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode, FC } from 'react';
|
|
3
|
+
import { ViewStyle, ImageSourcePropType, StyleProp, View, TextProps as TextProps$1, TextStyle, ImageProps } from 'react-native';
|
|
4
|
+
import * as LucideIcons from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
declare const sizes: {
|
|
7
|
+
borderRadiusSm: number;
|
|
8
|
+
borderRadiusLg: number;
|
|
9
|
+
borderRadiusButton: number;
|
|
10
|
+
borderRadiusRounded: number;
|
|
11
|
+
sm: number;
|
|
12
|
+
md: number;
|
|
13
|
+
lg: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type PercentageKey = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95;
|
|
17
|
+
type DerivedColors = {
|
|
18
|
+
[K in PercentageKey]: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type BaseThemeObject = {
|
|
22
|
+
accent: string;
|
|
23
|
+
background: string;
|
|
24
|
+
errorPrimary: string;
|
|
25
|
+
negative: string;
|
|
26
|
+
pageButtonBackground: string;
|
|
27
|
+
pageButtonText: string;
|
|
28
|
+
positive: string;
|
|
29
|
+
primary: string;
|
|
30
|
+
surface: string;
|
|
31
|
+
surfaceText: string;
|
|
32
|
+
text: string;
|
|
33
|
+
};
|
|
34
|
+
type DerivedProperties = {
|
|
35
|
+
accentText: string;
|
|
36
|
+
derivedBackground: string;
|
|
37
|
+
primaryText: string;
|
|
38
|
+
positiveText: string;
|
|
39
|
+
negativeText: string;
|
|
40
|
+
derivedSurfaceText: DerivedColors;
|
|
41
|
+
derivedSurface: DerivedColors;
|
|
42
|
+
alphaDerivedPrimary: DerivedColors;
|
|
43
|
+
alphaDerivedText: DerivedColors;
|
|
44
|
+
};
|
|
45
|
+
type ThemeObject = BaseThemeObject & DerivedProperties & {
|
|
46
|
+
readonly sizes: typeof sizes;
|
|
47
|
+
};
|
|
48
|
+
type ThemeContextType = {
|
|
49
|
+
theme: ThemeObject;
|
|
50
|
+
setTheme: (theme: ThemeObject) => void;
|
|
51
|
+
};
|
|
52
|
+
type ThemeProviderProps = {
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
theme?: Partial<BaseThemeObject>;
|
|
55
|
+
};
|
|
56
|
+
type Variant = 'primary' | 'accent' | 'positive' | 'negative';
|
|
57
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
58
|
+
|
|
59
|
+
type ButtonProps = {
|
|
60
|
+
title: string;
|
|
61
|
+
onPress: () => void;
|
|
62
|
+
variant: Variant;
|
|
63
|
+
};
|
|
64
|
+
declare const Button: React.FC<ButtonProps>;
|
|
65
|
+
|
|
66
|
+
type Justify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
67
|
+
type Align = 'start' | 'end' | 'center' | 'stretch';
|
|
68
|
+
type ColumnProps = {
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
justify?: Justify;
|
|
71
|
+
align?: Align;
|
|
72
|
+
direction?: FlexDirection;
|
|
73
|
+
style?: ViewStyle;
|
|
74
|
+
};
|
|
75
|
+
type FlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
|
|
76
|
+
declare const Column: React.FC<ColumnProps>;
|
|
77
|
+
|
|
78
|
+
type IconName = keyof typeof LucideIcons;
|
|
79
|
+
type IconProps = {
|
|
80
|
+
name: IconName;
|
|
81
|
+
color?: string;
|
|
82
|
+
size?: number;
|
|
83
|
+
strokeWidth?: number;
|
|
84
|
+
};
|
|
85
|
+
declare const Icon: React.FC<IconProps>;
|
|
86
|
+
|
|
87
|
+
type Badge = {
|
|
88
|
+
id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
artworkUrl: string;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
};
|
|
95
|
+
declare class Reward {
|
|
96
|
+
id?: string;
|
|
97
|
+
createdAt?: string;
|
|
98
|
+
updatedAt?: string;
|
|
99
|
+
name?: string;
|
|
100
|
+
pictureUrl?: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
price?: number;
|
|
103
|
+
value?: number;
|
|
104
|
+
priority?: number;
|
|
105
|
+
availability?: Availability;
|
|
106
|
+
purchasable?: boolean;
|
|
107
|
+
tier?: string;
|
|
108
|
+
summary?: string;
|
|
109
|
+
redemptionMessage?: string;
|
|
110
|
+
visibilityCriteria?: string;
|
|
111
|
+
}
|
|
112
|
+
type RewardCategory = {
|
|
113
|
+
name: string;
|
|
114
|
+
priority: number;
|
|
115
|
+
type: string;
|
|
116
|
+
id: string;
|
|
117
|
+
createdAt: string;
|
|
118
|
+
updatedAt: string;
|
|
119
|
+
description: string | null;
|
|
120
|
+
metadata: any | null;
|
|
121
|
+
pictureUrl: string;
|
|
122
|
+
};
|
|
123
|
+
type Availability = {
|
|
124
|
+
start: string;
|
|
125
|
+
end: string;
|
|
126
|
+
};
|
|
127
|
+
type Effectivity = {
|
|
128
|
+
start: string;
|
|
129
|
+
end: string;
|
|
130
|
+
};
|
|
131
|
+
type TierType = {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
description?: string | null;
|
|
135
|
+
artworkUrl?: string | null;
|
|
136
|
+
priority: number;
|
|
137
|
+
pointsRequirement?: number;
|
|
138
|
+
calculation?: string;
|
|
139
|
+
accumulationPeriod?: string;
|
|
140
|
+
effectivity?: Effectivity;
|
|
141
|
+
createdAt?: string;
|
|
142
|
+
updatedAt?: string;
|
|
143
|
+
earnedPoints?: number;
|
|
144
|
+
attained?: boolean;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
declare enum UrlTarget {
|
|
148
|
+
sameWindow = "SAME_WINDOW",
|
|
149
|
+
newWindow = "NEW_WINDOW"
|
|
150
|
+
}
|
|
151
|
+
declare enum TierTileType {
|
|
152
|
+
currentTier = "CURRENT",
|
|
153
|
+
specificTier = "SPECIFIC"
|
|
154
|
+
}
|
|
155
|
+
declare enum ProgressType {
|
|
156
|
+
Name = "NAME",
|
|
157
|
+
Points = "POINTS"
|
|
158
|
+
}
|
|
159
|
+
declare enum TileType {
|
|
160
|
+
Banner = "BANNER",
|
|
161
|
+
Points = "POINTS",
|
|
162
|
+
Content = "CONTENT",
|
|
163
|
+
Reward = "REWARD",
|
|
164
|
+
Badge = "BADGE",
|
|
165
|
+
RewardCategory = "REWARD_CATEGORY",
|
|
166
|
+
Tier = "TIER"
|
|
167
|
+
}
|
|
168
|
+
declare enum TileHeight {
|
|
169
|
+
Half = "HALF",
|
|
170
|
+
Full = "FULL"
|
|
171
|
+
}
|
|
172
|
+
type ProgessType = 'NAME' | 'POINTS';
|
|
173
|
+
declare class BannerTileConfig {
|
|
174
|
+
artworkUrl?: string | null;
|
|
175
|
+
title?: string | null;
|
|
176
|
+
description?: string | null;
|
|
177
|
+
ctaText?: string | null;
|
|
178
|
+
ctaLink?: string | null;
|
|
179
|
+
ctaLinkTarget?: UrlTarget;
|
|
180
|
+
}
|
|
181
|
+
declare class PointsTileConfig {
|
|
182
|
+
title?: string | null;
|
|
183
|
+
multiplier?: number;
|
|
184
|
+
prefix?: string | null;
|
|
185
|
+
suffix?: string | null;
|
|
186
|
+
artworkUrl?: string | null;
|
|
187
|
+
points?: number;
|
|
188
|
+
}
|
|
189
|
+
declare class ContentTileConfig {
|
|
190
|
+
title?: string | null;
|
|
191
|
+
description?: string | null;
|
|
192
|
+
artworkUrl?: string | null;
|
|
193
|
+
linkURL?: string | null;
|
|
194
|
+
}
|
|
195
|
+
declare class RewardTileConfig {
|
|
196
|
+
rewardId: string;
|
|
197
|
+
showPrice: boolean;
|
|
198
|
+
showArtwork?: boolean;
|
|
199
|
+
showDetails?: boolean;
|
|
200
|
+
id: string;
|
|
201
|
+
createdAt: string;
|
|
202
|
+
updatedAt: string;
|
|
203
|
+
name: string;
|
|
204
|
+
pictureUrl: string;
|
|
205
|
+
value: number;
|
|
206
|
+
price: number;
|
|
207
|
+
priority: number;
|
|
208
|
+
availability: Availability;
|
|
209
|
+
purchasable: boolean;
|
|
210
|
+
tier: string | null;
|
|
211
|
+
category: RewardCategory;
|
|
212
|
+
discounts: any[];
|
|
213
|
+
summary: string | null;
|
|
214
|
+
redemptionMessage: string | null;
|
|
215
|
+
visibilityCriteria: string | null;
|
|
216
|
+
type: 'VOUCHER';
|
|
217
|
+
codeType: 'HUMAN' | 'OTP';
|
|
218
|
+
code: string | null;
|
|
219
|
+
purchaseExpiration: string | null;
|
|
220
|
+
hideCode: boolean;
|
|
221
|
+
notificationConfig: any | null;
|
|
222
|
+
artworkUrl: string;
|
|
223
|
+
pointsMultiplier: string;
|
|
224
|
+
pointsPrefix: string | null;
|
|
225
|
+
pointsSuffix: string | null;
|
|
226
|
+
}
|
|
227
|
+
declare enum BadgeTileType {
|
|
228
|
+
Specific = "SPECIFIC",
|
|
229
|
+
Latest = "LATEST_EARNED"
|
|
230
|
+
}
|
|
231
|
+
declare class BadgeTileConfig {
|
|
232
|
+
type: BadgeTileType;
|
|
233
|
+
badgeId: string;
|
|
234
|
+
internalName?: string;
|
|
235
|
+
defaultLocale: string;
|
|
236
|
+
priority: number;
|
|
237
|
+
internalDescription?: string | null;
|
|
238
|
+
status?: string;
|
|
239
|
+
id: string;
|
|
240
|
+
createdAt: string;
|
|
241
|
+
updatedAt: string;
|
|
242
|
+
details?: BadgeDetail[];
|
|
243
|
+
count: number;
|
|
244
|
+
name: string;
|
|
245
|
+
locale: string;
|
|
246
|
+
description: string;
|
|
247
|
+
artworkUrl: string;
|
|
248
|
+
emptyBadgeMessage?: string;
|
|
249
|
+
emptyBadgeArtworkUrl?: string;
|
|
250
|
+
awardedDatePrefix?: string;
|
|
251
|
+
badgeNotEarnedMessage?: string;
|
|
252
|
+
}
|
|
253
|
+
type BadgeDetail = {
|
|
254
|
+
name: string;
|
|
255
|
+
locale: string;
|
|
256
|
+
description: string;
|
|
257
|
+
artworkUrl: string;
|
|
258
|
+
id: string;
|
|
259
|
+
createdAt: string;
|
|
260
|
+
updatedAt: string;
|
|
261
|
+
emptyBadgeMessage?: string;
|
|
262
|
+
emptyBadgeArtworkUrl?: string;
|
|
263
|
+
awardedDatePrefix?: string;
|
|
264
|
+
badgeNotEarnedMessage?: string;
|
|
265
|
+
};
|
|
266
|
+
declare class RewardCategoryTileConfig {
|
|
267
|
+
showName: boolean;
|
|
268
|
+
rewardCategoryId: string;
|
|
269
|
+
artworkUrl: string;
|
|
270
|
+
name: string;
|
|
271
|
+
}
|
|
272
|
+
declare class TierTileConfig {
|
|
273
|
+
progressType: ProgressType;
|
|
274
|
+
pointsMultiplier?: number;
|
|
275
|
+
pointsPrefix?: string;
|
|
276
|
+
pointsSuffix?: string;
|
|
277
|
+
tier?: TierType;
|
|
278
|
+
tierId?: string;
|
|
279
|
+
targetTier?: TierType | undefined;
|
|
280
|
+
type?: TierTileType;
|
|
281
|
+
targetTierAttainingPeriod?: Date | null;
|
|
282
|
+
title: string;
|
|
283
|
+
emptyDescription?: string;
|
|
284
|
+
emptyArtworkUrl?: string;
|
|
285
|
+
pointsToTierPrefix?: string;
|
|
286
|
+
pointsToTierSuffix?: string;
|
|
287
|
+
}
|
|
288
|
+
type Tile = {
|
|
289
|
+
id: string | null;
|
|
290
|
+
type?: TileType;
|
|
291
|
+
active: boolean;
|
|
292
|
+
createdAt: string | null;
|
|
293
|
+
updatedAt: string | null;
|
|
294
|
+
tileHeight: TileHeight;
|
|
295
|
+
configuration: TileConfig;
|
|
296
|
+
priority: number;
|
|
297
|
+
};
|
|
298
|
+
declare const getConfigForTileType: (tileType: TileType) => typeof BannerTileConfig | typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
299
|
+
type TileConfig = InstanceType<ReturnType<typeof getConfigForTileType>>;
|
|
300
|
+
|
|
301
|
+
type LoadingIndicatorProps = {
|
|
302
|
+
tile: Tile;
|
|
303
|
+
};
|
|
304
|
+
declare const LoadingIndicator: React.FC<LoadingIndicatorProps>;
|
|
305
|
+
|
|
306
|
+
type ProgressBarProps = {
|
|
307
|
+
percentage: number;
|
|
308
|
+
variant?: Variant;
|
|
309
|
+
height?: Size;
|
|
310
|
+
animationDuration?: number;
|
|
311
|
+
};
|
|
312
|
+
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
313
|
+
|
|
314
|
+
type ProgressiveImageProps = {
|
|
315
|
+
source: ImageSourcePropType;
|
|
316
|
+
style?: StyleProp<ViewStyle>;
|
|
317
|
+
isDesaturated?: boolean;
|
|
318
|
+
[key: string]: any;
|
|
319
|
+
};
|
|
320
|
+
declare const ProgressiveImage: React__default.FC<ProgressiveImageProps>;
|
|
321
|
+
|
|
322
|
+
type RowHeaderProps = {
|
|
323
|
+
children: React.ReactNode;
|
|
324
|
+
className?: string;
|
|
325
|
+
} & React.ComponentProps<typeof View>;
|
|
326
|
+
declare const RowHeader: React.FC<RowHeaderProps>;
|
|
327
|
+
|
|
328
|
+
type TextVariant = 'eyebrow' | 'title' | 'description' | 'body' | 'caption' | 'label' | 'tier-requirement' | 'tier-earned';
|
|
329
|
+
type TextProps = TextProps$1 & {
|
|
330
|
+
variant?: TextVariant;
|
|
331
|
+
style?: TextStyle;
|
|
332
|
+
isSurface?: boolean;
|
|
333
|
+
};
|
|
334
|
+
declare const Text: React.FC<TextProps>;
|
|
335
|
+
|
|
336
|
+
type BaseBannerProps = {
|
|
337
|
+
tile: Tile;
|
|
338
|
+
children: React.ReactNode;
|
|
339
|
+
};
|
|
340
|
+
declare const BaseBanner: React.FC<BaseBannerProps>;
|
|
341
|
+
|
|
342
|
+
type ImagePropsNoSource = Omit<ImageProps, 'source'>;
|
|
343
|
+
|
|
344
|
+
type BaseTileProps = {
|
|
345
|
+
tile: Tile;
|
|
346
|
+
children: ReactNode;
|
|
347
|
+
style?: ViewStyle;
|
|
348
|
+
};
|
|
349
|
+
type BaseTileComponent = FC<BaseTileProps> & {
|
|
350
|
+
Root: FC<{
|
|
351
|
+
children: ReactNode;
|
|
352
|
+
style?: ViewStyle;
|
|
353
|
+
}>;
|
|
354
|
+
Media: FC<ImagePropsNoSource>;
|
|
355
|
+
Content: FC<{
|
|
356
|
+
children: ReactNode;
|
|
357
|
+
}>;
|
|
358
|
+
Header: FC<{
|
|
359
|
+
children?: ReactNode;
|
|
360
|
+
}>;
|
|
361
|
+
Title: FC;
|
|
362
|
+
Body: FC;
|
|
363
|
+
};
|
|
364
|
+
declare const BaseTile: BaseTileComponent;
|
|
365
|
+
|
|
366
|
+
type TileContainerProps = {
|
|
367
|
+
tiles: Tile[];
|
|
368
|
+
};
|
|
369
|
+
declare const TileContainer: React.FC<TileContainerProps>;
|
|
370
|
+
|
|
371
|
+
declare enum SectionType {
|
|
372
|
+
Grid = "GRID",
|
|
373
|
+
Banner = "BANNER"
|
|
374
|
+
}
|
|
375
|
+
type TSection = {
|
|
376
|
+
id: string;
|
|
377
|
+
name: string;
|
|
378
|
+
type: SectionType;
|
|
379
|
+
createdAt: string;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
title?: string;
|
|
382
|
+
description?: string;
|
|
383
|
+
tiles: Tile[];
|
|
384
|
+
pointsMultiplier?: number;
|
|
385
|
+
pointsPrefix?: string | null;
|
|
386
|
+
pointsSuffix?: string | null;
|
|
387
|
+
priority: number;
|
|
388
|
+
active: boolean;
|
|
389
|
+
details?: [];
|
|
390
|
+
defaultLocale: string;
|
|
391
|
+
locale: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
type CarouselProps = {
|
|
395
|
+
section: TSection;
|
|
396
|
+
};
|
|
397
|
+
declare const Carousel: React__default.FC<CarouselProps>;
|
|
398
|
+
|
|
399
|
+
type GridProps = {
|
|
400
|
+
section: TSection;
|
|
401
|
+
};
|
|
402
|
+
declare const Grid: React.FC<GridProps>;
|
|
403
|
+
|
|
404
|
+
type ProgressIndicatorProps = {
|
|
405
|
+
currentPoints: number;
|
|
406
|
+
maxPoints: number;
|
|
407
|
+
variant?: Variant;
|
|
408
|
+
height?: Size;
|
|
409
|
+
attained?: boolean;
|
|
410
|
+
};
|
|
411
|
+
declare const ProgressIndicator: React.FC<ProgressIndicatorProps>;
|
|
412
|
+
|
|
413
|
+
type SectionHeaderProps = {
|
|
414
|
+
title?: string;
|
|
415
|
+
description?: string;
|
|
416
|
+
};
|
|
417
|
+
declare const SectionHeader: React__default.FC<SectionHeaderProps>;
|
|
418
|
+
|
|
419
|
+
type BadgeTileProps$1 = {
|
|
420
|
+
tile: Tile;
|
|
421
|
+
};
|
|
422
|
+
type BadgeTileComponent$1 = FC<BadgeTileProps$1> & {
|
|
423
|
+
Title: FC;
|
|
424
|
+
Body: FC;
|
|
425
|
+
Image: FC<ImagePropsNoSource>;
|
|
426
|
+
Chevron: FC;
|
|
427
|
+
};
|
|
428
|
+
declare const BadgeTile$1: BadgeTileComponent$1;
|
|
429
|
+
|
|
430
|
+
type BadgeTileProps = {
|
|
431
|
+
tile: Tile;
|
|
432
|
+
};
|
|
433
|
+
type BadgeTileMediaProps = ImagePropsNoSource & {
|
|
434
|
+
children?: React__default.ReactNode;
|
|
435
|
+
};
|
|
436
|
+
type BadgeTileComponent = FC<BadgeTileProps> & {
|
|
437
|
+
Media: FC<BadgeTileMediaProps>;
|
|
438
|
+
Content: FC;
|
|
439
|
+
Title: FC;
|
|
440
|
+
Description: FC;
|
|
441
|
+
DateEarned: FC;
|
|
442
|
+
Status: FC;
|
|
443
|
+
};
|
|
444
|
+
declare const BadgeTile: BadgeTileComponent;
|
|
445
|
+
|
|
446
|
+
type BannerTileProps = {
|
|
447
|
+
tile: Tile;
|
|
448
|
+
};
|
|
449
|
+
declare const BannerTile: React.FC<BannerTileProps> & {
|
|
450
|
+
Image: typeof BannerTileImage;
|
|
451
|
+
Title: typeof BannerTileTitle;
|
|
452
|
+
Description: typeof BannerTileDescription;
|
|
453
|
+
CTA: typeof BannerTileCTA;
|
|
454
|
+
};
|
|
455
|
+
declare const BannerTileImage: React.FC;
|
|
456
|
+
declare const BannerTileTitle: React.FC;
|
|
457
|
+
declare const BannerTileDescription: React.FC;
|
|
458
|
+
declare const BannerTileCTA: React.FC;
|
|
459
|
+
|
|
460
|
+
type ContentTileProps = {
|
|
461
|
+
tile: Tile;
|
|
462
|
+
};
|
|
463
|
+
type ContentTileComponent = React.FC<ContentTileProps> & {
|
|
464
|
+
Root: typeof ContentTileRoot;
|
|
465
|
+
Media: typeof ContentTileMedia;
|
|
466
|
+
Content: typeof ContentTileContent;
|
|
467
|
+
Header: typeof ContentTileHeader;
|
|
468
|
+
Body: typeof ContentTileBody;
|
|
469
|
+
};
|
|
470
|
+
declare const ContentTileRoot: React.FC<{
|
|
471
|
+
children: React.ReactNode;
|
|
472
|
+
}>;
|
|
473
|
+
declare const ContentTileMedia: React.FC;
|
|
474
|
+
declare const ContentTileContent: React.FC<{
|
|
475
|
+
children: React.ReactNode;
|
|
476
|
+
}>;
|
|
477
|
+
declare const ContentTileHeader: React.FC;
|
|
478
|
+
declare const ContentTileBody: React.FC;
|
|
479
|
+
declare const ContentTile: ContentTileComponent;
|
|
480
|
+
|
|
481
|
+
type GroupProps = {
|
|
482
|
+
id: string;
|
|
483
|
+
};
|
|
484
|
+
declare const Group: React__default.FC<GroupProps>;
|
|
485
|
+
|
|
486
|
+
type PointsTileProps = {
|
|
487
|
+
tile: Tile;
|
|
488
|
+
};
|
|
489
|
+
declare const PointsTile: React.FC<PointsTileProps> & {
|
|
490
|
+
Title: typeof PointsTileTitle;
|
|
491
|
+
Points: typeof PointsTilePoints;
|
|
492
|
+
Image: typeof PointsTileImage;
|
|
493
|
+
};
|
|
494
|
+
declare const PointsTileTitle: React.FC;
|
|
495
|
+
declare const PointsTilePoints: React.FC;
|
|
496
|
+
type PointTileImageProps = {
|
|
497
|
+
isFullSize: boolean;
|
|
498
|
+
};
|
|
499
|
+
declare const PointsTileImage: React.FC<PointTileImageProps>;
|
|
500
|
+
|
|
501
|
+
type RewardCategoryTileProps = {
|
|
502
|
+
tile: Tile;
|
|
503
|
+
};
|
|
504
|
+
declare const RewardCategoryTile: React.FC<RewardCategoryTileProps> & {
|
|
505
|
+
Header: typeof RewardCategoryHeader;
|
|
506
|
+
Background: typeof RewardCategoryBackground;
|
|
507
|
+
};
|
|
508
|
+
declare const RewardCategoryHeader: React.FC;
|
|
509
|
+
declare const RewardCategoryBackground: React.FC;
|
|
510
|
+
|
|
511
|
+
type RewardTileProps = {
|
|
512
|
+
tile: Tile;
|
|
513
|
+
};
|
|
514
|
+
declare const RewardTile: React.FC<RewardTileProps> & {
|
|
515
|
+
Media: typeof RewardTileMedia;
|
|
516
|
+
Title: typeof RewardTileTitle;
|
|
517
|
+
Description: typeof RewardTileDescription;
|
|
518
|
+
Points: typeof RewardTilePoints;
|
|
519
|
+
Chevron: typeof RewardTileChevron;
|
|
520
|
+
Content: typeof RewardTileContent;
|
|
521
|
+
};
|
|
522
|
+
declare const RewardTileMedia: React.FC;
|
|
523
|
+
declare const RewardTileTitle: React.FC;
|
|
524
|
+
declare const RewardTileDescription: React.FC;
|
|
525
|
+
declare const RewardTilePoints: React.FC;
|
|
526
|
+
declare const RewardTileContent: React.FC<{
|
|
527
|
+
children: React.ReactNode;
|
|
528
|
+
}>;
|
|
529
|
+
declare const RewardTileChevron: React.FC;
|
|
530
|
+
|
|
531
|
+
type SectionProps = {
|
|
532
|
+
section: TSection;
|
|
533
|
+
};
|
|
534
|
+
declare const Section: React__default.FC<SectionProps>;
|
|
535
|
+
|
|
536
|
+
type TierTileProps$1 = {
|
|
537
|
+
tile: Tile;
|
|
538
|
+
};
|
|
539
|
+
declare const TierTile$1: React.FC<TierTileProps$1> & {
|
|
540
|
+
Name: typeof Name;
|
|
541
|
+
Count: typeof Count;
|
|
542
|
+
Image: typeof TierTileImage;
|
|
543
|
+
Progress: typeof Progress;
|
|
544
|
+
Description: typeof Description;
|
|
545
|
+
NextName: typeof NextName;
|
|
546
|
+
NextCount: typeof NextCount;
|
|
547
|
+
};
|
|
548
|
+
type TierTileImageProps = {
|
|
549
|
+
isFullSize: boolean;
|
|
550
|
+
};
|
|
551
|
+
declare const TierTileImage: React.FC<TierTileImageProps>;
|
|
552
|
+
declare const Name: React.FC;
|
|
553
|
+
declare const NextName: React.FC;
|
|
554
|
+
declare const Count: React.FC;
|
|
555
|
+
declare const NextCount: React.FC;
|
|
556
|
+
declare const Progress: React.FC;
|
|
557
|
+
declare const Description: React.FC;
|
|
558
|
+
|
|
559
|
+
type TierTileProps = {
|
|
560
|
+
tile: Tile;
|
|
561
|
+
};
|
|
562
|
+
type TierTileComponent = React.FC<TierTileProps> & {
|
|
563
|
+
Full: typeof TierTileFull;
|
|
564
|
+
Half: typeof TierTileHalf;
|
|
565
|
+
Empty: typeof TierTileEmpty;
|
|
566
|
+
};
|
|
567
|
+
declare const TierTileFull: React.FC<TierTileProps>;
|
|
568
|
+
declare const TierTileHalf: React.FC<TierTileProps>;
|
|
569
|
+
declare const TierTileEmpty: React.FC<TierTileProps>;
|
|
570
|
+
declare const TierTile: TierTileComponent;
|
|
571
|
+
|
|
572
|
+
type TGroup = {
|
|
573
|
+
name: string;
|
|
574
|
+
active: boolean;
|
|
575
|
+
id: string;
|
|
576
|
+
createdAt: string;
|
|
577
|
+
updatedAt: string;
|
|
578
|
+
sections: TSection[];
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
type Fetcher = <T>(endpoint: string, options?: RequestInit) => Promise<APIResponse<T>>;
|
|
582
|
+
type SDKConfig = {
|
|
583
|
+
apiKey: string;
|
|
584
|
+
userToken?: string;
|
|
585
|
+
fetcher?: Fetcher;
|
|
586
|
+
locale?: string;
|
|
587
|
+
};
|
|
588
|
+
type APIResponse<T> = {
|
|
589
|
+
status: 'success' | 'error';
|
|
590
|
+
data: T | null;
|
|
591
|
+
error?: string;
|
|
592
|
+
};
|
|
593
|
+
type WllSdkContextType = ThemeContextType & {
|
|
594
|
+
getGroupByID: (id: string) => Promise<APIResponse<TGroup>>;
|
|
595
|
+
getSectionByID: (id: string) => Promise<APIResponse<TSection>>;
|
|
596
|
+
getTileByID: (id: string) => Promise<APIResponse<Tile>>;
|
|
597
|
+
};
|
|
598
|
+
type WllSdkProviderProps = {
|
|
599
|
+
children: React__default.ReactNode;
|
|
600
|
+
theme?: Partial<BaseThemeObject>;
|
|
601
|
+
config: SDKConfig;
|
|
602
|
+
};
|
|
603
|
+
declare const WllSdkProvider: React__default.FC<WllSdkProviderProps>;
|
|
604
|
+
declare const useWllSdk: () => WllSdkContextType;
|
|
605
|
+
|
|
606
|
+
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, 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, UrlTarget, type Variant, WllSdkProvider, useWllSdk };
|