@pelcro/react-pelcro-js 3.26.0-beta.71 → 3.26.0-beta.73
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.cjs.js +14 -5
- package/dist/index.esm.js +14 -5
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14964,7 +14964,7 @@ function Phone(_ref) {
|
|
|
14964
14964
|
*
|
|
14965
14965
|
*/
|
|
14966
14966
|
function RegisterView(props) {
|
|
14967
|
-
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett;
|
|
14967
|
+
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro2, _window$Pelcro2$uiSet;
|
|
14968
14968
|
const {
|
|
14969
14969
|
t
|
|
14970
14970
|
} = useTranslation("register");
|
|
@@ -14975,6 +14975,7 @@ function RegisterView(props) {
|
|
|
14975
14975
|
const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
|
|
14976
14976
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
14977
14977
|
const showNameFields = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableNameFieldsInRegister;
|
|
14978
|
+
const nameFieldsRequired = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : _window$Pelcro2$uiSet.requireNameFieldsInRegister;
|
|
14978
14979
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14979
14980
|
id: "pelcro-register-view"
|
|
14980
14981
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -14988,13 +14989,15 @@ function RegisterView(props) {
|
|
|
14988
14989
|
className: "plc-flex plc-items-start"
|
|
14989
14990
|
}, /*#__PURE__*/React__default['default'].createElement(RegisterFirstName, {
|
|
14990
14991
|
id: "pelcro-input-first-name",
|
|
14991
|
-
label: t("labels.firstName")
|
|
14992
|
-
errorId: "pelcro-input-firstName-error"
|
|
14992
|
+
label: `${t("labels.firstName")}${nameFieldsRequired ? " *" : ""}`,
|
|
14993
|
+
errorId: "pelcro-input-firstName-error",
|
|
14994
|
+
required: showNameFields
|
|
14993
14995
|
}), /*#__PURE__*/React__default['default'].createElement(RegisterLastName, {
|
|
14994
14996
|
wrapperClassName: "plc-ml-3",
|
|
14995
14997
|
id: "pelcro-input-last-name",
|
|
14996
|
-
label: t("labels.lastName")
|
|
14997
|
-
errorId: "pelcro-input-lastName-error"
|
|
14998
|
+
label: `${t("labels.lastName")}${nameFieldsRequired ? " *" : ""}`,
|
|
14999
|
+
errorId: "pelcro-input-lastName-error",
|
|
15000
|
+
required: showNameFields
|
|
14998
15001
|
})), /*#__PURE__*/React__default['default'].createElement(RegisterEmail, {
|
|
14999
15002
|
id: "pelcro-input-email",
|
|
15000
15003
|
errorId: "pelcro-input-email-error",
|
|
@@ -33234,6 +33237,9 @@ function DashboardWithHook(props) {
|
|
|
33234
33237
|
}),
|
|
33235
33238
|
setPaymentMethodToEdit: setPaymentMethodToEdit,
|
|
33236
33239
|
setPaymentMethodToDelete: setPaymentMethodToDelete
|
|
33240
|
+
// used for custom event when clicking on the new subscription button
|
|
33241
|
+
,
|
|
33242
|
+
onNewSubscriptionClick: props.onNewSubscriptionClick
|
|
33237
33243
|
});
|
|
33238
33244
|
}
|
|
33239
33245
|
DashboardWithHook.viewId = "dashboard";
|
|
@@ -33384,6 +33390,9 @@ class Dashboard extends React.Component {
|
|
|
33384
33390
|
let {
|
|
33385
33391
|
isGift
|
|
33386
33392
|
} = _ref;
|
|
33393
|
+
if (this.props.onNewSubscriptionClick && !isGift) {
|
|
33394
|
+
return this.props.onNewSubscriptionClick();
|
|
33395
|
+
}
|
|
33387
33396
|
if (isGift) {
|
|
33388
33397
|
this.props.setProductAndPlan(null, null, true);
|
|
33389
33398
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -14934,7 +14934,7 @@ function Phone(_ref) {
|
|
|
14934
14934
|
*
|
|
14935
14935
|
*/
|
|
14936
14936
|
function RegisterView(props) {
|
|
14937
|
-
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett;
|
|
14937
|
+
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro2, _window$Pelcro2$uiSet;
|
|
14938
14938
|
const {
|
|
14939
14939
|
t
|
|
14940
14940
|
} = useTranslation("register");
|
|
@@ -14945,6 +14945,7 @@ function RegisterView(props) {
|
|
|
14945
14945
|
const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
|
|
14946
14946
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
14947
14947
|
const showNameFields = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableNameFieldsInRegister;
|
|
14948
|
+
const nameFieldsRequired = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : _window$Pelcro2$uiSet.requireNameFieldsInRegister;
|
|
14948
14949
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14949
14950
|
id: "pelcro-register-view"
|
|
14950
14951
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14958,13 +14959,15 @@ function RegisterView(props) {
|
|
|
14958
14959
|
className: "plc-flex plc-items-start"
|
|
14959
14960
|
}, /*#__PURE__*/React__default.createElement(RegisterFirstName, {
|
|
14960
14961
|
id: "pelcro-input-first-name",
|
|
14961
|
-
label: t("labels.firstName")
|
|
14962
|
-
errorId: "pelcro-input-firstName-error"
|
|
14962
|
+
label: `${t("labels.firstName")}${nameFieldsRequired ? " *" : ""}`,
|
|
14963
|
+
errorId: "pelcro-input-firstName-error",
|
|
14964
|
+
required: showNameFields
|
|
14963
14965
|
}), /*#__PURE__*/React__default.createElement(RegisterLastName, {
|
|
14964
14966
|
wrapperClassName: "plc-ml-3",
|
|
14965
14967
|
id: "pelcro-input-last-name",
|
|
14966
|
-
label: t("labels.lastName")
|
|
14967
|
-
errorId: "pelcro-input-lastName-error"
|
|
14968
|
+
label: `${t("labels.lastName")}${nameFieldsRequired ? " *" : ""}`,
|
|
14969
|
+
errorId: "pelcro-input-lastName-error",
|
|
14970
|
+
required: showNameFields
|
|
14968
14971
|
})), /*#__PURE__*/React__default.createElement(RegisterEmail, {
|
|
14969
14972
|
id: "pelcro-input-email",
|
|
14970
14973
|
errorId: "pelcro-input-email-error",
|
|
@@ -33204,6 +33207,9 @@ function DashboardWithHook(props) {
|
|
|
33204
33207
|
}),
|
|
33205
33208
|
setPaymentMethodToEdit: setPaymentMethodToEdit,
|
|
33206
33209
|
setPaymentMethodToDelete: setPaymentMethodToDelete
|
|
33210
|
+
// used for custom event when clicking on the new subscription button
|
|
33211
|
+
,
|
|
33212
|
+
onNewSubscriptionClick: props.onNewSubscriptionClick
|
|
33207
33213
|
});
|
|
33208
33214
|
}
|
|
33209
33215
|
DashboardWithHook.viewId = "dashboard";
|
|
@@ -33354,6 +33360,9 @@ class Dashboard extends Component {
|
|
|
33354
33360
|
let {
|
|
33355
33361
|
isGift
|
|
33356
33362
|
} = _ref;
|
|
33363
|
+
if (this.props.onNewSubscriptionClick && !isGift) {
|
|
33364
|
+
return this.props.onNewSubscriptionClick();
|
|
33365
|
+
}
|
|
33357
33366
|
if (isGift) {
|
|
33358
33367
|
this.props.setProductAndPlan(null, null, true);
|
|
33359
33368
|
}
|