tf-checkout-react 1.3.41 → 1.3.42

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.
@@ -23,5 +23,6 @@ export interface IConfirmationPage {
23
23
  onLinkCopied: () => void;
24
24
  orderHash?: string;
25
25
  confirmationLabels: IConfirmationLabels;
26
+ clientLabel?: string;
26
27
  }
27
- export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, }: IConfirmationPage) => JSX.Element;
28
+ export declare const ConfirmationContainer: ({ confirmationLabels, hasCopyIcon, isReferralEnabled, showDefaultShareButtons, messengerAppId, shareButtons, onGetConfirmationDataSuccess, onGetConfirmationDataError, orderHash, onLinkCopied, clientLabel, }: IConfirmationPage) => JSX.Element;
@@ -6,6 +6,7 @@ interface SocialButtonsTypes {
6
6
  appId: string;
7
7
  showDefaultShareButtons: boolean;
8
8
  shareButtons: IShareButton[];
9
+ clientLabel?: string;
9
10
  }
10
- declare const SocialButtons: ({ showDefaultShareButtons, shareLink, name, appId, shareButtons }: SocialButtonsTypes) => JSX.Element;
11
+ declare const SocialButtons: ({ showDefaultShareButtons, shareLink, name, appId, shareButtons, clientLabel, }: SocialButtonsTypes) => JSX.Element;
11
12
  export default SocialButtons;
@@ -4947,39 +4947,40 @@ var SocialButtons = function SocialButtons(_ref2) {
4947
4947
  shareLink = _ref2.shareLink,
4948
4948
  name = _ref2.name,
4949
4949
  appId = _ref2.appId,
4950
- shareButtons = _ref2.shareButtons;
4950
+ shareButtons = _ref2.shareButtons,
4951
+ clientLabel = _ref2.clientLabel;
4951
4952
  return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
4952
4953
  className: "convenient_buttons"
4953
4954
  }, "or use one of these convenient buttons:"), React__default.createElement("div", {
4954
4955
  className: "social-media-btns"
4955
4956
  }, showDefaultShareButtons && React__default.createElement(React__default.Fragment, null, React__default.createElement(SocialComponent, {
4956
- mainLabel: 'Share on',
4957
- subLabel: 'Facebook',
4958
- platform: 'facebook',
4957
+ mainLabel: "Share on",
4958
+ subLabel: "Facebook",
4959
+ platform: "facebook",
4959
4960
  shareData: {
4960
4961
  quote: name,
4961
4962
  url: shareLink
4962
4963
  }
4963
4964
  }), React__default.createElement(SocialComponent, {
4964
- mainLabel: 'Tweet to your',
4965
- subLabel: 'Followers',
4966
- platform: 'twitter',
4965
+ mainLabel: "Tweet to your",
4966
+ subLabel: "Followers",
4967
+ platform: "twitter",
4967
4968
  shareData: {
4968
4969
  title: name,
4969
4970
  url: shareLink
4970
4971
  }
4971
4972
  }), React__default.createElement(SocialComponent, {
4972
- mainLabel: 'Message friends on',
4973
- subLabel: 'Facebook',
4974
- platform: 'messenger',
4973
+ mainLabel: "Message friends on",
4974
+ subLabel: "Facebook",
4975
+ platform: "messenger",
4975
4976
  shareData: {
4976
4977
  appId: appId,
4977
4978
  url: shareLink
4978
4979
  }
4979
4980
  }), React__default.createElement(SocialComponent, {
4980
- mainLabel: 'Message friends on',
4981
- subLabel: 'Whatsapp',
4982
- platform: 'whatsapp',
4981
+ mainLabel: "Message friends on",
4982
+ subLabel: "Whatsapp",
4983
+ platform: "whatsapp",
4983
4984
  shareData: {
4984
4985
  title: name,
4985
4986
  url: shareLink
@@ -4988,7 +4989,9 @@ var SocialButtons = function SocialButtons(_ref2) {
4988
4989
  return React__default.createElement(SocialComponent, Object.assign({
4989
4990
  key: index
4990
4991
  }, shareButton));
4991
- })), (showDefaultShareButtons || shareButtons.length) && React__default.createElement("p", null, "We ", React__default.createElement("strong", null, "never"), " post on Facebook without your permission!"));
4992
+ })), (showDefaultShareButtons || shareButtons.length) && React__default.createElement("p", null, "We ", React__default.createElement("strong", null, "never"), " post on Facebook without your permission!"), React__default.createElement("p", {
4993
+ className: "note-message"
4994
+ }, React__default.createElement("span", null, "*Please note, only purchases made from a different", ' ', clientLabel || 'Ticket Fairy', " account can count towards your referrals"), React__default.createElement("span", null, ' ', "so please make sure you ask your friends to buy their own tickets using their own ", clientLabel || 'Ticket Fairy', " account!")));
4992
4995
  };
4993
4996
 
4994
4997
  var ConfirmationContainer = function ConfirmationContainer(_ref) {
@@ -5007,7 +5010,8 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5007
5010
  onGetConfirmationDataError = _ref$onGetConfirmatio2 === void 0 ? function () {} : _ref$onGetConfirmatio2,
5008
5011
  orderHash = _ref.orderHash,
5009
5012
  _ref$onLinkCopied = _ref.onLinkCopied,
5010
- onLinkCopied = _ref$onLinkCopied === void 0 ? function () {} : _ref$onLinkCopied;
5013
+ onLinkCopied = _ref$onLinkCopied === void 0 ? function () {} : _ref$onLinkCopied,
5014
+ clientLabel = _ref.clientLabel;
5011
5015
  var inputRef = React.useRef(null);
5012
5016
 
5013
5017
  var _useState = React.useState(null),
@@ -5084,6 +5088,14 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5084
5088
  }))();
5085
5089
  }, []);
5086
5090
 
5091
+ var _useState2 = React.useState(false),
5092
+ showCopyModal = _useState2[0],
5093
+ setShowCopyModal = _useState2[1];
5094
+
5095
+ var onClose = function onClose() {
5096
+ setShowCopyModal(false);
5097
+ };
5098
+
5087
5099
  var onChangeShareLink = function onChangeShareLink(e) {
5088
5100
  var newData = _extends({}, data, {
5089
5101
  personal_share_link: e.target.value
@@ -5101,11 +5113,28 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5101
5113
  usePixel(['conversionPixels', 'brandConversionPixels'], data == null ? void 0 : data.product_id);
5102
5114
  return React__default.createElement("div", {
5103
5115
  className: "confirmation-page"
5104
- }, data && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
5116
+ }, React__default.createElement(Modal, {
5117
+ open: showCopyModal,
5118
+ onClose: onClose,
5119
+ "aria-labelledby": "modal-modal-title",
5120
+ "aria-describedby": "modal-modal-description",
5121
+ className: "success-copy-modal"
5122
+ }, React__default.createElement("div", {
5123
+ className: "message-copy-success-box"
5124
+ }, React__default.createElement("div", {
5125
+ className: "message-copy-success"
5126
+ }, React__default.createElement("span", null, "Copied to your clipboard! Now paste your link in a Snapchat message,"), React__default.createElement("span", null, "your Instagram bio, Whatsapp, Facebook or a text :)")), React__default.createElement("div", {
5127
+ className: "footer"
5128
+ }, React__default.createElement("button", {
5129
+ className: "footer-button",
5130
+ type: "button",
5131
+ onClick: onClose
5132
+ }, "OK")))), data && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
5105
5133
  className: "header-container"
5106
5134
  }, React__default.createElement("div", {
5107
5135
  className: "header-product-image"
5108
5136
  }, React__default.createElement("img", {
5137
+ alt: "",
5109
5138
  className: "product-image",
5110
5139
  src: data.product_image
5111
5140
  })), React__default.createElement("div", {
@@ -5169,6 +5198,7 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5169
5198
  className: "share-by-link-copy-icon",
5170
5199
  onClick: function onClick() {
5171
5200
  navigator.clipboard.writeText(_get(inputRef, 'current.value'));
5201
+ setShowCopyModal(true);
5172
5202
  onLinkCopied();
5173
5203
  }
5174
5204
  }, hasCopyIcon ? React__default.createElement("img", {
@@ -5181,7 +5211,8 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5181
5211
  name: data.product_name,
5182
5212
  appId: messengerAppId,
5183
5213
  shareLink: data.personal_share_link,
5184
- shareButtons: shareButtons
5214
+ shareButtons: shareButtons,
5215
+ clientLabel: clientLabel
5185
5216
  })))), React__default.createElement("div", {
5186
5217
  className: "pricing-section"
5187
5218
  }, React__default.createElement("div", {
@@ -5197,7 +5228,9 @@ var ConfirmationContainer = function ConfirmationContainer(_ref) {
5197
5228
  }, pricing.subLabel)), React__default.createElement("div", {
5198
5229
  className: "pricing-section_price"
5199
5230
  }, ' ', pricing.price));
5200
- }))))));
5231
+ }), React__default.createElement("div", {
5232
+ className: "note-pricing-section"
5233
+ }, "^ This is based on the most expensive ticket in your order."))))));
5201
5234
  };
5202
5235
 
5203
5236
  var X_TF_ECOMMERCE = 'X-TF-ECOMMERCE';