@fileverse-dev/dsheet 4.0.5-edit-mode-1 → 4.0.5-edit-mode-2
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/editor/components/permission-chip-model.d.ts +20 -0
- package/dist/editor/components/permission-chip.d.ts +2 -1
- package/dist/editor/components/permission-chip.test.d.ts +1 -0
- package/dist/editor/types.d.ts +4 -0
- package/dist/{index-CXPCkzqN.js → index-CH7IOLtg.js} +5309 -5313
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{use-xlsx-import-impl-BtFa-ngI.js → use-xlsx-import-impl-DOcZ33dx.js} +3 -3
- package/dist/{xlsx-defined-names-DIgNskJ5.js → xlsx-defined-names-Cr9azhIk.js} +1 -1
- package/dist/{xlsx-export-impl-CfnWkjsY.js → xlsx-export-impl-B6j84v9Z.js} +3 -3
- package/dist/{xlsx-hyperlink-inline-BkyQuqyy.js → xlsx-hyperlink-inline-3ydwc_lu.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DSheetPermissionMode } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const getPermissionChipConfig: (mode: DSheetPermissionMode) => {
|
|
4
|
+
readonly icon: "Eye";
|
|
5
|
+
readonly label: "View only";
|
|
6
|
+
readonly modifier: "view-only";
|
|
7
|
+
} | {
|
|
8
|
+
readonly icon: "MessageSquareText";
|
|
9
|
+
readonly label: "View and comment";
|
|
10
|
+
readonly modifier: "comment";
|
|
11
|
+
} | {
|
|
12
|
+
readonly icon: "Pencil";
|
|
13
|
+
readonly label: "Edit";
|
|
14
|
+
readonly modifier: "edit";
|
|
15
|
+
};
|
|
16
|
+
export declare const resolvePermissionChipMode: ({ allowComments, isReadOnly, permissionMode, }: {
|
|
17
|
+
allowComments: boolean;
|
|
18
|
+
isReadOnly: boolean;
|
|
19
|
+
permissionMode?: DSheetPermissionMode;
|
|
20
|
+
}) => DSheetPermissionMode | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { DSheetPermissionMode } from '../types';
|
|
2
3
|
|
|
3
4
|
interface PermissionChipProps {
|
|
4
|
-
|
|
5
|
+
mode: DSheetPermissionMode;
|
|
5
6
|
}
|
|
6
7
|
export declare const PermissionChip: React.FC<PermissionChipProps>;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { DSheetContentSnapshot } from '../persistence';
|
|
|
10
10
|
|
|
11
11
|
import * as Y from "yjs";
|
|
12
12
|
export type { ThemeKey } from '../sheet-engine/core/theme';
|
|
13
|
+
export type DSheetPermissionMode = "view" | "comment" | "edit";
|
|
13
14
|
export type { CommentThread, CommentReply, CommentActionParams, CommentsConfig, } from './types/comments';
|
|
14
15
|
export { CommentAction } from './types/comments';
|
|
15
16
|
export interface SheetUpdateData {
|
|
@@ -82,6 +83,9 @@ export interface DsheetProps {
|
|
|
82
83
|
username?: string;
|
|
83
84
|
portalContent?: string;
|
|
84
85
|
isReadOnly?: boolean;
|
|
86
|
+
/** Permission status displayed above the toolbar. When omitted, read-only
|
|
87
|
+
* sheets retain the existing View/View-and-comment behavior. */
|
|
88
|
+
permissionMode?: DSheetPermissionMode;
|
|
85
89
|
allowSheetDownload?: boolean;
|
|
86
90
|
isTemplateOpen?: boolean;
|
|
87
91
|
selectedTemplate?: string;
|