@powerhousedao/contributor-billing 1.0.0-dev.3 → 1.0.0-dev.4
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/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +8 -0
- package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/transitions.js +4 -0
- package/dist/editors/builder-team-admin/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/builder-team-admin/components/DriveExplorer.js +64 -4
- package/dist/editors/builder-team-admin/module.js +1 -1
- package/dist/editors/contributor-billing/components/DashboardHome.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DashboardHome.js +2 -8
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +52 -1
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/FolderTree.js +6 -15
- package/dist/editors/contributor-billing/components/MonthReportCard.d.ts +8 -1
- package/dist/editors/contributor-billing/components/MonthReportCard.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/MonthReportCard.js +6 -3
- package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts +1 -1
- package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/MonthlyReportsOverview.js +56 -3
- package/dist/editors/contributor-billing/components/cbToast.d.ts.map +1 -1
- package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.d.ts.map +1 -1
- package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.js +42 -2
- package/dist/editors/contributor-billing/module.js +1 -1
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +3 -2
- 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/legalEntity/walletSection.d.ts +1 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.js +2 -2
- 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 +14 -1
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +3 -1
- 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 +50 -0
- package/dist/style.css +96 -3
- package/dist/subgraphs/budget-statements/resolvers.d.ts +38 -0
- package/dist/subgraphs/budget-statements/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/budget-statements/resolvers.js +151 -44
- package/dist/subgraphs/budget-statements/resolvers.test.d.ts +2 -0
- package/dist/subgraphs/budget-statements/resolvers.test.d.ts.map +1 -0
- package/dist/subgraphs/budget-statements/resolvers.test.js +329 -0
- package/dist/subgraphs/budget-statements/schema.d.ts.map +1 -1
- package/dist/subgraphs/budget-statements/schema.js +8 -0
- package/package.json +16 -16
- package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts +0 -12
- package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/CreateHubProfileModal.js +0 -74
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/contributor-billing",
|
|
3
3
|
"description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
|
|
4
|
-
"version": "1.0.0-dev.
|
|
4
|
+
"version": "1.0.0-dev.4",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"migrate": "ph-cli migrate"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@powerhousedao/builder-profile": "1.0.
|
|
73
|
-
"@powerhousedao/builder-tools": "5.3.
|
|
74
|
-
"@powerhousedao/common": "5.3.
|
|
75
|
-
"@powerhousedao/design-system": "5.3.
|
|
72
|
+
"@powerhousedao/builder-profile": "1.0.3",
|
|
73
|
+
"@powerhousedao/builder-tools": "5.3.3",
|
|
74
|
+
"@powerhousedao/common": "5.3.3",
|
|
75
|
+
"@powerhousedao/design-system": "5.3.3",
|
|
76
76
|
"@powerhousedao/document-engineering": "^1.40.1",
|
|
77
77
|
"@powerhousedao/service-offering": "^0.0.1",
|
|
78
|
-
"@powerhousedao/vetra": "^5.3.
|
|
78
|
+
"@powerhousedao/vetra": "^5.3.3",
|
|
79
79
|
"@react-pdf/renderer": "^4.3.1",
|
|
80
80
|
"@safe-global/api-kit": "^4.0.0",
|
|
81
81
|
"@safe-global/protocol-kit": "^6.0.3",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@types/cors": "^2.8.17",
|
|
85
85
|
"axios": "^1.9.0",
|
|
86
86
|
"cors": "^2.8.5",
|
|
87
|
-
"document-model": "5.3.
|
|
87
|
+
"document-model": "5.3.3",
|
|
88
88
|
"dotenv": "^16.5.0",
|
|
89
89
|
"error": "^10.4.0",
|
|
90
90
|
"ethers": "^6.14.0",
|
|
@@ -100,22 +100,22 @@
|
|
|
100
100
|
"@electric-sql/pglite": "^0.2.12",
|
|
101
101
|
"@eslint/js": "^9.38.0",
|
|
102
102
|
"@powerhousedao/analytics-engine-core": "^0.5.0",
|
|
103
|
-
"@powerhousedao/codegen": "5.3.
|
|
104
|
-
"@powerhousedao/config": "5.3.
|
|
105
|
-
"@powerhousedao/connect": "5.3.
|
|
106
|
-
"@powerhousedao/ph-cli": "5.3.
|
|
107
|
-
"@powerhousedao/reactor-api": "5.3.
|
|
108
|
-
"@powerhousedao/reactor-browser": "5.3.
|
|
109
|
-
"@powerhousedao/reactor-local": "5.3.
|
|
103
|
+
"@powerhousedao/codegen": "5.3.3",
|
|
104
|
+
"@powerhousedao/config": "5.3.3",
|
|
105
|
+
"@powerhousedao/connect": "5.3.3",
|
|
106
|
+
"@powerhousedao/ph-cli": "5.3.3",
|
|
107
|
+
"@powerhousedao/reactor-api": "5.3.3",
|
|
108
|
+
"@powerhousedao/reactor-browser": "5.3.3",
|
|
109
|
+
"@powerhousedao/reactor-local": "5.3.3",
|
|
110
110
|
"@powerhousedao/scalars": "^2.0.1",
|
|
111
|
-
"@powerhousedao/switchboard": "5.3.
|
|
111
|
+
"@powerhousedao/switchboard": "5.3.3",
|
|
112
112
|
"@tailwindcss/cli": "^4.1.4",
|
|
113
113
|
"@testing-library/react": "^16.3.0",
|
|
114
114
|
"@types/node": "^24.9.2",
|
|
115
115
|
"@types/react": "^19.2.2",
|
|
116
116
|
"@types/react-dom": "^19.2.2",
|
|
117
117
|
"@vitejs/plugin-react": "^5.1.0",
|
|
118
|
-
"document-drive": "5.3.
|
|
118
|
+
"document-drive": "5.3.3",
|
|
119
119
|
"eslint": "^9.38.0",
|
|
120
120
|
"eslint-config-prettier": "^10.1.8",
|
|
121
121
|
"eslint-plugin-prettier": "^5.5.4",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface CreateHubProfileModalProps {
|
|
2
|
-
isOpen: boolean;
|
|
3
|
-
onClose: () => void;
|
|
4
|
-
onCreated?: (documentId: string) => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Custom modal for creating an Operational Hub Profile
|
|
8
|
-
* Uses the same design as the classic Connect CreateDocumentModal
|
|
9
|
-
*/
|
|
10
|
-
export declare function CreateHubProfileModal({ isOpen, onClose, onCreated, }: CreateHubProfileModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=CreateHubProfileModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateHubProfileModal.d.ts","sourceRoot":"","sources":["../../../../editors/contributor-billing/components/CreateHubProfileModal.tsx"],"names":[],"mappings":"AAkBA,UAAU,0BAA0B;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,OAAO,EACP,SAAS,GACV,EAAE,0BAA0B,2CAiI5B"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useCallback, useEffect } from "react";
|
|
3
|
-
import { Icon, Modal, PowerhouseButton } from "@powerhousedao/design-system";
|
|
4
|
-
import { FormInput } from "@powerhousedao/design-system/connect";
|
|
5
|
-
import { addDocument, dispatchActions, useSelectedDrive, setSelectedNode, } from "@powerhousedao/reactor-browser";
|
|
6
|
-
import { setName } from "document-model";
|
|
7
|
-
import { twMerge } from "tailwind-merge";
|
|
8
|
-
import { setOperationalHubName } from "../../../document-models/operational-hub-profile/gen/configuration/creators.js";
|
|
9
|
-
const buttonStyles = "min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";
|
|
10
|
-
const CLOSE_ANIMATION_DURATION = 300;
|
|
11
|
-
/**
|
|
12
|
-
* Custom modal for creating an Operational Hub Profile
|
|
13
|
-
* Uses the same design as the classic Connect CreateDocumentModal
|
|
14
|
-
*/
|
|
15
|
-
export function CreateHubProfileModal({ isOpen, onClose, onCreated, }) {
|
|
16
|
-
const [hubName, setHubName] = useState("");
|
|
17
|
-
const [isCreating, setIsCreating] = useState(false);
|
|
18
|
-
const [selectedDrive] = useSelectedDrive();
|
|
19
|
-
// Reset state when modal closes
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (!isOpen) {
|
|
22
|
-
setTimeout(() => setHubName(""), CLOSE_ANIMATION_DURATION);
|
|
23
|
-
setIsCreating(false);
|
|
24
|
-
}
|
|
25
|
-
}, [isOpen]);
|
|
26
|
-
const handleCancel = useCallback(() => {
|
|
27
|
-
onClose();
|
|
28
|
-
setTimeout(() => setHubName(""), CLOSE_ANIMATION_DURATION);
|
|
29
|
-
}, [onClose]);
|
|
30
|
-
const handleCreate = useCallback(async () => {
|
|
31
|
-
const trimmedName = hubName.trim();
|
|
32
|
-
const driveId = selectedDrive?.header.id;
|
|
33
|
-
if (!trimmedName || !driveId || isCreating)
|
|
34
|
-
return;
|
|
35
|
-
setIsCreating(true);
|
|
36
|
-
try {
|
|
37
|
-
// Create the document with the entered name
|
|
38
|
-
const createdNode = await addDocument(driveId, trimmedName, "powerhouse/operational-hub-profile", undefined, undefined, undefined, "operational-hub-profile-editor");
|
|
39
|
-
if (!createdNode?.id) {
|
|
40
|
-
console.error("Failed to create operational hub profile document");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
// Set the hub name field in the document state
|
|
44
|
-
await dispatchActions(setOperationalHubName({ name: trimmedName }), createdNode.id);
|
|
45
|
-
// Set the document name to match
|
|
46
|
-
await dispatchActions(setName(trimmedName), createdNode.id);
|
|
47
|
-
// Select the newly created document
|
|
48
|
-
setSelectedNode(createdNode.id);
|
|
49
|
-
// Notify parent and close
|
|
50
|
-
onCreated?.(createdNode.id);
|
|
51
|
-
onClose();
|
|
52
|
-
setTimeout(() => setHubName(""), CLOSE_ANIMATION_DURATION);
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
console.error("Error creating operational hub profile:", error);
|
|
56
|
-
}
|
|
57
|
-
finally {
|
|
58
|
-
setIsCreating(false);
|
|
59
|
-
}
|
|
60
|
-
}, [hubName, selectedDrive?.header.id, isCreating, onCreated, onClose]);
|
|
61
|
-
const handleSubmit = useCallback((e) => {
|
|
62
|
-
e.preventDefault();
|
|
63
|
-
if (hubName.trim() && !isCreating) {
|
|
64
|
-
void handleCreate();
|
|
65
|
-
}
|
|
66
|
-
}, [hubName, isCreating, handleCreate]);
|
|
67
|
-
const isValid = hubName.trim().length > 0;
|
|
68
|
-
return (_jsx(Modal, { open: isOpen, onOpenChange: (open) => {
|
|
69
|
-
if (!open)
|
|
70
|
-
handleCancel();
|
|
71
|
-
}, contentProps: {
|
|
72
|
-
className: "rounded-3xl",
|
|
73
|
-
}, children: _jsxs("form", { name: "create-hub-profile", className: "w-[400px] p-6 text-slate-300", onSubmit: handleSubmit, children: [_jsx("div", { className: "border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800", children: "Create your Operational Hub profile" }), _jsx("div", { className: "my-6", children: _jsx(FormInput, { icon: _jsx(Icon, { name: "BrickGlobe" }), onChange: (e) => setHubName(e.target.value), placeholder: "Operational Hub name", required: true, value: hubName, disabled: isCreating }) }), _jsxs("div", { className: "mt-8 flex justify-between gap-3", children: [_jsx("button", { type: "button", className: twMerge(buttonStyles, "flex-1 bg-slate-50 text-slate-800"), onClick: handleCancel, disabled: isCreating, children: "Cancel" }), _jsx(PowerhouseButton, { type: "submit", className: twMerge(buttonStyles, "flex-1 bg-gray-800 text-gray-50"), disabled: !isValid || isCreating, children: isCreating ? "Creating..." : "Create" })] })] }) }));
|
|
74
|
-
}
|