@fileverse-dev/fortune-react 1.0.2-mod-40 → 1.0.2-mod-41

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.
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./duneChartsInputModal.css";
3
+ interface DuneChartsInputModalProps {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ onSubmit: (value: string) => void;
7
+ icon: string;
8
+ submitText?: string;
9
+ placeholder?: string;
10
+ }
11
+ declare const DuneChartsInputModal: ({ isOpen, onClose, onSubmit, icon, submitText, placeholder, }: DuneChartsInputModalProps) => React.JSX.Element | null;
12
+ export default DuneChartsInputModal;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ interface DunePreviewProps {
4
+ url: string;
5
+ position: {
6
+ left: number;
7
+ top: number;
8
+ };
9
+ onKeepAsLink: () => void;
10
+ onEmbed: () => void;
11
+ }
12
+ declare const DunePreview: React.FC<DunePreviewProps>;
13
+ export default DunePreview;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IframeBoxs: React.FC;
3
+ export default IframeBoxs;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import "./index.css";
3
+ export declare const getIcon: (title: string) => "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownFromLine" | "TextOverflow" | "WrapText" | "TextClip" | "";
3
4
  declare const Toolbar: React.FC<{
4
5
  setMoreItems: React.Dispatch<React.SetStateAction<React.ReactNode>>;
5
6
  moreItemsOpen: boolean;
@@ -55,6 +55,14 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
55
55
  data?: CellMatrix | undefined;
56
56
  id?: string | undefined;
57
57
  images?: import("@fileverse-dev/fortune-core").Image[] | undefined;
58
+ iframes?: {
59
+ id: string;
60
+ src: string;
61
+ left: number;
62
+ top: number;
63
+ width: number;
64
+ height: number;
65
+ }[] | undefined;
58
66
  zoomRatio?: number | undefined;
59
67
  column?: number | undefined;
60
68
  row?: number | undefined;
@@ -1164,4 +1172,5 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
1164
1172
  support: string;
1165
1173
  };
1166
1174
  };
1175
+ getWorkbookContect: () => Context;
1167
1176
  };
@@ -1,4 +1,4 @@
1
- import { Settings, CellWithRowAndCol, Sheet as SheetType, Op, CellMatrix } from "@fileverse-dev/fortune-core";
1
+ import { Settings, Context, CellWithRowAndCol, Sheet as SheetType, Op, CellMatrix } from "@fileverse-dev/fortune-core";
2
2
  import React from "react";
3
3
  import "./index.css";
4
4
  import { generateAPIs } from "./api";
@@ -62,6 +62,14 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
62
62
  data?: CellMatrix | undefined;
63
63
  id?: string | undefined;
64
64
  images?: import("@fileverse-dev/fortune-core").Image[] | undefined;
65
+ iframes?: {
66
+ id: string;
67
+ src: string;
68
+ left: number;
69
+ top: number;
70
+ width: number;
71
+ height: number;
72
+ }[] | undefined;
65
73
  zoomRatio?: number | undefined;
66
74
  column?: number | undefined;
67
75
  row?: number | undefined;
@@ -1171,5 +1179,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
1171
1179
  support: string;
1172
1180
  };
1173
1181
  };
1182
+ getWorkbookContect: () => Context;
1174
1183
  }>>;
1175
1184
  export default Workbook;
package/dist/index.css CHANGED
@@ -987,28 +987,32 @@ html::-webkit-scrollbar-button {
987
987
 
988
988
  #luckysheet-dataVerification-showHintBox {
989
989
  display: none;
990
- padding: 10px;
991
- background-color: #ffffff;
992
- border: 1px solid #ccc;
990
+ padding: 8px;
991
+ min-width: 132px;
992
+ background-color: hsl(var(--color-bg-default));
993
+ border: 1px solid hsl(var(--color-border-default));
994
+ border-left: 4px solid #f4874a !important;
995
+ border-radius: 4px;
993
996
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
994
997
  position: absolute;
998
+ transform: translateY(4px);
995
999
  z-index: 1000;
996
1000
  -webkit-user-select: none;
997
1001
  -moz-user-select: none;
998
1002
  user-select: none;
999
1003
  cursor: default;
1000
1004
  white-space: nowrap;
1001
- font-size: 12px;
1005
+ font-size: 14px;
1002
1006
  }
1003
1007
 
1004
1008
  #luckysheet-dataVerification-dropdown-btn {
1005
1009
  display: none;
1006
- width: 20px;
1007
- height: 20px;
1008
- background-color: #ffffff;
1010
+ padding: 1px;
1009
1011
  position: absolute;
1012
+ transform: translateY(15%);
1010
1013
  z-index: 10;
1011
1014
  overflow: hidden;
1015
+ cursor: pointer !important;
1012
1016
  }
1013
1017
 
1014
1018
  .luckysheet-formula-search-c {
@@ -1133,7 +1137,7 @@ html::-webkit-scrollbar-button {
1133
1137
  .luckysheet-formula-help-content {
1134
1138
  display: flex;
1135
1139
  flex-direction: column;
1136
- /* gap: 8px; */
1140
+ gap: 8px;
1137
1141
  }
1138
1142
 
1139
1143
  .luckysheet-formula-help-content-param {
@@ -1173,6 +1177,14 @@ font-style: normal;
1173
1177
  font-weight: 400;
1174
1178
  line-height: 16px; /* 133.333% */
1175
1179
  }
1180
+ .example-value-code {
1181
+ color: var(--color-text-default, #363B3F);
1182
+
1183
+ font-size: var(--font-size-2xsm, 12px);
1184
+ font-style: normal;
1185
+ font-weight: 400;
1186
+ line-height: 16px; /* 133.333% */
1187
+ }
1176
1188
 
1177
1189
  .formula-title {
1178
1190
  display: flex;
@@ -1196,7 +1208,7 @@ line-height: 16px; /* 133.333% */
1196
1208
  }
1197
1209
 
1198
1210
  .luckysheet-arguments-help-parameter-content {
1199
- padding: 1px 10px;
1211
+ padding: 1px 0px;
1200
1212
  display: inline-block;
1201
1213
  word-wrap: break-word;
1202
1214
  }
@@ -1806,8 +1818,7 @@ line-height: 16px; /* 133.333% */
1806
1818
  }
1807
1819
 
1808
1820
  #fortune-data-verification {
1809
- min-width: 500px;
1810
- padding: 10px 0px;
1821
+ min-width: 510px;
1811
1822
  -webkit-user-select: none;
1812
1823
  -moz-user-select: none;
1813
1824
  user-select: none;
@@ -1984,25 +1995,38 @@ line-height: 16px; /* 133.333% */
1984
1995
  }
1985
1996
 
1986
1997
  #luckysheet-dataVerification-dropdown-List {
1987
- background-color: #fff;
1988
- border: 1px solid #ccc;
1998
+ background-color: hsl(var(--color-bg-default));
1999
+ border: 1px solid hsl(var(--color-border-default));
2000
+ border-radius: 8px;
1989
2001
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
2002
+ transform: translateY(4px);
1990
2003
  position: absolute;
1991
2004
  z-index: 10000;
1992
2005
  box-sizing: border-box;
1993
- font-size: 12px;
2006
+ font-size: 14px;
2007
+ padding: 8px;
2008
+ min-width: 160px;
1994
2009
  }
1995
2010
 
1996
2011
  #luckysheet-dataVerification-dropdown-List .dropdown-List-item {
1997
- padding: 5px 10px;
2012
+ padding: 4px 8px;
1998
2013
  box-sizing: border-box;
1999
- cursor: pointer;
2014
+ cursor: pointer !important;
2015
+ border-radius: 4px;
2000
2016
  }
2001
2017
 
2002
2018
  #luckysheet-dataVerification-dropdown-List .dropdown-List-item:hover {
2003
- background-color: #e1e1e1;
2019
+ background-color: hsl(var(--color-bg-default-hover));
2020
+ transition: background-color 0.2s ease;
2004
2021
  }
2005
2022
 
2023
+ [data-radix-popper-content-wrapper] {
2024
+ z-index: 10000 !important;
2025
+ }
2026
+
2027
+ .data-verification-checkbox-label {
2028
+ min-width: 100px;
2029
+ }
2006
2030
  .condition-format-sub-menu {
2007
2031
  position: absolute;
2008
2032
  top: -12px;
@@ -2754,6 +2778,99 @@ label {
2754
2778
  overflow-y: scroll;
2755
2779
  }
2756
2780
 
2781
+ .custom-overlay {
2782
+ position: absolute;
2783
+ top: 0;
2784
+ left: 0;
2785
+ z-index: 50;
2786
+ height: 100vh;
2787
+ width: 100%;
2788
+ display: grid;
2789
+ place-items: center;
2790
+ }
2791
+
2792
+ .input-modal {
2793
+ position: fixed;
2794
+ top: 25%;
2795
+ left: 50%;
2796
+ transform: translateX(-50%);
2797
+ border-radius: 0.75rem;
2798
+ background-color: #ffffff;
2799
+ padding: 0;
2800
+ border: none;
2801
+ box-shadow: 0px 8px 32px 0px #00000026;
2802
+ animation: fadeIn 0.2s ease-in-out;
2803
+ }
2804
+
2805
+ .modal-header {
2806
+ display: flex;
2807
+ gap: 0.5rem;
2808
+ align-items: center;
2809
+ padding: 0.75rem;
2810
+ border-bottom: 1px solid #e5e7eb;
2811
+ }
2812
+
2813
+ .fetch-url-button {
2814
+ cursor: pointer;
2815
+ }
2816
+
2817
+ .modal-input {
2818
+ border: none;
2819
+ padding: 0;
2820
+ outline: none;
2821
+ -webkit-user-select: text;
2822
+ -moz-user-select: text;
2823
+ user-select: text;
2824
+ max-width: 150px;
2825
+ flex: 1;
2826
+ }
2827
+
2828
+ @media (min-width: 768px) {
2829
+ .modal-input {
2830
+ max-width: 400px;
2831
+ width: 380px !important;
2832
+ }
2833
+ }
2834
+
2835
+ .modal-input:disabled {
2836
+ opacity: 1;
2837
+ }
2838
+
2839
+ @keyframes fadeIn {
2840
+ from {
2841
+ opacity: 0;
2842
+ transform: translateX(-50%) scale(0.95);
2843
+ }
2844
+ to {
2845
+ opacity: 1;
2846
+ transform: translateX(-50%) scale(1);
2847
+ }
2848
+ }
2849
+
2850
+ .modal-footer {
2851
+ display: flex;
2852
+ justify-content: flex-end;
2853
+ padding: 8px 16px;
2854
+ }
2855
+
2856
+ .modal-button {
2857
+ width: 100%;
2858
+ margin: 8px;
2859
+ }
2860
+
2861
+ .modal-error-message {
2862
+ color: #ef4e2f;
2863
+ background: #fff5f5;
2864
+ margin: 8px 16px;
2865
+ padding: 4px 8px;
2866
+ border-radius: 4px;
2867
+ display: flex;
2868
+ align-items: center;
2869
+ gap: 8px;
2870
+ font-size: 12px;
2871
+ font-weight: 400;
2872
+ }
2873
+
2757
2874
  .fortune-fx-editor {
2758
2875
  display: flex;
2759
2876
  flex-direction: row;
@@ -3613,3 +3730,67 @@ label {
3613
3730
  display: inline-block;
3614
3731
  margin-left: 15px;
3615
3732
  }
3733
+
3734
+ .fortune-dune-preview {
3735
+ position: absolute;
3736
+ background-color: #fff;
3737
+ border: 1px solid #e5e5e5;
3738
+ border-radius: 8px;
3739
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3740
+ width: 270px;
3741
+ height: 250px;
3742
+ z-index: 1000;
3743
+ display: flex;
3744
+ flex-direction: column;
3745
+ padding: 8px;
3746
+ gap: 8px;
3747
+ }
3748
+
3749
+ .fortune-dune-preview-header {
3750
+ display: flex;
3751
+ justify-content: space-between;
3752
+ align-items: center;
3753
+ }
3754
+
3755
+ .fortune-dune-preview-title {
3756
+ font-size: 14px;
3757
+ font-weight: 500;
3758
+ color: #363b3f;
3759
+ }
3760
+
3761
+ .fortune-dune-preview-content {
3762
+ flex: 1;
3763
+ overflow: hidden;
3764
+ position: relative;
3765
+ border-radius: 4px;
3766
+ border: 1px solid #f8f9fa;
3767
+ }
3768
+
3769
+ .fortune-dune-preview-footer {
3770
+ display: flex;
3771
+ justify-content: flex-end;
3772
+ gap: 8px;
3773
+ padding: 8px;
3774
+ }
3775
+
3776
+ .fortune-dune-preview-button {
3777
+ padding: 6px 12px;
3778
+ border-radius: 4px;
3779
+ font-size: 14px;
3780
+ cursor: pointer;
3781
+ transition: all 0.2s ease;
3782
+ }
3783
+
3784
+ .fortune-dune-preview-button:hover {
3785
+ background-color: #f5f5f5;
3786
+ }
3787
+
3788
+ .fortune-dune-preview-button-primary {
3789
+ background-color: #1e1870;
3790
+ border-color: #1e1870;
3791
+ color: #fff;
3792
+ }
3793
+
3794
+ .fortune-dune-preview-button-primary:hover {
3795
+ background-color: #2a2379;
3796
+ }
@@ -987,28 +987,32 @@ html::-webkit-scrollbar-button {
987
987
 
988
988
  #luckysheet-dataVerification-showHintBox {
989
989
  display: none;
990
- padding: 10px;
991
- background-color: #ffffff;
992
- border: 1px solid #ccc;
990
+ padding: 8px;
991
+ min-width: 132px;
992
+ background-color: hsl(var(--color-bg-default));
993
+ border: 1px solid hsl(var(--color-border-default));
994
+ border-left: 4px solid #f4874a !important;
995
+ border-radius: 4px;
993
996
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
994
997
  position: absolute;
998
+ transform: translateY(4px);
995
999
  z-index: 1000;
996
1000
  -webkit-user-select: none;
997
1001
  -moz-user-select: none;
998
1002
  user-select: none;
999
1003
  cursor: default;
1000
1004
  white-space: nowrap;
1001
- font-size: 12px;
1005
+ font-size: 14px;
1002
1006
  }
1003
1007
 
1004
1008
  #luckysheet-dataVerification-dropdown-btn {
1005
1009
  display: none;
1006
- width: 20px;
1007
- height: 20px;
1008
- background-color: #ffffff;
1010
+ padding: 1px;
1009
1011
  position: absolute;
1012
+ transform: translateY(15%);
1010
1013
  z-index: 10;
1011
1014
  overflow: hidden;
1015
+ cursor: pointer !important;
1012
1016
  }
1013
1017
 
1014
1018
  .luckysheet-formula-search-c {
@@ -1133,7 +1137,7 @@ html::-webkit-scrollbar-button {
1133
1137
  .luckysheet-formula-help-content {
1134
1138
  display: flex;
1135
1139
  flex-direction: column;
1136
- /* gap: 8px; */
1140
+ gap: 8px;
1137
1141
  }
1138
1142
 
1139
1143
  .luckysheet-formula-help-content-param {
@@ -1173,6 +1177,14 @@ font-style: normal;
1173
1177
  font-weight: 400;
1174
1178
  line-height: 16px; /* 133.333% */
1175
1179
  }
1180
+ .example-value-code {
1181
+ color: var(--color-text-default, #363B3F);
1182
+
1183
+ font-size: var(--font-size-2xsm, 12px);
1184
+ font-style: normal;
1185
+ font-weight: 400;
1186
+ line-height: 16px; /* 133.333% */
1187
+ }
1176
1188
 
1177
1189
  .formula-title {
1178
1190
  display: flex;
@@ -1196,7 +1208,7 @@ line-height: 16px; /* 133.333% */
1196
1208
  }
1197
1209
 
1198
1210
  .luckysheet-arguments-help-parameter-content {
1199
- padding: 1px 10px;
1211
+ padding: 1px 0px;
1200
1212
  display: inline-block;
1201
1213
  word-wrap: break-word;
1202
1214
  }
@@ -1806,8 +1818,7 @@ line-height: 16px; /* 133.333% */
1806
1818
  }
1807
1819
 
1808
1820
  #fortune-data-verification {
1809
- min-width: 500px;
1810
- padding: 10px 0px;
1821
+ min-width: 510px;
1811
1822
  -webkit-user-select: none;
1812
1823
  -moz-user-select: none;
1813
1824
  user-select: none;
@@ -1984,25 +1995,38 @@ line-height: 16px; /* 133.333% */
1984
1995
  }
1985
1996
 
1986
1997
  #luckysheet-dataVerification-dropdown-List {
1987
- background-color: #fff;
1988
- border: 1px solid #ccc;
1998
+ background-color: hsl(var(--color-bg-default));
1999
+ border: 1px solid hsl(var(--color-border-default));
2000
+ border-radius: 8px;
1989
2001
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
2002
+ transform: translateY(4px);
1990
2003
  position: absolute;
1991
2004
  z-index: 10000;
1992
2005
  box-sizing: border-box;
1993
- font-size: 12px;
2006
+ font-size: 14px;
2007
+ padding: 8px;
2008
+ min-width: 160px;
1994
2009
  }
1995
2010
 
1996
2011
  #luckysheet-dataVerification-dropdown-List .dropdown-List-item {
1997
- padding: 5px 10px;
2012
+ padding: 4px 8px;
1998
2013
  box-sizing: border-box;
1999
- cursor: pointer;
2014
+ cursor: pointer !important;
2015
+ border-radius: 4px;
2000
2016
  }
2001
2017
 
2002
2018
  #luckysheet-dataVerification-dropdown-List .dropdown-List-item:hover {
2003
- background-color: #e1e1e1;
2019
+ background-color: hsl(var(--color-bg-default-hover));
2020
+ transition: background-color 0.2s ease;
2004
2021
  }
2005
2022
 
2023
+ [data-radix-popper-content-wrapper] {
2024
+ z-index: 10000 !important;
2025
+ }
2026
+
2027
+ .data-verification-checkbox-label {
2028
+ min-width: 100px;
2029
+ }
2006
2030
  .condition-format-sub-menu {
2007
2031
  position: absolute;
2008
2032
  top: -12px;
@@ -2754,6 +2778,99 @@ label {
2754
2778
  overflow-y: scroll;
2755
2779
  }
2756
2780
 
2781
+ .custom-overlay {
2782
+ position: absolute;
2783
+ top: 0;
2784
+ left: 0;
2785
+ z-index: 50;
2786
+ height: 100vh;
2787
+ width: 100%;
2788
+ display: grid;
2789
+ place-items: center;
2790
+ }
2791
+
2792
+ .input-modal {
2793
+ position: fixed;
2794
+ top: 25%;
2795
+ left: 50%;
2796
+ transform: translateX(-50%);
2797
+ border-radius: 0.75rem;
2798
+ background-color: #ffffff;
2799
+ padding: 0;
2800
+ border: none;
2801
+ box-shadow: 0px 8px 32px 0px #00000026;
2802
+ animation: fadeIn 0.2s ease-in-out;
2803
+ }
2804
+
2805
+ .modal-header {
2806
+ display: flex;
2807
+ gap: 0.5rem;
2808
+ align-items: center;
2809
+ padding: 0.75rem;
2810
+ border-bottom: 1px solid #e5e7eb;
2811
+ }
2812
+
2813
+ .fetch-url-button {
2814
+ cursor: pointer;
2815
+ }
2816
+
2817
+ .modal-input {
2818
+ border: none;
2819
+ padding: 0;
2820
+ outline: none;
2821
+ -webkit-user-select: text;
2822
+ -moz-user-select: text;
2823
+ user-select: text;
2824
+ max-width: 150px;
2825
+ flex: 1;
2826
+ }
2827
+
2828
+ @media (min-width: 768px) {
2829
+ .modal-input {
2830
+ max-width: 400px;
2831
+ width: 380px !important;
2832
+ }
2833
+ }
2834
+
2835
+ .modal-input:disabled {
2836
+ opacity: 1;
2837
+ }
2838
+
2839
+ @keyframes fadeIn {
2840
+ from {
2841
+ opacity: 0;
2842
+ transform: translateX(-50%) scale(0.95);
2843
+ }
2844
+ to {
2845
+ opacity: 1;
2846
+ transform: translateX(-50%) scale(1);
2847
+ }
2848
+ }
2849
+
2850
+ .modal-footer {
2851
+ display: flex;
2852
+ justify-content: flex-end;
2853
+ padding: 8px 16px;
2854
+ }
2855
+
2856
+ .modal-button {
2857
+ width: 100%;
2858
+ margin: 8px;
2859
+ }
2860
+
2861
+ .modal-error-message {
2862
+ color: #ef4e2f;
2863
+ background: #fff5f5;
2864
+ margin: 8px 16px;
2865
+ padding: 4px 8px;
2866
+ border-radius: 4px;
2867
+ display: flex;
2868
+ align-items: center;
2869
+ gap: 8px;
2870
+ font-size: 12px;
2871
+ font-weight: 400;
2872
+ }
2873
+
2757
2874
  .fortune-fx-editor {
2758
2875
  display: flex;
2759
2876
  flex-direction: row;
@@ -3613,3 +3730,67 @@ label {
3613
3730
  display: inline-block;
3614
3731
  margin-left: 15px;
3615
3732
  }
3733
+
3734
+ .fortune-dune-preview {
3735
+ position: absolute;
3736
+ background-color: #fff;
3737
+ border: 1px solid #e5e5e5;
3738
+ border-radius: 8px;
3739
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3740
+ width: 270px;
3741
+ height: 250px;
3742
+ z-index: 1000;
3743
+ display: flex;
3744
+ flex-direction: column;
3745
+ padding: 8px;
3746
+ gap: 8px;
3747
+ }
3748
+
3749
+ .fortune-dune-preview-header {
3750
+ display: flex;
3751
+ justify-content: space-between;
3752
+ align-items: center;
3753
+ }
3754
+
3755
+ .fortune-dune-preview-title {
3756
+ font-size: 14px;
3757
+ font-weight: 500;
3758
+ color: #363b3f;
3759
+ }
3760
+
3761
+ .fortune-dune-preview-content {
3762
+ flex: 1;
3763
+ overflow: hidden;
3764
+ position: relative;
3765
+ border-radius: 4px;
3766
+ border: 1px solid #f8f9fa;
3767
+ }
3768
+
3769
+ .fortune-dune-preview-footer {
3770
+ display: flex;
3771
+ justify-content: flex-end;
3772
+ gap: 8px;
3773
+ padding: 8px;
3774
+ }
3775
+
3776
+ .fortune-dune-preview-button {
3777
+ padding: 6px 12px;
3778
+ border-radius: 4px;
3779
+ font-size: 14px;
3780
+ cursor: pointer;
3781
+ transition: all 0.2s ease;
3782
+ }
3783
+
3784
+ .fortune-dune-preview-button:hover {
3785
+ background-color: #f5f5f5;
3786
+ }
3787
+
3788
+ .fortune-dune-preview-button-primary {
3789
+ background-color: #1e1870;
3790
+ border-color: #1e1870;
3791
+ color: #fff;
3792
+ }
3793
+
3794
+ .fortune-dune-preview-button-primary:hover {
3795
+ background-color: #2a2379;
3796
+ }