@fileverse-dev/dsheet 4.1.1-edit-mode-16 → 4.1.1-edit-mode-17
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 +1 -1
- package/dist/{index-DQvYqAJz.js → index-Ce3dAPLg.js} +71 -56
- package/dist/index.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-xlsx-import-impl-DjiPGIoS.js → use-xlsx-import-impl-mGGhmhwn.js} +3 -3
- package/dist/{xlsx-defined-names-Dr4_psg0.js → xlsx-defined-names-CBEDuXyo.js} +1 -1
- package/dist/{xlsx-export-impl-D2YNoxJm.js → xlsx-export-impl-CDhUELQf.js} +3 -3
- package/dist/{xlsx-hyperlink-inline-BkLFFNwP.js → xlsx-hyperlink-inline-DpB3o5v6.js} +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export declare const canShowEditElevation: ({ mode, onEnterEdit, }: {
|
|
|
17
17
|
mode: DSheetPermissionMode;
|
|
18
18
|
onEnterEdit?: () => void;
|
|
19
19
|
}) => boolean;
|
|
20
|
-
export declare const canShowViewerModeMenu: ({
|
|
20
|
+
export declare const canShowViewerModeMenu: ({ onViewerModeChange, }: {
|
|
21
21
|
mode: DSheetPermissionMode;
|
|
22
22
|
onViewerModeChange?: (mode: "comment" | "view") => void;
|
|
23
23
|
}) => boolean;
|
|
@@ -50566,7 +50566,7 @@ const XT = ({
|
|
|
50566
50566
|
}, Y.readAsText(b);
|
|
50567
50567
|
});
|
|
50568
50568
|
}, IZ = async (e, t, l, i) => {
|
|
50569
|
-
const { handleExportToXLSX: n } = await import("./xlsx-export-impl-
|
|
50569
|
+
const { handleExportToXLSX: n } = await import("./xlsx-export-impl-CDhUELQf.js");
|
|
50570
50570
|
return n(e, t, l, i);
|
|
50571
50571
|
}, Hr = (e) => {
|
|
50572
50572
|
Cy({
|
|
@@ -50658,7 +50658,7 @@ const XT = ({
|
|
|
50658
50658
|
const [o, a] = Xe(!1);
|
|
50659
50659
|
return { handleXLSXUpload: We(
|
|
50660
50660
|
async (r, m, h) => {
|
|
50661
|
-
const { runXlsxFileUpload: b } = await import("./use-xlsx-import-impl-
|
|
50661
|
+
const { runXlsxFileUpload: b } = await import("./use-xlsx-import-impl-mGGhmhwn.js");
|
|
50662
50662
|
return b(
|
|
50663
50663
|
{
|
|
50664
50664
|
sheetEditorRef: e,
|
|
@@ -50762,14 +50762,13 @@ const XT = ({
|
|
|
50762
50762
|
mode: e,
|
|
50763
50763
|
onEnterEdit: t
|
|
50764
50764
|
}) => e !== "edit" && !!t, yX = ({
|
|
50765
|
-
|
|
50766
|
-
|
|
50767
|
-
}) => e !== "edit" && !!t, xT = ({
|
|
50765
|
+
onViewerModeChange: e
|
|
50766
|
+
}) => !!e, xT = ({
|
|
50768
50767
|
mode: e,
|
|
50769
50768
|
onEnterEdit: t,
|
|
50770
50769
|
onSignInToComment: l,
|
|
50771
50770
|
onViewerModeChange: i
|
|
50772
|
-
}) => e === "view" && !!l && !IX({ mode: e, onEnterEdit: t }) && !yX({
|
|
50771
|
+
}) => e === "view" && !!l && !IX({ mode: e, onEnterEdit: t }) && !yX({ onViewerModeChange: i }), LT = ({
|
|
50773
50772
|
allowComments: e,
|
|
50774
50773
|
isReadOnly: t,
|
|
50775
50774
|
permissionMode: l
|
|
@@ -50779,26 +50778,25 @@ const XT = ({
|
|
|
50779
50778
|
onSignInToComment: l,
|
|
50780
50779
|
onViewerModeChange: i
|
|
50781
50780
|
}) => {
|
|
50782
|
-
const { icon: n, label: c, modifier: s } = ST(e), o = `dsheet-chip dsheet-chip--${s} inline-flex items-center
|
|
50783
|
-
mode: e,
|
|
50781
|
+
const { icon: n, label: c, modifier: s } = ST(e), o = `dsheet-chip dsheet-chip--${s} inline-flex items-center gap-1.5 px-2 py-1.5 rounded-md color-bg-brand-light color-text-on-brand text-xs font-medium whitespace-nowrap`, a = `${o} hover:opacity-90 transition-opacity`, u = IX({ mode: e, onEnterEdit: t }), r = yX({
|
|
50784
50782
|
onViewerModeChange: i
|
|
50785
|
-
}),
|
|
50783
|
+
}), m = xT({
|
|
50786
50784
|
mode: e,
|
|
50787
50785
|
onEnterEdit: t,
|
|
50788
50786
|
onSignInToComment: l,
|
|
50789
50787
|
onViewerModeChange: i
|
|
50790
|
-
}),
|
|
50791
|
-
/* @__PURE__ */ d(ze, { name: n,
|
|
50788
|
+
}), h = /* @__PURE__ */ w(Vt, { children: [
|
|
50789
|
+
/* @__PURE__ */ d(ze, { name: n, size: "sm" }),
|
|
50792
50790
|
/* @__PURE__ */ d(
|
|
50793
50791
|
"span",
|
|
50794
50792
|
{
|
|
50795
|
-
className: "dsheet-text dsheet-text--chip
|
|
50793
|
+
className: "dsheet-text dsheet-text--chip",
|
|
50796
50794
|
"data-testid": "permission-chip-label",
|
|
50797
50795
|
children: c
|
|
50798
50796
|
}
|
|
50799
50797
|
)
|
|
50800
50798
|
] });
|
|
50801
|
-
return
|
|
50799
|
+
return u || r ? /* @__PURE__ */ d(
|
|
50802
50800
|
ia,
|
|
50803
50801
|
{
|
|
50804
50802
|
align: "end",
|
|
@@ -50807,51 +50805,54 @@ const XT = ({
|
|
|
50807
50805
|
"button",
|
|
50808
50806
|
{
|
|
50809
50807
|
type: "button",
|
|
50810
|
-
className:
|
|
50808
|
+
className: a,
|
|
50811
50809
|
"data-testid": "permission-chip",
|
|
50812
|
-
"aria-label":
|
|
50810
|
+
"aria-label": `Switch spreadsheet mode. Current mode: ${c}`,
|
|
50813
50811
|
children: [
|
|
50814
|
-
|
|
50815
|
-
/* @__PURE__ */ d(
|
|
50816
|
-
ze,
|
|
50817
|
-
{
|
|
50818
|
-
name: "ChevronDown",
|
|
50819
|
-
className: "w-4 h-4 color-text-default"
|
|
50820
|
-
}
|
|
50821
|
-
)
|
|
50812
|
+
h,
|
|
50813
|
+
/* @__PURE__ */ d(ze, { name: "ChevronDown", size: "sm" })
|
|
50822
50814
|
]
|
|
50823
50815
|
}
|
|
50824
50816
|
),
|
|
50825
|
-
content: /* @__PURE__ */ w("div", { className: "flex flex-col gap-1 p-2
|
|
50826
|
-
|
|
50817
|
+
content: /* @__PURE__ */ w("div", { className: "flex w-[260px] flex-col gap-1 p-2 shadow-elevation-3", children: [
|
|
50818
|
+
t && /* @__PURE__ */ w(
|
|
50827
50819
|
"button",
|
|
50828
50820
|
{
|
|
50829
50821
|
type: "button",
|
|
50830
|
-
|
|
50822
|
+
"aria-pressed": e === "edit",
|
|
50823
|
+
className: `flex items-center gap-2 rounded-md p-2 text-left transition-colors hover:color-bg-default-hover ${e === "edit" ? "color-bg-default-hover" : ""}`,
|
|
50831
50824
|
"data-testid": "permission-chip-edit-option",
|
|
50832
50825
|
onClick: t,
|
|
50833
50826
|
children: [
|
|
50834
50827
|
/* @__PURE__ */ d(
|
|
50835
50828
|
ze,
|
|
50836
50829
|
{
|
|
50837
|
-
name: "
|
|
50838
|
-
size: "
|
|
50839
|
-
className: "
|
|
50830
|
+
name: "Pencil",
|
|
50831
|
+
size: "sm",
|
|
50832
|
+
className: "shrink-0 color-text-default"
|
|
50840
50833
|
}
|
|
50841
50834
|
),
|
|
50842
|
-
/* @__PURE__ */ w("span", { className: "
|
|
50843
|
-
/* @__PURE__ */ d("span", { className: "block text-body-sm
|
|
50844
|
-
/* @__PURE__ */ d("span", { className: "block text-helper-text-sm color-text-secondary", children: "
|
|
50845
|
-
] })
|
|
50835
|
+
/* @__PURE__ */ w("span", { className: "min-w-0 flex-1", children: [
|
|
50836
|
+
/* @__PURE__ */ d("span", { className: "block text-body-sm color-text-default", children: "Edit" }),
|
|
50837
|
+
/* @__PURE__ */ d("span", { className: "block text-helper-text-sm color-text-secondary", children: "Edit spreadsheet" })
|
|
50838
|
+
] }),
|
|
50839
|
+
e === "edit" && /* @__PURE__ */ d(
|
|
50840
|
+
ze,
|
|
50841
|
+
{
|
|
50842
|
+
name: "Check",
|
|
50843
|
+
size: "sm",
|
|
50844
|
+
className: "shrink-0 color-text-default"
|
|
50845
|
+
}
|
|
50846
|
+
)
|
|
50846
50847
|
]
|
|
50847
50848
|
}
|
|
50848
50849
|
),
|
|
50849
|
-
|
|
50850
|
+
r && /* @__PURE__ */ w(Vt, { children: [
|
|
50850
50851
|
/* @__PURE__ */ w(
|
|
50851
50852
|
"button",
|
|
50852
50853
|
{
|
|
50853
50854
|
type: "button",
|
|
50854
|
-
className:
|
|
50855
|
+
className: `flex items-center gap-2 rounded-md p-2 text-left transition-colors hover:color-bg-default-hover ${e === "comment" ? "color-bg-default-hover" : ""}`,
|
|
50855
50856
|
"data-testid": "permission-chip-comment-option",
|
|
50856
50857
|
"aria-pressed": e === "comment",
|
|
50857
50858
|
onClick: () => i == null ? void 0 : i("comment"),
|
|
@@ -50860,12 +50861,22 @@ const XT = ({
|
|
|
50860
50861
|
ze,
|
|
50861
50862
|
{
|
|
50862
50863
|
name: "MessageSquareText",
|
|
50863
|
-
size: "
|
|
50864
|
-
className: "
|
|
50864
|
+
size: "sm",
|
|
50865
|
+
className: "shrink-0 color-text-default"
|
|
50865
50866
|
}
|
|
50866
50867
|
),
|
|
50867
|
-
/* @__PURE__ */
|
|
50868
|
-
|
|
50868
|
+
/* @__PURE__ */ w("span", { className: "min-w-0 flex-1", children: [
|
|
50869
|
+
/* @__PURE__ */ d("span", { className: "block text-body-sm color-text-default", children: "View and comment" }),
|
|
50870
|
+
/* @__PURE__ */ d("span", { className: "block text-helper-text-sm color-text-secondary", children: "View and add comments" })
|
|
50871
|
+
] }),
|
|
50872
|
+
e === "comment" && /* @__PURE__ */ d(
|
|
50873
|
+
ze,
|
|
50874
|
+
{
|
|
50875
|
+
name: "Check",
|
|
50876
|
+
size: "sm",
|
|
50877
|
+
className: "shrink-0 color-text-default"
|
|
50878
|
+
}
|
|
50879
|
+
)
|
|
50869
50880
|
]
|
|
50870
50881
|
}
|
|
50871
50882
|
),
|
|
@@ -50873,7 +50884,7 @@ const XT = ({
|
|
|
50873
50884
|
"button",
|
|
50874
50885
|
{
|
|
50875
50886
|
type: "button",
|
|
50876
|
-
className:
|
|
50887
|
+
className: `flex items-center gap-2 rounded-md p-2 text-left transition-colors hover:color-bg-default-hover ${e === "view" ? "color-bg-default-hover" : ""}`,
|
|
50877
50888
|
"data-testid": "permission-chip-view-option",
|
|
50878
50889
|
"aria-pressed": e === "view",
|
|
50879
50890
|
onClick: () => i == null ? void 0 : i("view"),
|
|
@@ -50882,45 +50893,49 @@ const XT = ({
|
|
|
50882
50893
|
ze,
|
|
50883
50894
|
{
|
|
50884
50895
|
name: "Eye",
|
|
50885
|
-
size: "
|
|
50886
|
-
className: "
|
|
50896
|
+
size: "sm",
|
|
50897
|
+
className: "shrink-0 color-text-default"
|
|
50887
50898
|
}
|
|
50888
50899
|
),
|
|
50889
|
-
/* @__PURE__ */
|
|
50890
|
-
|
|
50900
|
+
/* @__PURE__ */ w("span", { className: "min-w-0 flex-1", children: [
|
|
50901
|
+
/* @__PURE__ */ d("span", { className: "block text-body-sm color-text-default", children: "View only" }),
|
|
50902
|
+
/* @__PURE__ */ d("span", { className: "block text-helper-text-sm color-text-secondary", children: "View this spreadsheet, distraction-free" })
|
|
50903
|
+
] }),
|
|
50904
|
+
e === "view" && /* @__PURE__ */ d(
|
|
50905
|
+
ze,
|
|
50906
|
+
{
|
|
50907
|
+
name: "Check",
|
|
50908
|
+
size: "sm",
|
|
50909
|
+
className: "shrink-0 color-text-default"
|
|
50910
|
+
}
|
|
50911
|
+
)
|
|
50891
50912
|
]
|
|
50892
50913
|
}
|
|
50893
50914
|
)
|
|
50894
50915
|
] })
|
|
50895
50916
|
] })
|
|
50896
50917
|
}
|
|
50897
|
-
) :
|
|
50918
|
+
) : m ? /* @__PURE__ */ w(
|
|
50898
50919
|
"button",
|
|
50899
50920
|
{
|
|
50900
50921
|
type: "button",
|
|
50901
|
-
className:
|
|
50922
|
+
className: a,
|
|
50902
50923
|
"data-testid": "permission-chip",
|
|
50903
50924
|
"aria-label": "Sign in to comment",
|
|
50904
50925
|
onClick: l,
|
|
50905
50926
|
children: [
|
|
50906
|
-
/* @__PURE__ */ d(
|
|
50907
|
-
ze,
|
|
50908
|
-
{
|
|
50909
|
-
name: "MessageSquareText",
|
|
50910
|
-
className: "w-4 h-4 color-text-default"
|
|
50911
|
-
}
|
|
50912
|
-
),
|
|
50927
|
+
/* @__PURE__ */ d(ze, { name: "MessageSquareText", size: "sm" }),
|
|
50913
50928
|
/* @__PURE__ */ d(
|
|
50914
50929
|
"span",
|
|
50915
50930
|
{
|
|
50916
|
-
className: "dsheet-text dsheet-text--chip
|
|
50931
|
+
className: "dsheet-text dsheet-text--chip",
|
|
50917
50932
|
"data-testid": "permission-chip-label",
|
|
50918
50933
|
children: "Sign in to comment"
|
|
50919
50934
|
}
|
|
50920
50935
|
)
|
|
50921
50936
|
]
|
|
50922
50937
|
}
|
|
50923
|
-
) : /* @__PURE__ */ d("div", { className: o, "data-testid": "permission-chip", role: "status", children:
|
|
50938
|
+
) : /* @__PURE__ */ d("div", { className: o, "data-testid": "permission-chip", role: "status", children: h });
|
|
50924
50939
|
};
|
|
50925
50940
|
function CT(e, t) {
|
|
50926
50941
|
for (var l = -1, i = e == null ? 0 : e.length; ++l < i && t(e[l], l, e) !== !1; )
|
|
@@ -56121,7 +56136,7 @@ async function pO(e, t) {
|
|
|
56121
56136
|
{ suppressUiWarnings: !0 }
|
|
56122
56137
|
);
|
|
56123
56138
|
else {
|
|
56124
|
-
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-
|
|
56139
|
+
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-mGGhmhwn.js");
|
|
56125
56140
|
await m(
|
|
56126
56141
|
{
|
|
56127
56142
|
sheetEditorRef: s,
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as s, d as o, f as t, S as r, g as l, h as d, j as n, T as i, k as S, l as c, n as h, o as m, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A as f, B as I, D as L, E as w, F as A, G as y, H as T, I as v, J as M, K as D, L as b, M as k, N as V } from "./index-
|
|
1
|
+
import { C as s, d as o, f as t, S as r, g as l, h as d, j as n, T as i, k as S, l as c, n as h, o as m, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A as f, B as I, D as L, E as w, F as A, G as y, H as T, I as v, J as M, K as D, L as b, M as k, N as V } from "./index-Ce3dAPLg.js";
|
|
2
2
|
import { cw as G, cx as K, cy as P, cE as U, bq as X, e as _, f as j, l as B, a as H, dg as O, dh as q, b9 as J, di as N, dj as Y, dn as Z, dp as Q, dr as W, I as $, dG as ee, ed as ae, b2 as se } from "./executeStringFunction-CxsiamWG.js";
|
|
3
3
|
import { FLVURL as te } from "@fileverse-dev/formulajs";
|
|
4
4
|
import { E as le, S as de } from "./constants-B3rfAvvz.js";
|