@sheetxl/react 0.8.0-beta.12 → 0.8.0-beta.14
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/browser/esm/{DGG1auUKsjFbAazu.mjs → 3bA4ZNVK9px28j8g.mjs} +3 -3
- package/browser/esm/{CUekkfE6uwwsdQpc.mjs → B1mBZyt2eP2CpVwp.mjs} +1 -1
- package/browser/esm/{ZoS0cpNEBcv6p-Z1.mjs → B9bUlu6d3vrRZxS-.mjs} +3 -3
- package/browser/esm/BAhJx_sa3wR4i_0q.mjs +145 -0
- package/browser/esm/{BDlpRkuBok0Uu4Hn.mjs → BCZ5elyhp4P5oEuf.mjs} +1 -1
- package/browser/esm/BLYs69szBviI7Jjh.mjs +303 -0
- package/browser/esm/{D_usN3pWuCJU2GN-.mjs → BNyPX5tVpHU3d3Vj.mjs} +2 -2
- package/browser/esm/{_6Sb6ElRcZftxMNh.mjs → BSqY5OuRUNgKmwp8.mjs} +1 -1
- package/browser/esm/{D22NJmTiky4NL8tM.mjs → Bk4hW9MxdjC3CGlC.mjs} +1 -1
- package/browser/esm/{D2GydDzPuvIjdpok.mjs → BoJ5N_Kc7V9zyftG.mjs} +1 -1
- package/browser/esm/{C_LUq-BnguetvGZz.mjs → C1yjI8GDwCp8bC1Z.mjs} +2 -2
- package/browser/esm/{LBQDhVhz7S7i6a8i.mjs → C6TgQuQt88nz0-jL.mjs} +1 -1
- package/browser/esm/{CSFORKZ8zrVL_Y0w.mjs → CAT9L5BY3HAluoJf.mjs} +1 -1
- package/browser/esm/{DxEczXCHTerDemDP.mjs → CDf6czK5WuKJhq0y.mjs} +4 -4
- package/browser/esm/CoRairrEG42TjiZk.mjs +19 -0
- package/browser/esm/CuPu7ToiaqUerd85.mjs +401 -0
- package/browser/esm/{BapujiblfiXDlu67.mjs → D0Sg0TONmNBjIlEg.mjs} +1 -1
- package/browser/esm/{Cslk_qRdBSuJIi1O.mjs → DxwO-Y_gJ9IaBQ4B.mjs} +6 -6
- package/browser/esm/{DN3lqq95KY0K6f1x.mjs → K9YyKehkJlT3axZh.mjs} +1 -1
- package/browser/esm/NG_Q0Dq4JXnEWACp.mjs +341 -0
- package/browser/esm/{B4mT3G7GHwgDYFGP.mjs → PL83wgS5ferhptps.mjs} +2 -2
- package/browser/esm/chart.mjs +3 -3
- package/browser/esm/control.mjs +74 -73
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +3971 -3744
- package/browser/esm/{CtGhA0kS2MCfEsHN.mjs → nm3DZw1nJMIh89Dx.mjs} +3 -3
- package/browser/esm/note.mjs +5 -5
- package/browser/esm/picture.mjs +2 -81
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +112 -111
- package/browser/esm/{Ck1LbcsdSfKNi6xq.mjs → wQh060x4Bo_NqUYk.mjs} +1 -1
- package/node/esm/6VFNx4NTcuHaXbnF.mjs +146 -0
- package/node/esm/{CzN6c6KyxVmNvayz.mjs → BBm7LjTGVud73kml.mjs} +1 -1
- package/node/esm/{CH1DVfFhjdd_3pw1.mjs → BayAQ4VhPgK40T5V.mjs} +2 -2
- package/node/esm/{T5lfCrudsUnOTxEn.mjs → BgH9YejvQpQrZeHl.mjs} +1 -1
- package/node/esm/{iL9jKJcnED6oi0B4.mjs → ByTkh2-kGcBTZn9j.mjs} +1 -1
- package/node/esm/{DayGI0Bt57FDNbVF.mjs → C0HgFe1pYpEl1EgM.mjs} +1 -1
- package/node/esm/{MWges5ywL3aEdChp.mjs → CEyXz1TulkCpAv0t.mjs} +1 -1
- package/node/esm/{C0KLMCRb3sbd5Q20.mjs → CMSfxUMv1tFyNlRJ.mjs} +5 -5
- package/node/esm/{DWkPWuf5ZrLRMixG.mjs → CZfiN5xD1_Zws8z-.mjs} +15 -15
- package/node/esm/{DXiNwr6ZnXBe7TlG.mjs → D-lQa7ydREp9WwxP.mjs} +1 -1
- package/node/esm/{Bi2Jwc0zpweaNzKc.mjs → D2dDGnBtilmmDxBJ.mjs} +2 -2
- package/node/esm/{CNOLkUDURBElaaIf.mjs → DA6UdPMREzxobL8H.mjs} +3 -3
- package/node/esm/{YB_qExw23Ci4nMYy.mjs → Duu2zmr8YkGTo-iP.mjs} +2 -2
- package/node/esm/{Apcuz4_QtBHt7G47.mjs → Dztz6JUUcE4NG6sn.mjs} +1 -1
- package/node/esm/ShpbUw8_QnOxZu2h.mjs +19 -0
- package/node/esm/{DyetXBW7vFLJWB22.mjs → _OzLYz_iliC3tcW2.mjs} +1 -1
- package/node/esm/chart.mjs +2 -2
- package/node/esm/control.mjs +79 -78
- package/node/esm/eG-mlQfoOvRwAwU1.mjs +406 -0
- package/node/esm/{DKqdv5JubgVaq-g9.mjs → fhOm7EkeM-0FAdDI.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +6469 -6242
- package/node/esm/note.mjs +18 -18
- package/node/esm/picture.mjs +269 -50
- package/node/esm/{CalVk3o4-kX79s3v.mjs → r0Bg1Uwd5WHBFQyj.mjs} +1 -1
- package/node/esm/shape.mjs +186 -580
- package/node/esm/slicer.mjs +51 -50
- package/node/esm/{bRD1KCpSpAYTEs50.mjs → wtQ7d7f37N1tuJZB.mjs} +1 -1
- package/package.json +7 -7
- package/resources/locales/de/picture.cmd.json +157 -0
- package/resources/locales/de/sheet.cmd.json +24 -2
- package/resources/locales/de/ui.msg.json +3 -0
- package/resources/locales/en/picture.cmd.json +157 -0
- package/resources/locales/en/sheet.cmd.json +24 -2
- package/resources/locales/en/ui.msg.json +3 -0
- package/types/src/chart/ChartCommands.d.ts +1 -1
- package/types/src/chart/paint/_graphics.d.ts +0 -8
- package/types/src/chart/paint/echarts.d.ts +1 -1
- package/types/src/chart/paint/index.d.ts +1 -1
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +1 -1
- package/types/src/chart/paint/kinds/_builtIns.d.ts +0 -9
- package/types/src/chart/paint/toEChartsOption.d.ts +1 -1
- package/types/src/layer/CircularIndicatorLayer.d.ts +1 -1
- package/types/src/layer/HyperlinkLayer.d.ts +13 -9
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/useValidationPicker.d.ts +1 -1
- package/types/src/movable/useFramePreview.d.ts +17 -0
- package/types/src/picture/PictureCommands.d.ts +8 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/circularReferences.d.ts +1 -1
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +0 -730
- package/browser/esm/DhYQRc8L2kALmFNz.mjs +0 -75
- package/node/esm/Cp1DuCae46eQKzWy.mjs +0 -76
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { n as e } from "./
|
|
8
|
-
import { t } from "./
|
|
7
|
+
import { n as e } from "./BoJ5N_Kc7V9zyftG.mjs";
|
|
8
|
+
import { t } from "./K9YyKehkJlT3axZh.mjs";
|
|
9
9
|
import { forwardRef as n, memo as r, useEffect as i } from "react";
|
|
10
10
|
import { jsx as a } from "react/jsx-runtime";
|
|
11
11
|
import { useImperativeElement as o, useMeasure as s, useTranslator as c } from "@sheetxl/utils-react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -46,13 +46,13 @@ var l = (n, r) => {
|
|
|
46
46
|
}, p = (e, t) => e ? "percent" in e ? e.percent / 100 * 1.2 : `${e.points}pt` : t, m = (e, t, r) => {
|
|
47
47
|
let i = [];
|
|
48
48
|
t.underline && t.underline !== "none" && i.push("underline"), t.strike && t.strike !== "none" && i.push("line-through");
|
|
49
|
-
let a = t.font?.family
|
|
49
|
+
let a = [t.font?.family, ...t.font?.fallbacks ?? []].filter((e) => !!e);
|
|
50
50
|
return {
|
|
51
51
|
fontSize: typeof t.size == "number" ? `${t.size}pt` : void 0,
|
|
52
52
|
fontWeight: t.weight,
|
|
53
53
|
fontStyle: t.style === n.Style.Italic ? "italic" : void 0,
|
|
54
54
|
textDecoration: i.length ? i.join(" ") : void 0,
|
|
55
|
-
fontFamily: a,
|
|
55
|
+
fontFamily: a.length ? n.toCSSFontFamily(a[0], a.slice(1)) : void 0,
|
|
56
56
|
color: l(e, t.color) ?? r ?? void 0,
|
|
57
57
|
letterSpacing: typeof t.letterSpacing == "number" ? `${t.letterSpacing}pt` : void 0,
|
|
58
58
|
verticalAlign: typeof t.baseline == "number" && t.baseline !== 0 ? `${t.baseline}%` : void 0,
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { n as e } from "./CoRairrEG42TjiZk.mjs";
|
|
8
|
+
import { i as t, n, r, t as i } from "./BLYs69szBviI7Jjh.mjs";
|
|
9
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
10
|
+
import { DOMUtils as o, messageKey as s, t as c } from "@sheetxl/utils";
|
|
11
|
+
import { NotifierType as l } from "@sheetxl/utils-react";
|
|
12
|
+
var u = {
|
|
13
|
+
cropAspect1x1: [1, 1],
|
|
14
|
+
cropAspect2x3: [2, 3],
|
|
15
|
+
cropAspect3x4: [3, 4],
|
|
16
|
+
cropAspect3x5: [3, 5],
|
|
17
|
+
cropAspect4x5: [4, 5],
|
|
18
|
+
cropAspect3x2: [3, 2],
|
|
19
|
+
cropAspect4x3: [4, 3],
|
|
20
|
+
cropAspect5x3: [5, 3],
|
|
21
|
+
cropAspect5x4: [5, 4],
|
|
22
|
+
cropAspect16x9: [16, 9],
|
|
23
|
+
cropAspect16x10: [16, 10]
|
|
24
|
+
}, d = {
|
|
25
|
+
renderer: (e) => {
|
|
26
|
+
let t = e.movable.getContent();
|
|
27
|
+
return a(i, {
|
|
28
|
+
loadingPanel: a("div", { style: {
|
|
29
|
+
position: "absolute",
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%"
|
|
32
|
+
} }),
|
|
33
|
+
picture: t,
|
|
34
|
+
description: t.getDescription() ?? t.getName?.() ?? void 0,
|
|
35
|
+
...e
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
commands: (i, a) => {
|
|
39
|
+
let { sheet: d, movable: f, notifier: p } = a, m = f.getContent(), h = async (e) => {
|
|
40
|
+
try {
|
|
41
|
+
await e();
|
|
42
|
+
} catch (e) {
|
|
43
|
+
p?.showError?.(e);
|
|
44
|
+
}
|
|
45
|
+
}, g = m.isReadOnly() ? [s("reason.sheetProtected")] : [], _ = m.toJSON().locks?.noCrop ? [s("reason.pictureCropLocked")] : g;
|
|
46
|
+
i.updateCommand("cropToShape", {
|
|
47
|
+
tags: ["noTransaction", "noRepeat"],
|
|
48
|
+
disabledReasons: _,
|
|
49
|
+
callback: (e) => h(() => {
|
|
50
|
+
let t = typeof e == "object" && e ? e.geometry : e;
|
|
51
|
+
m.setShapeType(typeof t == "string" ? t : "rect");
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
for (let [e, [t, r]] of Object.entries(u)) i.updateCommand(e, {
|
|
55
|
+
tags: ["noTransaction", "noRepeat"],
|
|
56
|
+
disabledReasons: _,
|
|
57
|
+
callback: () => h(() => {
|
|
58
|
+
let e = n(f.getBounds(), m.getCrop(), t / r);
|
|
59
|
+
return d.doBatch(() => {
|
|
60
|
+
f.setBounds(e.bounds), m.setCrop(e.crop);
|
|
61
|
+
}, { description: s("op.setPictureCrop") });
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
let v = (e) => () => h(async () => {
|
|
65
|
+
let t = await m.getDetails();
|
|
66
|
+
m.setCrop(e(f.getBounds(), t.getNaturalSize()));
|
|
67
|
+
});
|
|
68
|
+
i.updateCommand("cropFill", {
|
|
69
|
+
tags: ["noTransaction", "noRepeat"],
|
|
70
|
+
disabledReasons: _,
|
|
71
|
+
callback: v(r)
|
|
72
|
+
}), i.updateCommand("cropFit", {
|
|
73
|
+
tags: ["noTransaction", "noRepeat"],
|
|
74
|
+
disabledReasons: _,
|
|
75
|
+
callback: v(t)
|
|
76
|
+
});
|
|
77
|
+
let y = m.getHyperlink(), b = y ? [] : [s("reason.pictureNoHyperlink")];
|
|
78
|
+
i.updateCommand("updatePictureHyperlink", {
|
|
79
|
+
tags: ["noTransaction", "noRepeat"],
|
|
80
|
+
callback: () => {
|
|
81
|
+
e(m, d, p);
|
|
82
|
+
}
|
|
83
|
+
}), i.updateCommand("openPictureHyperlink", {
|
|
84
|
+
tags: ["noTransaction", "noRepeat"],
|
|
85
|
+
disabledReasons: b,
|
|
86
|
+
callback: () => h(async () => {
|
|
87
|
+
await m.getHyperlink()?.open();
|
|
88
|
+
})
|
|
89
|
+
}), i.updateCommand("deletePictureHyperlink", {
|
|
90
|
+
tags: ["noTransaction", "noRepeat"],
|
|
91
|
+
disabledReasons: y ? g : b,
|
|
92
|
+
callback: () => h(() => {
|
|
93
|
+
m.setHyperlink(null);
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
let x = async (e) => {
|
|
97
|
+
let t = await (async (e) => {
|
|
98
|
+
let t = await Promise.resolve(p?.showBusy?.(c(s("op.setPictureResource"))) ?? null);
|
|
99
|
+
try {
|
|
100
|
+
let t = d.getResources().add(e);
|
|
101
|
+
return await t.toBuffer(), t;
|
|
102
|
+
} catch (e) {
|
|
103
|
+
let t = e;
|
|
104
|
+
if (typeof t != "string") {
|
|
105
|
+
console.warn(e);
|
|
106
|
+
let n = typeof e?.cause == "string" ? e.cause : "", r = typeof e?.message == "string" ? e.message : "";
|
|
107
|
+
n && (r = r ? `${r} (${n})` : n), t = c("error.insertImage.unresolved", { detail: r });
|
|
108
|
+
}
|
|
109
|
+
return p?.showMessage?.(t, { type: l.Error }), null;
|
|
110
|
+
} finally {
|
|
111
|
+
t?.();
|
|
112
|
+
}
|
|
113
|
+
})(e);
|
|
114
|
+
t && m.setResource(t);
|
|
115
|
+
};
|
|
116
|
+
i.updateCommand("changePictureFromFile", {
|
|
117
|
+
tags: ["noTransaction", "noRepeat"],
|
|
118
|
+
callback: async (e) => {
|
|
119
|
+
let t = null, n = null;
|
|
120
|
+
typeof e == "string" ? n = e : t = e ?? null, (t || (t = await o.openFileDialog(n ?? "image/*"), t)) && await x({ source: { file: await Promise.resolve(t) } });
|
|
121
|
+
}
|
|
122
|
+
}), i.updateCommand("changePictureFromURL", {
|
|
123
|
+
tags: ["noTransaction", "noRepeat"],
|
|
124
|
+
callback: async (e) => {
|
|
125
|
+
if (!e) {
|
|
126
|
+
let t = await p?.showInput?.({
|
|
127
|
+
title: c("dialog.changePicture.title"),
|
|
128
|
+
description: c("dialog.changePicture.description"),
|
|
129
|
+
inputLabel: c("dialog.insertImage.inputLabel"),
|
|
130
|
+
initialValue: "https://picsum.photos/360",
|
|
131
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
132
|
+
options: [{
|
|
133
|
+
id: "Change",
|
|
134
|
+
label: () => c("dialog.change")
|
|
135
|
+
}]
|
|
136
|
+
});
|
|
137
|
+
if (!t || t.option !== "Change") return;
|
|
138
|
+
e = t.input;
|
|
139
|
+
}
|
|
140
|
+
e && await x({ source: { fetch: e } });
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
export { d as PictureKind };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./C6TgQuQt88nz0-jL.mjs";
|
|
8
|
+
import { n as t } from "./wQh060x4Bo_NqUYk.mjs";
|
|
9
|
+
import { t as n } from "./CoRairrEG42TjiZk.mjs";
|
|
10
|
+
import { i as r, r as i, t as a } from "./CuPu7ToiaqUerd85.mjs";
|
|
11
|
+
import { forwardRef as o, memo as s, useEffect as c, useId as l, useMemo as u, useReducer as ee, useRef as te, useState as d } from "react";
|
|
12
|
+
import { jsx as f, jsxs as ne } from "react/jsx-runtime";
|
|
13
|
+
import { useSurfaceStateSetter as re } from "@sheetxl/grid-react";
|
|
14
|
+
import { ReactUtils as ie, useImperativeElement as ae, useNotifier as oe, usePendingRender as se } from "@sheetxl/utils-react";
|
|
15
|
+
var p = (e) => Math.round(1e3 * e) / 1e3, m = (e, t, n) => {
|
|
16
|
+
let r = p(50 * (1 - e.width / (n * t.width))), i = p(50 * (1 - e.height / (n * t.height)));
|
|
17
|
+
return {
|
|
18
|
+
left: r,
|
|
19
|
+
right: r,
|
|
20
|
+
top: i,
|
|
21
|
+
bottom: i
|
|
22
|
+
};
|
|
23
|
+
}, h = (e, t) => m(e, t, Math.max(e.width / t.width, e.height / t.height)), g = (e, t) => m(e, t, Math.min(e.width / t.width, e.height / t.height)), _ = (e, t, n) => {
|
|
24
|
+
let r = Math.min(e.width, e.height * n), i = r / n, { left: a = 0, top: o = 0, right: s = 0, bottom: c = 0 } = t, l = (e.width - r) / 2 / e.width * (100 - a - s), u = (e.height - i) / 2 / e.height * (100 - o - c);
|
|
25
|
+
return {
|
|
26
|
+
bounds: {
|
|
27
|
+
x: e.x + (e.width - r) / 2,
|
|
28
|
+
y: e.y + (e.height - i) / 2,
|
|
29
|
+
width: r,
|
|
30
|
+
height: i
|
|
31
|
+
},
|
|
32
|
+
crop: {
|
|
33
|
+
left: p(a + l),
|
|
34
|
+
right: p(s + l),
|
|
35
|
+
top: p(o + u),
|
|
36
|
+
bottom: p(c + u)
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, v = "data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwO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HDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=", y = {
|
|
40
|
+
left: "0%",
|
|
41
|
+
top: "0%",
|
|
42
|
+
width: "100%",
|
|
43
|
+
height: "100%"
|
|
44
|
+
}, ce = {
|
|
45
|
+
position: "absolute",
|
|
46
|
+
left: 0,
|
|
47
|
+
top: 0,
|
|
48
|
+
width: "100%",
|
|
49
|
+
height: "100%",
|
|
50
|
+
display: "block",
|
|
51
|
+
pointerEvents: "none"
|
|
52
|
+
}, b = s(o((o, s) => {
|
|
53
|
+
let { children: p, disabled: m, style: h, picture: g, movable: _, zoom: b = 1, gesture: le, description: ue, tile: x, offsetX: S = 0, offsetY: C = 0, isDragging: w, onHide: de, onShow: fe, onDragZone: pe, adornmentHost: me, flip: T, onKeyDownCapture: he, onFocus: ge, onBlur: _e, loadingPanel: ve, ...ye } = o, [E, D] = d(!1), [O, be] = d(null), [k, A] = d(null), [j, M] = d(null), [xe, N] = ee((e) => e + 1, 0);
|
|
54
|
+
e(g, { onAnyChange: N }), e(_ ?? null, {
|
|
55
|
+
onBoundsChange: N,
|
|
56
|
+
onSelectionChange: N
|
|
57
|
+
});
|
|
58
|
+
let Se = t(), Ce = oe(), P = g.toJSON(), { width: F, height: I, rotation: L } = r(_), R = F > 0 && I > 0, z = !!P.fill || !!P.stroke || P.geometry !== void 0 && P.geometry !== "rect", we = P.adjustments ? JSON.stringify(P.adjustments) : "", [B, V] = d(null), [Te, H] = d(!1);
|
|
59
|
+
c(() => {
|
|
60
|
+
if (!z || !R) return V(null), void H(!1);
|
|
61
|
+
let e = !0;
|
|
62
|
+
return g.getGeometry(F, I).then((t) => {
|
|
63
|
+
e && (V(t), H(!0));
|
|
64
|
+
}, () => {
|
|
65
|
+
e && (V(null), H(!0));
|
|
66
|
+
}), () => {
|
|
67
|
+
e = !1;
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
g,
|
|
71
|
+
z,
|
|
72
|
+
R,
|
|
73
|
+
P.geometry,
|
|
74
|
+
we
|
|
75
|
+
]);
|
|
76
|
+
let U = u(() => B && R ? B.getWidth() === F && B.getHeight() === I ? B : B.resize(F, I) : null, [
|
|
77
|
+
B,
|
|
78
|
+
R,
|
|
79
|
+
F,
|
|
80
|
+
I
|
|
81
|
+
]);
|
|
82
|
+
se(!E && (x ? !k : !O) || z && R && !Te);
|
|
83
|
+
let W = Se?.getStyles() ?? null, G = u(() => z ? i({
|
|
84
|
+
fill: P.fill,
|
|
85
|
+
stroke: P.stroke,
|
|
86
|
+
style: null
|
|
87
|
+
}, W) : null, [
|
|
88
|
+
z,
|
|
89
|
+
P.fill,
|
|
90
|
+
P.stroke,
|
|
91
|
+
W
|
|
92
|
+
]), K = `${l().replace(/[^A-Za-z0-9_-]/g, "")}-clip`, q = u(() => {
|
|
93
|
+
if (!U || P.geometry === void 0 || P.geometry === "rect") return null;
|
|
94
|
+
let e = [];
|
|
95
|
+
return U.forEachPath((t) => {
|
|
96
|
+
t.layer === "fill" && e.push(t.d);
|
|
97
|
+
}), e.length > 0 ? e.join(" ") : null;
|
|
98
|
+
}, [U, P.geometry]), J = T?.horizontal ?? !1, Y = T?.vertical ?? !1, X = u(() => L % 360 == 0 && R ? {
|
|
99
|
+
dpr: ie.getDevicePixelRatio(),
|
|
100
|
+
zoom: b,
|
|
101
|
+
width: F,
|
|
102
|
+
height: I,
|
|
103
|
+
flipH: J,
|
|
104
|
+
flipV: Y
|
|
105
|
+
} : null, [
|
|
106
|
+
L,
|
|
107
|
+
R,
|
|
108
|
+
b,
|
|
109
|
+
F,
|
|
110
|
+
I,
|
|
111
|
+
J,
|
|
112
|
+
Y
|
|
113
|
+
]), Z = g.getHyperlink?.() ?? null, Q = re(n, null), $ = te(null);
|
|
114
|
+
c(() => () => {
|
|
115
|
+
$.current?.(), Q((e) => e === g ? null : e);
|
|
116
|
+
}, [g, Q]), c(() => {
|
|
117
|
+
Z || Q((e) => e === g ? null : e);
|
|
118
|
+
}, [
|
|
119
|
+
!Z,
|
|
120
|
+
g,
|
|
121
|
+
Q
|
|
122
|
+
]), c(() => {
|
|
123
|
+
A(null), g.getDetails().then((e) => {
|
|
124
|
+
D(!1), A(e.asUrl()), M(e.asSVGText?.() || null);
|
|
125
|
+
}).catch((e) => {
|
|
126
|
+
console.warn(e), D(!0), A(v), M(null);
|
|
127
|
+
});
|
|
128
|
+
}, [g, xe]);
|
|
129
|
+
let Ee = ae(s, () => ({ isPictureEditor: () => !0 }), []), De = P.image?.sourceRect, Oe = u(() => ((e) => {
|
|
130
|
+
let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e ?? {}, a = (100 - t - r) / 100, o = (100 - n - i) / 100;
|
|
131
|
+
return {
|
|
132
|
+
left: -t / a + "%",
|
|
133
|
+
top: -n / o + "%",
|
|
134
|
+
width: 100 / a + "%",
|
|
135
|
+
height: 100 / o + "%"
|
|
136
|
+
};
|
|
137
|
+
})(De), [De]), ke = u(() => {
|
|
138
|
+
if (k || j) return x ? f("div", { style: {
|
|
139
|
+
backgroundPosition: `${S}px ${C}px`,
|
|
140
|
+
backgroundImage: `url(${k})`,
|
|
141
|
+
backgroundRepeat: "repeat",
|
|
142
|
+
backgroundSize: "auto",
|
|
143
|
+
width: "100%",
|
|
144
|
+
height: "100%",
|
|
145
|
+
filter: "var(--sxl-image-filter)"
|
|
146
|
+
} }) : f("img", {
|
|
147
|
+
style: {
|
|
148
|
+
position: "absolute",
|
|
149
|
+
...E ? y : Oe,
|
|
150
|
+
border: E ? "var(--sxl-color-neutral, grey) solid 1px" : void 0,
|
|
151
|
+
backgroundColor: E ? "var(--sxl-color-base-100, white)" : void 0,
|
|
152
|
+
boxShadow: E ? "0px 0px 3px var(--sxl-color-error, red)" : void 0,
|
|
153
|
+
objectFit: E ? "contain" : void 0,
|
|
154
|
+
opacity: +!!O,
|
|
155
|
+
filter: "var(--sxl-image-filter)"
|
|
156
|
+
},
|
|
157
|
+
draggable: !1,
|
|
158
|
+
src: k ?? void 0,
|
|
159
|
+
onLoad: () => {
|
|
160
|
+
be(!0);
|
|
161
|
+
},
|
|
162
|
+
onError: ({ currentTarget: e }) => {
|
|
163
|
+
console.log("error"), e.onerror = null, A(v), D(!0);
|
|
164
|
+
},
|
|
165
|
+
alt: ue ?? `${g.getType()}`
|
|
166
|
+
});
|
|
167
|
+
}, [
|
|
168
|
+
O,
|
|
169
|
+
g,
|
|
170
|
+
k,
|
|
171
|
+
j,
|
|
172
|
+
w,
|
|
173
|
+
x,
|
|
174
|
+
S,
|
|
175
|
+
C,
|
|
176
|
+
Oe,
|
|
177
|
+
E,
|
|
178
|
+
ue
|
|
179
|
+
]);
|
|
180
|
+
if (g.isDeleted()) return;
|
|
181
|
+
let Ae = T && (T.horizontal || T.vertical) ? `scale(${T.horizontal ? -1 : 1}, ${T.vertical ? -1 : 1})` : void 0, je = h?.pointerEvents === "none" ? "none" : "visiblePainted", { left: Me = 0, top: Ne = 0, right: Pe = 0, bottom: Fe = 0 } = P.image?.stretch ?? {};
|
|
182
|
+
return ne("div", {
|
|
183
|
+
className: "picture-editor",
|
|
184
|
+
style: {
|
|
185
|
+
position: "relative",
|
|
186
|
+
display: "flex",
|
|
187
|
+
flex: "1 1 100%",
|
|
188
|
+
filter: w ? "drop-shadow(1px 1px 1.5px var(--sxl-color-shadow, rgba(0, 0, 0, .25)))" : void 0,
|
|
189
|
+
transform: Ae,
|
|
190
|
+
transformOrigin: "center",
|
|
191
|
+
...h,
|
|
192
|
+
pointerEvents: "none",
|
|
193
|
+
width: "100%",
|
|
194
|
+
height: "100%"
|
|
195
|
+
},
|
|
196
|
+
tabIndex: 0,
|
|
197
|
+
...ye,
|
|
198
|
+
onPointerDownCapture: Z ? (e) => {
|
|
199
|
+
if (e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || !_ || _.isSelected()) return;
|
|
200
|
+
$.current?.();
|
|
201
|
+
let t = e.currentTarget.ownerDocument, { pointerId: n, clientX: r, clientY: i, timeStamp: a } = e.nativeEvent, o = (e) => {
|
|
202
|
+
if (e.pointerId !== n || ($.current?.(), !(Math.abs(e.clientX - r) <= 4 && Math.abs(e.clientY - i) <= 4 && e.timeStamp - a <= 500))) return;
|
|
203
|
+
let t = g.getHyperlink();
|
|
204
|
+
t && (_.unselect(), t.open().catch((e) => {
|
|
205
|
+
Ce.showError?.(e instanceof Error ? e : String(e));
|
|
206
|
+
}));
|
|
207
|
+
}, s = (e) => {
|
|
208
|
+
e.pointerId === n && $.current?.();
|
|
209
|
+
};
|
|
210
|
+
t.addEventListener("pointerup", o), t.addEventListener("pointercancel", s), $.current = () => {
|
|
211
|
+
$.current = null, t.removeEventListener("pointerup", o), t.removeEventListener("pointercancel", s);
|
|
212
|
+
};
|
|
213
|
+
} : void 0,
|
|
214
|
+
onPointerEnter: Z ? () => {
|
|
215
|
+
Q(g);
|
|
216
|
+
} : void 0,
|
|
217
|
+
onPointerLeave: Z ? () => {
|
|
218
|
+
Q((e) => e === g ? null : e);
|
|
219
|
+
} : void 0,
|
|
220
|
+
onKeyDownCapture: (e) => {
|
|
221
|
+
he?.(e);
|
|
222
|
+
},
|
|
223
|
+
ref: Ee,
|
|
224
|
+
children: [
|
|
225
|
+
U && G ? f("svg", {
|
|
226
|
+
className: "picture-fill",
|
|
227
|
+
viewBox: `0 0 ${F} ${I}`,
|
|
228
|
+
preserveAspectRatio: "none",
|
|
229
|
+
overflow: "visible",
|
|
230
|
+
style: ce,
|
|
231
|
+
children: f(a, {
|
|
232
|
+
geometry: U,
|
|
233
|
+
style: {
|
|
234
|
+
...G,
|
|
235
|
+
stroke: null,
|
|
236
|
+
strokeGradient: void 0,
|
|
237
|
+
strokeWidth: 0
|
|
238
|
+
},
|
|
239
|
+
zoom: b,
|
|
240
|
+
grid: X,
|
|
241
|
+
hit: je
|
|
242
|
+
})
|
|
243
|
+
}) : null,
|
|
244
|
+
q ? f("svg", {
|
|
245
|
+
width: 0,
|
|
246
|
+
height: 0,
|
|
247
|
+
style: { position: "absolute" },
|
|
248
|
+
"aria-hidden": !0,
|
|
249
|
+
children: f("defs", { children: f("clipPath", {
|
|
250
|
+
id: K,
|
|
251
|
+
clipPathUnits: "objectBoundingBox",
|
|
252
|
+
children: f("path", {
|
|
253
|
+
d: q,
|
|
254
|
+
transform: `scale(${1 / F} ${1 / I})`
|
|
255
|
+
})
|
|
256
|
+
}) })
|
|
257
|
+
}) : null,
|
|
258
|
+
f("div", {
|
|
259
|
+
className: "picture-clip",
|
|
260
|
+
style: {
|
|
261
|
+
position: "absolute",
|
|
262
|
+
...y,
|
|
263
|
+
clipPath: q ? `url(#${K})` : void 0,
|
|
264
|
+
pointerEvents: h?.pointerEvents ?? "auto",
|
|
265
|
+
cursor: Z && !_?.isSelected() ? "pointer" : void 0
|
|
266
|
+
},
|
|
267
|
+
children: ne("div", {
|
|
268
|
+
className: "picture-image",
|
|
269
|
+
style: {
|
|
270
|
+
position: "absolute",
|
|
271
|
+
left: `${Me}%`,
|
|
272
|
+
top: `${Ne}%`,
|
|
273
|
+
right: `${Pe}%`,
|
|
274
|
+
bottom: `${Fe}%`,
|
|
275
|
+
overflow: "hidden"
|
|
276
|
+
},
|
|
277
|
+
children: [O || E ? void 0 : ve, ke]
|
|
278
|
+
})
|
|
279
|
+
}),
|
|
280
|
+
U && G && G.strokeWidth > 0 ? f("svg", {
|
|
281
|
+
className: "picture-border",
|
|
282
|
+
viewBox: `0 0 ${F} ${I}`,
|
|
283
|
+
preserveAspectRatio: "none",
|
|
284
|
+
overflow: "visible",
|
|
285
|
+
style: ce,
|
|
286
|
+
children: f(a, {
|
|
287
|
+
geometry: U,
|
|
288
|
+
style: {
|
|
289
|
+
...G,
|
|
290
|
+
fill: null,
|
|
291
|
+
gradient: void 0,
|
|
292
|
+
image: void 0
|
|
293
|
+
},
|
|
294
|
+
zoom: b,
|
|
295
|
+
grid: X,
|
|
296
|
+
hit: je
|
|
297
|
+
})
|
|
298
|
+
}) : null
|
|
299
|
+
]
|
|
300
|
+
});
|
|
301
|
+
}));
|
|
302
|
+
b.displayName = "PictureEditor";
|
|
303
|
+
export { g as i, _ as n, h as r, b as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./K9YyKehkJlT3axZh.mjs";
|
|
8
8
|
import { forwardRef as t, memo as n, useMemo as r, useRef as i } from "react";
|
|
9
9
|
import { jsx as a } from "react/jsx-runtime";
|
|
10
10
|
var o = "data-run", s = (e) => typeof e == "string" ? e ? [{ text: e }] : [] : e.runs ?? [], c = (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, t } from "./
|
|
7
|
+
import { n as e, t } from "./BoJ5N_Kc7V9zyftG.mjs";
|
|
8
8
|
import { Color as n, IFill as r, IStroke as i, PaintUtils as a } from "@sheetxl/sdk";
|
|
9
9
|
var o = {
|
|
10
10
|
pct5: "0040000000040000",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./C6TgQuQt88nz0-jL.mjs";
|
|
8
8
|
import { createContext as t, memo as n, useCallback as r, useEffect as i, useReducer as a, useRef as o, useState as s } from "react";
|
|
9
9
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
10
|
import { LazyModules as d, defineLazyModule as f } from "@sheetxl/utils";
|
|
@@ -161,7 +161,7 @@ var O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), A = /* @__PURE
|
|
|
161
161
|
for (let e of [...j]) e();
|
|
162
162
|
}, N = !1, P = () => {
|
|
163
163
|
N || (N = !0, function(e) {
|
|
164
|
-
e("picture", () => import("./
|
|
164
|
+
e("picture", () => import("./BAhJx_sa3wR4i_0q.mjs"), { select: (e) => e.PictureKind }), e("chart", () => import("./PL83wgS5ferhptps.mjs"), { select: (e) => e.ChartKind }), e("slicer", () => import("./BCZ5elyhp4P5oEuf.mjs"), { select: (e) => e.SlicerKind }), e("shape", () => import("./DxwO-Y_gJ9IaBQ4B.mjs"), {
|
|
165
165
|
select: (e) => e.ShapeKind,
|
|
166
166
|
selectionShadow: !1
|
|
167
167
|
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) => l(e, {
|
|
@@ -173,7 +173,7 @@ var O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), A = /* @__PURE
|
|
|
173
173
|
...r,
|
|
174
174
|
note: t.movable.getContent()
|
|
175
175
|
});
|
|
176
|
-
} }), e("error", () => import("./
|
|
176
|
+
} }), e("error", () => import("./3bA4ZNVK9px28j8g.mjs").then((e) => e.t), { select: ({ ErrorContentFrame: e }) => (t) => l(e, { ...t }) });
|
|
177
177
|
let t = (t, n) => {
|
|
178
178
|
e(t, () => import("./control.mjs"), { select: n });
|
|
179
179
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.14
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { messageKey as e } from "@sheetxl/utils";
|
|
8
|
+
var t = "hovered-picture-link", n = (t, n, r) => {
|
|
9
|
+
r?.showWindow?.("hyperlink", {
|
|
10
|
+
disabled: t.isReadOnly(),
|
|
11
|
+
initialValue: t.getHyperlink()?.getAddress() ?? null,
|
|
12
|
+
hideDisplayText: !0,
|
|
13
|
+
sheetName: n.getName(),
|
|
14
|
+
onInput: (n) => {
|
|
15
|
+
t.setHyperlink(n?.address ? n.address : null, { description: e("op.setPictureHyperlink") });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { n, t };
|