@powerhousedao/common 4.1.0-dev.80 → 4.1.0-dev.81
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/editors/generic-drive-explorer/components/folder-view.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/components/folder-view.js +4 -3
- package/dist/editors/generic-drive-explorer/components/folder-view.js.map +1 -1
- package/dist/editors/generic-drive-explorer/config.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/config.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/config.js +5 -0
- package/dist/editors/generic-drive-explorer/config.js.map +1 -0
- package/dist/editors/generic-drive-explorer/editor.d.ts +2 -5
- package/dist/editors/generic-drive-explorer/editor.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/editor.js +5 -5
- package/dist/editors/generic-drive-explorer/editor.js.map +1 -1
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.js +1 -1
- package/dist/editors/generic-drive-explorer/generic-drive-explorer.stories.js.map +1 -1
- package/dist/editors/generic-drive-explorer/module.d.ts +2 -2
- package/dist/editors/generic-drive-explorer/module.d.ts.map +1 -1
- package/dist/editors/generic-drive-explorer/module.js +1 -4
- package/dist/editors/generic-drive-explorer/module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-view.d.ts","sourceRoot":"","sources":["../../../../editors/generic-drive-explorer/components/folder-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"folder-view.d.ts","sourceRoot":"","sources":["../../../../editors/generic-drive-explorer/components/folder-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAOjE,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIhF,KAAK,gBAAgB,GAAG,SAAS,GAC/B,YAAY,GAAG;IACb,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,0BAA0B,EAAE,OAAO,CAAC;IACpC,eAAe,EAAE,CAAC,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC1C,iBAAiB,EAAE,CACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,KACrB,UAAU,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEJ,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,2CAgGjD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DriveLayout, FileContentView } from "@powerhousedao/common";
|
|
3
3
|
import { FolderItem, useDrop } from "@powerhousedao/design-system";
|
|
4
|
-
import {
|
|
4
|
+
import { isFileNodeKind, isFolderNodeKind, useNodesInSelectedDriveOrFolder, } from "@powerhousedao/reactor-browser";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
export function FolderView(props) {
|
|
8
8
|
const { node, isAllowedToCreateDocuments, className, containerProps, sharingType, getSyncStatusSync, setSelectedNode, onAddFile, onCopyNode, onMoveNode, onRenameNode, onDuplicateNode, onAddFolder, onAddAndSelectNewFolder, showDeleteNodeModal, } = props;
|
|
9
9
|
const { t } = useTranslation();
|
|
10
|
-
const
|
|
11
|
-
const fileNodes =
|
|
10
|
+
const nodes = useNodesInSelectedDriveOrFolder();
|
|
11
|
+
const fileNodes = nodes.filter((n) => isFileNodeKind(n));
|
|
12
|
+
const folderNodes = nodes.filter((n) => isFolderNodeKind(n));
|
|
12
13
|
const { isDropTarget, dropProps } = useDrop({
|
|
13
14
|
node,
|
|
14
15
|
onAddFile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-view.js","sourceRoot":"","sources":["../../../../editors/generic-drive-explorer/components/folder-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"folder-view.js","sourceRoot":"","sources":["../../../../editors/generic-drive-explorer/components/folder-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAezC,MAAM,UAAU,UAAU,CAAC,KAAuB;IAChD,MAAM,EACJ,IAAI,EACJ,0BAA0B,EAC1B,SAAS,EACT,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,mBAAmB,GACpB,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,M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CAAmC,EAAE;wBACtC,YAAY,EAAE,0BAA0B;qBACzC,CAAC,GACE,CACP,GAC0B,EAC7B,KAAC,WAAW,CAAC,cAAc,IACzB,KAAK,EAAE,CAAC,CAAC,qCAAqC,EAAE;oBAC9C,YAAY,EAAE,qBAAqB;iBACpC,CAAC,YAEF,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,eAAe,IACd,SAAS,EAAE,SAAS,EACpB,0BAA0B,EAAE,0BAA0B,EACtD,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,uBAAuB,EAAE,uBAAuB,GAChD,GACE,GACqB,IACzB,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,eAAO,MAAM,YAAY,EAAE,mBAG1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAwB;IAC/C,oBAAoB,EAAE,EAAE;IACxB,oBAAoB,EAAE,IAAI;CAC3B,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
type GenericDriveExplorerEditorProps = DriveEditorProps & React.HTMLProps<HTMLDivElement>;
|
|
4
|
-
export declare function Editor(props: GenericDriveExplorerEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
1
|
+
import type { EditorProps } from "document-model";
|
|
2
|
+
export declare function Editor(props: EditorProps): import("react/jsx-runtime").JSX.Element;
|
|
6
3
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAuB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGvE,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CA8FxC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CreateDocument, DriveLayout, FolderView
|
|
2
|
+
import { CreateDocument, DriveLayout, FolderView } from "@powerhousedao/common";
|
|
3
3
|
import { Breadcrumbs, useBreadcrumbs, useDrop, } from "@powerhousedao/design-system";
|
|
4
|
-
import { getSyncStatusSync, makeFolderNodeFromDrive, setSelectedNode, showCreateDocumentModal, showDeleteNodeModal, useDocumentModelModules, useNodeActions, useSelectedDrive, useSelectedFolder, useSelectedNodePath,
|
|
4
|
+
import { getSyncStatusSync, makeFolderNodeFromDrive, setSelectedNode, showCreateDocumentModal, showDeleteNodeModal, useDocumentModelModules, useNodeActions, useSelectedDrive, useSelectedFolder, useSelectedNodePath, useSetPHDriveEditorConfig, useUserPermissions, } from "@powerhousedao/reactor-browser";
|
|
5
5
|
import { getDriveSharingType } from "document-drive";
|
|
6
|
-
import
|
|
6
|
+
import { editorConfig } from "./config.js";
|
|
7
7
|
export function Editor(props) {
|
|
8
|
+
useSetPHDriveEditorConfig(editorConfig);
|
|
8
9
|
const { className, children } = props;
|
|
9
10
|
const [selectedDrive] = useSelectedDrive();
|
|
10
11
|
const { onRenameNode, onDuplicateNode, onAddFolder, onAddFile, onCopyNode, onMoveNode, } = useNodeActions();
|
|
@@ -13,7 +14,6 @@ export function Editor(props) {
|
|
|
13
14
|
const documentModels = useDocumentModelModules();
|
|
14
15
|
const selectedNodePath = useSelectedNodePath();
|
|
15
16
|
const { isAllowedToCreateDocuments } = useUserPermissions();
|
|
16
|
-
const showSearchBar = useShowSearchBar();
|
|
17
17
|
const onCreateDocument = (documentModel) => {
|
|
18
18
|
showCreateDocumentModal(documentModel.documentModel.global.id);
|
|
19
19
|
};
|
|
@@ -33,7 +33,7 @@ export function Editor(props) {
|
|
|
33
33
|
setSelectedNode(selectedFolder);
|
|
34
34
|
}
|
|
35
35
|
const showDocumentEditor = !!children;
|
|
36
|
-
return (_jsxs(DriveLayout, { className: className, children: [!showDocumentEditor && (
|
|
36
|
+
return (_jsxs(DriveLayout, { className: className, children: [!showDocumentEditor && (_jsx(DriveLayout.Header, { children: _jsx(Breadcrumbs, { breadcrumbs: breadcrumbs, createEnabled: isAllowedToCreateDocuments, onCreate: onAddAndSelectNewFolder, onBreadcrumbSelected: onBreadcrumbSelected }) })), showDocumentEditor ? (children) : (_jsx(DriveLayout.Content, { ...dropProps, className: isDropTarget ? "rounded-xl bg-blue-100" : "", children: _jsx(FolderView, { node: selectedFolder ?? selectedDriveAsFolderNode, sharingType: sharingType, getSyncStatusSync: getSyncStatusSync, setSelectedNode: setSelectedNode, onRenameNode: onRenameNode, onDuplicateNode: onDuplicateNode, onAddFolder: onAddFolder, onAddFile: onAddFile, onCopyNode: onCopyNode, onMoveNode: onMoveNode, onAddAndSelectNewFolder: onAddAndSelectNewFolder, showDeleteNodeModal: (node) => showDeleteNodeModal(node.id), isAllowedToCreateDocuments: isAllowedToCreateDocuments }) })), !showDocumentEditor && (_jsx(DriveLayout.Footer, { children: isAllowedToCreateDocuments && (_jsx(CreateDocument, { documentModels: documentModels?.filter((module) => module.documentModel.global.id !==
|
|
37
37
|
"powerhouse/document-drive"), createDocument: onCreateDocument })) }))] }));
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EACL,WAAW,EACX,cAAc,EACd,OAAO,GACR,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACxC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,CAAC,aAAa,CAAC,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,EACJ,YAAY,EACZ,eAAe,EACf,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,GACX,GAAG,cAAc,EAAE,CAAC;IACrB,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAC3C,MAAM,yBAAyB,GAAG,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACzE,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAC;IACjD,MAAM,gBAAgB,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EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EAC3D,0BAA0B,EAAE,0BAA0B,GACtD,GACkB,CACvB,EACA,CAAC,kBAAkB,IAAI,CACtB,KAAC,WAAW,CAAC,MAAM,cAChB,0BAA0B,IAAI,CAC7B,KAAC,cAAc,IACb,cAAc,EACZ,cAAc,EAAE,MAAM,CACpB,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;wBAC9B,2BAA2B,CACM,EAEvC,cAAc,EAAE,gBAAgB,GAChC,CACH,GACkB,CACtB,IACW,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-drive-explorer.stories.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generic-drive-explorer.stories.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiCrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAGN,CAAC;AACzB,eAAO,MAAM,KAAK,EAAE,GAAyB,CAAC;AAE9C,eAAe,IAAI,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { createDocumentStory, } from "@powerhousedao/builder-tools";
|
|
|
2
2
|
import { driveDocumentModelModule } from "document-drive";
|
|
3
3
|
import { defaultBaseState } from "document-model/core";
|
|
4
4
|
import { Editor } from "./editor.js";
|
|
5
|
-
function createDriveStory(Editor, initialState, additionalStoryArgs
|
|
5
|
+
function createDriveStory(Editor, initialState, additionalStoryArgs) {
|
|
6
6
|
const story = createDocumentStory(Editor, initialState ??
|
|
7
7
|
driveDocumentModelModule.utils.createState({
|
|
8
8
|
...defaultBaseState(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-drive-explorer.stories.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generic-drive-explorer.stories.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/generic-drive-explorer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,SAAS,gBAAgB,CACvB,MAAS,EACT,YAAkB,EAClB,mBAA+C;IAK/C,MAAM,KAAK,GAAG,mBAAmB,CAC/B,MAAM,EACN,YAAY;QACV,wBAAwB,CAAC,KAAK,CAAC,WAAW,CAAC;YACzC,GAAG,gBAAgB,EAAE;YACrB,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE;YAC7D,KAAK,EAAE;gBACL,gBAAgB,EAAE,KAAK;gBACvB,SAAS,EAAE,EAAE;gBACb,WAAW,EAAE,QAAQ;gBACrB,QAAQ,EAAE,EAAE;aACb;SACF,CAAC,EACJ,mBAAmB,CACpB,CAAC;IACF,OAAO,KAGN,CAAC;AACJ,CAAC;AAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,IAAI,GAAwB;IAChC,GAAG,KAAK;IACR,KAAK,EAAE,wBAAwB;CACT,CAAC;AACzB,MAAM,CAAC,MAAM,KAAK,GAAQ,mBAAmB,CAAC;AAE9C,eAAe,IAAI,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const GenericDriveExplorer:
|
|
1
|
+
import type { EditorModule } from "document-model";
|
|
2
|
+
export declare const GenericDriveExplorer: EditorModule;
|
|
3
3
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,oBAAoB,EAAE,YAOlC,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { Editor } from "@powerhousedao/common";
|
|
2
2
|
export const GenericDriveExplorer = {
|
|
3
3
|
Component: Editor,
|
|
4
|
-
documentTypes: ["powerhouse/document-drive"],
|
|
5
4
|
config: {
|
|
6
5
|
id: "GenericDriveExplorer",
|
|
7
6
|
name: "Drive Explorer App",
|
|
8
|
-
disableExternalControls: true,
|
|
9
|
-
documentToolbarEnabled: true,
|
|
10
|
-
showSwitchboardLink: true,
|
|
11
7
|
},
|
|
8
|
+
documentTypes: ["powerhouse/document-drive"],
|
|
12
9
|
};
|
|
13
10
|
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG/C,MAAM,CAAC,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../editors/generic-drive-explorer/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG/C,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,SAAS,EAAE,MAAM;IACjB,MAAM,EAAE;QACN,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,oBAAoB;KAC3B;IACD,aAAa,EAAE,CAAC,2BAA2B,CAAC;CAC7C,CAAC"}
|