@powerhousedao/network-admin 0.0.21 → 0.0.23

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 (35) hide show
  1. package/dist/editors/network-admin/components/DriveExplorer.d.ts.map +1 -1
  2. package/dist/editors/network-admin/components/DriveExplorer.js +79 -16
  3. package/dist/editors/network-admin/components/icons/PaymentIcon.d.ts +3 -0
  4. package/dist/editors/network-admin/components/icons/PaymentIcon.d.ts.map +1 -0
  5. package/dist/editors/network-admin/components/icons/PaymentIcon.js +2 -0
  6. package/dist/editors/network-admin/components/icons/RfpIcon.d.ts +3 -0
  7. package/dist/editors/network-admin/components/icons/RfpIcon.d.ts.map +1 -0
  8. package/dist/editors/network-admin/components/icons/RfpIcon.js +2 -0
  9. package/dist/editors/network-admin/components/icons/SowIcon.d.ts +3 -0
  10. package/dist/editors/network-admin/components/icons/SowIcon.d.ts.map +1 -0
  11. package/dist/editors/network-admin/components/icons/SowIcon.js +2 -0
  12. package/dist/editors/network-admin/components/icons/WorkstreamIcon.d.ts +3 -0
  13. package/dist/editors/network-admin/components/icons/WorkstreamIcon.d.ts.map +1 -0
  14. package/dist/editors/network-admin/components/icons/WorkstreamIcon.js +2 -0
  15. package/dist/editors/network-admin/index.d.ts.map +1 -1
  16. package/dist/editors/network-admin/index.js +1 -0
  17. package/dist/editors/workstream/editor.d.ts.map +1 -1
  18. package/dist/editors/workstream/editor.js +17 -16
  19. package/dist/style.css +34 -25
  20. package/package.json +13 -13
  21. package/dist/editors/network-admin/components/CreateDocument.d.ts +0 -6
  22. package/dist/editors/network-admin/components/CreateDocument.d.ts.map +0 -1
  23. package/dist/editors/network-admin/components/CreateDocument.js +0 -24
  24. package/dist/editors/network-admin/components/FolderTree.d.ts +0 -15
  25. package/dist/editors/network-admin/components/FolderTree.d.ts.map +0 -1
  26. package/dist/editors/network-admin/components/FolderTree.js +0 -44
  27. package/dist/editors/network-admin/components/IsolatedSidebar.d.ts +0 -22
  28. package/dist/editors/network-admin/components/IsolatedSidebar.d.ts.map +0 -1
  29. package/dist/editors/network-admin/components/IsolatedSidebar.js +0 -107
  30. package/dist/editors/network-admin/components/IsolatedSidebarProvider.d.ts +0 -15
  31. package/dist/editors/network-admin/components/IsolatedSidebarProvider.d.ts.map +0 -1
  32. package/dist/editors/network-admin/components/IsolatedSidebarProvider.js +0 -367
  33. package/dist/editors/network-admin/utils.d.ts +0 -60
  34. package/dist/editors/network-admin/utils.d.ts.map +0 -1
  35. package/dist/editors/network-admin/utils.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AAuCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,2CAykBvC"}
1
+ {"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AA0CA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,2CAwpBvC"}
@@ -5,6 +5,10 @@ import { addDocument, setSelectedNode, useAllFolderNodes, useFileChildNodes, use
5
5
  import { useCallback, useRef, useState, useMemo, useEffect } from "react";
6
6
  import { EditorContainer } from "./EditorContainer.js";
7
7
  import { editWorkstream } from "../../../document-models/workstream/gen/creators.js";
8
+ import { PaymentIcon } from "./icons/PaymentIcon.js";
9
+ import { RfpIcon } from "./icons/RfpIcon.js";
10
+ import { SowIcon } from "./icons/SowIcon.js";
11
+ import { WorkstreamIcon } from "./icons/WorkstreamIcon.js";
8
12
  const WorkstreamStatusEnums = [
9
13
  "RFP_DRAFT",
10
14
  "PREWORK_RFC",
@@ -111,26 +115,85 @@ export function DriveExplorer(props) {
111
115
  ?.alternativeProposals;
112
116
  }
113
117
  // Only include documents that actually exist
114
- const wstrChildDocs = [sowDoc, rfpDoc, pmtDoc].filter((doc) => doc !== undefined && doc !== null);
118
+ const wstrChildDocs = [rfpDoc].filter((doc) => doc !== undefined && doc !== null);
115
119
  const returnableChildren = {
116
120
  id: `editor-${doc.header.id}`,
117
121
  title: `${doc.state?.global?.code ? doc.state?.global?.code + " - " : ""}${doc.state?.global?.title || doc.header.name}`,
118
- children: wstrChildDocs.map((childDoc) => ({
119
- id: `editor-${childDoc.header.id}`,
120
- title: `${childDoc.state?.global?.code ? childDoc.state?.global?.code + " - " : ""}${childDoc.state?.global?.title || childDoc.header.name}`,
121
- })),
122
+ icon: _jsx(WorkstreamIcon, { className: "w-5 h-5" }),
123
+ children: wstrChildDocs.map((childDoc) => {
124
+ let dynamicTitle = childDoc?.header.documentType === "powerhouse/rfp"
125
+ ? `Request For Proposal`
126
+ : `${childDoc.state?.global?.code ? childDoc.state?.global?.code + " - " : ""}${childDoc.state?.global?.title || childDoc.header.name}`;
127
+ return {
128
+ id: `editor-${childDoc.header.id}`,
129
+ title: dynamicTitle,
130
+ icon: _jsx(RfpIcon, { className: "w-5 h-5" }),
131
+ };
132
+ }),
122
133
  };
134
+ wstrChildDocs.push(sowDoc);
135
+ wstrChildDocs.push(pmtDoc);
136
+ // if sowDoc or pmtDoc is included in the wstrChildDocs, then add a child with the title "Initial Proposal"
137
+ if (wstrChildDocs.includes(sowDoc) ||
138
+ wstrChildDocs.includes(pmtDoc)) {
139
+ returnableChildren.children.push({
140
+ id: "initial-proposal",
141
+ title: "Initial Proposal",
142
+ children: wstrChildDocs
143
+ .filter((childDoc) => childDoc &&
144
+ childDoc.header &&
145
+ (childDoc.header.documentType ===
146
+ "powerhouse/scopeofwork" ||
147
+ childDoc.header.documentType === "payment-terms"))
148
+ .map((childDoc) => {
149
+ let dynamicTitle = childDoc.header.documentType ===
150
+ "powerhouse/scopeofwork"
151
+ ? "Scope of Work"
152
+ : childDoc.header.documentType === "payment-terms"
153
+ ? "Payment Terms"
154
+ : null;
155
+ return {
156
+ id: `editor-${childDoc.header.id}`,
157
+ title: dynamicTitle,
158
+ icon: childDoc.header.documentType ===
159
+ "powerhouse/scopeofwork" ? (_jsx(SowIcon, { className: "w-5 h-5" })) : (_jsx(PaymentIcon, { className: "w-5 h-5" })),
160
+ };
161
+ }),
162
+ });
163
+ }
123
164
  if (alternativeProposals.length > 0) {
124
- const altSowDoc = allDocuments?.find((doc) => doc.header.id === alternativeProposals[0].sow);
125
- const altPaymentTermsDoc = allDocuments?.find((doc) => doc.header.id === alternativeProposals[0].paymentTerms);
126
- const altChildDocs = [altSowDoc, altPaymentTermsDoc].filter((doc) => doc !== undefined && doc !== null);
127
165
  returnableChildren.children.push({
128
166
  id: "alternative-proposals",
129
- title: "Alternative Proposals",
130
- children: altChildDocs.map((childDoc) => ({
131
- id: `editor-${childDoc.header.id}`,
132
- title: `${childDoc.state?.global?.code ? childDoc.state?.global?.code + " - " : ""}${childDoc.state?.global?.title || childDoc.header.name}`,
133
- })),
167
+ title: `Alternative Proposals (${alternativeProposals.length})`,
168
+ children: alternativeProposals.map((proposal) => {
169
+ // Find documents for this specific proposal
170
+ const proposalSowDoc = allDocuments?.find((doc) => doc.header.id === proposal.sow);
171
+ const proposalPaymentTermsDoc = allDocuments?.find((doc) => doc.header.id === proposal.paymentTerms);
172
+ // Filter to only include documents that exist
173
+ const proposalChildDocs = [
174
+ proposalSowDoc,
175
+ proposalPaymentTermsDoc,
176
+ ].filter((doc) => doc !== undefined && doc !== null);
177
+ return {
178
+ id: `alternative-proposal-${proposal.id}`,
179
+ title: `${proposal.author.name}`,
180
+ children: proposalChildDocs.map((childDoc) => {
181
+ let dynamicTitle = childDoc.header.documentType ===
182
+ "powerhouse/scopeofwork"
183
+ ? "Scope of Work"
184
+ : childDoc.header.documentType ===
185
+ "payment-terms"
186
+ ? "Payment Terms"
187
+ : null;
188
+ return {
189
+ id: `editor-${childDoc.header.id}`,
190
+ title: dynamicTitle,
191
+ icon: childDoc.header.documentType ===
192
+ "powerhouse/scopeofwork" ? (_jsx(SowIcon, { className: "w-5 h-5" })) : (_jsx(PaymentIcon, { className: "w-5 h-5" })),
193
+ };
194
+ }),
195
+ };
196
+ }),
134
197
  });
135
198
  }
136
199
  return returnableChildren;
@@ -147,7 +210,7 @@ export function DriveExplorer(props) {
147
210
  // Add network profile documents
148
211
  ...networkProfileDocs.map((doc) => ({
149
212
  id: `editor-${doc.header.id}`,
150
- title: doc.header.name,
213
+ title: doc.state?.global?.name || doc.header.name,
151
214
  })),
152
215
  ],
153
216
  };
@@ -233,11 +296,11 @@ export function DriveExplorer(props) {
233
296
  , size: "medium", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Create Workstream Document", "aria-description": "Create Workstream Document", onClick: () => {
234
297
  setModalDocumentType("powerhouse/workstream");
235
298
  setOpenModal(true);
236
- }, children: _jsx("span", { children: "Create Workstream Document" }) }), _jsx(Button, { color: "dark" // Customize button appearance
299
+ }, children: _jsxs("span", { className: "flex items-center gap-2", children: [_jsx(WorkstreamIcon, { className: "w-7 h-7 text-white" }), "Create Workstream Document"] }) }), _jsx(Button, { color: "dark" // Customize button appearance
237
300
  , size: "medium", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Create Network Profile Document", "aria-description": "Create Network Profile Document", onClick: () => {
238
301
  setModalDocumentType("powerhouse/network-profile");
239
302
  setOpenModal(true);
240
- }, disabled: isNetworkProfileCreated, children: _jsx("span", { children: "Create Network Profile Document" }) })] })] }), networkAdminDocuments && networkAdminDocuments.length > 0 && (_jsxs("div", { className: "w-full", children: [_jsx("h3", { className: "mb-4 text-lg font-medium text-gray-700", children: "\uD83D\uDCC4 Documents" }), _jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 shadow-sm", children: _jsxs("table", { className: "w-full bg-white", children: [_jsx("thead", { className: "bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Name" }), _jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Type" }), _jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Actions" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: networkAdminDocuments.map((document) => {
303
+ }, disabled: isNetworkProfileCreated, children: _jsx("span", { className: "flex items-center gap-2", children: "Create Network Profile Document" }) })] })] }), networkAdminDocuments && networkAdminDocuments.length > 0 && (_jsxs("div", { className: "w-full", children: [_jsx("h3", { className: "mb-4 text-lg font-medium text-gray-700", children: "\uD83D\uDCC4 Documents" }), _jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 shadow-sm", children: _jsxs("table", { className: "w-full bg-white", children: [_jsx("thead", { className: "bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Name" }), _jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Type" }), _jsx("th", { className: "px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-1/4", children: "Actions" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: networkAdminDocuments.map((document) => {
241
304
  // Find the corresponding file node for actions
242
305
  const fileNode = fileChildren?.find((file) => file.id === document.header.id);
243
306
  return (_jsxs("tr", { className: "hover:bg-gray-50 transition-colors", children: [_jsx("td", { className: "px-2 py-2", children: _jsx("div", { className: "text-sm font-medium text-gray-900 truncate max-w-xs", title: fileNode?.name || document.header.name, children: fileNode?.name || document.header.name }) }), _jsx("td", { className: "px-2 py-2", children: _jsx("div", { className: "text-sm text-gray-500 truncate max-w-xs", title: document.header.documentType, children: document.header.documentType }) }), _jsx("td", { className: "px-2 py-2", children: _jsxs("div", { className: "flex gap-2 flex-wrap", children: [_jsx("button", { onClick: () => {
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const PaymentIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ //# sourceMappingURL=PaymentIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentIcon.d.ts","sourceRoot":"","sources":["../../../../../editors/network-admin/components/icons/PaymentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAe/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const PaymentIcon = (props) => (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsxs("g", { clipPath: "url(#clip0_3012_15021)", children: [_jsx("path", { d: "M11.3335 10.667C11.3335 10.4902 11.2632 10.3207 11.1382 10.1956C11.0131 10.0706 10.8436 10.0003 10.6668 10.0003H8.6668C8.40782 10.0003 8.30491 10.0834 8.26706 10.1338C8.24571 10.1623 8.22172 10.1892 8.1961 10.2139L4.46303 13.8135C4.19802 14.069 3.7759 14.0615 3.52032 13.7965C3.26478 13.5315 3.27231 13.1094 3.53724 12.8538L7.24167 9.28158C7.6045 8.83776 8.1459 8.66699 8.6668 8.66699H10.6668C11.1972 8.66699 11.7058 8.87786 12.0809 9.25293C12.4559 9.628 12.6668 10.1366 12.6668 10.667C12.6668 11.1974 12.4559 11.706 12.0809 12.0811C11.7058 12.4561 11.1972 12.667 10.6668 12.667H9.33347C8.96528 12.667 8.6668 12.3685 8.6668 12.0003C8.6668 11.6321 8.96528 11.3337 9.33347 11.3337H10.6668C10.8436 11.3337 11.0131 11.2634 11.1382 11.1383C11.2632 11.0133 11.3335 10.8438 11.3335 10.667Z", fill: "currentColor" }), _jsx("path", { d: "M15.4063 7.9627C15.9369 7.9777 16.4402 8.20324 16.8047 8.58901C17.1692 8.97475 17.3653 9.48953 17.3503 10.02C17.3353 10.5493 17.1107 11.0502 16.7266 11.4145L16.7273 11.4152L13.6758 14.3331C13.0671 15.0114 12.2191 15.3331 11.3334 15.3331H8.66672C8.40794 15.3331 8.3049 15.4162 8.26698 15.4666C8.23922 15.5036 8.20739 15.5377 8.17258 15.5682L7.10552 16.5018C6.82844 16.7441 6.40719 16.7163 6.16477 16.4393C5.92231 16.1622 5.95083 15.741 6.22792 15.4985L7.25266 14.6007C7.61538 14.1671 8.1512 13.9998 8.66672 13.9998H11.3334C11.9021 13.9998 12.3757 13.7966 12.6986 13.4275L12.739 13.3846L15.806 10.4516L15.8086 10.449C15.9374 10.3274 16.0126 10.1593 16.0176 9.98224C16.0226 9.80516 15.957 9.63312 15.8353 9.50437C15.7137 9.3758 15.5461 9.30046 15.3692 9.29539C15.2143 9.29101 15.063 9.34075 14.9415 9.43471L14.8868 9.48158L12.0873 12.0818C11.8175 12.3324 11.3951 12.3165 11.1446 12.0467C10.8943 11.7769 10.91 11.3551 11.1797 11.1046L13.9753 8.50958V8.50893C14.361 8.14444 14.8759 7.94779 15.4063 7.9627Z", fill: "currentColor" }), _jsx("path", { d: "M2.86177 12.1953C3.12212 11.9349 3.54412 11.9349 3.80447 12.1953L7.80447 16.1953C8.06482 16.4556 8.06482 16.8776 7.80447 17.138C7.54412 17.3983 7.12212 17.3983 6.86177 17.138L2.86177 13.138C2.60142 12.8776 2.60142 12.4556 2.86177 12.1953Z", fill: "currentColor" }), _jsx("path", { d: "M13.9334 8.00065C13.9334 7.30118 13.3666 6.73386 12.6672 6.73372C11.9676 6.73372 11.4002 7.30109 11.4002 8.00065C11.4004 8.70009 11.9677 9.26693 12.6672 9.26693C13.3665 9.26679 13.9333 8.70001 13.9334 8.00065ZM15.2668 8.00065C15.2666 9.43638 14.1029 10.6001 12.6672 10.6003C11.2313 10.6003 10.067 9.43647 10.0669 8.00065C10.0669 6.56471 11.2312 5.40039 12.6672 5.40039C14.103 5.40053 15.2668 6.5648 15.2668 8.00065Z", fill: "currentColor" }), _jsx("path", { d: "M7.3335 5.33366C7.3335 4.59728 6.73654 4.00033 6.00016 4.00033C5.26378 4.00033 4.66683 4.59728 4.66683 5.33366C4.66683 6.07004 5.26378 6.66699 6.00016 6.66699C6.73654 6.66699 7.3335 6.07004 7.3335 5.33366ZM8.66683 5.33366C8.66683 6.80642 7.47292 8.00033 6.00016 8.00033C4.5274 8.00033 3.3335 6.80642 3.3335 5.33366C3.3335 3.8609 4.5274 2.66699 6.00016 2.66699C7.47292 2.66699 8.66683 3.8609 8.66683 5.33366Z", fill: "currentColor" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_3012_15021", children: _jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(2 2)" }) }) })] }));
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const RfpIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ //# sourceMappingURL=RfpIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RfpIcon.d.ts","sourceRoot":"","sources":["../../../../../editors/network-admin/components/icons/RfpIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAK3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const RfpIcon = (props) => (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { d: "M3.3335 14.6663V5.33301C3.3335 4.80257 3.54436 4.29402 3.91943 3.91895C4.29451 3.54387 4.80306 3.33301 5.3335 3.33301H10.0002C10.3684 3.33301 10.6668 3.63148 10.6668 3.99967C10.6668 4.36786 10.3684 4.66634 10.0002 4.66634H5.3335C5.15668 4.66634 4.98717 4.73663 4.86214 4.86165C4.73712 4.98668 4.66683 5.1562 4.66683 5.33301V14.6663C4.66683 14.8432 4.73712 15.0127 4.86214 15.1377C4.98717 15.2627 5.15669 15.333 5.3335 15.333H14.6668C14.8436 15.333 15.0132 15.2627 15.1382 15.1377C15.2632 15.0127 15.3335 14.8432 15.3335 14.6663V9.99967C15.3335 9.63148 15.632 9.33301 16.0002 9.33301C16.3684 9.33301 16.6668 9.63148 16.6668 9.99967V14.6663C16.6668 15.1968 16.456 15.7053 16.0809 16.0804C15.7058 16.4555 15.1973 16.6663 14.6668 16.6663H5.3335C4.80306 16.6663 4.29451 16.4555 3.91943 16.0804C3.54436 15.7053 3.3335 15.1968 3.3335 14.6663Z", fill: "currentColor" }), _jsx("path", { d: "M15.9975 4.74967C15.9975 4.55147 15.919 4.36119 15.7788 4.22103C15.6386 4.0809 15.4484 4.00228 15.2502 4.00228C15.0519 4.0023 14.8617 4.08088 14.7215 4.22103L8.71304 10.2308H8.71239C8.6333 10.3097 8.5753 10.4074 8.54377 10.5146L8.15445 11.8447L9.48583 11.4561L9.5646 11.4274C9.64112 11.3942 9.71097 11.3467 9.77033 11.2874L15.7788 5.27832L15.8283 5.22363C15.9373 5.09059 15.9975 4.92321 15.9975 4.74967ZM17.3309 4.74967C17.3309 5.30154 17.1117 5.83079 16.7215 6.22103L10.713 12.2308C10.4756 12.468 10.1817 12.6413 9.85953 12.7354L9.86018 12.736L7.94481 13.2959H7.94416C7.77211 13.3461 7.58977 13.3488 7.41617 13.3044C7.24251 13.2599 7.08395 13.1694 6.95718 13.0426C6.83054 12.916 6.73996 12.7578 6.69546 12.5843C6.65097 12.4107 6.65373 12.2278 6.70393 12.0557H6.70458L7.26447 10.1403V10.1396C7.34719 9.85791 7.49068 9.59789 7.68439 9.37858L7.77033 9.28744L13.7788 3.27832L13.8537 3.20736C14.2354 2.86174 14.7328 2.66896 15.2502 2.66895C15.802 2.66895 16.3313 2.88815 16.7215 3.27832C17.1117 3.66853 17.3308 4.19784 17.3309 4.74967Z", fill: "currentColor" })] }));
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const SowIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ //# sourceMappingURL=SowIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SowIcon.d.ts","sourceRoot":"","sources":["../../../../../editors/network-admin/components/icons/SowIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAI3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const SowIcon = (props) => (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M14.5449 4.75293C13.9257 5.16578 13.1262 5.33366 12.222 5.33366C11.2775 5.33366 10.4142 4.92692 9.68164 4.61296C8.90718 4.28103 8.18455 4.00033 7.33333 4.00033C6.6121 4.00033 5.91032 4.23425 5.33333 4.66699V11.1182C5.95356 10.8239 6.63586 10.667 7.33333 10.667C8.47943 10.667 9.42618 11.0527 10.2474 11.3812C11.0928 11.7193 11.8129 12.0003 12.6667 12.0003L12.8014 11.9977C13.475 11.9705 14.1257 11.7394 14.6667 11.3337V4.66699L14.5449 4.75293ZM16 11.3337C16 11.5407 15.9519 11.7449 15.8594 11.93C15.7668 12.1151 15.6323 12.2759 15.4668 12.4001C14.7095 12.9681 13.7984 13.2916 12.8555 13.3298L12.6667 13.3337C11.5206 13.3337 10.5738 12.948 9.7526 12.6195C8.90721 12.2813 8.18713 12.0003 7.33333 12.0003C6.60958 12.0003 5.90821 12.2358 5.33333 12.667V16.667C5.33333 17.0352 5.03486 17.3337 4.66667 17.3337C4.29848 17.3337 4 17.0352 4 16.667V4.66699C4 4.46 4.04805 4.25578 4.14063 4.07064C4.23316 3.88557 4.3677 3.72476 4.5332 3.60059C5.34099 2.99475 6.32361 2.66699 7.33333 2.66699C8.48206 2.66699 9.42606 3.05298 10.207 3.3877C11.03 3.74039 11.6112 4.00033 12.222 4.00033C13.0349 4.00032 13.5525 3.83589 13.8665 3.60059C14.0646 3.45202 14.3003 3.36111 14.5469 3.33887C14.7935 3.31663 15.0415 3.36355 15.263 3.47428C15.4844 3.58499 15.6706 3.75527 15.8008 3.96582C15.931 4.17645 16 4.41938 16 4.66699V11.3337Z", fill: "currentColor" }) }));
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const WorkstreamIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ //# sourceMappingURL=WorkstreamIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkstreamIcon.d.ts","sourceRoot":"","sources":["../../../../../editors/network-admin/components/icons/WorkstreamIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAWlE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const WorkstreamIcon = (props) => (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { d: "M14.4716 6.86225C14.2112 6.6019 13.7892 6.6019 13.5289 6.86225C13.2685 7.1226 13.2685 7.54461 13.5289 7.80496L15.7242 10.0003L13.5289 12.1956C13.2685 12.4559 13.2685 12.8779 13.5289 13.1383C13.7892 13.3986 14.2112 13.3986 14.4716 13.1383L17.1382 10.4716C17.3986 10.2113 17.3986 9.78927 17.1382 9.52892L14.4716 6.86225Z", fill: "currentColor" }), _jsx("path", { d: "M3.3335 9.33301C2.96531 9.33301 2.66683 9.63148 2.66683 9.99967C2.66683 10.3679 2.96531 10.6663 3.3335 10.6663H16.6668C17.035 10.6663 17.3335 10.3679 17.3335 9.99967C17.3335 9.63148 17.035 9.33301 16.6668 9.33301H3.3335Z", fill: "currentColor" }), _jsx("path", { d: "M11.3335 8.66667C11.3335 8.29848 11.035 8 10.6668 8C10.2986 8 10.0002 8.29848 10.0002 8.66667L10.0002 9.33333C10.0002 9.70152 10.2986 10 10.6668 10C11.035 10 11.3335 9.70152 11.3335 9.33333L11.3335 8.66667Z", fill: "currentColor" }), _jsx("path", { d: "M8.6665 10.6667C8.6665 10.2985 8.36803 10 7.99984 10C7.63165 10 7.33317 10.2985 7.33317 10.6667L7.33317 11.3333C7.33317 11.7015 7.63165 12 7.99984 12C8.36803 12 8.6665 11.7015 8.6665 11.3333L8.6665 10.6667Z", fill: "currentColor" }), _jsx("path", { d: "M6 8.66667C6 8.29848 5.70152 8 5.33333 8C4.96514 8 4.66667 8.29848 4.66667 8.66667L4.66667 9.33333C4.66667 9.70152 4.96514 10 5.33333 10C5.70152 10 6 9.70152 6 9.33333L6 8.66667Z", fill: "currentColor" }), _jsx("path", { d: "M7 13.333C7 12.7807 7.44772 12.333 8 12.333C8.55228 12.333 9 12.7807 9 13.333C9 13.8853 8.55228 14.333 8 14.333V15.333C9.10457 15.333 10 14.4376 10 13.333C10 12.2284 9.10457 11.333 8 11.333C6.89543 11.333 6 12.2284 6 13.333C6 14.4376 6.89543 15.333 8 15.333V14.333C7.44772 14.333 7 13.8853 7 13.333Z", fill: "currentColor" }), _jsx("path", { d: "M9.6665 6.66699C9.6665 6.11471 10.1142 5.66699 10.6665 5.66699C11.2188 5.66699 11.6665 6.11471 11.6665 6.66699C11.6665 7.21928 11.2188 7.66699 10.6665 7.66699V8.66699C11.7711 8.66699 12.6665 7.77156 12.6665 6.66699C12.6665 5.56242 11.7711 4.66699 10.6665 4.66699C9.56193 4.66699 8.6665 5.56242 8.6665 6.66699C8.6665 7.77156 9.56193 8.66699 10.6665 8.66699V7.66699C10.1142 7.66699 9.6665 7.21928 9.6665 6.66699Z", fill: "currentColor" }), _jsx("path", { d: "M4.3335 6.66699C4.3335 6.11471 4.78121 5.66699 5.3335 5.66699C5.88578 5.66699 6.3335 6.11471 6.3335 6.66699C6.3335 7.21928 5.88578 7.66699 5.3335 7.66699V8.66699C6.43807 8.66699 7.3335 7.77156 7.3335 6.66699C7.3335 5.56242 6.43807 4.66699 5.3335 4.66699C4.22893 4.66699 3.3335 5.56242 3.3335 6.66699C3.3335 7.77156 4.22893 8.66699 5.3335 8.66699V7.66699C4.78121 7.66699 4.3335 7.21928 4.3335 6.66699Z", fill: "currentColor" })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../editors/network-admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,eAAO,MAAM,MAAM,EAAE,iBAmBpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../editors/network-admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,eAAO,MAAM,MAAM,EAAE,iBAoBpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -13,6 +13,7 @@ export const module = {
13
13
  "powerhouse/workstream",
14
14
  "powerhouse/scopeofwork",
15
15
  "payment-terms",
16
+ "powerhouse/rfp",
16
17
  ],
17
18
  dragAndDrop: {
18
19
  enabled: true, // Enable drag-and-drop functionality
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/workstream/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAiCtE,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAsBjC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,GAAG,2CAyiCxC"}
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/workstream/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAiCtE,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAsBjC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,GAAG,2CAuiCxC"}
@@ -146,7 +146,7 @@ export default function Editor(props) {
146
146
  rfpDocumentNode.header.id === "") {
147
147
  setRfpDocument((prev) => (prev === undefined ? prev : undefined));
148
148
  }
149
- }, [rfpDocumentNode, rfpDocumentDataState]);
149
+ }, [rfpDocumentNode, rfpDocumentDataState, newlyCreatedRfpId]);
150
150
  const searchRfpDocuments = (userInput) => {
151
151
  const results = allDocuments?.filter((node) => node.header.documentType === "powerhouse/rfp" &&
152
152
  (!userInput ||
@@ -261,12 +261,13 @@ export default function Editor(props) {
261
261
  editable: true,
262
262
  onSave: (newValue, context) => {
263
263
  if (newValue !== context.row.title) {
264
- // dispatch(
265
- // actions.editDeliverable({
266
- // id: context.row.id,
267
- // title: newValue as string,
268
- // })
269
- // );
264
+ dispatch(actions.editAlternativeProposal({
265
+ id: context.row.id,
266
+ proposalAuthor: {
267
+ id: context.row.authorId,
268
+ name: newValue,
269
+ },
270
+ }));
270
271
  return true;
271
272
  }
272
273
  return false;
@@ -365,11 +366,11 @@ export default function Editor(props) {
365
366
  if (e.target.value !== state.client?.icon) {
366
367
  handleClientChange("icon", e.target.value);
367
368
  }
368
- }, placeholder: "Enter client icon URL" })] })] })] })] }), rfpDocument ? (_jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsxs("div", { className: "w-full flex flex-row items-center gap-8", children: [_jsx("div", { className: "w-[350px]", children: _jsx(OIDInput, { name: "Request for Proposal", label: "RFP Document", placeholder: "Search for RFP Document", variant: "withValueTitleAndDescription", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
369
+ }, placeholder: "Enter client icon URL" })] })] })] })] }), _jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsxs("div", { className: "w-full flex flex-row items-center gap-8", children: [_jsx("div", { className: "w-[350px]", children: _jsx(OIDInput, { name: "Request for Proposal", label: "RFP Document", placeholder: "Search for RFP Document", variant: "withValueTitleAndDescription", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
369
370
  if (e.target.value !== state.rfp?.id) {
370
371
  dispatch(actions.setRequestForProposal({
371
372
  rfpId: e.target.value,
372
- title: rfpDocument.document.title,
373
+ title: rfpDocument?.document.title || "",
373
374
  }));
374
375
  }
375
376
  },
@@ -409,19 +410,19 @@ export default function Editor(props) {
409
410
  };
410
411
  }, initialOptions: [
411
412
  {
412
- value: rfpDocument.header.id,
413
- title: rfpDocument.document.title,
413
+ value: rfpDocument?.header.id || "",
414
+ title: rfpDocument?.document.title || "",
414
415
  path: {
415
- text: rfpDocument.document.title,
416
- url: rfpDocument.header.id,
416
+ text: rfpDocument?.document.title || "",
417
+ url: rfpDocument?.header.id || "",
417
418
  },
418
419
  description: "",
419
420
  icon: "File",
420
421
  },
421
- ] }) }), _jsx("div", { className: "flex items-center", children: _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Icon, { className: "hover:cursor-pointer hover:bg-gray-500", name: "Moved", size: 18, onClick: () => {
422
+ ] }) }), rfpDocument ? (_jsx("div", { className: "flex items-center", children: _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Icon, { className: "hover:cursor-pointer hover:bg-gray-500", name: "Moved", size: 18, onClick: () => {
422
423
  setActiveDocumentId(rfpDocument?.header.id);
423
424
  setActiveSidebarNodeId(`editor-${rfpDocument?.header.id}`);
424
- } }), _jsx("span", { children: "RFP Editor" })] }) })] })] })) : (_jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light", size: "small", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Save Workstream", "aria-description": "Save Workstream", onClick: async () => {
425
+ } }), _jsx("span", { children: "RFP Editor" })] }) })) : ("")] }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light", size: "small", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Save Workstream", "aria-description": "Save Workstream", onClick: async () => {
425
426
  const createdNode = await createRfpDocument();
426
427
  if (createdNode) {
427
428
  // Set local state to immediately show the new RFP ID
@@ -431,7 +432,7 @@ export default function Editor(props) {
431
432
  title: createdNode.name,
432
433
  }));
433
434
  }
434
- }, children: "Create RFP Document" }) })] })), rfpDocument ? (_jsx("div", { children: state.initialProposal ? (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsxs("div", { className: "flex flex-row gap-4 mb-6", children: [_jsx("div", { className: "flex-1", children: _jsx(TextInput, { label: "Author", value: manualAuthorInput ||
435
+ }, children: "Create RFP Document" }) })) : ("")] }), rfpDocument ? (_jsx("div", { children: state.initialProposal ? (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsxs("div", { className: "flex flex-row gap-4 mb-6", children: [_jsx("div", { className: "flex-1", children: _jsx(TextInput, { label: "Author", value: manualAuthorInput ||
435
436
  state.initialProposal?.author?.name ||
436
437
  "", onChange: (e) => {
437
438
  setManualAuthorInput(e.target.value);
package/dist/style.css CHANGED
@@ -423,6 +423,9 @@
423
423
  .h-6 {
424
424
  height: calc(var(--spacing) * 6);
425
425
  }
426
+ .h-7 {
427
+ height: calc(var(--spacing) * 7);
428
+ }
426
429
  .h-8 {
427
430
  height: calc(var(--spacing) * 8);
428
431
  }
@@ -450,6 +453,9 @@
450
453
  .w-6 {
451
454
  width: calc(var(--spacing) * 6);
452
455
  }
456
+ .w-7 {
457
+ width: calc(var(--spacing) * 7);
458
+ }
453
459
  .w-8 {
454
460
  width: calc(var(--spacing) * 8);
455
461
  }
@@ -492,6 +498,9 @@
492
498
  .border-collapse {
493
499
  border-collapse: collapse;
494
500
  }
501
+ .transform {
502
+ transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
503
+ }
495
504
  .cursor-pointer {
496
505
  cursor: pointer;
497
506
  }
@@ -7722,26 +7731,6 @@ input[type="number"] {
7722
7731
  inherits: false;
7723
7732
  initial-value: 0;
7724
7733
  }
7725
- @property --tw-rotate-x {
7726
- syntax: "*";
7727
- inherits: false;
7728
- }
7729
- @property --tw-rotate-y {
7730
- syntax: "*";
7731
- inherits: false;
7732
- }
7733
- @property --tw-rotate-z {
7734
- syntax: "*";
7735
- inherits: false;
7736
- }
7737
- @property --tw-skew-x {
7738
- syntax: "*";
7739
- inherits: false;
7740
- }
7741
- @property --tw-skew-y {
7742
- syntax: "*";
7743
- inherits: false;
7744
- }
7745
7734
  @property --tw-outline-style {
7746
7735
  syntax: "*";
7747
7736
  inherits: false;
@@ -26209,6 +26198,26 @@ input[type="number"] {
26209
26198
  }
26210
26199
  }
26211
26200
  }
26201
+ @property --tw-rotate-x {
26202
+ syntax: "*";
26203
+ inherits: false;
26204
+ }
26205
+ @property --tw-rotate-y {
26206
+ syntax: "*";
26207
+ inherits: false;
26208
+ }
26209
+ @property --tw-rotate-z {
26210
+ syntax: "*";
26211
+ inherits: false;
26212
+ }
26213
+ @property --tw-skew-x {
26214
+ syntax: "*";
26215
+ inherits: false;
26216
+ }
26217
+ @property --tw-skew-y {
26218
+ syntax: "*";
26219
+ inherits: false;
26220
+ }
26212
26221
  @property --tw-space-y-reverse {
26213
26222
  syntax: "*";
26214
26223
  inherits: false;
@@ -26412,6 +26421,11 @@ input[type="number"] {
26412
26421
  @layer properties {
26413
26422
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
26414
26423
  *, ::before, ::after, ::backdrop {
26424
+ --tw-rotate-x: initial;
26425
+ --tw-rotate-y: initial;
26426
+ --tw-rotate-z: initial;
26427
+ --tw-skew-x: initial;
26428
+ --tw-skew-y: initial;
26415
26429
  --tw-space-y-reverse: 0;
26416
26430
  --tw-space-x-reverse: 0;
26417
26431
  --tw-divide-y-reverse: 0;
@@ -26459,11 +26473,6 @@ input[type="number"] {
26459
26473
  --tw-translate-x: 0;
26460
26474
  --tw-translate-y: 0;
26461
26475
  --tw-translate-z: 0;
26462
- --tw-rotate-x: initial;
26463
- --tw-rotate-y: initial;
26464
- --tw-rotate-z: initial;
26465
- --tw-skew-x: initial;
26466
- --tw-skew-y: initial;
26467
26476
  --tw-outline-style: solid;
26468
26477
  --tw-ease: initial;
26469
26478
  --tw-content: "";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/network-admin",
3
3
  "description": "Network Admin package for Powerhouse",
4
- "version": "0.0.21",
4
+ "version": "0.0.23",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [
@@ -55,13 +55,13 @@
55
55
  "service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
56
56
  },
57
57
  "dependencies": {
58
- "@powerhousedao/builder-tools": "^5.0.0-staging.21",
59
- "@powerhousedao/common": "^5.0.0-staging.21",
60
- "@powerhousedao/design-system": "^5.0.0-staging.21",
58
+ "@powerhousedao/builder-tools": "^5.0.0-staging.22",
59
+ "@powerhousedao/common": "^5.0.0-staging.22",
60
+ "@powerhousedao/design-system": "^5.0.0-staging.22",
61
61
  "@powerhousedao/document-engineering": "^1.38.0",
62
- "@powerhousedao/project-management": "0.0.40",
62
+ "@powerhousedao/project-management": "0.0.41",
63
63
  "@uiw/react-md-editor": "^4.0.8",
64
- "document-model": "^5.0.0-staging.21",
64
+ "document-model": "^5.0.0-staging.22",
65
65
  "error": "^10.4.0",
66
66
  "graphql": "^16.10.0",
67
67
  "graphql-tag": "^2.12.6",
@@ -73,19 +73,19 @@
73
73
  "@electric-sql/pglite": "^0.2.12",
74
74
  "@eslint/js": "^9.25.0",
75
75
  "@powerhousedao/analytics-engine-core": "^0.5.0",
76
- "@powerhousedao/codegen": "^5.0.0-staging.21",
77
- "@powerhousedao/ph-cli": "^5.0.0-staging.21",
78
- "@powerhousedao/reactor-api": "^5.0.0-staging.21",
79
- "@powerhousedao/reactor-browser": "^5.0.0-staging.21",
80
- "@powerhousedao/reactor-local": "^5.0.0-staging.21",
76
+ "@powerhousedao/codegen": "^5.0.0-staging.22",
77
+ "@powerhousedao/ph-cli": "^5.0.0-staging.22",
78
+ "@powerhousedao/reactor-api": "^5.0.0-staging.22",
79
+ "@powerhousedao/reactor-browser": "^5.0.0-staging.22",
80
+ "@powerhousedao/reactor-local": "^5.0.0-staging.22",
81
81
  "@powerhousedao/scalars": "^1.33.1-staging.5",
82
- "@powerhousedao/switchboard": "^5.0.0-staging.21",
82
+ "@powerhousedao/switchboard": "^5.0.0-staging.22",
83
83
  "@tailwindcss/cli": "^4.1.4",
84
84
  "@testing-library/react": "^16.3.0",
85
85
  "@types/node": "^22.14.1",
86
86
  "@types/react": "^18.3.20",
87
87
  "@vitejs/plugin-react": "^4.4.1",
88
- "document-drive": "^5.0.0-staging.21",
88
+ "document-drive": "^5.0.0-staging.22",
89
89
  "eslint": "^9.25.0",
90
90
  "eslint-plugin-react": "^7.37.5",
91
91
  "eslint-plugin-react-hooks": "^5.2.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * Document creation UI component.
3
- * Displays available document types as clickable buttons.
4
- */
5
- export declare const CreateDocument: () => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=CreateDocument.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateDocument.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/CreateDocument.tsx"],"names":[],"mappings":"AASA;;;GAGG;AACH,eAAO,MAAM,cAAc,+CAmD1B,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { addDocument, useDocumentModelModules, useSelectedDriveId, useSelectedFolder, } from "@powerhousedao/reactor-browser";
3
- import { Button } from "@powerhousedao/design-system";
4
- /**
5
- * Document creation UI component.
6
- * Displays available document types as clickable buttons.
7
- */
8
- export const CreateDocument = () => {
9
- const selectedDriveId = useSelectedDriveId();
10
- const selectedFolder = useSelectedFolder();
11
- const documentModelModules = useDocumentModelModules();
12
- async function handleAddDocument(module) {
13
- if (!selectedDriveId) {
14
- return;
15
- }
16
- await addDocument(selectedDriveId, `New ${module.documentModel.name} document`, module.documentModel.id, selectedFolder?.id, undefined, undefined, "workstream-editor");
17
- }
18
- 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: documentModelModules
19
- ?.filter((module) => module.documentModel.id === "powerhouse/workstream")
20
- .map((documentModelModule) => {
21
- return (_jsx(Button, { color: "light" // Customize button appearance
22
- , size: "small", className: "cursor-pointer", title: documentModelModule.documentModel.name, "aria-description": documentModelModule.documentModel.description, onClick: () => handleAddDocument(documentModelModule), children: _jsx("span", { className: "text-sm", children: documentModelModule.documentModel.name }) }, documentModelModule.documentModel.id));
23
- }) })] }));
24
- };
@@ -1,15 +0,0 @@
1
- import type { FolderNode, FileNode } from "document-drive";
2
- interface FolderTreeProps {
3
- folders: FolderNode[];
4
- files: FileNode[];
5
- selectedNodeId?: string;
6
- onSelectNode: (nodeId: string | undefined) => void;
7
- onSelectFile: (fileNode: FileNode) => void;
8
- }
9
- /**
10
- * Hierarchical folder tree navigation component.
11
- * Displays folders in a tree structure with expand/collapse functionality.
12
- */
13
- export declare function FolderTree({ folders, files, selectedNodeId, onSelectNode, onSelectFile, }: FolderTreeProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
15
- //# sourceMappingURL=FolderTree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FolderTree.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/FolderTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG3D,UAAU,eAAe;IACvB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,GACb,EAAE,eAAe,2CAqHjB"}
@@ -1,44 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- /**
4
- * Hierarchical folder tree navigation component.
5
- * Displays folders in a tree structure with expand/collapse functionality.
6
- */
7
- export function FolderTree({ folders, files, selectedNodeId, onSelectNode, onSelectFile, }) {
8
- // Track which folders are expanded
9
- const [expandedFolders, setExpandedFolders] = useState(new Set());
10
- // Toggle folder expansion state
11
- const toggleFolder = (folderId) => {
12
- setExpandedFolders((prev) => {
13
- const next = new Set(prev);
14
- if (next.has(folderId)) {
15
- next.delete(folderId);
16
- }
17
- else {
18
- next.add(folderId);
19
- }
20
- return next;
21
- });
22
- };
23
- // Recursive function to render folder tree structure
24
- const renderFolder = (folder, level = 0) => {
25
- const hasChildFolders = folders.some((f) => f.parentFolder === folder.id);
26
- const hasChildFiles = files.some((f) => f.parentFolder === folder.id);
27
- const hasChildren = hasChildFolders || hasChildFiles;
28
- const isExpanded = expandedFolders.has(folder.id);
29
- const isSelected = selectedNodeId === folder.id;
30
- return (_jsxs("div", { children: [_jsxs("div", { className: `flex cursor-pointer items-center rounded px-2 py-1 text-sm hover:bg-gray-100 ${isSelected ? "bg-blue-100 text-blue-800" : ""}`, style: { paddingLeft: `${level * 16 + 8}px` }, onClick: () => onSelectNode(folder.id), children: [hasChildren && (_jsxs("button", { className: "mr-1 flex h-4 w-4 items-center justify-center", onClick: (e) => {
31
- e.stopPropagation();
32
- toggleFolder(folder.id);
33
- }, children: [isExpanded ? "▼" : "▶", " "] })), !hasChildren && _jsx("div", { className: "mr-1 w-5" }), _jsxs("span", { children: ["\uD83D\uDCC1 ", folder.name] })] }), isExpanded && hasChildren && (_jsxs("div", { children: [folders
34
- .filter((f) => f.parentFolder === folder.id)
35
- .map((child) => renderFolder(child, level + 1)), files
36
- .filter((f) => f.parentFolder === folder.id)
37
- .map((file) => (_jsxs("div", { className: `flex cursor-pointer items-center rounded px-2 py-1 text-sm hover:bg-gray-100 ${selectedNodeId === file.id ? "bg-blue-100 text-blue-800" : ""}`, style: { paddingLeft: `${(level + 1) * 16 + 8}px` }, onClick: () => onSelectFile(file), children: [_jsx("div", { className: "mr-1 w-5" }), _jsxs("span", { children: ["\uD83D\uDCC4 ", file.name] })] }, file.id)))] }))] }, folder.id));
38
- };
39
- return (_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: `flex cursor-pointer items-center rounded px-2 py-1 text-sm hover:bg-gray-100 ${!selectedNodeId ? "bg-blue-100 text-blue-800" : ""}`, onClick: () => onSelectNode(undefined), children: _jsx("span", { children: "\uD83C\uDFE0 Root" }) }), folders
40
- .filter((folder) => !folder.parentFolder)
41
- .map((folder) => renderFolder(folder)), files
42
- .filter((file) => !file.parentFolder)
43
- .map((file) => (_jsxs("div", { className: `flex cursor-pointer items-center rounded px-2 py-1 text-sm hover:bg-gray-100 ${selectedNodeId === file.id ? "bg-blue-100 text-blue-800" : ""}`, style: { paddingLeft: "8px" }, onClick: () => onSelectFile(file), children: [_jsx("div", { className: "mr-1 w-5" }), _jsxs("span", { children: ["\uD83D\uDCC4 ", file.name] })] }, file.id)))] }));
44
- }
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- /**
3
- * Isolated Sidebar component that uses our custom context instead of the global one
4
- * This prevents interference with other sidebars in the application
5
- */
6
- export declare const IsolatedSidebar: React.FC<{
7
- nodes: any[];
8
- activeNodeId?: string;
9
- onActiveNodeChange?: (nodeId: string) => void;
10
- sidebarTitle?: string;
11
- showSearchBar?: boolean;
12
- allowPinning?: boolean;
13
- resizable?: boolean;
14
- initialWidth?: number;
15
- maxWidth?: number;
16
- enableMacros?: number;
17
- handleOnTitleClick?: () => void;
18
- className?: string;
19
- style?: React.CSSProperties;
20
- children?: React.ReactNode;
21
- }>;
22
- //# sourceMappingURL=IsolatedSidebar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IsolatedSidebar.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/IsolatedSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAyTA,CAAC"}