@bunnyapp/components 1.0.49 → 1.0.50
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/cjs/index.js +11 -7
- package/dist/cjs/src/components/Signup/Signup.d.ts +3 -1
- package/dist/cjs/src/graphql/mutations/accountSignup.d.ts +2 -1
- package/dist/cjs/src/graphql/mutations/quoteAccountSignup.d.ts +2 -1
- package/dist/esm/index.js +11 -7
- package/dist/esm/src/components/Signup/Signup.d.ts +3 -1
- package/dist/esm/src/graphql/mutations/accountSignup.d.ts +2 -1
- package/dist/esm/src/graphql/mutations/quoteAccountSignup.d.ts +2 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -19678,9 +19678,9 @@ var PaymentMethodDisplay = function (_a) {
|
|
|
19678
19678
|
}, title: jsxRuntime.jsx(DrawerHeader, { onClose: function () { return setShowModal(false); }, title: "New payment method", closeButtonClassName: "ant-drawer-close" }) }, { children: children })));
|
|
19679
19679
|
};
|
|
19680
19680
|
|
|
19681
|
-
var MUTATION$6 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId\n ) {\n errors\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n }\n}"; };
|
|
19681
|
+
var MUTATION$6 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!,\n $entityId: ID!\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId,\n entityId: $entityId\n ) {\n errors\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n }\n}"; };
|
|
19682
19682
|
var accountSignup = function (_a) {
|
|
19683
|
-
var token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId, quoteId = _a.quoteId, paymentToken = _a.paymentToken, paymentMethodId = _a.paymentMethodId, pluginId = _a.pluginId, priceListCode = _a.priceListCode;
|
|
19683
|
+
var token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId, quoteId = _a.quoteId, paymentToken = _a.paymentToken, paymentMethodId = _a.paymentMethodId, pluginId = _a.pluginId, priceListCode = _a.priceListCode, entityId = _a.entityId;
|
|
19684
19684
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19685
19685
|
var vars, response, errors;
|
|
19686
19686
|
var _b;
|
|
@@ -19694,6 +19694,7 @@ var accountSignup = function (_a) {
|
|
|
19694
19694
|
pluginId: pluginId,
|
|
19695
19695
|
paymentMethodId: paymentMethodId,
|
|
19696
19696
|
priceListCode: priceListCode,
|
|
19697
|
+
entityId: entityId,
|
|
19697
19698
|
};
|
|
19698
19699
|
return [4 /*yield*/, common.gqlRequest({
|
|
19699
19700
|
query: MUTATION$6(),
|
|
@@ -19712,9 +19713,9 @@ var accountSignup = function (_a) {
|
|
|
19712
19713
|
});
|
|
19713
19714
|
};
|
|
19714
19715
|
|
|
19715
|
-
var MUTATION$5 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact\n ) {\n account {\n id\n }\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n tenant {\n code\n }\n portalSessionToken\n errors\n }\n}"; };
|
|
19716
|
+
var MUTATION$5 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!,\n $entityId: ID!\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact,\n entityId: $entityId\n ) {\n account {\n id\n }\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n tenant {\n code\n }\n portalSessionToken\n errors\n }\n}"; };
|
|
19716
19717
|
var quoteAccountSignup = function (_a) {
|
|
19717
|
-
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact;
|
|
19718
|
+
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact, entityId = _a.entityId;
|
|
19718
19719
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19719
19720
|
var vars, response, errors;
|
|
19720
19721
|
var _b;
|
|
@@ -19725,6 +19726,7 @@ var quoteAccountSignup = function (_a) {
|
|
|
19725
19726
|
priceListCode: priceListCode,
|
|
19726
19727
|
accountName: accountName,
|
|
19727
19728
|
billingContact: billingContact,
|
|
19729
|
+
entityId: entityId,
|
|
19728
19730
|
};
|
|
19729
19731
|
return [4 /*yield*/, common.gqlRequest({
|
|
19730
19732
|
query: MUTATION$5(),
|
|
@@ -19801,7 +19803,7 @@ function PriceListDisplay(_a) {
|
|
|
19801
19803
|
|
|
19802
19804
|
var showErrorNotification = common.useErrorNotification();
|
|
19803
19805
|
function Signup(_a) {
|
|
19804
|
-
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, _b = _a.isCardEnabled, isCardEnabled = _b === void 0 ? true : _b, className = _a.className, _c = _a.shadow, shadow = _c === void 0 ? "shadow-md" : _c, style = _a.style;
|
|
19806
|
+
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, _b = _a.isCardEnabled, isCardEnabled = _b === void 0 ? true : _b, className = _a.className, _c = _a.shadow, shadow = _c === void 0 ? "shadow-md" : _c, style = _a.style, entityId = _a.entityId;
|
|
19805
19807
|
// Hooks
|
|
19806
19808
|
var _d = react.useContext(BunnyContext), apiHost = _d.apiHost, graphQLClient = _d.graphQLClient;
|
|
19807
19809
|
var tokenFromContexts = useToken();
|
|
@@ -19843,6 +19845,7 @@ function Signup(_a) {
|
|
|
19843
19845
|
lastName: formData.lastName,
|
|
19844
19846
|
email: formData.email,
|
|
19845
19847
|
},
|
|
19848
|
+
entityId: entityId,
|
|
19846
19849
|
})];
|
|
19847
19850
|
case 1:
|
|
19848
19851
|
data = _a.sent();
|
|
@@ -19902,6 +19905,7 @@ function Signup(_a) {
|
|
|
19902
19905
|
pluginId: plugin === null || plugin === void 0 ? void 0 : plugin.id.toString(),
|
|
19903
19906
|
priceListCode: priceListCode,
|
|
19904
19907
|
accountId: accountId,
|
|
19908
|
+
entityId: entityId,
|
|
19905
19909
|
})];
|
|
19906
19910
|
case 1: return [2 /*return*/, _a.sent()];
|
|
19907
19911
|
}
|
|
@@ -19917,7 +19921,7 @@ function Signup(_a) {
|
|
|
19917
19921
|
};
|
|
19918
19922
|
return (jsxRuntime.jsx(WrapperComponent, __assign({ className: "p-4 flex flex-col ".concat(shadow, " ").concat(className), style: style }, { children: purchaseSucceeded ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (quote === null || quote === void 0 ? void 0 : quote.currencyId) !== undefined ? (jsxRuntime.jsx(PaymentSuccessDisplay, { amountPaid: (quote === null || quote === void 0 ? void 0 : quote.amountDue) || 0, className: "w-full", companyName: companyName, returnUrl: returnUrl, currencyId: quote === null || quote === void 0 ? void 0 : quote.currencyId })) : (jsxRuntime.jsx("div", { children: "No currency ID found from Quote" })) })) : (jsxRuntime.jsxs("div", __assign({ className: "flex ".concat(isMobile ? "flex-col" : "flex-row", " h-full w-full") }, { children: [jsxRuntime.jsx("div", __assign({ className: "flex flex-col ".concat(isMobile ? "items-center" : "w-1/2 items-center") }, { children: jsxRuntime.jsx(PriceListDisplay, { priceListData: priceListData, topNavImageUrl: topNavImageUrl }) })), jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "h-full" : "my-4") }, { children: jsxRuntime.jsx(antd.Divider, { className: "h-full", type: isMobile ? undefined : "vertical" }) })), jsxRuntime.jsx("div", __assign({ className: "flex ".concat(isMobile
|
|
19919
19923
|
? "items-center justify-center my-12"
|
|
19920
|
-
: "w-1/2 items-center justify-center my-12") }, { children: jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "
|
|
19924
|
+
: "w-1/2 items-center justify-center my-12") }, { children: jsxRuntime.jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "") }, { children: jsxRuntime.jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: proceedingToPayment, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) })) }))] }))) })));
|
|
19921
19925
|
}
|
|
19922
19926
|
|
|
19923
19927
|
var createRequestHeaders = function (token) {
|
|
@@ -22018,7 +22022,7 @@ var SubscriptionsListContainer = function (_a) {
|
|
|
22018
22022
|
if (subscriptionsAreLoading ||
|
|
22019
22023
|
(Boolean(onChangePlanClick) ? arePlanChangeOptionsLoading : false))
|
|
22020
22024
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
22021
|
-
return (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-".concat(gap, " shrink overflow-auto") }, { children:
|
|
22025
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.length) > 0 ? (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-".concat(gap, " shrink overflow-auto") }, { children: jsxRuntime.jsx(SubscriptionsList, { hideExpired: hideExpired, onChangePlanClick: onChangePlanClick, onCancelSubscriptionClick: onCancelSubscriptionClick, planChangeOptions: planChangeOptions, subscriptions: subscriptions }) }))) : (noSubscriptionsComponent || (jsxRuntime.jsx("div", __assign({ className: "flex flex-col items-center w-full" }, { children: jsxRuntime.jsx(ErrorView, { message: "You have no subscriptions with ".concat(companyName, " yet") }) })))) }));
|
|
22022
22026
|
};
|
|
22023
22027
|
|
|
22024
22028
|
var QUOTE_CHARGE_CREATE = "\nmutation QuoteChargeCreate ($quoteChangeId: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date, $priceListChargeId: ID, $subscriptionChargeId: ID, $price: Float, $quantity: Int) {\n quoteChargeCreate(\n endDate: $endDate\n price: $price\n priceListChargeId: $priceListChargeId\n quantity: $quantity\n quoteChangeId: $quoteChangeId\n startDate: $startDate\n subscriptionChargeId: $subscriptionChargeId\n ) {\n quoteCharge {\n quoteChange {\n id\n quoteId\n }\n }\n }\n}\n\n";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../styles/index.less";
|
|
3
3
|
import { ShadowType } from "../../types/shadowType";
|
|
4
|
-
export default function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, }: {
|
|
4
|
+
export default function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, entityId, }: {
|
|
5
5
|
/** The company name to display on the signup page */
|
|
6
6
|
companyName: string;
|
|
7
7
|
/** The price list code to use for the signup */
|
|
@@ -16,4 +16,6 @@ export default function Signup({ companyName, priceListCode, returnUrl, isCardEn
|
|
|
16
16
|
shadow?: ShadowType;
|
|
17
17
|
/** A custom style to apply to the component */
|
|
18
18
|
style?: React.CSSProperties;
|
|
19
|
+
/** The entity ID to use for the signup */
|
|
20
|
+
entityId: string;
|
|
19
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
1
|
+
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, entityId, }: {
|
|
2
2
|
token: string;
|
|
3
3
|
apiHost: string;
|
|
4
4
|
accountId: string;
|
|
@@ -7,5 +7,6 @@ declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken
|
|
|
7
7
|
paymentMethodId?: string | undefined;
|
|
8
8
|
pluginId: string;
|
|
9
9
|
priceListCode: string;
|
|
10
|
+
entityId: string;
|
|
10
11
|
}) => Promise<any>;
|
|
11
12
|
export default accountSignup;
|
|
@@ -3,11 +3,12 @@ type BillingContact = {
|
|
|
3
3
|
lastName: string;
|
|
4
4
|
email: string;
|
|
5
5
|
};
|
|
6
|
-
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, }: {
|
|
6
|
+
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, entityId, }: {
|
|
7
7
|
token?: string | undefined;
|
|
8
8
|
apiHost: string;
|
|
9
9
|
priceListCode: string;
|
|
10
10
|
accountName: string;
|
|
11
11
|
billingContact: BillingContact;
|
|
12
|
+
entityId: string;
|
|
12
13
|
}) => Promise<any>;
|
|
13
14
|
export default quoteAccountSignup;
|
package/dist/esm/index.js
CHANGED
|
@@ -19649,9 +19649,9 @@ var PaymentMethodDisplay = function (_a) {
|
|
|
19649
19649
|
}, title: jsx(DrawerHeader, { onClose: function () { return setShowModal(false); }, title: "New payment method", closeButtonClassName: "ant-drawer-close" }) }, { children: children })));
|
|
19650
19650
|
};
|
|
19651
19651
|
|
|
19652
|
-
var MUTATION$6 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId\n ) {\n errors\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n }\n}"; };
|
|
19652
|
+
var MUTATION$6 = function () { return "\nmutation AccountSignup (\n $pluginId: String!,\n $paymentMethodId: String,\n $priceListCode: String!,\n $accountId: ID!,\n $quoteId: ID!,\n $entityId: ID!\n) {\n accountSignup(\n pluginId: $pluginId,\n paymentMethodId: $paymentMethodId,\n priceListCode: $priceListCode,\n accountId: $accountId,\n quoteId: $quoteId,\n entityId: $entityId\n ) {\n errors\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n }\n}"; };
|
|
19653
19653
|
var accountSignup = function (_a) {
|
|
19654
|
-
var token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId, quoteId = _a.quoteId, paymentToken = _a.paymentToken, paymentMethodId = _a.paymentMethodId, pluginId = _a.pluginId, priceListCode = _a.priceListCode;
|
|
19654
|
+
var token = _a.token, apiHost = _a.apiHost, accountId = _a.accountId, quoteId = _a.quoteId, paymentToken = _a.paymentToken, paymentMethodId = _a.paymentMethodId, pluginId = _a.pluginId, priceListCode = _a.priceListCode, entityId = _a.entityId;
|
|
19655
19655
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19656
19656
|
var vars, response, errors;
|
|
19657
19657
|
var _b;
|
|
@@ -19665,6 +19665,7 @@ var accountSignup = function (_a) {
|
|
|
19665
19665
|
pluginId: pluginId,
|
|
19666
19666
|
paymentMethodId: paymentMethodId,
|
|
19667
19667
|
priceListCode: priceListCode,
|
|
19668
|
+
entityId: entityId,
|
|
19668
19669
|
};
|
|
19669
19670
|
return [4 /*yield*/, gqlRequest({
|
|
19670
19671
|
query: MUTATION$6(),
|
|
@@ -19683,9 +19684,9 @@ var accountSignup = function (_a) {
|
|
|
19683
19684
|
});
|
|
19684
19685
|
};
|
|
19685
19686
|
|
|
19686
|
-
var MUTATION$5 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact\n ) {\n account {\n id\n }\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n tenant {\n code\n }\n portalSessionToken\n errors\n }\n}"; };
|
|
19687
|
+
var MUTATION$5 = function () { return "\nmutation QuoteAccountSignup (\n $accountName: String!,\n $billingContact: ContactAttributes!,\n $priceListCode: String!,\n $entityId: ID!\n) {\n quoteAccountSignup(\n priceListCode: $priceListCode,\n accountName: $accountName,\n billingContact: $billingContact,\n entityId: $entityId\n ) {\n account {\n id\n }\n quote {\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n backdatedPeriods\n backdatedQuote\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceImmediately\n invoiceImmediatelyAvailable\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n number\n ownerId\n payableId\n periodAmount\n poNumber\n requiresApproval\n smallUnitAmountDue\n splitInvoice\n startDate\n state\n subtotal\n taxAmount\n taxCode\n updatedAt\n uuid\n }\n tenant {\n code\n }\n portalSessionToken\n errors\n }\n}"; };
|
|
19687
19688
|
var quoteAccountSignup = function (_a) {
|
|
19688
|
-
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact;
|
|
19689
|
+
var token = _a.token, apiHost = _a.apiHost, priceListCode = _a.priceListCode, accountName = _a.accountName, billingContact = _a.billingContact, entityId = _a.entityId;
|
|
19689
19690
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19690
19691
|
var vars, response, errors;
|
|
19691
19692
|
var _b;
|
|
@@ -19696,6 +19697,7 @@ var quoteAccountSignup = function (_a) {
|
|
|
19696
19697
|
priceListCode: priceListCode,
|
|
19697
19698
|
accountName: accountName,
|
|
19698
19699
|
billingContact: billingContact,
|
|
19700
|
+
entityId: entityId,
|
|
19699
19701
|
};
|
|
19700
19702
|
return [4 /*yield*/, gqlRequest({
|
|
19701
19703
|
query: MUTATION$5(),
|
|
@@ -19772,7 +19774,7 @@ function PriceListDisplay(_a) {
|
|
|
19772
19774
|
|
|
19773
19775
|
var showErrorNotification = useErrorNotification();
|
|
19774
19776
|
function Signup(_a) {
|
|
19775
|
-
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, _b = _a.isCardEnabled, isCardEnabled = _b === void 0 ? true : _b, className = _a.className, _c = _a.shadow, shadow = _c === void 0 ? "shadow-md" : _c, style = _a.style;
|
|
19777
|
+
var companyName = _a.companyName, priceListCode = _a.priceListCode, returnUrl = _a.returnUrl, _b = _a.isCardEnabled, isCardEnabled = _b === void 0 ? true : _b, className = _a.className, _c = _a.shadow, shadow = _c === void 0 ? "shadow-md" : _c, style = _a.style, entityId = _a.entityId;
|
|
19776
19778
|
// Hooks
|
|
19777
19779
|
var _d = useContext(BunnyContext), apiHost = _d.apiHost, graphQLClient = _d.graphQLClient;
|
|
19778
19780
|
var tokenFromContexts = useToken();
|
|
@@ -19814,6 +19816,7 @@ function Signup(_a) {
|
|
|
19814
19816
|
lastName: formData.lastName,
|
|
19815
19817
|
email: formData.email,
|
|
19816
19818
|
},
|
|
19819
|
+
entityId: entityId,
|
|
19817
19820
|
})];
|
|
19818
19821
|
case 1:
|
|
19819
19822
|
data = _a.sent();
|
|
@@ -19873,6 +19876,7 @@ function Signup(_a) {
|
|
|
19873
19876
|
pluginId: plugin === null || plugin === void 0 ? void 0 : plugin.id.toString(),
|
|
19874
19877
|
priceListCode: priceListCode,
|
|
19875
19878
|
accountId: accountId,
|
|
19879
|
+
entityId: entityId,
|
|
19876
19880
|
})];
|
|
19877
19881
|
case 1: return [2 /*return*/, _a.sent()];
|
|
19878
19882
|
}
|
|
@@ -19888,7 +19892,7 @@ function Signup(_a) {
|
|
|
19888
19892
|
};
|
|
19889
19893
|
return (jsx(WrapperComponent, __assign({ className: "p-4 flex flex-col ".concat(shadow, " ").concat(className), style: style }, { children: purchaseSucceeded ? (jsx(Fragment, { children: (quote === null || quote === void 0 ? void 0 : quote.currencyId) !== undefined ? (jsx(PaymentSuccessDisplay, { amountPaid: (quote === null || quote === void 0 ? void 0 : quote.amountDue) || 0, className: "w-full", companyName: companyName, returnUrl: returnUrl, currencyId: quote === null || quote === void 0 ? void 0 : quote.currencyId })) : (jsx("div", { children: "No currency ID found from Quote" })) })) : (jsxs("div", __assign({ className: "flex ".concat(isMobile ? "flex-col" : "flex-row", " h-full w-full") }, { children: [jsx("div", __assign({ className: "flex flex-col ".concat(isMobile ? "items-center" : "w-1/2 items-center") }, { children: jsx(PriceListDisplay, { priceListData: priceListData, topNavImageUrl: topNavImageUrl }) })), jsx("div", __assign({ className: "".concat(isMobile ? "h-full" : "my-4") }, { children: jsx(Divider, { className: "h-full", type: isMobile ? undefined : "vertical" }) })), jsx("div", __assign({ className: "flex ".concat(isMobile
|
|
19890
19894
|
? "items-center justify-center my-12"
|
|
19891
|
-
: "w-1/2 items-center justify-center my-12") }, { children: jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "
|
|
19895
|
+
: "w-1/2 items-center justify-center my-12") }, { children: jsx("div", __assign({ className: "".concat(isMobile ? "w-full" : "") }, { children: jsx(PaymentForms, { quote: quote, handlePaymentSuccess: handlePaymentSuccess, handlePaymentFail: handlePaymentFail, handleSubmit: handleSubmit, proceedingToPayment: proceedingToPayment, accountId: accountId, overrideToken: portalSessionToken, customCheckoutFunction: accountSignupFunction }) })) }))] }))) })));
|
|
19892
19896
|
}
|
|
19893
19897
|
|
|
19894
19898
|
var createRequestHeaders = function (token) {
|
|
@@ -21989,7 +21993,7 @@ var SubscriptionsListContainer = function (_a) {
|
|
|
21989
21993
|
if (subscriptionsAreLoading ||
|
|
21990
21994
|
(Boolean(onChangePlanClick) ? arePlanChangeOptionsLoading : false))
|
|
21991
21995
|
return jsx(Fragment, {});
|
|
21992
|
-
return (jsx("div", __assign({ className: "flex flex-col gap-".concat(gap, " shrink overflow-auto") }, { children:
|
|
21996
|
+
return (jsx(Fragment, { children: (subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.length) > 0 ? (jsx("div", __assign({ className: "flex flex-col gap-".concat(gap, " shrink overflow-auto") }, { children: jsx(SubscriptionsList, { hideExpired: hideExpired, onChangePlanClick: onChangePlanClick, onCancelSubscriptionClick: onCancelSubscriptionClick, planChangeOptions: planChangeOptions, subscriptions: subscriptions }) }))) : (noSubscriptionsComponent || (jsx("div", __assign({ className: "flex flex-col items-center w-full" }, { children: jsx(ErrorView, { message: "You have no subscriptions with ".concat(companyName, " yet") }) })))) }));
|
|
21993
21997
|
};
|
|
21994
21998
|
|
|
21995
21999
|
var QUOTE_CHARGE_CREATE = "\nmutation QuoteChargeCreate ($quoteChangeId: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date, $priceListChargeId: ID, $subscriptionChargeId: ID, $price: Float, $quantity: Int) {\n quoteChargeCreate(\n endDate: $endDate\n price: $price\n priceListChargeId: $priceListChargeId\n quantity: $quantity\n quoteChangeId: $quoteChangeId\n startDate: $startDate\n subscriptionChargeId: $subscriptionChargeId\n ) {\n quoteCharge {\n quoteChange {\n id\n quoteId\n }\n }\n }\n}\n\n";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../styles/index.less";
|
|
3
3
|
import { ShadowType } from "../../types/shadowType";
|
|
4
|
-
export default function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, }: {
|
|
4
|
+
export default function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, entityId, }: {
|
|
5
5
|
/** The company name to display on the signup page */
|
|
6
6
|
companyName: string;
|
|
7
7
|
/** The price list code to use for the signup */
|
|
@@ -16,4 +16,6 @@ export default function Signup({ companyName, priceListCode, returnUrl, isCardEn
|
|
|
16
16
|
shadow?: ShadowType;
|
|
17
17
|
/** A custom style to apply to the component */
|
|
18
18
|
style?: React.CSSProperties;
|
|
19
|
+
/** The entity ID to use for the signup */
|
|
20
|
+
entityId: string;
|
|
19
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
1
|
+
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, entityId, }: {
|
|
2
2
|
token: string;
|
|
3
3
|
apiHost: string;
|
|
4
4
|
accountId: string;
|
|
@@ -7,5 +7,6 @@ declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken
|
|
|
7
7
|
paymentMethodId?: string | undefined;
|
|
8
8
|
pluginId: string;
|
|
9
9
|
priceListCode: string;
|
|
10
|
+
entityId: string;
|
|
10
11
|
}) => Promise<any>;
|
|
11
12
|
export default accountSignup;
|
|
@@ -3,11 +3,12 @@ type BillingContact = {
|
|
|
3
3
|
lastName: string;
|
|
4
4
|
email: string;
|
|
5
5
|
};
|
|
6
|
-
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, }: {
|
|
6
|
+
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, entityId, }: {
|
|
7
7
|
token?: string | undefined;
|
|
8
8
|
apiHost: string;
|
|
9
9
|
priceListCode: string;
|
|
10
10
|
accountName: string;
|
|
11
11
|
billingContact: BillingContact;
|
|
12
|
+
entityId: string;
|
|
12
13
|
}) => Promise<any>;
|
|
13
14
|
export default quoteAccountSignup;
|
package/dist/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, accountI
|
|
|
94
94
|
useAllPaymentPlugins?: boolean | undefined;
|
|
95
95
|
}) => react_jsx_runtime.JSX.Element;
|
|
96
96
|
|
|
97
|
-
declare function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, }: {
|
|
97
|
+
declare function Signup({ companyName, priceListCode, returnUrl, isCardEnabled, className, shadow, style, entityId, }: {
|
|
98
98
|
/** The company name to display on the signup page */
|
|
99
99
|
companyName: string;
|
|
100
100
|
/** The price list code to use for the signup */
|
|
@@ -109,6 +109,8 @@ declare function Signup({ companyName, priceListCode, returnUrl, isCardEnabled,
|
|
|
109
109
|
shadow?: ShadowType;
|
|
110
110
|
/** A custom style to apply to the component */
|
|
111
111
|
style?: React.CSSProperties;
|
|
112
|
+
/** The entity ID to use for the signup */
|
|
113
|
+
entityId: string;
|
|
112
114
|
}): react_jsx_runtime.JSX.Element;
|
|
113
115
|
|
|
114
116
|
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, configProviderProps, }: {
|
package/package.json
CHANGED