@pelcro/react-pelcro-js 3.20.2 → 3.21.0-beta.1
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 +37 -25
- package/dist/index.esm.js +37 -25
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13946,8 +13946,8 @@ function SelectModalWithHook(props) {
|
|
|
13946
13946
|
}
|
|
13947
13947
|
SelectModalWithHook.viewId = "plan-select";
|
|
13948
13948
|
class SelectModal extends React.Component {
|
|
13949
|
-
constructor(
|
|
13950
|
-
super(
|
|
13949
|
+
constructor(_props) {
|
|
13950
|
+
super(_props);
|
|
13951
13951
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13952
13952
|
if (this.props.product) {
|
|
13953
13953
|
const {
|
|
@@ -14006,6 +14006,13 @@ class SelectModal extends React.Component {
|
|
|
14006
14006
|
user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
|
|
14007
14007
|
uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
|
|
14008
14008
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
14009
|
+
matchingEntitlementsProps: props.matchingEntitlements,
|
|
14010
|
+
productListState: this.state.productList,
|
|
14011
|
+
methods: {
|
|
14012
|
+
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
14013
|
+
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
14014
|
+
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
14015
|
+
},
|
|
14009
14016
|
userCurrency: userCurrency,
|
|
14010
14017
|
userCountry: userCountry,
|
|
14011
14018
|
userLanguage: userLanguage,
|
|
@@ -14222,10 +14229,10 @@ class SelectModal extends React.Component {
|
|
|
14222
14229
|
this.state = {
|
|
14223
14230
|
product: {},
|
|
14224
14231
|
plan: {},
|
|
14225
|
-
isGift:
|
|
14232
|
+
isGift: _props.isGift,
|
|
14226
14233
|
disabled: true,
|
|
14227
14234
|
mode: "product",
|
|
14228
|
-
productList:
|
|
14235
|
+
productList: _props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(_props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14229
14236
|
};
|
|
14230
14237
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14231
14238
|
this.locale = this.props.t;
|
|
@@ -20512,27 +20519,32 @@ function SubscriptionManageMembersList(props) {
|
|
|
20512
20519
|
type: HANDLE_REMOVE_MEMBER
|
|
20513
20520
|
});
|
|
20514
20521
|
};
|
|
20515
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, members === null || members === void 0 ? void 0 : members.map(member =>
|
|
20516
|
-
|
|
20517
|
-
|
|
20518
|
-
|
|
20519
|
-
|
|
20520
|
-
|
|
20521
|
-
|
|
20522
|
-
|
|
20523
|
-
|
|
20524
|
-
|
|
20525
|
-
|
|
20526
|
-
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20522
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, members === null || members === void 0 ? void 0 : members.map(member => {
|
|
20523
|
+
var _member$customer;
|
|
20524
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
20525
|
+
key: member.id,
|
|
20526
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
|
|
20527
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
20528
|
+
className: "plc-truncate plc-text-left",
|
|
20529
|
+
title: member === null || member === void 0 ? void 0 : member.invitation_email
|
|
20530
|
+
}, member.status === "active" ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
20531
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
20532
|
+
}, member === null || member === void 0 ? void 0 : (_member$customer = member.customer) === null || _member$customer === void 0 ? void 0 : _member$customer.email) : /*#__PURE__*/React__default['default'].createElement("span", {
|
|
20533
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
20534
|
+
}, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
20535
|
+
className: "plc-py-2"
|
|
20536
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
20537
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${getMemberStatus(member).bgColor} plc-uppercase ${getMemberStatus(member).textColor} plc-rounded-lg`
|
|
20538
|
+
}, getMemberStatus(member).icon, getMemberStatus(member).title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
20539
|
+
variant: "ghost",
|
|
20540
|
+
className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
20541
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
20542
|
+
onClick: () => onRemoveClick(member.id),
|
|
20543
|
+
disabled: member.id === removeMemberId,
|
|
20544
|
+
isLoading: member.id === removeMemberId,
|
|
20545
|
+
"data-key": member.id
|
|
20546
|
+
}, t("labels.remove"))));
|
|
20547
|
+
}));
|
|
20536
20548
|
}
|
|
20537
20549
|
|
|
20538
20550
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -13916,8 +13916,8 @@ function SelectModalWithHook(props) {
|
|
|
13916
13916
|
}
|
|
13917
13917
|
SelectModalWithHook.viewId = "plan-select";
|
|
13918
13918
|
class SelectModal extends Component {
|
|
13919
|
-
constructor(
|
|
13920
|
-
super(
|
|
13919
|
+
constructor(_props) {
|
|
13920
|
+
super(_props);
|
|
13921
13921
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13922
13922
|
if (this.props.product) {
|
|
13923
13923
|
const {
|
|
@@ -13976,6 +13976,13 @@ class SelectModal extends Component {
|
|
|
13976
13976
|
user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
|
|
13977
13977
|
uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
|
|
13978
13978
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
13979
|
+
matchingEntitlementsProps: props.matchingEntitlements,
|
|
13980
|
+
productListState: this.state.productList,
|
|
13981
|
+
methods: {
|
|
13982
|
+
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
13983
|
+
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
13984
|
+
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
13985
|
+
},
|
|
13979
13986
|
userCurrency: userCurrency,
|
|
13980
13987
|
userCountry: userCountry,
|
|
13981
13988
|
userLanguage: userLanguage,
|
|
@@ -14192,10 +14199,10 @@ class SelectModal extends Component {
|
|
|
14192
14199
|
this.state = {
|
|
14193
14200
|
product: {},
|
|
14194
14201
|
plan: {},
|
|
14195
|
-
isGift:
|
|
14202
|
+
isGift: _props.isGift,
|
|
14196
14203
|
disabled: true,
|
|
14197
14204
|
mode: "product",
|
|
14198
|
-
productList:
|
|
14205
|
+
productList: _props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(_props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14199
14206
|
};
|
|
14200
14207
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14201
14208
|
this.locale = this.props.t;
|
|
@@ -20482,27 +20489,32 @@ function SubscriptionManageMembersList(props) {
|
|
|
20482
20489
|
type: HANDLE_REMOVE_MEMBER
|
|
20483
20490
|
});
|
|
20484
20491
|
};
|
|
20485
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, members === null || members === void 0 ? void 0 : members.map(member =>
|
|
20486
|
-
|
|
20487
|
-
|
|
20488
|
-
|
|
20489
|
-
|
|
20490
|
-
|
|
20491
|
-
|
|
20492
|
-
|
|
20493
|
-
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20492
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, members === null || members === void 0 ? void 0 : members.map(member => {
|
|
20493
|
+
var _member$customer;
|
|
20494
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
20495
|
+
key: member.id,
|
|
20496
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
|
|
20497
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
20498
|
+
className: "plc-truncate plc-text-left",
|
|
20499
|
+
title: member === null || member === void 0 ? void 0 : member.invitation_email
|
|
20500
|
+
}, member.status === "active" ? /*#__PURE__*/React__default.createElement("span", {
|
|
20501
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
20502
|
+
}, member === null || member === void 0 ? void 0 : (_member$customer = member.customer) === null || _member$customer === void 0 ? void 0 : _member$customer.email) : /*#__PURE__*/React__default.createElement("span", {
|
|
20503
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
20504
|
+
}, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default.createElement("td", {
|
|
20505
|
+
className: "plc-py-2"
|
|
20506
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
20507
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${getMemberStatus(member).bgColor} plc-uppercase ${getMemberStatus(member).textColor} plc-rounded-lg`
|
|
20508
|
+
}, getMemberStatus(member).icon, getMemberStatus(member).title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
20509
|
+
variant: "ghost",
|
|
20510
|
+
className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
20511
|
+
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
20512
|
+
onClick: () => onRemoveClick(member.id),
|
|
20513
|
+
disabled: member.id === removeMemberId,
|
|
20514
|
+
isLoading: member.id === removeMemberId,
|
|
20515
|
+
"data-key": member.id
|
|
20516
|
+
}, t("labels.remove"))));
|
|
20517
|
+
}));
|
|
20506
20518
|
}
|
|
20507
20519
|
|
|
20508
20520
|
/**
|