@fileverse-dev/fortune-react 1.0.2-mod-35 → 1.0.2-mod-36
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/components/Toolbar/index.d.ts +1 -0
- package/dist/index.css +31 -15
- package/dist/index.esm.css +31 -15
- package/dist/index.esm.js +243 -281
- package/dist/index.js +242 -280
- package/dist/index.umd.css +31 -15
- package/dist/index.umd.js +7170 -5257
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +9 -9
- package/dist/utils/datepickerStyles.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder,
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
|
|
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';
|
|
@@ -172,7 +172,7 @@ function _regenerator() {
|
|
|
172
172
|
i = p[t],
|
|
173
173
|
d = G.p,
|
|
174
174
|
l = i[2];
|
|
175
|
-
r > 3 ? (o = l === n) && (
|
|
175
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
176
176
|
}
|
|
177
177
|
if (o || r > 1) return a;
|
|
178
178
|
throw y = !0, n;
|
|
@@ -2559,8 +2559,18 @@ function useDialog() {
|
|
|
2559
2559
|
};
|
|
2560
2560
|
}
|
|
2561
2561
|
|
|
2562
|
+
var datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
|
|
2563
|
+
var injectDatepickerStyles = function injectDatepickerStyles() {
|
|
2564
|
+
if (typeof document !== "undefined") {
|
|
2565
|
+
var styleSheet = document.createElement("style");
|
|
2566
|
+
styleSheet.textContent = datepickerStyles;
|
|
2567
|
+
document.head.appendChild(styleSheet);
|
|
2568
|
+
}
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
injectDatepickerStyles();
|
|
2562
2572
|
var DataVerification = function DataVerification() {
|
|
2563
|
-
var _context$dataVerifica, _context$dataVerifica2, _context$dataVerifica3, _context$dataVerifica4, _context$dataVerifica5, _context$dataVerifica6, _context$dataVerifica7, _context$dataVerifica8, _context$dataVerifica9, _context$dataVerifica0, _context$dataVerifica1, _context$dataVerifica10, _context$dataVerifica11
|
|
2573
|
+
var _context$dataVerifica, _context$dataVerifica2, _context$dataVerifica3, _context$dataVerifica4, _context$dataVerifica5, _context$dataVerifica6, _context$dataVerifica7, _context$dataVerifica8, _context$dataVerifica9, _context$dataVerifica0, _context$dataVerifica1, _context$dataVerifica10, _context$dataVerifica11;
|
|
2564
2574
|
var _useContext = useContext(WorkbookContext),
|
|
2565
2575
|
context = _useContext.context,
|
|
2566
2576
|
setContext = _useContext.setContext;
|
|
@@ -2569,15 +2579,11 @@ var DataVerification = function DataVerification() {
|
|
|
2569
2579
|
hideDialog = _useDialog.hideDialog;
|
|
2570
2580
|
var _locale = locale(context),
|
|
2571
2581
|
dataVerification = _locale.dataVerification,
|
|
2572
|
-
toolbar = _locale.toolbar,
|
|
2573
2582
|
button = _locale.button,
|
|
2574
2583
|
generalDialog = _locale.generalDialog;
|
|
2575
|
-
var _useState = useState(["between", "notBetween", "equal", "notEqualTo", "
|
|
2584
|
+
var _useState = useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
|
|
2576
2585
|
_useState2 = _slicedToArray(_useState, 1),
|
|
2577
|
-
|
|
2578
|
-
var _useState3 = useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
|
|
2579
|
-
_useState4 = _slicedToArray(_useState3, 1),
|
|
2580
|
-
dateCondition = _useState4[0];
|
|
2586
|
+
dateCondition = _useState2[0];
|
|
2581
2587
|
var dataSelectRange = useCallback(function (type, value) {
|
|
2582
2588
|
hideDialog();
|
|
2583
2589
|
setContext(function (ctx) {
|
|
@@ -2712,48 +2718,36 @@ var DataVerification = function DataVerification() {
|
|
|
2712
2718
|
return /*#__PURE__*/React.createElement("div", {
|
|
2713
2719
|
id: "fortune-data-verification"
|
|
2714
2720
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2715
|
-
className: "
|
|
2716
|
-
}, toolbar.dataVerification), /*#__PURE__*/React.createElement("div", {
|
|
2717
|
-
className: "box"
|
|
2721
|
+
className: "flex flex-col gap-4"
|
|
2718
2722
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2719
|
-
className: "
|
|
2720
|
-
style: {
|
|
2721
|
-
borderTop: "1px solid #E1E4E8"
|
|
2722
|
-
}
|
|
2723
|
+
className: "flex flex-col"
|
|
2723
2724
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2724
|
-
className: "
|
|
2725
|
-
}, dataVerification.cellRange), /*#__PURE__*/React.createElement(
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2725
|
+
className: "text-heading-xsm mb-2"
|
|
2726
|
+
}, dataVerification.cellRange), /*#__PURE__*/React.createElement(TextField, {
|
|
2727
|
+
rightIcon: /*#__PURE__*/React.createElement(LucideIcon, {
|
|
2728
|
+
name: "Grid2x2",
|
|
2729
|
+
size: "sm"
|
|
2730
|
+
}),
|
|
2731
|
+
"aria-hidden": "true",
|
|
2732
|
+
readOnly: true,
|
|
2730
2733
|
value: (_context$dataVerifica = context.dataVerification.dataRegulation) === null || _context$dataVerifica === void 0 ? void 0 : _context$dataVerifica.rangeTxt,
|
|
2731
2734
|
onChange: function onChange(e) {
|
|
2732
2735
|
var value = e.target.value;
|
|
2733
2736
|
setContext(function (ctx) {
|
|
2734
2737
|
ctx.dataVerification.dataRegulation.rangeTxt = value;
|
|
2735
2738
|
});
|
|
2736
|
-
}
|
|
2737
|
-
}), /*#__PURE__*/React.createElement("i", {
|
|
2738
|
-
className: "icon",
|
|
2739
|
-
"aria-hidden": "true",
|
|
2739
|
+
},
|
|
2740
2740
|
onClick: function onClick() {
|
|
2741
2741
|
hideDialog();
|
|
2742
2742
|
dataSelectRange("rangeTxt", context.dataVerification.dataRegulation.value1);
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
name: "tab",
|
|
2747
|
-
width: 18
|
|
2748
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
2749
|
-
className: "box-item"
|
|
2743
|
+
}
|
|
2744
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2745
|
+
className: "flex flex-col"
|
|
2750
2746
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2751
|
-
className: "
|
|
2752
|
-
}, dataVerification.verificationCondition), /*#__PURE__*/React.createElement(
|
|
2753
|
-
className: "data-verification-type-select",
|
|
2747
|
+
className: "text-heading-xsm mb-2"
|
|
2748
|
+
}, dataVerification.verificationCondition), /*#__PURE__*/React.createElement(Select$1, {
|
|
2754
2749
|
value: context.dataVerification.dataRegulation.type,
|
|
2755
|
-
|
|
2756
|
-
var value = e.target.value;
|
|
2750
|
+
onValueChange: function onValueChange(value) {
|
|
2757
2751
|
setContext(function (ctx) {
|
|
2758
2752
|
ctx.dataVerification.dataRegulation.type = value;
|
|
2759
2753
|
if (value === "dropdown" || value === "checkbox") {
|
|
@@ -2769,18 +2763,14 @@ var DataVerification = function DataVerification() {
|
|
|
2769
2763
|
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2770
2764
|
});
|
|
2771
2765
|
}
|
|
2772
|
-
},
|
|
2773
|
-
return /*#__PURE__*/React.createElement(
|
|
2766
|
+
}, /*#__PURE__*/React.createElement(SelectTrigger, null, /*#__PURE__*/React.createElement(SelectValue, null)), /*#__PURE__*/React.createElement(SelectContent, null, ["dropdown", "checkbox", "date"].map(function (v) {
|
|
2767
|
+
return /*#__PURE__*/React.createElement(SelectItem$1, {
|
|
2774
2768
|
value: v,
|
|
2775
2769
|
key: v
|
|
2776
2770
|
}, dataVerification[v]);
|
|
2777
|
-
})), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && (/*#__PURE__*/React.createElement("div", {
|
|
2778
|
-
className: "
|
|
2779
|
-
}, /*#__PURE__*/React.createElement(
|
|
2780
|
-
className: "data-verification-range"
|
|
2781
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
2782
|
-
className: "formulaInputFocus",
|
|
2783
|
-
spellCheck: "false",
|
|
2771
|
+
}))), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && (/*#__PURE__*/React.createElement("div", {
|
|
2772
|
+
className: "mt-4"
|
|
2773
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
2784
2774
|
value: context.dataVerification.dataRegulation.value1,
|
|
2785
2775
|
placeholder: dataVerification.placeholder1,
|
|
2786
2776
|
onChange: function onChange(e) {
|
|
@@ -2789,39 +2779,28 @@ var DataVerification = function DataVerification() {
|
|
|
2789
2779
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2790
2780
|
});
|
|
2791
2781
|
}
|
|
2792
|
-
}), /*#__PURE__*/React.createElement("
|
|
2793
|
-
className: "
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
return dataSelectRange("dropDown", context.dataVerification.dataRegulation.value1);
|
|
2797
|
-
},
|
|
2798
|
-
tabIndex: 0
|
|
2799
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
2800
|
-
name: "tab",
|
|
2801
|
-
width: 18
|
|
2802
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2803
|
-
className: "check"
|
|
2804
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
2805
|
-
type: "checkbox",
|
|
2782
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2783
|
+
className: "mt-4 flex items-center"
|
|
2784
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
2785
|
+
className: "border-2",
|
|
2806
2786
|
checked: context.dataVerification.dataRegulation.type2 === "true",
|
|
2807
|
-
|
|
2808
|
-
onChange: function onChange(e) {
|
|
2787
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
2809
2788
|
var checked = e.target.checked;
|
|
2810
2789
|
setContext(function (ctx) {
|
|
2811
2790
|
ctx.dataVerification.dataRegulation.type2 = "".concat(checked);
|
|
2812
2791
|
});
|
|
2813
2792
|
}
|
|
2814
|
-
}), /*#__PURE__*/React.createElement("
|
|
2815
|
-
|
|
2793
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2794
|
+
className: "ml-2"
|
|
2816
2795
|
}, dataVerification.allowMultiSelect)))), ((_context$dataVerifica4 = context.dataVerification) === null || _context$dataVerifica4 === void 0 ? void 0 : (_context$dataVerifica5 = _context$dataVerifica4.dataRegulation) === null || _context$dataVerifica5 === void 0 ? void 0 : _context$dataVerifica5.type) === "checkbox" && (/*#__PURE__*/React.createElement("div", {
|
|
2817
|
-
className: "
|
|
2796
|
+
className: "mt-4 space-y-2"
|
|
2818
2797
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2819
|
-
className: "
|
|
2820
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
placeholder: dataVerification.placeholder2,
|
|
2798
|
+
className: "flex items-center gap-2"
|
|
2799
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2800
|
+
className: "data-verification-checkbox-label"
|
|
2801
|
+
}, dataVerification.selected), /*#__PURE__*/React.createElement(TextField, {
|
|
2824
2802
|
value: (_context$dataVerifica6 = context.dataVerification) === null || _context$dataVerifica6 === void 0 ? void 0 : (_context$dataVerifica7 = _context$dataVerifica6.dataRegulation) === null || _context$dataVerifica7 === void 0 ? void 0 : _context$dataVerifica7.value1,
|
|
2803
|
+
placeholder: dataVerification.placeholder2,
|
|
2825
2804
|
onChange: function onChange(e) {
|
|
2826
2805
|
var value = e.target.value;
|
|
2827
2806
|
setContext(function (ctx) {
|
|
@@ -2829,129 +2808,41 @@ var DataVerification = function DataVerification() {
|
|
|
2829
2808
|
});
|
|
2830
2809
|
}
|
|
2831
2810
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2832
|
-
className: "
|
|
2833
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
placeholder: dataVerification.placeholder2,
|
|
2811
|
+
className: "flex items-center gap-2"
|
|
2812
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2813
|
+
className: "data-verification-checkbox-label"
|
|
2814
|
+
}, dataVerification.notSelected), /*#__PURE__*/React.createElement(TextField, {
|
|
2837
2815
|
value: (_context$dataVerifica8 = context.dataVerification) === null || _context$dataVerifica8 === void 0 ? void 0 : (_context$dataVerifica9 = _context$dataVerifica8.dataRegulation) === null || _context$dataVerifica9 === void 0 ? void 0 : _context$dataVerifica9.value2,
|
|
2816
|
+
placeholder: dataVerification.placeholder2,
|
|
2838
2817
|
onChange: function onChange(e) {
|
|
2839
2818
|
var value = e.target.value;
|
|
2840
2819
|
setContext(function (ctx) {
|
|
2841
2820
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2842
2821
|
});
|
|
2843
2822
|
}
|
|
2844
|
-
})))), ((
|
|
2845
|
-
className: "
|
|
2846
|
-
}, /*#__PURE__*/React.createElement(
|
|
2847
|
-
className: "data-verification-type-select",
|
|
2848
|
-
value: context.dataVerification.dataRegulation.type2,
|
|
2849
|
-
onChange: function onChange(e) {
|
|
2850
|
-
var value = e.target.value;
|
|
2851
|
-
setContext(function (ctx) {
|
|
2852
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2853
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2854
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2855
|
-
});
|
|
2856
|
-
}
|
|
2857
|
-
}, numberCondition.map(function (v) {
|
|
2858
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
2859
|
-
value: v,
|
|
2860
|
-
key: v
|
|
2861
|
-
}, dataVerification[v]);
|
|
2862
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
|
|
2863
|
-
className: "input-box"
|
|
2864
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
2865
|
-
type: "number",
|
|
2866
|
-
placeholder: "1",
|
|
2867
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2868
|
-
onChange: function onChange(e) {
|
|
2869
|
-
var value = e.target.value;
|
|
2870
|
-
setContext(function (ctx) {
|
|
2871
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2872
|
-
});
|
|
2873
|
-
}
|
|
2874
|
-
}), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("input", {
|
|
2875
|
-
type: "number",
|
|
2876
|
-
placeholder: "100",
|
|
2877
|
-
value: context.dataVerification.dataRegulation.value2,
|
|
2878
|
-
onChange: function onChange(e) {
|
|
2879
|
-
var value = e.target.value;
|
|
2880
|
-
setContext(function (ctx) {
|
|
2881
|
-
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2882
|
-
});
|
|
2883
|
-
}
|
|
2884
|
-
}))) : (/*#__PURE__*/React.createElement("div", {
|
|
2885
|
-
className: "input-box"
|
|
2886
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
2887
|
-
type: "number",
|
|
2888
|
-
style: {
|
|
2889
|
-
width: "100%"
|
|
2890
|
-
},
|
|
2891
|
-
placeholder: dataVerification.placeholder3,
|
|
2892
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2893
|
-
onChange: function onChange(e) {
|
|
2894
|
-
var value = e.target.value;
|
|
2895
|
-
setContext(function (ctx) {
|
|
2896
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2897
|
-
});
|
|
2898
|
-
}
|
|
2899
|
-
}))))), ((_context$dataVerifica16 = context.dataVerification) === null || _context$dataVerifica16 === void 0 ? void 0 : (_context$dataVerifica17 = _context$dataVerifica16.dataRegulation) === null || _context$dataVerifica17 === void 0 ? void 0 : _context$dataVerifica17.type) === "text_content" && (/*#__PURE__*/React.createElement("div", {
|
|
2900
|
-
className: "show-box-item"
|
|
2901
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
2902
|
-
className: "data-verification-type-select",
|
|
2823
|
+
})))), ((_context$dataVerifica0 = context.dataVerification) === null || _context$dataVerifica0 === void 0 ? void 0 : (_context$dataVerifica1 = _context$dataVerifica0.dataRegulation) === null || _context$dataVerifica1 === void 0 ? void 0 : _context$dataVerifica1.type) === "date" && (/*#__PURE__*/React.createElement("div", {
|
|
2824
|
+
className: "mt-4"
|
|
2825
|
+
}, /*#__PURE__*/React.createElement(Select$1, {
|
|
2903
2826
|
value: context.dataVerification.dataRegulation.type2,
|
|
2904
|
-
|
|
2905
|
-
var value = e.target.value;
|
|
2906
|
-
setContext(function (ctx) {
|
|
2907
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2908
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2909
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2910
|
-
});
|
|
2911
|
-
}
|
|
2912
|
-
}, ["include", "exclude", "equal"].map(function (v) {
|
|
2913
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
2914
|
-
value: v,
|
|
2915
|
-
key: v
|
|
2916
|
-
}, dataVerification[v]);
|
|
2917
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
2918
|
-
className: "input-box"
|
|
2919
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
2920
|
-
type: "text",
|
|
2921
|
-
style: {
|
|
2922
|
-
width: "100%"
|
|
2923
|
-
},
|
|
2924
|
-
placeholder: dataVerification.placeholder4,
|
|
2925
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2926
|
-
onChange: function onChange(e) {
|
|
2927
|
-
var value = e.target.value;
|
|
2928
|
-
setContext(function (ctx) {
|
|
2929
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
2932
|
-
})))), ((_context$dataVerifica18 = context.dataVerification) === null || _context$dataVerifica18 === void 0 ? void 0 : (_context$dataVerifica19 = _context$dataVerifica18.dataRegulation) === null || _context$dataVerifica19 === void 0 ? void 0 : _context$dataVerifica19.type) === "date" && (/*#__PURE__*/React.createElement("div", {
|
|
2933
|
-
className: "show-box-item"
|
|
2934
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
2935
|
-
className: "data-verification-type-select",
|
|
2936
|
-
value: context.dataVerification.dataRegulation.type2,
|
|
2937
|
-
onChange: function onChange(e) {
|
|
2938
|
-
var value = e.target.value;
|
|
2827
|
+
onValueChange: function onValueChange(value) {
|
|
2939
2828
|
setContext(function (ctx) {
|
|
2940
2829
|
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2941
2830
|
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2942
2831
|
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2943
2832
|
});
|
|
2944
2833
|
}
|
|
2945
|
-
}, dateCondition.map(function (v) {
|
|
2946
|
-
return /*#__PURE__*/React.createElement(
|
|
2834
|
+
}, /*#__PURE__*/React.createElement(SelectTrigger, null, /*#__PURE__*/React.createElement(SelectValue, null)), /*#__PURE__*/React.createElement(SelectContent, null, dateCondition.map(function (v) {
|
|
2835
|
+
return /*#__PURE__*/React.createElement(SelectItem$1, {
|
|
2947
2836
|
value: v,
|
|
2948
2837
|
key: v
|
|
2949
2838
|
}, dataVerification[v]);
|
|
2950
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
|
|
2951
|
-
className: "
|
|
2839
|
+
}))), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
|
|
2840
|
+
className: "mt-4 flex gap-2 items-center"
|
|
2841
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2842
|
+
className: "datepicker-toggle"
|
|
2952
2843
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2953
2844
|
type: "date",
|
|
2954
|
-
|
|
2845
|
+
className: "datepicker-input",
|
|
2955
2846
|
value: context.dataVerification.dataRegulation.value1,
|
|
2956
2847
|
onChange: function onChange(e) {
|
|
2957
2848
|
var value = e.target.value;
|
|
@@ -2959,9 +2850,13 @@ var DataVerification = function DataVerification() {
|
|
|
2959
2850
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2960
2851
|
});
|
|
2961
2852
|
}
|
|
2962
|
-
}), /*#__PURE__*/React.createElement("span",
|
|
2853
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2854
|
+
className: "datepicker-toggle-button"
|
|
2855
|
+
})), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("div", {
|
|
2856
|
+
className: "datepicker-toggle"
|
|
2857
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
2963
2858
|
type: "date",
|
|
2964
|
-
|
|
2859
|
+
className: "datepicker-input",
|
|
2965
2860
|
value: context.dataVerification.dataRegulation.value2,
|
|
2966
2861
|
onChange: function onChange(e) {
|
|
2967
2862
|
var value = e.target.value;
|
|
@@ -2969,13 +2864,15 @@ var DataVerification = function DataVerification() {
|
|
|
2969
2864
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2970
2865
|
});
|
|
2971
2866
|
}
|
|
2972
|
-
})
|
|
2973
|
-
className: "
|
|
2867
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2868
|
+
className: "datepicker-toggle-button"
|
|
2869
|
+
})))) : (/*#__PURE__*/React.createElement("div", {
|
|
2870
|
+
className: "mt-4"
|
|
2871
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2872
|
+
className: "datepicker-toggle"
|
|
2974
2873
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2975
2874
|
type: "date",
|
|
2976
|
-
|
|
2977
|
-
width: "100%"
|
|
2978
|
-
},
|
|
2875
|
+
className: "datepicker-input",
|
|
2979
2876
|
placeholder: dataVerification.placeholder3,
|
|
2980
2877
|
value: context.dataVerification.dataRegulation.value1,
|
|
2981
2878
|
onChange: function onChange(e) {
|
|
@@ -2984,57 +2881,35 @@ var DataVerification = function DataVerification() {
|
|
|
2984
2881
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2985
2882
|
});
|
|
2986
2883
|
}
|
|
2987
|
-
})
|
|
2988
|
-
className: "
|
|
2989
|
-
}, /*#__PURE__*/React.createElement(
|
|
2990
|
-
className: "
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
var value = e.target.value;
|
|
2994
|
-
setContext(function (ctx) {
|
|
2995
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2996
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2997
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2998
|
-
});
|
|
2999
|
-
}
|
|
3000
|
-
}, ["identificationNumber", "phoneNumber"].map(function (v) {
|
|
3001
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
3002
|
-
value: v,
|
|
3003
|
-
key: v
|
|
3004
|
-
}, dataVerification[v]);
|
|
3005
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
3006
|
-
className: "box-item"
|
|
2884
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2885
|
+
className: "datepicker-toggle-button"
|
|
2886
|
+
}))))))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
2887
|
+
className: "w-full border-t-[1px]"
|
|
2888
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2889
|
+
className: "flex flex-col gap-2"
|
|
3007
2890
|
}, ["prohibitInput", "hintShow"].map(function (v) {
|
|
3008
2891
|
return /*#__PURE__*/React.createElement("div", {
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
}, /*#__PURE__*/React.createElement(
|
|
3012
|
-
|
|
3013
|
-
id: v,
|
|
3014
|
-
key: "input".concat(v),
|
|
2892
|
+
key: v,
|
|
2893
|
+
className: "flex items-center"
|
|
2894
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
2895
|
+
className: "border-2",
|
|
3015
2896
|
checked: context.dataVerification.dataRegulation[v],
|
|
3016
|
-
|
|
2897
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
2898
|
+
var checked = e.target.checked;
|
|
3017
2899
|
setContext(function (ctx) {
|
|
3018
2900
|
var _ctx$dataVerification5;
|
|
3019
2901
|
var dataRegulation = (_ctx$dataVerification5 = ctx.dataVerification) === null || _ctx$dataVerification5 === void 0 ? void 0 : _ctx$dataVerification5.dataRegulation;
|
|
3020
2902
|
if (v === "prohibitInput") {
|
|
3021
|
-
dataRegulation.prohibitInput =
|
|
2903
|
+
dataRegulation.prohibitInput = checked;
|
|
3022
2904
|
} else if (v === "hintShow") {
|
|
3023
|
-
dataRegulation.hintShow =
|
|
2905
|
+
dataRegulation.hintShow = checked;
|
|
3024
2906
|
}
|
|
3025
2907
|
});
|
|
3026
2908
|
}
|
|
3027
|
-
}), /*#__PURE__*/React.createElement("
|
|
3028
|
-
|
|
3029
|
-
key: "label".concat(v)
|
|
2909
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2910
|
+
className: "ml-2"
|
|
3030
2911
|
}, dataVerification[v]));
|
|
3031
|
-
}), ((_context$
|
|
3032
|
-
className: "input-box"
|
|
3033
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
3034
|
-
type: "text",
|
|
3035
|
-
style: {
|
|
3036
|
-
width: "100%"
|
|
3037
|
-
},
|
|
2912
|
+
}), ((_context$dataVerifica10 = context.dataVerification) === null || _context$dataVerifica10 === void 0 ? void 0 : (_context$dataVerifica11 = _context$dataVerifica10.dataRegulation) === null || _context$dataVerifica11 === void 0 ? void 0 : _context$dataVerifica11.hintShow) && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextField, {
|
|
3038
2913
|
placeholder: dataVerification.placeholder5,
|
|
3039
2914
|
value: context.dataVerification.dataRegulation.hintValue,
|
|
3040
2915
|
onChange: function onChange(e) {
|
|
@@ -3043,25 +2918,37 @@ var DataVerification = function DataVerification() {
|
|
|
3043
2918
|
ctx.dataVerification.dataRegulation.hintValue = value;
|
|
3044
2919
|
});
|
|
3045
2920
|
}
|
|
3046
|
-
}))))), /*#__PURE__*/React.createElement(
|
|
3047
|
-
className: "
|
|
2921
|
+
}))))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
2922
|
+
className: "w-full border-t-[1px] my-4"
|
|
2923
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2924
|
+
className: "flex gap-2 justify-between items-center"
|
|
2925
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
2926
|
+
variant: "secondary",
|
|
2927
|
+
style: {
|
|
2928
|
+
minWidth: "80px"
|
|
2929
|
+
},
|
|
3048
2930
|
onClick: function onClick() {
|
|
3049
|
-
btn("
|
|
2931
|
+
btn("close");
|
|
2932
|
+
}
|
|
2933
|
+
}, button.cancel), /*#__PURE__*/React.createElement("div", {
|
|
2934
|
+
className: "flex gap-2"
|
|
2935
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
2936
|
+
variant: "secondary",
|
|
2937
|
+
style: {
|
|
2938
|
+
minWidth: "80px"
|
|
3050
2939
|
},
|
|
3051
|
-
tabIndex: 0
|
|
3052
|
-
}, button.confirm), /*#__PURE__*/React.createElement("div", {
|
|
3053
|
-
className: "button-basic button-close",
|
|
3054
2940
|
onClick: function onClick() {
|
|
3055
2941
|
btn("delete");
|
|
2942
|
+
}
|
|
2943
|
+
}, dataVerification.deleteVerification), /*#__PURE__*/React.createElement(Button$1, {
|
|
2944
|
+
variant: "default",
|
|
2945
|
+
style: {
|
|
2946
|
+
minWidth: "80px"
|
|
3056
2947
|
},
|
|
3057
|
-
tabIndex: 0
|
|
3058
|
-
}, dataVerification.deleteVerification), /*#__PURE__*/React.createElement("div", {
|
|
3059
|
-
className: "button-basic button-close",
|
|
3060
2948
|
onClick: function onClick() {
|
|
3061
|
-
btn("
|
|
3062
|
-
}
|
|
3063
|
-
|
|
3064
|
-
}, button.cancel));
|
|
2949
|
+
btn("confirm");
|
|
2950
|
+
}
|
|
2951
|
+
}, button.confirm))));
|
|
3065
2952
|
};
|
|
3066
2953
|
|
|
3067
2954
|
function getDisplayedRangeTxt(context) {
|
|
@@ -3073,12 +2960,7 @@ function getDisplayedRangeTxt(context) {
|
|
|
3073
2960
|
return (_context$rangeDialog$ = (_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.rangeTxt) !== null && _context$rangeDialog$ !== void 0 ? _context$rangeDialog$ : "";
|
|
3074
2961
|
}
|
|
3075
2962
|
|
|
3076
|
-
|
|
3077
|
-
if (typeof document !== "undefined") {
|
|
3078
|
-
var styleSheet = document.createElement("style");
|
|
3079
|
-
styleSheet.textContent = datepickerStyles;
|
|
3080
|
-
document.head.appendChild(styleSheet);
|
|
3081
|
-
}
|
|
2963
|
+
injectDatepickerStyles();
|
|
3082
2964
|
var ConditionRules = function ConditionRules(_ref) {
|
|
3083
2965
|
var type = _ref.type;
|
|
3084
2966
|
var _useContext = useContext(WorkbookContext),
|
|
@@ -3399,7 +3281,8 @@ var RangeDialog = function RangeDialog() {
|
|
|
3399
3281
|
showDialog = _useDialog.showDialog;
|
|
3400
3282
|
var _locale = locale(context),
|
|
3401
3283
|
dataVerification = _locale.dataVerification,
|
|
3402
|
-
button = _locale.button
|
|
3284
|
+
button = _locale.button,
|
|
3285
|
+
toolbar = _locale.toolbar;
|
|
3403
3286
|
var _useState = useState(getDisplayedRangeTxt(context)),
|
|
3404
3287
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3405
3288
|
rangeTxt2 = _useState2[0],
|
|
@@ -3424,7 +3307,7 @@ var RangeDialog = function RangeDialog() {
|
|
|
3424
3307
|
}), undefined, locale(context).conditionformat["conditionformat_".concat(rulesType)]);
|
|
3425
3308
|
return;
|
|
3426
3309
|
}
|
|
3427
|
-
showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
3310
|
+
showDialog(/*#__PURE__*/React.createElement(DataVerification, null), undefined, toolbar.dataVerification);
|
|
3428
3311
|
}, [setContext, showDialog, context]);
|
|
3429
3312
|
useEffect(function () {
|
|
3430
3313
|
setRangeTxt2(getDisplayedRangeTxt(context));
|
|
@@ -3613,7 +3496,7 @@ var DropDownList = function DropDownList() {
|
|
|
3613
3496
|
arr.splice(index, 1);
|
|
3614
3497
|
}
|
|
3615
3498
|
setSelected(arr);
|
|
3616
|
-
|
|
3499
|
+
setDropdownValue(ctx, v, arr);
|
|
3617
3500
|
});
|
|
3618
3501
|
},
|
|
3619
3502
|
tabIndex: 0
|
|
@@ -4083,8 +3966,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4083
3966
|
display: "none"
|
|
4084
3967
|
}
|
|
4085
3968
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
4086
|
-
name: "
|
|
4087
|
-
width: 16
|
|
3969
|
+
name: "caret-down-fill",
|
|
3970
|
+
width: 16,
|
|
3971
|
+
height: 16
|
|
4088
3972
|
})), context.dataVerificationDropDownList && /*#__PURE__*/React.createElement(DropDownList, null), /*#__PURE__*/React.createElement("div", {
|
|
4089
3973
|
id: "luckysheet-dataVerification-showHintBox",
|
|
4090
3974
|
className: "luckysheet-mousedown-cancel",
|
|
@@ -4403,6 +4287,9 @@ var Combo = function Combo(_ref) {
|
|
|
4403
4287
|
setPopupPosition = _useState4[1];
|
|
4404
4288
|
var popupRef = useRef(null);
|
|
4405
4289
|
var buttonRef = useRef(null);
|
|
4290
|
+
var isLucideIcon = useMemo(function () {
|
|
4291
|
+
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip"].includes(iconId);
|
|
4292
|
+
}, [iconId]);
|
|
4406
4293
|
useOutsideClick(popupRef, function () {
|
|
4407
4294
|
setOpen(false);
|
|
4408
4295
|
});
|
|
@@ -4430,7 +4317,7 @@ var Combo = function Combo(_ref) {
|
|
|
4430
4317
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4431
4318
|
ref: buttonRef,
|
|
4432
4319
|
className: "fortune-toolbar-combo"
|
|
4433
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4320
|
+
}, !isLucideIcon ? (/*#__PURE__*/React.createElement("div", {
|
|
4434
4321
|
className: "fortune-toolbar-combo-button",
|
|
4435
4322
|
onClick: function onClick(e) {
|
|
4436
4323
|
if (_onClick) {
|
|
@@ -4449,7 +4336,13 @@ var Combo = function Combo(_ref) {
|
|
|
4449
4336
|
name: iconId
|
|
4450
4337
|
})) : (/*#__PURE__*/React.createElement("span", {
|
|
4451
4338
|
className: "fortune-toolbar-combo-text"
|
|
4452
|
-
}, text !== undefined ? text : "")))
|
|
4339
|
+
}, text !== undefined ? text : "")))) : (/*#__PURE__*/React.createElement(IconButton, {
|
|
4340
|
+
icon: getIcon(iconId),
|
|
4341
|
+
variant: "ghost",
|
|
4342
|
+
onClick: function onClick() {
|
|
4343
|
+
return setOpen(!open);
|
|
4344
|
+
}
|
|
4345
|
+
})), showArrow && (/*#__PURE__*/React.createElement("div", {
|
|
4453
4346
|
className: "fortune-toolbar-combo-arrow",
|
|
4454
4347
|
onClick: function onClick() {
|
|
4455
4348
|
return setOpen(!open);
|
|
@@ -5354,6 +5247,30 @@ var FormatSearch = function FormatSearch(_ref) {
|
|
|
5354
5247
|
}, button.cancel)));
|
|
5355
5248
|
};
|
|
5356
5249
|
|
|
5250
|
+
var getIcon = function getIcon(title) {
|
|
5251
|
+
switch (title) {
|
|
5252
|
+
case "align-left":
|
|
5253
|
+
return "AlignLeft";
|
|
5254
|
+
case "align-center":
|
|
5255
|
+
return "AlignCenter";
|
|
5256
|
+
case "align-right":
|
|
5257
|
+
return "AlignRight";
|
|
5258
|
+
case "align-top":
|
|
5259
|
+
return "ArrowUpFromLine";
|
|
5260
|
+
case "align-middle":
|
|
5261
|
+
return "AlignVerticalMiddle";
|
|
5262
|
+
case "align-bottom":
|
|
5263
|
+
return "ArrowDownFromLine";
|
|
5264
|
+
case "text-overflow":
|
|
5265
|
+
return "TextOverflow";
|
|
5266
|
+
case "text-wrap":
|
|
5267
|
+
return "WrapText";
|
|
5268
|
+
case "text-clip":
|
|
5269
|
+
return "TextClip";
|
|
5270
|
+
default:
|
|
5271
|
+
return "";
|
|
5272
|
+
}
|
|
5273
|
+
};
|
|
5357
5274
|
var Toolbar = function Toolbar(_ref) {
|
|
5358
5275
|
var _context$luckysheet_s, _flowdata$row, _settings$customToolb;
|
|
5359
5276
|
var setMoreItems = _ref.setMoreItems,
|
|
@@ -5690,27 +5607,38 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5690
5607
|
tooltip: toolbar.horizontalAlign,
|
|
5691
5608
|
showArrow: false
|
|
5692
5609
|
}, function (setOpen) {
|
|
5693
|
-
return /*#__PURE__*/React.createElement(Select,
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5610
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
5611
|
+
style: {
|
|
5612
|
+
minWidth: "fit-content",
|
|
5613
|
+
display: "flex",
|
|
5614
|
+
flexDirection: "row",
|
|
5615
|
+
alignItems: "center",
|
|
5616
|
+
justifyContent: "center",
|
|
5617
|
+
gap: 4
|
|
5618
|
+
}
|
|
5619
|
+
}, items.map(function (_ref3) {
|
|
5620
|
+
var _$find2;
|
|
5621
|
+
var title = _ref3.title;
|
|
5622
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
5697
5623
|
key: title,
|
|
5624
|
+
isActive: ((_$find2 = _.find(items, function (item) {
|
|
5625
|
+
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.ht);
|
|
5626
|
+
})) === null || _$find2 === void 0 ? void 0 : _$find2.title) === title,
|
|
5627
|
+
icon: getIcon(title),
|
|
5628
|
+
variant: "ghost",
|
|
5698
5629
|
onClick: function onClick() {
|
|
5699
5630
|
setContext(function (ctx) {
|
|
5700
5631
|
handleHorizontalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
|
|
5701
5632
|
});
|
|
5702
5633
|
setOpen(false);
|
|
5703
|
-
}
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
}, text, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
5707
|
-
name: title
|
|
5708
|
-
})));
|
|
5634
|
+
},
|
|
5635
|
+
tabIndex: 0
|
|
5636
|
+
});
|
|
5709
5637
|
}));
|
|
5710
5638
|
});
|
|
5711
5639
|
}
|
|
5712
5640
|
if (name === "vertical-align") {
|
|
5713
|
-
var _$
|
|
5641
|
+
var _$find3;
|
|
5714
5642
|
var _items = [{
|
|
5715
5643
|
title: "align-top",
|
|
5716
5644
|
text: align.top,
|
|
@@ -5725,29 +5653,40 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5725
5653
|
value: 2
|
|
5726
5654
|
}];
|
|
5727
5655
|
return /*#__PURE__*/React.createElement(Combo, {
|
|
5728
|
-
iconId: ((_$
|
|
5656
|
+
iconId: ((_$find3 = _.find(_items, function (item) {
|
|
5729
5657
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
5730
|
-
})) === null || _$
|
|
5658
|
+
})) === null || _$find3 === void 0 ? void 0 : _$find3.title) || "align-top",
|
|
5731
5659
|
key: name,
|
|
5732
5660
|
tooltip: toolbar.verticalAlign,
|
|
5733
5661
|
showArrow: false
|
|
5734
5662
|
}, function (setOpen) {
|
|
5735
|
-
return /*#__PURE__*/React.createElement(Select,
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5663
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
5664
|
+
style: {
|
|
5665
|
+
minWidth: "fit-content",
|
|
5666
|
+
display: "flex",
|
|
5667
|
+
flexDirection: "row",
|
|
5668
|
+
alignItems: "center",
|
|
5669
|
+
justifyContent: "center",
|
|
5670
|
+
gap: 4
|
|
5671
|
+
}
|
|
5672
|
+
}, _items.map(function (_ref4) {
|
|
5673
|
+
var _$find4;
|
|
5674
|
+
var title = _ref4.title;
|
|
5675
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
5739
5676
|
key: title,
|
|
5677
|
+
isActive: ((_$find4 = _.find(_items, function (item) {
|
|
5678
|
+
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
5679
|
+
})) === null || _$find4 === void 0 ? void 0 : _$find4.title) === title,
|
|
5680
|
+
icon: getIcon(title),
|
|
5681
|
+
variant: "ghost",
|
|
5740
5682
|
onClick: function onClick() {
|
|
5741
5683
|
setContext(function (ctx) {
|
|
5742
5684
|
handleVerticalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
|
|
5743
5685
|
});
|
|
5744
5686
|
setOpen(false);
|
|
5745
|
-
}
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
}, text, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
5749
|
-
name: title
|
|
5750
|
-
})));
|
|
5687
|
+
},
|
|
5688
|
+
tabIndex: 0
|
|
5689
|
+
});
|
|
5751
5690
|
}));
|
|
5752
5691
|
});
|
|
5753
5692
|
}
|
|
@@ -5822,7 +5761,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5822
5761
|
key: name,
|
|
5823
5762
|
onClick: function onClick() {
|
|
5824
5763
|
if (context.allowEdit === false) return;
|
|
5825
|
-
showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
5764
|
+
showDialog(/*#__PURE__*/React.createElement(DataVerification, null), undefined, toolbar.dataVerification);
|
|
5826
5765
|
}
|
|
5827
5766
|
});
|
|
5828
5767
|
}
|
|
@@ -6296,12 +6235,23 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6296
6235
|
tooltip: toolbar.textWrap,
|
|
6297
6236
|
showArrow: false
|
|
6298
6237
|
}, function (setOpen) {
|
|
6299
|
-
return /*#__PURE__*/React.createElement(Select,
|
|
6300
|
-
|
|
6301
|
-
|
|
6238
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
6239
|
+
style: {
|
|
6240
|
+
minWidth: "fit-content",
|
|
6241
|
+
display: "flex",
|
|
6242
|
+
flexDirection: "row",
|
|
6243
|
+
alignItems: "center",
|
|
6244
|
+
justifyContent: "center",
|
|
6245
|
+
gap: 4
|
|
6246
|
+
}
|
|
6247
|
+
}, _items6.map(function (_ref1) {
|
|
6248
|
+
var iconId = _ref1.iconId,
|
|
6302
6249
|
value = _ref1.value;
|
|
6303
|
-
return /*#__PURE__*/React.createElement(
|
|
6250
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
6304
6251
|
key: value,
|
|
6252
|
+
isActive: _curr.value === value,
|
|
6253
|
+
icon: getIcon(iconId),
|
|
6254
|
+
variant: "ghost",
|
|
6305
6255
|
onClick: function onClick() {
|
|
6306
6256
|
setContext(function (ctx) {
|
|
6307
6257
|
var d = getFlowdata(ctx);
|
|
@@ -6309,12 +6259,9 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6309
6259
|
updateFormat(ctx, refs.cellInput.current, d, "tb", value);
|
|
6310
6260
|
});
|
|
6311
6261
|
setOpen(false);
|
|
6312
|
-
}
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
}, text, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6316
|
-
name: iconId
|
|
6317
|
-
})));
|
|
6262
|
+
},
|
|
6263
|
+
tabIndex: 0
|
|
6264
|
+
});
|
|
6318
6265
|
}));
|
|
6319
6266
|
});
|
|
6320
6267
|
}
|
|
@@ -9651,6 +9598,21 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9651
9598
|
"clip-rule": "evenodd",
|
|
9652
9599
|
d: "M12.75 2.25C13.1642 2.25 13.5 2.58579 13.5 3V15C13.5 15.4142 13.1642 15.75 12.75 15.75C12.3358 15.75 12 15.4142 12 15V3C12 2.58579 12.3358 2.25 12.75 2.25Z",
|
|
9653
9600
|
fill: "#363B3F"
|
|
9601
|
+
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9602
|
+
id: "caret-down-fill",
|
|
9603
|
+
width: "14",
|
|
9604
|
+
height: "14",
|
|
9605
|
+
viewBox: "0 0 14 14",
|
|
9606
|
+
fill: "none"
|
|
9607
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
9608
|
+
width: "14",
|
|
9609
|
+
height: "14",
|
|
9610
|
+
rx: "4",
|
|
9611
|
+
fill: "black",
|
|
9612
|
+
"fill-opacity": "0.1"
|
|
9613
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9614
|
+
d: "M6.64775 8.97978L3.77152 6.10355C3.45654 5.78857 3.67962 5.25 4.12507 5.25H9.87753C10.323 5.25 10.5461 5.78857 10.2311 6.10355L7.35486 8.97978C7.15959 9.17504 6.84301 9.17504 6.64775 8.97978Z",
|
|
9615
|
+
fill: "#363B3F"
|
|
9654
9616
|
}))));
|
|
9655
9617
|
};
|
|
9656
9618
|
|