@powerhousedao/contributor-billing 0.1.54 → 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.
Files changed (83) hide show
  1. package/dist/document-models/account-transactions/gen/schema/zod.d.ts.map +1 -1
  2. package/dist/document-models/account-transactions/gen/schema/zod.js +3 -3
  3. package/dist/document-models/account-transactions/module.d.ts +1 -1
  4. package/dist/document-models/account-transactions/module.d.ts.map +1 -1
  5. package/dist/document-models/account-transactions/module.js +1 -1
  6. package/dist/document-models/accounts/gen/schema/zod.d.ts.map +1 -1
  7. package/dist/document-models/accounts/module.d.ts +1 -1
  8. package/dist/document-models/accounts/module.d.ts.map +1 -1
  9. package/dist/document-models/accounts/module.js +1 -1
  10. package/dist/document-models/billing-statement/gen/schema/zod.d.ts.map +1 -1
  11. package/dist/document-models/billing-statement/gen/schema/zod.js +4 -4
  12. package/dist/document-models/billing-statement/module.d.ts +1 -1
  13. package/dist/document-models/billing-statement/module.d.ts.map +1 -1
  14. package/dist/document-models/billing-statement/module.js +1 -1
  15. package/dist/document-models/expense-report/gen/schema/zod.d.ts.map +1 -1
  16. package/dist/document-models/expense-report/gen/schema/zod.js +38 -18
  17. package/dist/document-models/expense-report/module.d.ts +1 -1
  18. package/dist/document-models/expense-report/module.d.ts.map +1 -1
  19. package/dist/document-models/expense-report/module.js +1 -1
  20. package/dist/document-models/invoice/gen/schema/zod.js +11 -11
  21. package/dist/document-models/invoice/module.d.ts +1 -1
  22. package/dist/document-models/invoice/module.d.ts.map +1 -1
  23. package/dist/document-models/invoice/module.js +1 -1
  24. package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
  25. package/dist/document-models/invoice/src/reducers/general.js +8 -0
  26. package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
  27. package/dist/document-models/invoice/src/reducers/transitions.js +4 -0
  28. package/dist/document-models/operational-hub-profile/module.d.ts +1 -1
  29. package/dist/document-models/operational-hub-profile/module.d.ts.map +1 -1
  30. package/dist/document-models/operational-hub-profile/module.js +1 -1
  31. package/dist/document-models/snapshot-report/gen/schema/zod.d.ts.map +1 -1
  32. package/dist/document-models/snapshot-report/gen/schema/zod.js +12 -12
  33. package/dist/document-models/snapshot-report/module.d.ts +1 -1
  34. package/dist/document-models/snapshot-report/module.d.ts.map +1 -1
  35. package/dist/document-models/snapshot-report/module.js +1 -1
  36. package/dist/editors/builder-team-admin/components/DriveExplorer.d.ts.map +1 -1
  37. package/dist/editors/builder-team-admin/components/DriveExplorer.js +64 -4
  38. package/dist/editors/builder-team-admin/module.js +1 -1
  39. package/dist/editors/contributor-billing/components/DashboardHome.d.ts.map +1 -1
  40. package/dist/editors/contributor-billing/components/DashboardHome.js +2 -8
  41. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
  42. package/dist/editors/contributor-billing/components/DriveExplorer.js +52 -1
  43. package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -1
  44. package/dist/editors/contributor-billing/components/FolderTree.js +6 -15
  45. package/dist/editors/contributor-billing/components/MonthReportCard.d.ts +8 -1
  46. package/dist/editors/contributor-billing/components/MonthReportCard.d.ts.map +1 -1
  47. package/dist/editors/contributor-billing/components/MonthReportCard.js +6 -3
  48. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts +1 -1
  49. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts.map +1 -1
  50. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.js +56 -3
  51. package/dist/editors/contributor-billing/components/cbToast.d.ts.map +1 -1
  52. package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.d.ts.map +1 -1
  53. package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.js +42 -2
  54. package/dist/editors/contributor-billing/module.js +1 -1
  55. package/dist/editors/invoice/editor.d.ts.map +1 -1
  56. package/dist/editors/invoice/editor.js +3 -2
  57. package/dist/editors/invoice/legalEntity/legalEntity.d.ts +2 -1
  58. package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
  59. package/dist/editors/invoice/legalEntity/legalEntity.js +2 -2
  60. package/dist/editors/invoice/legalEntity/walletSection.d.ts +1 -0
  61. package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
  62. package/dist/editors/invoice/legalEntity/walletSection.js +2 -2
  63. package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
  64. package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
  65. package/dist/editors/invoice/validation/validationHandler.js +14 -1
  66. package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
  67. package/dist/editors/invoice/validation/validationManager.js +3 -1
  68. package/dist/editors/invoice/validation/validationRules.d.ts +2 -0
  69. package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
  70. package/dist/editors/invoice/validation/validationRules.js +50 -0
  71. package/dist/style.css +96 -3
  72. package/dist/subgraphs/budget-statements/resolvers.d.ts +38 -0
  73. package/dist/subgraphs/budget-statements/resolvers.d.ts.map +1 -1
  74. package/dist/subgraphs/budget-statements/resolvers.js +151 -44
  75. package/dist/subgraphs/budget-statements/resolvers.test.d.ts +2 -0
  76. package/dist/subgraphs/budget-statements/resolvers.test.d.ts.map +1 -0
  77. package/dist/subgraphs/budget-statements/resolvers.test.js +329 -0
  78. package/dist/subgraphs/budget-statements/schema.d.ts.map +1 -1
  79. package/dist/subgraphs/budget-statements/schema.js +8 -0
  80. package/package.json +33 -26
  81. package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts +0 -12
  82. package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts.map +0 -1
  83. package/dist/editors/contributor-billing/components/CreateHubProfileModal.js +0 -74
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@powerhousedao/contributor-billing",
3
3
  "description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
4
- "version": "0.1.54",
4
+ "version": "1.0.0-dev.4",
5
5
  "license": "AGPL-3.0-only",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/powerhouse-inc/contributor-billing"
9
+ },
6
10
  "type": "module",
7
11
  "files": [
8
12
  "/dist"
@@ -52,7 +56,7 @@
52
56
  "lint:fix": "npm run lint -- --fix",
53
57
  "tsc": "tsc",
54
58
  "tsc:watch": "tsc --watch",
55
- "tailwind": "pnpm exec tailwindcss -i ./style.css -o ./dist/style.css",
59
+ "tailwind": "bunx tailwindcss -i ./style.css -o ./dist/style.css",
56
60
  "prepublishOnly": "npm run build",
57
61
  "check-circular-imports": "npx dpdm -T ./index.ts",
58
62
  "generate": "ph-cli generate",
@@ -65,13 +69,13 @@
65
69
  "migrate": "ph-cli migrate"
66
70
  },
67
71
  "dependencies": {
68
- "@powerhousedao/builder-profile": "0.0.18",
69
- "@powerhousedao/builder-tools": "5.3.0",
70
- "@powerhousedao/common": "5.3.0",
71
- "@powerhousedao/design-system": "5.3.0",
72
- "@powerhousedao/document-engineering": "^1.40.0",
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
+ "@powerhousedao/document-engineering": "^1.40.1",
73
77
  "@powerhousedao/service-offering": "^0.0.1",
74
- "@powerhousedao/vetra": "^5.3.0",
78
+ "@powerhousedao/vetra": "^5.3.3",
75
79
  "@react-pdf/renderer": "^4.3.1",
76
80
  "@safe-global/api-kit": "^4.0.0",
77
81
  "@safe-global/protocol-kit": "^6.0.3",
@@ -80,7 +84,7 @@
80
84
  "@types/cors": "^2.8.17",
81
85
  "axios": "^1.9.0",
82
86
  "cors": "^2.8.5",
83
- "document-model": "5.3.0",
87
+ "document-model": "5.3.3",
84
88
  "dotenv": "^16.5.0",
85
89
  "error": "^10.4.0",
86
90
  "ethers": "^6.14.0",
@@ -96,22 +100,22 @@
96
100
  "@electric-sql/pglite": "^0.2.12",
97
101
  "@eslint/js": "^9.38.0",
98
102
  "@powerhousedao/analytics-engine-core": "^0.5.0",
99
- "@powerhousedao/codegen": "5.3.0",
100
- "@powerhousedao/config": "5.3.0",
101
- "@powerhousedao/connect": "5.3.0",
102
- "@powerhousedao/ph-cli": "5.3.0",
103
- "@powerhousedao/reactor-api": "5.3.0",
104
- "@powerhousedao/reactor-browser": "5.3.0",
105
- "@powerhousedao/reactor-local": "5.3.0",
106
- "@powerhousedao/scalars": "latest",
107
- "@powerhousedao/switchboard": "5.3.0",
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
+ "@powerhousedao/scalars": "^2.0.1",
111
+ "@powerhousedao/switchboard": "5.3.3",
108
112
  "@tailwindcss/cli": "^4.1.4",
109
113
  "@testing-library/react": "^16.3.0",
110
114
  "@types/node": "^24.9.2",
111
115
  "@types/react": "^19.2.2",
112
116
  "@types/react-dom": "^19.2.2",
113
117
  "@vitejs/plugin-react": "^5.1.0",
114
- "document-drive": "5.3.0",
118
+ "document-drive": "5.3.3",
115
119
  "eslint": "^9.38.0",
116
120
  "eslint-config-prettier": "^10.1.8",
117
121
  "eslint-plugin-prettier": "^5.5.4",
@@ -148,14 +152,17 @@
148
152
  }
149
153
  ],
150
154
  "plugins": [
151
- "@semantic-release/changelog",
152
- "@semantic-release/git",
153
155
  "@semantic-release/commit-analyzer",
154
156
  "@semantic-release/release-notes-generator",
155
- ["@semantic-release/npm", {
156
- "npmPublish": false
157
- }],
158
- "@semantic-release/github"
157
+ "@semantic-release/changelog",
158
+ [
159
+ "@semantic-release/npm",
160
+ {
161
+ "npmPublish": false
162
+ }
163
+ ],
164
+ "@semantic-release/github",
165
+ "@semantic-release/git"
159
166
  ]
160
167
  }
161
- }
168
+ }
@@ -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
- }