@fileverse-dev/fortune-react 1.0.2-mod-35 → 1.0.2-mod-37
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/DuneChartsInputModal/DuneChartsInputModal.d.ts +12 -0
- package/dist/components/DunePreview/DunePreview.d.ts +13 -0
- package/dist/components/IFrameBoxs/iFrameBoxs.d.ts +3 -0
- package/dist/components/Toolbar/index.d.ts +1 -0
- package/dist/components/Workbook/api.d.ts +8 -0
- package/dist/components/Workbook/index.d.ts +8 -0
- package/dist/index.css +188 -15
- package/dist/index.esm.css +188 -15
- package/dist/index.esm.js +594 -290
- package/dist/index.js +593 -289
- package/dist/index.umd.css +188 -15
- package/dist/index.umd.js +7523 -5268
- 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.js
CHANGED
|
@@ -184,7 +184,7 @@ function _regenerator() {
|
|
|
184
184
|
i = p[t],
|
|
185
185
|
d = G.p,
|
|
186
186
|
l = i[2];
|
|
187
|
-
r > 3 ? (o = l === n) && (
|
|
187
|
+
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));
|
|
188
188
|
}
|
|
189
189
|
if (o || r > 1) return a;
|
|
190
190
|
throw y = !0, n;
|
|
@@ -2571,8 +2571,18 @@ function useDialog() {
|
|
|
2571
2571
|
};
|
|
2572
2572
|
}
|
|
2573
2573
|
|
|
2574
|
+
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";
|
|
2575
|
+
var injectDatepickerStyles = function injectDatepickerStyles() {
|
|
2576
|
+
if (typeof document !== "undefined") {
|
|
2577
|
+
var styleSheet = document.createElement("style");
|
|
2578
|
+
styleSheet.textContent = datepickerStyles;
|
|
2579
|
+
document.head.appendChild(styleSheet);
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
injectDatepickerStyles();
|
|
2574
2584
|
var DataVerification = function DataVerification() {
|
|
2575
|
-
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
|
|
2585
|
+
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;
|
|
2576
2586
|
var _useContext = React.useContext(WorkbookContext),
|
|
2577
2587
|
context = _useContext.context,
|
|
2578
2588
|
setContext = _useContext.setContext;
|
|
@@ -2581,15 +2591,11 @@ var DataVerification = function DataVerification() {
|
|
|
2581
2591
|
hideDialog = _useDialog.hideDialog;
|
|
2582
2592
|
var _locale = fortuneCore.locale(context),
|
|
2583
2593
|
dataVerification = _locale.dataVerification,
|
|
2584
|
-
toolbar = _locale.toolbar,
|
|
2585
2594
|
button = _locale.button,
|
|
2586
2595
|
generalDialog = _locale.generalDialog;
|
|
2587
|
-
var _useState = React.useState(["between", "notBetween", "equal", "notEqualTo", "
|
|
2596
|
+
var _useState = React.useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
|
|
2588
2597
|
_useState2 = _slicedToArray(_useState, 1),
|
|
2589
|
-
|
|
2590
|
-
var _useState3 = React.useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
|
|
2591
|
-
_useState4 = _slicedToArray(_useState3, 1),
|
|
2592
|
-
dateCondition = _useState4[0];
|
|
2598
|
+
dateCondition = _useState2[0];
|
|
2593
2599
|
var dataSelectRange = React.useCallback(function (type, value) {
|
|
2594
2600
|
hideDialog();
|
|
2595
2601
|
setContext(function (ctx) {
|
|
@@ -2724,48 +2730,36 @@ var DataVerification = function DataVerification() {
|
|
|
2724
2730
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2725
2731
|
id: "fortune-data-verification"
|
|
2726
2732
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2727
|
-
className: "
|
|
2728
|
-
}, toolbar.dataVerification), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2729
|
-
className: "box"
|
|
2733
|
+
className: "flex flex-col gap-4"
|
|
2730
2734
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2731
|
-
className: "
|
|
2732
|
-
style: {
|
|
2733
|
-
borderTop: "1px solid #E1E4E8"
|
|
2734
|
-
}
|
|
2735
|
+
className: "flex flex-col"
|
|
2735
2736
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2736
|
-
className: "
|
|
2737
|
-
}, dataVerification.cellRange), /*#__PURE__*/React__default['default'].createElement(
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2737
|
+
className: "text-heading-xsm mb-2"
|
|
2738
|
+
}, dataVerification.cellRange), /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
|
|
2739
|
+
rightIcon: /*#__PURE__*/React__default['default'].createElement(ui.LucideIcon, {
|
|
2740
|
+
name: "Grid2x2",
|
|
2741
|
+
size: "sm"
|
|
2742
|
+
}),
|
|
2743
|
+
"aria-hidden": "true",
|
|
2744
|
+
readOnly: true,
|
|
2742
2745
|
value: (_context$dataVerifica = context.dataVerification.dataRegulation) === null || _context$dataVerifica === void 0 ? void 0 : _context$dataVerifica.rangeTxt,
|
|
2743
2746
|
onChange: function onChange(e) {
|
|
2744
2747
|
var value = e.target.value;
|
|
2745
2748
|
setContext(function (ctx) {
|
|
2746
2749
|
ctx.dataVerification.dataRegulation.rangeTxt = value;
|
|
2747
2750
|
});
|
|
2748
|
-
}
|
|
2749
|
-
}), /*#__PURE__*/React__default['default'].createElement("i", {
|
|
2750
|
-
className: "icon",
|
|
2751
|
-
"aria-hidden": "true",
|
|
2751
|
+
},
|
|
2752
2752
|
onClick: function onClick() {
|
|
2753
2753
|
hideDialog();
|
|
2754
2754
|
dataSelectRange("rangeTxt", context.dataVerification.dataRegulation.value1);
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
name: "tab",
|
|
2759
|
-
width: 18
|
|
2760
|
-
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2761
|
-
className: "box-item"
|
|
2755
|
+
}
|
|
2756
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2757
|
+
className: "flex flex-col"
|
|
2762
2758
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2763
|
-
className: "
|
|
2764
|
-
}, dataVerification.verificationCondition), /*#__PURE__*/React__default['default'].createElement(
|
|
2765
|
-
className: "data-verification-type-select",
|
|
2759
|
+
className: "text-heading-xsm mb-2"
|
|
2760
|
+
}, dataVerification.verificationCondition), /*#__PURE__*/React__default['default'].createElement(ui.Select, {
|
|
2766
2761
|
value: context.dataVerification.dataRegulation.type,
|
|
2767
|
-
|
|
2768
|
-
var value = e.target.value;
|
|
2762
|
+
onValueChange: function onValueChange(value) {
|
|
2769
2763
|
setContext(function (ctx) {
|
|
2770
2764
|
ctx.dataVerification.dataRegulation.type = value;
|
|
2771
2765
|
if (value === "dropdown" || value === "checkbox") {
|
|
@@ -2781,18 +2775,14 @@ var DataVerification = function DataVerification() {
|
|
|
2781
2775
|
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2782
2776
|
});
|
|
2783
2777
|
}
|
|
2784
|
-
}, [
|
|
2785
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
2778
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.SelectTrigger, null, /*#__PURE__*/React__default['default'].createElement(ui.SelectValue, null)), /*#__PURE__*/React__default['default'].createElement(ui.SelectContent, null, ["dropdown", "checkbox", "date"].map(function (v) {
|
|
2779
|
+
return /*#__PURE__*/React__default['default'].createElement(ui.SelectItem, {
|
|
2786
2780
|
value: v,
|
|
2787
2781
|
key: v
|
|
2788
2782
|
}, dataVerification[v]);
|
|
2789
|
-
})), ((_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__default['default'].createElement("div", {
|
|
2790
|
-
className: "
|
|
2791
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2792
|
-
className: "data-verification-range"
|
|
2793
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2794
|
-
className: "formulaInputFocus",
|
|
2795
|
-
spellCheck: "false",
|
|
2783
|
+
}))), ((_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__default['default'].createElement("div", {
|
|
2784
|
+
className: "mt-4"
|
|
2785
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
|
|
2796
2786
|
value: context.dataVerification.dataRegulation.value1,
|
|
2797
2787
|
placeholder: dataVerification.placeholder1,
|
|
2798
2788
|
onChange: function onChange(e) {
|
|
@@ -2801,39 +2791,28 @@ var DataVerification = function DataVerification() {
|
|
|
2801
2791
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2802
2792
|
});
|
|
2803
2793
|
}
|
|
2804
|
-
}), /*#__PURE__*/React__default['default'].createElement("
|
|
2805
|
-
className: "
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
return dataSelectRange("dropDown", context.dataVerification.dataRegulation.value1);
|
|
2809
|
-
},
|
|
2810
|
-
tabIndex: 0
|
|
2811
|
-
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
2812
|
-
name: "tab",
|
|
2813
|
-
width: 18
|
|
2814
|
-
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2815
|
-
className: "check"
|
|
2816
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2817
|
-
type: "checkbox",
|
|
2794
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2795
|
+
className: "mt-4 flex items-center"
|
|
2796
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Checkbox, {
|
|
2797
|
+
className: "border-2",
|
|
2818
2798
|
checked: context.dataVerification.dataRegulation.type2 === "true",
|
|
2819
|
-
|
|
2820
|
-
onChange: function onChange(e) {
|
|
2799
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
2821
2800
|
var checked = e.target.checked;
|
|
2822
2801
|
setContext(function (ctx) {
|
|
2823
2802
|
ctx.dataVerification.dataRegulation.type2 = "".concat(checked);
|
|
2824
2803
|
});
|
|
2825
2804
|
}
|
|
2826
|
-
}), /*#__PURE__*/React__default['default'].createElement("
|
|
2827
|
-
|
|
2805
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2806
|
+
className: "ml-2"
|
|
2828
2807
|
}, 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__default['default'].createElement("div", {
|
|
2829
|
-
className: "
|
|
2808
|
+
className: "mt-4 space-y-2"
|
|
2830
2809
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2831
|
-
className: "
|
|
2832
|
-
}, /*#__PURE__*/React__default['default'].createElement("span",
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
placeholder: dataVerification.placeholder2,
|
|
2810
|
+
className: "flex items-center gap-2"
|
|
2811
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2812
|
+
className: "data-verification-checkbox-label"
|
|
2813
|
+
}, dataVerification.selected), /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
|
|
2836
2814
|
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,
|
|
2815
|
+
placeholder: dataVerification.placeholder2,
|
|
2837
2816
|
onChange: function onChange(e) {
|
|
2838
2817
|
var value = e.target.value;
|
|
2839
2818
|
setContext(function (ctx) {
|
|
@@ -2841,129 +2820,41 @@ var DataVerification = function DataVerification() {
|
|
|
2841
2820
|
});
|
|
2842
2821
|
}
|
|
2843
2822
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2844
|
-
className: "
|
|
2845
|
-
}, /*#__PURE__*/React__default['default'].createElement("span",
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
placeholder: dataVerification.placeholder2,
|
|
2823
|
+
className: "flex items-center gap-2"
|
|
2824
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2825
|
+
className: "data-verification-checkbox-label"
|
|
2826
|
+
}, dataVerification.notSelected), /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
|
|
2849
2827
|
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,
|
|
2828
|
+
placeholder: dataVerification.placeholder2,
|
|
2850
2829
|
onChange: function onChange(e) {
|
|
2851
2830
|
var value = e.target.value;
|
|
2852
2831
|
setContext(function (ctx) {
|
|
2853
2832
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2854
2833
|
});
|
|
2855
2834
|
}
|
|
2856
|
-
})))), ((
|
|
2857
|
-
className: "
|
|
2858
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2859
|
-
className: "data-verification-type-select",
|
|
2860
|
-
value: context.dataVerification.dataRegulation.type2,
|
|
2861
|
-
onChange: function onChange(e) {
|
|
2862
|
-
var value = e.target.value;
|
|
2863
|
-
setContext(function (ctx) {
|
|
2864
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2865
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2866
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
}, numberCondition.map(function (v) {
|
|
2870
|
-
return /*#__PURE__*/React__default['default'].createElement("option", {
|
|
2871
|
-
value: v,
|
|
2872
|
-
key: v
|
|
2873
|
-
}, dataVerification[v]);
|
|
2874
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2875
|
-
className: "input-box"
|
|
2876
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2877
|
-
type: "number",
|
|
2878
|
-
placeholder: "1",
|
|
2879
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2880
|
-
onChange: function onChange(e) {
|
|
2881
|
-
var value = e.target.value;
|
|
2882
|
-
setContext(function (ctx) {
|
|
2883
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2884
|
-
});
|
|
2885
|
-
}
|
|
2886
|
-
}), /*#__PURE__*/React__default['default'].createElement("span", null, "-"), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2887
|
-
type: "number",
|
|
2888
|
-
placeholder: "100",
|
|
2889
|
-
value: context.dataVerification.dataRegulation.value2,
|
|
2890
|
-
onChange: function onChange(e) {
|
|
2891
|
-
var value = e.target.value;
|
|
2892
|
-
setContext(function (ctx) {
|
|
2893
|
-
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2894
|
-
});
|
|
2895
|
-
}
|
|
2896
|
-
}))) : (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2897
|
-
className: "input-box"
|
|
2898
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2899
|
-
type: "number",
|
|
2900
|
-
style: {
|
|
2901
|
-
width: "100%"
|
|
2902
|
-
},
|
|
2903
|
-
placeholder: dataVerification.placeholder3,
|
|
2904
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2905
|
-
onChange: function onChange(e) {
|
|
2906
|
-
var value = e.target.value;
|
|
2907
|
-
setContext(function (ctx) {
|
|
2908
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2909
|
-
});
|
|
2910
|
-
}
|
|
2911
|
-
}))))), ((_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__default['default'].createElement("div", {
|
|
2912
|
-
className: "show-box-item"
|
|
2913
|
-
}, /*#__PURE__*/React__default['default'].createElement("select", {
|
|
2914
|
-
className: "data-verification-type-select",
|
|
2835
|
+
})))), ((_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__default['default'].createElement("div", {
|
|
2836
|
+
className: "mt-4"
|
|
2837
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Select, {
|
|
2915
2838
|
value: context.dataVerification.dataRegulation.type2,
|
|
2916
|
-
|
|
2917
|
-
var value = e.target.value;
|
|
2918
|
-
setContext(function (ctx) {
|
|
2919
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2920
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2921
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2922
|
-
});
|
|
2923
|
-
}
|
|
2924
|
-
}, ["include", "exclude", "equal"].map(function (v) {
|
|
2925
|
-
return /*#__PURE__*/React__default['default'].createElement("option", {
|
|
2926
|
-
value: v,
|
|
2927
|
-
key: v
|
|
2928
|
-
}, dataVerification[v]);
|
|
2929
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2930
|
-
className: "input-box"
|
|
2931
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2932
|
-
type: "text",
|
|
2933
|
-
style: {
|
|
2934
|
-
width: "100%"
|
|
2935
|
-
},
|
|
2936
|
-
placeholder: dataVerification.placeholder4,
|
|
2937
|
-
value: context.dataVerification.dataRegulation.value1,
|
|
2938
|
-
onChange: function onChange(e) {
|
|
2939
|
-
var value = e.target.value;
|
|
2940
|
-
setContext(function (ctx) {
|
|
2941
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2942
|
-
});
|
|
2943
|
-
}
|
|
2944
|
-
})))), ((_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__default['default'].createElement("div", {
|
|
2945
|
-
className: "show-box-item"
|
|
2946
|
-
}, /*#__PURE__*/React__default['default'].createElement("select", {
|
|
2947
|
-
className: "data-verification-type-select",
|
|
2948
|
-
value: context.dataVerification.dataRegulation.type2,
|
|
2949
|
-
onChange: function onChange(e) {
|
|
2950
|
-
var value = e.target.value;
|
|
2839
|
+
onValueChange: function onValueChange(value) {
|
|
2951
2840
|
setContext(function (ctx) {
|
|
2952
2841
|
ctx.dataVerification.dataRegulation.type2 = value;
|
|
2953
2842
|
ctx.dataVerification.dataRegulation.value1 = "";
|
|
2954
2843
|
ctx.dataVerification.dataRegulation.value2 = "";
|
|
2955
2844
|
});
|
|
2956
2845
|
}
|
|
2957
|
-
}, dateCondition.map(function (v) {
|
|
2958
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
2846
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.SelectTrigger, null, /*#__PURE__*/React__default['default'].createElement(ui.SelectValue, null)), /*#__PURE__*/React__default['default'].createElement(ui.SelectContent, null, dateCondition.map(function (v) {
|
|
2847
|
+
return /*#__PURE__*/React__default['default'].createElement(ui.SelectItem, {
|
|
2959
2848
|
value: v,
|
|
2960
2849
|
key: v
|
|
2961
2850
|
}, dataVerification[v]);
|
|
2962
|
-
})), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2963
|
-
className: "
|
|
2851
|
+
}))), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2852
|
+
className: "mt-4 flex gap-2 items-center"
|
|
2853
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2854
|
+
className: "datepicker-toggle"
|
|
2964
2855
|
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2965
2856
|
type: "date",
|
|
2966
|
-
|
|
2857
|
+
className: "datepicker-input",
|
|
2967
2858
|
value: context.dataVerification.dataRegulation.value1,
|
|
2968
2859
|
onChange: function onChange(e) {
|
|
2969
2860
|
var value = e.target.value;
|
|
@@ -2971,9 +2862,13 @@ var DataVerification = function DataVerification() {
|
|
|
2971
2862
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2972
2863
|
});
|
|
2973
2864
|
}
|
|
2974
|
-
}), /*#__PURE__*/React__default['default'].createElement("span",
|
|
2865
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2866
|
+
className: "datepicker-toggle-button"
|
|
2867
|
+
})), /*#__PURE__*/React__default['default'].createElement("span", null, "-"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2868
|
+
className: "datepicker-toggle"
|
|
2869
|
+
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2975
2870
|
type: "date",
|
|
2976
|
-
|
|
2871
|
+
className: "datepicker-input",
|
|
2977
2872
|
value: context.dataVerification.dataRegulation.value2,
|
|
2978
2873
|
onChange: function onChange(e) {
|
|
2979
2874
|
var value = e.target.value;
|
|
@@ -2981,13 +2876,15 @@ var DataVerification = function DataVerification() {
|
|
|
2981
2876
|
ctx.dataVerification.dataRegulation.value2 = value;
|
|
2982
2877
|
});
|
|
2983
2878
|
}
|
|
2984
|
-
})
|
|
2985
|
-
className: "
|
|
2879
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2880
|
+
className: "datepicker-toggle-button"
|
|
2881
|
+
})))) : (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
2882
|
+
className: "mt-4"
|
|
2883
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2884
|
+
className: "datepicker-toggle"
|
|
2986
2885
|
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
2987
2886
|
type: "date",
|
|
2988
|
-
|
|
2989
|
-
width: "100%"
|
|
2990
|
-
},
|
|
2887
|
+
className: "datepicker-input",
|
|
2991
2888
|
placeholder: dataVerification.placeholder3,
|
|
2992
2889
|
value: context.dataVerification.dataRegulation.value1,
|
|
2993
2890
|
onChange: function onChange(e) {
|
|
@@ -2996,57 +2893,35 @@ var DataVerification = function DataVerification() {
|
|
|
2996
2893
|
ctx.dataVerification.dataRegulation.value1 = value;
|
|
2997
2894
|
});
|
|
2998
2895
|
}
|
|
2999
|
-
})
|
|
3000
|
-
className: "
|
|
3001
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
3002
|
-
className: "
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
var value = e.target.value;
|
|
3006
|
-
setContext(function (ctx) {
|
|
3007
|
-
ctx.dataVerification.dataRegulation.type2 = value;
|
|
3008
|
-
ctx.dataVerification.dataRegulation.value1 = "";
|
|
3009
|
-
ctx.dataVerification.dataRegulation.value2 = "";
|
|
3010
|
-
});
|
|
3011
|
-
}
|
|
3012
|
-
}, ["identificationNumber", "phoneNumber"].map(function (v) {
|
|
3013
|
-
return /*#__PURE__*/React__default['default'].createElement("option", {
|
|
3014
|
-
value: v,
|
|
3015
|
-
key: v
|
|
3016
|
-
}, dataVerification[v]);
|
|
3017
|
-
}))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3018
|
-
className: "box-item"
|
|
2896
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2897
|
+
className: "datepicker-toggle-button"
|
|
2898
|
+
}))))))), /*#__PURE__*/React__default['default'].createElement(ui.Divider, {
|
|
2899
|
+
className: "w-full border-t-[1px]"
|
|
2900
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2901
|
+
className: "flex flex-col gap-2"
|
|
3019
2902
|
}, ["prohibitInput", "hintShow"].map(function (v) {
|
|
3020
2903
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
3024
|
-
|
|
3025
|
-
id: v,
|
|
3026
|
-
key: "input".concat(v),
|
|
2904
|
+
key: v,
|
|
2905
|
+
className: "flex items-center"
|
|
2906
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Checkbox, {
|
|
2907
|
+
className: "border-2",
|
|
3027
2908
|
checked: context.dataVerification.dataRegulation[v],
|
|
3028
|
-
|
|
2909
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
2910
|
+
var checked = e.target.checked;
|
|
3029
2911
|
setContext(function (ctx) {
|
|
3030
2912
|
var _ctx$dataVerification5;
|
|
3031
2913
|
var dataRegulation = (_ctx$dataVerification5 = ctx.dataVerification) === null || _ctx$dataVerification5 === void 0 ? void 0 : _ctx$dataVerification5.dataRegulation;
|
|
3032
2914
|
if (v === "prohibitInput") {
|
|
3033
|
-
dataRegulation.prohibitInput =
|
|
2915
|
+
dataRegulation.prohibitInput = checked;
|
|
3034
2916
|
} else if (v === "hintShow") {
|
|
3035
|
-
dataRegulation.hintShow =
|
|
2917
|
+
dataRegulation.hintShow = checked;
|
|
3036
2918
|
}
|
|
3037
2919
|
});
|
|
3038
2920
|
}
|
|
3039
|
-
}), /*#__PURE__*/React__default['default'].createElement("
|
|
3040
|
-
|
|
3041
|
-
key: "label".concat(v)
|
|
2921
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
2922
|
+
className: "ml-2"
|
|
3042
2923
|
}, dataVerification[v]));
|
|
3043
|
-
}), ((_context$
|
|
3044
|
-
className: "input-box"
|
|
3045
|
-
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
3046
|
-
type: "text",
|
|
3047
|
-
style: {
|
|
3048
|
-
width: "100%"
|
|
3049
|
-
},
|
|
2924
|
+
}), ((_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__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
|
|
3050
2925
|
placeholder: dataVerification.placeholder5,
|
|
3051
2926
|
value: context.dataVerification.dataRegulation.hintValue,
|
|
3052
2927
|
onChange: function onChange(e) {
|
|
@@ -3055,25 +2930,37 @@ var DataVerification = function DataVerification() {
|
|
|
3055
2930
|
ctx.dataVerification.dataRegulation.hintValue = value;
|
|
3056
2931
|
});
|
|
3057
2932
|
}
|
|
3058
|
-
}))))), /*#__PURE__*/React__default['default'].createElement(
|
|
3059
|
-
className: "
|
|
2933
|
+
}))))), /*#__PURE__*/React__default['default'].createElement(ui.Divider, {
|
|
2934
|
+
className: "w-full border-t-[1px] my-4"
|
|
2935
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2936
|
+
className: "flex gap-2 justify-between items-center"
|
|
2937
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
2938
|
+
variant: "secondary",
|
|
2939
|
+
style: {
|
|
2940
|
+
minWidth: "80px"
|
|
2941
|
+
},
|
|
3060
2942
|
onClick: function onClick() {
|
|
3061
|
-
btn("
|
|
2943
|
+
btn("close");
|
|
2944
|
+
}
|
|
2945
|
+
}, button.cancel), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2946
|
+
className: "flex gap-2"
|
|
2947
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
2948
|
+
variant: "secondary",
|
|
2949
|
+
style: {
|
|
2950
|
+
minWidth: "80px"
|
|
3062
2951
|
},
|
|
3063
|
-
tabIndex: 0
|
|
3064
|
-
}, button.confirm), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3065
|
-
className: "button-basic button-close",
|
|
3066
2952
|
onClick: function onClick() {
|
|
3067
2953
|
btn("delete");
|
|
2954
|
+
}
|
|
2955
|
+
}, dataVerification.deleteVerification), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
2956
|
+
variant: "default",
|
|
2957
|
+
style: {
|
|
2958
|
+
minWidth: "80px"
|
|
3068
2959
|
},
|
|
3069
|
-
tabIndex: 0
|
|
3070
|
-
}, dataVerification.deleteVerification), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3071
|
-
className: "button-basic button-close",
|
|
3072
2960
|
onClick: function onClick() {
|
|
3073
|
-
btn("
|
|
3074
|
-
}
|
|
3075
|
-
|
|
3076
|
-
}, button.cancel));
|
|
2961
|
+
btn("confirm");
|
|
2962
|
+
}
|
|
2963
|
+
}, button.confirm))));
|
|
3077
2964
|
};
|
|
3078
2965
|
|
|
3079
2966
|
function getDisplayedRangeTxt(context) {
|
|
@@ -3085,12 +2972,7 @@ function getDisplayedRangeTxt(context) {
|
|
|
3085
2972
|
return (_context$rangeDialog$ = (_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.rangeTxt) !== null && _context$rangeDialog$ !== void 0 ? _context$rangeDialog$ : "";
|
|
3086
2973
|
}
|
|
3087
2974
|
|
|
3088
|
-
|
|
3089
|
-
if (typeof document !== "undefined") {
|
|
3090
|
-
var styleSheet = document.createElement("style");
|
|
3091
|
-
styleSheet.textContent = datepickerStyles;
|
|
3092
|
-
document.head.appendChild(styleSheet);
|
|
3093
|
-
}
|
|
2975
|
+
injectDatepickerStyles();
|
|
3094
2976
|
var ConditionRules = function ConditionRules(_ref) {
|
|
3095
2977
|
var type = _ref.type;
|
|
3096
2978
|
var _useContext = React.useContext(WorkbookContext),
|
|
@@ -3411,7 +3293,8 @@ var RangeDialog = function RangeDialog() {
|
|
|
3411
3293
|
showDialog = _useDialog.showDialog;
|
|
3412
3294
|
var _locale = fortuneCore.locale(context),
|
|
3413
3295
|
dataVerification = _locale.dataVerification,
|
|
3414
|
-
button = _locale.button
|
|
3296
|
+
button = _locale.button,
|
|
3297
|
+
toolbar = _locale.toolbar;
|
|
3415
3298
|
var _useState = React.useState(getDisplayedRangeTxt(context)),
|
|
3416
3299
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3417
3300
|
rangeTxt2 = _useState2[0],
|
|
@@ -3436,7 +3319,7 @@ var RangeDialog = function RangeDialog() {
|
|
|
3436
3319
|
}), undefined, fortuneCore.locale(context).conditionformat["conditionformat_".concat(rulesType)]);
|
|
3437
3320
|
return;
|
|
3438
3321
|
}
|
|
3439
|
-
showDialog(/*#__PURE__*/React__default['default'].createElement(DataVerification, null));
|
|
3322
|
+
showDialog(/*#__PURE__*/React__default['default'].createElement(DataVerification, null), undefined, toolbar.dataVerification);
|
|
3440
3323
|
}, [setContext, showDialog, context]);
|
|
3441
3324
|
React.useEffect(function () {
|
|
3442
3325
|
setRangeTxt2(getDisplayedRangeTxt(context));
|
|
@@ -3625,7 +3508,7 @@ var DropDownList = function DropDownList() {
|
|
|
3625
3508
|
arr.splice(index, 1);
|
|
3626
3509
|
}
|
|
3627
3510
|
setSelected(arr);
|
|
3628
|
-
fortuneCore.
|
|
3511
|
+
fortuneCore.setDropdownValue(ctx, v, arr);
|
|
3629
3512
|
});
|
|
3630
3513
|
},
|
|
3631
3514
|
tabIndex: 0
|
|
@@ -3640,6 +3523,118 @@ var DropDownList = function DropDownList() {
|
|
|
3640
3523
|
}));
|
|
3641
3524
|
};
|
|
3642
3525
|
|
|
3526
|
+
var IframeBoxs = function IframeBoxs() {
|
|
3527
|
+
var _context$insertedIfra;
|
|
3528
|
+
var _useContext = React.useContext(WorkbookContext),
|
|
3529
|
+
context = _useContext.context,
|
|
3530
|
+
setContext = _useContext.setContext,
|
|
3531
|
+
refs = _useContext.refs;
|
|
3532
|
+
var containerRef = React.useRef(null);
|
|
3533
|
+
React.useEffect(function () {
|
|
3534
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
3535
|
+
if (!containerRef.current) return;
|
|
3536
|
+
var iframeBoxes = containerRef.current.querySelectorAll(".luckysheet-modal-dialog-iframe");
|
|
3537
|
+
var clickedInsideSomeIframe = Array.from(iframeBoxes).some(function (el) {
|
|
3538
|
+
return el.contains(e.target);
|
|
3539
|
+
});
|
|
3540
|
+
if (!clickedInsideSomeIframe && context.activeIframe !== undefined) {
|
|
3541
|
+
setContext(function (ctx) {
|
|
3542
|
+
ctx.activeIframe = undefined;
|
|
3543
|
+
});
|
|
3544
|
+
}
|
|
3545
|
+
};
|
|
3546
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
3547
|
+
return function () {
|
|
3548
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
3549
|
+
};
|
|
3550
|
+
}, [context.activeIframe, setContext]);
|
|
3551
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3552
|
+
id: "fortune-iframe-boxes",
|
|
3553
|
+
ref: containerRef
|
|
3554
|
+
}, (_context$insertedIfra = context.insertedIframes) === null || _context$insertedIfra === void 0 ? void 0 : _context$insertedIfra.map(function (frame) {
|
|
3555
|
+
var isActive = frame.id === context.activeIframe;
|
|
3556
|
+
var style = {
|
|
3557
|
+
width: frame.width * context.zoomRatio,
|
|
3558
|
+
height: frame.height * context.zoomRatio,
|
|
3559
|
+
left: frame.left * context.zoomRatio,
|
|
3560
|
+
top: frame.top * context.zoomRatio,
|
|
3561
|
+
position: "absolute",
|
|
3562
|
+
padding: 0,
|
|
3563
|
+
zIndex: isActive ? 300 : 200
|
|
3564
|
+
};
|
|
3565
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3566
|
+
key: frame.id,
|
|
3567
|
+
id: isActive ? "fortune-modal-dialog-activeIframe" : frame.id,
|
|
3568
|
+
className: "luckysheet-modal-dialog luckysheet-modal-dialog-iframe",
|
|
3569
|
+
style: style,
|
|
3570
|
+
onClick: function onClick(e) {
|
|
3571
|
+
if (!isActive) {
|
|
3572
|
+
setContext(function (ctx) {
|
|
3573
|
+
ctx.activeIframe = frame.id;
|
|
3574
|
+
});
|
|
3575
|
+
}
|
|
3576
|
+
e.stopPropagation();
|
|
3577
|
+
},
|
|
3578
|
+
onMouseDown: function onMouseDown(e) {
|
|
3579
|
+
if (isActive) {
|
|
3580
|
+
fortuneCore.onIframeMoveStart(context, refs.globalCache, e.nativeEvent);
|
|
3581
|
+
}
|
|
3582
|
+
e.stopPropagation();
|
|
3583
|
+
}
|
|
3584
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3585
|
+
className: "luckysheet-modal-dialog-content",
|
|
3586
|
+
style: {
|
|
3587
|
+
width: "100%",
|
|
3588
|
+
height: "100%",
|
|
3589
|
+
overflow: "hidden"
|
|
3590
|
+
}
|
|
3591
|
+
}, /*#__PURE__*/React__default['default'].createElement("iframe", {
|
|
3592
|
+
title: "iframe-".concat(frame.id),
|
|
3593
|
+
src: frame.src,
|
|
3594
|
+
style: {
|
|
3595
|
+
width: "100%",
|
|
3596
|
+
height: "100%",
|
|
3597
|
+
border: "none",
|
|
3598
|
+
pointerEvents: "none"
|
|
3599
|
+
}
|
|
3600
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3601
|
+
className: "luckysheet-modal-dialog-border"
|
|
3602
|
+
}), isActive && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3603
|
+
className: "luckysheet-modal-dialog-resize"
|
|
3604
|
+
}, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (dir) {
|
|
3605
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3606
|
+
key: dir,
|
|
3607
|
+
className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(dir),
|
|
3608
|
+
"data-type": dir,
|
|
3609
|
+
style: {
|
|
3610
|
+
zIndex: 300,
|
|
3611
|
+
position: "absolute"
|
|
3612
|
+
},
|
|
3613
|
+
onMouseDown: function onMouseDown(e) {
|
|
3614
|
+
fortuneCore.onIframeResizeStart(context, refs.globalCache, e.nativeEvent, dir);
|
|
3615
|
+
e.stopPropagation();
|
|
3616
|
+
}
|
|
3617
|
+
});
|
|
3618
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3619
|
+
className: "luckysheet-modal-dialog-controll"
|
|
3620
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
3621
|
+
className: "luckysheet-modal-controll-btn luckysheet-modal-controll-del",
|
|
3622
|
+
role: "button",
|
|
3623
|
+
tabIndex: 0,
|
|
3624
|
+
title: "Delete",
|
|
3625
|
+
onClick: function onClick() {
|
|
3626
|
+
setContext(function (ctx) {
|
|
3627
|
+
var _ctx$insertedIframes;
|
|
3628
|
+
ctx.insertedIframes = ctx === null || ctx === void 0 ? void 0 : (_ctx$insertedIframes = ctx.insertedIframes) === null || _ctx$insertedIframes === void 0 ? void 0 : _ctx$insertedIframes.filter(function (f) {
|
|
3629
|
+
return f.id !== frame.id;
|
|
3630
|
+
});
|
|
3631
|
+
ctx.activeIframe = undefined;
|
|
3632
|
+
});
|
|
3633
|
+
}
|
|
3634
|
+
}, "DELETE")))));
|
|
3635
|
+
}));
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3643
3638
|
var SheetOverlay = function SheetOverlay() {
|
|
3644
3639
|
var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
|
|
3645
3640
|
var _useContext = React.useContext(WorkbookContext),
|
|
@@ -4082,7 +4077,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4082
4077
|
id: "luckysheet-multipleRange-show"
|
|
4083
4078
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4084
4079
|
id: "luckysheet-dynamicArray-hightShow"
|
|
4085
|
-
}), /*#__PURE__*/React__default['default'].createElement(ImgBoxs, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4080
|
+
}), /*#__PURE__*/React__default['default'].createElement(ImgBoxs, null), /*#__PURE__*/React__default['default'].createElement(IframeBoxs, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4086
4081
|
id: "luckysheet-dataVerification-dropdown-btn",
|
|
4087
4082
|
onClick: function onClick() {
|
|
4088
4083
|
setContext(function (ctx) {
|
|
@@ -4095,8 +4090,9 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4095
4090
|
display: "none"
|
|
4096
4091
|
}
|
|
4097
4092
|
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
4098
|
-
name: "
|
|
4099
|
-
width: 16
|
|
4093
|
+
name: "caret-down-fill",
|
|
4094
|
+
width: 16,
|
|
4095
|
+
height: 16
|
|
4100
4096
|
})), context.dataVerificationDropDownList && /*#__PURE__*/React__default['default'].createElement(DropDownList, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4101
4097
|
id: "luckysheet-dataVerification-showHintBox",
|
|
4102
4098
|
className: "luckysheet-mousedown-cancel",
|
|
@@ -4415,6 +4411,9 @@ var Combo = function Combo(_ref) {
|
|
|
4415
4411
|
setPopupPosition = _useState4[1];
|
|
4416
4412
|
var popupRef = React.useRef(null);
|
|
4417
4413
|
var buttonRef = React.useRef(null);
|
|
4414
|
+
var isLucideIcon = React.useMemo(function () {
|
|
4415
|
+
return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip"].includes(iconId);
|
|
4416
|
+
}, [iconId]);
|
|
4418
4417
|
useOutsideClick(popupRef, function () {
|
|
4419
4418
|
setOpen(false);
|
|
4420
4419
|
});
|
|
@@ -4442,7 +4441,7 @@ var Combo = function Combo(_ref) {
|
|
|
4442
4441
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4443
4442
|
ref: buttonRef,
|
|
4444
4443
|
className: "fortune-toolbar-combo"
|
|
4445
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4444
|
+
}, !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
4446
4445
|
className: "fortune-toolbar-combo-button",
|
|
4447
4446
|
onClick: function onClick(e) {
|
|
4448
4447
|
if (_onClick) {
|
|
@@ -4461,7 +4460,13 @@ var Combo = function Combo(_ref) {
|
|
|
4461
4460
|
name: iconId
|
|
4462
4461
|
})) : (/*#__PURE__*/React__default['default'].createElement("span", {
|
|
4463
4462
|
className: "fortune-toolbar-combo-text"
|
|
4464
|
-
}, text !== undefined ? text : "")))
|
|
4463
|
+
}, text !== undefined ? text : "")))) : (/*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
|
|
4464
|
+
icon: getIcon(iconId),
|
|
4465
|
+
variant: "ghost",
|
|
4466
|
+
onClick: function onClick() {
|
|
4467
|
+
return setOpen(!open);
|
|
4468
|
+
}
|
|
4469
|
+
})), showArrow && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
4465
4470
|
className: "fortune-toolbar-combo-arrow",
|
|
4466
4471
|
onClick: function onClick() {
|
|
4467
4472
|
return setOpen(!open);
|
|
@@ -5366,6 +5371,121 @@ var FormatSearch = function FormatSearch(_ref) {
|
|
|
5366
5371
|
}, button.cancel)));
|
|
5367
5372
|
};
|
|
5368
5373
|
|
|
5374
|
+
var DuneChartsInputModal = function DuneChartsInputModal(_ref) {
|
|
5375
|
+
var isOpen = _ref.isOpen,
|
|
5376
|
+
onClose = _ref.onClose,
|
|
5377
|
+
onSubmit = _ref.onSubmit,
|
|
5378
|
+
icon = _ref.icon,
|
|
5379
|
+
_ref$submitText = _ref.submitText,
|
|
5380
|
+
submitText = _ref$submitText === void 0 ? "Submit" : _ref$submitText,
|
|
5381
|
+
_ref$placeholder = _ref.placeholder,
|
|
5382
|
+
placeholder = _ref$placeholder === void 0 ? "Enter a value..." : _ref$placeholder;
|
|
5383
|
+
var _useState = React.useState(""),
|
|
5384
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5385
|
+
url = _useState2[0],
|
|
5386
|
+
setUrl = _useState2[1];
|
|
5387
|
+
var _useState3 = React.useState(false),
|
|
5388
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5389
|
+
showError = _useState4[0],
|
|
5390
|
+
setShowError = _useState4[1];
|
|
5391
|
+
var inputRef = React.useRef(null);
|
|
5392
|
+
React.useEffect(function () {
|
|
5393
|
+
if (isOpen && inputRef.current) {
|
|
5394
|
+
var timer = setTimeout(function () {
|
|
5395
|
+
var _inputRef$current;
|
|
5396
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
5397
|
+
}, 100);
|
|
5398
|
+
return function () {
|
|
5399
|
+
return clearTimeout(timer);
|
|
5400
|
+
};
|
|
5401
|
+
}
|
|
5402
|
+
return undefined;
|
|
5403
|
+
}, [isOpen]);
|
|
5404
|
+
if (!isOpen) return null;
|
|
5405
|
+
var handleSubmit = function handleSubmit() {
|
|
5406
|
+
var trimmed = url.trim();
|
|
5407
|
+
if (trimmed && fortuneCore.sanitizeDuneUrl(trimmed)) {
|
|
5408
|
+
onSubmit(trimmed);
|
|
5409
|
+
setUrl("");
|
|
5410
|
+
setShowError(false);
|
|
5411
|
+
onClose();
|
|
5412
|
+
} else {
|
|
5413
|
+
setShowError(true);
|
|
5414
|
+
}
|
|
5415
|
+
};
|
|
5416
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
5417
|
+
e.stopPropagation();
|
|
5418
|
+
if (e.key === "Enter") {
|
|
5419
|
+
handleSubmit();
|
|
5420
|
+
}
|
|
5421
|
+
};
|
|
5422
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5423
|
+
className: "custom-overlay",
|
|
5424
|
+
onClick: onClose
|
|
5425
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5426
|
+
className: "input-modal",
|
|
5427
|
+
style: {
|
|
5428
|
+
transformOrigin: "top center"
|
|
5429
|
+
},
|
|
5430
|
+
onClick: function onClick(e) {
|
|
5431
|
+
return e.stopPropagation();
|
|
5432
|
+
},
|
|
5433
|
+
onKeyDown: handleKeyDown
|
|
5434
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5435
|
+
className: "modal-header"
|
|
5436
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
5437
|
+
name: icon
|
|
5438
|
+
}), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
5439
|
+
ref: inputRef,
|
|
5440
|
+
className: "modal-input",
|
|
5441
|
+
type: "text",
|
|
5442
|
+
placeholder: placeholder,
|
|
5443
|
+
value: url,
|
|
5444
|
+
onChange: function onChange(e) {
|
|
5445
|
+
setUrl(e.target.value);
|
|
5446
|
+
setShowError(false);
|
|
5447
|
+
},
|
|
5448
|
+
onKeyDown: handleKeyDown
|
|
5449
|
+
})), showError && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
5450
|
+
className: "modal-error-message"
|
|
5451
|
+
}, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
5452
|
+
style: {
|
|
5453
|
+
width: "14px",
|
|
5454
|
+
height: "14px"
|
|
5455
|
+
},
|
|
5456
|
+
name: "circle-alert"
|
|
5457
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "Please make sure the URL is a valid Dune chart link"))), url.length > 0 && !showError && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
5458
|
+
className: "modal-footer"
|
|
5459
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
5460
|
+
onClick: handleSubmit,
|
|
5461
|
+
className: "modal-button"
|
|
5462
|
+
}, submitText)))));
|
|
5463
|
+
};
|
|
5464
|
+
|
|
5465
|
+
var getIcon = function getIcon(title) {
|
|
5466
|
+
switch (title) {
|
|
5467
|
+
case "align-left":
|
|
5468
|
+
return "AlignLeft";
|
|
5469
|
+
case "align-center":
|
|
5470
|
+
return "AlignCenter";
|
|
5471
|
+
case "align-right":
|
|
5472
|
+
return "AlignRight";
|
|
5473
|
+
case "align-top":
|
|
5474
|
+
return "ArrowUpFromLine";
|
|
5475
|
+
case "align-middle":
|
|
5476
|
+
return "AlignVerticalMiddle";
|
|
5477
|
+
case "align-bottom":
|
|
5478
|
+
return "ArrowDownFromLine";
|
|
5479
|
+
case "text-overflow":
|
|
5480
|
+
return "TextOverflow";
|
|
5481
|
+
case "text-wrap":
|
|
5482
|
+
return "WrapText";
|
|
5483
|
+
case "text-clip":
|
|
5484
|
+
return "TextClip";
|
|
5485
|
+
default:
|
|
5486
|
+
return "";
|
|
5487
|
+
}
|
|
5488
|
+
};
|
|
5369
5489
|
var Toolbar = function Toolbar(_ref) {
|
|
5370
5490
|
var _context$luckysheet_s, _flowdata$row, _settings$customToolb;
|
|
5371
5491
|
var setMoreItems = _ref.setMoreItems,
|
|
@@ -5387,6 +5507,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5387
5507
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
5388
5508
|
itemLocations = _useState4[0],
|
|
5389
5509
|
setItemLocations = _useState4[1];
|
|
5510
|
+
var _useState5 = React.useState(false),
|
|
5511
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5512
|
+
showDuneModal = _useState6[0],
|
|
5513
|
+
setShowDuneModal = _useState6[1];
|
|
5390
5514
|
var _useDialog = useDialog(),
|
|
5391
5515
|
showDialog = _useDialog.showDialog,
|
|
5392
5516
|
hideDialog = _useDialog.hideDialog;
|
|
@@ -5417,12 +5541,12 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5417
5541
|
var sheetWidth = context.luckysheetTableContentHW[0];
|
|
5418
5542
|
var currency = settings.currency;
|
|
5419
5543
|
var defaultFormat = defaultFmt(currency);
|
|
5420
|
-
var
|
|
5421
|
-
_useState6 = _slicedToArray(_useState5, 1),
|
|
5422
|
-
customColor = _useState6[0];
|
|
5423
|
-
var _useState7 = React.useState("1"),
|
|
5544
|
+
var _useState7 = React.useState("#000000"),
|
|
5424
5545
|
_useState8 = _slicedToArray(_useState7, 1),
|
|
5425
|
-
|
|
5546
|
+
customColor = _useState8[0];
|
|
5547
|
+
var _useState9 = React.useState("1"),
|
|
5548
|
+
_useState0 = _slicedToArray(_useState9, 1),
|
|
5549
|
+
customStyle = _useState0[0];
|
|
5426
5550
|
var showSubMenu = React.useCallback(function (e, className) {
|
|
5427
5551
|
var target = e.target;
|
|
5428
5552
|
var menuItem = target.className === "fortune-toolbar-menu-line" ? target.parentElement : target;
|
|
@@ -5702,27 +5826,38 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5702
5826
|
tooltip: toolbar.horizontalAlign,
|
|
5703
5827
|
showArrow: false
|
|
5704
5828
|
}, function (setOpen) {
|
|
5705
|
-
return /*#__PURE__*/React__default['default'].createElement(Select,
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5829
|
+
return /*#__PURE__*/React__default['default'].createElement(Select, {
|
|
5830
|
+
style: {
|
|
5831
|
+
minWidth: "fit-content",
|
|
5832
|
+
display: "flex",
|
|
5833
|
+
flexDirection: "row",
|
|
5834
|
+
alignItems: "center",
|
|
5835
|
+
justifyContent: "center",
|
|
5836
|
+
gap: 4
|
|
5837
|
+
}
|
|
5838
|
+
}, items.map(function (_ref3) {
|
|
5839
|
+
var _$find2;
|
|
5840
|
+
var title = _ref3.title;
|
|
5841
|
+
return /*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
|
|
5709
5842
|
key: title,
|
|
5843
|
+
isActive: ((_$find2 = ___default['default'].find(items, function (item) {
|
|
5844
|
+
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.ht);
|
|
5845
|
+
})) === null || _$find2 === void 0 ? void 0 : _$find2.title) === title,
|
|
5846
|
+
icon: getIcon(title),
|
|
5847
|
+
variant: "ghost",
|
|
5710
5848
|
onClick: function onClick() {
|
|
5711
5849
|
setContext(function (ctx) {
|
|
5712
5850
|
fortuneCore.handleHorizontalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
|
|
5713
5851
|
});
|
|
5714
5852
|
setOpen(false);
|
|
5715
|
-
}
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
}, text, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
5719
|
-
name: title
|
|
5720
|
-
})));
|
|
5853
|
+
},
|
|
5854
|
+
tabIndex: 0
|
|
5855
|
+
});
|
|
5721
5856
|
}));
|
|
5722
5857
|
});
|
|
5723
5858
|
}
|
|
5724
5859
|
if (name === "vertical-align") {
|
|
5725
|
-
var _$
|
|
5860
|
+
var _$find3;
|
|
5726
5861
|
var _items = [{
|
|
5727
5862
|
title: "align-top",
|
|
5728
5863
|
text: align.top,
|
|
@@ -5737,29 +5872,40 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5737
5872
|
value: 2
|
|
5738
5873
|
}];
|
|
5739
5874
|
return /*#__PURE__*/React__default['default'].createElement(Combo, {
|
|
5740
|
-
iconId: ((_$
|
|
5875
|
+
iconId: ((_$find3 = ___default['default'].find(_items, function (item) {
|
|
5741
5876
|
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
5742
|
-
})) === null || _$
|
|
5877
|
+
})) === null || _$find3 === void 0 ? void 0 : _$find3.title) || "align-top",
|
|
5743
5878
|
key: name,
|
|
5744
5879
|
tooltip: toolbar.verticalAlign,
|
|
5745
5880
|
showArrow: false
|
|
5746
5881
|
}, function (setOpen) {
|
|
5747
|
-
return /*#__PURE__*/React__default['default'].createElement(Select,
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5882
|
+
return /*#__PURE__*/React__default['default'].createElement(Select, {
|
|
5883
|
+
style: {
|
|
5884
|
+
minWidth: "fit-content",
|
|
5885
|
+
display: "flex",
|
|
5886
|
+
flexDirection: "row",
|
|
5887
|
+
alignItems: "center",
|
|
5888
|
+
justifyContent: "center",
|
|
5889
|
+
gap: 4
|
|
5890
|
+
}
|
|
5891
|
+
}, _items.map(function (_ref4) {
|
|
5892
|
+
var _$find4;
|
|
5893
|
+
var title = _ref4.title;
|
|
5894
|
+
return /*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
|
|
5751
5895
|
key: title,
|
|
5896
|
+
isActive: ((_$find4 = ___default['default'].find(_items, function (item) {
|
|
5897
|
+
return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
|
|
5898
|
+
})) === null || _$find4 === void 0 ? void 0 : _$find4.title) === title,
|
|
5899
|
+
icon: getIcon(title),
|
|
5900
|
+
variant: "ghost",
|
|
5752
5901
|
onClick: function onClick() {
|
|
5753
5902
|
setContext(function (ctx) {
|
|
5754
5903
|
fortuneCore.handleVerticalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
|
|
5755
5904
|
});
|
|
5756
5905
|
setOpen(false);
|
|
5757
|
-
}
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
}, text, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
5761
|
-
name: title
|
|
5762
|
-
})));
|
|
5906
|
+
},
|
|
5907
|
+
tabIndex: 0
|
|
5908
|
+
});
|
|
5763
5909
|
}));
|
|
5764
5910
|
});
|
|
5765
5911
|
}
|
|
@@ -5834,7 +5980,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
5834
5980
|
key: name,
|
|
5835
5981
|
onClick: function onClick() {
|
|
5836
5982
|
if (context.allowEdit === false) return;
|
|
5837
|
-
showDialog(/*#__PURE__*/React__default['default'].createElement(DataVerification, null));
|
|
5983
|
+
showDialog(/*#__PURE__*/React__default['default'].createElement(DataVerification, null), undefined, toolbar.dataVerification);
|
|
5838
5984
|
}
|
|
5839
5985
|
});
|
|
5840
5986
|
}
|
|
@@ -6308,12 +6454,23 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6308
6454
|
tooltip: toolbar.textWrap,
|
|
6309
6455
|
showArrow: false
|
|
6310
6456
|
}, function (setOpen) {
|
|
6311
|
-
return /*#__PURE__*/React__default['default'].createElement(Select,
|
|
6312
|
-
|
|
6313
|
-
|
|
6457
|
+
return /*#__PURE__*/React__default['default'].createElement(Select, {
|
|
6458
|
+
style: {
|
|
6459
|
+
minWidth: "fit-content",
|
|
6460
|
+
display: "flex",
|
|
6461
|
+
flexDirection: "row",
|
|
6462
|
+
alignItems: "center",
|
|
6463
|
+
justifyContent: "center",
|
|
6464
|
+
gap: 4
|
|
6465
|
+
}
|
|
6466
|
+
}, _items6.map(function (_ref1) {
|
|
6467
|
+
var iconId = _ref1.iconId,
|
|
6314
6468
|
value = _ref1.value;
|
|
6315
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
6469
|
+
return /*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
|
|
6316
6470
|
key: value,
|
|
6471
|
+
isActive: _curr.value === value,
|
|
6472
|
+
icon: getIcon(iconId),
|
|
6473
|
+
variant: "ghost",
|
|
6317
6474
|
onClick: function onClick() {
|
|
6318
6475
|
setContext(function (ctx) {
|
|
6319
6476
|
var d = fortuneCore.getFlowdata(ctx);
|
|
@@ -6321,12 +6478,9 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6321
6478
|
fortuneCore.updateFormat(ctx, refs.cellInput.current, d, "tb", value);
|
|
6322
6479
|
});
|
|
6323
6480
|
setOpen(false);
|
|
6324
|
-
}
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
}, text, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
|
|
6328
|
-
name: iconId
|
|
6329
|
-
})));
|
|
6481
|
+
},
|
|
6482
|
+
tabIndex: 0
|
|
6483
|
+
});
|
|
6330
6484
|
}));
|
|
6331
6485
|
});
|
|
6332
6486
|
}
|
|
@@ -6477,7 +6631,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6477
6631
|
});
|
|
6478
6632
|
}
|
|
6479
6633
|
});
|
|
6480
|
-
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFormat, align, handleUndo, handleRedo, flowdata, formula,
|
|
6634
|
+
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFormat, align, handleUndo, handleRedo, flowdata, formula, showDuneModal, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
6481
6635
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6482
6636
|
ref: containerRef,
|
|
6483
6637
|
className: "fortune-toolbar",
|
|
@@ -6532,7 +6686,29 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6532
6686
|
icon: n.icon,
|
|
6533
6687
|
iconName: n.iconName
|
|
6534
6688
|
}, n.children);
|
|
6535
|
-
})
|
|
6689
|
+
}), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
6690
|
+
iconId: "dune-logo",
|
|
6691
|
+
tooltip: "Insert Dune Chart",
|
|
6692
|
+
key: "dune-charts",
|
|
6693
|
+
onClick: function onClick() {
|
|
6694
|
+
if (context.allowEdit === false) return;
|
|
6695
|
+
setShowDuneModal(true);
|
|
6696
|
+
}
|
|
6697
|
+
}), showDuneModal && (/*#__PURE__*/React__default['default'].createElement(DuneChartsInputModal, {
|
|
6698
|
+
isOpen: showDuneModal,
|
|
6699
|
+
onSubmit: function onSubmit(url) {
|
|
6700
|
+
setContext(function (draftCtx) {
|
|
6701
|
+
fortuneCore.insertDuneChart(draftCtx, url);
|
|
6702
|
+
});
|
|
6703
|
+
setShowDuneModal(false);
|
|
6704
|
+
},
|
|
6705
|
+
onClose: function onClose() {
|
|
6706
|
+
return setShowDuneModal(false);
|
|
6707
|
+
},
|
|
6708
|
+
icon: "dune-logo",
|
|
6709
|
+
placeholder: "Add Dune chart link to embed",
|
|
6710
|
+
submitText: "Embed Dune chart"
|
|
6711
|
+
})));
|
|
6536
6712
|
};
|
|
6537
6713
|
|
|
6538
6714
|
var LocationBox = function LocationBox() {
|
|
@@ -9663,6 +9839,74 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9663
9839
|
"clip-rule": "evenodd",
|
|
9664
9840
|
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",
|
|
9665
9841
|
fill: "#363B3F"
|
|
9842
|
+
})), /*#__PURE__*/React__default['default'].createElement("symbol", {
|
|
9843
|
+
id: "dune-logo",
|
|
9844
|
+
viewBox: "0 0 18 16",
|
|
9845
|
+
fill: "none"
|
|
9846
|
+
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
9847
|
+
width: "18",
|
|
9848
|
+
height: "16",
|
|
9849
|
+
viewBox: "0 0 18 16",
|
|
9850
|
+
fill: "none",
|
|
9851
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9852
|
+
}, /*#__PURE__*/React__default['default'].createElement("g", {
|
|
9853
|
+
"clip-path": "url(#clip0_80_246690)"
|
|
9854
|
+
}, /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9855
|
+
d: "M7.99485 15.9875C12.4102 15.9875 15.9896 12.4085 15.9896 7.99373C15.9896 3.57891 12.4102 0 7.99485 0C3.57941 0 0 3.57891 0 7.99373C0 12.4085 3.57941 15.9875 7.99485 15.9875Z",
|
|
9856
|
+
fill: "#F4603E"
|
|
9857
|
+
}), /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9858
|
+
d: "M1.39258 12.5028C1.39258 12.5028 6.67562 10.7723 15.9868 7.73633C15.9868 7.73633 16.4968 12.7082 11.3424 15.3015C11.3424 15.3015 8.80068 16.5197 6.01215 15.7383C6.01215 15.7383 3.23545 15.2142 1.39258 12.5028Z",
|
|
9859
|
+
fill: "#1E1870"
|
|
9860
|
+
})), /*#__PURE__*/React__default['default'].createElement("defs", null, /*#__PURE__*/React__default['default'].createElement("clipPath", {
|
|
9861
|
+
id: "clip0_80_246690"
|
|
9862
|
+
}, /*#__PURE__*/React__default['default'].createElement("rect", {
|
|
9863
|
+
width: "16",
|
|
9864
|
+
height: "16",
|
|
9865
|
+
fill: "white"
|
|
9866
|
+
}))))), /*#__PURE__*/React__default['default'].createElement("symbol", {
|
|
9867
|
+
id: "circle-alert",
|
|
9868
|
+
viewBox: "0 0 14 14",
|
|
9869
|
+
fill: "none"
|
|
9870
|
+
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
9871
|
+
width: "14",
|
|
9872
|
+
height: "14",
|
|
9873
|
+
viewBox: "0 0 14 14",
|
|
9874
|
+
fill: "none",
|
|
9875
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9876
|
+
}, /*#__PURE__*/React__default['default'].createElement("g", {
|
|
9877
|
+
"clip-path": "url(#clip0_138_127604)"
|
|
9878
|
+
}, /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9879
|
+
d: "M6.99967 4.0835C7.32184 4.0835 7.58301 4.34466 7.58301 4.66683V7.00016C7.58301 7.32233 7.32184 7.5835 6.99967 7.5835C6.67751 7.5835 6.41634 7.32233 6.41634 7.00016V4.66683C6.41634 4.34466 6.67751 4.0835 6.99967 4.0835Z",
|
|
9880
|
+
fill: "#FB3449"
|
|
9881
|
+
}), /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9882
|
+
d: "M6.99967 8.75016C6.67751 8.75016 6.41634 9.01133 6.41634 9.3335C6.41634 9.65566 6.67751 9.91683 6.99967 9.91683H7.00551C7.32767 9.91683 7.58884 9.65566 7.58884 9.3335C7.58884 9.01133 7.32767 8.75016 7.00551 8.75016H6.99967Z",
|
|
9883
|
+
fill: "#FB3449"
|
|
9884
|
+
}), /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9885
|
+
"fill-rule": "evenodd",
|
|
9886
|
+
"clip-rule": "evenodd",
|
|
9887
|
+
d: "M0.583008 7.00016C0.583008 3.45634 3.45585 0.583496 6.99967 0.583496C10.5435 0.583496 13.4163 3.45634 13.4163 7.00016C13.4163 10.544 10.5435 13.4168 6.99967 13.4168C3.45585 13.4168 0.583008 10.544 0.583008 7.00016ZM6.99967 1.75016C4.10018 1.75016 1.74967 4.10067 1.74967 7.00016C1.74967 9.89966 4.10018 12.2502 6.99967 12.2502C9.89917 12.2502 12.2497 9.89966 12.2497 7.00016C12.2497 4.10067 9.89917 1.75016 6.99967 1.75016Z",
|
|
9888
|
+
fill: "#FB3449"
|
|
9889
|
+
})), /*#__PURE__*/React__default['default'].createElement("defs", null, /*#__PURE__*/React__default['default'].createElement("clipPath", {
|
|
9890
|
+
id: "clip0_138_127604"
|
|
9891
|
+
}, /*#__PURE__*/React__default['default'].createElement("rect", {
|
|
9892
|
+
width: "14",
|
|
9893
|
+
height: "14",
|
|
9894
|
+
fill: "white"
|
|
9895
|
+
}))))), /*#__PURE__*/React__default['default'].createElement("symbol", {
|
|
9896
|
+
id: "caret-down-fill",
|
|
9897
|
+
width: "14",
|
|
9898
|
+
height: "14",
|
|
9899
|
+
viewBox: "0 0 14 14",
|
|
9900
|
+
fill: "none"
|
|
9901
|
+
}, /*#__PURE__*/React__default['default'].createElement("rect", {
|
|
9902
|
+
width: "14",
|
|
9903
|
+
height: "14",
|
|
9904
|
+
rx: "4",
|
|
9905
|
+
fill: "black",
|
|
9906
|
+
"fill-opacity": "0.1"
|
|
9907
|
+
}), /*#__PURE__*/React__default['default'].createElement("path", {
|
|
9908
|
+
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",
|
|
9909
|
+
fill: "#363B3F"
|
|
9666
9910
|
}))));
|
|
9667
9911
|
};
|
|
9668
9912
|
|
|
@@ -11025,6 +11269,48 @@ var SheetList = function SheetList() {
|
|
|
11025
11269
|
}));
|
|
11026
11270
|
};
|
|
11027
11271
|
|
|
11272
|
+
var DunePreview = function DunePreview(_ref) {
|
|
11273
|
+
var url = _ref.url,
|
|
11274
|
+
position = _ref.position,
|
|
11275
|
+
onKeepAsLink = _ref.onKeepAsLink,
|
|
11276
|
+
onEmbed = _ref.onEmbed;
|
|
11277
|
+
var embedUrl = fortuneCore.sanitizeDuneUrl(url);
|
|
11278
|
+
if (!embedUrl) return null;
|
|
11279
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11280
|
+
className: "fortune-dune-preview",
|
|
11281
|
+
style: {
|
|
11282
|
+
left: position.left,
|
|
11283
|
+
top: position.top
|
|
11284
|
+
},
|
|
11285
|
+
onClick: function onClick(e) {
|
|
11286
|
+
return e.stopPropagation();
|
|
11287
|
+
}
|
|
11288
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11289
|
+
className: "fortune-dune-preview-header"
|
|
11290
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
11291
|
+
className: "fortune-dune-preview-title"
|
|
11292
|
+
}, "Detected Dune chart link")), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11293
|
+
className: "fortune-dune-preview-content"
|
|
11294
|
+
}, /*#__PURE__*/React__default['default'].createElement("iframe", {
|
|
11295
|
+
src: embedUrl,
|
|
11296
|
+
title: "Dune Chart Preview",
|
|
11297
|
+
style: {
|
|
11298
|
+
width: "100%",
|
|
11299
|
+
height: "100%",
|
|
11300
|
+
border: "none"
|
|
11301
|
+
}
|
|
11302
|
+
})), /*#__PURE__*/React__default['default'].createElement("p", null, "Do you want to insert Dune chart?"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11303
|
+
className: "fortune-dune-preview-footer"
|
|
11304
|
+
}, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
11305
|
+
variant: "ghost",
|
|
11306
|
+
onClick: onKeepAsLink,
|
|
11307
|
+
className: "!w-fit px-0"
|
|
11308
|
+
}, "Keep as Link"), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
11309
|
+
onClick: onEmbed,
|
|
11310
|
+
className: "!w-fit px-0"
|
|
11311
|
+
}, "Embed")));
|
|
11312
|
+
};
|
|
11313
|
+
|
|
11028
11314
|
var _excluded = ["onChange", "onOp", "data"];
|
|
11029
11315
|
produce.enablePatches();
|
|
11030
11316
|
var triggerGroupValuesRefresh = function triggerGroupValuesRefresh(ctx) {
|
|
@@ -11557,7 +11843,25 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
11557
11843
|
style: {
|
|
11558
11844
|
width: "60px"
|
|
11559
11845
|
}
|
|
11560
|
-
}, formula.count, ": ", calInfo.count)), !!calInfo.numberC && !!calInfo.sum && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.sum, ": ", calInfo.sum)), !!calInfo.numberC && !!calInfo.average && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.average, ": ", calInfo.average)), !!calInfo.numberC && !!calInfo.max && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.max, ": ", calInfo.max)), !!calInfo.numberC && !!calInfo.min && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.min, ": ", calInfo.min))))
|
|
11846
|
+
}, formula.count, ": ", calInfo.count)), !!calInfo.numberC && !!calInfo.sum && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.sum, ": ", calInfo.sum)), !!calInfo.numberC && !!calInfo.average && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.average, ": ", calInfo.average)), !!calInfo.numberC && !!calInfo.max && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.max, ": ", calInfo.max)), !!calInfo.numberC && !!calInfo.min && (/*#__PURE__*/React__default['default'].createElement("div", null, formula.min, ": ", calInfo.min)))), context.showDunePreview && (/*#__PURE__*/React__default['default'].createElement(DunePreview, {
|
|
11847
|
+
url: context.showDunePreview.url,
|
|
11848
|
+
position: context.showDunePreview.position,
|
|
11849
|
+
onKeepAsLink: function onKeepAsLink() {
|
|
11850
|
+
setContextWithProduce(function (draftCtx) {
|
|
11851
|
+
draftCtx.showDunePreview = undefined;
|
|
11852
|
+
}, {
|
|
11853
|
+
noHistory: true
|
|
11854
|
+
});
|
|
11855
|
+
},
|
|
11856
|
+
onEmbed: function onEmbed() {
|
|
11857
|
+
setContextWithProduce(function (draftCtx) {
|
|
11858
|
+
fortuneCore.insertDuneChart(draftCtx, context.showDunePreview.url);
|
|
11859
|
+
draftCtx.showDunePreview = undefined;
|
|
11860
|
+
}, {
|
|
11861
|
+
noHistory: true
|
|
11862
|
+
});
|
|
11863
|
+
}
|
|
11864
|
+
})))));
|
|
11561
11865
|
});
|
|
11562
11866
|
|
|
11563
11867
|
exports.Workbook = Workbook;
|