@powerhousedao/contributor-billing 0.0.98 → 0.1.0
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/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/general.js +8 -26
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.js +19 -29
- package/dist/document-models/billing-statement/src/reducers/tags.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/tags.js +20 -25
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +29 -44
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +31 -56
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/items.js +63 -88
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/parties.js +199 -229
- package/dist/editors/billing-statement/components/lineItemsTable.d.ts +3 -2
- package/dist/editors/billing-statement/components/lineItemsTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/components/lineItemsTable.js +12 -8
- package/dist/editors/billing-statement/components/objectSetTable.d.ts +3 -2
- package/dist/editors/billing-statement/components/objectSetTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/editor.d.ts +3 -1
- package/dist/editors/billing-statement/editor.d.ts.map +1 -1
- package/dist/editors/billing-statement/editor.js +2 -2
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts +2 -2
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +8 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +18 -64
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +2 -8
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +21 -7
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +8 -10
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +27 -24
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts +6 -8
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.js +8 -17
- package/dist/editors/contributor-billing/editor.d.ts +1 -10
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
- package/dist/editors/contributor-billing/editor.js +2 -23
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts +2 -1
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts.map +1 -1
- package/dist/editors/contributor-billing/index.js +1 -1
- package/dist/editors/hooks/useBillingStatementDocument.d.ts +4 -0
- package/dist/editors/hooks/useBillingStatementDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useBillingStatementDocument.js +8 -0
- package/dist/editors/hooks/useIntegrationsDocument.d.ts +4 -0
- package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useIntegrationsDocument.js +8 -0
- package/dist/editors/hooks/useInvoiceDocument.d.ts +4 -0
- package/dist/editors/hooks/useInvoiceDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useInvoiceDocument.js +8 -0
- package/dist/editors/integrations/editor.d.ts +4 -1
- package/dist/editors/integrations/editor.d.ts.map +1 -1
- package/dist/editors/integrations/editor.js +7 -12
- package/dist/editors/invoice/components/lineItemCard.d.ts +21 -0
- package/dist/editors/invoice/components/lineItemCard.d.ts.map +1 -0
- package/dist/editors/invoice/components/lineItemCard.js +23 -0
- package/dist/editors/invoice/components/lineItemMobileModal.d.ts +33 -0
- package/dist/editors/invoice/components/lineItemMobileModal.d.ts.map +1 -0
- package/dist/editors/invoice/components/lineItemMobileModal.js +73 -0
- package/dist/editors/invoice/components/lineItemsEmptyState.d.ts +6 -0
- package/dist/editors/invoice/components/lineItemsEmptyState.d.ts.map +1 -0
- package/dist/editors/invoice/components/lineItemsEmptyState.js +5 -0
- package/dist/editors/invoice/editor.d.ts +4 -1
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +41 -22
- package/dist/editors/invoice/ingestPDF.js +1 -1
- package/dist/editors/invoice/invoiceToGnosis.d.ts +3 -2
- package/dist/editors/invoice/invoiceToGnosis.d.ts.map +1 -1
- package/dist/editors/invoice/invoiceToGnosis.js +11 -11
- package/dist/editors/invoice/legalEntity/bankSection.d.ts +1 -0
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/bankSection.js +36 -12
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts +2 -1
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.js +2 -2
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +25 -3
- package/dist/editors/invoice/lineItemTags/tagCard.d.ts +15 -0
- package/dist/editors/invoice/lineItemTags/tagCard.d.ts.map +1 -0
- package/dist/editors/invoice/lineItemTags/tagCard.js +13 -0
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts +18 -0
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -0
- package/dist/editors/invoice/lineItemTags/tagMobileModal.js +71 -0
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/lineItems.js +76 -38
- package/dist/editors/invoice/requestFinance.js +2 -2
- package/dist/editors/invoice/uploadPdfChunked.js +1 -1
- package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
- package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationHandler.js +25 -9
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +3 -2
- package/dist/editors/invoice/validation/validationRules.d.ts +2 -0
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationRules.js +37 -7
- package/dist/scripts/contributor-billing/createExpenseReportCsv.d.ts +5 -0
- package/dist/scripts/contributor-billing/createExpenseReportCsv.d.ts.map +1 -0
- package/dist/scripts/contributor-billing/createExpenseReportCsv.js +122 -0
- package/dist/style.css +180 -12
- package/dist/tailwind.config.js +1 -0
- package/package.json +13 -12
- package/dist/reducers/general.d.ts +0 -8
- package/dist/reducers/general.d.ts.map +0 -1
- package/dist/reducers/general.js +0 -73
- package/dist/reducers/items.d.ts +0 -8
- package/dist/reducers/items.d.ts.map +0 -1
- package/dist/reducers/items.js +0 -195
- package/dist/reducers/parties.d.ts +0 -8
- package/dist/reducers/parties.d.ts.map +0 -1
- package/dist/reducers/parties.js +0 -266
- package/dist/reducers/transitions.d.ts +0 -8
- package/dist/reducers/transitions.d.ts.map +0 -1
- package/dist/reducers/transitions.js +0 -162
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WagmiContext } from "@powerhousedao/design-system";
|
|
3
|
-
import { AnalyticsProvider, useAppConfig, } from "@powerhousedao/reactor-browser";
|
|
1
|
+
import { withDropZone } from "@powerhousedao/design-system";
|
|
4
2
|
import { DriveExplorer } from "./components/DriveExplorer.js";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Base editor component that renders the drive explorer interface.
|
|
8
|
-
* Customize document opening behavior and drive-level actions here.
|
|
9
|
-
*/
|
|
10
|
-
export function BaseEditor(props) {
|
|
11
|
-
return (_jsx("div", { className: "new-drive-explorer", style: { height: "100%" }, children: _jsx(DriveExplorer, { ...props }) }));
|
|
12
|
-
}
|
|
13
|
-
// Wrap base editor with drop zone functionality
|
|
14
|
-
const BaseEditorWithDropZone = withDropZone(BaseEditor);
|
|
15
|
-
/**
|
|
16
|
-
* Main editor entry point with required providers.
|
|
17
|
-
*/
|
|
18
|
-
export default function Editor(props) {
|
|
19
|
-
const appConfig = useAppConfig();
|
|
20
|
-
const analyticsDatabaseName = appConfig?.analyticsDatabaseName;
|
|
21
|
-
return (
|
|
22
|
-
// Required context providers for drive functionality
|
|
23
|
-
_jsx(WagmiContext, { children: _jsx(AnalyticsProvider, { databaseName: analyticsDatabaseName, children: _jsx(BaseEditorWithDropZone, { ...props }) }) }));
|
|
24
|
-
}
|
|
3
|
+
export const Editor = withDropZone(DriveExplorer);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Node } from "document-drive";
|
|
2
|
-
|
|
2
|
+
import type { UiFileNode, UiFolderNode } from "@powerhousedao/design-system";
|
|
3
|
+
export declare function useTransformedNodes(nodes: Node[], driveId: string): (UiFileNode | UiFolderNode)[];
|
|
3
4
|
//# sourceMappingURL=useTransformedNodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransformedNodes.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/hooks/useTransformedNodes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useTransformedNodes.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/hooks/useTransformedNodes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE7E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,iCA8BjE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BillingStatementAction, BillingStatementDocument } from "../../document-models/billing-statement/index.js";
|
|
2
|
+
export declare function useBillingStatementDocument(documentId: string | null | undefined): never[] | [BillingStatementDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<BillingStatementAction>];
|
|
3
|
+
export declare function useSelectedBillingStatementDocument(): never[] | [BillingStatementDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<BillingStatementAction>];
|
|
4
|
+
//# sourceMappingURL=useBillingStatementDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBillingStatementDocument.d.ts","sourceRoot":"","sources":["../../../editors/hooks/useBillingStatementDocument.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,kDAAkD,CAAC;AAE1D,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,2HAMtC;AAED,wBAAgB,mCAAmC,4HAGlD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useDocumentOfType, useSelectedDocumentId, } from "@powerhousedao/reactor-browser";
|
|
2
|
+
export function useBillingStatementDocument(documentId) {
|
|
3
|
+
return useDocumentOfType(documentId, "powerhouse/billing-statement");
|
|
4
|
+
}
|
|
5
|
+
export function useSelectedBillingStatementDocument() {
|
|
6
|
+
const selectedDocumentId = useSelectedDocumentId();
|
|
7
|
+
return useBillingStatementDocument(selectedDocumentId);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IntegrationsDocument } from "../../document-models/integrations/index.js";
|
|
2
|
+
export declare function useIntegrationsDocument(documentId: string | null | undefined): never[] | [IntegrationsDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<import("../../document-models/integrations/gen/actions.js").IntegrationsIntegrationsAction>];
|
|
3
|
+
export declare function useSelectedIntegrationsDocument(): never[] | [IntegrationsDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<import("../../document-models/integrations/gen/actions.js").IntegrationsIntegrationsAction>];
|
|
4
|
+
//# sourceMappingURL=useIntegrationsDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntegrationsDocument.d.ts","sourceRoot":"","sources":["../../../editors/hooks/useIntegrationsDocument.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,6CAA6C,CAAC;AAErD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,2LAK5E;AAED,wBAAgB,+BAA+B,4LAG9C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useDocumentOfType, useSelectedDocumentId, } from "@powerhousedao/reactor-browser";
|
|
2
|
+
export function useIntegrationsDocument(documentId) {
|
|
3
|
+
return useDocumentOfType(documentId, "powerhouse/integrations");
|
|
4
|
+
}
|
|
5
|
+
export function useSelectedIntegrationsDocument() {
|
|
6
|
+
const selectedDocumentId = useSelectedDocumentId();
|
|
7
|
+
return useIntegrationsDocument(selectedDocumentId);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InvoiceAction, InvoiceDocument } from "../../document-models/invoice/index.js";
|
|
2
|
+
export declare function useInvoiceDocument(documentId: string | null | undefined): never[] | [InvoiceDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<InvoiceAction>];
|
|
3
|
+
export declare function useSelectedInvoiceDocument(): never[] | [InvoiceDocument, import("@powerhousedao/reactor-browser").DocumentDispatch<InvoiceAction>];
|
|
4
|
+
//# sourceMappingURL=useInvoiceDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInvoiceDocument.d.ts","sourceRoot":"","sources":["../../../editors/hooks/useInvoiceDocument.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,wCAAwC,CAAC;AAEhD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,yGAKvE;AAED,wBAAgB,0BAA0B,0GAGzC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useDocumentOfType, useSelectedDocumentId, } from "@powerhousedao/reactor-browser";
|
|
2
|
+
export function useInvoiceDocument(documentId) {
|
|
3
|
+
return useDocumentOfType(documentId, "powerhouse/invoice");
|
|
4
|
+
}
|
|
5
|
+
export function useSelectedInvoiceDocument() {
|
|
6
|
+
const selectedDocumentId = useSelectedDocumentId();
|
|
7
|
+
return useInvoiceDocument(selectedDocumentId);
|
|
8
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { EditorProps } from "document-model";
|
|
2
|
+
export default function Editor(props: Partial<EditorProps> & {
|
|
3
|
+
documentId?: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
2
5
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/integrations/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/integrations/editor.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AASlD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,kDAoTnF"}
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { actions, } from "../../document-models/integrations/index.js";
|
|
3
3
|
import { Button } from "@powerhousedao/document-engineering";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { useSelectedIntegrationsDocument } from "../hooks/useIntegrationsDocument.js";
|
|
6
6
|
const TABS = [
|
|
7
7
|
{ key: "requestFinance", label: "Request Finance" },
|
|
8
8
|
{ key: "gnosisSafe", label: "Gnosis Safe" },
|
|
9
9
|
{ key: "googleCloud", label: "Google Cloud" },
|
|
10
10
|
];
|
|
11
11
|
export default function Editor(props) {
|
|
12
|
-
const [doc, dispatch] =
|
|
12
|
+
const [doc, dispatch] = useSelectedIntegrationsDocument();
|
|
13
13
|
const state = doc?.state.global;
|
|
14
14
|
if (!state) {
|
|
15
15
|
console.log("Document state not found from document id", props.documentId);
|
|
@@ -61,8 +61,7 @@ export default function Editor(props) {
|
|
|
61
61
|
: "border-transparent text-gray-500 bg-gray-100 hover:text-blue-500"}`, onClick: () => setActiveTab(tab.key), type: "button", children: tab.label }, tab.key))) }), _jsxs("div", { className: "bg-white rounded-xl shadow p-4 sm:p-6", children: [activeTab === "requestFinance" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
62
62
|
e.preventDefault();
|
|
63
63
|
handleRequestFinanceSave();
|
|
64
|
-
}, children: [_jsx("h2", { className: "text-lg font-semibold mb-2", children: "Request Finance API" }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "API Key" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: requestFinance.apiKey, onChange: (e) => setRequestFinance((v) => ({ ...v, apiKey: e.target.value })), placeholder: "Enter API Key" })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Email" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "email", value: requestFinance.email, onChange: (e) => setRequestFinance((v) => ({ ...v, email: e.target.value })), placeholder: "Enter Email" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.requestFinance?.apiKey ===
|
|
65
|
-
requestFinance.apiKey &&
|
|
64
|
+
}, children: [_jsx("h2", { className: "text-lg font-semibold mb-2", children: "Request Finance API" }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "API Key" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: requestFinance.apiKey, onChange: (e) => setRequestFinance((v) => ({ ...v, apiKey: e.target.value })), placeholder: "Enter API Key" })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Email" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "email", value: requestFinance.email, onChange: (e) => setRequestFinance((v) => ({ ...v, email: e.target.value })), placeholder: "Enter Email" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.requestFinance?.apiKey === requestFinance.apiKey &&
|
|
66
65
|
state.requestFinance?.email === requestFinance.email, children: "Save" }) })] })), activeTab === "gnosisSafe" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
67
66
|
e.preventDefault();
|
|
68
67
|
handleGnosisSafeSave();
|
|
@@ -72,8 +71,7 @@ export default function Editor(props) {
|
|
|
72
71
|
})), placeholder: "0x..." })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Signer Private Key" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: gnosisSafe.signerPrivateKey, onChange: (e) => setGnosisSafe((v) => ({
|
|
73
72
|
...v,
|
|
74
73
|
signerPrivateKey: e.target.value,
|
|
75
|
-
})), placeholder: "Private Key" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.gnosisSafe?.safeAddress ===
|
|
76
|
-
gnosisSafe.safeAddress &&
|
|
74
|
+
})), placeholder: "Private Key" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.gnosisSafe?.safeAddress === gnosisSafe.safeAddress &&
|
|
77
75
|
state.gnosisSafe?.signerPrivateKey ===
|
|
78
76
|
gnosisSafe.signerPrivateKey, children: "Save" }) })] })), activeTab === "googleCloud" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
79
77
|
e.preventDefault();
|
|
@@ -84,10 +82,8 @@ export default function Editor(props) {
|
|
|
84
82
|
})), placeholder: "Processor ID" })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: Object.entries(googleCloud.keyFile).map(([key, value]) => (_jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: key.replace(/_/g, " ") }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: value, onChange: (e) => setGoogleCloud((v) => ({
|
|
85
83
|
...v,
|
|
86
84
|
keyFile: { ...v.keyFile, [key]: e.target.value },
|
|
87
|
-
})), placeholder: key.replace(/_/g, " ") })] }, key))) }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.googleCloud?.projectId ===
|
|
88
|
-
googleCloud.
|
|
89
|
-
state.googleCloud?.location ===
|
|
90
|
-
googleCloud.location &&
|
|
85
|
+
})), placeholder: key.replace(/_/g, " ") })] }, key))) }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.googleCloud?.projectId === googleCloud.projectId &&
|
|
86
|
+
state.googleCloud?.location === googleCloud.location &&
|
|
91
87
|
state.googleCloud?.processorId ===
|
|
92
88
|
googleCloud.processorId &&
|
|
93
89
|
state.googleCloud?.keyFile?.type ===
|
|
@@ -106,8 +102,7 @@ export default function Editor(props) {
|
|
|
106
102
|
googleCloud.keyFile.auth_uri &&
|
|
107
103
|
state.googleCloud?.keyFile?.token_uri ===
|
|
108
104
|
googleCloud.keyFile.token_uri &&
|
|
109
|
-
state.googleCloud?.keyFile
|
|
110
|
-
?.auth_provider_x509_cert_url ===
|
|
105
|
+
state.googleCloud?.keyFile?.auth_provider_x509_cert_url ===
|
|
111
106
|
googleCloud.keyFile.auth_provider_x509_cert_url &&
|
|
112
107
|
state.googleCloud?.keyFile?.client_x509_cert_url ===
|
|
113
108
|
googleCloud.keyFile.client_x509_cert_url &&
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type LineItem = {
|
|
2
|
+
currency: string;
|
|
3
|
+
description: string;
|
|
4
|
+
id: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
taxPercent: number;
|
|
7
|
+
totalPriceTaxExcl: number;
|
|
8
|
+
totalPriceTaxIncl: number;
|
|
9
|
+
unitPriceTaxExcl: number;
|
|
10
|
+
unitPriceTaxIncl: number;
|
|
11
|
+
lineItemTag: any[];
|
|
12
|
+
};
|
|
13
|
+
type LineItemCardProps = {
|
|
14
|
+
item: LineItem;
|
|
15
|
+
onEdit: () => void;
|
|
16
|
+
onDelete: () => void;
|
|
17
|
+
currency: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function LineItemCard({ item, onEdit, onDelete, currency, }: LineItemCardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=lineItemCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineItemCard.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/lineItemCard.tsx"],"names":[],"mappings":"AAIA,KAAK,QAAQ,GAAG;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,iBAAiB,2CAkGnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Edit, Trash2, MoreVertical } from "lucide-react";
|
|
3
|
+
import { formatNumber } from "../lineItems.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
export function LineItemCard({ item, onEdit, onDelete, currency, }) {
|
|
6
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
7
|
+
const [showMenu, setShowMenu] = useState(false);
|
|
8
|
+
const tagCount = item.lineItemTag?.length || 0;
|
|
9
|
+
return (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg mb-3 overflow-hidden", children: [_jsxs("div", { className: "p-4 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [_jsxs("div", { className: "flex items-start justify-between mb-2", children: [_jsx("div", { className: "flex-1", children: _jsx("h5", { className: "font-medium text-gray-900 text-sm", children: item.description || "Untitled Item" }) }), _jsx("button", { className: "p-1 hover:bg-gray-100 rounded", onClick: (e) => {
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
setShowMenu(!showMenu);
|
|
12
|
+
}, children: _jsx(MoreVertical, { className: "w-5 h-5 text-gray-500" }) })] }), _jsxs("div", { className: "flex items-center justify-between text-sm", children: [_jsxs("div", { className: "flex items-center gap-4 text-gray-600", children: [_jsxs("span", { children: ["Qty: ", item.quantity] }), _jsx("span", { children: "\u2022" }), _jsxs("span", { children: [currency, " ", formatNumber(item.unitPriceTaxExcl)] })] }), _jsxs("div", { className: "font-semibold text-gray-900", children: [currency, " ", formatNumber(item.totalPriceTaxIncl)] })] }), isExpanded && (_jsxs("div", { className: "mt-3 pt-3 border-t border-gray-100 space-y-2 text-sm", children: [_jsxs("div", { className: "flex justify-between", children: [_jsx("span", { className: "text-gray-600", children: "Tax %:" }), _jsxs("span", { className: "text-gray-900", children: [item.taxPercent, "%"] })] }), _jsxs("div", { className: "flex justify-between", children: [_jsx("span", { className: "text-gray-600", children: "Total (excl. tax):" }), _jsxs("span", { className: "text-gray-900", children: [currency, " ", formatNumber(item.totalPriceTaxExcl)] })] }), _jsxs("div", { className: "flex justify-between", children: [_jsx("span", { className: "text-gray-600", children: "Unit Price (incl. tax):" }), _jsxs("span", { className: "text-gray-900", children: [currency, " ", formatNumber(item.unitPriceTaxIncl)] })] })] }))] }), showMenu && (_jsxs("div", { className: "border-t border-gray-200 bg-gray-50", children: [_jsxs("button", { className: "w-full flex items-center gap-3 px-4 py-3 text-sm text-left hover:bg-gray-100 transition-colors", onClick: (e) => {
|
|
13
|
+
e.stopPropagation();
|
|
14
|
+
onEdit();
|
|
15
|
+
setShowMenu(false);
|
|
16
|
+
}, children: [_jsx(Edit, { className: "w-4 h-4 text-blue-600" }), _jsx("span", { children: "Edit Line Item" })] }), _jsxs("button", { className: "w-full flex items-center gap-3 px-4 py-3 text-sm text-left hover:bg-red-50 text-red-600 transition-colors", onClick: (e) => {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
if (confirm("Delete this line item?")) {
|
|
19
|
+
onDelete();
|
|
20
|
+
}
|
|
21
|
+
setShowMenu(false);
|
|
22
|
+
}, children: [_jsx(Trash2, { className: "w-4 h-4" }), _jsx("span", { children: "Delete" })] })] }))] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type LineItem = {
|
|
2
|
+
currency: string;
|
|
3
|
+
description: string;
|
|
4
|
+
id: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
taxPercent: number;
|
|
7
|
+
totalPriceTaxExcl: number;
|
|
8
|
+
totalPriceTaxIncl: number;
|
|
9
|
+
unitPriceTaxExcl: number;
|
|
10
|
+
unitPriceTaxIncl: number;
|
|
11
|
+
lineItemTag: any[];
|
|
12
|
+
};
|
|
13
|
+
type EditLineItemInput = {
|
|
14
|
+
id: string;
|
|
15
|
+
currency?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
quantity?: number;
|
|
18
|
+
taxPercent?: number;
|
|
19
|
+
totalPriceTaxExcl?: number;
|
|
20
|
+
totalPriceTaxIncl?: number;
|
|
21
|
+
unitPriceTaxExcl?: number;
|
|
22
|
+
unitPriceTaxIncl?: number;
|
|
23
|
+
};
|
|
24
|
+
type LineItemMobileModalProps = {
|
|
25
|
+
item?: Partial<LineItem>;
|
|
26
|
+
currency: string;
|
|
27
|
+
onSave: (item: EditLineItemInput) => void;
|
|
28
|
+
onCancel: () => void;
|
|
29
|
+
isNew?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare function LineItemMobileModal({ item, currency, onSave, onCancel, isNew, }: LineItemMobileModalProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=lineItemMobileModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineItemMobileModal.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/lineItemMobileModal.tsx"],"names":[],"mappings":"AAMA,KAAK,QAAQ,GAAG;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,KAAa,GACd,EAAE,wBAAwB,2CA6M1B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
import { useState, useMemo, useEffect } from "react";
|
|
4
|
+
import { generateId } from "document-model";
|
|
5
|
+
import { InputField } from "./inputField.js";
|
|
6
|
+
import { NumberForm } from "./numberForm.js";
|
|
7
|
+
export function LineItemMobileModal({ item, currency, onSave, onCancel, isNew = false, }) {
|
|
8
|
+
const [description, setDescription] = useState(item?.description ?? "");
|
|
9
|
+
const [quantity, setQuantity] = useState(item?.quantity ?? 1);
|
|
10
|
+
const [unitPriceTaxExcl, setUnitPriceTaxExcl] = useState(item?.unitPriceTaxExcl ?? 0);
|
|
11
|
+
const [taxPercent, setTaxPercent] = useState(item?.taxPercent ?? 0);
|
|
12
|
+
// Update state when item changes
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setDescription(item?.description ?? "");
|
|
15
|
+
setQuantity(item?.quantity ?? 1);
|
|
16
|
+
setUnitPriceTaxExcl(item?.unitPriceTaxExcl ?? 0);
|
|
17
|
+
setTaxPercent(item?.taxPercent ?? 0);
|
|
18
|
+
}, [item]);
|
|
19
|
+
// Calculate totals
|
|
20
|
+
const calculatedValues = useMemo(() => {
|
|
21
|
+
const qty = typeof quantity === "string" ? parseFloat(quantity) || 1 : quantity;
|
|
22
|
+
const unitPrice = typeof unitPriceTaxExcl === "string"
|
|
23
|
+
? parseFloat(unitPriceTaxExcl) || 0
|
|
24
|
+
: unitPriceTaxExcl;
|
|
25
|
+
const tax = typeof taxPercent === "string" ? parseFloat(taxPercent) || 0 : taxPercent;
|
|
26
|
+
const taxRate = tax / 100;
|
|
27
|
+
const unitPriceTaxIncl = unitPrice * (1 + taxRate);
|
|
28
|
+
const totalPriceTaxExcl = qty * unitPrice;
|
|
29
|
+
const totalPriceTaxIncl = qty * unitPriceTaxIncl;
|
|
30
|
+
return {
|
|
31
|
+
quantity: qty,
|
|
32
|
+
unitPriceTaxExcl: unitPrice,
|
|
33
|
+
unitPriceTaxIncl,
|
|
34
|
+
taxPercent: tax,
|
|
35
|
+
totalPriceTaxExcl,
|
|
36
|
+
totalPriceTaxIncl,
|
|
37
|
+
};
|
|
38
|
+
}, [quantity, unitPriceTaxExcl, taxPercent]);
|
|
39
|
+
const handleSave = () => {
|
|
40
|
+
// For edit: use existing ID (if valid), For new or empty ID: generate ID
|
|
41
|
+
const needsNewId = isNew || !item?.id || item.id === '';
|
|
42
|
+
const lineItem = {
|
|
43
|
+
id: needsNewId ? generateId() : item.id,
|
|
44
|
+
currency,
|
|
45
|
+
description,
|
|
46
|
+
quantity: calculatedValues.quantity,
|
|
47
|
+
unitPriceTaxExcl: calculatedValues.unitPriceTaxExcl,
|
|
48
|
+
unitPriceTaxIncl: calculatedValues.unitPriceTaxIncl,
|
|
49
|
+
taxPercent: calculatedValues.taxPercent,
|
|
50
|
+
totalPriceTaxExcl: calculatedValues.totalPriceTaxExcl,
|
|
51
|
+
totalPriceTaxIncl: calculatedValues.totalPriceTaxIncl,
|
|
52
|
+
};
|
|
53
|
+
onSave(lineItem);
|
|
54
|
+
};
|
|
55
|
+
// Prevent body scroll when modal is open
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
document.body.style.overflow = "hidden";
|
|
58
|
+
return () => {
|
|
59
|
+
document.body.style.overflow = "unset";
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return (_jsxs("div", { className: "fixed inset-0 z-50 bg-white flex flex-col", children: [_jsxs("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 bg-white", children: [_jsx("button", { onClick: onCancel, className: "p-2 hover:bg-gray-100 rounded-full transition-colors", "aria-label": "Cancel", children: _jsx(X, { className: "w-5 h-5" }) }), _jsx("h2", { className: "text-lg font-semibold", children: isNew ? "Add Line Item" : "Edit Line Item" }), _jsx("button", { onClick: handleSave, className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors font-medium text-sm", children: "Save" })] }), _jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Description *" }), _jsx(InputField, { value: description, handleInputChange: (e) => setDescription(e.target.value), onBlur: () => { }, placeholder: "Enter item description", className: "w-full" })] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Quantity *" }), _jsx(NumberForm, { number: quantity, handleInputChange: (e) => setQuantity(e.target.value), precision: 0, className: "w-full" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Unit Price *" }), _jsx(NumberForm, { number: unitPriceTaxExcl, handleInputChange: (e) => setUnitPriceTaxExcl(e.target.value), precision: 2, className: "w-full" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Tax %" }), _jsx(NumberForm, { number: taxPercent, handleInputChange: (e) => setTaxPercent(e.target.value), precision: 2, className: "w-full" })] }), _jsxs("div", { className: "bg-gray-50 rounded-lg p-4 space-y-3", children: [_jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-2", children: "Calculated Totals" }), _jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: "text-gray-600", children: "Total (excl. tax):" }), _jsxs("span", { className: "font-medium text-gray-900", children: [currency, " ", calculatedValues.totalPriceTaxExcl.toLocaleString("en-US", {
|
|
63
|
+
minimumFractionDigits: 2,
|
|
64
|
+
maximumFractionDigits: 2,
|
|
65
|
+
})] })] }), _jsxs("div", { className: "flex justify-between text-sm", children: [_jsx("span", { className: "text-gray-600", children: "Tax amount:" }), _jsxs("span", { className: "font-medium text-gray-900", children: [currency, " ", (calculatedValues.totalPriceTaxIncl -
|
|
66
|
+
calculatedValues.totalPriceTaxExcl).toLocaleString("en-US", {
|
|
67
|
+
minimumFractionDigits: 2,
|
|
68
|
+
maximumFractionDigits: 2,
|
|
69
|
+
})] })] }), _jsxs("div", { className: "flex justify-between text-sm pt-2 border-t border-gray-200", children: [_jsx("span", { className: "text-gray-900 font-semibold", children: "Total (incl. tax):" }), _jsxs("span", { className: "font-bold text-gray-900", children: [currency, " ", calculatedValues.totalPriceTaxIncl.toLocaleString("en-US", {
|
|
70
|
+
minimumFractionDigits: 2,
|
|
71
|
+
maximumFractionDigits: 2,
|
|
72
|
+
})] })] })] })] }), _jsxs("div", { className: "border-t border-gray-200 p-4 bg-white flex gap-3", children: [_jsx("button", { onClick: onCancel, className: "flex-1 px-4 py-3 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors font-medium text-gray-700", children: "Cancel" }), _jsx("button", { onClick: handleSave, className: "flex-1 px-4 py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors font-medium", children: "Save Line Item" })] })] }));
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineItemsEmptyState.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/lineItemsEmptyState.tsx"],"names":[],"mappings":"AAEA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CAoB1E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FileText } from "lucide-react";
|
|
3
|
+
export function LineItemsEmptyState({ onAddItem }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-6 px-4 bg-gray-50 rounded-lg border-2 border-dashed border-gray-300", children: [_jsx("div", { className: "w-10 h-10 mb-3 bg-gray-100 rounded-full flex items-center justify-center", children: _jsx(FileText, { className: "w-5 h-5 text-gray-400" }) }), _jsx("h3", { className: "text-base font-semibold text-gray-900 mb-1", children: "No line items yet" }), _jsx("p", { className: "text-sm text-gray-600 mb-4 text-center max-w-xs", children: "Add your first line item to start building your invoice" }), _jsx("button", { onClick: onAddItem, className: "inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors font-medium text-sm", children: "Add Your First Line Item" })] }));
|
|
5
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type EditorProps } from "document-model";
|
|
2
|
+
export default function Editor(props: Partial<EditorProps> & {
|
|
3
|
+
documentId?: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
2
5
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA4C9D,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,kDA2oCtD"}
|
|
@@ -23,13 +23,15 @@ import ConfirmationModal from "./components/confirmationModal.js";
|
|
|
23
23
|
import { ClosePaymentModalContent, ConfirmPaymentModalContent, FinalRejectionModalContent, IssueInvoiceModalContent, RegisterPaymentTxModalContent, RejectInvoiceModalContent, ReportPaymentIssueModalContent, SchedulePaymentModalContent, } from "./components/statusModalComponents.js";
|
|
24
24
|
import { InvoiceStateSchema } from "../../document-models/invoice/gen/schema/zod.js";
|
|
25
25
|
import validateStatusBeforeContinue from "./validation/validationHandler.js";
|
|
26
|
-
import {
|
|
26
|
+
import { useSelectedInvoiceDocument } from "../hooks/useInvoiceDocument.js";
|
|
27
27
|
function isFiatCurrency(currency) {
|
|
28
28
|
return currencyList.find((c) => c.ticker === currency)?.crypto === false;
|
|
29
29
|
}
|
|
30
30
|
export default function Editor(props) {
|
|
31
|
-
const [doc, dispatch] =
|
|
31
|
+
const [doc, dispatch] = useSelectedInvoiceDocument();
|
|
32
32
|
const state = doc?.state.global;
|
|
33
|
+
// Mobile header menu state
|
|
34
|
+
const [mobileHeaderOpen, setMobileHeaderOpen] = useState(false);
|
|
33
35
|
if (!state) {
|
|
34
36
|
console.log("Document state not found from document id", props.documentId);
|
|
35
37
|
return null;
|
|
@@ -70,6 +72,7 @@ export default function Editor(props) {
|
|
|
70
72
|
const [mainCountryValidation, setMainCountryValidation] = useState(null);
|
|
71
73
|
const [bankCountryValidation, setBankCountryValidation] = useState(null);
|
|
72
74
|
const [routingNumberValidation, setRoutingNumberValidation] = useState(null);
|
|
75
|
+
const [accountNumberValidation, setAccountNumberValidation] = useState(null);
|
|
73
76
|
// Replace showConfirmationModal and pendingStatus with a single modal state
|
|
74
77
|
const [activeModal, setActiveModal] = useState(null);
|
|
75
78
|
// Track warning state for modal
|
|
@@ -271,7 +274,7 @@ export default function Editor(props) {
|
|
|
271
274
|
}
|
|
272
275
|
// Replace handleStatusChange logic for opening modals
|
|
273
276
|
const handleStatusChange = (newStatus) => {
|
|
274
|
-
const validationResult = validateStatusBeforeContinue(newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, setRoutingNumberValidation, isFiatCurrency);
|
|
277
|
+
const validationResult = validateStatusBeforeContinue(newStatus, state, setInvoiceValidation, setWalletValidation, setCurrencyValidation, setMainCountryValidation, setBankCountryValidation, setIbanValidation, setBicValidation, setAccountNumberValidation, setBankNameValidation, setStreetAddressValidation, setCityValidation, setPostalCodeValidation, setPayerEmailValidation, setLineItemValidation, setRoutingNumberValidation, isFiatCurrency);
|
|
275
278
|
if (validationResult) {
|
|
276
279
|
return;
|
|
277
280
|
}
|
|
@@ -363,23 +366,39 @@ export default function Editor(props) {
|
|
|
363
366
|
reportPaymentIssue: "Confirm",
|
|
364
367
|
// Add more labels as needed
|
|
365
368
|
};
|
|
366
|
-
return (_jsxs("div", { className: "editor-container", children: [_jsx(ToastContainer, { position: "bottom-right", autoClose: 5000, hideProgressBar: false, newestOnTop: false, closeOnClick: false, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: "light" }), _jsxs("div", { className: "flex items-center justify-between gap-4
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
369
|
+
return (_jsxs("div", { className: "editor-container", children: [_jsx(ToastContainer, { position: "bottom-right", autoClose: 5000, hideProgressBar: false, newestOnTop: false, closeOnClick: false, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: "light" }), _jsxs("div", { className: "mb-6", children: [_jsxs("div", { className: "hidden md:flex flex-row items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-row items-center gap-4 flex-wrap", children: [_jsx("h1", { className: "text-3xl font-bold whitespace-nowrap", children: "Invoice" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
|
|
370
|
+
const newValue = e.target.value;
|
|
371
|
+
if (newValue !== state.invoiceNo) {
|
|
372
|
+
dispatch(actions.editInvoice({ invoiceNo: newValue }));
|
|
373
|
+
}
|
|
374
|
+
}, input: invoiceNoInput, validation: invoiceValidation }), _jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
|
|
375
|
+
handleFileUpload(e);
|
|
376
|
+
setUploadDropdownOpen(false);
|
|
377
|
+
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsx("button", { onClick: () => {
|
|
378
|
+
handleExportUBL();
|
|
379
|
+
setExportDropdownOpen(false);
|
|
380
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
|
|
381
|
+
handleExportPDF();
|
|
382
|
+
setExportDropdownOpen(false);
|
|
383
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] }), _jsxs("div", { className: "flex flex-row items-center gap-4", children: [_jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
|
|
384
|
+
handleCurrencyChange(e.target.value);
|
|
385
|
+
}, validation: currencyValidation }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] })] }), _jsxs("div", { className: "md:hidden", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Invoice" }), _jsx("button", { onClick: () => setMobileHeaderOpen(!mobileHeaderOpen), className: "inline-flex items-center justify-center w-10 h-10 rounded-lg bg-gray-100 hover:bg-gray-200 transition-colors cursor-pointer", "aria-label": "Toggle invoice settings", children: mobileHeaderOpen ? (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })) : (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })) })] }), !mobileHeaderOpen && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 mb-2", children: [_jsx("span", { className: "font-medium", children: state.invoiceNo || "No invoice #" }), _jsx("span", { children: "\u2022" }), _jsx("span", { children: state.currency }), _jsx("span", { children: "\u2022" }), _jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800", children: state.status })] })), mobileHeaderOpen && (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg p-4 space-y-4 shadow-sm", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Invoice Number" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
|
|
386
|
+
const newValue = e.target.value;
|
|
387
|
+
if (newValue !== state.invoiceNo) {
|
|
388
|
+
dispatch(actions.editInvoice({ invoiceNo: newValue }));
|
|
389
|
+
}
|
|
390
|
+
}, input: invoiceNoInput, validation: invoiceValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Currency" }), _jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
|
|
391
|
+
handleCurrencyChange(e.target.value);
|
|
392
|
+
}, validation: currencyValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Status" }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] }), _jsxs("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: [_jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
|
|
393
|
+
handleFileUpload(e);
|
|
394
|
+
setUploadDropdownOpen(false);
|
|
395
|
+
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsx("button", { onClick: () => {
|
|
396
|
+
handleExportUBL();
|
|
397
|
+
setExportDropdownOpen(false);
|
|
398
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
|
|
399
|
+
handleExportPDF();
|
|
400
|
+
setExportDropdownOpen(false);
|
|
401
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] })] }))] })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-0 lg:gap-4", children: [_jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Issuer" }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Issue Date:" }), _jsx(DatePicker, { name: "issueDate", className: String.raw `w-full p-0`, onChange: (e) => {
|
|
383
402
|
const newDate = e.target.value.split("T")[0];
|
|
384
403
|
dispatch(actions.editInvoice({
|
|
385
404
|
dateIssued: newDate,
|
|
@@ -389,7 +408,7 @@ export default function Editor(props) {
|
|
|
389
408
|
if (newValue !== state.dateDelivered) {
|
|
390
409
|
dispatch(actions.editInvoice({ dateDelivered: newValue }));
|
|
391
410
|
}
|
|
392
|
-
}, 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({
|
|
411
|
+
}, 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, accountNumbervalidation: accountNumberValidation })] }), _jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 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({
|
|
393
412
|
dateDue: e.target.value.split("T")[0],
|
|
394
413
|
})), 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) => ({
|
|
395
414
|
...item,
|
|
@@ -397,7 +416,7 @@ export default function Editor(props) {
|
|
|
397
416
|
})), onAddItem: (item) => dispatch(actions.addLineItem(item)), onDeleteItem: (input) => dispatch(actions.deleteLineItem(input)), onUpdateCurrency: (input) => {
|
|
398
417
|
setFiatMode(input.currency !== "USDS");
|
|
399
418
|
dispatch(actions.editInvoice(input));
|
|
400
|
-
}, onUpdateItem: (item) => dispatch(actions.editLineItem(item)), onEditingItemChange: setEditingItemValues, dispatch: dispatch, paymentAccounts: state.invoiceTags || [] }) }), _jsxs("div", { className: "grid grid-cols-
|
|
419
|
+
}, onUpdateItem: (item) => dispatch(actions.editLineItem(item)), onEditingItemChange: setEditingItemValues, dispatch: dispatch, paymentAccounts: state.invoiceTags || [] }) }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx("div", { className: "col-span-1", children: _jsx("div", { className: "", children: _jsx(Textarea, { label: "Notes", placeholder: "Add notes", autoExpand: false, rows: 4, multiline: true, value: notes, onBlur: (e) => {
|
|
401
420
|
const newValue = e.target.value;
|
|
402
421
|
if (newValue !== state.notes) {
|
|
403
422
|
dispatch(actions.editInvoice({ notes: newValue }));
|
|
@@ -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://
|
|
9
|
+
GRAPHQL_URL = 'https://switchboard-dev.powerhouse.xyz/graphql/invoice';
|
|
10
10
|
}
|
|
11
11
|
export async function loadPDFFile({ file, dispatch, }) {
|
|
12
12
|
if (!file)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { InvoiceAction, InvoiceState } from "../../document-models/invoice/index.js";
|
|
2
3
|
interface InvoiceToGnosisProps {
|
|
3
|
-
docState:
|
|
4
|
-
dispatch:
|
|
4
|
+
docState: InvoiceState;
|
|
5
|
+
dispatch: React.Dispatch<InvoiceAction>;
|
|
5
6
|
}
|
|
6
7
|
declare const InvoiceToGnosis: React.FC<InvoiceToGnosisProps>;
|
|
7
8
|
export default InvoiceToGnosis;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoiceToGnosis.d.ts","sourceRoot":"","sources":["../../../editors/invoice/invoiceToGnosis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"invoiceToGnosis.d.ts","sourceRoot":"","sources":["../../../editors/invoice/invoiceToGnosis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACb,MAAM,wCAAwC,CAAC;AAQhD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;CACzC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgRnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|