@powerhousedao/reactor-browser 6.3.0-dev.9 → 6.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -12
- package/dist/{attachment-service-B-AmTrs2.d.ts → attachment-service-0E5S0hZ6.d.ts} +53 -24
- package/dist/attachment-service-0E5S0hZ6.d.ts.map +1 -0
- package/dist/{document-model-modules-BG-61uke.js → document-model-modules-DCC6DjOP.js} +2 -2
- package/dist/{document-model-modules-BG-61uke.js.map → document-model-modules-DCC6DjOP.js.map} +1 -1
- package/dist/{document-operations-DRMMwmGZ.js → document-operations-BUbpyfSf.js} +143 -251
- package/dist/document-operations-BUbpyfSf.js.map +1 -0
- package/dist/{global-iARBhxNI.d.ts → global-DfeQC3Fg.d.ts} +3 -53
- package/dist/global-DfeQC3Fg.d.ts.map +1 -0
- package/dist/{index-CNS_9THu.d.ts → index-BlCYgfht.d.ts} +3 -10
- package/dist/{index-CNS_9THu.d.ts.map → index-BlCYgfht.d.ts.map} +1 -1
- package/dist/index.d.ts +6 -129
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/dist/{renown-CBoTdGrg.js → renown-BXiV_I-t.js} +2 -22
- package/dist/renown-BXiV_I-t.js.map +1 -0
- package/dist/{renown-B3MUaiq7.js → renown-BlvHEYjM.js} +3 -12
- package/dist/{renown-B3MUaiq7.js.map → renown-BlvHEYjM.js.map} +1 -1
- package/dist/src/ai/index.js +3 -3
- package/dist/src/graphql-client/entry.d.ts +3 -3
- package/dist/src/graphql-client/entry.js +2 -2
- package/dist/src/renown/index.d.ts +2 -2
- package/dist/src/renown/index.js +3 -3
- package/dist/{switchboard-directory-vH6qtkh-.js → switchboard-directory-CwT34q4g.js} +2 -2
- package/dist/switchboard-directory-CwT34q4g.js.map +1 -0
- package/package.json +10 -10
- package/dist/attachment-service-B-AmTrs2.d.ts.map +0 -1
- package/dist/document-operations-DRMMwmGZ.js.map +0 -1
- package/dist/global-iARBhxNI.d.ts.map +0 -1
- package/dist/renown-CBoTdGrg.js.map +0 -1
- package/dist/switchboard-directory-vH6qtkh-.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as getPHStore, f as usePHStore, t as makePHEventFunctions } from "./make-ph-event-functions-B5GU5xcR.js";
|
|
2
2
|
import { A as DocumentModelNotFoundError, D as queueActions, O as queueOperations, P as UnsupportedDocumentTypeError, b as DOCUMENT_CHANGE_TYPE, f as DocumentCache, h as IDLE_OPERATIONS_ENTRY, i as setDocumentCache, k as uploadOperations, o as useDocumentCache, r as addDocumentCacheEventHandler, v as isOperationCache } from "./dispatch-Cylwl2Dk.js";
|
|
3
|
-
import { B as addFullReactorClientEventHandler, D as setSelectedNodeId, H as addReactorClientModuleEventHandler, K as setReactorClient, N as addDrivesEventHandler, S as addSelectedNodeIdEventHandler, U as addReactorHalvesEventHandler, V as addReactorClientEventHandler, W as getFullReactorClient, Z as useReactorClient, _t as ambientRenownTokenProvider, a as setVetraPackageManager, at as invalidateDriveNodes, c as addSwitchboardsEventHandler, d as addSelectedDriveIdEventHandler, h as setSelectedDriveId, ht as listAllDriveNodes, it as getDriveNode, nt as addDriveNodesEventHandler, p as selectDrive, r as addVetraPackageManagerEventHandler, rt as dropDriveNode, st as markLocalDriveWrite, v as useSelectedDriveId, vt as makeAuthMiddleware, x as addResetSelectedNodeEventHandler } from "./document-model-modules-
|
|
4
|
-
import { A as openTargetWith, C as getCurrentPathname, E as hasHostNavigation, G as
|
|
3
|
+
import { B as addFullReactorClientEventHandler, D as setSelectedNodeId, H as addReactorClientModuleEventHandler, K as setReactorClient, N as addDrivesEventHandler, S as addSelectedNodeIdEventHandler, U as addReactorHalvesEventHandler, V as addReactorClientEventHandler, W as getFullReactorClient, Z as useReactorClient, _t as ambientRenownTokenProvider, a as setVetraPackageManager, at as invalidateDriveNodes, c as addSwitchboardsEventHandler, d as addSelectedDriveIdEventHandler, h as setSelectedDriveId, ht as listAllDriveNodes, it as getDriveNode, nt as addDriveNodesEventHandler, p as selectDrive, r as addVetraPackageManagerEventHandler, rt as dropDriveNode, st as markLocalDriveWrite, v as useSelectedDriveId, vt as makeAuthMiddleware, x as addResetSelectedNodeEventHandler } from "./document-model-modules-DCC6DjOP.js";
|
|
4
|
+
import { A as openTargetWith, C as getCurrentPathname, E as hasHostNavigation, G as findDriveBySlug, H as extractNodeIdFromSlug, I as searchToRecord, L as setBrowserOpenSync, N as recordToSearch, U as extractNodeSlugFromPath, V as extractDriveSlugFromPath, f as addLoadingEventHandler, t as addRenownEventHandler, w as getPHNavigation, z as targetPathname } from "./renown-BXiV_I-t.js";
|
|
5
5
|
import { a as JobChangesDocument, o as PhDocumentFieldsFragmentDoc, t as DocumentChangesDocument } from "./schema-B5lftDPf.js";
|
|
6
6
|
import { t as createClient$1 } from "./client-wwavHFfs.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
8
8
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
9
9
|
import { logger } from "document-model";
|
|
10
|
-
import { FLAGS_FOR_EVERY_VERSION, PEER_CAPABILITIES, UnsupportedDocumentModelVersionError, actionSignerIdentity, actionSigningTarget, actions, assertAuthPreservedOnDuplicate, baseLoadFromInput, baseLoadFromInputVersioned, baseSaveToFileHandle, capSelection, capabilitiesOf, createCopyHeader, createPresignedHeader, createZip, creationState, deserializeSignature, documentModelDocumentType, fitCreateBaseReducer, generateId, hasDerivedDocumentId, hashDocumentStateForScope, headNewDocument, isSignaturePolicy, localSupports, normalizeDocumentModelVersion, replayDocumentVersioned, resolveBaseReducerVersion, selectDocumentModelModule, serializeByKey, setName, setPreferredEditor, signaturePolicyOf, toTransportAction, undoCapabilitiesOf, undoNeedsTargets, undoRedoActions, undoRedoAvailabilityOf, withSignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
10
|
+
import { FLAGS_FOR_EVERY_VERSION, PEER_CAPABILITIES, UnsupportedDocumentModelVersionError, actionSignerIdentity, actionSigningTarget, actions, assertAuthPreservedOnDuplicate, baseLoadFromInput, baseLoadFromInputVersioned, baseSaveToFileHandle, capSelection, capabilitiesOf, createCopyHeader, createPresignedHeader, createZip, creationState, deserializeSignature, documentModelDocumentType, fitCreateBaseReducer, generateActionId, generateId, hasDerivedDocumentId, hashDocumentStateForScope, headNewDocument, isSignaturePolicy, localSupports, normalizeDocumentModelVersion, replayDocumentVersioned, resolveBaseReducerVersion, selectDocumentModelModule, serializeByKey, setName, setPreferredEditor, signaturePolicyOf, toTransportAction, undoCapabilitiesOf, undoNeedsTargets, undoRedoActions, undoRedoAvailabilityOf, withSignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
11
11
|
import { addFolder, copyNode, driveDocumentModelModule, generateNodesCopy, handleTargetNameCollisions, isFileNode, isFolderNode, moveNode, updateNode } from "@powerhousedao/shared/document-drive";
|
|
12
12
|
import { allPass, conditional, constant, forEachObj, funnel, isDefined, isNot, isStrictEqual, isString, isTruthy, once } from "remeda";
|
|
13
13
|
import { DRIVE_CHILD_RELATIONSHIP_TYPE } from "@powerhousedao/reactor-drive";
|
|
@@ -126,12 +126,8 @@ function withoutModalSearch(search) {
|
|
|
126
126
|
return Object.fromEntries(Object.entries(search).filter(([key]) => !own.includes(key)));
|
|
127
127
|
}
|
|
128
128
|
/** Shows a modal. With a host navigation, a routed one opens in the URL, in
|
|
129
|
-
* place of the current entry
|
|
129
|
+
* place of the current entry. */
|
|
130
130
|
function showPHModal(modal) {
|
|
131
|
-
if (modal.type === "settings" && hasHostNavigation()) {
|
|
132
|
-
openTarget({ settings: true });
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
131
|
const search = modalSearch(modal);
|
|
136
132
|
if (search && hasHostNavigation()) {
|
|
137
133
|
if (!isRoutedModal(modalEventFunctions.getSnapshot())) setPHModal(void 0);
|
|
@@ -1770,6 +1766,48 @@ function packageFromDocumentModels(documentModels) {
|
|
|
1770
1766
|
};
|
|
1771
1767
|
}
|
|
1772
1768
|
//#endregion
|
|
1769
|
+
//#region src/graphql-client/system-actions.ts
|
|
1770
|
+
/**
|
|
1771
|
+
* The document-scope actions the reactor reduces itself, built here as
|
|
1772
|
+
* `packages/reactor/src/actions/index.ts` builds them, so the light client
|
|
1773
|
+
* signs and pushes them without importing the reactor as a value.
|
|
1774
|
+
*
|
|
1775
|
+
* Each names its source by id: the signature covers the log the action is
|
|
1776
|
+
* written to, which for a relationship is `sourceId`, and the executor writes
|
|
1777
|
+
* both ids as given.
|
|
1778
|
+
*/
|
|
1779
|
+
/** An ADD_RELATIONSHIP edge from `sourceId` to `targetId`. */
|
|
1780
|
+
function addRelationshipAction(sourceId, targetId, relationshipType, metadata) {
|
|
1781
|
+
const input = {
|
|
1782
|
+
sourceId,
|
|
1783
|
+
targetId,
|
|
1784
|
+
relationshipType,
|
|
1785
|
+
...metadata !== void 0 ? { metadata } : {}
|
|
1786
|
+
};
|
|
1787
|
+
return {
|
|
1788
|
+
id: generateActionId(),
|
|
1789
|
+
type: "ADD_RELATIONSHIP",
|
|
1790
|
+
scope: "document",
|
|
1791
|
+
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1792
|
+
input
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
/** A REMOVE_RELATIONSHIP of the edge from `sourceId` to `targetId`. */
|
|
1796
|
+
function removeRelationshipAction(sourceId, targetId, relationshipType) {
|
|
1797
|
+
const input = {
|
|
1798
|
+
sourceId,
|
|
1799
|
+
targetId,
|
|
1800
|
+
relationshipType
|
|
1801
|
+
};
|
|
1802
|
+
return {
|
|
1803
|
+
id: generateActionId(),
|
|
1804
|
+
type: "REMOVE_RELATIONSHIP",
|
|
1805
|
+
scope: "document",
|
|
1806
|
+
timestampUtcMs: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1807
|
+
input
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
//#endregion
|
|
1773
1811
|
//#region src/graphql-client/subgraph.ts
|
|
1774
1812
|
/** What {@link describeGraphQLDocument} could not read off a document. */
|
|
1775
1813
|
const unnamedOperation = "AnonymousOperation";
|
|
@@ -2196,9 +2234,11 @@ var GraphQLReactorClient = class {
|
|
|
2196
2234
|
* The write half. `execute` submits through `executeAsync` and hands back a
|
|
2197
2235
|
* handle whose `written` and `readable` resolve from `jobStatus`, woken by
|
|
2198
2236
|
* the `jobChanges` subscription when realtime is on, and whose `document()`
|
|
2199
|
-
* runs the `document` query bounded by the receipt's token. `
|
|
2200
|
-
* `
|
|
2201
|
-
*
|
|
2237
|
+
* runs the `document` query bounded by the receipt's token. `rename`,
|
|
2238
|
+
* `addRelationship` and `removeRelationship` are `execute`s of the action
|
|
2239
|
+
* the in-process client would sign. `create` and `deleteDocument` have no
|
|
2240
|
+
* asynchronous mutation: they run the synchronous ones and hand back a
|
|
2241
|
+
* settled handle.
|
|
2202
2242
|
*/
|
|
2203
2243
|
write;
|
|
2204
2244
|
constructor(options) {
|
|
@@ -2223,7 +2263,10 @@ var GraphQLReactorClient = class {
|
|
|
2223
2263
|
this.write = {
|
|
2224
2264
|
execute: (documentIdentifier, branch, actions, signal) => this.submitExecute(documentIdentifier, branch, actions, signal),
|
|
2225
2265
|
create: (document, parentIdentifier, signal) => this.submitCreate(document, parentIdentifier, signal),
|
|
2226
|
-
deleteDocument: (identifier, propagate, signal) => this.submitDeleteDocument(identifier, propagate, signal)
|
|
2266
|
+
deleteDocument: (identifier, propagate, signal) => this.submitDeleteDocument(identifier, propagate, signal),
|
|
2267
|
+
rename: (documentIdentifier, name, branch = "main", signal) => this.submitExecute(documentIdentifier, branch, [actions.setName(name)], signal),
|
|
2268
|
+
addRelationship: (sourceIdentifier, targetIdentifier, relationshipType, metadata, branch = "main", signal) => this.submitRelationship(sourceIdentifier, targetIdentifier, branch, (sourceId, targetId) => addRelationshipAction(sourceId, targetId, relationshipType, metadata), signal),
|
|
2269
|
+
removeRelationship: (sourceIdentifier, targetIdentifier, relationshipType, branch = "main", signal) => this.submitRelationship(sourceIdentifier, targetIdentifier, branch, (sourceId, targetId) => removeRelationshipAction(sourceId, targetId, relationshipType), signal)
|
|
2227
2270
|
};
|
|
2228
2271
|
}
|
|
2229
2272
|
/**
|
|
@@ -2672,6 +2715,30 @@ var GraphQLReactorClient = class {
|
|
|
2672
2715
|
setPreferredEditor(documentIdentifier, preferredEditor, branch = "main", signal) {
|
|
2673
2716
|
return this.execute(documentIdentifier, branch, [actions.setPreferredEditor(preferredEditor)], signal);
|
|
2674
2717
|
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Renames a document with a client-signed `SET_NAME`, as the in-process
|
|
2720
|
+
* client does: the write half's `rename`, read back once readable.
|
|
2721
|
+
*/
|
|
2722
|
+
async rename(documentIdentifier, name, branch = "main", signal) {
|
|
2723
|
+
return (await this.write.rename(documentIdentifier, name, branch, signal)).document();
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Adds a relationship with a client-signed `ADD_RELATIONSHIP` on the
|
|
2727
|
+
* source, as the in-process client does: the write half's
|
|
2728
|
+
* `addRelationship`, resolving with the source once readable. The
|
|
2729
|
+
* Switchboard's own `addRelationship` mutation is not used: it signs with
|
|
2730
|
+
* the Switchboard's key.
|
|
2731
|
+
*/
|
|
2732
|
+
async addRelationship(sourceIdentifier, targetIdentifier, relationshipType, metadata, branch = "main", signal) {
|
|
2733
|
+
return (await this.write.addRelationship(sourceIdentifier, targetIdentifier, relationshipType, metadata, branch, signal)).document();
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* Removes a relationship with a client-signed `REMOVE_RELATIONSHIP` on the
|
|
2737
|
+
* source; see {@link addRelationship}.
|
|
2738
|
+
*/
|
|
2739
|
+
async removeRelationship(sourceIdentifier, targetIdentifier, relationshipType, branch = "main", signal) {
|
|
2740
|
+
return (await this.write.removeRelationship(sourceIdentifier, targetIdentifier, relationshipType, branch, signal)).document();
|
|
2741
|
+
}
|
|
2675
2742
|
/** The `Drive-Id` header for a call: the client's own proof, else the hook's. */
|
|
2676
2743
|
driveIdHeaders(call, proven) {
|
|
2677
2744
|
const hinted = this.driveIdFor?.(call);
|
|
@@ -2919,6 +2986,43 @@ var GraphQLReactorClient = class {
|
|
|
2919
2986
|
*/
|
|
2920
2987
|
async submitExecute(documentIdentifier, branch, actions, signal) {
|
|
2921
2988
|
const document = await this.get(documentIdentifier, { branch }, signal);
|
|
2989
|
+
return this.submitOnDocument(documentIdentifier, document, branch, actions, signal);
|
|
2990
|
+
}
|
|
2991
|
+
/**
|
|
2992
|
+
* The write half's relationship writes: the source is read for the id the
|
|
2993
|
+
* action names and is signed for, and the target is resolved by
|
|
2994
|
+
* {@link relationshipTargetId}, as the in-process write client resolves
|
|
2995
|
+
* both before it signs.
|
|
2996
|
+
*/
|
|
2997
|
+
async submitRelationship(sourceIdentifier, targetIdentifier, branch, build, signal) {
|
|
2998
|
+
const source = await this.get(sourceIdentifier, { branch }, signal);
|
|
2999
|
+
const targetId = await this.relationshipTargetId(targetIdentifier, branch, signal);
|
|
3000
|
+
return this.submitOnDocument(source.header.id, source, branch, [build(source.header.id, targetId)], signal);
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* The id a relationship's target names: a slug becomes its document's id,
|
|
3004
|
+
* and an identifier the Switchboard answers NOT_FOUND for is taken as
|
|
3005
|
+
* given, so a document still in flight names itself, as on the in-process
|
|
3006
|
+
* write side. Only the `document` scope is read.
|
|
3007
|
+
*/
|
|
3008
|
+
async relationshipTargetId(identifier, branch, signal) {
|
|
3009
|
+
let result;
|
|
3010
|
+
try {
|
|
3011
|
+
result = await this.sdk.GetDocument({
|
|
3012
|
+
idOrSlug: identifier,
|
|
3013
|
+
view: {
|
|
3014
|
+
branch,
|
|
3015
|
+
scopes: ["document"]
|
|
3016
|
+
}
|
|
3017
|
+
}, void 0, signal);
|
|
3018
|
+
} catch (error) {
|
|
3019
|
+
if (answersNotFound(error)) return identifier;
|
|
3020
|
+
throw error;
|
|
3021
|
+
}
|
|
3022
|
+
return result.document?.document.id ?? identifier;
|
|
3023
|
+
}
|
|
3024
|
+
/** Signs `actions` against `document` and submits them through `executeAsync`. */
|
|
3025
|
+
async submitOnDocument(documentIdentifier, document, branch, actions, signal) {
|
|
2922
3026
|
const preparedActions = await prepareActionsForPush(actions, document, this.documentModels(), this.resolveSigner(), signal);
|
|
2923
3027
|
const handle = new GraphQLJobWriteHandle(jobInfoFromGql((await this.sdk.MutateDocumentAsync({
|
|
2924
3028
|
documentIdOrSlug: documentIdentifier,
|
|
@@ -3238,6 +3342,12 @@ function refusesConsistencyArgument(error) {
|
|
|
3238
3342
|
return typeof message === "string" && (message.includes("\"consistency\"") || message.includes("\"ConsistencyTokenInput\""));
|
|
3239
3343
|
});
|
|
3240
3344
|
}
|
|
3345
|
+
/** Whether the Switchboard refused a read because the document does not exist. */
|
|
3346
|
+
function answersNotFound(error) {
|
|
3347
|
+
const errors = error?.response?.errors;
|
|
3348
|
+
if (!Array.isArray(errors)) return false;
|
|
3349
|
+
return errors.some((entry) => entry?.extensions?.code === "NOT_FOUND");
|
|
3350
|
+
}
|
|
3241
3351
|
/** {@link GraphQLReactorClient.nodeSource}, as a function. */
|
|
3242
3352
|
function createGraphQLDriveNodeSource(client) {
|
|
3243
3353
|
return client.nodeSource();
|
|
@@ -3640,52 +3750,13 @@ const phDocumentEditorConfigHooks = { isExternalControlsEnabled: useIsExternalCo
|
|
|
3640
3750
|
//#endregion
|
|
3641
3751
|
//#region src/hooks/config/connect.ts
|
|
3642
3752
|
const { useValue: useRouterBasename, setValue: setRouterBasename, addEventHandler: addRouterBasenameEventHandler } = makePHEventFunctions("routerBasename");
|
|
3643
|
-
const { useValue: useVersion, setValue: setVersion, addEventHandler: addVersionEventHandler } = makePHEventFunctions("version");
|
|
3644
|
-
const { useValue: useRequiresHardRefresh, setValue: setRequiresHardRefresh, addEventHandler: addRequiresHardRefreshEventHandler } = makePHEventFunctions("requiresHardRefresh");
|
|
3645
3753
|
const { useValue: useWarnOutdatedApp, setValue: setWarnOutdatedApp, addEventHandler: addWarnOutdatedAppEventHandler } = makePHEventFunctions("warnOutdatedApp");
|
|
3646
3754
|
const { useValue: useStudioMode, setValue: setStudioMode, addEventHandler: addStudioModeEventHandler } = makePHEventFunctions("studioMode");
|
|
3647
3755
|
const { useValue: useBasePath, setValue: setBasePath, addEventHandler: addBasePathEventHandler } = makePHEventFunctions("basePath");
|
|
3648
|
-
const { useValue: useVersionCheckInterval, setValue: setVersionCheckInterval, addEventHandler: addVersionCheckIntervalEventHandler } = makePHEventFunctions("versionCheckInterval");
|
|
3649
|
-
const { useValue: useCliVersion, setValue: setCliVersion, addEventHandler: addCliVersionEventHandler } = makePHEventFunctions("cliVersion");
|
|
3650
|
-
const { useValue: useFileUploadOperationsChunkSize, setValue: setFileUploadOperationsChunkSize, addEventHandler: addFileUploadOperationsChunkSizeEventHandler } = makePHEventFunctions("fileUploadOperationsChunkSize");
|
|
3651
|
-
const { useValue: useIsDocumentModelSelectionSettingsEnabled, setValue: setIsDocumentModelSelectionSettingsEnabled, addEventHandler: addIsDocumentModelSelectionSettingsEnabledEventHandler } = makePHEventFunctions("isDocumentModelSelectionSettingsEnabled");
|
|
3652
|
-
const { useValue: useGaTrackingId, setValue: setGaTrackingId, addEventHandler: addGaTrackingIdEventHandler } = makePHEventFunctions("gaTrackingId");
|
|
3653
3756
|
const { useValue: useDefaultDrivesUrl, setValue: setDefaultDrivesUrl, addEventHandler: addDefaultDrivesUrlEventHandler } = makePHEventFunctions("defaultDrivesUrl");
|
|
3654
|
-
const { useValue: useDrivesPreserveStrategy, setValue: setDrivesPreserveStrategy, addEventHandler: addDrivesPreserveStrategyEventHandler } = makePHEventFunctions("drivesPreserveStrategy");
|
|
3655
|
-
const { useValue: useIsLocalDrivesEnabled, setValue: setIsLocalDrivesEnabled, addEventHandler: addIsLocalDrivesEnabledEventHandler } = makePHEventFunctions("isLocalDrivesEnabled");
|
|
3656
3757
|
const { useValue: useIsAddDriveEnabled, setValue: setIsAddDriveEnabled, addEventHandler: addIsAddDriveEnabledEventHandler } = makePHEventFunctions("isAddDriveEnabled");
|
|
3657
|
-
const { useValue: useIsPublicDrivesEnabled, setValue: setIsPublicDrivesEnabled, addEventHandler: addIsPublicDrivesEnabledEventHandler } = makePHEventFunctions("isPublicDrivesEnabled");
|
|
3658
|
-
const { useValue: useIsAddPublicDrivesEnabled, setValue: setIsAddPublicDrivesEnabled, addEventHandler: addIsAddPublicDrivesEnabledEventHandler } = makePHEventFunctions("isAddPublicDrivesEnabled");
|
|
3659
|
-
const { useValue: useIsDeletePublicDrivesEnabled, setValue: setIsDeletePublicDrivesEnabled, addEventHandler: addIsDeletePublicDrivesEnabledEventHandler } = makePHEventFunctions("isDeletePublicDrivesEnabled");
|
|
3660
|
-
const { useValue: useIsCloudDrivesEnabled, setValue: setIsCloudDrivesEnabled, addEventHandler: addIsCloudDrivesEnabledEventHandler } = makePHEventFunctions("isCloudDrivesEnabled");
|
|
3661
|
-
const { useValue: useIsAddCloudDrivesEnabled, setValue: setIsAddCloudDrivesEnabled, addEventHandler: addIsAddCloudDrivesEnabledEventHandler } = makePHEventFunctions("isAddCloudDrivesEnabled");
|
|
3662
|
-
const { useValue: useIsDeleteCloudDrivesEnabled, setValue: setIsDeleteCloudDrivesEnabled, addEventHandler: addIsDeleteCloudDrivesEnabledEventHandler } = makePHEventFunctions("isDeleteCloudDrivesEnabled");
|
|
3663
|
-
const { useValue: useLocalDrivesEnabled, setValue: setLocalDrivesEnabled, addEventHandler: addLocalDrivesEnabledEventHandler } = makePHEventFunctions("isLocalDrivesEnabled");
|
|
3664
|
-
const { useValue: useIsAddLocalDrivesEnabled, setValue: setIsAddLocalDrivesEnabled, addEventHandler: addIsAddLocalDrivesEnabledEventHandler } = makePHEventFunctions("isAddLocalDrivesEnabled");
|
|
3665
|
-
const { useValue: useIsDeleteLocalDrivesEnabled, setValue: setIsDeleteLocalDrivesEnabled, addEventHandler: addIsDeleteLocalDrivesEnabledEventHandler } = makePHEventFunctions("isDeleteLocalDrivesEnabled");
|
|
3666
|
-
const { useValue: useIsEditorDebugModeEnabled, setValue: setIsEditorDebugModeEnabled, addEventHandler: addIsEditorDebugModeEnabledEventHandler } = makePHEventFunctions("isEditorDebugModeEnabled");
|
|
3667
|
-
const { useValue: useIsEditorReadModeEnabled, setValue: setIsEditorReadModeEnabled, addEventHandler: addIsEditorReadModeEnabledEventHandler } = makePHEventFunctions("isEditorReadModeEnabled");
|
|
3668
|
-
const { useValue: useIsAnalyticsDatabaseWorkerEnabled, setValue: setIsAnalyticsDatabaseWorkerEnabled, addEventHandler: addIsAnalyticsDatabaseWorkerEnabledEventHandler } = makePHEventFunctions("isAnalyticsDatabaseWorkerEnabled");
|
|
3669
|
-
const { useValue: useIsDiffAnalyticsEnabled, setValue: setIsDiffAnalyticsEnabled, addEventHandler: addIsDiffAnalyticsEnabledEventHandler } = makePHEventFunctions("isDiffAnalyticsEnabled");
|
|
3670
|
-
const { useValue: useIsDriveAnalyticsEnabled, setValue: setIsDriveAnalyticsEnabled, addEventHandler: addIsDriveAnalyticsEnabledEventHandler } = makePHEventFunctions("isDriveAnalyticsEnabled");
|
|
3671
3758
|
const { useValue: useRenownUrl, setValue: setRenownUrl, addEventHandler: addRenownUrlEventHandler } = makePHEventFunctions("renownUrl");
|
|
3672
|
-
const { useValue: useRenownNetworkId, setValue: setRenownNetworkId, addEventHandler: addRenownNetworkIdEventHandler } = makePHEventFunctions("renownNetworkId");
|
|
3673
|
-
const { useValue: useRenownChainId, setValue: setRenownChainId, addEventHandler: addRenownChainIdEventHandler } = makePHEventFunctions("renownChainId");
|
|
3674
3759
|
const { useValue: useSwitchboardUrl, setValue: setSwitchboardUrl, addEventHandler: addSwitchboardUrlEventHandler } = makePHEventFunctions("switchboardUrl");
|
|
3675
|
-
const { useValue: useRenownAdapters, setValue: setRenownAdapters, addEventHandler: addRenownAdaptersEventHandler } = makePHEventFunctions("renownAdapters");
|
|
3676
|
-
const { useValue: useSentryRelease, setValue: setSentryRelease, addEventHandler: addSentryReleaseEventHandler } = makePHEventFunctions("sentryRelease");
|
|
3677
|
-
const { useValue: useSentryDsn, setValue: setSentryDsn, addEventHandler: addSentryDsnEventHandler } = makePHEventFunctions("sentryDsn");
|
|
3678
|
-
const { useValue: useSentryEnv, setValue: setSentryEnv, addEventHandler: addSentryEnvEventHandler } = makePHEventFunctions("sentryEnv");
|
|
3679
|
-
const { useValue: useIsSentryTracingEnabled, setValue: setIsSentryTracingEnabled, addEventHandler: addIsSentryTracingEnabledEventHandler } = makePHEventFunctions("isSentryTracingEnabled");
|
|
3680
|
-
const { useValue: useIsExternalProcessorsEnabled, setValue: setIsExternalProcessorsEnabled, addEventHandler: addIsExternalProcessorsEnabledEventHandler } = makePHEventFunctions("isExternalProcessorsEnabled");
|
|
3681
|
-
const { useValue: useIsExternalPackagesEnabled, setValue: setIsExternalPackagesEnabled, addEventHandler: addIsExternalPackagesEnabledEventHandler } = makePHEventFunctions("isExternalPackagesEnabled");
|
|
3682
|
-
const enabledEditorsEventFunctions = makePHEventFunctions("enabledEditors");
|
|
3683
|
-
/** Sets the enabled editors for Connect. */
|
|
3684
|
-
const setEnabledEditors = enabledEditorsEventFunctions.setValue;
|
|
3685
|
-
/** Gets the enabled editors for Connect. */
|
|
3686
|
-
const useEnabledEditors = enabledEditorsEventFunctions.useValue;
|
|
3687
|
-
/** Adds an event handler for when the enabled editors for Connect changes. */
|
|
3688
|
-
const addEnabledEditorsEventHandler = enabledEditorsEventFunctions.addEventHandler;
|
|
3689
3760
|
const disabledEditorsEventFunctions = makePHEventFunctions("disabledEditors");
|
|
3690
3761
|
/** Sets the disabled editors for Connect. */
|
|
3691
3762
|
const setDisabledEditors = disabledEditorsEventFunctions.setValue;
|
|
@@ -3693,41 +3764,6 @@ const setDisabledEditors = disabledEditorsEventFunctions.setValue;
|
|
|
3693
3764
|
const useDisabledEditors = disabledEditorsEventFunctions.useValue;
|
|
3694
3765
|
/** Adds an event handler for when the disabled editors for Connect changes. */
|
|
3695
3766
|
const addDisabledEditorsEventHandler = disabledEditorsEventFunctions.addEventHandler;
|
|
3696
|
-
const isRelationalProcessorsEnabled = makePHEventFunctions("isRelationalProcessorsEnabled");
|
|
3697
|
-
/** Sets the isRelationalProcessorsEnabled for Connect. */
|
|
3698
|
-
const setIsRelationalProcessorsEnabled = isRelationalProcessorsEnabled.setValue;
|
|
3699
|
-
/** Gets the isRelationalProcessorsEnabled for Connect. */
|
|
3700
|
-
const useIsRelationalProcessorsEnabled = isRelationalProcessorsEnabled.useValue;
|
|
3701
|
-
/** Adds an event handler for when the isRelationalProcessorsEnabled for Connect changes. */
|
|
3702
|
-
const addIsRelationalProcessorsEnabledEventHandler = isRelationalProcessorsEnabled.addEventHandler;
|
|
3703
|
-
const isExternalRelationalProcessorsEnabled = makePHEventFunctions("isExternalRelationalProcessorsEnabled");
|
|
3704
|
-
/** Sets the isExternalRelationalProcessorsEnabled for Connect. */
|
|
3705
|
-
const setIsExternalRelationalProcessorsEnabled = isExternalRelationalProcessorsEnabled.setValue;
|
|
3706
|
-
/** Gets the isExternalRelationalProcessorsEnabled for Connect. */
|
|
3707
|
-
const useIsExternalRelationalProcessorsEnabled = isExternalRelationalProcessorsEnabled.useValue;
|
|
3708
|
-
/** Adds an event handler for when the isExternalRelationalProcessorsEnabled for Connect changes. */
|
|
3709
|
-
const addIsExternalRelationalProcessorsEnabledEventHandler = isExternalRelationalProcessorsEnabled.addEventHandler;
|
|
3710
|
-
const isAnalyticsEnabledEventFunctions = makePHEventFunctions("isAnalyticsEnabled");
|
|
3711
|
-
/** Sets the isAnalyticsEnabled for Connect. */
|
|
3712
|
-
const setIsAnalyticsEnabled = isAnalyticsEnabledEventFunctions.setValue;
|
|
3713
|
-
/** Gets the isAnalyticsEnabled for Connect. */
|
|
3714
|
-
const useIsAnalyticsEnabled = isAnalyticsEnabledEventFunctions.useValue;
|
|
3715
|
-
/** Adds an event handler for when the isAnalyticsEnabled for Connect changes. */
|
|
3716
|
-
const addIsAnalyticsEnabledEventHandler = isAnalyticsEnabledEventFunctions.addEventHandler;
|
|
3717
|
-
const isAnalyticsExternalProcessorsEnabled = makePHEventFunctions("isAnalyticsExternalProcessorsEnabled");
|
|
3718
|
-
/** Sets the isAnalyticsExternalProcessorsEnabled for Connect. */
|
|
3719
|
-
const setIsAnalyticsExternalProcessorsEnabled = isAnalyticsExternalProcessorsEnabled.setValue;
|
|
3720
|
-
/** Gets the isAnalyticsExternalProcessorsEnabled for Connect. */
|
|
3721
|
-
const useIsAnalyticsExternalProcessorsEnabled = isAnalyticsExternalProcessorsEnabled.useValue;
|
|
3722
|
-
/** Adds an event handler for when the isAnalyticsExternalProcessorsEnabled for Connect changes. */
|
|
3723
|
-
const addIsAnalyticsExternalProcessorsEnabledEventHandler = isAnalyticsExternalProcessorsEnabled.addEventHandler;
|
|
3724
|
-
const analyticsDatabaseNameEventFunctions = makePHEventFunctions("analyticsDatabaseName");
|
|
3725
|
-
/** Sets the analytics database name for Connect. */
|
|
3726
|
-
const setAnalyticsDatabaseName = analyticsDatabaseNameEventFunctions.setValue;
|
|
3727
|
-
/** Gets the analytics database name for Connect. */
|
|
3728
|
-
const useAnalyticsDatabaseName = analyticsDatabaseNameEventFunctions.useValue;
|
|
3729
|
-
/** Adds an event handler for when the analytics database name for Connect changes. */
|
|
3730
|
-
const addAnalyticsDatabaseNameEventHandler = analyticsDatabaseNameEventFunctions.addEventHandler;
|
|
3731
3767
|
const logLevelEventFunctions = makePHEventFunctions("logLevel");
|
|
3732
3768
|
/** Sets the log level for Connect. */
|
|
3733
3769
|
const setLogLevel = logLevelEventFunctions.setValue;
|
|
@@ -3744,53 +3780,16 @@ const useAllowList = allowListEventFunctions.useValue;
|
|
|
3744
3780
|
const addAllowListEventHandler = allowListEventFunctions.addEventHandler;
|
|
3745
3781
|
const nonUserConfigSetters = {
|
|
3746
3782
|
routerBasename: setRouterBasename,
|
|
3747
|
-
version: setVersion,
|
|
3748
|
-
requiresHardRefresh: setRequiresHardRefresh,
|
|
3749
3783
|
warnOutdatedApp: setWarnOutdatedApp,
|
|
3750
3784
|
studioMode: setStudioMode,
|
|
3751
3785
|
basePath: setBasePath,
|
|
3752
|
-
versionCheckInterval: setVersionCheckInterval,
|
|
3753
|
-
cliVersion: setCliVersion,
|
|
3754
|
-
fileUploadOperationsChunkSize: setFileUploadOperationsChunkSize,
|
|
3755
|
-
isDocumentModelSelectionSettingsEnabled: setIsDocumentModelSelectionSettingsEnabled,
|
|
3756
|
-
gaTrackingId: setGaTrackingId,
|
|
3757
3786
|
defaultDrivesUrl: setDefaultDrivesUrl,
|
|
3758
|
-
drivesPreserveStrategy: setDrivesPreserveStrategy,
|
|
3759
|
-
isLocalDrivesEnabled: setIsLocalDrivesEnabled,
|
|
3760
3787
|
isAddDriveEnabled: setIsAddDriveEnabled,
|
|
3761
|
-
isPublicDrivesEnabled: setIsPublicDrivesEnabled,
|
|
3762
|
-
isAddPublicDrivesEnabled: setIsAddPublicDrivesEnabled,
|
|
3763
|
-
isDeletePublicDrivesEnabled: setIsDeletePublicDrivesEnabled,
|
|
3764
|
-
isCloudDrivesEnabled: setIsCloudDrivesEnabled,
|
|
3765
|
-
isAddCloudDrivesEnabled: setIsAddCloudDrivesEnabled,
|
|
3766
|
-
isDeleteCloudDrivesEnabled: setIsDeleteCloudDrivesEnabled,
|
|
3767
|
-
isAddLocalDrivesEnabled: setIsAddLocalDrivesEnabled,
|
|
3768
|
-
isDeleteLocalDrivesEnabled: setIsDeleteLocalDrivesEnabled,
|
|
3769
|
-
isEditorDebugModeEnabled: setIsEditorDebugModeEnabled,
|
|
3770
|
-
isEditorReadModeEnabled: setIsEditorReadModeEnabled,
|
|
3771
|
-
isRelationalProcessorsEnabled: setIsRelationalProcessorsEnabled,
|
|
3772
|
-
isExternalRelationalProcessorsEnabled: setIsExternalRelationalProcessorsEnabled,
|
|
3773
|
-
isAnalyticsEnabled: setIsAnalyticsEnabled,
|
|
3774
|
-
analyticsDatabaseName: setAnalyticsDatabaseName,
|
|
3775
|
-
isAnalyticsExternalProcessorsEnabled: setIsAnalyticsExternalProcessorsEnabled,
|
|
3776
|
-
isAnalyticsDatabaseWorkerEnabled: setIsAnalyticsDatabaseWorkerEnabled,
|
|
3777
|
-
isDiffAnalyticsEnabled: setIsDiffAnalyticsEnabled,
|
|
3778
|
-
isDriveAnalyticsEnabled: setIsDriveAnalyticsEnabled,
|
|
3779
3788
|
renownUrl: setRenownUrl,
|
|
3780
|
-
renownNetworkId: setRenownNetworkId,
|
|
3781
|
-
renownChainId: setRenownChainId,
|
|
3782
3789
|
switchboardUrl: setSwitchboardUrl,
|
|
3783
|
-
renownAdapters: setRenownAdapters,
|
|
3784
|
-
sentryRelease: setSentryRelease,
|
|
3785
|
-
sentryDsn: setSentryDsn,
|
|
3786
|
-
sentryEnv: setSentryEnv,
|
|
3787
|
-
isSentryTracingEnabled: setIsSentryTracingEnabled,
|
|
3788
|
-
isExternalProcessorsEnabled: setIsExternalProcessorsEnabled,
|
|
3789
|
-
isExternalPackagesEnabled: setIsExternalPackagesEnabled,
|
|
3790
3790
|
allowList: setAllowList,
|
|
3791
3791
|
logLevel: setLogLevel,
|
|
3792
|
-
disabledEditors: setDisabledEditors
|
|
3793
|
-
enabledEditors: setEnabledEditors
|
|
3792
|
+
disabledEditors: setDisabledEditors
|
|
3794
3793
|
};
|
|
3795
3794
|
const phGlobalConfigSetters = {
|
|
3796
3795
|
...phAppConfigSetters,
|
|
@@ -3799,53 +3798,16 @@ const phGlobalConfigSetters = {
|
|
|
3799
3798
|
};
|
|
3800
3799
|
const nonUserConfigHooks = {
|
|
3801
3800
|
routerBasename: useRouterBasename,
|
|
3802
|
-
version: useVersion,
|
|
3803
|
-
requiresHardRefresh: useRequiresHardRefresh,
|
|
3804
3801
|
warnOutdatedApp: useWarnOutdatedApp,
|
|
3805
3802
|
studioMode: useStudioMode,
|
|
3806
3803
|
basePath: useBasePath,
|
|
3807
|
-
versionCheckInterval: useVersionCheckInterval,
|
|
3808
|
-
cliVersion: useCliVersion,
|
|
3809
|
-
fileUploadOperationsChunkSize: useFileUploadOperationsChunkSize,
|
|
3810
|
-
isDocumentModelSelectionSettingsEnabled: useIsDocumentModelSelectionSettingsEnabled,
|
|
3811
|
-
gaTrackingId: useGaTrackingId,
|
|
3812
3804
|
defaultDrivesUrl: useDefaultDrivesUrl,
|
|
3813
|
-
drivesPreserveStrategy: useDrivesPreserveStrategy,
|
|
3814
3805
|
isAddDriveEnabled: useIsAddDriveEnabled,
|
|
3815
|
-
isPublicDrivesEnabled: useIsPublicDrivesEnabled,
|
|
3816
|
-
isAddPublicDrivesEnabled: useIsAddPublicDrivesEnabled,
|
|
3817
|
-
isDeletePublicDrivesEnabled: useIsDeletePublicDrivesEnabled,
|
|
3818
|
-
isCloudDrivesEnabled: useIsCloudDrivesEnabled,
|
|
3819
|
-
isAddCloudDrivesEnabled: useIsAddCloudDrivesEnabled,
|
|
3820
|
-
isDeleteCloudDrivesEnabled: useIsDeleteCloudDrivesEnabled,
|
|
3821
|
-
isLocalDrivesEnabled: useIsLocalDrivesEnabled,
|
|
3822
|
-
isAddLocalDrivesEnabled: useIsAddLocalDrivesEnabled,
|
|
3823
|
-
isDeleteLocalDrivesEnabled: useIsDeleteLocalDrivesEnabled,
|
|
3824
|
-
isEditorDebugModeEnabled: useIsEditorDebugModeEnabled,
|
|
3825
|
-
isEditorReadModeEnabled: useIsEditorReadModeEnabled,
|
|
3826
|
-
isAnalyticsDatabaseWorkerEnabled: useIsAnalyticsDatabaseWorkerEnabled,
|
|
3827
|
-
isDiffAnalyticsEnabled: useIsDiffAnalyticsEnabled,
|
|
3828
|
-
isDriveAnalyticsEnabled: useIsDriveAnalyticsEnabled,
|
|
3829
3806
|
renownUrl: useRenownUrl,
|
|
3830
|
-
renownNetworkId: useRenownNetworkId,
|
|
3831
|
-
renownChainId: useRenownChainId,
|
|
3832
3807
|
switchboardUrl: useSwitchboardUrl,
|
|
3833
|
-
renownAdapters: useRenownAdapters,
|
|
3834
|
-
sentryRelease: useSentryRelease,
|
|
3835
|
-
sentryDsn: useSentryDsn,
|
|
3836
|
-
sentryEnv: useSentryEnv,
|
|
3837
|
-
isSentryTracingEnabled: useIsSentryTracingEnabled,
|
|
3838
|
-
isExternalProcessorsEnabled: useIsExternalProcessorsEnabled,
|
|
3839
|
-
isExternalPackagesEnabled: useIsExternalPackagesEnabled,
|
|
3840
3808
|
allowList: useAllowList,
|
|
3841
|
-
isAnalyticsEnabled: useIsAnalyticsEnabled,
|
|
3842
|
-
isAnalyticsExternalProcessorsEnabled: useIsAnalyticsExternalProcessorsEnabled,
|
|
3843
|
-
isRelationalProcessorsEnabled: useIsRelationalProcessorsEnabled,
|
|
3844
|
-
isExternalRelationalProcessorsEnabled: useIsExternalRelationalProcessorsEnabled,
|
|
3845
|
-
analyticsDatabaseName: useAnalyticsDatabaseName,
|
|
3846
3809
|
logLevel: useLogLevel,
|
|
3847
|
-
disabledEditors: useDisabledEditors
|
|
3848
|
-
enabledEditors: useEnabledEditors
|
|
3810
|
+
disabledEditors: useDisabledEditors
|
|
3849
3811
|
};
|
|
3850
3812
|
const phGlobalConfigHooks = {
|
|
3851
3813
|
...phAppConfigHooks,
|
|
@@ -4036,10 +3998,6 @@ function addSyncSelectionOnPopStateEventHandler() {
|
|
|
4036
3998
|
popStateHandlerAdded = true;
|
|
4037
3999
|
window.addEventListener("popstate", syncOnPopState);
|
|
4038
4000
|
}
|
|
4039
|
-
/** @deprecated Set the store's `navigation`; its router handles back/forward. */
|
|
4040
|
-
const addSetSelectedDriveOnPopStateEventHandler = addSyncSelectionOnPopStateEventHandler;
|
|
4041
|
-
/** @deprecated Set the store's `navigation`; its router handles back/forward. */
|
|
4042
|
-
const addSetSelectedNodeOnPopStateEventHandler = addSyncSelectionOnPopStateEventHandler;
|
|
4043
4001
|
//#endregion
|
|
4044
4002
|
//#region src/hooks/selected-timeline-item.ts
|
|
4045
4003
|
const selectedTimelineItemEventFunctions = makePHEventFunctions("selectedTimelineItem");
|
|
@@ -4102,56 +4060,19 @@ const phGlobalEventHandlerRegisterFunctions = {
|
|
|
4102
4060
|
selectedTimelineRevision: addSelectedTimelineRevisionEventHandler,
|
|
4103
4061
|
selectedTimelineItem: addSelectedTimelineItemEventHandler,
|
|
4104
4062
|
routerBasename: addRouterBasenameEventHandler,
|
|
4105
|
-
version: addVersionEventHandler,
|
|
4106
4063
|
logLevel: addLogLevelEventHandler,
|
|
4107
|
-
requiresHardRefresh: addRequiresHardRefreshEventHandler,
|
|
4108
4064
|
warnOutdatedApp: addWarnOutdatedAppEventHandler,
|
|
4109
4065
|
studioMode: addStudioModeEventHandler,
|
|
4110
4066
|
basePath: addBasePathEventHandler,
|
|
4111
|
-
versionCheckInterval: addVersionCheckIntervalEventHandler,
|
|
4112
|
-
cliVersion: addCliVersionEventHandler,
|
|
4113
|
-
fileUploadOperationsChunkSize: addFileUploadOperationsChunkSizeEventHandler,
|
|
4114
|
-
isDocumentModelSelectionSettingsEnabled: addIsDocumentModelSelectionSettingsEnabledEventHandler,
|
|
4115
|
-
gaTrackingId: addGaTrackingIdEventHandler,
|
|
4116
4067
|
allowList: addAllowListEventHandler,
|
|
4117
4068
|
defaultDrivesUrl: addDefaultDrivesUrlEventHandler,
|
|
4118
|
-
drivesPreserveStrategy: addDrivesPreserveStrategyEventHandler,
|
|
4119
4069
|
allowedDocumentTypes: addAllowedDocumentTypesEventHandler,
|
|
4120
|
-
enabledEditors: addEnabledEditorsEventHandler,
|
|
4121
4070
|
disabledEditors: addDisabledEditorsEventHandler,
|
|
4122
4071
|
isAddDriveEnabled: addIsAddDriveEnabledEventHandler,
|
|
4123
|
-
isLocalDrivesEnabled: addIsLocalDrivesEnabledEventHandler,
|
|
4124
|
-
isPublicDrivesEnabled: addIsPublicDrivesEnabledEventHandler,
|
|
4125
|
-
isAddPublicDrivesEnabled: addIsAddPublicDrivesEnabledEventHandler,
|
|
4126
|
-
isDeletePublicDrivesEnabled: addIsDeletePublicDrivesEnabledEventHandler,
|
|
4127
|
-
isCloudDrivesEnabled: addIsCloudDrivesEnabledEventHandler,
|
|
4128
|
-
isAddCloudDrivesEnabled: addIsAddCloudDrivesEnabledEventHandler,
|
|
4129
|
-
isDeleteCloudDrivesEnabled: addIsDeleteCloudDrivesEnabledEventHandler,
|
|
4130
|
-
isAddLocalDrivesEnabled: addIsAddLocalDrivesEnabledEventHandler,
|
|
4131
|
-
isDeleteLocalDrivesEnabled: addIsDeleteLocalDrivesEnabledEventHandler,
|
|
4132
4072
|
isDragAndDropEnabled: addIsDragAndDropEnabledEventHandler,
|
|
4133
4073
|
isExternalControlsEnabled: addIsExternalControlsEnabledEventHandler,
|
|
4134
|
-
isEditorDebugModeEnabled: addIsEditorDebugModeEnabledEventHandler,
|
|
4135
|
-
isEditorReadModeEnabled: addIsEditorReadModeEnabledEventHandler,
|
|
4136
|
-
isRelationalProcessorsEnabled: addIsRelationalProcessorsEnabledEventHandler,
|
|
4137
|
-
isExternalRelationalProcessorsEnabled: addIsExternalRelationalProcessorsEnabledEventHandler,
|
|
4138
|
-
isAnalyticsEnabled: addIsAnalyticsEnabledEventHandler,
|
|
4139
|
-
isAnalyticsExternalProcessorsEnabled: addIsAnalyticsExternalProcessorsEnabledEventHandler,
|
|
4140
|
-
analyticsDatabaseName: addAnalyticsDatabaseNameEventHandler,
|
|
4141
|
-
isAnalyticsDatabaseWorkerEnabled: addIsAnalyticsDatabaseWorkerEnabledEventHandler,
|
|
4142
|
-
isDiffAnalyticsEnabled: addIsDiffAnalyticsEnabledEventHandler,
|
|
4143
|
-
isDriveAnalyticsEnabled: addIsDriveAnalyticsEnabledEventHandler,
|
|
4144
4074
|
renownUrl: addRenownUrlEventHandler,
|
|
4145
|
-
renownNetworkId: addRenownNetworkIdEventHandler,
|
|
4146
|
-
renownChainId: addRenownChainIdEventHandler,
|
|
4147
4075
|
switchboardUrl: addSwitchboardUrlEventHandler,
|
|
4148
|
-
renownAdapters: addRenownAdaptersEventHandler,
|
|
4149
|
-
sentryRelease: addSentryReleaseEventHandler,
|
|
4150
|
-
sentryDsn: addSentryDsnEventHandler,
|
|
4151
|
-
sentryEnv: addSentryEnvEventHandler,
|
|
4152
|
-
isSentryTracingEnabled: addIsSentryTracingEnabledEventHandler,
|
|
4153
|
-
isExternalProcessorsEnabled: addIsExternalProcessorsEnabledEventHandler,
|
|
4154
|
-
isExternalPackagesEnabled: addIsExternalPackagesEnabledEventHandler,
|
|
4155
4076
|
toast: addToastEventHandler,
|
|
4156
4077
|
navigation: () => {},
|
|
4157
4078
|
aiTools: () => {}
|
|
@@ -4522,8 +4443,23 @@ const DEFAULT_LIMIT = 100;
|
|
|
4522
4443
|
function toError(reason) {
|
|
4523
4444
|
return reason instanceof Error ? reason : new Error(String(reason));
|
|
4524
4445
|
}
|
|
4525
|
-
|
|
4526
|
-
|
|
4446
|
+
/**
|
|
4447
|
+
* Operation history of one scope of a document, read from the document cache
|
|
4448
|
+
* and kept in step with it: a change event for the document drops the cached
|
|
4449
|
+
* pages and the hook loads the first page again.
|
|
4450
|
+
*
|
|
4451
|
+
* Pages arrive oldest first. A view that wants the whole history calls
|
|
4452
|
+
* `fetchNextPage` while `hasNextPage` is true.
|
|
4453
|
+
*
|
|
4454
|
+
* An empty first page is a final result; there is no retry. When the active
|
|
4455
|
+
* document cache does not serve operations, the result is empty and not
|
|
4456
|
+
* loading.
|
|
4457
|
+
*
|
|
4458
|
+
* @param documentId - The document id, or null/undefined to skip fetching
|
|
4459
|
+
* @param scope - The operation scope, for example "global" or "local"
|
|
4460
|
+
* @param options - Page size and whether fetching is enabled
|
|
4461
|
+
*/
|
|
4462
|
+
function useDocumentOperations(documentId, scope, options = {}) {
|
|
4527
4463
|
const { limit = DEFAULT_LIMIT, enabled = true } = options;
|
|
4528
4464
|
const documentCache = useDocumentCache();
|
|
4529
4465
|
const cache = documentCache && isOperationCache(documentCache) ? documentCache : void 0;
|
|
@@ -4559,51 +4495,7 @@ function useScopeOperations(documentId, scope, options = {}) {
|
|
|
4559
4495
|
refetch
|
|
4560
4496
|
};
|
|
4561
4497
|
}
|
|
4562
|
-
/** Keeps paging `result` to completion while `enabled` is true. */
|
|
4563
|
-
function useLoadAllPages(result, enabled) {
|
|
4564
|
-
useEffect(() => {
|
|
4565
|
-
if (!enabled || !result.hasNextPage || result.isLoading) return;
|
|
4566
|
-
const handle = window.setTimeout(result.fetchNextPage, 0);
|
|
4567
|
-
return () => window.clearTimeout(handle);
|
|
4568
|
-
}, [
|
|
4569
|
-
enabled,
|
|
4570
|
-
result.hasNextPage,
|
|
4571
|
-
result.isLoading,
|
|
4572
|
-
result.fetchNextPage
|
|
4573
|
-
]);
|
|
4574
|
-
}
|
|
4575
|
-
function useDocumentOperations(documentId, scope, options = {}) {
|
|
4576
|
-
const legacy = scope === void 0;
|
|
4577
|
-
const primary = useScopeOperations(documentId, legacy ? "global" : scope, legacy ? {} : options);
|
|
4578
|
-
const local = useScopeOperations(documentId, "local", { enabled: legacy });
|
|
4579
|
-
useLoadAllPages(primary, legacy);
|
|
4580
|
-
useLoadAllPages(local, legacy);
|
|
4581
|
-
const globalOperations = useMemo(() => legacy ? [...primary.operations] : EMPTY_OPERATIONS, [legacy, primary.operations]);
|
|
4582
|
-
const localOperations = useMemo(() => legacy ? [...local.operations] : EMPTY_OPERATIONS, [legacy, local.operations]);
|
|
4583
|
-
const refetch = useCallback(() => {
|
|
4584
|
-
primary.refetch();
|
|
4585
|
-
local.refetch();
|
|
4586
|
-
}, [primary.refetch, local.refetch]);
|
|
4587
|
-
const error = primary.error ?? local.error;
|
|
4588
|
-
const legacyResult = useMemo(() => ({
|
|
4589
|
-
globalOperations,
|
|
4590
|
-
localOperations,
|
|
4591
|
-
isLoading: !error && (primary.isLoading || local.isLoading || primary.hasNextPage || local.hasNextPage),
|
|
4592
|
-
error,
|
|
4593
|
-
refetch
|
|
4594
|
-
}), [
|
|
4595
|
-
globalOperations,
|
|
4596
|
-
localOperations,
|
|
4597
|
-
error,
|
|
4598
|
-
primary.isLoading,
|
|
4599
|
-
local.isLoading,
|
|
4600
|
-
primary.hasNextPage,
|
|
4601
|
-
local.hasNextPage,
|
|
4602
|
-
refetch
|
|
4603
|
-
]);
|
|
4604
|
-
return legacy ? legacyResult : primary;
|
|
4605
|
-
}
|
|
4606
4498
|
//#endregion
|
|
4607
|
-
export {
|
|
4499
|
+
export { setDefaultDrivesUrl as $, setPreferredEditorOnNode as $n, StaticPackageManager as $t, useDropNode as A, underSignaturePolicy as An, useAllowedDocumentTypes as At, addDefaultDrivesUrlEventHandler as B, addDocument as Bn, ambientRenownSigner as Bt, setPackageDiscoveryService as C, ConflictError as Cn, phAppConfigHooks as Ct, useGraphQLReactorClient as D, hasRevisionConflict as Dn, setAllowedDocumentTypes as Dt, setGraphQLReactorClient as E, extractRevisionMap as En, phDocumentEditorConfigSetters as Et, addAttachmentServiceEventHandler as F, GraphQLOperationNotSupportedError as Fn, isBackendAuthError as Ft, addRouterBasenameEventHandler as G, exportFile as Gn, createJobChangesSocket as Gt, addIsAddDriveEnabledEventHandler as H, addFolder$1 as Hn, findIsServableOverGraphQL as Ht, setAttachmentService as I, GraphQLWrongBackendError as In, recordBackendAuthError as It, addWarnOutdatedAppEventHandler as J, getDocumentExtension as Jn, startDocumentChangesSubscription as Jt, addStudioModeEventHandler as K, extractInitialState as Kn, isAuthRefusalClose as Kt, useAttachmentService as L, JobFailedError as Ln, setBackendAuth as Lt, addFeaturesEventHandler as M, DEFAULT_DRIVE_EDITOR_ID as Mn, useIsExternalControlsEnabled as Mt, setFeatures as N, DRIVE_DOCUMENT_TYPES as Nn, addBackendAuthEventHandler as Nt, addDraggingNodeEventHandler as O, screamingSnakeToCamel as On, setIsDragAndDropEnabled as Ot, useFeatures as P, BatchJobFailedError as Pn, backendAuthStatusOf as Pt, setBasePath as Q, renameNode as Qn, subgraphUrlFromGraphqlUrl as Qt, addAllowListEventHandler as R, queriesUnknownArgument as Rn, useBackendAuth as Rt, addPackageDiscoveryServiceEventHandler as S, revisionMapFromRevisionsList as Sn, isExternalControlsEnabledEventFunctions as St, addGraphQLReactorClientEventHandler as T, convertRemoteOperations as Tn, phDocumentEditorConfigHooks as Tt, addLogLevelEventHandler as U, copyNode$1 as Un, isGraphQLReactorClient as Ut, addDisabledEditorsEventHandler as V, addFileWithProgress as Vn, createGraphQLDriveNodeSource as Vt, addRenownUrlEventHandler as W, deleteNode as Wn, viewFilterInputFromViewFilter as Wt, phGlobalConfigSetters as X, moveNode$1 as Xn, SubgraphSdkRegistry as Xt, phGlobalConfigHooks as Y, loadFile as Yn, subscriptionsUrlFromGraphqlUrl as Yt, setAllowList as Z, renameDriveNode as Zn, describeGraphQLDocument as Zt, setSelectedTimelineRevision as _, GraphQLDriveReadClient as _n, isPlainClick as _r, useSwitchboardUrl as _t, SwitchboardUnreachableError as a, GetDocumentAtConsistencyDocument as an, closePHModal as ar, setStudioMode as at, setSelectedTimelineItem as b, phDocumentFromGetDocument as bn, useSearchParams as br, addIsDragAndDropEnabledEventHandler as bt, ensurePHEventHandlers as c, readCreateProtocolVersions as cn, modalHref as cr, useAllowList as ct, callEventHandlerRegisterFunctions as d, isDeadlineError as dn, showCreateDocumentModal as dr, useDisabledEditors as dt, packageFromDocumentModels as en, upgradeDocument as er, setDisabledEditors as et, commonGlobalEventHandlerFunctions as f, isNodeFetch as fn, showDeleteNodeModal as fr, useIsAddDriveEnabled as ft, addSelectedTimelineRevisionEventHandler as g, GraphQLDriveNodeSource as gn, withoutModalSearch as gr, useStudioMode as gt, usePHToast as h, withStreamedBodies as hn, usePHModal as hr, useRouterBasename as ht, DEFAULT_REQUEST_TIMEOUT_MS as i, stampAction as in, addModalEventHandler as ir, setRouterBasename as it, useDropTarget as j, COMMON_PACKAGE_ID as jn, useIsDragAndDropEnabled as jt, useDragNode as k, uncreatedDocument as kn, setIsExternalControlsEnabled as kt, useSwitchboardClient as l, readCreateSignaturePolicy as ln, modalSearch as lr, useBasePath as lt, setPHToast as m, withRequestDeadline as mn, useModalLinkProps as mr, useRenownUrl as mt, DEFAULT_BATCH_REQUEST_TIMEOUT_MS as n, prepareSignedActions as nn, isDocumentTypeSupported as nr, setLogLevel as nt, createSwitchboardBackend as o, MutateDocumentWithOperationsDocument as on, isRoutedModal as or, setSwitchboardUrl as ot, addToastEventHandler as p, switchboardFetch as pn, showPHModal as pr, useLogLevel as pt, addSwitchboardUrlEventHandler as q, fetchDocumentOperations as qn, makeAuthConnectionParams as qt, DEFAULT_BREAKER as r, signStampedAction as rn, MODAL_SEARCH_PARAM as rr, setRenownUrl as rt, GraphQLReactorProvider as s, ReactorOperationFieldsFragmentDoc as sn, modalFromSearch as sr, setWarnOutdatedApp as st, useDocumentOperations as t, resolveDocumentModelModule as tn, getUserPermissions as tr, setIsAddDriveEnabled as tt, addPHEventHandlers as u, globalFetch as un, setPHModal as ur, useDefaultDrivesUrl as ut, useSelectedTimelineRevision as v, toLegacyNode as vn, useLinkProps as vr, useWarnOutdatedApp as vt, usePackageDiscoveryService as w, buildPulledDocument as wn, phAppConfigSetters as wt, useSelectedTimelineItem as x, phDocumentFromMutation as xn, useSetSearchParams as xr, addIsExternalControlsEnabledEventHandler as xt, addSelectedTimelineItemEventHandler as y, isoStringFromDateTime as yn, usePHNavigation as yr, addAllowedDocumentTypesEventHandler as yt, addBasePathEventHandler as z, queriesUnknownField as zn, GraphQLReactorClient as zt };
|
|
4608
4500
|
|
|
4609
|
-
//# sourceMappingURL=document-operations-
|
|
4501
|
+
//# sourceMappingURL=document-operations-BUbpyfSf.js.map
|