ouisys-component-library 0.0.18 → 0.0.20

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.
@@ -0,0 +1,18 @@
1
+ import { I as ITracker } from './custom-types-8de85480.js';
2
+
3
+ interface IChainRedirectProps {
4
+ chainRedirectUrl: string;
5
+ tracker: ITracker;
6
+ isCsSafe: ({ window, msisdn, command }: {
7
+ window: Window;
8
+ msisdn: string;
9
+ command: 'cs';
10
+ }) => Promise<boolean>;
11
+ msisdn: string;
12
+ className?: string;
13
+ dataQaId?: string;
14
+ }
15
+
16
+ declare const ChainRedirect: ({ chainRedirectUrl, tracker, isCsSafe, msisdn, className, dataQaId }: IChainRedirectProps) => JSX.Element;
17
+
18
+ export { ChainRedirect };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e);exports.ChainRedirect=function(t){var n=t.chainRedirectUrl,a=t.tracker,r=t.isCsSafe,c=t.msisdn,d=t.className,o=t.dataQaId,s=void 0===o?"chain-redirect-":o;return e.useEffect((function(){"undefined"!=typeof window&&window.pac_analytics&&window.pac_analytics.visitor&&setTimeout((function(){r({window:window,msisdn:c,command:"cs"}).then((function(e){e&&(a.customEvent("Chain-Redirect","redirect","ChainFlow",{redirectUrl:n}),window.location.href=n)}))}),2e3)}),[]),i.default.createElement("div",{"data-qa-id":s,className:d},i.default.createElement("h3",null,"Redirecting..."))};
2
+ //# sourceMappingURL=chainRedirect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chainRedirect.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import e,{useEffect as i}from"react";var n=function(n){var t=n.chainRedirectUrl,a=n.tracker,c=n.isCsSafe,r=n.msisdn,d=n.className,o=n.dataQaId,s=void 0===o?"chain-redirect-":o;return i((function(){"undefined"!=typeof window&&window.pac_analytics&&window.pac_analytics.visitor&&setTimeout((function(){c({window:window,msisdn:r,command:"cs"}).then((function(e){e&&(a.customEvent("Chain-Redirect","redirect","ChainFlow",{redirectUrl:t}),window.location.href=t)}))}),2e3)}),[]),e.createElement("div",{"data-qa-id":s,className:d},e.createElement("h3",null,"Redirecting..."))};export{n as ChainRedirect};
2
+ //# sourceMappingURL=chainRedirect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chainRedirect.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ declare type IOptInFlowName = 'Block' | 'Click to sms' | 'Hybrid Pin' | 'Msisdn to sms' | 'Not available' | 'Pin' | 'Redirect' | 'To be determined' | 'USSD' | '3G click';
2
+ declare type ITracker = {
3
+ advancedInFlow: (flow: string, action: string, args?: any) => void;
4
+ advancedInPreFlow: (label: string, args?: any) => void;
5
+ recedeInFlow: (flow: string, newState: string, args?: any) => void;
6
+ customEvent: (category: string, action: string, label: string, arg?: any) => void;
7
+ sendOptInFlowEvent: (optInFlowName: IOptInFlowName) => void;
8
+ };
9
+
10
+ export { ITracker as I };
package/build/index.d.ts CHANGED
@@ -1,14 +1,6 @@
1
+ import { I as ITracker } from './custom-types-8de85480.js';
1
2
  import * as React$1 from 'react';
2
3
 
3
- declare type IOptInFlowName = 'Block' | 'Click to sms' | 'Hybrid Pin' | 'Msisdn to sms' | 'Not available' | 'Pin' | 'Redirect' | 'To be determined' | 'USSD' | '3G click';
4
- declare type ITracker = {
5
- advancedInFlow: (flow: string, action: string, args?: any) => void;
6
- advancedInPreFlow: (label: string, args?: any) => void;
7
- recedeInFlow: (flow: string, newState: string, args?: any) => void;
8
- customEvent: (category: string, action: string, label: string, arg?: any) => void;
9
- sendOptInFlowEvent: (optInFlowName: IOptInFlowName) => void;
10
- };
11
-
12
4
  interface interfaceButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
13
5
  children: React.ReactNode;
14
6
  className?: string;
@@ -0,0 +1,2 @@
1
+ import { ChainRedirect } from './ChainRedirect';
2
+ export { ChainRedirect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-component-library",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Ouisys Components",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.es.js",