@powerhousedao/vetra 6.2.2-dev.8 → 6.2.2-dev.80
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/codegen/index.d.ts +5 -5
- package/dist/codegen/index.js +5 -5
- package/dist/codegen/spec.d.ts +1 -1
- package/dist/codegen/spec.js +1 -1
- package/dist/{connect-CjGVphlq.js → connect-qpJ9OUaH.js} +1 -1
- package/dist/{connect-CjGVphlq.js.map → connect-qpJ9OUaH.js.map} +1 -1
- package/dist/document-models/app-module/index.d.ts +1 -1
- package/dist/document-models/app-module/index.js +35 -2
- package/dist/document-models/app-module/index.js.map +1 -0
- package/dist/document-models/document-editor/index.d.ts +1 -1
- package/dist/document-models/document-editor/index.js +37 -4
- package/dist/document-models/document-editor/index.js.map +1 -0
- package/dist/document-models/index.d.ts +5 -5
- package/dist/document-models/index.js +4 -4
- package/dist/document-models/processor-module/index.d.ts +1 -1
- package/dist/document-models/processor-module/index.js +37 -4
- package/dist/document-models/processor-module/index.js.map +1 -0
- package/dist/document-models/subgraph-module/index.d.ts +1 -1
- package/dist/document-models/subgraph-module/index.js +37 -4
- package/dist/document-models/subgraph-module/index.js.map +1 -0
- package/dist/document-models/vetra-package/index.d.ts +1 -1
- package/dist/document-models/vetra-package/index.js +3 -2
- package/dist/{editor-DhxLTv2_.js → editor-CZrushH_.js} +4 -4
- package/dist/{editor-DhxLTv2_.js.map → editor-CZrushH_.js.map} +1 -1
- package/dist/{editor-LMWvf0-d.js → editor-DXM7ZZ2W.js} +4 -4
- package/dist/{editor-LMWvf0-d.js.map → editor-DXM7ZZ2W.js.map} +1 -1
- package/dist/{editor-BmYxPe_4.js → editor-Fgw7attg.js} +1 -1
- package/dist/{editor-BmYxPe_4.js.map → editor-Fgw7attg.js.map} +1 -1
- package/dist/{editor-CJw40LpC.js → editor-I9HRg_wF.js} +4 -4
- package/dist/{editor-CJw40LpC.js.map → editor-I9HRg_wF.js.map} +1 -1
- package/dist/{editor-B61yLjcN.js → editor-XRng_6Ra.js} +3 -3
- package/dist/{editor-B61yLjcN.js.map → editor-XRng_6Ra.js.map} +1 -1
- package/dist/{editor-B5Vlvtap.js → editor-wimIhjYF.js} +4 -4
- package/dist/{editor-B5Vlvtap.js.map → editor-wimIhjYF.js.map} +1 -1
- package/dist/editors/hooks/index.js +1 -1
- package/dist/editors/index.js +1 -1
- package/dist/{factory-DtBWM7Ap.js → factory-B8aFEQk2.js} +3 -3
- package/dist/{factory-DtBWM7Ap.js.map → factory-B8aFEQk2.js.map} +1 -1
- package/dist/{factory-Dnymdhbp.js → factory-Cn0UwIFB.js} +2 -2
- package/dist/{factory-Dnymdhbp.js.map → factory-Cn0UwIFB.js.map} +1 -1
- package/dist/{hooks-T8Fh8Ytk.js → hooks-D_8Uwk1s.js} +1 -1
- package/dist/{hooks-T8Fh8Ytk.js.map → hooks-D_8Uwk1s.js.map} +1 -1
- package/dist/{index-HHjpYUNP.d.ts → index-B5ijieNt.d.ts} +1 -1
- package/dist/{index-HHjpYUNP.d.ts.map → index-B5ijieNt.d.ts.map} +1 -1
- package/dist/{index-DMMMQaUe.d.ts → index-Dm_gN1DR.d.ts} +1 -1
- package/dist/{index-DMMMQaUe.d.ts.map → index-Dm_gN1DR.d.ts.map} +1 -1
- package/dist/{index-D2tNV62S.d.ts → index-SB-AtQdU.d.ts} +1 -1
- package/dist/{index-D2tNV62S.d.ts.map → index-SB-AtQdU.d.ts.map} +1 -1
- package/dist/{index-BES2zg3c.d.ts → index-f_um1g-i.d.ts} +1 -1
- package/dist/{index-BES2zg3c.d.ts.map → index-f_um1g-i.d.ts.map} +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/{logger-Bst62sUy.js → logger-DLnGUZk9.js} +1 -1
- package/dist/{logger-Bst62sUy.js.map → logger-DLnGUZk9.js.map} +1 -1
- package/dist/{module-C_lcZZZ9.js → module-BB7MWRr2.js} +7 -7
- package/dist/{module-C_lcZZZ9.js.map → module-BB7MWRr2.js.map} +1 -1
- package/dist/{module-C0jUPu9F.js → module-Bx1OEHxF.js} +2 -2
- package/dist/{module-C0jUPu9F.js.map → module-Bx1OEHxF.js.map} +1 -1
- package/dist/{module-1hr_ne9w.js → module-CRfHlbnq.js} +1 -1
- package/dist/{module-1hr_ne9w.js.map → module-CRfHlbnq.js.map} +1 -1
- package/dist/{module-DP3bVbak.js → module-Chqkdq4U.js} +2 -2
- package/dist/{module-DP3bVbak.js.map → module-Chqkdq4U.js.map} +1 -1
- package/dist/{module-mtR8W4L4.js → module-bKT_e3CH.js} +2 -2
- package/dist/{module-mtR8W4L4.js.map → module-bKT_e3CH.js.map} +1 -1
- package/dist/{module-D3n9Z2mN.d.ts → module-ciAK1LUC.d.ts} +1 -1
- package/dist/{module-D3n9Z2mN.d.ts.map → module-ciAK1LUC.d.ts.map} +1 -1
- package/dist/{ph-factories-Dvy-HW6C.js → ph-factories-Ce8oAqs9.js} +1 -1
- package/dist/{ph-factories-Dvy-HW6C.js.map → ph-factories-Ce8oAqs9.js.map} +1 -1
- package/dist/{ph-factories-BKH_LPa8.js → ph-factories-CjbIAMgT.js} +2 -2
- package/dist/{ph-factories-BKH_LPa8.js.map → ph-factories-CjbIAMgT.js.map} +1 -1
- package/dist/{ph-factories-qCTFKODg.js → ph-factories-CljTAAVS.js} +2 -2
- package/dist/{ph-factories-qCTFKODg.js.map → ph-factories-CljTAAVS.js.map} +1 -1
- package/dist/{ph-factories-BL1-hdeG.js → ph-factories-dVj6mIlR.js} +2 -2
- package/dist/{ph-factories-BL1-hdeG.js.map → ph-factories-dVj6mIlR.js.map} +1 -1
- package/dist/{processor-CgScwnMI.js → processor-BW5Cac1v.js} +2 -2
- package/dist/{processor-CgScwnMI.js.map → processor-BW5Cac1v.js.map} +1 -1
- package/dist/processors/codegen/index.js +2 -2
- package/dist/processors/index.js +1 -1
- package/dist/processors/vetra-read-model/index.js +1 -1
- package/dist/{spec-api-CrmCurlh.js → spec-api-Cj4wdekw.js} +8 -8
- package/dist/{spec-api-CrmCurlh.js.map → spec-api-Cj4wdekw.js.map} +1 -1
- package/dist/{specs-_7A7Tl_N.d.ts → specs-BeVdfCwg.d.ts} +1 -1
- package/dist/{specs-_7A7Tl_N.d.ts.map → specs-BeVdfCwg.d.ts.map} +1 -1
- package/dist/switchboard-BApJSCis.js +8 -0
- package/dist/{switchboard-D5upogwE.js.map → switchboard-BApJSCis.js.map} +1 -1
- package/dist/upgrade-manifest-BGuy0v65.js +15 -0
- package/dist/upgrade-manifest-BGuy0v65.js.map +1 -0
- package/dist/upgrade-manifest-Ck3Mgwhc.js +15 -0
- package/dist/upgrade-manifest-Ck3Mgwhc.js.map +1 -0
- package/dist/upgrade-manifest-NaS4SWk9.js +15 -0
- package/dist/upgrade-manifest-NaS4SWk9.js.map +1 -0
- package/dist/upgrade-manifest-OlS1ALVv.js +15 -0
- package/dist/upgrade-manifest-OlS1ALVv.js.map +1 -0
- package/dist/upgrade-manifest-XdOLymuP.js +15 -0
- package/dist/upgrade-manifest-XdOLymuP.js.map +1 -0
- package/dist/{useVetraDocument-BpPD6DKR.js → useVetraDocument-BlLdlhrQ.js} +1 -1
- package/dist/{useVetraDocument-BpPD6DKR.js.map → useVetraDocument-BlLdlhrQ.js.map} +1 -1
- package/dist/{utils-BiV3cs9Y.js → utils-CkxGmQ2_.js} +1 -1
- package/dist/{utils-BiV3cs9Y.js.map → utils-CkxGmQ2_.js.map} +1 -1
- package/dist/{utils-D0ejTHeY.js → utils-DXCsvCXL.js} +1 -1
- package/dist/{utils-D0ejTHeY.js.map → utils-DXCsvCXL.js.map} +1 -1
- package/dist/{utils-CkWB3DRk.js → utils-DmOIDVQo.js} +1 -1
- package/dist/{utils-CkWB3DRk.js.map → utils-DmOIDVQo.js.map} +1 -1
- package/dist/{vetra-package-Ds8CruJz.js → vetra-package-Bl6TC4wx.js} +3 -15
- package/dist/vetra-package-Bl6TC4wx.js.map +1 -0
- package/package.json +10 -10
- package/dist/app-module-dG7ug7Cm.js +0 -48
- package/dist/app-module-dG7ug7Cm.js.map +0 -1
- package/dist/document-editor-5gSBaTUM.js +0 -48
- package/dist/document-editor-5gSBaTUM.js.map +0 -1
- package/dist/processor-module-NP3ktbdr.js +0 -48
- package/dist/processor-module-NP3ktbdr.js.map +0 -1
- package/dist/subgraph-module-B_5B8e3I.js +0 -48
- package/dist/subgraph-module-B_5B8e3I.js.map +0 -1
- package/dist/switchboard-D5upogwE.js +0 -8
- package/dist/vetra-package-Ds8CruJz.js.map +0 -1
package/dist/codegen/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { tt as AppModuleDocument } from "../index-
|
|
2
|
-
import { q as DocumentEditorDocument } from "../index-
|
|
3
|
-
import { nt as ProcessorModuleDocument } from "../index-
|
|
4
|
-
import { B as SubgraphModuleDocument } from "../index-
|
|
5
|
-
import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-
|
|
1
|
+
import { tt as AppModuleDocument } from "../index-f_um1g-i.js";
|
|
2
|
+
import { q as DocumentEditorDocument } from "../index-Dm_gN1DR.js";
|
|
3
|
+
import { nt as ProcessorModuleDocument } from "../index-SB-AtQdU.js";
|
|
4
|
+
import { B as SubgraphModuleDocument } from "../index-B5ijieNt.js";
|
|
5
|
+
import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-BeVdfCwg.js";
|
|
6
6
|
import { DocumentModelDocument } from "@powerhousedao/shared/document-model";
|
|
7
7
|
import { Project } from "ts-morph";
|
|
8
8
|
|
package/dist/codegen/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as createAppModuleDocument } from "../ph-factories-
|
|
2
|
-
import { t as createDocumentEditorDocument } from "../ph-factories-
|
|
3
|
-
import { t as createProcessorModuleDocument } from "../ph-factories-
|
|
4
|
-
import { n as createSubgraphModuleDocument } from "../ph-factories-
|
|
5
|
-
import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-
|
|
1
|
+
import { t as createAppModuleDocument } from "../ph-factories-Ce8oAqs9.js";
|
|
2
|
+
import { t as createDocumentEditorDocument } from "../ph-factories-CjbIAMgT.js";
|
|
3
|
+
import { t as createProcessorModuleDocument } from "../ph-factories-CljTAAVS.js";
|
|
4
|
+
import { n as createSubgraphModuleDocument } from "../ph-factories-dVj6mIlR.js";
|
|
5
|
+
import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-Cj4wdekw.js";
|
|
6
6
|
import { documentModelDocumentModelModule } from "document-model";
|
|
7
7
|
import { PROCESSOR_APPS } from "@powerhousedao/shared/processors";
|
|
8
8
|
import { generateApp, generateDocumentModel, generateEditor, generateProcessor, generateSubgraph } from "@powerhousedao/codegen";
|
package/dist/codegen/spec.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-
|
|
1
|
+
import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-BeVdfCwg.js";
|
|
2
2
|
export { ActionInput, ActionValidationError, DocumentModelInfo, SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
|
package/dist/codegen/spec.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-
|
|
1
|
+
import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-Cj4wdekw.js";
|
|
2
2
|
export { SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-
|
|
1
|
+
{"version":3,"file":"connect-qpJ9OUaH.js","names":[],"sources":["../processors/connect.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { ProcessorFactoryBuilder } from \"@powerhousedao/reactor-browser\";\n\nexport const processorFactoryBuilders: ProcessorFactoryBuilder[] = [];\n"],"mappings":";AAMA,MAAa,2BAAsD,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SetAppStatusAction, A as assertIsAppModuleDocument, B as removeDocumentType, C as defaultGlobalState, D as AppModuleDocumentHeaderSchema, E as appModuleDocumentType, F as AppModuleDndOperationsOperations, G as AppModuleBaseOperationsOperations, H as setAppStatus, I as creators_d_exports$1, J as SetDragAndDropEnabledAction, K as AppModuleAction, L as setDragAndDropEnabled, M as isAppModuleDocument, N as isAppModuleState, O as AppModuleDocumentSchema, P as documentModel, Q as SetAppNameAction, R as addDocumentType, S as createState, T as defaultPHState, U as setDocumentTypes, V as setAppName, W as AppModuleController, X as AppModuleBaseOperationsAction, Y as AddDocumentTypeAction, Z as RemoveDocumentTypeAction, _ as useAppModuleDocumentsInSelectedDrive, _t as SetDocumentTypesInput, a as RemoveDocumentTypeInputSchema, at as AppModuleState, b as actions, c as SetDocumentTypesInputSchema, ct as InputMaybe, d as definedNonNullAnySchema, dt as MakeOptional, et as SetDocumentTypesAction, f as isDefinedNonNullAny, ft as Maybe, g as useAppModuleDocumentById, gt as SetAppStatusInput, h as AppModule, ht as SetAppNameInput, i as AppModuleStateSchema, it as AddDocumentTypeInput, j as assertIsAppModuleState, k as AppModulePHStateSchema, l as SetDragAndDropEnabledInputSchema, lt as MakeEmpty, m as utils, mt as Scalars, n as initialLocalState, nt as AppModuleLocalState, o as SetAppNameInputSchema, ot as Exact, p as reducer, pt as RemoveDocumentTypeInput, q as AppModuleDndOperationsAction, r as AddDocumentTypeInputSchema, rt as AppModulePHState, s as SetAppStatusInputSchema, st as Incremental, t as initialGlobalState, tt as AppModuleDocument, u as StatusTypeSchema, ut as MakeMaybe, v as useAppModuleDocumentsInSelectedFolder, vt as SetDragAndDropEnabledInput, w as defaultLocalState, x as createAppModuleDocument, y as useSelectedAppModuleDocument, yt as StatusType, z as creators_d_exports } from "../../index-
|
|
1
|
+
import { $ as SetAppStatusAction, A as assertIsAppModuleDocument, B as removeDocumentType, C as defaultGlobalState, D as AppModuleDocumentHeaderSchema, E as appModuleDocumentType, F as AppModuleDndOperationsOperations, G as AppModuleBaseOperationsOperations, H as setAppStatus, I as creators_d_exports$1, J as SetDragAndDropEnabledAction, K as AppModuleAction, L as setDragAndDropEnabled, M as isAppModuleDocument, N as isAppModuleState, O as AppModuleDocumentSchema, P as documentModel, Q as SetAppNameAction, R as addDocumentType, S as createState, T as defaultPHState, U as setDocumentTypes, V as setAppName, W as AppModuleController, X as AppModuleBaseOperationsAction, Y as AddDocumentTypeAction, Z as RemoveDocumentTypeAction, _ as useAppModuleDocumentsInSelectedDrive, _t as SetDocumentTypesInput, a as RemoveDocumentTypeInputSchema, at as AppModuleState, b as actions, c as SetDocumentTypesInputSchema, ct as InputMaybe, d as definedNonNullAnySchema, dt as MakeOptional, et as SetDocumentTypesAction, f as isDefinedNonNullAny, ft as Maybe, g as useAppModuleDocumentById, gt as SetAppStatusInput, h as AppModule, ht as SetAppNameInput, i as AppModuleStateSchema, it as AddDocumentTypeInput, j as assertIsAppModuleState, k as AppModulePHStateSchema, l as SetDragAndDropEnabledInputSchema, lt as MakeEmpty, m as utils, mt as Scalars, n as initialLocalState, nt as AppModuleLocalState, o as SetAppNameInputSchema, ot as Exact, p as reducer, pt as RemoveDocumentTypeInput, q as AppModuleDndOperationsAction, r as AddDocumentTypeInputSchema, rt as AppModulePHState, s as SetAppStatusInputSchema, st as Incremental, t as initialGlobalState, tt as AppModuleDocument, u as StatusTypeSchema, ut as MakeMaybe, v as useAppModuleDocumentsInSelectedFolder, vt as SetDragAndDropEnabledInput, w as defaultLocalState, x as createAppModuleDocument, y as useSelectedAppModuleDocument, yt as StatusType, z as creators_d_exports } from "../../index-f_um1g-i.js";
|
|
2
2
|
import { UpgradeManifest } from "document-model";
|
|
3
3
|
|
|
4
4
|
//#region document-models/app-module/upgrades/versions.d.ts
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
import { A as definedNonNullAnySchema, C as AppModuleStateSchema, D as SetDocumentTypesInputSchema, E as SetAppStatusInputSchema, O as SetDragAndDropEnabledInputSchema, S as AddDocumentTypeInputSchema, T as SetAppNameInputSchema, _ as creators_exports, a as AppModuleDocumentSchema, b as setAppStatus, c as assertIsAppModuleState, d as appModuleDocumentType, f as reducer, g as addDocumentType, h as setDragAndDropEnabled, i as AppModuleDocumentHeaderSchema, j as isDefinedNonNullAny, k as StatusTypeSchema, l as isAppModuleDocument, m as creators_exports$1, n as initialLocalState, o as AppModulePHStateSchema, p as actions, s as assertIsAppModuleDocument, t as initialGlobalState, u as isAppModuleState, v as removeDocumentType, w as RemoveDocumentTypeInputSchema, x as setDocumentTypes, y as setAppName } from "../../utils-B4KdjDnp.js";
|
|
2
2
|
import { n as utils, r as documentModel, t as AppModule } from "../../module-CRq_lUkG.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
3
|
+
import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createAppModuleDocument } from "../../ph-factories-Ce8oAqs9.js";
|
|
4
|
+
import { n as latestVersion, r as supportedVersions, t as appModuleUpgradeManifest } from "../../upgrade-manifest-Ck3Mgwhc.js";
|
|
5
|
+
import { PHDocumentController } from "document-model";
|
|
6
|
+
import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
|
|
7
|
+
//#region document-models/app-module/v1/gen/controller.ts
|
|
8
|
+
/**
|
|
9
|
+
* WARNING: DO NOT EDIT
|
|
10
|
+
* This file is auto-generated and updated by codegen
|
|
11
|
+
*/
|
|
12
|
+
const AppModuleController = PHDocumentController.forDocumentModel(AppModule);
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region document-models/app-module/v1/hooks.ts
|
|
15
|
+
/** Hook to get a AppModule document by its id */
|
|
16
|
+
function useAppModuleDocumentById(documentId) {
|
|
17
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
18
|
+
if (!isAppModuleDocument(document)) return [void 0, void 0];
|
|
19
|
+
return [document, dispatch];
|
|
20
|
+
}
|
|
21
|
+
/** Hook to get the selected AppModule document */
|
|
22
|
+
function useSelectedAppModuleDocument() {
|
|
23
|
+
const [document, dispatch] = useSelectedDocument();
|
|
24
|
+
assertIsAppModuleDocument(document);
|
|
25
|
+
return [document, dispatch];
|
|
26
|
+
}
|
|
27
|
+
/** Hook to get all AppModule documents in the selected drive */
|
|
28
|
+
function useAppModuleDocumentsInSelectedDrive() {
|
|
29
|
+
return useDocumentsInSelectedDrive()?.filter(isAppModuleDocument);
|
|
30
|
+
}
|
|
31
|
+
/** Hook to get all AppModule documents in the selected folder */
|
|
32
|
+
function useAppModuleDocumentsInSelectedFolder() {
|
|
33
|
+
return useDocumentsInSelectedFolder()?.filter(isAppModuleDocument);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
5
36
|
export { AddDocumentTypeInputSchema, AppModule, AppModuleController, AppModuleDocumentHeaderSchema, AppModuleDocumentSchema, AppModulePHStateSchema, AppModuleStateSchema, RemoveDocumentTypeInputSchema, SetAppNameInputSchema, SetAppStatusInputSchema, SetDocumentTypesInputSchema, SetDragAndDropEnabledInputSchema, StatusTypeSchema, actions, addDocumentType, creators_exports as appModuleBaseOperationsActions, creators_exports$1 as appModuleDndOperationsActions, appModuleDocumentType, appModuleUpgradeManifest, assertIsAppModuleDocument, assertIsAppModuleState, createAppModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isAppModuleDocument, isAppModuleState, isDefinedNonNullAny, latestVersion, reducer, removeDocumentType, setAppName, setAppStatus, setDocumentTypes, setDragAndDropEnabled, supportedVersions, useAppModuleDocumentById, useAppModuleDocumentsInSelectedDrive, useAppModuleDocumentsInSelectedFolder, useSelectedAppModuleDocument, utils };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../document-models/app-module/v1/gen/controller.ts","../../../document-models/app-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { AppModule } from \"../module.js\";\nimport type { AppModuleAction, AppModulePHState } from \"./types.js\";\n\nexport const AppModuleController = PHDocumentController.forDocumentModel<\n AppModulePHState,\n AppModuleAction\n>(AppModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"document-models/app-module/v1\";\nimport {\n assertIsAppModuleDocument,\n isAppModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a AppModule document by its id */\nexport function useAppModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [AppModuleDocument, DocumentDispatch<AppModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isAppModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected AppModule document */\nexport function useSelectedAppModuleDocument(): [\n AppModuleDocument,\n DocumentDispatch<AppModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsAppModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all AppModule documents in the selected drive */\nexport function useAppModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isAppModuleDocument);\n}\n\n/** Hook to get all AppModule documents in the selected folder */\nexport function useAppModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isAppModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,sBAAsB,qBAAqB,iBAGtD,UAAU;;;;ACUZ,SAAgB,yBACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,oBAAoB,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACjE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,+BAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,2BAA0B,SAAS;AACnC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,uCAAuC;AAErD,QADiC,6BAA6B,EAC7B,OAAO,oBAAoB;;;AAI9D,SAAgB,wCAAwC;AAEtD,QADkC,8BAA8B,EAC9B,OAAO,oBAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Exact, A as assertIsDocumentEditorState, B as DocumentEditorBaseOperationsOperations, C as defaultLocalState, D as DocumentEditorDocumentSchema, E as DocumentEditorDocumentHeaderSchema, F as creators_d_exports, G as SetEditorNameAction, H as AddDocumentTypeAction, I as removeDocumentType, J as DocumentEditorLocalState, K as SetEditorStatusAction, L as setEditorName, M as isDocumentEditorState, N as documentModel, O as DocumentEditorPHStateSchema, P as addDocumentType, Q as DocumentTypeItem, R as setEditorStatus, S as defaultGlobalState, T as documentEditorDocumentType, U as DocumentEditorBaseOperationsAction, V as DocumentEditorAction, W as RemoveDocumentTypeAction, X as AddDocumentTypeInput, Y as DocumentEditorPHState, Z as DocumentEditorState, _ as useDocumentEditorDocumentsInSelectedFolder, a as DocumentTypeItemSchema, at as Maybe, b as createDocumentEditorDocument, c as SetEditorStatusInputSchema, ct as SetEditorNameInput, d as isDefinedNonNullAny, et as Incremental, f as reducer, g as useDocumentEditorDocumentsInSelectedDrive, h as useDocumentEditorDocumentById, i as DocumentEditorStateSchema, it as MakeOptional, j as isDocumentEditorDocument, k as assertIsDocumentEditorDocument, l as StatusTypeSchema, lt as SetEditorStatusInput, m as DocumentEditor, n as initialLocalState, nt as MakeEmpty, o as RemoveDocumentTypeInputSchema, ot as RemoveDocumentTypeInput, p as utils, q as DocumentEditorDocument, r as AddDocumentTypeInputSchema, rt as MakeMaybe, s as SetEditorNameInputSchema, st as Scalars, t as initialGlobalState, tt as InputMaybe, u as definedNonNullAnySchema, ut as StatusType, v as useSelectedDocumentEditorDocument, w as defaultPHState, x as createState, y as actions, z as DocumentEditorController } from "../../index-
|
|
1
|
+
import { $ as Exact, A as assertIsDocumentEditorState, B as DocumentEditorBaseOperationsOperations, C as defaultLocalState, D as DocumentEditorDocumentSchema, E as DocumentEditorDocumentHeaderSchema, F as creators_d_exports, G as SetEditorNameAction, H as AddDocumentTypeAction, I as removeDocumentType, J as DocumentEditorLocalState, K as SetEditorStatusAction, L as setEditorName, M as isDocumentEditorState, N as documentModel, O as DocumentEditorPHStateSchema, P as addDocumentType, Q as DocumentTypeItem, R as setEditorStatus, S as defaultGlobalState, T as documentEditorDocumentType, U as DocumentEditorBaseOperationsAction, V as DocumentEditorAction, W as RemoveDocumentTypeAction, X as AddDocumentTypeInput, Y as DocumentEditorPHState, Z as DocumentEditorState, _ as useDocumentEditorDocumentsInSelectedFolder, a as DocumentTypeItemSchema, at as Maybe, b as createDocumentEditorDocument, c as SetEditorStatusInputSchema, ct as SetEditorNameInput, d as isDefinedNonNullAny, et as Incremental, f as reducer, g as useDocumentEditorDocumentsInSelectedDrive, h as useDocumentEditorDocumentById, i as DocumentEditorStateSchema, it as MakeOptional, j as isDocumentEditorDocument, k as assertIsDocumentEditorDocument, l as StatusTypeSchema, lt as SetEditorStatusInput, m as DocumentEditor, n as initialLocalState, nt as MakeEmpty, o as RemoveDocumentTypeInputSchema, ot as RemoveDocumentTypeInput, p as utils, q as DocumentEditorDocument, r as AddDocumentTypeInputSchema, rt as MakeMaybe, s as SetEditorNameInputSchema, st as Scalars, t as initialGlobalState, tt as InputMaybe, u as definedNonNullAnySchema, ut as StatusType, v as useSelectedDocumentEditorDocument, w as defaultPHState, x as createState, y as actions, z as DocumentEditorController } from "../../index-Dm_gN1DR.js";
|
|
2
2
|
import { UpgradeManifest } from "document-model";
|
|
3
3
|
|
|
4
4
|
//#region document-models/document-editor/upgrades/versions.d.ts
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
import { C as SetEditorNameInputSchema, D as isDefinedNonNullAny, E as definedNonNullAnySchema, S as RemoveDocumentTypeInputSchema, T as StatusTypeSchema, _ as setEditorName, a as DocumentEditorDocumentSchema, b as DocumentEditorStateSchema, c as assertIsDocumentEditorState, d as documentEditorDocumentType, f as reducer, g as removeDocumentType, h as creators_exports, i as DocumentEditorDocumentHeaderSchema, l as isDocumentEditorDocument, m as addDocumentType, n as initialLocalState, o as DocumentEditorPHStateSchema, p as actions, s as assertIsDocumentEditorDocument, t as initialGlobalState, u as isDocumentEditorState, v as setEditorStatus, w as SetEditorStatusInputSchema, x as DocumentTypeItemSchema, y as AddDocumentTypeInputSchema } from "../../utils-
|
|
2
|
-
import { n as utils, r as documentModel, t as DocumentEditor } from "../../module-
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { C as SetEditorNameInputSchema, D as isDefinedNonNullAny, E as definedNonNullAnySchema, S as RemoveDocumentTypeInputSchema, T as StatusTypeSchema, _ as setEditorName, a as DocumentEditorDocumentSchema, b as DocumentEditorStateSchema, c as assertIsDocumentEditorState, d as documentEditorDocumentType, f as reducer, g as removeDocumentType, h as creators_exports, i as DocumentEditorDocumentHeaderSchema, l as isDocumentEditorDocument, m as addDocumentType, n as initialLocalState, o as DocumentEditorPHStateSchema, p as actions, s as assertIsDocumentEditorDocument, t as initialGlobalState, u as isDocumentEditorState, v as setEditorStatus, w as SetEditorStatusInputSchema, x as DocumentTypeItemSchema, y as AddDocumentTypeInputSchema } from "../../utils-DXCsvCXL.js";
|
|
2
|
+
import { n as utils, r as documentModel, t as DocumentEditor } from "../../module-Chqkdq4U.js";
|
|
3
|
+
import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createDocumentEditorDocument } from "../../ph-factories-CjbIAMgT.js";
|
|
4
|
+
import { n as latestVersion, r as supportedVersions, t as documentEditorUpgradeManifest } from "../../upgrade-manifest-BGuy0v65.js";
|
|
5
|
+
import { PHDocumentController } from "document-model";
|
|
6
|
+
import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
|
|
7
|
+
//#region document-models/document-editor/v1/gen/controller.ts
|
|
8
|
+
/**
|
|
9
|
+
* WARNING: DO NOT EDIT
|
|
10
|
+
* This file is auto-generated and updated by codegen
|
|
11
|
+
*/
|
|
12
|
+
const DocumentEditorController = PHDocumentController.forDocumentModel(DocumentEditor);
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region document-models/document-editor/v1/hooks.ts
|
|
15
|
+
/** Hook to get a DocumentEditor document by its id */
|
|
16
|
+
function useDocumentEditorDocumentById(documentId) {
|
|
17
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
18
|
+
if (!isDocumentEditorDocument(document)) return [void 0, void 0];
|
|
19
|
+
return [document, dispatch];
|
|
20
|
+
}
|
|
21
|
+
/** Hook to get the selected DocumentEditor document */
|
|
22
|
+
function useSelectedDocumentEditorDocument() {
|
|
23
|
+
const [document, dispatch] = useSelectedDocument();
|
|
24
|
+
assertIsDocumentEditorDocument(document);
|
|
25
|
+
return [document, dispatch];
|
|
26
|
+
}
|
|
27
|
+
/** Hook to get all DocumentEditor documents in the selected drive */
|
|
28
|
+
function useDocumentEditorDocumentsInSelectedDrive() {
|
|
29
|
+
return useDocumentsInSelectedDrive()?.filter(isDocumentEditorDocument);
|
|
30
|
+
}
|
|
31
|
+
/** Hook to get all DocumentEditor documents in the selected folder */
|
|
32
|
+
function useDocumentEditorDocumentsInSelectedFolder() {
|
|
33
|
+
return useDocumentsInSelectedFolder()?.filter(isDocumentEditorDocument);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
5
36
|
export { AddDocumentTypeInputSchema, DocumentEditor, DocumentEditorController, DocumentEditorDocumentHeaderSchema, DocumentEditorDocumentSchema, DocumentEditorPHStateSchema, DocumentEditorStateSchema, DocumentTypeItemSchema, RemoveDocumentTypeInputSchema, SetEditorNameInputSchema, SetEditorStatusInputSchema, StatusTypeSchema, actions, addDocumentType, assertIsDocumentEditorDocument, assertIsDocumentEditorState, createDocumentEditorDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, creators_exports as documentEditorBaseOperationsActions, documentEditorDocumentType, documentEditorUpgradeManifest, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isDocumentEditorDocument, isDocumentEditorState, latestVersion, reducer, removeDocumentType, setEditorName, setEditorStatus, supportedVersions, useDocumentEditorDocumentById, useDocumentEditorDocumentsInSelectedDrive, useDocumentEditorDocumentsInSelectedFolder, useSelectedDocumentEditorDocument, utils };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../document-models/document-editor/v1/gen/controller.ts","../../../document-models/document-editor/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { DocumentEditor } from \"../module.js\";\nimport type { DocumentEditorAction, DocumentEditorPHState } from \"./types.js\";\n\nexport const DocumentEditorController = PHDocumentController.forDocumentModel<\n DocumentEditorPHState,\n DocumentEditorAction\n>(DocumentEditor);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n DocumentEditorAction,\n DocumentEditorDocument,\n} from \"document-models/document-editor/v1\";\nimport {\n assertIsDocumentEditorDocument,\n isDocumentEditorDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a DocumentEditor document by its id */\nexport function useDocumentEditorDocumentById(\n documentId: string | null | undefined,\n):\n | [DocumentEditorDocument, DocumentDispatch<DocumentEditorAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isDocumentEditorDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected DocumentEditor document */\nexport function useSelectedDocumentEditorDocument(): [\n DocumentEditorDocument,\n DocumentDispatch<DocumentEditorAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsDocumentEditorDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all DocumentEditor documents in the selected drive */\nexport function useDocumentEditorDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isDocumentEditorDocument);\n}\n\n/** Hook to get all DocumentEditor documents in the selected folder */\nexport function useDocumentEditorDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isDocumentEditorDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,2BAA2B,qBAAqB,iBAG3D,eAAe;;;;ACUjB,SAAgB,8BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,yBAAyB,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACtE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,oCAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,gCAA+B,SAAS;AACxC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,4CAA4C;AAE1D,QADiC,6BAA6B,EAC7B,OAAO,yBAAyB;;;AAInE,SAAgB,6CAA6C;AAE3D,QADkC,8BAA8B,EAC9B,OAAO,yBAAyB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as AppModule } from "../index-
|
|
2
|
-
import { m as DocumentEditor } from "../index-
|
|
3
|
-
import { _ as ProcessorModule } from "../index-
|
|
4
|
-
import { d as SubgraphModule } from "../index-
|
|
5
|
-
import { t as VetraPackage } from "../module-
|
|
1
|
+
import { h as AppModule } from "../index-f_um1g-i.js";
|
|
2
|
+
import { m as DocumentEditor } from "../index-Dm_gN1DR.js";
|
|
3
|
+
import { _ as ProcessorModule } from "../index-SB-AtQdU.js";
|
|
4
|
+
import { d as SubgraphModule } from "../index-B5ijieNt.js";
|
|
5
|
+
import { t as VetraPackage } from "../module-ciAK1LUC.js";
|
|
6
6
|
export { AppModule as AppModuleV1, DocumentEditor as DocumentEditorV1, ProcessorModule as ProcessorModuleV1, SubgraphModule as SubgraphModuleV1, VetraPackage as VetraPackageV1 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AppModule } from "../module-CRq_lUkG.js";
|
|
2
|
-
import { t as DocumentEditor } from "../module-
|
|
3
|
-
import { t as ProcessorModule } from "../module-
|
|
4
|
-
import { t as SubgraphModule } from "../module-
|
|
5
|
-
import { t as VetraPackage } from "../module-
|
|
2
|
+
import { t as DocumentEditor } from "../module-Chqkdq4U.js";
|
|
3
|
+
import { t as ProcessorModule } from "../module-bKT_e3CH.js";
|
|
4
|
+
import { t as SubgraphModule } from "../module-Bx1OEHxF.js";
|
|
5
|
+
import { t as VetraPackage } from "../module-CRfHlbnq.js";
|
|
6
6
|
export { AppModule as AppModuleV1, DocumentEditor as DocumentEditorV1, ProcessorModule as ProcessorModuleV1, SubgraphModule as SubgraphModuleV1, VetraPackage as VetraPackageV1 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SetProcessorNameAction, A as ProcessorModuleDocumentSchema, B as removeDocumentType, C as createProcessorModuleDocument, D as defaultPHState, E as defaultLocalState, F as isProcessorModuleState, G as ProcessorModuleController, H as setProcessorName, I as documentModel, J as AddDocumentTypeAction, K as ProcessorModuleBaseOperationsOperations, L as addDocumentType, M as assertIsProcessorModuleDocument, N as assertIsProcessorModuleState, O as processorModuleDocumentType, P as isProcessorModuleDocument, Q as RemoveProcessorAppAction, R as addProcessorApp, S as actions, St as StatusType, T as defaultGlobalState, U as setProcessorStatus, V as removeProcessorApp, W as setProcessorType, X as ProcessorModuleBaseOperationsAction, Y as AddProcessorAppAction, Z as RemoveDocumentTypeAction, _ as ProcessorModule, _t as RemoveProcessorAppInput, a as DocumentTypeItemSchema, at as AddDocumentTypeInput, b as useProcessorModuleDocumentsInSelectedFolder, bt as SetProcessorStatusInput, c as RemoveProcessorAppInputSchema, ct as Exact, d as SetProcessorTypeInputSchema, dt as MakeEmpty, et as SetProcessorStatusAction, f as StatusTypeSchema, ft as MakeMaybe, g as utils, gt as RemoveDocumentTypeInput, h as reducer, ht as ProcessorModuleState, i as AddProcessorAppInputSchema, it as ProcessorModulePHState, j as ProcessorModulePHStateSchema, k as ProcessorModuleDocumentHeaderSchema, l as SetProcessorNameInputSchema, lt as Incremental, m as isDefinedNonNullAny, mt as Maybe, n as initialLocalState, nt as ProcessorModuleDocument, o as ProcessorModuleStateSchema, ot as AddProcessorAppInput, p as definedNonNullAnySchema, pt as MakeOptional, q as ProcessorModuleAction, r as AddDocumentTypeInputSchema, rt as ProcessorModuleLocalState, s as RemoveDocumentTypeInputSchema, st as DocumentTypeItem, t as initialGlobalState, tt as SetProcessorTypeAction, u as SetProcessorStatusInputSchema, ut as InputMaybe, v as useProcessorModuleDocumentById, vt as Scalars, w as createState, x as useSelectedProcessorModuleDocument, xt as SetProcessorTypeInput, y as useProcessorModuleDocumentsInSelectedDrive, yt as SetProcessorNameInput, z as creators_d_exports } from "../../index-
|
|
1
|
+
import { $ as SetProcessorNameAction, A as ProcessorModuleDocumentSchema, B as removeDocumentType, C as createProcessorModuleDocument, D as defaultPHState, E as defaultLocalState, F as isProcessorModuleState, G as ProcessorModuleController, H as setProcessorName, I as documentModel, J as AddDocumentTypeAction, K as ProcessorModuleBaseOperationsOperations, L as addDocumentType, M as assertIsProcessorModuleDocument, N as assertIsProcessorModuleState, O as processorModuleDocumentType, P as isProcessorModuleDocument, Q as RemoveProcessorAppAction, R as addProcessorApp, S as actions, St as StatusType, T as defaultGlobalState, U as setProcessorStatus, V as removeProcessorApp, W as setProcessorType, X as ProcessorModuleBaseOperationsAction, Y as AddProcessorAppAction, Z as RemoveDocumentTypeAction, _ as ProcessorModule, _t as RemoveProcessorAppInput, a as DocumentTypeItemSchema, at as AddDocumentTypeInput, b as useProcessorModuleDocumentsInSelectedFolder, bt as SetProcessorStatusInput, c as RemoveProcessorAppInputSchema, ct as Exact, d as SetProcessorTypeInputSchema, dt as MakeEmpty, et as SetProcessorStatusAction, f as StatusTypeSchema, ft as MakeMaybe, g as utils, gt as RemoveDocumentTypeInput, h as reducer, ht as ProcessorModuleState, i as AddProcessorAppInputSchema, it as ProcessorModulePHState, j as ProcessorModulePHStateSchema, k as ProcessorModuleDocumentHeaderSchema, l as SetProcessorNameInputSchema, lt as Incremental, m as isDefinedNonNullAny, mt as Maybe, n as initialLocalState, nt as ProcessorModuleDocument, o as ProcessorModuleStateSchema, ot as AddProcessorAppInput, p as definedNonNullAnySchema, pt as MakeOptional, q as ProcessorModuleAction, r as AddDocumentTypeInputSchema, rt as ProcessorModuleLocalState, s as RemoveDocumentTypeInputSchema, st as DocumentTypeItem, t as initialGlobalState, tt as SetProcessorTypeAction, u as SetProcessorStatusInputSchema, ut as InputMaybe, v as useProcessorModuleDocumentById, vt as Scalars, w as createState, x as useSelectedProcessorModuleDocument, xt as SetProcessorTypeInput, y as useProcessorModuleDocumentsInSelectedDrive, yt as SetProcessorNameInput, z as creators_d_exports } from "../../index-SB-AtQdU.js";
|
|
2
2
|
import { UpgradeManifest } from "document-model";
|
|
3
3
|
|
|
4
4
|
//#region document-models/processor-module/upgrades/versions.d.ts
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
import { A as SetProcessorTypeInputSchema, C as AddProcessorAppInputSchema, D as RemoveProcessorAppInputSchema, E as RemoveDocumentTypeInputSchema, M as definedNonNullAnySchema, N as isDefinedNonNullAny, O as SetProcessorNameInputSchema, S as AddDocumentTypeInputSchema, T as ProcessorModuleStateSchema, _ as removeDocumentType, a as ProcessorModuleDocumentSchema, b as setProcessorStatus, c as assertIsProcessorModuleState, d as processorModuleDocumentType, f as reducer, g as creators_exports, h as addProcessorApp, i as ProcessorModuleDocumentHeaderSchema, j as StatusTypeSchema, k as SetProcessorStatusInputSchema, l as isProcessorModuleDocument, m as addDocumentType, n as initialLocalState, o as ProcessorModulePHStateSchema, p as actions, s as assertIsProcessorModuleDocument, t as initialGlobalState, u as isProcessorModuleState, v as removeProcessorApp, w as DocumentTypeItemSchema, x as setProcessorType, y as setProcessorName } from "../../utils-
|
|
2
|
-
import { n as utils, r as documentModel, t as ProcessorModule } from "../../module-
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { A as SetProcessorTypeInputSchema, C as AddProcessorAppInputSchema, D as RemoveProcessorAppInputSchema, E as RemoveDocumentTypeInputSchema, M as definedNonNullAnySchema, N as isDefinedNonNullAny, O as SetProcessorNameInputSchema, S as AddDocumentTypeInputSchema, T as ProcessorModuleStateSchema, _ as removeDocumentType, a as ProcessorModuleDocumentSchema, b as setProcessorStatus, c as assertIsProcessorModuleState, d as processorModuleDocumentType, f as reducer, g as creators_exports, h as addProcessorApp, i as ProcessorModuleDocumentHeaderSchema, j as StatusTypeSchema, k as SetProcessorStatusInputSchema, l as isProcessorModuleDocument, m as addDocumentType, n as initialLocalState, o as ProcessorModulePHStateSchema, p as actions, s as assertIsProcessorModuleDocument, t as initialGlobalState, u as isProcessorModuleState, v as removeProcessorApp, w as DocumentTypeItemSchema, x as setProcessorType, y as setProcessorName } from "../../utils-DmOIDVQo.js";
|
|
2
|
+
import { n as utils, r as documentModel, t as ProcessorModule } from "../../module-bKT_e3CH.js";
|
|
3
|
+
import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createProcessorModuleDocument } from "../../ph-factories-CljTAAVS.js";
|
|
4
|
+
import { n as latestVersion, r as supportedVersions, t as processorModuleUpgradeManifest } from "../../upgrade-manifest-NaS4SWk9.js";
|
|
5
|
+
import { PHDocumentController } from "document-model";
|
|
6
|
+
import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
|
|
7
|
+
//#region document-models/processor-module/v1/gen/controller.ts
|
|
8
|
+
/**
|
|
9
|
+
* WARNING: DO NOT EDIT
|
|
10
|
+
* This file is auto-generated and updated by codegen
|
|
11
|
+
*/
|
|
12
|
+
const ProcessorModuleController = PHDocumentController.forDocumentModel(ProcessorModule);
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region document-models/processor-module/v1/hooks.ts
|
|
15
|
+
/** Hook to get a ProcessorModule document by its id */
|
|
16
|
+
function useProcessorModuleDocumentById(documentId) {
|
|
17
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
18
|
+
if (!isProcessorModuleDocument(document)) return [void 0, void 0];
|
|
19
|
+
return [document, dispatch];
|
|
20
|
+
}
|
|
21
|
+
/** Hook to get the selected ProcessorModule document */
|
|
22
|
+
function useSelectedProcessorModuleDocument() {
|
|
23
|
+
const [document, dispatch] = useSelectedDocument();
|
|
24
|
+
assertIsProcessorModuleDocument(document);
|
|
25
|
+
return [document, dispatch];
|
|
26
|
+
}
|
|
27
|
+
/** Hook to get all ProcessorModule documents in the selected drive */
|
|
28
|
+
function useProcessorModuleDocumentsInSelectedDrive() {
|
|
29
|
+
return useDocumentsInSelectedDrive()?.filter(isProcessorModuleDocument);
|
|
30
|
+
}
|
|
31
|
+
/** Hook to get all ProcessorModule documents in the selected folder */
|
|
32
|
+
function useProcessorModuleDocumentsInSelectedFolder() {
|
|
33
|
+
return useDocumentsInSelectedFolder()?.filter(isProcessorModuleDocument);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
5
36
|
export { AddDocumentTypeInputSchema, AddProcessorAppInputSchema, DocumentTypeItemSchema, ProcessorModule, ProcessorModuleController, ProcessorModuleDocumentHeaderSchema, ProcessorModuleDocumentSchema, ProcessorModulePHStateSchema, ProcessorModuleStateSchema, RemoveDocumentTypeInputSchema, RemoveProcessorAppInputSchema, SetProcessorNameInputSchema, SetProcessorStatusInputSchema, SetProcessorTypeInputSchema, StatusTypeSchema, actions, addDocumentType, addProcessorApp, assertIsProcessorModuleDocument, assertIsProcessorModuleState, createProcessorModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isProcessorModuleDocument, isProcessorModuleState, latestVersion, creators_exports as processorModuleBaseOperationsActions, processorModuleDocumentType, processorModuleUpgradeManifest, reducer, removeDocumentType, removeProcessorApp, setProcessorName, setProcessorStatus, setProcessorType, supportedVersions, useProcessorModuleDocumentById, useProcessorModuleDocumentsInSelectedDrive, useProcessorModuleDocumentsInSelectedFolder, useSelectedProcessorModuleDocument, utils };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../document-models/processor-module/v1/gen/controller.ts","../../../document-models/processor-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { ProcessorModule } from \"../module.js\";\nimport type { ProcessorModuleAction, ProcessorModulePHState } from \"./types.js\";\n\nexport const ProcessorModuleController = PHDocumentController.forDocumentModel<\n ProcessorModulePHState,\n ProcessorModuleAction\n>(ProcessorModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"document-models/processor-module/v1\";\nimport {\n assertIsProcessorModuleDocument,\n isProcessorModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a ProcessorModule document by its id */\nexport function useProcessorModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [ProcessorModuleDocument, DocumentDispatch<ProcessorModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isProcessorModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected ProcessorModule document */\nexport function useSelectedProcessorModuleDocument(): [\n ProcessorModuleDocument,\n DocumentDispatch<ProcessorModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsProcessorModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all ProcessorModule documents in the selected drive */\nexport function useProcessorModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isProcessorModuleDocument);\n}\n\n/** Hook to get all ProcessorModule documents in the selected folder */\nexport function useProcessorModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isProcessorModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,4BAA4B,qBAAqB,iBAG5D,gBAAgB;;;;ACUlB,SAAgB,+BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,0BAA0B,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACvE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,qCAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,iCAAgC,SAAS;AACzC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,6CAA6C;AAE3D,QADiC,6BAA6B,EAC7B,OAAO,0BAA0B;;;AAIpE,SAAgB,8CAA8C;AAE5D,QADkC,8BAA8B,EAC9B,OAAO,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as StatusType, A as documentModel, B as SubgraphModuleDocument, C as SubgraphModuleDocumentHeaderSchema, D as assertIsSubgraphModuleState, E as assertIsSubgraphModuleDocument, F as SubgraphModuleBaseOperationsOperations, G as InputMaybe, H as SubgraphModulePHState, I as SubgraphModuleAction, J as MakeOptional, K as MakeEmpty, L as SetSubgraphNameAction, M as setSubgraphName, N as setSubgraphStatus, O as isSubgraphModuleDocument, P as SubgraphModuleController, Q as SetSubgraphStatusInput, R as SetSubgraphStatusAction, S as subgraphModuleDocumentType, T as SubgraphModulePHStateSchema, U as Exact, V as SubgraphModuleLocalState, W as Incremental, X as Scalars, Y as Maybe, Z as SetSubgraphNameInput, _ as createState, a as StatusTypeSchema, b as defaultLocalState, c as isDefinedNonNullAny, d as SubgraphModule, et as SubgraphModuleState, f as useSelectedSubgraphModuleDocument, g as actions, h as useSubgraphModuleDocumentsInSelectedFolder, i as SetSubgraphStatusInputSchema, j as creators_d_exports, k as isSubgraphModuleState, l as reducer, m as useSubgraphModuleDocumentsInSelectedDrive, n as initialLocalState, o as SubgraphModuleStateSchema, p as useSubgraphModuleDocumentById, q as MakeMaybe, r as SetSubgraphNameInputSchema, s as definedNonNullAnySchema, t as initialGlobalState, u as utils, v as createSubgraphModuleDocument, w as SubgraphModuleDocumentSchema, x as defaultPHState, y as defaultGlobalState, z as SubgraphModuleBaseOperationsAction } from "../../index-
|
|
1
|
+
import { $ as StatusType, A as documentModel, B as SubgraphModuleDocument, C as SubgraphModuleDocumentHeaderSchema, D as assertIsSubgraphModuleState, E as assertIsSubgraphModuleDocument, F as SubgraphModuleBaseOperationsOperations, G as InputMaybe, H as SubgraphModulePHState, I as SubgraphModuleAction, J as MakeOptional, K as MakeEmpty, L as SetSubgraphNameAction, M as setSubgraphName, N as setSubgraphStatus, O as isSubgraphModuleDocument, P as SubgraphModuleController, Q as SetSubgraphStatusInput, R as SetSubgraphStatusAction, S as subgraphModuleDocumentType, T as SubgraphModulePHStateSchema, U as Exact, V as SubgraphModuleLocalState, W as Incremental, X as Scalars, Y as Maybe, Z as SetSubgraphNameInput, _ as createState, a as StatusTypeSchema, b as defaultLocalState, c as isDefinedNonNullAny, d as SubgraphModule, et as SubgraphModuleState, f as useSelectedSubgraphModuleDocument, g as actions, h as useSubgraphModuleDocumentsInSelectedFolder, i as SetSubgraphStatusInputSchema, j as creators_d_exports, k as isSubgraphModuleState, l as reducer, m as useSubgraphModuleDocumentsInSelectedDrive, n as initialLocalState, o as SubgraphModuleStateSchema, p as useSubgraphModuleDocumentById, q as MakeMaybe, r as SetSubgraphNameInputSchema, s as definedNonNullAnySchema, t as initialGlobalState, u as utils, v as createSubgraphModuleDocument, w as SubgraphModuleDocumentSchema, x as defaultPHState, y as defaultGlobalState, z as SubgraphModuleBaseOperationsAction } from "../../index-B5ijieNt.js";
|
|
2
2
|
import { UpgradeManifest } from "document-model";
|
|
3
3
|
|
|
4
4
|
//#region document-models/subgraph-module/upgrades/versions.d.ts
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
import { S as isDefinedNonNullAny, _ as SetSubgraphNameInputSchema, a as SubgraphModuleDocumentSchema, b as SubgraphModuleStateSchema, c as assertIsSubgraphModuleState, d as subgraphModuleDocumentType, f as reducer, g as setSubgraphStatus, h as setSubgraphName, i as SubgraphModuleDocumentHeaderSchema, l as isSubgraphModuleDocument, m as creators_exports, n as initialLocalState, o as SubgraphModulePHStateSchema, p as actions, s as assertIsSubgraphModuleDocument, t as initialGlobalState, u as isSubgraphModuleState, v as SetSubgraphStatusInputSchema, x as definedNonNullAnySchema, y as StatusTypeSchema } from "../../utils-
|
|
2
|
-
import { n as utils, r as documentModel, t as SubgraphModule } from "../../module-
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
1
|
+
import { S as isDefinedNonNullAny, _ as SetSubgraphNameInputSchema, a as SubgraphModuleDocumentSchema, b as SubgraphModuleStateSchema, c as assertIsSubgraphModuleState, d as subgraphModuleDocumentType, f as reducer, g as setSubgraphStatus, h as setSubgraphName, i as SubgraphModuleDocumentHeaderSchema, l as isSubgraphModuleDocument, m as creators_exports, n as initialLocalState, o as SubgraphModulePHStateSchema, p as actions, s as assertIsSubgraphModuleDocument, t as initialGlobalState, u as isSubgraphModuleState, v as SetSubgraphStatusInputSchema, x as definedNonNullAnySchema, y as StatusTypeSchema } from "../../utils-CkxGmQ2_.js";
|
|
2
|
+
import { n as utils, r as documentModel, t as SubgraphModule } from "../../module-Bx1OEHxF.js";
|
|
3
|
+
import { a as defaultPHState, i as defaultLocalState, n as createSubgraphModuleDocument, r as defaultGlobalState, t as createState } from "../../ph-factories-dVj6mIlR.js";
|
|
4
|
+
import { n as latestVersion, r as supportedVersions, t as subgraphModuleUpgradeManifest } from "../../upgrade-manifest-XdOLymuP.js";
|
|
5
|
+
import { PHDocumentController } from "document-model";
|
|
6
|
+
import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
|
|
7
|
+
//#region document-models/subgraph-module/v1/gen/controller.ts
|
|
8
|
+
/**
|
|
9
|
+
* WARNING: DO NOT EDIT
|
|
10
|
+
* This file is auto-generated and updated by codegen
|
|
11
|
+
*/
|
|
12
|
+
const SubgraphModuleController = PHDocumentController.forDocumentModel(SubgraphModule);
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region document-models/subgraph-module/v1/hooks.ts
|
|
15
|
+
/** Hook to get a SubgraphModule document by its id */
|
|
16
|
+
function useSubgraphModuleDocumentById(documentId) {
|
|
17
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
18
|
+
if (!isSubgraphModuleDocument(document)) return [void 0, void 0];
|
|
19
|
+
return [document, dispatch];
|
|
20
|
+
}
|
|
21
|
+
/** Hook to get the selected SubgraphModule document */
|
|
22
|
+
function useSelectedSubgraphModuleDocument() {
|
|
23
|
+
const [document, dispatch] = useSelectedDocument();
|
|
24
|
+
assertIsSubgraphModuleDocument(document);
|
|
25
|
+
return [document, dispatch];
|
|
26
|
+
}
|
|
27
|
+
/** Hook to get all SubgraphModule documents in the selected drive */
|
|
28
|
+
function useSubgraphModuleDocumentsInSelectedDrive() {
|
|
29
|
+
return useDocumentsInSelectedDrive()?.filter(isSubgraphModuleDocument);
|
|
30
|
+
}
|
|
31
|
+
/** Hook to get all SubgraphModule documents in the selected folder */
|
|
32
|
+
function useSubgraphModuleDocumentsInSelectedFolder() {
|
|
33
|
+
return useDocumentsInSelectedFolder()?.filter(isSubgraphModuleDocument);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
5
36
|
export { SetSubgraphNameInputSchema, SetSubgraphStatusInputSchema, StatusTypeSchema, SubgraphModule, SubgraphModuleController, SubgraphModuleDocumentHeaderSchema, SubgraphModuleDocumentSchema, SubgraphModulePHStateSchema, SubgraphModuleStateSchema, actions, assertIsSubgraphModuleDocument, assertIsSubgraphModuleState, createState, createSubgraphModuleDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isSubgraphModuleDocument, isSubgraphModuleState, latestVersion, reducer, setSubgraphName, setSubgraphStatus, creators_exports as subgraphModuleBaseOperationsActions, subgraphModuleDocumentType, subgraphModuleUpgradeManifest, supportedVersions, useSelectedSubgraphModuleDocument, useSubgraphModuleDocumentById, useSubgraphModuleDocumentsInSelectedDrive, useSubgraphModuleDocumentsInSelectedFolder, utils };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../document-models/subgraph-module/v1/gen/controller.ts","../../../document-models/subgraph-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { SubgraphModule } from \"../module.js\";\nimport type { SubgraphModuleAction, SubgraphModulePHState } from \"./types.js\";\n\nexport const SubgraphModuleController = PHDocumentController.forDocumentModel<\n SubgraphModulePHState,\n SubgraphModuleAction\n>(SubgraphModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n SubgraphModuleAction,\n SubgraphModuleDocument,\n} from \"document-models/subgraph-module/v1\";\nimport {\n assertIsSubgraphModuleDocument,\n isSubgraphModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a SubgraphModule document by its id */\nexport function useSubgraphModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [SubgraphModuleDocument, DocumentDispatch<SubgraphModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isSubgraphModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected SubgraphModule document */\nexport function useSelectedSubgraphModuleDocument(): [\n SubgraphModuleDocument,\n DocumentDispatch<SubgraphModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsSubgraphModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all SubgraphModule documents in the selected drive */\nexport function useSubgraphModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isSubgraphModuleDocument);\n}\n\n/** Hook to get all SubgraphModule documents in the selected folder */\nexport function useSubgraphModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isSubgraphModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,2BAA2B,qBAAqB,iBAG3D,eAAe;;;;ACUjB,SAAgB,8BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,yBAAyB,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACtE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,oCAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,gCAA+B,SAAS;AACxC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,4CAA4C;AAE1D,QADiC,6BAA6B,EAC7B,OAAO,yBAAyB;;;AAInE,SAAgB,6CAA6C;AAE3D,QADkC,8BAA8B,EAC9B,OAAO,yBAAyB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as VetraPackageDocument, A as vetraPackageDocumentType, At as SetPackageDescriptionAction, B as creators_d_exports, C as isDefinedNonNullAny, Ct as VetraPackageAction, D as defaultGlobalState, Dt as SetPackageAuthorNameAction, E as createVetraPackageDocument, Et as SetPackageAuthorAction, F as assertIsVetraPackageState, G as setPackageCategory, H as setPackageAuthor, I as isVetraPackageDocument, J as setPackageName, K as setPackageDescription, L as isVetraPackageState, M as VetraPackageDocumentSchema, Mt as SetPackageNameAction, N as VetraPackagePHStateSchema, Nt as SetPackageNpmUrlAction, O as defaultLocalState, Ot as SetPackageAuthorWebsiteAction, P as assertIsVetraPackageDocument, Pt as VetraPackageBaseOperationsAction, Q as actions, R as documentModel, S as definedNonNullAnySchema, St as VetraPackageState, T as createState, Tt as RemovePackageKeywordAction, U as setPackageAuthorName, V as removePackageKeyword, W as setPackageAuthorWebsite, X as VetraPackageController, Y as setPackageNpmUrl, Z as VetraPackageBaseOperationsOperations, _ as SetPackageDescriptionInputSchema, _t as SetPackageCategoryInput, a as useVetraPackageDocumentsInSelectedDrive, at as Incremental, b as SetPackageNpmUrlInputSchema, bt as SetPackageNameInput, c as initialLocalState, ct as MakeEmpty, d as KeywordSchema, dt as Maybe, et as VetraPackageLocalState, f as RemovePackageKeywordInputSchema, ft as RemovePackageKeywordInput, g as SetPackageCategoryInputSchema, gt as SetPackageAuthorWebsiteInput, h as SetPackageAuthorWebsiteInputSchema, ht as SetPackageAuthorNameInput, i as useVetraPackageDocumentById, it as Exact, j as VetraPackageDocumentHeaderSchema, jt as SetPackageGithubUrlAction, k as defaultPHState, kt as SetPackageCategoryAction, l as AddPackageKeywordInputSchema, lt as MakeMaybe, m as SetPackageAuthorNameInputSchema, mt as SetPackageAuthorInput, n as utils, nt as AddPackageKeywordInput, o as useVetraPackageDocumentsInSelectedFolder, ot as InputMaybe, p as SetPackageAuthorInputSchema, pt as Scalars, q as setPackageGithubUrl, r as useSelectedVetraPackageDocument, rt as Author, s as initialGlobalState, st as Keyword, t as VetraPackage, tt as VetraPackagePHState, u as AuthorSchema, ut as MakeOptional, v as SetPackageGithubUrlInputSchema, vt as SetPackageDescriptionInput, w as reducer, wt as AddPackageKeywordAction, x as VetraPackageStateSchema, xt as SetPackageNpmUrlInput, y as SetPackageNameInputSchema, yt as SetPackageGithubUrlInput, z as addPackageKeyword } from "../../module-
|
|
1
|
+
import { $ as VetraPackageDocument, A as vetraPackageDocumentType, At as SetPackageDescriptionAction, B as creators_d_exports, C as isDefinedNonNullAny, Ct as VetraPackageAction, D as defaultGlobalState, Dt as SetPackageAuthorNameAction, E as createVetraPackageDocument, Et as SetPackageAuthorAction, F as assertIsVetraPackageState, G as setPackageCategory, H as setPackageAuthor, I as isVetraPackageDocument, J as setPackageName, K as setPackageDescription, L as isVetraPackageState, M as VetraPackageDocumentSchema, Mt as SetPackageNameAction, N as VetraPackagePHStateSchema, Nt as SetPackageNpmUrlAction, O as defaultLocalState, Ot as SetPackageAuthorWebsiteAction, P as assertIsVetraPackageDocument, Pt as VetraPackageBaseOperationsAction, Q as actions, R as documentModel, S as definedNonNullAnySchema, St as VetraPackageState, T as createState, Tt as RemovePackageKeywordAction, U as setPackageAuthorName, V as removePackageKeyword, W as setPackageAuthorWebsite, X as VetraPackageController, Y as setPackageNpmUrl, Z as VetraPackageBaseOperationsOperations, _ as SetPackageDescriptionInputSchema, _t as SetPackageCategoryInput, a as useVetraPackageDocumentsInSelectedDrive, at as Incremental, b as SetPackageNpmUrlInputSchema, bt as SetPackageNameInput, c as initialLocalState, ct as MakeEmpty, d as KeywordSchema, dt as Maybe, et as VetraPackageLocalState, f as RemovePackageKeywordInputSchema, ft as RemovePackageKeywordInput, g as SetPackageCategoryInputSchema, gt as SetPackageAuthorWebsiteInput, h as SetPackageAuthorWebsiteInputSchema, ht as SetPackageAuthorNameInput, i as useVetraPackageDocumentById, it as Exact, j as VetraPackageDocumentHeaderSchema, jt as SetPackageGithubUrlAction, k as defaultPHState, kt as SetPackageCategoryAction, l as AddPackageKeywordInputSchema, lt as MakeMaybe, m as SetPackageAuthorNameInputSchema, mt as SetPackageAuthorInput, n as utils, nt as AddPackageKeywordInput, o as useVetraPackageDocumentsInSelectedFolder, ot as InputMaybe, p as SetPackageAuthorInputSchema, pt as Scalars, q as setPackageGithubUrl, r as useSelectedVetraPackageDocument, rt as Author, s as initialGlobalState, st as Keyword, t as VetraPackage, tt as VetraPackagePHState, u as AuthorSchema, ut as MakeOptional, v as SetPackageGithubUrlInputSchema, vt as SetPackageDescriptionInput, w as reducer, wt as AddPackageKeywordAction, x as VetraPackageStateSchema, xt as SetPackageNpmUrlInput, y as SetPackageNameInputSchema, yt as SetPackageGithubUrlInput, z as addPackageKeyword } from "../../module-ciAK1LUC.js";
|
|
2
2
|
import { UpgradeManifest } from "document-model";
|
|
3
3
|
|
|
4
4
|
//#region document-models/vetra-package/upgrades/versions.d.ts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { A as KeywordSchema, B as VetraPackageStateSchema, C as setPackageCategory, D as setPackageNpmUrl, E as setPackageName, F as SetPackageCategoryInputSchema, H as isDefinedNonNullAny, I as SetPackageDescriptionInputSchema, L as SetPackageGithubUrlInputSchema, M as SetPackageAuthorInputSchema, N as SetPackageAuthorNameInputSchema, O as AddPackageKeywordInputSchema, P as SetPackageAuthorWebsiteInputSchema, R as SetPackageNameInputSchema, S as setPackageAuthorWebsite, T as setPackageGithubUrl, V as definedNonNullAnySchema, _ as addPackageKeyword, b as setPackageAuthor, c as VetraPackagePHStateSchema, d as isVetraPackageDocument, f as isVetraPackageState, g as actions, h as documentModel, i as initialLocalState, j as RemovePackageKeywordInputSchema, k as AuthorSchema, l as assertIsVetraPackageDocument, m as reducer, n as utils, o as VetraPackageDocumentHeaderSchema, p as vetraPackageDocumentType, r as initialGlobalState, s as VetraPackageDocumentSchema, t as VetraPackage, u as assertIsVetraPackageState, v as creators_exports, w as setPackageDescription, x as setPackageAuthorName, y as removePackageKeyword, z as SetPackageNpmUrlInputSchema } from "../../module-
|
|
2
|
-
import { a as
|
|
1
|
+
import { A as KeywordSchema, B as VetraPackageStateSchema, C as setPackageCategory, D as setPackageNpmUrl, E as setPackageName, F as SetPackageCategoryInputSchema, H as isDefinedNonNullAny, I as SetPackageDescriptionInputSchema, L as SetPackageGithubUrlInputSchema, M as SetPackageAuthorInputSchema, N as SetPackageAuthorNameInputSchema, O as AddPackageKeywordInputSchema, P as SetPackageAuthorWebsiteInputSchema, R as SetPackageNameInputSchema, S as setPackageAuthorWebsite, T as setPackageGithubUrl, V as definedNonNullAnySchema, _ as addPackageKeyword, b as setPackageAuthor, c as VetraPackagePHStateSchema, d as isVetraPackageDocument, f as isVetraPackageState, g as actions, h as documentModel, i as initialLocalState, j as RemovePackageKeywordInputSchema, k as AuthorSchema, l as assertIsVetraPackageDocument, m as reducer, n as utils, o as VetraPackageDocumentHeaderSchema, p as vetraPackageDocumentType, r as initialGlobalState, s as VetraPackageDocumentSchema, t as VetraPackage, u as assertIsVetraPackageState, v as creators_exports, w as setPackageDescription, x as setPackageAuthorName, y as removePackageKeyword, z as SetPackageNpmUrlInputSchema } from "../../module-CRfHlbnq.js";
|
|
2
|
+
import { a as createState, c as defaultLocalState, i as useVetraPackageDocumentsInSelectedFolder, l as defaultPHState, n as useVetraPackageDocumentById, o as createVetraPackageDocument, r as useVetraPackageDocumentsInSelectedDrive, s as defaultGlobalState, t as useSelectedVetraPackageDocument, u as VetraPackageController } from "../../vetra-package-Bl6TC4wx.js";
|
|
3
|
+
import { n as latestVersion, r as supportedVersions, t as vetraPackageUpgradeManifest } from "../../upgrade-manifest-OlS1ALVv.js";
|
|
3
4
|
export { AddPackageKeywordInputSchema, AuthorSchema, KeywordSchema, RemovePackageKeywordInputSchema, SetPackageAuthorInputSchema, SetPackageAuthorNameInputSchema, SetPackageAuthorWebsiteInputSchema, SetPackageCategoryInputSchema, SetPackageDescriptionInputSchema, SetPackageGithubUrlInputSchema, SetPackageNameInputSchema, SetPackageNpmUrlInputSchema, VetraPackage, VetraPackageController, VetraPackageDocumentHeaderSchema, VetraPackageDocumentSchema, VetraPackagePHStateSchema, VetraPackageStateSchema, actions, addPackageKeyword, assertIsVetraPackageDocument, assertIsVetraPackageState, createState, createVetraPackageDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isVetraPackageDocument, isVetraPackageState, latestVersion, reducer, removePackageKeyword, setPackageAuthor, setPackageAuthorName, setPackageAuthorWebsite, setPackageCategory, setPackageDescription, setPackageGithubUrl, setPackageName, setPackageNpmUrl, supportedVersions, useSelectedVetraPackageDocument, useVetraPackageDocumentById, useVetraPackageDocumentsInSelectedDrive, useVetraPackageDocumentsInSelectedFolder, utils, creators_exports as vetraPackageBaseOperationsActions, vetraPackageDocumentType, vetraPackageUpgradeManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as removeDocumentType, b as setProcessorStatus, h as addProcessorApp, m as addDocumentType, v as removeProcessorApp, x as setProcessorType, y as setProcessorName } from "./utils-
|
|
1
|
+
import { _ as removeDocumentType, b as setProcessorStatus, h as addProcessorApp, m as addDocumentType, v as removeProcessorApp, x as setProcessorType, y as setProcessorName } from "./utils-DmOIDVQo.js";
|
|
2
|
+
import { n as useAvailableDocumentTypes, t as useDebounce } from "./hooks-D_8Uwk1s.js";
|
|
2
3
|
import { StatusPill } from "./editors/components/index.js";
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as useSelectedProcessorModuleDocument } from "./useVetraDocument-BpPD6DKR.js";
|
|
4
|
+
import { n as useSelectedProcessorModuleDocument } from "./useVetraDocument-BlLdlhrQ.js";
|
|
5
5
|
import { useSetPHDocumentEditorConfig } from "@powerhousedao/reactor-browser";
|
|
6
6
|
import { PROCESSOR_APPS } from "@powerhousedao/shared/processors";
|
|
7
7
|
import { useCallback, useEffect, useState } from "react";
|
|
@@ -241,4 +241,4 @@ function Editor() {
|
|
|
241
241
|
//#endregion
|
|
242
242
|
export { Editor as default };
|
|
243
243
|
|
|
244
|
-
//# sourceMappingURL=editor-
|
|
244
|
+
//# sourceMappingURL=editor-CZrushH_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-DhxLTv2_.js","names":[],"sources":["../editors/processor-editor/components/ProcessorEditorForm.tsx","../editors/processor-editor/config.ts","../editors/processor-editor/editor.tsx"],"sourcesContent":["import {\n PROCESSOR_APPS,\n type ProcessorApp,\n type ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { useEffect, useState } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { DocumentTypeItem } from \"../../../document-models/processor-module/index.js\";\nimport { StatusPill } from \"../../components/index.js\";\nimport { useAvailableDocumentTypes, useDebounce } from \"../../hooks/index.js\";\n\nexport interface ProcessorEditorFormProps {\n processorName?: string;\n processorType?: string;\n documentTypes?: DocumentTypeItem[];\n processorApps?: ProcessorApps;\n status?: string;\n onNameChange?: (name: string) => void;\n onTypeChange?: (type: string) => void;\n onAddDocumentType?: (id: string, documentType: string) => void;\n onRemoveDocumentType?: (id: string) => void;\n onAddProcessorApp?: (processorApp: ProcessorApp) => void;\n onRemoveProcessorApp?: (processorApp: ProcessorApp) => void;\n onConfirm?: () => void;\n}\n\nexport const ProcessorEditorForm: React.FC<ProcessorEditorFormProps> = ({\n processorName: initialProcessorName = \"\",\n processorType: initialProcessorType = \"\",\n documentTypes: initialDocumentTypes = [],\n processorApps: initialProcessorApps = [],\n status = \"DRAFT\",\n onNameChange,\n onTypeChange,\n onAddDocumentType,\n onRemoveDocumentType,\n onAddProcessorApp,\n onRemoveProcessorApp,\n onConfirm,\n}) => {\n const [processorName, setProcessorName] = useState(initialProcessorName);\n const [processorType, setProcessorType] = useState(initialProcessorType);\n const [documentTypes, setDocumentTypes] =\n useState<DocumentTypeItem[]>(initialDocumentTypes);\n const [selectedDocumentType, setSelectedDocumentType] = useState(\"\");\n const [processorApps, setProcessorApps] = useState(initialProcessorApps);\n const [isConfirmed, setIsConfirmed] = useState(false);\n\n // Get available document types from the hook (combines reactor and vetra drive)\n const availableDocumentTypes = useAvailableDocumentTypes();\n\n // Use the debounce hook for name and type changes\n useDebounce(processorName, onNameChange, 300);\n useDebounce(processorType, onTypeChange, 300);\n\n // Update local state when initial values change\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorName(initialProcessorName);\n }, [initialProcessorName]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorType(initialProcessorType);\n }, [initialProcessorType]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setDocumentTypes(initialDocumentTypes);\n }, [initialDocumentTypes]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorApps(initialProcessorApps);\n }, [initialProcessorApps]);\n\n // Reset confirmation state if status changes back to DRAFT\n useEffect(() => {\n if (status === \"DRAFT\") {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setIsConfirmed(false);\n }\n }, [status]);\n\n // Check if form should be read-only\n const isReadOnly = isConfirmed || status === \"CONFIRMED\";\n\n const handleConfirm = () => {\n if (\n processorName.trim() &&\n processorType &&\n documentTypes.length > 0 &&\n processorApps.length > 0\n ) {\n setIsConfirmed(true); // Immediate UI update\n onConfirm?.();\n }\n };\n\n const handleRemoveDocumentType = (id: string) => {\n setDocumentTypes(documentTypes.filter((dt) => dt.id !== id));\n onRemoveDocumentType?.(id);\n };\n\n const canConfirm =\n !!processorName.trim() &&\n !!processorType &&\n documentTypes.length > 0 &&\n processorApps.length > 0;\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-lg font-medium text-foreground\">\n Processor Configuration\n </h2>\n <StatusPill\n status={status === \"CONFIRMED\" ? \"confirmed\" : \"draft\"}\n label={status === \"CONFIRMED\" ? \"Confirmed\" : \"Draft\"}\n />\n </div>\n\n {/* Processor Name Field */}\n <div>\n <label\n htmlFor=\"processor-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Processor Name\n </label>\n <input\n id=\"processor-name\"\n type=\"text\"\n value={processorName}\n onChange={(e) => setProcessorName(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\",\n isReadOnly\n ? \"cursor-not-allowed bg-muted text-muted-foreground\"\n : \"\",\n )}\n placeholder=\"Enter processor name\"\n />\n </div>\n\n {/* Processor Type Dropdown */}\n <div>\n <label\n htmlFor=\"processor-type\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Type\n </label>\n <select\n id=\"processor-type\"\n value={processorType}\n onChange={(e) => setProcessorType(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none\",\n isReadOnly ? \"cursor-not-allowed bg-muted\" : \"\",\n )}\n >\n <option value=\"\">Select type...</option>\n <option value=\"analytics\">Analytics</option>\n <option value=\"relational\">Relational Database</option>\n </select>\n </div>\n\n {/* Document Types Field */}\n <div>\n <label\n htmlFor=\"document-types\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Document Types\n </label>\n <div className=\"space-y-2\">\n {!isReadOnly && availableDocumentTypes.length > 0 && (\n <select\n id=\"document-types\"\n value={selectedDocumentType}\n onChange={(e) => {\n const selectedValue = e.target.value;\n if (\n selectedValue &&\n !documentTypes.some((dt) => dt.documentType === selectedValue)\n ) {\n const id = Date.now().toString();\n const newType: DocumentTypeItem = {\n id,\n documentType: selectedValue,\n };\n setDocumentTypes([...documentTypes, newType]);\n onAddDocumentType?.(id, selectedValue);\n }\n setSelectedDocumentType(\"\");\n }}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none\"\n >\n <option value=\"\">Select a document type to add</option>\n {availableDocumentTypes\n .filter(\n (docType) =>\n !documentTypes.some((dt) => dt.documentType === docType),\n )\n .map((docType) => (\n <option key={docType} value={docType}>\n {docType}\n </option>\n ))}\n </select>\n )}\n <div className=\"space-y-1\">\n {documentTypes.map((type) => (\n <div key={type.id} className=\"flex items-center py-1\">\n <span className=\"text-sm text-foreground\">\n {type.documentType}\n </span>\n {!isReadOnly && (\n <button\n onClick={() => handleRemoveDocumentType(type.id)}\n className=\"ml-2 text-muted-foreground hover:hover-effect focus:outline-none\"\n >\n ×\n </button>\n )}\n </div>\n ))}\n </div>\n </div>\n </div>\n {/* Processor Apps Field */}\n <div>\n <label\n htmlFor=\"processor-apps\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Processor Apps\n </label>\n <div className=\"space-y-2\">\n {!isReadOnly && (\n <>\n {PROCESSOR_APPS.map((processorApp) => (\n <div key={processorApp} className=\"flex gap-1\">\n <input\n type=\"checkbox\"\n name={processorApp}\n id={processorApp}\n checked={processorApps.includes(processorApp)}\n onChange={(event) => {\n const isChecked = event.target.checked;\n if (isChecked) {\n setProcessorApps((processorApps) => [\n ...new Set([...processorApps, processorApp]),\n ]);\n onAddProcessorApp?.(processorApp);\n } else {\n if (processorApps.length > 1) {\n setProcessorApps((processorApps) =>\n processorApps.filter((p) => p !== processorApp),\n );\n onRemoveProcessorApp?.(processorApp);\n }\n }\n }}\n />\n <label htmlFor={processorApp} className=\"text-foreground\">\n {processorApp}\n </label>\n </div>\n ))}\n </>\n )}\n <div className=\"space-y-1\">\n {isReadOnly &&\n processorApps.map((processorApp) => (\n <span key={processorApp} className=\"text-sm text-foreground\">\n {processorApp}\n </span>\n ))}\n </div>\n </div>\n </div>\n {/* Confirm Button - only show if not in read-only mode */}\n {!isReadOnly && (\n <div>\n <button\n onClick={handleConfirm}\n disabled={!canConfirm}\n className=\"rounded-md bg-primary px-4 py-2 text-primary-foreground hover:hover-effect focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none disabled:disabled-effect\"\n >\n Confirm\n </button>\n </div>\n )}\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport type {\n ProcessorApp,\n ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { useCallback } from \"react\";\nimport {\n addDocumentType,\n addProcessorApp,\n removeDocumentType,\n removeProcessorApp,\n setProcessorName,\n setProcessorStatus,\n setProcessorType,\n} from \"../../document-models/processor-module/index.js\";\nimport { useSelectedProcessorModuleDocument } from \"../hooks/useVetraDocument.js\";\nimport { ProcessorEditorForm } from \"./components/ProcessorEditorForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport default function Editor() {\n useSetPHDocumentEditorConfig(editorConfig);\n const [document, dispatch] = useSelectedProcessorModuleDocument();\n\n const onConfirm = useCallback(() => {\n // Dispatch all actions at once\n dispatch([setProcessorStatus({ status: \"CONFIRMED\" })]);\n }, [dispatch]);\n\n const onNameChange = useCallback(\n (name: string) => {\n if (name === document.state.global.name) return;\n dispatch(setProcessorName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onTypeChange = useCallback(\n (type: string) => {\n if (type === document.state.global.type) return;\n dispatch(setProcessorType({ type }));\n },\n [document.state.global.type, dispatch],\n );\n\n const onAddDocumentType = useCallback(\n (id: string, documentType: string) => {\n dispatch(addDocumentType({ id, documentType }));\n },\n [dispatch],\n );\n\n const onRemoveDocumentType = useCallback(\n (id: string) => {\n dispatch(removeDocumentType({ id }));\n },\n [dispatch],\n );\n\n const onAddProcessorApp = useCallback(\n (processorApp: ProcessorApp) => {\n dispatch(addProcessorApp({ processorApp }));\n },\n [dispatch],\n );\n\n const onRemoveProcessorApp = useCallback(\n (processorApp: ProcessorApp) => {\n dispatch(removeProcessorApp({ processorApp }));\n },\n [dispatch],\n );\n\n return (\n <div className=\"bg-background p-6\">\n <DocumentToolbar />\n <ProcessorEditorForm\n onNameChange={onNameChange}\n onTypeChange={onTypeChange}\n onAddDocumentType={onAddDocumentType}\n onRemoveDocumentType={onRemoveDocumentType}\n onAddProcessorApp={onAddProcessorApp}\n onRemoveProcessorApp={onRemoveProcessorApp}\n status={document.state.global.status}\n processorName={document.state.global.name ?? \"\"}\n processorType={document.state.global.type ?? \"\"}\n documentTypes={document.state.global.documentTypes ?? []}\n processorApps={document.state.global.processorApps as ProcessorApps}\n onConfirm={onConfirm}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AA0BA,MAAa,uBAA2D,EACtE,eAAe,uBAAuB,IACtC,eAAe,uBA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EAAE,cAAc,CAAC,CAAC;IAE7C,CAAC,SAAS,CACX;CAED,MAAM,uBAAuB,aAC1B,iBAA+B;AAC9B,WAAS,mBAAmB,EAAE,cAAc,CAAC,CAAC;IAEhD,CAAC,SAAS,CACX;AAED,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,iBAAD,EAAmB,CAAA,EACnB,oBAAC,qBAAD;GACgB;GACA;GACK;GACG;GACH;GACG;GACtB,QAAQ,SAAS,MAAM,OAAO;GAC9B,eAAe,SAAS,MAAM,OAAO,QAAQ;GAC7C,eAAe,SAAS,MAAM,OAAO,QAAQ;GAC7C,eAAe,SAAS,MAAM,OAAO,iBAAiB,EAAE;GACxD,eAAe,SAAS,MAAM,OAAO;GAC1B;GACX,CAAA,CACE"}
|
|
1
|
+
{"version":3,"file":"editor-CZrushH_.js","names":[],"sources":["../editors/processor-editor/components/ProcessorEditorForm.tsx","../editors/processor-editor/config.ts","../editors/processor-editor/editor.tsx"],"sourcesContent":["import {\n PROCESSOR_APPS,\n type ProcessorApp,\n type ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { useEffect, useState } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { DocumentTypeItem } from \"../../../document-models/processor-module/index.js\";\nimport { StatusPill } from \"../../components/index.js\";\nimport { useAvailableDocumentTypes, useDebounce } from \"../../hooks/index.js\";\n\nexport interface ProcessorEditorFormProps {\n processorName?: string;\n processorType?: string;\n documentTypes?: DocumentTypeItem[];\n processorApps?: ProcessorApps;\n status?: string;\n onNameChange?: (name: string) => void;\n onTypeChange?: (type: string) => void;\n onAddDocumentType?: (id: string, documentType: string) => void;\n onRemoveDocumentType?: (id: string) => void;\n onAddProcessorApp?: (processorApp: ProcessorApp) => void;\n onRemoveProcessorApp?: (processorApp: ProcessorApp) => void;\n onConfirm?: () => void;\n}\n\nexport const ProcessorEditorForm: React.FC<ProcessorEditorFormProps> = ({\n processorName: initialProcessorName = \"\",\n processorType: initialProcessorType = \"\",\n documentTypes: initialDocumentTypes = [],\n processorApps: initialProcessorApps = [],\n status = \"DRAFT\",\n onNameChange,\n onTypeChange,\n onAddDocumentType,\n onRemoveDocumentType,\n onAddProcessorApp,\n onRemoveProcessorApp,\n onConfirm,\n}) => {\n const [processorName, setProcessorName] = useState(initialProcessorName);\n const [processorType, setProcessorType] = useState(initialProcessorType);\n const [documentTypes, setDocumentTypes] =\n useState<DocumentTypeItem[]>(initialDocumentTypes);\n const [selectedDocumentType, setSelectedDocumentType] = useState(\"\");\n const [processorApps, setProcessorApps] = useState(initialProcessorApps);\n const [isConfirmed, setIsConfirmed] = useState(false);\n\n // Get available document types from the hook (combines reactor and vetra drive)\n const availableDocumentTypes = useAvailableDocumentTypes();\n\n // Use the debounce hook for name and type changes\n useDebounce(processorName, onNameChange, 300);\n useDebounce(processorType, onTypeChange, 300);\n\n // Update local state when initial values change\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorName(initialProcessorName);\n }, [initialProcessorName]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorType(initialProcessorType);\n }, [initialProcessorType]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setDocumentTypes(initialDocumentTypes);\n }, [initialDocumentTypes]);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setProcessorApps(initialProcessorApps);\n }, [initialProcessorApps]);\n\n // Reset confirmation state if status changes back to DRAFT\n useEffect(() => {\n if (status === \"DRAFT\") {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setIsConfirmed(false);\n }\n }, [status]);\n\n // Check if form should be read-only\n const isReadOnly = isConfirmed || status === \"CONFIRMED\";\n\n const handleConfirm = () => {\n if (\n processorName.trim() &&\n processorType &&\n documentTypes.length > 0 &&\n processorApps.length > 0\n ) {\n setIsConfirmed(true); // Immediate UI update\n onConfirm?.();\n }\n };\n\n const handleRemoveDocumentType = (id: string) => {\n setDocumentTypes(documentTypes.filter((dt) => dt.id !== id));\n onRemoveDocumentType?.(id);\n };\n\n const canConfirm =\n !!processorName.trim() &&\n !!processorType &&\n documentTypes.length > 0 &&\n processorApps.length > 0;\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-lg font-medium text-foreground\">\n Processor Configuration\n </h2>\n <StatusPill\n status={status === \"CONFIRMED\" ? \"confirmed\" : \"draft\"}\n label={status === \"CONFIRMED\" ? \"Confirmed\" : \"Draft\"}\n />\n </div>\n\n {/* Processor Name Field */}\n <div>\n <label\n htmlFor=\"processor-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Processor Name\n </label>\n <input\n id=\"processor-name\"\n type=\"text\"\n value={processorName}\n onChange={(e) => setProcessorName(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\",\n isReadOnly\n ? \"cursor-not-allowed bg-muted text-muted-foreground\"\n : \"\",\n )}\n placeholder=\"Enter processor name\"\n />\n </div>\n\n {/* Processor Type Dropdown */}\n <div>\n <label\n htmlFor=\"processor-type\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Type\n </label>\n <select\n id=\"processor-type\"\n value={processorType}\n onChange={(e) => setProcessorType(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none\",\n isReadOnly ? \"cursor-not-allowed bg-muted\" : \"\",\n )}\n >\n <option value=\"\">Select type...</option>\n <option value=\"analytics\">Analytics</option>\n <option value=\"relational\">Relational Database</option>\n </select>\n </div>\n\n {/* Document Types Field */}\n <div>\n <label\n htmlFor=\"document-types\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Document Types\n </label>\n <div className=\"space-y-2\">\n {!isReadOnly && availableDocumentTypes.length > 0 && (\n <select\n id=\"document-types\"\n value={selectedDocumentType}\n onChange={(e) => {\n const selectedValue = e.target.value;\n if (\n selectedValue &&\n !documentTypes.some((dt) => dt.documentType === selectedValue)\n ) {\n const id = Date.now().toString();\n const newType: DocumentTypeItem = {\n id,\n documentType: selectedValue,\n };\n setDocumentTypes([...documentTypes, newType]);\n onAddDocumentType?.(id, selectedValue);\n }\n setSelectedDocumentType(\"\");\n }}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none\"\n >\n <option value=\"\">Select a document type to add</option>\n {availableDocumentTypes\n .filter(\n (docType) =>\n !documentTypes.some((dt) => dt.documentType === docType),\n )\n .map((docType) => (\n <option key={docType} value={docType}>\n {docType}\n </option>\n ))}\n </select>\n )}\n <div className=\"space-y-1\">\n {documentTypes.map((type) => (\n <div key={type.id} className=\"flex items-center py-1\">\n <span className=\"text-sm text-foreground\">\n {type.documentType}\n </span>\n {!isReadOnly && (\n <button\n onClick={() => handleRemoveDocumentType(type.id)}\n className=\"ml-2 text-muted-foreground hover:hover-effect focus:outline-none\"\n >\n ×\n </button>\n )}\n </div>\n ))}\n </div>\n </div>\n </div>\n {/* Processor Apps Field */}\n <div>\n <label\n htmlFor=\"processor-apps\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Processor Apps\n </label>\n <div className=\"space-y-2\">\n {!isReadOnly && (\n <>\n {PROCESSOR_APPS.map((processorApp) => (\n <div key={processorApp} className=\"flex gap-1\">\n <input\n type=\"checkbox\"\n name={processorApp}\n id={processorApp}\n checked={processorApps.includes(processorApp)}\n onChange={(event) => {\n const isChecked = event.target.checked;\n if (isChecked) {\n setProcessorApps((processorApps) => [\n ...new Set([...processorApps, processorApp]),\n ]);\n onAddProcessorApp?.(processorApp);\n } else {\n if (processorApps.length > 1) {\n setProcessorApps((processorApps) =>\n processorApps.filter((p) => p !== processorApp),\n );\n onRemoveProcessorApp?.(processorApp);\n }\n }\n }}\n />\n <label htmlFor={processorApp} className=\"text-foreground\">\n {processorApp}\n </label>\n </div>\n ))}\n </>\n )}\n <div className=\"space-y-1\">\n {isReadOnly &&\n processorApps.map((processorApp) => (\n <span key={processorApp} className=\"text-sm text-foreground\">\n {processorApp}\n </span>\n ))}\n </div>\n </div>\n </div>\n {/* Confirm Button - only show if not in read-only mode */}\n {!isReadOnly && (\n <div>\n <button\n onClick={handleConfirm}\n disabled={!canConfirm}\n className=\"rounded-md bg-primary px-4 py-2 text-primary-foreground hover:hover-effect focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none disabled:disabled-effect\"\n >\n Confirm\n </button>\n </div>\n )}\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport type {\n ProcessorApp,\n ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { useCallback } from \"react\";\nimport {\n addDocumentType,\n addProcessorApp,\n removeDocumentType,\n removeProcessorApp,\n setProcessorName,\n setProcessorStatus,\n setProcessorType,\n} from \"../../document-models/processor-module/index.js\";\nimport { useSelectedProcessorModuleDocument } from \"../hooks/useVetraDocument.js\";\nimport { ProcessorEditorForm } from \"./components/ProcessorEditorForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport default function Editor() {\n useSetPHDocumentEditorConfig(editorConfig);\n const [document, dispatch] = useSelectedProcessorModuleDocument();\n\n const onConfirm = useCallback(() => {\n // Dispatch all actions at once\n dispatch([setProcessorStatus({ status: \"CONFIRMED\" })]);\n }, [dispatch]);\n\n const onNameChange = useCallback(\n (name: string) => {\n if (name === document.state.global.name) return;\n dispatch(setProcessorName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onTypeChange = useCallback(\n (type: string) => {\n if (type === document.state.global.type) return;\n dispatch(setProcessorType({ type }));\n },\n [document.state.global.type, dispatch],\n );\n\n const onAddDocumentType = useCallback(\n (id: string, documentType: string) => {\n dispatch(addDocumentType({ id, documentType }));\n },\n [dispatch],\n );\n\n const onRemoveDocumentType = useCallback(\n (id: string) => {\n dispatch(removeDocumentType({ id }));\n },\n [dispatch],\n );\n\n const onAddProcessorApp = useCallback(\n (processorApp: ProcessorApp) => {\n dispatch(addProcessorApp({ processorApp }));\n },\n [dispatch],\n );\n\n const onRemoveProcessorApp = useCallback(\n (processorApp: ProcessorApp) => {\n dispatch(removeProcessorApp({ processorApp }));\n },\n [dispatch],\n );\n\n return (\n <div className=\"bg-background p-6\">\n <DocumentToolbar />\n <ProcessorEditorForm\n onNameChange={onNameChange}\n onTypeChange={onTypeChange}\n onAddDocumentType={onAddDocumentType}\n onRemoveDocumentType={onRemoveDocumentType}\n onAddProcessorApp={onAddProcessorApp}\n onRemoveProcessorApp={onRemoveProcessorApp}\n status={document.state.global.status}\n processorName={document.state.global.name ?? \"\"}\n processorType={document.state.global.type ?? \"\"}\n documentTypes={document.state.global.documentTypes ?? []}\n processorApps={document.state.global.processorApps as ProcessorApps}\n onConfirm={onConfirm}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AA0BA,MAAa,uBAA2D,EACtE,eAAe,uBAAuB,IACtC,eAAe,uBAAuB,IACtC,eAAe,uBAAuB,EAAE,EACxC,eAAe,uBAAuB,EAAE,EACxC,SAAS,SACT,cACA,cACA,mBACA,sBACA,mBACA,sBACA,gBACI;CACJ,MAAM,CAAC,eAAe,oBAAoB,SAAS,qBAAqB;CACxE,MAAM,CAAC,eAAe,oBAAoB,SAAS,qBAAqB;CACxE,MAAM,CAAC,eAAe,oBACpB,SAA6B,qBAAqB;CACpD,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,GAAG;CACpE,MAAM,CAAC,eAAe,oBAAoB,SAAS,qBAAqB;CACxE,MAAM,CAAC,aAAa,kBAAk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AAQ;GAC7C,eAAe,SAAS,MAAM,OAAO,iBAAiB,EAAE;GACxD,eAAe,SAAS,MAAM,OAAO;GAC1B;GACX,CAAA,CACE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as setEditorName, g as removeDocumentType, m as addDocumentType, v as setEditorStatus } from "./utils-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as setEditorName, g as removeDocumentType, m as addDocumentType, v as setEditorStatus } from "./utils-DXCsvCXL.js";
|
|
2
|
+
import { n as useAvailableDocumentTypes, t as useDebounce } from "./hooks-D_8Uwk1s.js";
|
|
3
|
+
import { useSelectedDocumentEditorDocument } from "./document-models/document-editor/index.js";
|
|
3
4
|
import { StatusPill } from "./editors/components/index.js";
|
|
4
|
-
import { n as useAvailableDocumentTypes, t as useDebounce } from "./hooks-T8Fh8Ytk.js";
|
|
5
5
|
import { useSetPHDocumentEditorConfig } from "@powerhousedao/reactor-browser";
|
|
6
6
|
import { Suspense, useCallback, useEffect, useState } from "react";
|
|
7
7
|
import { twMerge } from "tailwind-merge";
|
|
@@ -172,4 +172,4 @@ function Editor() {
|
|
|
172
172
|
//#endregion
|
|
173
173
|
export { Editor as default };
|
|
174
174
|
|
|
175
|
-
//# sourceMappingURL=editor-
|
|
175
|
+
//# sourceMappingURL=editor-DXM7ZZ2W.js.map
|