@powerhousedao/contributor-billing 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +22 -0
- package/dist/document-models/index.d.ts +2 -0
- package/dist/document-models/index.d.ts.map +1 -0
- package/dist/document-models/index.js +1 -0
- package/dist/document-models/invoice/gen/actions.d.ts +8 -0
- package/dist/document-models/invoice/gen/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/actions.js +3 -0
- package/dist/document-models/invoice/gen/creators.d.ts +4 -0
- package/dist/document-models/invoice/gen/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/creators.js +3 -0
- package/dist/document-models/invoice/gen/document-model.d.ts +3 -0
- package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/document-model.js +227 -0
- package/dist/document-models/invoice/gen/general/actions.d.ts +10 -0
- package/dist/document-models/invoice/gen/general/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/actions.js +1 -0
- package/dist/document-models/invoice/gen/general/creators.d.ts +9 -0
- package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/creators.js +8 -0
- package/dist/document-models/invoice/gen/general/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/general/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/error.js +1 -0
- package/dist/document-models/invoice/gen/general/object.d.ts +12 -0
- package/dist/document-models/invoice/gen/general/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/object.js +22 -0
- package/dist/document-models/invoice/gen/general/operations.d.ts +12 -0
- package/dist/document-models/invoice/gen/general/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/general/operations.js +1 -0
- package/dist/document-models/invoice/gen/index.d.ts +6 -0
- package/dist/document-models/invoice/gen/index.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/index.js +5 -0
- package/dist/document-models/invoice/gen/items/actions.d.ts +8 -0
- package/dist/document-models/invoice/gen/items/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/actions.js +1 -0
- package/dist/document-models/invoice/gen/items/creators.d.ts +7 -0
- package/dist/document-models/invoice/gen/items/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/creators.js +6 -0
- package/dist/document-models/invoice/gen/items/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/items/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/error.js +1 -0
- package/dist/document-models/invoice/gen/items/object.d.ts +10 -0
- package/dist/document-models/invoice/gen/items/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/object.js +16 -0
- package/dist/document-models/invoice/gen/items/operations.d.ts +10 -0
- package/dist/document-models/invoice/gen/items/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/items/operations.js +1 -0
- package/dist/document-models/invoice/gen/object.d.ts +20 -0
- package/dist/document-models/invoice/gen/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/object.js +29 -0
- package/dist/document-models/invoice/gen/parties/actions.d.ts +10 -0
- package/dist/document-models/invoice/gen/parties/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/actions.js +1 -0
- package/dist/document-models/invoice/gen/parties/creators.d.ts +9 -0
- package/dist/document-models/invoice/gen/parties/creators.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/creators.js +8 -0
- package/dist/document-models/invoice/gen/parties/error.d.ts +2 -0
- package/dist/document-models/invoice/gen/parties/error.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/error.js +1 -0
- package/dist/document-models/invoice/gen/parties/object.d.ts +12 -0
- package/dist/document-models/invoice/gen/parties/object.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/object.js +22 -0
- package/dist/document-models/invoice/gen/parties/operations.d.ts +12 -0
- package/dist/document-models/invoice/gen/parties/operations.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/parties/operations.js +1 -0
- package/dist/document-models/invoice/gen/reducer.d.ts +3 -0
- package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/reducer.js +79 -0
- package/dist/document-models/invoice/gen/schema/index.d.ts +3 -0
- package/dist/document-models/invoice/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/index.js +2 -0
- package/dist/document-models/invoice/gen/schema/types.d.ts +390 -0
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/types.js +1 -0
- package/dist/document-models/invoice/gen/schema/zod.d.ts +56 -0
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/schema/zod.js +362 -0
- package/dist/document-models/invoice/gen/types.d.ts +10 -0
- package/dist/document-models/invoice/gen/types.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/types.js +1 -0
- package/dist/document-models/invoice/gen/utils.d.ts +7 -0
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/utils.js +166 -0
- package/dist/document-models/invoice/index.d.ts +41 -0
- package/dist/document-models/invoice/index.d.ts.map +1 -0
- package/dist/document-models/invoice/index.js +21 -0
- package/dist/document-models/invoice/src/reducers/general.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/general.js +79 -0
- package/dist/document-models/invoice/src/reducers/items.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/items.js +108 -0
- package/dist/document-models/invoice/src/reducers/parties.d.ts +8 -0
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -0
- package/dist/document-models/invoice/src/reducers/parties.js +266 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/document-model.test.js +17 -0
- package/dist/document-models/invoice/src/tests/general.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/general.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/general.test.js +75 -0
- package/dist/document-models/invoice/src/tests/items.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/items.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/items.test.js +45 -0
- package/dist/document-models/invoice/src/tests/parties.test.d.ts +6 -0
- package/dist/document-models/invoice/src/tests/parties.test.d.ts.map +1 -0
- package/dist/document-models/invoice/src/tests/parties.test.js +75 -0
- package/dist/document-models/invoice/src/utils.d.ts +2 -0
- package/dist/document-models/invoice/src/utils.d.ts.map +1 -0
- package/dist/document-models/invoice/src/utils.js +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts +8 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.js +14 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts +12 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DocumentDispatch.js +20 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +17 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.js +112 -0
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts +14 -0
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/EditorContainer.js +28 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts +12 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FileItemsGrid.js +7 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts +17 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderItemsGrid.js +14 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +9 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderTree.js +31 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +16 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +16 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +21 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +45 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts +12 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.js +12 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +7 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.js +7 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts +8 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.js +2 -0
- package/dist/editors/contributor-billing/editor.d.ts +6 -0
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -0
- package/dist/editors/contributor-billing/editor.js +48 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts +9 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useDispatchMap.js +21 -0
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts +22 -0
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useDrop.js +57 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts +8 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.js +19 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts +4 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts.map +1 -0
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.js +32 -0
- package/dist/editors/contributor-billing/index.d.ts +5 -0
- package/dist/editors/contributor-billing/index.d.ts.map +1 -0
- package/dist/editors/contributor-billing/index.js +12 -0
- package/dist/editors/index.d.ts +3 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +2 -0
- package/dist/editors/invoice/InvoicePDF.d.ts +8 -0
- package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -0
- package/dist/editors/invoice/InvoicePDF.js +359 -0
- package/dist/editors/invoice/assets/custom.d.ts +4 -0
- package/dist/editors/invoice/assets/powerhouseLogo.png +0 -0
- package/dist/editors/invoice/components/countryForm.d.ts +12 -0
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/countryForm.js +28 -0
- package/dist/editors/invoice/components/currencyForm.d.ts +13 -0
- package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/currencyForm.js +26 -0
- package/dist/editors/invoice/components/datePicker.d.ts +11 -0
- package/dist/editors/invoice/components/datePicker.d.ts.map +1 -0
- package/dist/editors/invoice/components/datePicker.js +8 -0
- package/dist/editors/invoice/components/inputField.d.ts +14 -0
- package/dist/editors/invoice/components/inputField.d.ts.map +1 -0
- package/dist/editors/invoice/components/inputField.js +25 -0
- package/dist/editors/invoice/components/numberForm.d.ts +11 -0
- package/dist/editors/invoice/components/numberForm.d.ts.map +1 -0
- package/dist/editors/invoice/components/numberForm.js +7 -0
- package/dist/editors/invoice/components/selectField.d.ts +8 -0
- package/dist/editors/invoice/components/selectField.d.ts.map +1 -0
- package/dist/editors/invoice/components/selectField.js +323 -0
- package/dist/editors/invoice/editor.d.ts +5 -0
- package/dist/editors/invoice/editor.d.ts.map +1 -0
- package/dist/editors/invoice/editor.js +377 -0
- package/dist/editors/invoice/exportUBL.d.ts +85 -0
- package/dist/editors/invoice/exportUBL.d.ts.map +1 -0
- package/dist/editors/invoice/exportUBL.js +382 -0
- package/dist/editors/invoice/index.d.ts +5 -0
- package/dist/editors/invoice/index.d.ts.map +1 -0
- package/dist/editors/invoice/index.js +12 -0
- package/dist/editors/invoice/ingestPDF.d.ts +12 -0
- package/dist/editors/invoice/ingestPDF.d.ts.map +1 -0
- package/dist/editors/invoice/ingestPDF.js +193 -0
- package/dist/editors/invoice/ingestUBL.d.ts +21 -0
- package/dist/editors/invoice/ingestUBL.d.ts.map +1 -0
- package/dist/editors/invoice/ingestUBL.js +169 -0
- package/dist/editors/invoice/invoiceToGnosis.d.ts +7 -0
- package/dist/editors/invoice/invoiceToGnosis.d.ts.map +1 -0
- package/dist/editors/invoice/invoiceToGnosis.js +139 -0
- package/dist/editors/invoice/legalEntity/bankSection.d.ts +14 -0
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/bankSection.js +156 -0
- package/dist/editors/invoice/legalEntity/common.d.ts +6 -0
- package/dist/editors/invoice/legalEntity/common.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/common.js +6 -0
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts +40 -0
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/legalEntity.js +63 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts +13 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -0
- package/dist/editors/invoice/legalEntity/walletSection.js +55 -0
- package/dist/editors/invoice/lineItems.d.ts +23 -0
- package/dist/editors/invoice/lineItems.d.ts.map +1 -0
- package/dist/editors/invoice/lineItems.js +157 -0
- package/dist/editors/invoice/requestFinance.d.ts +7 -0
- package/dist/editors/invoice/requestFinance.d.ts.map +1 -0
- package/dist/editors/invoice/requestFinance.js +155 -0
- package/dist/editors/invoice/uploadPdfChunked.d.ts +10 -0
- package/dist/editors/invoice/uploadPdfChunked.d.ts.map +1 -0
- package/dist/editors/invoice/uploadPdfChunked.js +79 -0
- package/dist/editors/invoice/utils/utils.d.ts +2 -0
- package/dist/editors/invoice/utils/utils.d.ts.map +1 -0
- package/dist/editors/invoice/utils/utils.js +54 -0
- package/dist/editors/invoice/validation/validationManager.d.ts +28 -0
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -0
- package/dist/editors/invoice/validation/validationManager.js +65 -0
- package/dist/editors/invoice/validation/validationRules.d.ts +14 -0
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -0
- package/dist/editors/invoice/validation/validationRules.js +334 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/powerhouse.manifest.json +31 -0
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +1 -0
- package/dist/scripts/invoice/exampleBatchTxn.d.ts +2 -0
- package/dist/scripts/invoice/exampleBatchTxn.d.ts.map +1 -0
- package/dist/scripts/invoice/exampleBatchTxn.js +44 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts +28 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.js +74 -0
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts +5 -0
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts.map +1 -0
- package/dist/scripts/invoice/pdfToDocumentAi.js +659 -0
- package/dist/scripts/invoice/requestFinance.d.ts +2 -0
- package/dist/scripts/invoice/requestFinance.d.ts.map +1 -0
- package/dist/scripts/invoice/requestFinance.js +38 -0
- package/dist/style.css +6463 -0
- package/dist/subgraphs/index.d.ts +2 -0
- package/dist/subgraphs/index.d.ts.map +1 -0
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/invoice/customResolvers.d.ts +50 -0
- package/dist/subgraphs/invoice/customResolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice/customResolvers.js +327 -0
- package/dist/subgraphs/invoice/index.d.ts +10 -0
- package/dist/subgraphs/invoice/index.d.ts.map +1 -0
- package/dist/subgraphs/invoice/index.js +30 -0
- package/dist/subgraphs/invoice/resolvers.d.ts +3 -0
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice/resolvers.js +184 -0
- package/dist/subgraphs/invoice/schema.d.ts +3 -0
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -0
- package/dist/subgraphs/invoice/schema.js +460 -0
- package/dist/tailwind.config.d.ts +13 -0
- package/dist/tailwind.config.d.ts.map +1 -0
- package/dist/tailwind.config.js +15 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +8 -0
- package/editors/invoice/assets/custom.d.ts +4 -0
- package/editors/invoice/assets/powerhouseLogo.png +0 -0
- package/package.json +117 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a scaffold file meant for customization:
|
|
3
|
+
* - change it by adding new tests or modifying the existing ones
|
|
4
|
+
*/
|
|
5
|
+
import { generateMock } from "@powerhousedao/codegen";
|
|
6
|
+
import utils from "../../gen/utils.js";
|
|
7
|
+
import { z, } from "../../gen/schema/index.js";
|
|
8
|
+
import { reducer } from "../../gen/reducer.js";
|
|
9
|
+
import * as creators from "../../gen/items/creators.js";
|
|
10
|
+
describe("Items Operations", () => {
|
|
11
|
+
let document;
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
document = utils.createDocument();
|
|
14
|
+
});
|
|
15
|
+
it("should handle addLineItem operation", () => {
|
|
16
|
+
// generate a random id
|
|
17
|
+
// const id = documentModelUtils.hashKey();
|
|
18
|
+
const input = generateMock(z.AddLineItemInputSchema());
|
|
19
|
+
const updatedDocument = reducer(document, creators.addLineItem(input));
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].type).toBe("ADD_LINE_ITEM");
|
|
22
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
it("should handle editLineItem operation", () => {
|
|
26
|
+
// generate a random id
|
|
27
|
+
// const id = documentModelUtils.hashKey();
|
|
28
|
+
const input = generateMock(z.EditLineItemInputSchema());
|
|
29
|
+
const updatedDocument = reducer(document, creators.editLineItem(input));
|
|
30
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
31
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_LINE_ITEM");
|
|
32
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
33
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle deleteLineItem operation", () => {
|
|
36
|
+
// generate a random id
|
|
37
|
+
// const id = documentModelUtils.hashKey();
|
|
38
|
+
const input = generateMock(z.DeleteLineItemInputSchema());
|
|
39
|
+
const updatedDocument = reducer(document, creators.deleteLineItem(input));
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].type).toBe("DELETE_LINE_ITEM");
|
|
42
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parties.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/tests/parties.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a scaffold file meant for customization:
|
|
3
|
+
* - change it by adding new tests or modifying the existing ones
|
|
4
|
+
*/
|
|
5
|
+
import { generateMock } from "@powerhousedao/codegen";
|
|
6
|
+
import utils from "../../gen/utils.js";
|
|
7
|
+
import { z, } from "../../gen/schema/index.js";
|
|
8
|
+
import { reducer } from "../../gen/reducer.js";
|
|
9
|
+
import * as creators from "../../gen/parties/creators.js";
|
|
10
|
+
describe("Parties Operations", () => {
|
|
11
|
+
let document;
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
document = utils.createDocument();
|
|
14
|
+
});
|
|
15
|
+
it("should handle editIssuer operation", () => {
|
|
16
|
+
// generate a random id
|
|
17
|
+
// const id = documentModelUtils.hashKey();
|
|
18
|
+
const input = generateMock(z.EditIssuerInputSchema());
|
|
19
|
+
const updatedDocument = reducer(document, creators.editIssuer(input));
|
|
20
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
21
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_ISSUER");
|
|
22
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
23
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
24
|
+
});
|
|
25
|
+
it("should handle editIssuerBank operation", () => {
|
|
26
|
+
// generate a random id
|
|
27
|
+
// const id = documentModelUtils.hashKey();
|
|
28
|
+
const input = generateMock(z.EditIssuerBankInputSchema());
|
|
29
|
+
const updatedDocument = reducer(document, creators.editIssuerBank(input));
|
|
30
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
31
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_ISSUER_BANK");
|
|
32
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
33
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
34
|
+
});
|
|
35
|
+
it("should handle editIssuerWallet operation", () => {
|
|
36
|
+
// generate a random id
|
|
37
|
+
// const id = documentModelUtils.hashKey();
|
|
38
|
+
const input = generateMock(z.EditIssuerWalletInputSchema());
|
|
39
|
+
const updatedDocument = reducer(document, creators.editIssuerWallet(input));
|
|
40
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
41
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_ISSUER_WALLET");
|
|
42
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
43
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
it("should handle editPayer operation", () => {
|
|
46
|
+
// generate a random id
|
|
47
|
+
// const id = documentModelUtils.hashKey();
|
|
48
|
+
const input = generateMock(z.EditPayerInputSchema());
|
|
49
|
+
const updatedDocument = reducer(document, creators.editPayer(input));
|
|
50
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
51
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_PAYER");
|
|
52
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
53
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
54
|
+
});
|
|
55
|
+
it("should handle editPayerBank operation", () => {
|
|
56
|
+
// generate a random id
|
|
57
|
+
// const id = documentModelUtils.hashKey();
|
|
58
|
+
const input = generateMock(z.EditPayerBankInputSchema());
|
|
59
|
+
const updatedDocument = reducer(document, creators.editPayerBank(input));
|
|
60
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
61
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_PAYER_BANK");
|
|
62
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
63
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
64
|
+
});
|
|
65
|
+
it("should handle editPayerWallet operation", () => {
|
|
66
|
+
// generate a random id
|
|
67
|
+
// const id = documentModelUtils.hashKey();
|
|
68
|
+
const input = generateMock(z.EditPayerWalletInputSchema());
|
|
69
|
+
const updatedDocument = reducer(document, creators.editPayerWallet(input));
|
|
70
|
+
expect(updatedDocument.operations.global).toHaveLength(1);
|
|
71
|
+
expect(updatedDocument.operations.global[0].type).toBe("EDIT_PAYER_WALLET");
|
|
72
|
+
expect(updatedDocument.operations.global[0].input).toStrictEqual(input);
|
|
73
|
+
expect(updatedDocument.operations.global[0].index).toEqual(0);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/invoice/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DocumentModelModule } from "document-model";
|
|
2
|
+
interface CreateDocumentProps {
|
|
3
|
+
documentModels?: DocumentModelModule[];
|
|
4
|
+
createDocument: (doc: DocumentModelModule) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const CreateDocument: React.FC<CreateDocumentProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=CreateDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateDocument.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/CreateDocument.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,UAAU,mBAAmB;IAC3B,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACvC,cAAc,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACpD;AAUD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4BxD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "@powerhousedao/design-system";
|
|
3
|
+
function getDocumentSpec(doc) {
|
|
4
|
+
if ("documentModelState" in doc) {
|
|
5
|
+
return doc.documentModelState;
|
|
6
|
+
}
|
|
7
|
+
return doc.documentModel;
|
|
8
|
+
}
|
|
9
|
+
export const CreateDocument = ({ documentModels, createDocument, }) => {
|
|
10
|
+
return (_jsxs("div", { className: "px-6", children: [_jsx("h3", { className: "mb-3 mt-4 text-sm font-bold text-gray-600", children: "New document" }), _jsx("div", { className: "flex w-full flex-wrap gap-4", children: documentModels?.map((doc) => {
|
|
11
|
+
const spec = getDocumentSpec(doc);
|
|
12
|
+
return (_jsx(Button, { color: "light", size: "small", className: "cursor-pointer", "aria-details": spec.description, onClick: () => createDocument(doc), children: _jsx("span", { className: "text-sm", children: spec.name }) }, spec.id));
|
|
13
|
+
}) })] }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type DriveEditorContext } from "@powerhousedao/reactor-browser";
|
|
3
|
+
interface DocumentDispatchProps {
|
|
4
|
+
documentId: string;
|
|
5
|
+
driveId: string;
|
|
6
|
+
documentModelModule: any;
|
|
7
|
+
context: DriveEditorContext;
|
|
8
|
+
onDispatchReady: (dispatch: (action: any) => void) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DocumentDispatch: FC<DocumentDispatchProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=DocumentDispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentDispatch.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/DocumentDispatch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAqB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,kBAAkB,EAAa,MAAM,gCAAgC,CAAC;AAEpF,UAAU,qBAAqB;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,EAAE,GAAG,CAAC;IACzB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA2BtD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
export const DocumentDispatch = ({ documentId, driveId, documentModelModule, context, onDispatchReady, }) => {
|
|
3
|
+
const { useDocumentEditorProps } = context;
|
|
4
|
+
const { dispatch } = useDocumentEditorProps({
|
|
5
|
+
documentId,
|
|
6
|
+
documentType: "powerhouse/invoice",
|
|
7
|
+
driveId,
|
|
8
|
+
documentModelModule,
|
|
9
|
+
user: context.user,
|
|
10
|
+
});
|
|
11
|
+
// Keep track of whether we've already notified about this dispatch
|
|
12
|
+
const hasNotified = useRef(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (dispatch && !hasNotified.current) {
|
|
15
|
+
onDispatchReady(dispatch);
|
|
16
|
+
hasNotified.current = true;
|
|
17
|
+
}
|
|
18
|
+
}, [dispatch, onDispatchReady]);
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DocumentDriveAction, type DocumentDriveDocument, type Node } from "document-drive";
|
|
2
|
+
import type { EditorDispatch } from "document-model";
|
|
3
|
+
import { type DriveEditorContext } from "@powerhousedao/reactor-browser";
|
|
4
|
+
interface DriveExplorerProps {
|
|
5
|
+
driveId: string;
|
|
6
|
+
nodes: Node[];
|
|
7
|
+
onAddFolder: (name: string, parentFolder?: string) => void;
|
|
8
|
+
onDeleteNode: (nodeId: string) => void;
|
|
9
|
+
renameNode: (nodeId: string, name: string) => void;
|
|
10
|
+
onCopyNode: (nodeId: string, targetName: string, parentId?: string) => void;
|
|
11
|
+
context: DriveEditorContext;
|
|
12
|
+
document: DocumentDriveDocument;
|
|
13
|
+
dispatch: EditorDispatch<DocumentDriveAction>;
|
|
14
|
+
}
|
|
15
|
+
export declare function DriveExplorer({ driveId, nodes, onDeleteNode, renameNode, onAddFolder, onCopyNode, context, document, dispatch }: DriveExplorerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=DriveExplorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/DriveExplorer.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAqB,mBAAmB,EAAY,KAAK,qBAAqB,EAAiB,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AASxI,OAAO,KAAK,EAAsC,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGzF,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,gCAAgC,CAAC;AAKxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,QAAQ,EAAE,cAAc,CAAC,mBAAmB,CAAC,CAAA;CAC9C;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACV,OAAO,EACP,QAAQ,EACR,QAAQ,EACT,EAAE,kBAAkB,2CA+OpB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState, useRef, useEffect } from "react";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { FileItemsGrid } from "./FileItemsGrid.js";
|
|
5
|
+
import { FolderItemsGrid } from "./FolderItemsGrid.js";
|
|
6
|
+
import { useTransformedNodes } from "../hooks/useTransformedNodes.js";
|
|
7
|
+
import { useSelectedFolderChildren } from "../hooks/useSelectedFolderChildren.js";
|
|
8
|
+
import { useDispatchMap } from "../hooks/useDispatchMap.js";
|
|
9
|
+
import { DocumentDispatch } from "./DocumentDispatch.js";
|
|
10
|
+
import { EditorContainer } from "./EditorContainer.js";
|
|
11
|
+
import { CreateDocumentModal } from "@powerhousedao/design-system";
|
|
12
|
+
import { CreateDocument } from "./CreateDocument.js";
|
|
13
|
+
import { useDriveActionsWithUiNodes, useDriveContext, } from "@powerhousedao/reactor-browser";
|
|
14
|
+
import { InvoiceTable } from "./InvoiceTable/InvoiceTable.js";
|
|
15
|
+
import { actions } from "../../../document-models/invoice/index.js";
|
|
16
|
+
import { useDrop } from "../hooks/useDrop.js";
|
|
17
|
+
export function DriveExplorer({ driveId, nodes, onDeleteNode, renameNode, onAddFolder, onCopyNode, context, document, dispatch }) {
|
|
18
|
+
const [selectedNodeId, setSelectedNodeId] = useState();
|
|
19
|
+
const [activeDocumentId, setActiveDocumentId] = useState();
|
|
20
|
+
const [openModal, setOpenModal] = useState(false);
|
|
21
|
+
const [selected, setSelected] = useState({});
|
|
22
|
+
const selectedDocumentModel = useRef(null);
|
|
23
|
+
const { addDocument, documentModels, useDriveDocumentStates, selectedNode } = useDriveContext();
|
|
24
|
+
const [state, fetchDocuments] = useDriveDocumentStates({ driveId });
|
|
25
|
+
const { useDocumentEditorProps } = context;
|
|
26
|
+
// Use our custom hook to manage the dispatch map
|
|
27
|
+
const { dispatchMap, handleDispatchReady } = useDispatchMap(nodes, driveId, documentModels[1], context);
|
|
28
|
+
const handleBatchAction = useCallback((action) => {
|
|
29
|
+
Object.entries(selected).forEach(([id, checked]) => {
|
|
30
|
+
console.log(action);
|
|
31
|
+
if (checked) {
|
|
32
|
+
if (action === 'approve' && dispatchMap[id]) {
|
|
33
|
+
dispatchMap[id](actions.editStatus({
|
|
34
|
+
status: "AWAITINGPAYMENT",
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
else if (action === 'reject' && dispatchMap[id]) {
|
|
38
|
+
dispatchMap[id](actions.editStatus({
|
|
39
|
+
status: "REJECTED",
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else if (action === 'pay' && dispatchMap[id]) {
|
|
44
|
+
dispatchMap[id](actions.editStatus({
|
|
45
|
+
status: "PAYMENTRECEIVED",
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, [selected, dispatchMap]);
|
|
50
|
+
// Transform nodes using the custom hook
|
|
51
|
+
const transformedNodes = useTransformedNodes(nodes, driveId);
|
|
52
|
+
// Separate folders and files
|
|
53
|
+
const folders = transformedNodes.filter((node) => node.kind === "FOLDER");
|
|
54
|
+
const files = transformedNodes.filter((node) => node.kind === "FILE");
|
|
55
|
+
// Get the active document info from nodes
|
|
56
|
+
const activeDocument = activeDocumentId
|
|
57
|
+
? files.find((file) => file.id === activeDocumentId)
|
|
58
|
+
: undefined;
|
|
59
|
+
const documentModelModule = activeDocument
|
|
60
|
+
? context.getDocumentModelModule(activeDocument.documentType)
|
|
61
|
+
: null;
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
fetchDocuments(driveId).catch(console.error);
|
|
64
|
+
}, [activeDocumentId]);
|
|
65
|
+
// Dummy functions to satisfy component types
|
|
66
|
+
const dummyDuplicateNode = useCallback((node) => {
|
|
67
|
+
console.log("Duplicate node:", node);
|
|
68
|
+
}, []);
|
|
69
|
+
const dummyAddFile = useCallback(async (file, parentNode) => {
|
|
70
|
+
console.log("Add file:", file, parentNode);
|
|
71
|
+
}, []);
|
|
72
|
+
const dummyMoveNode = useCallback(async (uiNode, targetNode) => {
|
|
73
|
+
console.log("Move node:", uiNode, targetNode);
|
|
74
|
+
}, []);
|
|
75
|
+
const handleNodeSelect = useCallback((node) => {
|
|
76
|
+
console.log("Selected node:", node);
|
|
77
|
+
setSelectedNodeId(node.id);
|
|
78
|
+
}, []);
|
|
79
|
+
const handleFileSelect = useCallback((node) => {
|
|
80
|
+
setActiveDocumentId(node.id);
|
|
81
|
+
}, []);
|
|
82
|
+
const handleEditorClose = useCallback(() => {
|
|
83
|
+
setActiveDocumentId(undefined);
|
|
84
|
+
}, []);
|
|
85
|
+
const onCreateDocument = useCallback(async (fileName) => {
|
|
86
|
+
setOpenModal(false);
|
|
87
|
+
const documentModel = selectedDocumentModel.current;
|
|
88
|
+
if (!documentModel)
|
|
89
|
+
return;
|
|
90
|
+
const node = await addDocument(driveId, fileName, documentModel.documentModel.id);
|
|
91
|
+
selectedDocumentModel.current = null;
|
|
92
|
+
setActiveDocumentId(node.id);
|
|
93
|
+
}, [addDocument, driveId]);
|
|
94
|
+
const { addFile, copyNode, moveNode } = useDriveActionsWithUiNodes(document, dispatch);
|
|
95
|
+
const { isDropTarget, dropProps } = useDrop({
|
|
96
|
+
uiNode: selectedNode?.kind === "FOLDER" ? selectedNode : null,
|
|
97
|
+
onAddFile: addFile,
|
|
98
|
+
onCopyNode: copyNode,
|
|
99
|
+
onMoveNode: moveNode,
|
|
100
|
+
});
|
|
101
|
+
const onSelectDocumentModel = useCallback((documentModel) => {
|
|
102
|
+
selectedDocumentModel.current = documentModel;
|
|
103
|
+
setOpenModal(true);
|
|
104
|
+
}, []);
|
|
105
|
+
const filteredDocumentModels = documentModels;
|
|
106
|
+
// Get children of selected folder using the custom hook
|
|
107
|
+
const selectedFolderChildren = useSelectedFolderChildren(selectedNodeId, folders, files);
|
|
108
|
+
const editorModule = activeDocument
|
|
109
|
+
? context.getEditor(activeDocument.documentType)
|
|
110
|
+
: null;
|
|
111
|
+
return (_jsxs("div", { className: "flex h-full", children: [nodes.map(node => (_jsx(DocumentDispatch, { documentId: node.id, driveId: driveId, documentModelModule: documentModels[1], context: context, onDispatchReady: (dispatch) => handleDispatchReady(node.id, dispatch) }, node.id))), _jsx("div", { className: "flex-1 p-4 overflow-y-auto", children: activeDocument && documentModelModule && editorModule ? (_jsx(EditorContainer, { context: context, documentId: activeDocumentId, documentType: activeDocument.documentType, driveId: driveId, onClose: handleEditorClose, title: activeDocument.name, documentModelModule: documentModelModule, editorModule: editorModule })) : (_jsxs("div", { ...dropProps, className: twMerge('rounded-md border-2 border-transparent ', isDropTarget && 'border-dashed border-blue-100'), children: [_jsx(FolderItemsGrid, { folders: selectedFolderChildren.folders, onSelectNode: handleNodeSelect, onRenameNode: renameNode, onDuplicateNode: (uiNode) => onCopyNode(uiNode.id, "Copy of " + uiNode.name, uiNode.parentFolder), onDeleteNode: onDeleteNode, onAddFile: dummyAddFile, onCopyNode: async (uiNode, targetNode) => onCopyNode(uiNode.id, "Copy of " + uiNode.name, targetNode.id), onMoveNode: dummyMoveNode, isAllowedToCreateDocuments: true, onAddFolder: onAddFolder, parentFolderId: selectedNodeId }), _jsx(FileItemsGrid, { files: selectedFolderChildren.files, onSelectNode: handleFileSelect, onRenameNode: renameNode, onDuplicateNode: dummyDuplicateNode, onDeleteNode: onDeleteNode, isAllowedToCreateDocuments: true }), _jsx(CreateDocument, { createDocument: onSelectDocumentModel, documentModels: filteredDocumentModels }), _jsx(InvoiceTable, { setActiveDocumentId: setActiveDocumentId, files: files, state: state, getDispatch: () => dispatchMap[activeDocumentId || ""], selected: selected, setSelected: setSelected, onBatchAction: handleBatchAction })] })) }), _jsx(CreateDocumentModal, { onContinue: onCreateDocument, onOpenChange: (open) => setOpenModal(open), open: openModal })] }));
|
|
112
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type DriveEditorContext } from "@powerhousedao/reactor-browser";
|
|
2
|
+
import { type DocumentModelModule, type EditorModule, type PHDocument } from "document-model";
|
|
3
|
+
export interface EditorContainerProps {
|
|
4
|
+
driveId: string;
|
|
5
|
+
documentId: string;
|
|
6
|
+
documentType: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
title: string;
|
|
9
|
+
context: DriveEditorContext;
|
|
10
|
+
documentModelModule: DocumentModelModule<PHDocument>;
|
|
11
|
+
editorModule: EditorModule;
|
|
12
|
+
}
|
|
13
|
+
export declare const EditorContainer: React.FC<EditorContainerProps>;
|
|
14
|
+
//# sourceMappingURL=EditorContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorContainer.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/EditorContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAQxB,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,kBAAkB,CAAC;IAC5B,mBAAmB,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACrD,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmE1D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useDriveContext, exportDocument, } from "@powerhousedao/reactor-browser";
|
|
3
|
+
import { DocumentToolbar, RevisionHistory, DefaultEditorLoader, } from "@powerhousedao/design-system";
|
|
4
|
+
import { useState, Suspense, useCallback } from "react";
|
|
5
|
+
export const EditorContainer = (props) => {
|
|
6
|
+
const { title, driveId, context, onClose, documentId, documentType, editorModule, documentModelModule, } = props;
|
|
7
|
+
const [showRevisionHistory, setShowRevisionHistory] = useState(false);
|
|
8
|
+
const { useDocumentEditorProps } = useDriveContext();
|
|
9
|
+
const user = context.user;
|
|
10
|
+
const { dispatch, error, document } = useDocumentEditorProps({
|
|
11
|
+
documentId,
|
|
12
|
+
documentType,
|
|
13
|
+
driveId,
|
|
14
|
+
documentModelModule,
|
|
15
|
+
user,
|
|
16
|
+
});
|
|
17
|
+
const onExport = useCallback(async () => {
|
|
18
|
+
if (document) {
|
|
19
|
+
const ext = documentModelModule.documentModel.extension;
|
|
20
|
+
await exportDocument(document, title, ext);
|
|
21
|
+
}
|
|
22
|
+
}, [document?.revision.global, document?.revision.local]);
|
|
23
|
+
const loadingContent = (_jsx("div", { className: "flex-1 flex justify-center items-center h-full", children: _jsx(DefaultEditorLoader, {}) }));
|
|
24
|
+
if (!document)
|
|
25
|
+
return loadingContent;
|
|
26
|
+
const EditorComponent = editorModule.Component;
|
|
27
|
+
return showRevisionHistory ? (_jsx(RevisionHistory, { documentId: documentId, documentTitle: title, globalOperations: document.operations.global, localOperations: document.operations.local, onClose: () => setShowRevisionHistory(false) }, documentId)) : (_jsxs(Suspense, { fallback: loadingContent, children: [_jsx(DocumentToolbar, { onClose: onClose, onExport: onExport, onShowRevisionHistory: () => setShowRevisionHistory(true), onSwitchboardLinkClick: () => { }, title: title }), _jsx(EditorComponent, { context: context, dispatch: dispatch, document: document, error: error })] }));
|
|
28
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type UiFileNode, type BaseUiFileNode } from "@powerhousedao/design-system";
|
|
2
|
+
interface FileItemsGridProps {
|
|
3
|
+
files: UiFileNode[];
|
|
4
|
+
onSelectNode: (node: BaseUiFileNode) => void;
|
|
5
|
+
onRenameNode: (nodeId: string, name: string) => void;
|
|
6
|
+
onDuplicateNode: (node: BaseUiFileNode) => void;
|
|
7
|
+
onDeleteNode: (nodeId: string) => void;
|
|
8
|
+
isAllowedToCreateDocuments: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function FileItemsGrid({ files, onSelectNode, onRenameNode, onDuplicateNode, onDeleteNode, isAllowedToCreateDocuments, }: FileItemsGridProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=FileItemsGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileItemsGrid.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/FileItemsGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,8BAA8B,CAAC;AAEtC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,0BAA0B,EAAE,OAAO,CAAC;CACrC;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,0BAA0B,GAC3B,EAAE,kBAAkB,kDAqBpB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FileItem, } from "@powerhousedao/design-system";
|
|
3
|
+
export function FileItemsGrid({ files, onSelectNode, onRenameNode, onDuplicateNode, onDeleteNode, isAllowedToCreateDocuments, }) {
|
|
4
|
+
if (files.length === 0)
|
|
5
|
+
return null;
|
|
6
|
+
return (_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium text-gray-500 mb-2", children: "Files" }), _jsx("div", { className: "flex flex-wrap gap-2", children: files.map((file) => (_jsx(FileItem, { uiNode: file, onSelectNode: onSelectNode, onRenameNode: (name) => onRenameNode(file.id, name), onDuplicateNode: onDuplicateNode, onDeleteNode: () => onDeleteNode(file.id), isAllowedToCreateDocuments: isAllowedToCreateDocuments }, file.id))) })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type UiFolderNode, type BaseUiFolderNode, type BaseUiNode } from "@powerhousedao/design-system";
|
|
2
|
+
interface FolderItemsGridProps {
|
|
3
|
+
folders: UiFolderNode[];
|
|
4
|
+
onSelectNode: (node: BaseUiFolderNode) => void;
|
|
5
|
+
onRenameNode: (nodeId: string, name: string) => void;
|
|
6
|
+
onDuplicateNode: (node: BaseUiFolderNode) => void;
|
|
7
|
+
onDeleteNode: (nodeId: string) => void;
|
|
8
|
+
onAddFile: (file: File, parentNode: BaseUiNode | null) => Promise<void>;
|
|
9
|
+
onCopyNode: (uiNode: BaseUiNode, targetNode: BaseUiNode) => Promise<void>;
|
|
10
|
+
onMoveNode: (uiNode: BaseUiNode, targetNode: BaseUiNode) => Promise<void>;
|
|
11
|
+
isAllowedToCreateDocuments: boolean;
|
|
12
|
+
onAddFolder: (name: string, parentFolder?: string) => void;
|
|
13
|
+
parentFolderId?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function FolderItemsGrid({ folders, onSelectNode, onRenameNode, onDuplicateNode, onDeleteNode, onAddFile, onCopyNode, onMoveNode, isAllowedToCreateDocuments, onAddFolder, parentFolderId, }: FolderItemsGridProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=FolderItemsGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderItemsGrid.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/FolderItemsGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAChB,MAAM,8BAA8B,CAAC;AAGtC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,0BAA0B,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,cAAc,GACf,EAAE,oBAAoB,2CAwDtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FolderItem, } from "@powerhousedao/design-system";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
export function FolderItemsGrid({ folders, onSelectNode, onRenameNode, onDuplicateNode, onDeleteNode, onAddFile, onCopyNode, onMoveNode, isAllowedToCreateDocuments, onAddFolder, parentFolderId, }) {
|
|
5
|
+
const [newFolderName, setNewFolderName] = useState("");
|
|
6
|
+
const handleSubmit = (e) => {
|
|
7
|
+
e.preventDefault();
|
|
8
|
+
if (newFolderName.trim()) {
|
|
9
|
+
onAddFolder(newFolderName.trim(), parentFolderId);
|
|
10
|
+
setNewFolderName("");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return (_jsxs("div", { className: "mb-6", children: [_jsx("div", { className: "flex items-center gap-4 mb-2" }), folders.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-2", children: folders.map((folder) => (_jsx(FolderItem, { uiNode: folder, onSelectNode: onSelectNode, onRenameNode: (name) => onRenameNode(folder.id, name), onDuplicateNode: onDuplicateNode, onDeleteNode: () => onDeleteNode(folder.id), onAddFile: onAddFile, onCopyNode: onCopyNode, onMoveNode: onMoveNode, isAllowedToCreateDocuments: isAllowedToCreateDocuments }, folder.id))) }))] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UiFolderNode } from "@powerhousedao/design-system";
|
|
2
|
+
interface FolderTreeProps {
|
|
3
|
+
folders: UiFolderNode[];
|
|
4
|
+
selectedNodeId?: string;
|
|
5
|
+
onSelectNode: (node: UiFolderNode) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function FolderTree({ folders, selectedNodeId, onSelectNode, }: FolderTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=FolderTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FolderTree.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/FolderTree.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,UAAU,eAAe;IACvB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,cAAc,EACd,YAAY,GACb,EAAE,eAAe,2CA2EjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
export function FolderTree({ folders, selectedNodeId, onSelectNode, }) {
|
|
4
|
+
const [expandedFolders, setExpandedFolders] = useState(new Set());
|
|
5
|
+
const toggleFolder = (folderId) => {
|
|
6
|
+
setExpandedFolders((prev) => {
|
|
7
|
+
const next = new Set(prev);
|
|
8
|
+
if (next.has(folderId)) {
|
|
9
|
+
next.delete(folderId);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
next.add(folderId);
|
|
13
|
+
}
|
|
14
|
+
return next;
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const renderFolder = (folder, level = 0) => {
|
|
18
|
+
const hasChildren = folders.some((f) => f.parentFolder === folder.id);
|
|
19
|
+
const isExpanded = expandedFolders.has(folder.id);
|
|
20
|
+
const isSelected = selectedNodeId === folder.id;
|
|
21
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: `flex items-center py-1 px-2 cursor-pointer hover:bg-gray-100 rounded ${isSelected ? "bg-gray-100" : ""}`, style: { paddingLeft: `${level * 16 + 8}px` }, onClick: () => onSelectNode(folder), children: [hasChildren && (_jsx("button", { className: "w-4 h-4 mr-1 flex items-center justify-center", onClick: (e) => {
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
toggleFolder(folder.id);
|
|
24
|
+
}, children: isExpanded ? "▼" : "▶" })), _jsx("span", { className: "text-sm", children: folder.name })] }), isExpanded && hasChildren && (_jsx("div", { children: folders
|
|
25
|
+
.filter((f) => f.parentFolder === folder.id)
|
|
26
|
+
.map((child) => renderFolder(child, level + 1)) }))] }, folder.id));
|
|
27
|
+
};
|
|
28
|
+
return (_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: `flex items-center py-1 px-2 cursor-pointer hover:bg-gray-100 rounded ${!selectedNodeId ? "bg-gray-100" : ""}`, onClick: () => onSelectNode({ id: "", name: "Root", kind: "FOLDER" }), children: _jsx("span", { className: "text-sm font-medium", children: "Root" }) }), folders
|
|
29
|
+
.filter((folder) => !folder.parentFolder)
|
|
30
|
+
.map((folder) => renderFolder(folder))] }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const HeaderControls: ({ contributorOptions, statusOptions, onContributorChange, onStatusChange, onSearchChange, onExport, onBatchAction, }: {
|
|
2
|
+
contributorOptions?: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
statusOptions?: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
onContributorChange?: (value: string | string[]) => void;
|
|
11
|
+
onStatusChange?: (value: string | string[]) => void;
|
|
12
|
+
onSearchChange?: (value: string) => void;
|
|
13
|
+
onExport?: () => void;
|
|
14
|
+
onBatchAction?: (action: string) => void;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=HeaderControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderControls.d.ts","sourceRoot":"","sources":["../../../../../editors/contributor-billing/components/InvoiceTable/HeaderControls.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,GAAI,sHAQ5B;IACD,kBAAkB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,aAAa,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnD,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,4CAwDA,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Select } from "@powerhousedao/document-engineering";
|
|
3
|
+
export const HeaderControls = ({ contributorOptions = [], statusOptions = [], onContributorChange, onStatusChange, onSearchChange, onExport, onBatchAction, }) => {
|
|
4
|
+
const batchOptions = [
|
|
5
|
+
{ label: "$ Pay Selected", value: "pay" },
|
|
6
|
+
{ label: "Approve Selected", value: "approve" },
|
|
7
|
+
{ label: "Reject Selected", value: "reject" },
|
|
8
|
+
];
|
|
9
|
+
return (_jsxs("div", { className: "flex flex-col gap-4 mb-4", children: [_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("h3", { className: "text-lg font-bold", children: "Powerhouse OH Admin Drive" }), _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx("button", { className: "bg-white border border-gray-300 rounded px-3 py-1 text-sm hover:bg-gray-100", onClick: onExport, children: "Export to CSV" }), _jsx(Select, { style: {
|
|
10
|
+
width: "180px",
|
|
11
|
+
height: "30px",
|
|
12
|
+
}, options: batchOptions, onChange: (value) => onBatchAction?.(value), placeholder: "Batch Action", selectionIcon: "checkmark" })] })] }), _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(Select, { style: {
|
|
13
|
+
width: "200px",
|
|
14
|
+
height: "30px",
|
|
15
|
+
}, options: statusOptions, onChange: onStatusChange, placeholder: "Status", selectionIcon: "checkmark", multiple: true }), _jsx("input", { type: "text", className: "border rounded px-2 py-1 text-sm", placeholder: "Search", onChange: (e) => onSearchChange?.(e.target.value) })] })] }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type UiFileNode } from "@powerhousedao/design-system";
|
|
2
|
+
interface InvoiceTableProps {
|
|
3
|
+
files: UiFileNode[];
|
|
4
|
+
state: Record<string, any>;
|
|
5
|
+
setActiveDocumentId: (id: string) => void;
|
|
6
|
+
getDispatch: () => (action: any, onErrorCallback?: any) => void;
|
|
7
|
+
selected: {
|
|
8
|
+
[id: string]: boolean;
|
|
9
|
+
};
|
|
10
|
+
setSelected: (selected: {
|
|
11
|
+
[id: string]: boolean;
|
|
12
|
+
} | ((prev: {
|
|
13
|
+
[id: string]: boolean;
|
|
14
|
+
}) => {
|
|
15
|
+
[id: string]: boolean;
|
|
16
|
+
})) => void;
|
|
17
|
+
onBatchAction: (action: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const InvoiceTable: ({ files, state, setActiveDocumentId, getDispatch, selected, setSelected, onBatchAction, }: InvoiceTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=InvoiceTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvoiceTable.d.ts","sourceRoot":"","sources":["../../../../../editors/contributor-billing/components/InvoiceTable/InvoiceTable.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA0B/D,UAAU,iBAAiB;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChE,QAAQ,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACpC,WAAW,EAAE,CAAC,QAAQ,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,KAAK;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC9H,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,YAAY,GAAI,2FAQ1B,iBAAiB,4CAqMnB,CAAC"}
|