@powerhousedao/contributor-billing 0.0.71 → 0.0.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.
Files changed (26) hide show
  1. package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -1
  2. package/dist/editors/invoice/InvoicePDF.js +13 -6
  3. package/dist/editors/invoice/editor.d.ts.map +1 -1
  4. package/dist/editors/invoice/editor.js +13 -8
  5. package/dist/editors/invoice/ingestPDF.js +1 -1
  6. package/dist/editors/invoice/invoiceToGnosis.js +3 -3
  7. package/dist/editors/invoice/legalEntity/bankSection.d.ts +2 -0
  8. package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
  9. package/dist/editors/invoice/legalEntity/bankSection.js +48 -30
  10. package/dist/editors/invoice/legalEntity/legalEntity.d.ts +2 -1
  11. package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
  12. package/dist/editors/invoice/legalEntity/legalEntity.js +2 -2
  13. package/dist/editors/invoice/requestFinance.d.ts.map +1 -1
  14. package/dist/editors/invoice/requestFinance.js +10 -11
  15. package/dist/editors/invoice/uploadPdfChunked.js +1 -1
  16. package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
  17. package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
  18. package/dist/editors/invoice/validation/validationHandler.js +9 -3
  19. package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
  20. package/dist/editors/invoice/validation/validationManager.js +2 -1
  21. package/dist/editors/invoice/validation/validationRules.d.ts +1 -0
  22. package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
  23. package/dist/editors/invoice/validation/validationRules.js +41 -3
  24. package/dist/scripts/invoice/gnosisTransactionBuilder.js +1 -1
  25. package/dist/style.css +170 -0
  26. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"InvoicePDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/InvoicePDF.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAIb,MAAM,wCAAwC,CAAC;AAgThD,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2bhD,CAAC"}
1
+ {"version":3,"file":"InvoicePDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/InvoicePDF.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAIb,MAAM,wCAAwC,CAAC;AAgThD,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2bhD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Document, Page, Text, View, StyleSheet, } from "@react-pdf/renderer";
2
+ import { Document, Page, Text, View, StyleSheet } from "@react-pdf/renderer";
3
3
  import countries from "world-countries";
4
4
  const countriesArray = countries;
5
5
  function getCountryName(countryCode) {
@@ -401,10 +401,15 @@ export const InvoicePDF = ({ invoice, fiatMode, }) => {
401
401
  {
402
402
  /* New component for fiat payment section */
403
403
  }
404
- const PaymentSectionFiat = ({ paymentRouting, }) => (_jsxs(View, { style: [styles.gridContainer, { marginTop: 0, marginLeft: 0 }], children: [_jsxs(View, { style: styles.gridColumn, children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Bank Name:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.name || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Address:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.streetAddress || "" })] }), paymentRouting.bank?.address?.extendedAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.extendedAddress })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.address?.city || "", ",", " ", getCountryName(paymentRouting.bank?.address?.country || "") || ""] })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Postcode:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.postalCode || "00000" })] })] }), _jsxs(View, { style: [styles.gridColumn], children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.beneficiary || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct No:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountNum || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.BIC ||
405
- paymentRouting.bank?.SWIFT ||
406
- paymentRouting.bank?.ABA ||
407
- "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountType || "" })] })] })] }));
404
+ const PaymentSectionFiat = ({ paymentRouting, }) => {
405
+ console.log("paymentRouting", paymentRouting.bank);
406
+ return (_jsxs(View, { style: [styles.gridContainer, { marginTop: 0, marginLeft: 0 }], children: [_jsxs(View, { style: styles.gridColumn, children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Bank Name:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.name || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Address:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.streetAddress || "" })] }), paymentRouting.bank?.address?.extendedAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.extendedAddress })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.address?.city || "", ",", " ", getCountryName(paymentRouting.bank?.address?.country || "") || ""] })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Postcode:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.address?.postalCode || "00000" })] })] }), _jsxs(View, { style: [styles.gridColumn], children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.beneficiary || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct No:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountNum || "" })] }), paymentRouting.bank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "ABA/ACH:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.ABA })] })), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.BIC || paymentRouting.bank?.SWIFT || "" })] }), _jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Acct Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.accountType || "" })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Bank:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.name })] }), paymentRouting.bank?.intermediaryBank?.accountNum && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Acct:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountNum })] })), paymentRouting.bank?.intermediaryBank?.accountType && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Type:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.accountType })] })), paymentRouting.bank?.intermediaryBank?.beneficiary && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Beneficiary:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.beneficiary })] })), paymentRouting.bank?.intermediaryBank?.ABA && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary ABA:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.ABA })] })), (paymentRouting.bank?.intermediaryBank?.BIC || paymentRouting.bank?.intermediaryBank?.SWIFT) && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary BIC/SWIFT:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.BIC || paymentRouting.bank?.intermediaryBank?.SWIFT })] })), paymentRouting.bank?.intermediaryBank?.address?.streetAddress && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Address:" }), _jsxs(Text, { style: styles.companyInfo, children: [paymentRouting.bank?.intermediaryBank?.address?.streetAddress, paymentRouting.bank?.intermediaryBank?.address?.extendedAddress &&
407
+ `, ${paymentRouting.bank?.intermediaryBank?.address?.extendedAddress}`] })] })), (paymentRouting.bank?.intermediaryBank?.address?.city || paymentRouting.bank?.intermediaryBank?.address?.stateProvince || paymentRouting.bank?.intermediaryBank?.address?.postalCode) && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Location:" }), _jsx(Text, { style: styles.companyInfo, children: [
408
+ paymentRouting.bank?.intermediaryBank?.address?.city,
409
+ paymentRouting.bank?.intermediaryBank?.address?.stateProvince,
410
+ paymentRouting.bank?.intermediaryBank?.address?.postalCode
411
+ ].filter(Boolean).join(', ') })] })), paymentRouting.bank?.intermediaryBank?.address?.country && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Country:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.address?.country })] })), paymentRouting.bank?.intermediaryBank?.memo && (_jsxs(View, { style: styles.row, children: [_jsx(Text, { style: styles.companyInfoLabel, children: "Intermediary Memo:" }), _jsx(Text, { style: styles.companyInfo, children: paymentRouting.bank?.intermediaryBank?.memo })] }))] }))] })] }));
412
+ };
408
413
  {
409
414
  /* New component for crypto payment section */
410
415
  }
@@ -412,4 +417,6 @@ const PaymentSectionCrypto = ({ paymentRouting, }) => (_jsx(View, { style: style
412
417
  {
413
418
  /* New component for line items */
414
419
  }
415
- const InvoiceLineItem = ({ item, currency, }) => (_jsxs(View, { style: styles.tableRow, children: [_jsxs(View, { style: styles.tableCol40, children: [_jsx(Text, { style: styles.itemName, children: item.description }), item.longDescription && (_jsx(Text, { style: styles.itemDescription, children: item.longDescription }))] }), _jsx(Text, { style: styles.tableCol15, children: item.quantity % 1 === 0 ? item.quantity.toString() : item.quantity.toFixed(2) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.unitPriceTaxExcl, currency) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.unitPriceTaxIncl - item.unitPriceTaxExcl, currency) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.quantity * item.unitPriceTaxIncl, currency) })] }));
420
+ const InvoiceLineItem = ({ item, currency, }) => (_jsxs(View, { style: styles.tableRow, children: [_jsxs(View, { style: styles.tableCol40, children: [_jsx(Text, { style: styles.itemName, children: item.description }), item.longDescription && (_jsx(Text, { style: styles.itemDescription, children: item.longDescription }))] }), _jsx(Text, { style: styles.tableCol15, children: item.quantity % 1 === 0
421
+ ? item.quantity.toString()
422
+ : item.quantity.toFixed(2) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.unitPriceTaxExcl, currency) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.unitPriceTaxIncl - item.unitPriceTaxExcl, currency) }), _jsx(Text, { style: styles.tableCol15, children: formatCurrency(item.quantity * item.unitPriceTaxIncl, currency) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,wCAAwC,CAAC;AA6ChD,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,2CAu2B3C"}
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,wCAAwC,CAAC;AA6ChD,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,2CAm3B3C"}
@@ -50,6 +50,7 @@ export default function Editor(props) {
50
50
  const [lineItemValidation, setLineItemValidation] = useState(null);
51
51
  const [mainCountryValidation, setMainCountryValidation] = useState(null);
52
52
  const [bankCountryValidation, setBankCountryValidation] = useState(null);
53
+ const [routingNumberValidation, setRoutingNumberValidation] = useState(null);
53
54
  // Replace showConfirmationModal and pendingStatus with a single modal state
54
55
  const [activeModal, setActiveModal] = useState(null);
55
56
  // Track warning state for modal
@@ -90,11 +91,13 @@ export default function Editor(props) {
90
91
  }, 0.0);
91
92
  // If there's an item being edited, replace its contribution with the edited values
92
93
  if (editingItemValues) {
93
- const originalItem = state.lineItems.find(item => item.id === editingItemValues.id);
94
+ const originalItem = state.lineItems.find((item) => item.id === editingItemValues.id);
94
95
  if (originalItem) {
95
96
  // Subtract the original contribution and add the edited contribution
96
- total = total - (originalItem.quantity * originalItem.unitPriceTaxExcl) +
97
- (editingItemValues.quantity * editingItemValues.unitPriceTaxExcl);
97
+ total =
98
+ total -
99
+ originalItem.quantity * originalItem.unitPriceTaxExcl +
100
+ editingItemValues.quantity * editingItemValues.unitPriceTaxExcl;
98
101
  }
99
102
  }
100
103
  return total;
@@ -105,11 +108,13 @@ export default function Editor(props) {
105
108
  }, 0.0);
106
109
  // If there's an item being edited, replace its contribution with the edited values
107
110
  if (editingItemValues) {
108
- const originalItem = state.lineItems.find(item => item.id === editingItemValues.id);
111
+ const originalItem = state.lineItems.find((item) => item.id === editingItemValues.id);
109
112
  if (originalItem) {
110
113
  // Subtract the original contribution and add the edited contribution
111
- total = total - (originalItem.quantity * originalItem.unitPriceTaxIncl) +
112
- (editingItemValues.quantity * editingItemValues.unitPriceTaxIncl);
114
+ total =
115
+ total -
116
+ originalItem.quantity * originalItem.unitPriceTaxIncl +
117
+ editingItemValues.quantity * editingItemValues.unitPriceTaxIncl;
113
118
  }
114
119
  }
115
120
  return total;
@@ -247,7 +252,7 @@ export default function Editor(props) {
247
252
  }
248
253
  // Replace handleStatusChange logic for opening modals
249
254
  const handleStatusChange = (newStatus) => {
250
- const validationResult = validateStatusBeforeContinue(newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, isFiatCurrency);
255
+ const validationResult = validateStatusBeforeContinue(newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, setRoutingNumberValidation, isFiatCurrency);
251
256
  if (validationResult) {
252
257
  return;
253
258
  }
@@ -367,7 +372,7 @@ export default function Editor(props) {
367
372
  // dispatch(actions.editInvoice({ dateDelivered: newValue }));
368
373
  // If you need to update delivery date, implement the correct action here
369
374
  }
370
- }, value: state.dateDelivered || "" })] })] }), _jsx(LegalEntityForm, { legalEntity: state.issuer, onChangeInfo: (input) => dispatch(actions.editIssuer(input)), onChangeBank: (input) => dispatch(actions.editIssuerBank(input)), onChangeWallet: (input) => dispatch(actions.editIssuerWallet(input)), basicInfoDisabled: false, bankDisabled: !fiatMode, walletDisabled: fiatMode, currency: state.currency, status: state.status, walletvalidation: walletValidation, mainCountryValidation: mainCountryValidation, bankCountryValidation: bankCountryValidation, ibanvalidation: ibanValidation, bicvalidation: bicValidation, banknamevalidation: bankNameValidation, streetaddressvalidation: streetAddressValidation, cityvalidation: cityValidation, postalcodevalidation: postalCodeValidation, payeremailvalidation: payerEmailValidation })] }), _jsxs("div", { className: "border border-gray-200 rounded-lg p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Payer" }), _jsxs("div", { className: "mb-2 w-64", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Due Date:" }), _jsx(DatePicker, { name: "dateDue", className: String.raw `w-full p-0`, onChange: (e) => dispatch(actions.editInvoice({
375
+ }, value: state.dateDelivered || "" })] })] }), _jsx(LegalEntityForm, { legalEntity: state.issuer, onChangeInfo: (input) => dispatch(actions.editIssuer(input)), onChangeBank: (input) => dispatch(actions.editIssuerBank(input)), onChangeWallet: (input) => dispatch(actions.editIssuerWallet(input)), basicInfoDisabled: false, bankDisabled: !fiatMode, walletDisabled: fiatMode, currency: state.currency, status: state.status, walletvalidation: walletValidation, mainCountryValidation: mainCountryValidation, bankCountryValidation: bankCountryValidation, ibanvalidation: ibanValidation, bicvalidation: bicValidation, banknamevalidation: bankNameValidation, streetaddressvalidation: streetAddressValidation, cityvalidation: cityValidation, postalcodevalidation: postalCodeValidation, payeremailvalidation: payerEmailValidation, routingNumbervalidation: routingNumberValidation })] }), _jsxs("div", { className: "border border-gray-200 rounded-lg p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Payer" }), _jsxs("div", { className: "mb-2 w-64", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Due Date:" }), _jsx(DatePicker, { name: "dateDue", className: String.raw `w-full p-0`, onChange: (e) => dispatch(actions.editInvoice({
371
376
  dateDue: e.target.value.split("T")[0],
372
377
  })), value: state.dateDue })] }), _jsx(LegalEntityForm, { bankDisabled: true, legalEntity: state.payer, onChangeInfo: (input) => dispatch(actions.editPayer(input)), currency: state.currency, status: state.status, payeremailvalidation: payerEmailValidation })] })] }), _jsx("div", { className: "mb-8", children: _jsx(LineItemsTable, { currency: state.currency, lineItems: state.lineItems.map((item) => ({
373
378
  ...item,
@@ -6,7 +6,7 @@ import { uploadPdfChunked } from "./uploadPdfChunked.js";
6
6
  import { getCountryCodeFromName } from "./utils/utils.js";
7
7
  let GRAPHQL_URL = 'http://localhost:4001/graphql/invoice';
8
8
  if (!window.document.baseURI.includes('localhost')) {
9
- GRAPHQL_URL = 'https://switchboard.powerhouse.xyz/graphql/invoice';
9
+ GRAPHQL_URL = 'https://switchboard-dev.powerhouse.xyz/graphql/invoice';
10
10
  }
11
11
  export async function loadPDFFile({ file, dispatch, }) {
12
12
  if (!file)
@@ -3,8 +3,8 @@ import { useState } from "react";
3
3
  import { actions } from "../../document-models/invoice/index.js";
4
4
  import { generateId } from "document-model";
5
5
  let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
6
- if (!window.document.baseURI.includes('localhost')) {
7
- GRAPHQL_URL = 'https://switchboard.powerhouse.xyz/graphql/invoice';
6
+ if (!window.document.baseURI.includes("localhost")) {
7
+ GRAPHQL_URL = "https://switchboard-dev.powerhouse.xyz/graphql/invoice";
8
8
  }
9
9
  const InvoiceToGnosis = ({ docState, dispatch, }) => {
10
10
  const [isLoading, setIsLoading] = useState(false);
@@ -157,7 +157,7 @@ const InvoiceToGnosis = ({ docState, dispatch, }) => {
157
157
  ? "Processing..."
158
158
  : invoiceStatus === "ACCEPTED"
159
159
  ? "Schedule Payment in Gnosis Safe"
160
- : "Reschedule Payment in Gnosis Safe" })), error && (_jsx("div", { className: "text-red-500 bg-red-50 p-3 rounded-md", children: error })), safeTxHash && (_jsxs("div", { className: "bg-gray-50 mt-4 rounded-md space-y-2", children: [_jsx("a", { href: `https://app.safe.global/transactions/queue?safe=${urlChainName}:0xF130f741d4E3185b29412c65397363f8c23A0460`, target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 hover:text-blue-600 underline block", children: linkText }), _jsxs("p", { className: "font-medium", children: ["Safe Transaction Hash:", _jsx("span", { className: "font-mono text-sm ml-2 break-all", children: safeTxHash })] })] })), !safeTxHash &&
160
+ : "Reschedule Payment in Gnosis Safe" })), error && (_jsx("div", { className: "text-red-500 bg-red-50 p-3 rounded-md", children: error })), safeTxHash && (_jsxs("div", { className: "bg-gray-50 mt-4 rounded-md space-y-2", children: [_jsx("a", { href: `https://app.safe.global/transactions/queue?safe=${urlChainName}:0x1FB6bEF04230d67aF0e3455B997a28AFcCe1F45e`, target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 hover:text-blue-600 underline block", children: linkText }), _jsxs("p", { className: "font-medium", children: ["Safe Transaction Hash:", _jsx("span", { className: "font-mono text-sm ml-2 break-all", children: safeTxHash })] })] })), !safeTxHash &&
161
161
  !error &&
162
162
  invoiceStatus === "PAYMENTSCHEDULED" &&
163
163
  docState.payments.length > 0 && (_jsx(_Fragment, { children: docState.payments[docState.payments.length - 1].issue !== "" ? (_jsx("div", { className: "mt-4", children: _jsxs("p", { className: "text-red-700 font-medium", children: ["Issue: ", docState.payments[docState.payments.length - 1].issue] }) })) : (_jsxs("div", { className: "mt-4", children: [_jsx("div", { className: "invoice-link text-blue-900 hover:text-blue-600", children: _jsx("a", { className: "view-invoice-button", href: `https://app.safe.global/transactions/queue?safe=${urlChainName}:0x1FB6bEF04230d67aF0e3455B997a28AFcCe1F45e`, target: "_blank", rel: "noopener noreferrer", children: linkText }) }), _jsxs("p", { className: "mt-4 font-medium", children: ["Safe Transaction Hash:", _jsx("span", { className: "font-mono text-sm ml-2 break-all", children: docState.payments[docState.payments.length - 1]
@@ -8,7 +8,9 @@ export type LegalEntityBankSectionProps = Omit<ComponentPropsWithRef<"div">, "ch
8
8
  readonly countryvalidation?: ValidationResult | null;
9
9
  readonly ibanvalidation?: ValidationResult | null;
10
10
  readonly bicvalidation?: ValidationResult | null;
11
+ readonly routingNumbervalidation?: ValidationResult | null;
11
12
  readonly banknamevalidation?: ValidationResult | null;
13
+ readonly currency: string;
12
14
  };
13
15
  export declare const LegalEntityBankSection: import("react").ForwardRefExoticComponent<Omit<LegalEntityBankSectionProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
14
16
  //# sourceMappingURL=bankSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bankSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/bankSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAMtB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAiCtE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,CACX,GAAG;IACF,QAAQ,CAAC,KAAK,EAA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IAAI,CAAC;IAC3D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAgCF,eAAO,MAAM,sBAAsB,qIAiflC,CAAC"}
@@ -3,6 +3,7 @@ import { forwardRef, useCallback, useState, useEffect, } from "react";
3
3
  import { twMerge } from "tailwind-merge";
4
4
  import { CountryForm } from "../components/countryForm.js";
5
5
  import { InputField } from "../components/inputField.js";
6
+ import { Select } from "@powerhousedao/document-engineering";
6
7
  const FieldLabel = ({ children }) => (_jsx("label", { className: "block text-sm font-medium text-gray-700", children: children }));
7
8
  const ACCOUNT_TYPES = ["CHECKING", "SAVINGS", "TRUST"];
8
9
  const AccountTypeSelect = forwardRef(function AccountTypeSelect(props, ref) {
@@ -19,10 +20,26 @@ function flattenBankInput(value) {
19
20
  country: value.address.country ?? "",
20
21
  stateProvince: value.address.stateProvince ?? "",
21
22
  }),
23
+ ...(value.intermediaryBank && {
24
+ ABAIntermediary: value.intermediaryBank.ABA ?? "",
25
+ BICIntermediary: value.intermediaryBank.BIC ?? "",
26
+ SWIFTIntermediary: value.intermediaryBank.SWIFT ?? "",
27
+ accountNumIntermediary: value.intermediaryBank.accountNum ?? "",
28
+ accountTypeIntermediary: value.intermediaryBank.accountType ?? "",
29
+ beneficiaryIntermediary: value.intermediaryBank.beneficiary ?? "",
30
+ memoIntermediary: value.intermediaryBank.memo ?? "",
31
+ nameIntermediary: value.intermediaryBank.name ?? "",
32
+ streetAddressIntermediary: value.intermediaryBank.address?.streetAddress ?? "",
33
+ extendedAddressIntermediary: value.intermediaryBank.address?.extendedAddress ?? "",
34
+ cityIntermediary: value.intermediaryBank.address?.city ?? "",
35
+ postalCodeIntermediary: value.intermediaryBank.address?.postalCode ?? "",
36
+ countryIntermediary: value.intermediaryBank.address?.country ?? "",
37
+ stateProvinceIntermediary: value.intermediaryBank.address?.stateProvince ?? "",
38
+ }),
22
39
  };
23
40
  }
24
41
  export const LegalEntityBankSection = forwardRef(function LegalEntityBankSection(props, ref) {
25
- const { value, onChange, disabled, countryvalidation, ibanvalidation, bicvalidation, banknamevalidation, ...divProps } = props;
42
+ const { value, onChange, disabled, countryvalidation, ibanvalidation, bicvalidation, routingNumbervalidation, banknamevalidation, currency, ...divProps } = props;
26
43
  const [showIntermediary, setShowIntermediary] = useState(false);
27
44
  const [localState, setLocalState] = useState(flattenBankInput(value));
28
45
  useEffect(() => {
@@ -52,22 +69,25 @@ export const LegalEntityBankSection = forwardRef(function LegalEntityBankSection
52
69
  handleBlur(field, event);
53
70
  };
54
71
  }
72
+ const SEPA_SWIFT_CURRENCIES = ["EUR", "DKK", "GBP", "CHF", "JPY"];
55
73
  return (_jsxs("div", { ...divProps, className: twMerge("rounded-lg border border-gray-200 bg-white p-6", props.className), ref: ref, children: [_jsx("h3", { className: "mb-4 text-lg font-semibold text-gray-900", children: "Banking Information" }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(InputField
56
74
  // input={localState.accountNum ?? ""}
57
75
  , {
58
76
  // input={localState.accountNum ?? ""}
59
- value: localState.accountNum ?? "", label: "Account Number", placeholder: "Account Number", onBlur: createBlurHandler("accountNum"), handleInputChange: createInputHandler("accountNum"), className: "h-10 w-full text-md mb-2", validation: ibanvalidation }) }), _jsx("div", { className: "space-y-2", children: _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { children: "Account Details" }), _jsx(AccountTypeSelect, { disabled: disabled, onChange: createInputHandler("accountType"), onBlur: createBlurHandler("accountType"), value: localState.accountType ?? "" })] }), _jsx("div", { className: "space-y-2", children: _jsx(InputField
60
- // input={
61
- // (localState.ABA || localState.BIC || localState.SWIFT) ??
62
- // ""
63
- // }
64
- , {
65
- // input={
66
- // (localState.ABA || localState.BIC || localState.SWIFT) ??
67
- // ""
68
- // }
69
- value: (localState.ABA || localState.BIC || localState.SWIFT) ??
70
- "", label: "ABA/BIC/SWIFT No.", placeholder: "ABA/BIC/SWIFT No.", onBlur: createBlurHandler("BIC"), handleInputChange: createInputHandler("BIC"), className: "h-10 w-full text-md mb-2", validation: bicvalidation }) })] }) })] }), _jsx("div", { className: "space-y-4", children: _jsx(InputField
77
+ value: localState.accountNum ?? "", label: "Account Number", placeholder: "Account Number", onBlur: createBlurHandler("accountNum"), handleInputChange: createInputHandler("accountNum"), className: "h-10 w-full text-md mb-2", validation: ibanvalidation }) }), _jsx("div", { className: "space-y-2", children: _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx("div", { className: "space-y-2", children: _jsx(Select, { className: "h-10 w-full text-md mb-2", label: "Account Type", options: ACCOUNT_TYPES.map((type) => ({
78
+ label: type,
79
+ value: type,
80
+ })), value: localState.accountType ?? "", onChange: (value) => {
81
+ // Update local state
82
+ setLocalState((prevState) => ({
83
+ ...prevState,
84
+ accountType: value,
85
+ }));
86
+ // Dispatch to parent component
87
+ onChange({
88
+ accountType: value,
89
+ });
90
+ } }) }), _jsx("div", { className: "space-y-2", children: SEPA_SWIFT_CURRENCIES.includes(currency) ? (_jsx(InputField, { value: (localState.BIC || localState.SWIFT) ?? "", label: "SWIFT/BIC", placeholder: "SWIFT/BIC", onBlur: createBlurHandler("BIC"), handleInputChange: createInputHandler("BIC"), className: "h-10 w-full text-md mb-2", validation: bicvalidation })) : (_jsxs("div", { children: [_jsx(InputField, { value: localState.ABA ?? "", label: "Routing Number (ABA/ACH)", placeholder: "Routing Number (ABA/ACH)", onBlur: createBlurHandler("ABA"), handleInputChange: createInputHandler("ABA"), className: "h-10 w-full text-md mb-2", validation: routingNumbervalidation }), _jsx(InputField, { value: (localState.BIC || localState.SWIFT) ?? "", label: "SWIFT/BIC", placeholder: "SWIFT/BIC", onBlur: createBlurHandler("SWIFT"), handleInputChange: createInputHandler("SWIFT"), className: "h-10 w-full text-md mb-2", validation: bicvalidation })] })) })] }) })] }), _jsx("div", { className: "space-y-4", children: _jsx(InputField
71
91
  // input={localState.beneficiary ?? ""}
72
92
  , {
73
93
  // input={localState.beneficiary ?? ""}
@@ -103,24 +123,22 @@ export const LegalEntityBankSection = forwardRef(function LegalEntityBankSection
103
123
  // input={localState.accountNumIntermediary ?? ""}
104
124
  , {
105
125
  // input={localState.accountNumIntermediary ?? ""}
106
- value: localState.accountNumIntermediary ?? "", label: "Account Number", placeholder: "Intermediary Account Number", onBlur: createBlurHandler("accountNumIntermediary"), handleInputChange: createInputHandler("accountNumIntermediary"), className: "h-10 w-full text-md mb-2" }) }), _jsx("div", { className: "space-y-2", children: _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { children: "Account Details" }), _jsx(AccountTypeSelect, { disabled: disabled, onChange: createInputHandler("accountTypeIntermediary"), onBlur: createBlurHandler("accountTypeIntermediary"), value: localState.accountTypeIntermediary ?? "" })] }), _jsx("div", { className: "space-y-2", children: _jsx(InputField
107
- // input={
108
- // (localState.ABAIntermediary ||
109
- // localState.BICIntermediary ||
110
- // localState.SWIFTIntermediary) ??
111
- // ""
112
- // }
113
- , {
114
- // input={
115
- // (localState.ABAIntermediary ||
116
- // localState.BICIntermediary ||
117
- // localState.SWIFTIntermediary) ??
118
- // ""
119
- // }
120
- value: (localState.ABAIntermediary ||
121
- localState.BICIntermediary ||
126
+ value: localState.accountNumIntermediary ?? "", label: "Account Number", placeholder: "Intermediary Account Number", onBlur: createBlurHandler("accountNumIntermediary"), handleInputChange: createInputHandler("accountNumIntermediary"), className: "h-10 w-full text-md mb-2" }) }), _jsx("div", { className: "space-y-2", children: _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsx("div", { className: "space-y-2", children: _jsx(Select, { className: "h-10 w-full text-md mb-2", label: "Account Type", options: ACCOUNT_TYPES.map((type) => ({
127
+ label: type,
128
+ value: type,
129
+ })), value: localState.accountType ?? "", onChange: (value) => {
130
+ // Update local state
131
+ setLocalState((prevState) => ({
132
+ ...prevState,
133
+ accountType: value,
134
+ }));
135
+ // Dispatch to parent component
136
+ onChange({
137
+ accountType: value,
138
+ });
139
+ } }) }), _jsx("div", { className: "space-y-2", children: SEPA_SWIFT_CURRENCIES.includes(currency) ? (_jsx(InputField, { value: (localState.BICIntermediary ||
122
140
  localState.SWIFTIntermediary) ??
123
- "", label: "ABA/BIC/SWIFT No.", placeholder: "ABA/BIC/SWIFT No.", onBlur: createBlurHandler("BICIntermediary"), handleInputChange: createInputHandler("BICIntermediary"), className: "h-10 w-full text-md mb-2" }) })] }) })] }), _jsx("div", { className: "space-y-4", children: _jsx(InputField
141
+ "", label: "SWIFT/BIC", placeholder: "SWIFT/BIC", onBlur: createBlurHandler("BICIntermediary"), handleInputChange: createInputHandler("BICIntermediary"), className: "h-10 w-full text-md mb-2", validation: bicvalidation })) : (_jsxs("div", { children: [_jsx(InputField, { value: localState.ABAIntermediary ?? "", label: "Routing Number (ABA/ACH)", placeholder: "Routing Number (ABA/ACH)", onBlur: createBlurHandler("ABAIntermediary"), handleInputChange: createInputHandler("ABAIntermediary"), className: "h-10 w-full text-md mb-2" }), _jsx(InputField, { value: localState.SWIFTIntermediary ?? "", label: "SWIFT/BIC", placeholder: "SWIFT/BIC", onBlur: createBlurHandler("SWIFTIntermediary"), handleInputChange: createInputHandler("SWIFTIntermediary"), className: "h-10 w-full text-md mb-2" })] })) })] }) })] }), _jsx("div", { className: "space-y-4", children: _jsx(InputField
124
142
  // input={localState.beneficiaryIntermediary ?? ""}
125
143
  , {
126
144
  // input={localState.beneficiaryIntermediary ?? ""}
@@ -36,7 +36,8 @@ type LegalEntityFormProps = {
36
36
  readonly cityvalidation?: ValidationResult | null;
37
37
  readonly postalcodevalidation?: ValidationResult | null;
38
38
  readonly payeremailvalidation?: ValidationResult | null;
39
+ readonly routingNumbervalidation?: ValidationResult | null;
39
40
  };
40
- export declare function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation, mainCountryValidation, bankCountryValidation, ibanvalidation, bicvalidation, banknamevalidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, }: LegalEntityFormProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation, mainCountryValidation, bankCountryValidation, ibanvalidation, bicvalidation, banknamevalidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, routingNumbervalidation, }: LegalEntityFormProps): import("react/jsx-runtime").JSX.Element;
41
42
  export {};
42
43
  //# sourceMappingURL=legalEntity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"legalEntity.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/legalEntity.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,WAAW,EACZ,MAAM,2CAA2C,CAAC;AACnD,OAAc,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,MAAM,MAAM,0BAA0B,GAClC,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,cAAc,CAAC;AAMpE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,CACX,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,QAAQ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52
52
  email: legalEntity.contactInfo?.email ?? "",
53
53
  };
54
54
  }
55
- export function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation, mainCountryValidation, bankCountryValidation, ibanvalidation, bicvalidation, banknamevalidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, }) {
55
+ export function LegalEntityForm({ legalEntity, onChangeInfo, onChangeBank, onChangeWallet, basicInfoDisabled, bankDisabled, walletDisabled, currency, status, walletvalidation, mainCountryValidation, bankCountryValidation, ibanvalidation, bicvalidation, banknamevalidation, streetaddressvalidation, cityvalidation, postalcodevalidation, payeremailvalidation, routingNumbervalidation, }) {
56
56
  // Handler for main info section
57
57
  const handleChangeInfo = (update) => {
58
58
  if (!onChangeInfo)
59
59
  return;
60
60
  onChangeInfo(update);
61
61
  };
62
- return (_jsxs("div", { className: "space-y-8", children: [!basicInfoDisabled && !!onChangeInfo && (_jsx(LegalEntityMainSection, { onChange: handleChangeInfo, value: flattenLegalEntityToEditInput(legalEntity), mainCountryValidation: mainCountryValidation, streetaddressvalidation: streetaddressvalidation, cityvalidation: cityvalidation, postalcodevalidation: postalcodevalidation, payeremailvalidation: payeremailvalidation })), !walletDisabled && !!onChangeWallet && (_jsx(LegalEntityWalletSection, { onChange: onChangeWallet, value: legalEntity.paymentRouting?.wallet || {}, currency: currency, status: status, walletvalidation: walletvalidation })), !bankDisabled && !!onChangeBank && (_jsx(LegalEntityBankSection, { onChange: onChangeBank, value: legalEntity.paymentRouting?.bank || {}, countryvalidation: bankCountryValidation, ibanvalidation: ibanvalidation, bicvalidation: bicvalidation, banknamevalidation: banknamevalidation }))] }));
62
+ return (_jsxs("div", { className: "space-y-8", children: [!basicInfoDisabled && !!onChangeInfo && (_jsx(LegalEntityMainSection, { onChange: handleChangeInfo, value: flattenLegalEntityToEditInput(legalEntity), mainCountryValidation: mainCountryValidation, streetaddressvalidation: streetaddressvalidation, cityvalidation: cityvalidation, postalcodevalidation: postalcodevalidation, payeremailvalidation: payeremailvalidation })), !walletDisabled && !!onChangeWallet && (_jsx(LegalEntityWalletSection, { onChange: onChangeWallet, value: legalEntity.paymentRouting?.wallet || {}, currency: currency, status: status, walletvalidation: walletvalidation })), !bankDisabled && !!onChangeBank && (_jsx(LegalEntityBankSection, { onChange: onChangeBank, currency: currency, value: legalEntity.paymentRouting?.bank || {}, countryvalidation: bankCountryValidation, ibanvalidation: ibanvalidation, bicvalidation: bicvalidation, routingNumbervalidation: routingNumbervalidation, banknamevalidation: banknamevalidation }))] }));
63
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"requestFinance.d.ts","sourceRoot":"","sources":["../../../editors/invoice/requestFinance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgRjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"requestFinance.d.ts","sourceRoot":"","sources":["../../../editors/invoice/requestFinance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqRjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -3,8 +3,8 @@ import { useState } from "react";
3
3
  import { actions } from "../../document-models/invoice/index.js";
4
4
  import { generateId } from "document-model";
5
5
  let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
6
- if (!window.document.baseURI.includes('localhost')) {
7
- GRAPHQL_URL = 'https://switchboard.powerhouse.xyz/graphql/invoice';
6
+ if (!window.document.baseURI.includes("localhost")) {
7
+ GRAPHQL_URL = "https://switchboard-dev.powerhouse.xyz/graphql/invoice";
8
8
  }
9
9
  const RequestFinance = ({ docState, dispatch, }) => {
10
10
  const [isLoading, setIsLoading] = useState(false);
@@ -62,7 +62,7 @@ const RequestFinance = ({ docState, dispatch, }) => {
62
62
  setError(null);
63
63
  setInvoiceLink(null);
64
64
  setDirectPaymentStatus(null);
65
- const bankDetails = {
65
+ let bankDetails = {
66
66
  currency: docState.currency,
67
67
  accountNumber: docState.issuer.paymentRouting.bank.accountNum,
68
68
  country: docState.issuer.paymentRouting.bank.address.country.toUpperCase(),
@@ -71,8 +71,13 @@ const RequestFinance = ({ docState, dispatch, }) => {
71
71
  "Liberuum",
72
72
  lastName: docState.issuer.paymentRouting.bank.beneficiary.split(" ")[1] ||
73
73
  "Liberty",
74
- bicSwift: docState.issuer.paymentRouting.bank.BIC,
74
+ bicSwift: docState.issuer.paymentRouting.bank.BIC ||
75
+ docState.issuer.paymentRouting.bank.SWIFT,
75
76
  };
77
+ if (docState.issuer.paymentRouting.bank.ABA &&
78
+ docState.issuer.paymentRouting.bank.ABA.trim() !== "") {
79
+ bankDetails.achRoutingNumber = docState.issuer.paymentRouting.bank.ABA;
80
+ }
76
81
  const getDecimalPlaces = (currency) => {
77
82
  const formatter = new Intl.NumberFormat("en-US", {
78
83
  style: "currency",
@@ -134,13 +139,7 @@ const RequestFinance = ({ docState, dispatch, }) => {
134
139
  currency: bankDetails.currency,
135
140
  paymentInformation: {
136
141
  bankAccountDetails: {
137
- accountNumber: bankDetails.accountNumber, // the IBAN
138
- country: bankDetails.country,
139
- currency: bankDetails.currency,
140
- bankName: bankDetails.bankName,
141
- firstName: bankDetails.firstName,
142
- lastName: bankDetails.lastName,
143
- bicSwift: bankDetails.bicSwift,
142
+ ...bankDetails,
144
143
  },
145
144
  },
146
145
  },
@@ -7,7 +7,7 @@
7
7
  */
8
8
  let GRAPHQL_URL = 'http://localhost:4001/graphql/invoice';
9
9
  if (!window.document.baseURI.includes('localhost')) {
10
- GRAPHQL_URL = 'https://switchboard.powerhouse.xyz/graphql/invoice';
10
+ GRAPHQL_URL = 'https://switchboard-dev.powerhouse.xyz/graphql/invoice';
11
11
  }
12
12
  export async function uploadPdfChunked(pdfData, endpoint = GRAPHQL_URL, chunkSize = 500 * 1024, // 500KB chunks
13
13
  onProgress) {
@@ -1,4 +1,4 @@
1
1
  import { ValidationResult } from "./validationManager.js";
2
- declare const validateStatusBeforeContinue: (newStatus: string, state: any, setInvoiceValidation: (validation: ValidationResult) => void, setWalletValidation: (validation: ValidationResult) => void, setCurrencyValidation: (validation: ValidationResult) => void, setMainCountryValidation: (validation: ValidationResult) => void, setBankCountryValidation: (validation: ValidationResult) => void, setIbanValidation: (validation: ValidationResult) => void, setBicValidation: (validation: ValidationResult) => void, setBankNameValidation: (validation: ValidationResult) => void, setStreetAddressValidation: (validation: ValidationResult) => void, setCityValidation: (validation: ValidationResult) => void, setPostalCodeValidation: (validation: ValidationResult) => void, setPayerEmailValidation: (validation: ValidationResult) => void, setLineItemValidation: (validation: ValidationResult) => void, isFiatCurrency: (currency: string) => boolean) => boolean | undefined;
2
+ declare const validateStatusBeforeContinue: (newStatus: string, state: any, setInvoiceValidation: (validation: ValidationResult) => void, setWalletValidation: (validation: ValidationResult) => void, setCurrencyValidation: (validation: ValidationResult) => void, setMainCountryValidation: (validation: ValidationResult) => void, setBankCountryValidation: (validation: ValidationResult) => void, setIbanValidation: (validation: ValidationResult) => void, setBicValidation: (validation: ValidationResult) => void, setBankNameValidation: (validation: ValidationResult) => void, setStreetAddressValidation: (validation: ValidationResult) => void, setCityValidation: (validation: ValidationResult) => void, setPostalCodeValidation: (validation: ValidationResult) => void, setPayerEmailValidation: (validation: ValidationResult) => void, setLineItemValidation: (validation: ValidationResult) => void, setRoutingNumberValidation: (validation: ValidationResult) => void, isFiatCurrency: (currency: string) => boolean) => boolean | undefined;
3
3
  export default validateStatusBeforeContinue;
4
4
  //# sourceMappingURL=validationHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validationHandler.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,wBAAwB,CAAC;AAG5F,QAAA,MAAM,4BAA4B,GAC9B,WAAW,MAAM,EACjB,OAAO,GAAG,EACV,sBAAsB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC5D,qBAAqB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC3D,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,0BAA0B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAChE,0BAA0B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAChE,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACzD,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACxD,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,4BAA4B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAClE,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACzD,yBAAyB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC/D,yBAAyB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC/D,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,gBAAgB,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,wBAwLhD,CAAA;AAED,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"validationHandler.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,wBAAwB,CAAC;AAG5F,QAAA,MAAM,4BAA4B,GAC9B,WAAW,MAAM,EACjB,OAAO,GAAG,EACV,sBAAsB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC5D,qBAAqB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC3D,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,0BAA0B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAChE,0BAA0B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAChE,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACzD,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACxD,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,4BAA4B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAClE,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EACzD,yBAAyB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC/D,yBAAyB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC/D,uBAAuB,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAC7D,4BAA4B,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,EAClE,gBAAgB,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,wBAmMhD,CAAA;AAED,eAAe,4BAA4B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { validateField } from "./validationManager.js";
2
2
  import { toast } from "@powerhousedao/design-system";
3
- const validateStatusBeforeContinue = (newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, isFiatCurrency) => {
3
+ const validateStatusBeforeContinue = (newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, setRoutingNumberValidation, isFiatCurrency) => {
4
4
  if (newStatus === "PAYMENTSCHEDULED" || newStatus === "ISSUED") {
5
5
  const context = {
6
6
  currency: state.currency,
@@ -49,12 +49,18 @@ const validateStatusBeforeContinue = (newStatus, state, setInvoiceValidation, se
49
49
  if (ibanValidation && !ibanValidation.isValid) {
50
50
  validationErrors.push(ibanValidation);
51
51
  }
52
- // Validate BIC number
53
- const bicValidation = validateField("bicNumber", state.issuer.paymentRouting?.bank?.BIC, context);
52
+ // Validate BIC/SWIFT number
53
+ const bicValidation = validateField("bicNumber", state.issuer.paymentRouting?.bank?.BIC || state.issuer.paymentRouting?.bank?.SWIFT, context);
54
54
  setBicValidation(bicValidation);
55
55
  if (bicValidation && !bicValidation.isValid) {
56
56
  validationErrors.push(bicValidation);
57
57
  }
58
+ // Validate routing number
59
+ const routingNumberValidation = validateField("routingNumber", state.issuer.paymentRouting?.bank?.ABA, context);
60
+ setRoutingNumberValidation(routingNumberValidation);
61
+ if (routingNumberValidation && !routingNumberValidation.isValid) {
62
+ validationErrors.push(routingNumberValidation);
63
+ }
58
64
  // Validate bank name
59
65
  const bankNameValidation = validateField("bankName", state.issuer.paymentRouting?.bank?.name, context);
60
66
  setBankNameValidation(bankNameValidation);
@@ -1 +1 @@
1
- {"version":3,"file":"validationManager.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,gBAAgB,CAAC;IAC1D,SAAS,EAAE;QACP,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAClC,iBAAiB,EAAE;YACf,IAAI,EAAE,MAAM,EAAE,CAAC;YACf,EAAE,EAAE,MAAM,EAAE,CAAC;SAChB,CAAC;KACL,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AA+BF,wBAAgB,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,iBAAiB,GAC3B,gBAAgB,GAAG,IAAI,CAqBzB;AAGD,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,EAAE,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAalC;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAE5D;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAKxD"}
1
+ {"version":3,"file":"validationManager.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,gBAAgB,CAAC;IAC1D,SAAS,EAAE;QACP,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAClC,iBAAiB,EAAE;YACf,IAAI,EAAE,MAAM,EAAE,CAAC;YACf,EAAE,EAAE,MAAM,EAAE,CAAC;SAChB,CAAC;KACL,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAgCF,wBAAgB,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,iBAAiB,GAC3B,gBAAgB,GAAG,IAAI,CAqBzB;AAGD,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,OAAO,EAAE,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAalC;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAE5D;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAKxD"}
@@ -1,4 +1,4 @@
1
- import { accountNumberRule, bicNumberRule, bankNameRule, currencyRule, ethereumAddressRule, invoiceNumberRule, issuerPostalCodeRule, issuerStreetAddressRule, issuerCityRule, payerEmailRule, lineItemRule, mainCountryRule, bankCountryRule } from "./validationRules.js";
1
+ import { accountNumberRule, bicNumberRule, bankNameRule, currencyRule, ethereumAddressRule, invoiceNumberRule, issuerPostalCodeRule, issuerStreetAddressRule, issuerCityRule, payerEmailRule, lineItemRule, mainCountryRule, bankCountryRule, routingNumberRule } from "./validationRules.js";
2
2
  // Validation rules registry
3
3
  const validationRules = [];
4
4
  // Register rules
@@ -15,6 +15,7 @@ validationRules.push(issuerCityRule);
15
15
  validationRules.push(issuerPostalCodeRule);
16
16
  validationRules.push(payerEmailRule);
17
17
  validationRules.push(lineItemRule);
18
+ validationRules.push(routingNumberRule);
18
19
  // Helper to check if a rule applies to the current context
19
20
  function ruleAppliesToContext(rule, context) {
20
21
  const { currencies, statusTransitions } = rule.appliesTo;
@@ -12,4 +12,5 @@ export declare const issuerCityRule: ValidationRule;
12
12
  export declare const issuerPostalCodeRule: ValidationRule;
13
13
  export declare const payerEmailRule: ValidationRule;
14
14
  export declare const lineItemRule: ValidationRule;
15
+ export declare const routingNumberRule: ValidationRule;
15
16
  //# sourceMappingURL=validationRules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA8BxD,eAAO,MAAM,iBAAiB,EAAE,cAuB/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,cA8BjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cA8B/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAkC3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAuBrC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAuB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,cAuBlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cA8B5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC"}
1
+ {"version":3,"file":"validationRules.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/validation/validationRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA8BxD,eAAO,MAAM,iBAAiB,EAAE,cAuB/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,cA8BjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAuB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cA8B/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAkC3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAuBrC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAuB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,cAuBlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cA8B5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAuB1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAqC/B,CAAC"}
@@ -185,7 +185,7 @@ export const bicNumberRule = {
185
185
  if (!value || value.trim() === '') {
186
186
  return {
187
187
  isValid: false,
188
- message: 'BIC number is required',
188
+ message: 'BIC/SWIFT number is required',
189
189
  severity: 'warning'
190
190
  };
191
191
  }
@@ -194,7 +194,7 @@ export const bicNumberRule = {
194
194
  if (!bicRegex.test(value)) {
195
195
  return {
196
196
  isValid: false,
197
- message: 'Invalid BIC number format',
197
+ message: 'Invalid BIC/SWIFT number format',
198
198
  severity: 'warning'
199
199
  };
200
200
  }
@@ -206,7 +206,7 @@ export const bicNumberRule = {
206
206
  };
207
207
  },
208
208
  appliesTo: {
209
- currencies: ['EUR', 'GBP'],
209
+ currencies: ['EUR', 'GBP', 'USD'],
210
210
  statusTransitions: {
211
211
  from: ['DRAFT'],
212
212
  to: ['ISSUED']
@@ -364,3 +364,41 @@ export const lineItemRule = {
364
364
  }
365
365
  }
366
366
  };
367
+ export const routingNumberRule = {
368
+ field: 'routingNumber',
369
+ validate: (value) => {
370
+ if (!value || value.trim() === '') {
371
+ return {
372
+ isValid: false,
373
+ message: 'Routing number is required',
374
+ severity: 'warning'
375
+ };
376
+ }
377
+ if (value.length !== 9) {
378
+ return {
379
+ isValid: false,
380
+ message: 'Routing number must be 9 digits',
381
+ severity: 'warning'
382
+ };
383
+ }
384
+ if (!/^[0-9]+$/.test(value)) {
385
+ return {
386
+ isValid: false,
387
+ message: 'Routing number must contain only digits',
388
+ severity: 'warning'
389
+ };
390
+ }
391
+ return {
392
+ isValid: true,
393
+ message: '',
394
+ severity: 'none'
395
+ };
396
+ },
397
+ appliesTo: {
398
+ currencies: ['USD'],
399
+ statusTransitions: {
400
+ from: ['DRAFT'],
401
+ to: ['ISSUED']
402
+ }
403
+ }
404
+ };
@@ -4,7 +4,7 @@ import { OperationType } from '@safe-global/types-kit';
4
4
  import { ethers, AbiCoder } from 'ethers';
5
5
  import dotenv from 'dotenv';
6
6
  dotenv.config();
7
- const safeAddress = process.env.PRODUCTION_SAFE_ADDRESS;
7
+ const safeAddress = process.env.DEV_STAGING_SAFE_ADDRESS;
8
8
  if (!safeAddress) {
9
9
  throw new Error('Missing SAFE_ADDRESS in .env');
10
10
  }
package/dist/style.css CHANGED
@@ -5978,6 +5978,9 @@ input[type="number"] {
5978
5978
  .relative {
5979
5979
  position: relative;
5980
5980
  }
5981
+ .static {
5982
+ position: static;
5983
+ }
5981
5984
  .inset-0 {
5982
5985
  inset: calc(var(--spacing) * 0);
5983
5986
  }
@@ -6294,6 +6297,9 @@ input[type="number"] {
6294
6297
  .h-\[20px\] {
6295
6298
  height: 20px;
6296
6299
  }
6300
+ .h-\[25px\] {
6301
+ height: 25px;
6302
+ }
6297
6303
  .h-\[28px\] {
6298
6304
  height: 28px;
6299
6305
  }
@@ -6315,6 +6321,12 @@ input[type="number"] {
6315
6321
  .h-\[148px\] {
6316
6322
  height: 148px;
6317
6323
  }
6324
+ .h-\[652px\] {
6325
+ height: 652px;
6326
+ }
6327
+ .h-auto {
6328
+ height: auto;
6329
+ }
6318
6330
  .h-full {
6319
6331
  height: 100%;
6320
6332
  }
@@ -6336,6 +6348,9 @@ input[type="number"] {
6336
6348
  .max-h-screen {
6337
6349
  max-height: 100vh;
6338
6350
  }
6351
+ .min-h-0 {
6352
+ min-height: calc(var(--spacing) * 0);
6353
+ }
6339
6354
  .min-h-9 {
6340
6355
  min-height: calc(var(--spacing) * 9);
6341
6356
  }
@@ -6435,12 +6450,21 @@ input[type="number"] {
6435
6450
  .w-\[247px\] {
6436
6451
  width: 247px;
6437
6452
  }
6453
+ .w-\[272px\] {
6454
+ width: 272px;
6455
+ }
6438
6456
  .w-\[275px\] {
6439
6457
  width: 275px;
6440
6458
  }
6459
+ .w-\[375px\] {
6460
+ width: 375px;
6461
+ }
6441
6462
  .w-\[400px\] {
6442
6463
  width: 400px;
6443
6464
  }
6465
+ .w-\[500px\] {
6466
+ width: 500px;
6467
+ }
6444
6468
  .w-\[700px\] {
6445
6469
  width: 700px;
6446
6470
  }
@@ -6462,6 +6486,12 @@ input[type="number"] {
6462
6486
  .max-w-\[40px\] {
6463
6487
  max-width: 40px;
6464
6488
  }
6489
+ .max-w-\[296px\] {
6490
+ max-width: 296px;
6491
+ }
6492
+ .max-w-\[375px\] {
6493
+ max-width: 375px;
6494
+ }
6465
6495
  .max-w-\[calc\(100\%-2rem\)\] {
6466
6496
  max-width: calc(100% - 2rem);
6467
6497
  }
@@ -6471,6 +6501,9 @@ input[type="number"] {
6471
6501
  .max-w-md {
6472
6502
  max-width: var(--container-md);
6473
6503
  }
6504
+ .max-w-none {
6505
+ max-width: none;
6506
+ }
6474
6507
  .min-w-0 {
6475
6508
  min-width: calc(var(--spacing) * 0);
6476
6509
  }
@@ -6631,6 +6664,9 @@ input[type="number"] {
6631
6664
  .gap-6 {
6632
6665
  gap: calc(var(--spacing) * 6);
6633
6666
  }
6667
+ .gap-8 {
6668
+ gap: calc(var(--spacing) * 8);
6669
+ }
6634
6670
  .gap-32 {
6635
6671
  gap: calc(var(--spacing) * 32);
6636
6672
  }
@@ -6665,6 +6701,9 @@ input[type="number"] {
6665
6701
  text-overflow: ellipsis;
6666
6702
  white-space: nowrap;
6667
6703
  }
6704
+ .overflow-auto {
6705
+ overflow: auto;
6706
+ }
6668
6707
  .overflow-hidden {
6669
6708
  overflow: hidden;
6670
6709
  }
@@ -6686,6 +6725,9 @@ input[type="number"] {
6686
6725
  .rounded-\[6px\] {
6687
6726
  border-radius: 6px;
6688
6727
  }
6728
+ .rounded-\[100px\] {
6729
+ border-radius: 100px;
6730
+ }
6689
6731
  .rounded-full {
6690
6732
  border-radius: calc(infinity * 1px);
6691
6733
  }
@@ -6963,6 +7005,9 @@ input[type="number"] {
6963
7005
  .bg-yellow-300 {
6964
7006
  background-color: var(--color-yellow-300);
6965
7007
  }
7008
+ .object-contain {
7009
+ object-fit: contain;
7010
+ }
6966
7011
  .p-0 {
6967
7012
  padding: calc(var(--spacing) * 0);
6968
7013
  }
@@ -7188,6 +7233,10 @@ input[type="number"] {
7188
7233
  --tw-leading: calc(var(--spacing) * 5);
7189
7234
  line-height: calc(var(--spacing) * 5);
7190
7235
  }
7236
+ .leading-6 {
7237
+ --tw-leading: calc(var(--spacing) * 6);
7238
+ line-height: calc(var(--spacing) * 6);
7239
+ }
7191
7240
  .leading-\[14px\] {
7192
7241
  --tw-leading: 14px;
7193
7242
  line-height: 14px;
@@ -7231,6 +7280,9 @@ input[type="number"] {
7231
7280
  .whitespace-nowrap {
7232
7281
  white-space: nowrap;
7233
7282
  }
7283
+ .whitespace-pre-line {
7284
+ white-space: pre-line;
7285
+ }
7234
7286
  .\!text-foreground {
7235
7287
  color: var(--color-foreground) !important;
7236
7288
  }
@@ -7363,6 +7415,9 @@ input[type="number"] {
7363
7415
  .uppercase {
7364
7416
  text-transform: uppercase;
7365
7417
  }
7418
+ .underline {
7419
+ text-decoration-line: underline;
7420
+ }
7366
7421
  .underline-offset-4 {
7367
7422
  text-underline-offset: 4px;
7368
7423
  }
@@ -7389,6 +7444,10 @@ input[type="number"] {
7389
7444
  --tw-shadow: 0px 2px 12px 0px var(--tw-shadow-color, rgba(37,42,52,0.10));
7390
7445
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
7391
7446
  }
7447
+ .shadow-\[1px_4px_15px_0px_rgba\(74\,88\,15\,0\.25\)\] {
7448
+ --tw-shadow: 1px 4px 15px 0px var(--tw-shadow-color, rgba(74,88,15,0.25));
7449
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
7450
+ }
7392
7451
  .shadow-\[1px_4px_15px_0px_rgba\(74\,88\,115\,0\.25\)\] {
7393
7452
  --tw-shadow: 1px 4px 15px 0px var(--tw-shadow-color, rgba(74,88,115,0.25));
7394
7453
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -7405,6 +7464,10 @@ input[type="number"] {
7405
7464
  --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
7406
7465
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
7407
7466
  }
7467
+ .shadow-none {
7468
+ --tw-shadow: 0 0 #0000;
7469
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
7470
+ }
7408
7471
  .shadow-sm {
7409
7472
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
7410
7473
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -8083,6 +8146,13 @@ input[type="number"] {
8083
8146
  }
8084
8147
  }
8085
8148
  }
8149
+ .hover\:text-blue-800 {
8150
+ &:hover {
8151
+ @media (hover: hover) {
8152
+ color: var(--color-blue-800);
8153
+ }
8154
+ }
8155
+ }
8086
8156
  .hover\:text-blue-900 {
8087
8157
  &:hover {
8088
8158
  @media (hover: hover) {
@@ -11138,6 +11208,21 @@ input[type="number"] {
11138
11208
  transition-duration: 300ms;
11139
11209
  }
11140
11210
  }
11211
+ .\[\&\:\:-moz-progress-bar\]\:bg-gray-500 {
11212
+ &::-moz-progress-bar {
11213
+ background-color: var(--color-gray-500);
11214
+ }
11215
+ }
11216
+ .\[\&\:\:-webkit-progress-bar\]\:bg-gray-300 {
11217
+ &::-webkit-progress-bar {
11218
+ background-color: var(--color-gray-300);
11219
+ }
11220
+ }
11221
+ .\[\&\:\:-webkit-progress-value\]\:bg-gray-500 {
11222
+ &::-webkit-progress-value {
11223
+ background-color: var(--color-gray-500);
11224
+ }
11225
+ }
11141
11226
  .\[\&\:\:-webkit-scrollbar\]\:\!hidden {
11142
11227
  &::-webkit-scrollbar {
11143
11228
  display: none !important;
@@ -12156,6 +12241,9 @@ input[type="number"] {
12156
12241
  .relative {
12157
12242
  position: relative;
12158
12243
  }
12244
+ .static {
12245
+ position: static;
12246
+ }
12159
12247
  .inset-0 {
12160
12248
  inset: calc(var(--spacing) * 0);
12161
12249
  }
@@ -12472,6 +12560,9 @@ input[type="number"] {
12472
12560
  .h-\[20px\] {
12473
12561
  height: 20px;
12474
12562
  }
12563
+ .h-\[25px\] {
12564
+ height: 25px;
12565
+ }
12475
12566
  .h-\[28px\] {
12476
12567
  height: 28px;
12477
12568
  }
@@ -12493,6 +12584,12 @@ input[type="number"] {
12493
12584
  .h-\[148px\] {
12494
12585
  height: 148px;
12495
12586
  }
12587
+ .h-\[652px\] {
12588
+ height: 652px;
12589
+ }
12590
+ .h-auto {
12591
+ height: auto;
12592
+ }
12496
12593
  .h-full {
12497
12594
  height: 100%;
12498
12595
  }
@@ -12514,6 +12611,9 @@ input[type="number"] {
12514
12611
  .max-h-screen {
12515
12612
  max-height: 100vh;
12516
12613
  }
12614
+ .min-h-0 {
12615
+ min-height: calc(var(--spacing) * 0);
12616
+ }
12517
12617
  .min-h-9 {
12518
12618
  min-height: calc(var(--spacing) * 9);
12519
12619
  }
@@ -12613,12 +12713,21 @@ input[type="number"] {
12613
12713
  .w-\[247px\] {
12614
12714
  width: 247px;
12615
12715
  }
12716
+ .w-\[272px\] {
12717
+ width: 272px;
12718
+ }
12616
12719
  .w-\[275px\] {
12617
12720
  width: 275px;
12618
12721
  }
12722
+ .w-\[375px\] {
12723
+ width: 375px;
12724
+ }
12619
12725
  .w-\[400px\] {
12620
12726
  width: 400px;
12621
12727
  }
12728
+ .w-\[500px\] {
12729
+ width: 500px;
12730
+ }
12622
12731
  .w-\[700px\] {
12623
12732
  width: 700px;
12624
12733
  }
@@ -12640,6 +12749,12 @@ input[type="number"] {
12640
12749
  .max-w-\[40px\] {
12641
12750
  max-width: 40px;
12642
12751
  }
12752
+ .max-w-\[296px\] {
12753
+ max-width: 296px;
12754
+ }
12755
+ .max-w-\[375px\] {
12756
+ max-width: 375px;
12757
+ }
12643
12758
  .max-w-\[calc\(100\%-2rem\)\] {
12644
12759
  max-width: calc(100% - 2rem);
12645
12760
  }
@@ -12649,6 +12764,9 @@ input[type="number"] {
12649
12764
  .max-w-md {
12650
12765
  max-width: var(--container-md);
12651
12766
  }
12767
+ .max-w-none {
12768
+ max-width: none;
12769
+ }
12652
12770
  .min-w-0 {
12653
12771
  min-width: calc(var(--spacing) * 0);
12654
12772
  }
@@ -12809,6 +12927,9 @@ input[type="number"] {
12809
12927
  .gap-6 {
12810
12928
  gap: calc(var(--spacing) * 6);
12811
12929
  }
12930
+ .gap-8 {
12931
+ gap: calc(var(--spacing) * 8);
12932
+ }
12812
12933
  .gap-32 {
12813
12934
  gap: calc(var(--spacing) * 32);
12814
12935
  }
@@ -12843,6 +12964,9 @@ input[type="number"] {
12843
12964
  text-overflow: ellipsis;
12844
12965
  white-space: nowrap;
12845
12966
  }
12967
+ .overflow-auto {
12968
+ overflow: auto;
12969
+ }
12846
12970
  .overflow-hidden {
12847
12971
  overflow: hidden;
12848
12972
  }
@@ -12864,6 +12988,9 @@ input[type="number"] {
12864
12988
  .rounded-\[6px\] {
12865
12989
  border-radius: 6px;
12866
12990
  }
12991
+ .rounded-\[100px\] {
12992
+ border-radius: 100px;
12993
+ }
12867
12994
  .rounded-full {
12868
12995
  border-radius: calc(infinity * 1px);
12869
12996
  }
@@ -13141,6 +13268,9 @@ input[type="number"] {
13141
13268
  .bg-yellow-300 {
13142
13269
  background-color: var(--color-yellow-300);
13143
13270
  }
13271
+ .object-contain {
13272
+ object-fit: contain;
13273
+ }
13144
13274
  .p-0 {
13145
13275
  padding: calc(var(--spacing) * 0);
13146
13276
  }
@@ -13366,6 +13496,10 @@ input[type="number"] {
13366
13496
  --tw-leading: calc(var(--spacing) * 5);
13367
13497
  line-height: calc(var(--spacing) * 5);
13368
13498
  }
13499
+ .leading-6 {
13500
+ --tw-leading: calc(var(--spacing) * 6);
13501
+ line-height: calc(var(--spacing) * 6);
13502
+ }
13369
13503
  .leading-\[14px\] {
13370
13504
  --tw-leading: 14px;
13371
13505
  line-height: 14px;
@@ -13409,6 +13543,9 @@ input[type="number"] {
13409
13543
  .whitespace-nowrap {
13410
13544
  white-space: nowrap;
13411
13545
  }
13546
+ .whitespace-pre-line {
13547
+ white-space: pre-line;
13548
+ }
13412
13549
  .\!text-foreground {
13413
13550
  color: var(--color-foreground) !important;
13414
13551
  }
@@ -13541,6 +13678,9 @@ input[type="number"] {
13541
13678
  .uppercase {
13542
13679
  text-transform: uppercase;
13543
13680
  }
13681
+ .underline {
13682
+ text-decoration-line: underline;
13683
+ }
13544
13684
  .underline-offset-4 {
13545
13685
  text-underline-offset: 4px;
13546
13686
  }
@@ -13567,6 +13707,10 @@ input[type="number"] {
13567
13707
  --tw-shadow: 0px 2px 12px 0px var(--tw-shadow-color, rgba(37,42,52,0.10));
13568
13708
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
13569
13709
  }
13710
+ .shadow-\[1px_4px_15px_0px_rgba\(74\,88\,15\,0\.25\)\] {
13711
+ --tw-shadow: 1px 4px 15px 0px var(--tw-shadow-color, rgba(74,88,15,0.25));
13712
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
13713
+ }
13570
13714
  .shadow-\[1px_4px_15px_0px_rgba\(74\,88\,115\,0\.25\)\] {
13571
13715
  --tw-shadow: 1px 4px 15px 0px var(--tw-shadow-color, rgba(74,88,115,0.25));
13572
13716
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -13583,6 +13727,10 @@ input[type="number"] {
13583
13727
  --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
13584
13728
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
13585
13729
  }
13730
+ .shadow-none {
13731
+ --tw-shadow: 0 0 #0000;
13732
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
13733
+ }
13586
13734
  .shadow-sm {
13587
13735
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
13588
13736
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -14261,6 +14409,13 @@ input[type="number"] {
14261
14409
  }
14262
14410
  }
14263
14411
  }
14412
+ .hover\:text-blue-800 {
14413
+ &:hover {
14414
+ @media (hover: hover) {
14415
+ color: var(--color-blue-800);
14416
+ }
14417
+ }
14418
+ }
14264
14419
  .hover\:text-blue-900 {
14265
14420
  &:hover {
14266
14421
  @media (hover: hover) {
@@ -17316,6 +17471,21 @@ input[type="number"] {
17316
17471
  transition-duration: 300ms;
17317
17472
  }
17318
17473
  }
17474
+ .\[\&\:\:-moz-progress-bar\]\:bg-gray-500 {
17475
+ &::-moz-progress-bar {
17476
+ background-color: var(--color-gray-500);
17477
+ }
17478
+ }
17479
+ .\[\&\:\:-webkit-progress-bar\]\:bg-gray-300 {
17480
+ &::-webkit-progress-bar {
17481
+ background-color: var(--color-gray-300);
17482
+ }
17483
+ }
17484
+ .\[\&\:\:-webkit-progress-value\]\:bg-gray-500 {
17485
+ &::-webkit-progress-value {
17486
+ background-color: var(--color-gray-500);
17487
+ }
17488
+ }
17319
17489
  .\[\&\:\:-webkit-scrollbar\]\:\!hidden {
17320
17490
  &::-webkit-scrollbar {
17321
17491
  display: none !important;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/contributor-billing",
3
3
  "description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
4
- "version": "0.0.71",
4
+ "version": "0.0.73",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -60,7 +60,7 @@
60
60
  "@powerhousedao/builder-tools": "^4.0.5",
61
61
  "@powerhousedao/common": "^4.0.5",
62
62
  "@powerhousedao/design-system": "^4.0.5",
63
- "@powerhousedao/document-engineering": "^1.27.0",
63
+ "@powerhousedao/document-engineering": "^1.30.0",
64
64
  "@react-pdf/renderer": "^4.3.0",
65
65
  "@safe-global/api-kit": "^3.0.1",
66
66
  "@safe-global/protocol-kit": "^6.0.3",