@leatcom/portal-sessions 0.2.0 → 0.3.0-beta.10

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 (219) hide show
  1. package/README.md +66 -57
  2. package/dist/calendar-Can0qQlp.js +35 -0
  3. package/dist/camera-switch-GycOMC0h.js +32 -0
  4. package/dist/caret-left-Bu6hBQ5l.js +35 -0
  5. package/dist/close-DEGYFjZn.js +31 -0
  6. package/dist/crossBlack-nmm64QX1.js +40 -0
  7. package/dist/dollar-BbDPUsF1.js +56 -0
  8. package/dist/edit-xcD5f5zi.js +31 -0
  9. package/dist/home-Cdal78fu.js +40 -0
  10. package/dist/information-Cq6k4byC.js +50 -0
  11. package/dist/leat_logo-BpQeHCzL.js +33 -0
  12. package/dist/lib/api/errorHandler.d.ts +3 -0
  13. package/dist/lib/api/types.d.ts +9 -0
  14. package/dist/lib/api/useFetcher.d.ts +16 -0
  15. package/dist/lib/api/useHttp.d.ts +7 -0
  16. package/dist/lib/api/useV2Fetcher.d.ts +16 -0
  17. package/dist/lib/api/useV2Http.d.ts +7 -0
  18. package/dist/lib/components/AnimatedCounter/AnimatedCounter.d.ts +9 -0
  19. package/dist/lib/components/AnimatedCounter/index.d.ts +1 -0
  20. package/dist/lib/components/Badge/Badge.d.ts +10 -0
  21. package/dist/lib/components/Badge/variants.d.ts +5 -0
  22. package/dist/lib/components/Banner/Banner.d.ts +5 -0
  23. package/dist/lib/components/Buttons/Button-cva.d.ts +28 -0
  24. package/dist/lib/components/Buttons/Button.d.ts +12 -0
  25. package/dist/lib/components/Buttons/NavLinkButton.d.ts +21 -0
  26. package/dist/lib/components/Buttons/index.d.ts +2 -0
  27. package/dist/lib/components/Buttons/variants.d.ts +8 -0
  28. package/dist/lib/components/Card/Card.d.ts +8 -0
  29. package/dist/lib/components/Card/CardContent.d.ts +7 -0
  30. package/dist/lib/components/Card/CardFooter.d.ts +6 -0
  31. package/dist/lib/components/Card/CardHeader.d.ts +6 -0
  32. package/dist/lib/components/Card/CardSubTitle.d.ts +6 -0
  33. package/dist/lib/components/Card/CardTitle.d.ts +6 -0
  34. package/dist/lib/components/Card/NavigationHeader.d.ts +1 -0
  35. package/dist/lib/components/Card/index.d.ts +6 -0
  36. package/dist/lib/components/Checkbox/Checkbox.d.ts +15 -0
  37. package/dist/lib/components/Checkbox/CheckboxBase.d.ts +8 -0
  38. package/dist/lib/components/Checkbox/CheckboxGroup.d.ts +15 -0
  39. package/dist/lib/components/Checkbox/index.d.ts +3 -0
  40. package/dist/lib/components/Form/Form.d.ts +4 -0
  41. package/dist/lib/components/Form/FormInputField.d.ts +13 -0
  42. package/dist/lib/components/Hooks/useCloseDropdownHandler.d.ts +2 -0
  43. package/dist/lib/components/Hooks/useCustomEvents.d.ts +8 -0
  44. package/dist/lib/components/Hooks/useCustomEvents.test.d.ts +1 -0
  45. package/dist/lib/components/Hooks/useViewPortSize.d.ts +6 -0
  46. package/dist/lib/components/Icon/Icon.d.ts +10 -0
  47. package/dist/lib/components/Icon/IconBase.d.ts +5 -0
  48. package/dist/lib/components/Icon/index.d.ts +1 -0
  49. package/dist/lib/components/Icon/variants.d.ts +6 -0
  50. package/dist/lib/components/Input/Input.d.ts +23 -0
  51. package/dist/lib/components/Input/InputDate.d.ts +18 -0
  52. package/dist/lib/components/Input/InputEmail.d.ts +18 -0
  53. package/dist/lib/components/Input/InputNumeric.d.ts +9 -0
  54. package/dist/lib/components/Input/index.d.ts +3 -0
  55. package/dist/lib/components/Keyboard/Keyboard.d.ts +6 -0
  56. package/dist/lib/components/Keyboard/KeyboardWrapper.d.ts +10 -0
  57. package/dist/lib/components/Keyboard/NumericKeyboard.d.ts +7 -0
  58. package/dist/lib/components/Keyboard/index.d.ts +4 -0
  59. package/dist/lib/components/Keyboard/useKeyboard.d.ts +8 -0
  60. package/dist/lib/components/Label/Label.d.ts +18 -0
  61. package/dist/lib/components/Label/index.d.ts +1 -0
  62. package/dist/lib/components/Layout/Container.d.ts +6 -0
  63. package/dist/lib/components/Layout/index.d.ts +1 -0
  64. package/dist/lib/components/Loader/Loader.d.ts +3 -0
  65. package/dist/lib/components/Message/Message.d.ts +11 -0
  66. package/dist/lib/components/Modal/Modal.d.ts +17 -0
  67. package/dist/lib/components/Modal/index.d.ts +1 -0
  68. package/dist/lib/components/MultiSelect/MultiSelect.d.ts +13 -0
  69. package/dist/lib/components/MultiSelect/MultiSelectOption.d.ts +8 -0
  70. package/dist/lib/components/MultiSelect/index.d.ts +1 -0
  71. package/dist/lib/components/ProgressBar/ProgressBar.d.ts +7 -0
  72. package/dist/lib/components/ProgressBar/index.d.ts +1 -0
  73. package/dist/lib/components/Select/Select.d.ts +12 -0
  74. package/dist/lib/components/Select/SelectGroup.d.ts +7 -0
  75. package/dist/lib/components/Select/SelectOption.d.ts +5 -0
  76. package/dist/lib/components/Select/SelectTrigger.d.ts +10 -0
  77. package/dist/lib/components/Select/index.d.ts +3 -0
  78. package/dist/lib/components/Skeletons/RowsSkeletonLoader.d.ts +5 -0
  79. package/dist/lib/components/Skeletons/Skeleton.d.ts +1 -0
  80. package/dist/lib/components/Skeletons/TableSkeleton.d.ts +8 -0
  81. package/dist/lib/components/Spinner/Spinner.d.ts +2 -0
  82. package/dist/lib/components/Spinner/index.d.ts +1 -0
  83. package/dist/lib/components/Stack/Stack.d.ts +9 -0
  84. package/dist/lib/components/Stack/index.d.ts +1 -0
  85. package/dist/lib/components/Switch/Switch.d.ts +20 -0
  86. package/dist/lib/components/Switch/SwitchBase.d.ts +12 -0
  87. package/dist/lib/components/Switch/SwitchGroup.d.ts +23 -0
  88. package/dist/lib/components/Switch/index.d.ts +3 -0
  89. package/dist/lib/components/Switch/variants.d.ts +6 -0
  90. package/dist/lib/components/Table/Header.d.ts +6 -0
  91. package/dist/lib/components/Table/Row.d.ts +7 -0
  92. package/dist/lib/components/Table/Table.d.ts +9 -0
  93. package/dist/lib/components/Table/index.d.ts +2 -0
  94. package/dist/lib/components/Table/types.d.ts +24 -0
  95. package/dist/lib/components/Typography/Text.d.ts +16 -0
  96. package/dist/lib/components/Typography/index.d.ts +2 -0
  97. package/dist/lib/components/Typography/types.d.ts +3 -0
  98. package/dist/lib/components/debug/DebugOverlay.d.ts +1 -0
  99. package/dist/lib/components/special/CustomErrorBoundary.d.ts +16 -0
  100. package/dist/lib/components/special/ErrorHasOccurred.d.ts +1 -0
  101. package/dist/lib/components/special/LoadingScreen.d.ts +5 -0
  102. package/dist/lib/components/special/SessionUnavailable.d.ts +3 -0
  103. package/dist/lib/components/special/SpecialScreen.d.ts +7 -0
  104. package/dist/lib/components/types.d.ts +17 -0
  105. package/dist/lib/context/Api/ApiContext.d.ts +5 -0
  106. package/dist/lib/context/Api/useApiContext.d.ts +1 -0
  107. package/dist/lib/context/Configuration/ConfigurationContext.d.ts +19 -0
  108. package/dist/lib/context/Configuration/WithConfiguration.d.ts +7 -0
  109. package/dist/lib/context/Configuration/useConfigurationContext.d.ts +1 -0
  110. package/dist/lib/context/PortalSession/PortalSessionContext.d.ts +10 -0
  111. package/dist/lib/context/PortalSession/PortalSessionProvider.d.ts +7 -0
  112. package/dist/lib/context/PortalSession/usePortalSessionContext.d.ts +1 -0
  113. package/dist/lib/design/colorPaletteGenerator.d.ts +6 -0
  114. package/dist/lib/design/setupBranding.d.ts +2 -0
  115. package/dist/lib/helpers/displayNameForContact.d.ts +2 -0
  116. package/dist/lib/helpers/enum.d.ts +23 -0
  117. package/dist/lib/helpers/helpers.d.ts +9 -0
  118. package/dist/lib/helpers/index.d.ts +2 -0
  119. package/dist/lib/hooks/fetchers/useContactIdentifiers.d.ts +10 -0
  120. package/dist/lib/hooks/fetchers/useContactSubscriptions.d.ts +6 -0
  121. package/dist/lib/hooks/fetchers/useGiftcard.d.ts +6 -0
  122. package/dist/lib/hooks/fetchers/useLoyaltyTransactions.d.ts +20 -0
  123. package/dist/lib/hooks/fetchers/usePrepaidBalance.d.ts +6 -0
  124. package/dist/lib/hooks/fetchers/useRewards.d.ts +6 -0
  125. package/dist/lib/hooks/fetchers/useSubscriptions.d.ts +6 -0
  126. package/dist/lib/hooks/fetchers/useVoucher.d.ts +6 -0
  127. package/dist/lib/hooks/fetchers/useVouchers.d.ts +6 -0
  128. package/dist/lib/hooks/toasts/useToast.d.ts +7 -0
  129. package/dist/lib/hooks/useCreatePortalSession.d.ts +5 -0
  130. package/dist/lib/hooks/useCurrency.d.ts +5 -0
  131. package/dist/lib/hooks/useEvents.d.ts +4 -0
  132. package/dist/lib/localization/i18n.d.ts +2 -0
  133. package/dist/lib/main.d.ts +8 -0
  134. package/dist/lib/modules/CreateNewPortalSession.d.ts +31 -0
  135. package/dist/lib/modules/Root.d.ts +14 -0
  136. package/dist/lib/modules/StartSession.d.ts +2 -0
  137. package/dist/lib/modules/UuidSession.d.ts +6 -0
  138. package/dist/lib/modules/components/HandleContactIdentifier.d.ts +7 -0
  139. package/dist/lib/modules/components/Scanner/QrReader.d.ts +5 -0
  140. package/dist/lib/modules/components/Scanner/QrReader2.d.ts +5 -0
  141. package/dist/lib/modules/components/Scanner/QrReader3.d.ts +5 -0
  142. package/dist/lib/modules/components/Scanner/QrReader4.d.ts +5 -0
  143. package/dist/lib/modules/components/Scanner/Scanner.d.ts +9 -0
  144. package/dist/lib/modules/components/auth/AuthenticateContact.d.ts +1 -0
  145. package/dist/lib/modules/components/auth/AuthenticateViaContactIdentifier.d.ts +4 -0
  146. package/dist/lib/modules/components/auth/AuthenticateViaEmail.d.ts +13 -0
  147. package/dist/lib/modules/components/useFindOrCreateContact.d.ts +9 -0
  148. package/dist/lib/modules/components/useLinkContactToSession.d.ts +4 -0
  149. package/dist/lib/modules/components/useLinkIdentifierToContact.d.ts +5 -0
  150. package/dist/lib/modules/generic/Generic.d.ts +6 -0
  151. package/dist/lib/modules/giftcard/HandleGiftcard.d.ts +7 -0
  152. package/dist/lib/modules/giftcard/IdentifyGiftcard.d.ts +1 -0
  153. package/dist/lib/modules/pointsTransaction/PointsTransaction.d.ts +1 -0
  154. package/dist/lib/modules/portal/profile/Data.d.ts +1 -0
  155. package/dist/lib/modules/portal/profile/details/activities/Activities.d.ts +1 -0
  156. package/dist/lib/modules/portal/profile/details/contactAttributes/ContactAttributes.d.ts +1 -0
  157. package/dist/lib/modules/portal/profile/details/contactIdentifiers/ContactIdentifiers.d.ts +1 -0
  158. package/dist/lib/modules/portal/profile/details/contactIdentifiers/CreateContactIdentifier.d.ts +1 -0
  159. package/dist/lib/modules/portal/profile/details/subscriptions/Subscriptions.d.ts +1 -0
  160. package/dist/lib/modules/portal/profile/sections/Balance.d.ts +1 -0
  161. package/dist/lib/modules/portal/profile/sections/LoyaltyTransactions.d.ts +1 -0
  162. package/dist/lib/modules/portal/profile/sections/Section.d.ts +5 -0
  163. package/dist/lib/modules/portal/profile/sections/Stats.d.ts +1 -0
  164. package/dist/lib/modules/portal/profile/sections/Subscriptions.d.ts +1 -0
  165. package/dist/lib/modules/portal/rewards/Reward.d.ts +11 -0
  166. package/dist/lib/modules/portal/rewards/Rewards.d.ts +1 -0
  167. package/dist/lib/modules/portal/rewards/RewardsContent.d.ts +8 -0
  168. package/dist/lib/modules/portal/vouchers/Voucher.d.ts +9 -0
  169. package/dist/lib/modules/portal/vouchers/Vouchers.d.ts +1 -0
  170. package/dist/lib/modules/prepaid/HandlePrepaid.d.ts +1 -0
  171. package/dist/lib/modules/voucher/HandleVoucher.d.ts +14 -0
  172. package/dist/lib/modules/voucher/IdentifyVoucher.d.ts +1 -0
  173. package/dist/lib/routing/AuthenticatedRoute.d.ts +6 -0
  174. package/dist/lib/routing/ContactRoutes.d.ts +1 -0
  175. package/dist/lib/routing/PortalRoutes.d.ts +1 -0
  176. package/dist/lib/routing/Router.d.ts +1 -0
  177. package/dist/lib/routing/RouterStateReporter.d.ts +16 -0
  178. package/dist/lib/routing/routes.d.ts +3 -0
  179. package/dist/lib/types/Contact.d.ts +35 -0
  180. package/dist/lib/types/Giftcard.d.ts +47 -0
  181. package/dist/lib/types/PortalSession.d.ts +61 -0
  182. package/dist/lib/types/Prepaid.d.ts +27 -0
  183. package/dist/lib/types/Reward.d.ts +18 -0
  184. package/dist/lib/types/Subscription.d.ts +32 -0
  185. package/dist/lib/types/Voucher.d.ts +39 -0
  186. package/dist/mail-CILHEgMY.js +32 -0
  187. package/dist/notificationErrorV2-CtLIl0uv.js +50 -0
  188. package/dist/notificationSuccessV2-CiOOunIj.js +50 -0
  189. package/dist/notificationWarningV2-DeiXPjap.js +50 -0
  190. package/dist/portal-sessions.es.js +45806 -21
  191. package/dist/portal-sessions.umd.js +76 -879
  192. package/dist/qr-scanner-worker.min-uyv8r9jq.js +20 -0
  193. package/dist/settings-hMBGAHeo.js +40 -0
  194. package/dist/shopping-bag-D83pzW-N.js +48 -0
  195. package/dist/star-DQL2OQsB.js +34 -0
  196. package/dist/style.css +24 -1
  197. package/dist/user-DATIDkwc.js +28 -0
  198. package/package.json +49 -51
  199. package/dist/browser-ponyfill-C2l-BoS5.js +0 -380
  200. package/dist/calendar-DatiUSvc.js +0 -19
  201. package/dist/camera-switch-BG4ghgtr.js +0 -19
  202. package/dist/caret-left-BzIJ4OR3.js +0 -19
  203. package/dist/close-BOnvojez.js +0 -19
  204. package/dist/crossBlack-D3AScCz7.js +0 -19
  205. package/dist/dollar-BiByq0t0.js +0 -19
  206. package/dist/edit-GxItFJF8.js +0 -19
  207. package/dist/home-BRXF8Ydg.js +0 -19
  208. package/dist/information-kCveus0e.js +0 -19
  209. package/dist/mail-Dn-PppcI.js +0 -19
  210. package/dist/main-Cq8Au5WV.js +0 -38031
  211. package/dist/notificationErrorV2-BT7C7lnC.js +0 -19
  212. package/dist/notificationSuccessV2-CD4Nzkx1.js +0 -19
  213. package/dist/notificationWarningV2-Ce-MU9nv.js +0 -19
  214. package/dist/portal-sessions.es.d.ts +0 -173
  215. package/dist/qr-scanner-worker.min-BT9FO00c.js +0 -115
  216. package/dist/settings-iI_Z4aYk.js +0 -19
  217. package/dist/shopping-bag-gCcU6Sk5.js +0 -19
  218. package/dist/star-B5vZfVjf.js +0 -19
  219. package/dist/user-CefiGOdl.js +0 -19
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { switchBaseCva, switchHandleCva } from './variants';
4
+ export type SwitchProps = VariantProps<typeof switchBaseCva> & VariantProps<typeof switchHandleCva> & {
5
+ id?: string;
6
+ children?: React.ReactNode;
7
+ defaultChecked?: boolean;
8
+ isToggled?: boolean;
9
+ toggleLeft?: boolean;
10
+ description?: React.ReactNode;
11
+ disabled?: boolean;
12
+ helperText?: React.ReactNode;
13
+ label?: React.ReactNode;
14
+ required?: boolean;
15
+ tooltip?: React.ReactNode;
16
+ size?: "md" | "lg";
17
+ onChange?: () => void;
18
+ };
19
+ declare const Switch: React.FC<SwitchProps>;
20
+ export default Switch;
@@ -0,0 +1,12 @@
1
+ import { switchBaseCva, switchHandleCva } from './variants';
2
+ import { default as React } from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ type SwitchProps = VariantProps<typeof switchBaseCva> & VariantProps<typeof switchHandleCva> & {
5
+ id?: string;
6
+ defaultChecked?: boolean;
7
+ isSwitched?: boolean;
8
+ disabled?: boolean;
9
+ onChange?: () => void;
10
+ };
11
+ declare const SwitchBase: React.FC<SwitchProps>;
12
+ export default SwitchBase;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { LabelProps } from '../Label/Label';
3
+ import { LabelHelperProps } from '../types';
4
+ import { SwitchProps } from '../Switch';
5
+ export type SwitchGroupElement = HTMLDivElement;
6
+ export type SwitchGroupProps = React.HTMLAttributes<HTMLDivElement> & LabelProps & LabelHelperProps & {
7
+ toggleLeft?: boolean;
8
+ size?: "md" | "lg";
9
+ };
10
+ type SwitchGroupContextProps = {
11
+ disabled?: SwitchGroupProps["disabled"];
12
+ size?: SwitchGroupProps["size"];
13
+ toggleLeft?: boolean;
14
+ };
15
+ export declare function useSwitchGroupContext(skipCheck?: boolean): SwitchGroupContextProps;
16
+ type SwitchGroupItemProps = SwitchProps;
17
+ declare const SwitchGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & LabelProps & LabelHelperProps & {
18
+ toggleLeft?: boolean;
19
+ size?: "md" | "lg";
20
+ } & React.RefAttributes<HTMLDivElement>> & {
21
+ Item: ({ disabled, label, defaultChecked }: SwitchGroupItemProps) => import("react/jsx-runtime").JSX.Element;
22
+ };
23
+ export default SwitchGroup;
@@ -0,0 +1,3 @@
1
+ export { default as Switch } from './Switch';
2
+ export { default as SwitchGroup } from './SwitchGroup';
3
+ export type { SwitchProps } from './Switch';
@@ -0,0 +1,6 @@
1
+ export declare const switchHandleCva: (props?: {
2
+ size?: "md" | "lg";
3
+ } & import('class-variance-authority/types').ClassProp) => string;
4
+ export declare const switchBaseCva: (props?: {
5
+ size?: "md" | "lg";
6
+ } & import('class-variance-authority/types').ClassProp) => string;
@@ -0,0 +1,6 @@
1
+ import { HeaderItem } from './types';
2
+ type HeaderProps = {
3
+ item: HeaderItem;
4
+ };
5
+ export default function Header({ item }: HeaderProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { RowType } from './types';
2
+ type RowProps = {
3
+ row: RowType;
4
+ onClick?: (id: number) => void;
5
+ };
6
+ export default function Row({ row, onClick }: RowProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { HeaderItem, RowType } from './types';
2
+ type TableProps = {
3
+ header: HeaderItem[];
4
+ rows: RowType[];
5
+ pending?: boolean;
6
+ onClick?: (id: number) => void;
7
+ };
8
+ export default function Table({ header, rows, pending, onClick }: TableProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as Table } from './Table';
2
+ export * from './types';
@@ -0,0 +1,24 @@
1
+ export type HeaderItem = {
2
+ value?: string;
3
+ align?: "left" | "center" | "right";
4
+ };
5
+ export type Header = {
6
+ items: HeaderItem[];
7
+ };
8
+ export type ColumnValue = {
9
+ id: number;
10
+ type: string;
11
+ title?: string;
12
+ subtitle?: string;
13
+ label?: string;
14
+ hidden?: boolean;
15
+ disabled?: boolean;
16
+ };
17
+ export type Column = {
18
+ align?: "left" | "center" | "right";
19
+ value: ColumnValue;
20
+ };
21
+ export type RowType = {
22
+ columns: Column[];
23
+ id: number;
24
+ };
@@ -0,0 +1,16 @@
1
+ import { SizeTypes, TextRenderTypes, WeightTypes } from './types';
2
+ export interface TextProps {
3
+ children?: any;
4
+ className?: string;
5
+ hidden?: boolean;
6
+ tooltip?: string;
7
+ size?: SizeTypes;
8
+ weight?: WeightTypes;
9
+ render_as?: TextRenderTypes;
10
+ dangerously_set_inner_html?: boolean;
11
+ onClick?: () => void;
12
+ align?: string;
13
+ text?: string;
14
+ color?: string;
15
+ }
16
+ export default function Text({ className, hidden, children, onClick, align, size, weight, render_as, dangerously_set_inner_html, }: TextProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as Text } from './Text';
2
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export type SizeTypes = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
2
+ export type WeightTypes = "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "extrabold" | "black";
3
+ export type TextRenderTypes = "p" | "span" | "label";
@@ -0,0 +1 @@
1
+ export default function DebugOverlay(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { Scope } from '@sentry/react';
2
+ import { default as React, Component, ErrorInfo } from 'react';
3
+ type Props = {
4
+ children: React.ReactNode;
5
+ };
6
+ type State = {
7
+ hasError: boolean;
8
+ scope: Scope;
9
+ };
10
+ export default class CustomErrorBoundary extends Component<Props, State> {
11
+ constructor(props: Props);
12
+ componentDidMount(): void;
13
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
14
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | import("react/jsx-runtime").JSX.Element;
15
+ }
16
+ export {};
@@ -0,0 +1 @@
1
+ export default function ErrorHasOccurred(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ type LoadingScreenProps = {
2
+ message?: string;
3
+ };
4
+ export default function LoadingScreen({ message }: LoadingScreenProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ export default function SessionUnavailable({ message }: {
2
+ message?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type SpecialScreenProps = {
3
+ children: ReactNode;
4
+ accent?: "primary" | "red";
5
+ };
6
+ export default function SpecialScreen({ children, accent, }: SpecialScreenProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ export type LabelHelperProps = {
2
+ /**
3
+ * Main label displayed above radio buttons. It can be a string, element, or any other
4
+ * renderable node.
5
+ */
6
+ label?: React.ReactNode;
7
+ /**
8
+ * Additional text or information to guide the user. This can be an instruction,
9
+ * a hint, or any other supplementary information. It's rendered below label.
10
+ */
11
+ helperText?: React.ReactNode;
12
+ /**
13
+ * Tooltip displayed next to the label. It can be a string, element, or any other
14
+ * renderable node.
15
+ */
16
+ tooltip?: React.ReactNode;
17
+ };
@@ -0,0 +1,5 @@
1
+ export type ApiContextType = {
2
+ host?: string;
3
+ apiKey?: string;
4
+ };
5
+ export declare const ApiContext: import('react').Context<Partial<ApiContextType>>;
@@ -0,0 +1 @@
1
+ export declare function useApiContext(): Partial<import('./ApiContext').ApiContextType>;
@@ -0,0 +1,19 @@
1
+ import { GiftcardTransactionResource } from '../../types/Giftcard';
2
+ import { PrepaidTransaction } from '../../types/Prepaid';
3
+ import { PrimaryIdentificationMethod } from '../../types/PortalSession';
4
+ import { RewardResource } from '../../types/Reward';
5
+ import { VoucherResource } from '../../types/Voucher';
6
+ import { FacingMode } from '../../helpers';
7
+ import { Contact } from '../../types/Contact';
8
+ export type ConfigurationContextType = {
9
+ debug?: boolean;
10
+ primaryIdentificationMethod?: PrimaryIdentificationMethod;
11
+ cameraService?: 1 | 2 | 3 | 4;
12
+ cameraFacingMode?: FacingMode | "user" | "environment";
13
+ onContactLink?: (contact: Contact) => void;
14
+ onClaimReward?: (reward: RewardResource, transactionUuid?: string) => void;
15
+ onRedeemVoucher?: (voucher: VoucherResource) => void;
16
+ onUseGiftcard?: (giftcardTransaction: GiftcardTransactionResource) => void;
17
+ onCreatePrepaidTransaction?: (prepaidTransaction: PrepaidTransaction) => void;
18
+ };
19
+ export declare const ConfigurationContext: import('react').Context<Partial<ConfigurationContextType>>;
@@ -0,0 +1,7 @@
1
+ import { ConfigurationContextType } from './ConfigurationContext';
2
+ import { ReactNode } from 'react';
3
+ type ConfigurationProps = ConfigurationContextType & {
4
+ children: ReactNode;
5
+ };
6
+ export default function WithConfiguration(props: ConfigurationProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useConfigurationContext(): Partial<import('./ConfigurationContext').ConfigurationContextType>;
@@ -0,0 +1,10 @@
1
+ import { KeyedMutator } from 'swr/_internal';
2
+ import { PortalSession } from '../../types/PortalSession';
3
+ export type PortalSessionContextType = {
4
+ uuid: string;
5
+ portalSession: PortalSession | null;
6
+ setPortalSession: (portalSession: PortalSession | null) => void;
7
+ mutate: KeyedMutator<any>;
8
+ error?: Error;
9
+ };
10
+ export declare const PortalSessionContext: import('react').Context<Partial<PortalSessionContextType>>;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ uuid: string;
4
+ children: ReactNode;
5
+ };
6
+ export declare function PortalSessionProvider(props: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export default function usePortalSessionContext(): Partial<import('./PortalSessionContext').PortalSessionContextType>;
@@ -0,0 +1,6 @@
1
+ export declare function generateColorPalette(hex: string): {
2
+ primaryPalette: Record<string, string>;
3
+ redPalette: Record<string, string>;
4
+ greenPalette: Record<string, string>;
5
+ grayPalette: Record<string, string>;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { Brandkit } from '../modules/Root';
2
+ export declare const setupBranding: (brandKit: Brandkit) => void;
@@ -0,0 +1,2 @@
1
+ import { Contact } from '../types/Contact';
2
+ export default function getDisplayName(contact: Contact): string;
@@ -0,0 +1,23 @@
1
+ export declare enum PortalType {
2
+ GENERIC = "GENERIC",
3
+ GIFTCARD = "GIFTCARD",
4
+ REDEEM_GIFTCARD = "REDEEM_GIFTCARD",
5
+ TOP_UP_GIFTCARD = "TOP_UP_GIFTCARD",
6
+ PORTAL = "PORTAL",
7
+ PREPAID = "PREPAID",
8
+ PAY_PREPAID = "PAY_PREPAID",
9
+ TOP_UP_PREPAID = "TOP_UP_PREPAID",
10
+ POINTS_TRANSACTION = "POINTS_TRANSACTION",
11
+ VOUCHER = "VOUCHER"
12
+ }
13
+ export declare enum EventType {
14
+ CREDIT_RECEPTION = "credit_reception",
15
+ GIFTCARD_TRANSACTION = "giftcard_transaction",
16
+ VOUCHER_REDEEMED = "voucher_redeemed",
17
+ REWARD_RECEPTION = "reward_reception",
18
+ PREPAID_TRANSACTION = "prepaid_transaction"
19
+ }
20
+ export declare enum FacingMode {
21
+ USER = "user",
22
+ ENVIRONMENT = "environment"
23
+ }
@@ -0,0 +1,9 @@
1
+ import { Event } from '../types/PortalSession';
2
+ export declare const formatCentsAsCurrency: (amountInCents: number, currency?: string) => string;
3
+ export declare const getCurrencySymbol: (currency: string) => string;
4
+ export declare const getInitials: (name: string) => string;
5
+ export declare const postEventsToParentWindow: (events: Array<Event>) => void;
6
+ export declare const getDaysBetween: (date1: Date, date2: Date) => number;
7
+ export declare const getWeeksBetween: (date1: Date, date2: Date) => number;
8
+ export declare const getYearsBetween: (date1: Date, date2: Date) => number;
9
+ export declare const isNullOrEmptyStringOrUndefined: (value: any) => boolean;
@@ -0,0 +1,2 @@
1
+ export * from './enum';
2
+ export * from './helpers';
@@ -0,0 +1,10 @@
1
+ export type ContactIdentifier = {
2
+ value: string;
3
+ name: string;
4
+ active: boolean;
5
+ };
6
+ export default function useContactIdentifiers(): {
7
+ contactIdentifiers: ContactIdentifier[];
8
+ pending: boolean;
9
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
10
+ };
@@ -0,0 +1,6 @@
1
+ import { Subscription } from '../../types/Subscription';
2
+ export default function useContactSubscriptions(): {
3
+ subscriptions: Subscription[];
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { GiftcardResource } from '../../types/Giftcard';
2
+ export default function useGiftcard(hash: string): {
3
+ giftcard: GiftcardResource;
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,20 @@
1
+ export type LoyaltyTransaction = {
2
+ id: number;
3
+ uuid: string;
4
+ type: LoyaltyTransactionType;
5
+ data: {
6
+ title: string;
7
+ };
8
+ credits: number;
9
+ created_at: string;
10
+ };
11
+ export declare enum LoyaltyTransactionType {
12
+ CREDIT_RECEPTION = 1,
13
+ PHYSICAL_REWARD_RECEPTION = 2,
14
+ DIGITAL_REWARD_RECEPTION = 3
15
+ }
16
+ export default function useLoyaltyTransactions(): {
17
+ loyaltyTransactions: LoyaltyTransaction[];
18
+ pending: boolean;
19
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
20
+ };
@@ -0,0 +1,6 @@
1
+ import { PrepaidBalanceResource } from '../../types/Prepaid';
2
+ export default function usePrepaidBalance(): {
3
+ prepaidBalance: PrepaidBalanceResource;
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { RewardResource } from '../../types/Reward';
2
+ export default function useRewards(): {
3
+ rewards: RewardResource[];
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { SubscriptionType } from '../../types/Subscription';
2
+ export default function useSubscriptions(): {
3
+ subscriptions: SubscriptionType[];
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { VoucherResource } from '../../types/Voucher';
2
+ export default function useVoucher(code: string): {
3
+ voucher: VoucherResource;
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { VoucherResource } from '../../types/Voucher';
2
+ export default function useVouchers(): {
3
+ vouchers: VoucherResource[];
4
+ pending: boolean;
5
+ mutate: import('swr').KeyedMutator<import('axios').AxiosResponse<any, any, {}>>;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { ExternalToast } from 'sonner';
2
+ export default function useToast(): {
3
+ toast: (result: "success" | "error", message: string) => void;
4
+ successToast: (message?: string, customOptions?: ExternalToast) => void;
5
+ warningToast: (message?: string) => void;
6
+ errorToast: (error?: any) => void;
7
+ };
@@ -0,0 +1,5 @@
1
+ import { PortalSessionProps } from '../modules/CreateNewPortalSession';
2
+ import { PortalSession } from '../types/PortalSession';
3
+ export default function useCreatePortalSession(props: PortalSessionProps): {
4
+ portalSession: PortalSession;
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare function getSupportedNormalizedLocale(locale: string | undefined | null): string;
2
+ export default function useCurrency(): {
3
+ formatAmountInCents: (amountInCents: number) => string;
4
+ getSymbol: (currency: string) => string;
5
+ };
@@ -0,0 +1,4 @@
1
+ export default function useEvents(): {
2
+ get: () => Promise<any>;
3
+ post: () => void;
4
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: Promise<import('i18next').TFunction<"translation", undefined>>;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export type { Contact as ContactResource } from './types/Contact';
2
+ export type { GiftcardTransactionResource } from './types/Giftcard';
3
+ export { PrimaryIdentificationMethod } from './types/PortalSession';
4
+ export type { RewardResource } from './types/Reward';
5
+ export type { VoucherResource } from './types/Voucher';
6
+ export { FacingMode, PortalType } from './helpers/enum';
7
+ export { default as PortalSession } from './modules/CreateNewPortalSession';
8
+ export { default as UuidSession } from './modules/UuidSession';
@@ -0,0 +1,31 @@
1
+ import { FacingMode, PortalType } from '../helpers';
2
+ import { Contact } from '../types/Contact';
3
+ import { GiftcardTransactionResource } from '../types/Giftcard';
4
+ import { PrimaryIdentificationMethod } from '../types/PortalSession';
5
+ import { PrepaidTransaction } from '../types/Prepaid';
6
+ import { RewardResource } from '../types/Reward';
7
+ import { VoucherResource } from '../types/Voucher';
8
+ export type PortalSessionProps = {
9
+ type?: PortalType;
10
+ host?: string;
11
+ apiKey: string;
12
+ debug?: boolean;
13
+ shopUuid: string;
14
+ contactUuid?: string;
15
+ enableRegistration?: boolean;
16
+ enableEmailIdentification?: boolean;
17
+ enableOnScreenKeyboard?: boolean;
18
+ allowMultipleGiftcards?: boolean;
19
+ amountInCents?: number;
20
+ cameraService?: 1 | 2 | 3 | 4;
21
+ cameraFacingMode?: FacingMode | "user" | "environment";
22
+ onContactLink?: (contact: Contact) => void;
23
+ onClaimReward?: (reward: RewardResource, transactionUuid?: string) => void;
24
+ onRedeemVoucher?: (voucher: VoucherResource) => void;
25
+ onUseGiftcard?: (giftcardTransaction: GiftcardTransactionResource) => void;
26
+ onCreateTransaction?: (creditReceptionId: number) => void;
27
+ onCreatePrepaidTransaction?: (prepaidTransaction: PrepaidTransaction) => void;
28
+ primaryIdentificationMethod?: PrimaryIdentificationMethod;
29
+ enableMarketingPreferences?: boolean;
30
+ };
31
+ export default function CreateNewPortalSession(props: PortalSessionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type Brandkit = {
2
+ default_font: {
3
+ id: number;
4
+ title: string;
5
+ };
6
+ font_family: string;
7
+ large_logo_url: string;
8
+ primary_color: string;
9
+ quarternary_color: string;
10
+ secondary_color: string;
11
+ small_logo_url: string;
12
+ tertiary_color: string;
13
+ };
14
+ export default function Root(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export default function StartSession(): ReactElement;
@@ -0,0 +1,6 @@
1
+ export type UuidSessionProps = {
2
+ uuid: string;
3
+ host?: string;
4
+ debug?: boolean;
5
+ };
6
+ export default function UuidSession({ uuid, host, debug }: UuidSessionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ id: number;
3
+ onSuccess: () => Promise<void>;
4
+ onCancel: () => void;
5
+ };
6
+ export default function HandleContactIdentifier(props: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ type QrReaderProps = {
2
+ onScan: (value: string) => void;
3
+ };
4
+ export default function QrReader({ onScan }: QrReaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ type QrReaderProps = {
2
+ onScan: (value: string) => void;
3
+ };
4
+ export default function QrReader2({ onScan }: QrReaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ type QrReaderProps = {
2
+ onScan: (value: string) => void;
3
+ };
4
+ export default function QrReader3({ onScan }: QrReaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ type QrReaderProps = {
2
+ onScan: (value: string) => void;
3
+ };
4
+ export default function QrReader4({ onScan }: QrReaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ type ScannerProps = {
2
+ value: string;
3
+ onInputChange: (value: string) => void;
4
+ onScannerChange: (value: string) => void;
5
+ placeholder?: string;
6
+ label?: string;
7
+ };
8
+ export default function Scanner({ value, onInputChange, onScannerChange, placeholder, label, }: ScannerProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export default function AuthenticateContact(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function AuthenticateViaContactIdentifier(props: {
2
+ onCancel: () => void;
3
+ onSuccess: () => Promise<void>;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Contact } from '../../../types/Contact';
2
+ export type ContactIdentifier = {
3
+ id: number;
4
+ value: string;
5
+ contact: Contact | null;
6
+ uuid: string;
7
+ };
8
+ type Props = {
9
+ onCancel: () => void;
10
+ onSuccess: () => Promise<void>;
11
+ };
12
+ export default function AuthenticateViaEmail({ onCancel, onSuccess }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Contact } from '../../types/Contact';
2
+ type FindOrCreateContactParams = {
3
+ email: string;
4
+ createIfNotFound: boolean;
5
+ };
6
+ export default function useFindOrCreateContact(): {
7
+ findOrCreateContact: ({ email, createIfNotFound, }: FindOrCreateContactParams) => Promise<Contact>;
8
+ };
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Contact } from '../../types/Contact';
2
+ export default function useLinkContactToSession(): {
3
+ linkContactToSession: (contact: Contact) => Promise<void>;
4
+ };