@fileverse-dev/fortune-react 1.0.2-mod-69 → 1.0.2-mod-70
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/index.css +1 -4
- package/dist/index.esm.css +1 -4
- package/dist/index.esm.js +33 -93
- package/dist/index.js +32 -92
- package/dist/index.umd.css +1 -4
- package/dist/index.umd.js +65 -95
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -2358,11 +2358,8 @@ input[type="number"].condition-rules-project-input {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
|
|
2360
2360
|
.fortune-toolbar-combo-popup {
|
|
2361
|
-
position: absolute;
|
|
2362
2361
|
white-space: nowrap;
|
|
2363
|
-
|
|
2364
|
-
left: 0;
|
|
2365
|
-
z-index: 1004;
|
|
2362
|
+
max-width: 240px;
|
|
2366
2363
|
}
|
|
2367
2364
|
|
|
2368
2365
|
.fortune-toolbar-select::-webkit-scrollbar {
|
package/dist/index.esm.css
CHANGED
|
@@ -2358,11 +2358,8 @@ input[type="number"].condition-rules-project-input {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
|
|
2360
2360
|
.fortune-toolbar-combo-popup {
|
|
2361
|
-
position: absolute;
|
|
2362
2361
|
white-space: nowrap;
|
|
2363
|
-
|
|
2364
|
-
left: 0;
|
|
2365
|
-
z-index: 1004;
|
|
2362
|
+
max-width: 240px;
|
|
2366
2363
|
}
|
|
2367
2364
|
|
|
2368
2365
|
.fortune-toolbar-select::-webkit-scrollbar {
|
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fix
|
|
|
2
2
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
4
4
|
import _ from 'lodash';
|
|
5
|
-
import { Tooltip, LucideIcon, TextField, Button as Button$1, cn, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Select as Select$1, SelectTrigger, SelectValue, SelectContent, SelectItem as SelectItem$1, RadioGroup, RadioGroupItem, Label } from '@fileverse/ui';
|
|
5
|
+
import { Tooltip, LucideIcon, TextField, Button as Button$1, cn, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Select as Select$1, SelectTrigger, SelectValue, SelectContent, SelectItem as SelectItem$1, Popover, PopoverTrigger, PopoverContent, RadioGroup, RadioGroupItem, Label } from '@fileverse/ui';
|
|
6
6
|
import regeneratorRuntime from 'regenerator-runtime';
|
|
7
7
|
import Tippy from '@tippyjs/react';
|
|
8
8
|
export * from '@fileverse-dev/formulajs/crypto-constants';
|
|
@@ -4511,45 +4511,11 @@ var Combo = function Combo(_ref) {
|
|
|
4511
4511
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4512
4512
|
open = _useState2[0],
|
|
4513
4513
|
setOpen = _useState2[1];
|
|
4514
|
-
var _useState3 = useState({
|
|
4515
|
-
left: 0
|
|
4516
|
-
}),
|
|
4517
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4518
|
-
popupPosition = _useState4[0],
|
|
4519
|
-
setPopupPosition = _useState4[1];
|
|
4520
|
-
var popupRef = useRef(null);
|
|
4521
4514
|
var buttonRef = useRef(null);
|
|
4522
4515
|
var isLucideIcon = useMemo(function () {
|
|
4523
4516
|
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
|
|
4524
4517
|
}, [iconId]);
|
|
4525
|
-
|
|
4526
|
-
setOpen(false);
|
|
4527
|
-
});
|
|
4528
|
-
useLayoutEffect(function () {
|
|
4529
|
-
if (!popupRef.current) {
|
|
4530
|
-
return;
|
|
4531
|
-
}
|
|
4532
|
-
if (!open) {
|
|
4533
|
-
setPopupPosition({
|
|
4534
|
-
left: 0
|
|
4535
|
-
});
|
|
4536
|
-
}
|
|
4537
|
-
var winW = window.innerWidth;
|
|
4538
|
-
var rect = popupRef.current.getBoundingClientRect();
|
|
4539
|
-
var menuW = rect.width;
|
|
4540
|
-
var left = rect.left;
|
|
4541
|
-
if (left + menuW > winW) {
|
|
4542
|
-
setPopupPosition({
|
|
4543
|
-
left: -rect.width + buttonRef.current.clientWidth
|
|
4544
|
-
});
|
|
4545
|
-
}
|
|
4546
|
-
}, [open]);
|
|
4547
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4548
|
-
className: "fortune-toobar-combo-container fortune-toolbar-item"
|
|
4549
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4550
|
-
ref: buttonRef,
|
|
4551
|
-
className: "fortune-toolbar-combo"
|
|
4552
|
-
}, !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
|
|
4518
|
+
var trigger = !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
|
|
4553
4519
|
text: tooltip,
|
|
4554
4520
|
placement: "bottom"
|
|
4555
4521
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -4558,8 +4524,6 @@ var Combo = function Combo(_ref) {
|
|
|
4558
4524
|
if (_onClick) {
|
|
4559
4525
|
_onClick(e);
|
|
4560
4526
|
if (!showArrow) setOpen(!open);
|
|
4561
|
-
} else {
|
|
4562
|
-
setOpen(!open);
|
|
4563
4527
|
}
|
|
4564
4528
|
},
|
|
4565
4529
|
tabIndex: 0,
|
|
@@ -4580,23 +4544,23 @@ var Combo = function Combo(_ref) {
|
|
|
4580
4544
|
onClick: function onClick() {
|
|
4581
4545
|
return setOpen(!open);
|
|
4582
4546
|
},
|
|
4583
|
-
className:
|
|
4584
|
-
})))
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
}, /*#__PURE__*/React.createElement(
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4547
|
+
className: "fortune-toolbar-combo-button"
|
|
4548
|
+
})));
|
|
4549
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4550
|
+
ref: buttonRef
|
|
4551
|
+
}, /*#__PURE__*/React.createElement(Popover, {
|
|
4552
|
+
open: open,
|
|
4553
|
+
onOpenChange: setOpen
|
|
4554
|
+
}, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
4555
|
+
asChild: true
|
|
4556
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4557
|
+
className: "flex items-center"
|
|
4558
|
+
}, trigger)), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
4559
|
+
align: "start",
|
|
4560
|
+
side: "bottom",
|
|
4561
|
+
sideOffset: 4,
|
|
4562
|
+
alignOffset: -16,
|
|
4563
|
+
className: "fortune-toolbar-combo-popup border-none"
|
|
4600
4564
|
}, children === null || children === void 0 ? void 0 : children(setOpen))));
|
|
4601
4565
|
};
|
|
4602
4566
|
|
|
@@ -5879,46 +5843,18 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5879
5843
|
if (value === "fmtOtherSelf") {
|
|
5880
5844
|
return /*#__PURE__*/React.createElement(Option, {
|
|
5881
5845
|
key: value,
|
|
5882
|
-
|
|
5883
|
-
return showSubMenu(e, "more-format");
|
|
5884
|
-
},
|
|
5885
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
5886
|
-
return hideSubMenu(e, "more-format");
|
|
5887
|
-
}
|
|
5888
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
5889
|
-
className: "fortune-toolbar-menu-line"
|
|
5890
|
-
}, /*#__PURE__*/React.createElement("div", null, text), /*#__PURE__*/React.createElement(SVGIcon, {
|
|
5891
|
-
name: "rightArrow",
|
|
5892
|
-
width: 16,
|
|
5893
|
-
height: 16
|
|
5894
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
5895
|
-
className: "more-format toolbar-item-sub-menu fortune-toolbar-select",
|
|
5896
|
-
style: {
|
|
5897
|
-
display: "none",
|
|
5898
|
-
width: 150,
|
|
5899
|
-
bottom: 10,
|
|
5900
|
-
top: undefined
|
|
5901
|
-
}
|
|
5902
|
-
}, [{
|
|
5903
|
-
text: toolbarFormat.moreCurrency,
|
|
5904
|
-
onclick: function onclick() {
|
|
5846
|
+
onClick: function onClick() {
|
|
5905
5847
|
showDialog(/*#__PURE__*/React.createElement(FormatSearch, {
|
|
5906
5848
|
onCancel: hideDialog,
|
|
5907
5849
|
type: "currency"
|
|
5908
5850
|
}), undefined, "Currency Format");
|
|
5909
5851
|
setOpen(false);
|
|
5910
5852
|
}
|
|
5911
|
-
}
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
v.onclick();
|
|
5917
|
-
setOpen(false);
|
|
5918
|
-
},
|
|
5919
|
-
tabIndex: 0
|
|
5920
|
-
}, v.text);
|
|
5921
|
-
})));
|
|
5853
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5854
|
+
className: "fortune-toolbar-menu-line"
|
|
5855
|
+
}, /*#__PURE__*/React.createElement("div", null, text), /*#__PURE__*/React.createElement("div", {
|
|
5856
|
+
className: "fortune-toolbar-subtext"
|
|
5857
|
+
}, example)));
|
|
5922
5858
|
}
|
|
5923
5859
|
return /*#__PURE__*/React.createElement(Option, {
|
|
5924
5860
|
key: value,
|
|
@@ -8344,8 +8280,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
8344
8280
|
}
|
|
8345
8281
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8346
8282
|
className: "context-item"
|
|
8347
|
-
}, /*#__PURE__*/React.createElement(
|
|
8348
|
-
name: "
|
|
8283
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8284
|
+
name: "resize-flv",
|
|
8285
|
+
width: 16,
|
|
8286
|
+
height: 16
|
|
8349
8287
|
}), /*#__PURE__*/React.createElement("div", null, "Resize row height", /*#__PURE__*/React.createElement("input", {
|
|
8350
8288
|
onClick: function onClick(e) {
|
|
8351
8289
|
return e.stopPropagation();
|
|
@@ -8379,8 +8317,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
8379
8317
|
}
|
|
8380
8318
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8381
8319
|
className: "context-item"
|
|
8382
|
-
}, /*#__PURE__*/React.createElement(
|
|
8383
|
-
name: "
|
|
8320
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8321
|
+
name: "resize-flv",
|
|
8322
|
+
width: 16,
|
|
8323
|
+
height: 16
|
|
8384
8324
|
}), /*#__PURE__*/React.createElement("div", null, "Resize column width")))) : null;
|
|
8385
8325
|
}
|
|
8386
8326
|
if (name === "clear") {
|
package/dist/index.js
CHANGED
|
@@ -4523,45 +4523,11 @@ var Combo = function Combo(_ref) {
|
|
|
4523
4523
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4524
4524
|
open = _useState2[0],
|
|
4525
4525
|
setOpen = _useState2[1];
|
|
4526
|
-
var _useState3 = React.useState({
|
|
4527
|
-
left: 0
|
|
4528
|
-
}),
|
|
4529
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4530
|
-
popupPosition = _useState4[0],
|
|
4531
|
-
setPopupPosition = _useState4[1];
|
|
4532
|
-
var popupRef = React.useRef(null);
|
|
4533
4526
|
var buttonRef = React.useRef(null);
|
|
4534
4527
|
var isLucideIcon = React.useMemo(function () {
|
|
4535
4528
|
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
|
|
4536
4529
|
}, [iconId]);
|
|
4537
|
-
|
|
4538
|
-
setOpen(false);
|
|
4539
|
-
});
|
|
4540
|
-
React.useLayoutEffect(function () {
|
|
4541
|
-
if (!popupRef.current) {
|
|
4542
|
-
return;
|
|
4543
|
-
}
|
|
4544
|
-
if (!open) {
|
|
4545
|
-
setPopupPosition({
|
|
4546
|
-
left: 0
|
|
4547
|
-
});
|
|
4548
|
-
}
|
|
4549
|
-
var winW = window.innerWidth;
|
|
4550
|
-
var rect = popupRef.current.getBoundingClientRect();
|
|
4551
|
-
var menuW = rect.width;
|
|
4552
|
-
var left = rect.left;
|
|
4553
|
-
if (left + menuW > winW) {
|
|
4554
|
-
setPopupPosition({
|
|
4555
|
-
left: -rect.width + buttonRef.current.clientWidth
|
|
4556
|
-
});
|
|
4557
|
-
}
|
|
4558
|
-
}, [open]);
|
|
4559
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4560
|
-
className: "fortune-toobar-combo-container fortune-toolbar-item"
|
|
4561
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4562
|
-
ref: buttonRef,
|
|
4563
|
-
className: "fortune-toolbar-combo"
|
|
4564
|
-
}, !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(ui.Tooltip, {
|
|
4530
|
+
var trigger = !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(ui.Tooltip, {
|
|
4565
4531
|
text: tooltip,
|
|
4566
4532
|
placement: "bottom"
|
|
4567
4533
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -4570,8 +4536,6 @@ var Combo = function Combo(_ref) {
|
|
|
4570
4536
|
if (_onClick) {
|
|
4571
4537
|
_onClick(e);
|
|
4572
4538
|
if (!showArrow) setOpen(!open);
|
|
4573
|
-
} else {
|
|
4574
|
-
setOpen(!open);
|
|
4575
4539
|
}
|
|
4576
4540
|
},
|
|
4577
4541
|
tabIndex: 0,
|
|
@@ -4592,23 +4556,23 @@ var Combo = function Combo(_ref) {
|
|
|
4592
4556
|
onClick: function onClick() {
|
|
4593
4557
|
return setOpen(!open);
|
|
4594
4558
|
},
|
|
4595
|
-
className:
|
|
4596
|
-
})))
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4559
|
+
className: "fortune-toolbar-combo-button"
|
|
4560
|
+
})));
|
|
4561
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4562
|
+
ref: buttonRef
|
|
4563
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Popover, {
|
|
4564
|
+
open: open,
|
|
4565
|
+
onOpenChange: setOpen
|
|
4566
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.PopoverTrigger, {
|
|
4567
|
+
asChild: true
|
|
4568
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4569
|
+
className: "flex items-center"
|
|
4570
|
+
}, trigger)), /*#__PURE__*/React__default['default'].createElement(ui.PopoverContent, {
|
|
4571
|
+
align: "start",
|
|
4572
|
+
side: "bottom",
|
|
4573
|
+
sideOffset: 4,
|
|
4574
|
+
alignOffset: -16,
|
|
4575
|
+
className: "fortune-toolbar-combo-popup border-none"
|
|
4612
4576
|
}, children === null || children === void 0 ? void 0 : children(setOpen))));
|
|
4613
4577
|
};
|
|
4614
4578
|
|
|
@@ -5891,46 +5855,18 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5891
5855
|
if (value === "fmtOtherSelf") {
|
|
5892
5856
|
return /*#__PURE__*/React__default['default'].createElement(Option, {
|
|
5893
5857
|
key: value,
|
|
5894
|
-
|
|
5895
|
-
return showSubMenu(e, "more-format");
|
|
5896
|
-
},
|
|
5897
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
5898
|
-
return hideSubMenu(e, "more-format");
|
|
5899
|
-
}
|
|
5900
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5901
|
-
className: "fortune-toolbar-menu-line"
|
|
5902
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", null, text), /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
5903
|
-
name: "rightArrow",
|
|
5904
|
-
width: 16,
|
|
5905
|
-
height: 16
|
|
5906
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5907
|
-
className: "more-format toolbar-item-sub-menu fortune-toolbar-select",
|
|
5908
|
-
style: {
|
|
5909
|
-
display: "none",
|
|
5910
|
-
width: 150,
|
|
5911
|
-
bottom: 10,
|
|
5912
|
-
top: undefined
|
|
5913
|
-
}
|
|
5914
|
-
}, [{
|
|
5915
|
-
text: toolbarFormat.moreCurrency,
|
|
5916
|
-
onclick: function onclick() {
|
|
5858
|
+
onClick: function onClick() {
|
|
5917
5859
|
showDialog(/*#__PURE__*/React__default['default'].createElement(FormatSearch, {
|
|
5918
5860
|
onCancel: hideDialog,
|
|
5919
5861
|
type: "currency"
|
|
5920
5862
|
}), undefined, "Currency Format");
|
|
5921
5863
|
setOpen(false);
|
|
5922
5864
|
}
|
|
5923
|
-
}].
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
v.onclick();
|
|
5929
|
-
setOpen(false);
|
|
5930
|
-
},
|
|
5931
|
-
tabIndex: 0
|
|
5932
|
-
}, v.text);
|
|
5933
|
-
})));
|
|
5865
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5866
|
+
className: "fortune-toolbar-menu-line"
|
|
5867
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, text), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5868
|
+
className: "fortune-toolbar-subtext"
|
|
5869
|
+
}, example)));
|
|
5934
5870
|
}
|
|
5935
5871
|
return /*#__PURE__*/React__default['default'].createElement(Option, {
|
|
5936
5872
|
key: value,
|
|
@@ -8356,8 +8292,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
8356
8292
|
}
|
|
8357
8293
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
8358
8294
|
className: "context-item"
|
|
8359
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
8360
|
-
name: "
|
|
8295
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
8296
|
+
name: "resize-flv",
|
|
8297
|
+
width: 16,
|
|
8298
|
+
height: 16
|
|
8361
8299
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, "Resize row height", /*#__PURE__*/React__default['default'].createElement("input", {
|
|
8362
8300
|
onClick: function onClick(e) {
|
|
8363
8301
|
return e.stopPropagation();
|
|
@@ -8391,8 +8329,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
8391
8329
|
}
|
|
8392
8330
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
8393
8331
|
className: "context-item"
|
|
8394
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
8395
|
-
name: "
|
|
8332
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
8333
|
+
name: "resize-flv",
|
|
8334
|
+
width: 16,
|
|
8335
|
+
height: 16
|
|
8396
8336
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, "Resize column width")))) : null;
|
|
8397
8337
|
}
|
|
8398
8338
|
if (name === "clear") {
|
package/dist/index.umd.css
CHANGED
|
@@ -2358,11 +2358,8 @@ input[type="number"].condition-rules-project-input {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
|
|
2360
2360
|
.fortune-toolbar-combo-popup {
|
|
2361
|
-
position: absolute;
|
|
2362
2361
|
white-space: nowrap;
|
|
2363
|
-
|
|
2364
|
-
left: 0;
|
|
2365
|
-
z-index: 1004;
|
|
2362
|
+
max-width: 240px;
|
|
2366
2363
|
}
|
|
2367
2364
|
|
|
2368
2365
|
.fortune-toolbar-select::-webkit-scrollbar {
|
package/dist/index.umd.js
CHANGED
|
@@ -79969,7 +79969,37 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
79969
79969
|
}
|
|
79970
79970
|
var zh$1 = _h, Xs = "Popover", [Ph, PLe] = ct(Xs, [
|
|
79971
79971
|
I1
|
|
79972
|
-
]), lo = I1(), [yme, _1] = Ph(Xs)
|
|
79972
|
+
]), lo = I1(), [yme, _1] = Ph(Xs), Eh = (e) => {
|
|
79973
|
+
const {
|
|
79974
|
+
__scopePopover: t,
|
|
79975
|
+
children: n,
|
|
79976
|
+
open: a,
|
|
79977
|
+
defaultOpen: o,
|
|
79978
|
+
onOpenChange: r,
|
|
79979
|
+
modal: s = !1
|
|
79980
|
+
} = e, c = lo(t), f = React.useRef(null), [l, u] = React.useState(!1), [h = !1, p] = vt({
|
|
79981
|
+
prop: a,
|
|
79982
|
+
defaultProp: o,
|
|
79983
|
+
onChange: r
|
|
79984
|
+
});
|
|
79985
|
+
return /* @__PURE__ */ d$1.jsx(Or, { ...c, children: /* @__PURE__ */ d$1.jsx(
|
|
79986
|
+
yme,
|
|
79987
|
+
{
|
|
79988
|
+
scope: t,
|
|
79989
|
+
contentId: Qe(),
|
|
79990
|
+
triggerRef: f,
|
|
79991
|
+
open: h,
|
|
79992
|
+
onOpenChange: p,
|
|
79993
|
+
onOpenToggle: React.useCallback(() => p((m) => !m), [p]),
|
|
79994
|
+
hasCustomAnchor: l,
|
|
79995
|
+
onCustomAnchorAdd: React.useCallback(() => u(!0), []),
|
|
79996
|
+
onCustomAnchorRemove: React.useCallback(() => u(!1), []),
|
|
79997
|
+
modal: s,
|
|
79998
|
+
children: n
|
|
79999
|
+
}
|
|
80000
|
+
) });
|
|
80001
|
+
};
|
|
80002
|
+
Eh.displayName = Xs;
|
|
79973
80003
|
var Hh = "PopoverAnchor", Rh = React.forwardRef(
|
|
79974
80004
|
(e, t) => {
|
|
79975
80005
|
const { __scopePopover: n, ...a } = e, o = _1(Hh, n), r = lo(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
|
|
@@ -80147,7 +80177,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
80147
80177
|
function Gh(e) {
|
|
80148
80178
|
return e ? "open" : "closed";
|
|
80149
80179
|
}
|
|
80150
|
-
var jme = qh, Yh = Bh, tc = "Radio", [Nme, $h] = ct(tc), [Ame, Sme] = Nme(tc), Uh = React.forwardRef(
|
|
80180
|
+
var xme = Eh, bme = Oh, jme = qh, Yh = Bh, tc = "Radio", [Nme, $h] = ct(tc), [Ame, Sme] = Nme(tc), Uh = React.forwardRef(
|
|
80151
80181
|
(e, t) => {
|
|
80152
80182
|
const {
|
|
80153
80183
|
__scopeRadio: n,
|
|
@@ -83815,7 +83845,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
83815
83845
|
}
|
|
83816
83846
|
));
|
|
83817
83847
|
oge.displayName = fo.displayName;
|
|
83818
|
-
const mi = React.forwardRef(
|
|
83848
|
+
const gc = xme, Mc = bme, mi = React.forwardRef(
|
|
83819
83849
|
({ className: e, align: t = "center", sideOffset: n = 4, elevation: a, container: o, ...r }, s) => /* @__PURE__ */ d$1.jsx(jme, { container: o, children: /* @__PURE__ */ d$1.jsx(
|
|
83820
83850
|
Yh,
|
|
83821
83851
|
{
|
|
@@ -108410,45 +108440,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
108410
108440
|
_useState2 = _slicedToArray(_useState, 2),
|
|
108411
108441
|
open = _useState2[0],
|
|
108412
108442
|
setOpen = _useState2[1];
|
|
108413
|
-
var _useState3 = React.useState({
|
|
108414
|
-
left: 0
|
|
108415
|
-
}),
|
|
108416
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
108417
|
-
popupPosition = _useState4[0],
|
|
108418
|
-
setPopupPosition = _useState4[1];
|
|
108419
|
-
var popupRef = React.useRef(null);
|
|
108420
108443
|
var buttonRef = React.useRef(null);
|
|
108421
108444
|
var isLucideIcon = React.useMemo(function () {
|
|
108422
108445
|
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
|
|
108423
108446
|
}, [iconId]);
|
|
108424
|
-
|
|
108425
|
-
setOpen(false);
|
|
108426
|
-
});
|
|
108427
|
-
React.useLayoutEffect(function () {
|
|
108428
|
-
if (!popupRef.current) {
|
|
108429
|
-
return;
|
|
108430
|
-
}
|
|
108431
|
-
if (!open) {
|
|
108432
|
-
setPopupPosition({
|
|
108433
|
-
left: 0
|
|
108434
|
-
});
|
|
108435
|
-
}
|
|
108436
|
-
var winW = window.innerWidth;
|
|
108437
|
-
var rect = popupRef.current.getBoundingClientRect();
|
|
108438
|
-
var menuW = rect.width;
|
|
108439
|
-
var left = rect.left;
|
|
108440
|
-
if (left + menuW > winW) {
|
|
108441
|
-
setPopupPosition({
|
|
108442
|
-
left: -rect.width + buttonRef.current.clientWidth
|
|
108443
|
-
});
|
|
108444
|
-
}
|
|
108445
|
-
}, [open]);
|
|
108446
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
108447
|
-
className: "fortune-toobar-combo-container fortune-toolbar-item"
|
|
108448
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
108449
|
-
ref: buttonRef,
|
|
108450
|
-
className: "fortune-toolbar-combo"
|
|
108451
|
-
}, !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(Ts, {
|
|
108447
|
+
var trigger = !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(Ts, {
|
|
108452
108448
|
text: tooltip,
|
|
108453
108449
|
placement: "bottom"
|
|
108454
108450
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -108457,8 +108453,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
108457
108453
|
if (_onClick) {
|
|
108458
108454
|
_onClick(e);
|
|
108459
108455
|
if (!showArrow) setOpen(!open);
|
|
108460
|
-
} else {
|
|
108461
|
-
setOpen(!open);
|
|
108462
108456
|
}
|
|
108463
108457
|
},
|
|
108464
108458
|
tabIndex: 0,
|
|
@@ -108479,23 +108473,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
108479
108473
|
onClick: function onClick() {
|
|
108480
108474
|
return setOpen(!open);
|
|
108481
108475
|
},
|
|
108482
|
-
className:
|
|
108483
|
-
})))
|
|
108484
|
-
|
|
108485
|
-
|
|
108486
|
-
|
|
108487
|
-
|
|
108488
|
-
|
|
108489
|
-
|
|
108490
|
-
|
|
108491
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
108492
|
-
|
|
108493
|
-
|
|
108494
|
-
|
|
108495
|
-
|
|
108496
|
-
|
|
108497
|
-
|
|
108498
|
-
|
|
108476
|
+
className: "fortune-toolbar-combo-button"
|
|
108477
|
+
})));
|
|
108478
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
108479
|
+
ref: buttonRef
|
|
108480
|
+
}, /*#__PURE__*/React__default['default'].createElement(gc, {
|
|
108481
|
+
open: open,
|
|
108482
|
+
onOpenChange: setOpen
|
|
108483
|
+
}, /*#__PURE__*/React__default['default'].createElement(Mc, {
|
|
108484
|
+
asChild: true
|
|
108485
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
108486
|
+
className: "flex items-center"
|
|
108487
|
+
}, trigger)), /*#__PURE__*/React__default['default'].createElement(mi, {
|
|
108488
|
+
align: "start",
|
|
108489
|
+
side: "bottom",
|
|
108490
|
+
sideOffset: 4,
|
|
108491
|
+
alignOffset: -16,
|
|
108492
|
+
className: "fortune-toolbar-combo-popup border-none"
|
|
108499
108493
|
}, children === null || children === void 0 ? void 0 : children(setOpen))));
|
|
108500
108494
|
};
|
|
108501
108495
|
|
|
@@ -109778,46 +109772,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
109778
109772
|
if (value === "fmtOtherSelf") {
|
|
109779
109773
|
return /*#__PURE__*/React__default['default'].createElement(Option, {
|
|
109780
109774
|
key: value,
|
|
109781
|
-
|
|
109782
|
-
return showSubMenu(e, "more-format");
|
|
109783
|
-
},
|
|
109784
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
109785
|
-
return hideSubMenu(e, "more-format");
|
|
109786
|
-
}
|
|
109787
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
109788
|
-
className: "fortune-toolbar-menu-line"
|
|
109789
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", null, text), /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
109790
|
-
name: "rightArrow",
|
|
109791
|
-
width: 16,
|
|
109792
|
-
height: 16
|
|
109793
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
109794
|
-
className: "more-format toolbar-item-sub-menu fortune-toolbar-select",
|
|
109795
|
-
style: {
|
|
109796
|
-
display: "none",
|
|
109797
|
-
width: 150,
|
|
109798
|
-
bottom: 10,
|
|
109799
|
-
top: undefined
|
|
109800
|
-
}
|
|
109801
|
-
}, [{
|
|
109802
|
-
text: toolbarFormat.moreCurrency,
|
|
109803
|
-
onclick: function onclick() {
|
|
109775
|
+
onClick: function onClick() {
|
|
109804
109776
|
showDialog(/*#__PURE__*/React__default['default'].createElement(FormatSearch, {
|
|
109805
109777
|
onCancel: hideDialog,
|
|
109806
109778
|
type: "currency"
|
|
109807
109779
|
}), undefined, "Currency Format");
|
|
109808
109780
|
setOpen(false);
|
|
109809
109781
|
}
|
|
109810
|
-
}].
|
|
109811
|
-
|
|
109812
|
-
|
|
109813
|
-
|
|
109814
|
-
|
|
109815
|
-
v.onclick();
|
|
109816
|
-
setOpen(false);
|
|
109817
|
-
},
|
|
109818
|
-
tabIndex: 0
|
|
109819
|
-
}, v.text);
|
|
109820
|
-
})));
|
|
109782
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
109783
|
+
className: "fortune-toolbar-menu-line"
|
|
109784
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, text), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
109785
|
+
className: "fortune-toolbar-subtext"
|
|
109786
|
+
}, example)));
|
|
109821
109787
|
}
|
|
109822
109788
|
return /*#__PURE__*/React__default['default'].createElement(Option, {
|
|
109823
109789
|
key: value,
|
|
@@ -116825,8 +116791,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
116825
116791
|
}
|
|
116826
116792
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
116827
116793
|
className: "context-item"
|
|
116828
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
116829
|
-
name: "
|
|
116794
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
116795
|
+
name: "resize-flv",
|
|
116796
|
+
width: 16,
|
|
116797
|
+
height: 16
|
|
116830
116798
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, "Resize row height", /*#__PURE__*/React__default['default'].createElement("input", {
|
|
116831
116799
|
onClick: function onClick(e) {
|
|
116832
116800
|
return e.stopPropagation();
|
|
@@ -116860,8 +116828,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
116860
116828
|
}
|
|
116861
116829
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
116862
116830
|
className: "context-item"
|
|
116863
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
116864
|
-
name: "
|
|
116831
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
116832
|
+
name: "resize-flv",
|
|
116833
|
+
width: 16,
|
|
116834
|
+
height: 16
|
|
116865
116835
|
}), /*#__PURE__*/React__default['default'].createElement("div", null, "Resize column width")))) : null;
|
|
116866
116836
|
}
|
|
116867
116837
|
if (name === "clear") {
|