@yudaocode/univer-sheets-ui 1.6.204 → 1.6.205

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/lib/es/index.js CHANGED
@@ -93,7 +93,11 @@ function resolveSheetsUIFeatures(raw) {
93
93
  versionHistory: raw?.versionHistory ?? true,
94
94
  loopBlocks: raw?.loopBlocks ?? datasetBinding,
95
95
  outlines: raw?.outlines ?? datasetBinding,
96
- queryParamsConfig: raw?.queryParamsConfig ?? datasetBinding
96
+ queryParamsConfig: raw?.queryParamsConfig ?? datasetBinding,
97
+ fieldDrag: raw?.fieldDrag ?? true,
98
+ syntaxSelector: raw?.syntaxSelector ?? true,
99
+ advancedCellBinding: raw?.advancedCellBinding ?? true,
100
+ builtinPreviewModal: raw?.builtinPreviewModal ?? true
97
101
  };
98
102
  }
99
103
  var ISheetsUIFeatureService = createIdentifier(
@@ -701,7 +705,7 @@ var SheetInspectorPanel = () => {
701
705
  }
702
706
  )
703
707
  ] }),
704
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
708
+ features.syntaxSelector && /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
705
709
  /* @__PURE__ */ jsx2("span", { children: "\u5360\u4F4D\u7B26\u8BED\u6CD5\u89C4\u8303" }),
706
710
  /* @__PURE__ */ jsxs2(
707
711
  "select",
@@ -747,6 +751,10 @@ var SheetInspectorPanel = () => {
747
751
  },
748
752
  children: [
749
753
  /* @__PURE__ */ jsx2("option", { value: "", children: "-- \u672A\u7ED1\u5B9A\uFF08\u666E\u901A\u5355\u5143\u683C\uFF09 --" }),
754
+ currentBoundKey && !allFields.some((f) => f.key === currentBoundKey) && /* @__PURE__ */ jsxs2("option", { value: currentBoundKey, children: [
755
+ currentBoundKey,
756
+ "\uFF08\u5F53\u524D\u5DF2\u7ED1\u5B9A\u5B57\u6BB5\uFF09"
757
+ ] }),
750
758
  allFields.map((f) => /* @__PURE__ */ jsxs2("option", { value: f.key, children: [
751
759
  f.label,
752
760
  " (",
@@ -767,206 +775,208 @@ var SheetInspectorPanel = () => {
767
775
  children: [
768
776
  /* @__PURE__ */ jsx2("option", { value: "v", children: "\u7EB5\u5411\u5411\u4E0B\u6269\u5C55\u884C (List)" }),
769
777
  /* @__PURE__ */ jsx2("option", { value: "h", children: "\u6A2A\u5411\u5411\u53F3\u6269\u5C55\u5217 (Cross-Tab \u4EA4\u53C9\u8868)" }),
770
- /* @__PURE__ */ jsx2("option", { value: "none", children: "\u4E0D\u6269\u5C55\uFF08\u9759\u6001\u5355\u503C\u66FF\u6362\uFF09" })
778
+ features.advancedCellBinding && /* @__PURE__ */ jsx2("option", { value: "none", children: "\u4E0D\u6269\u5C55\uFF08\u9759\u6001\u5355\u503C\u66FF\u6362\uFF09" })
771
779
  ]
772
780
  }
773
781
  )
774
782
  ] }),
775
- /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
776
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
777
- /* @__PURE__ */ jsx2("span", { children: "\u5DE6\u7236\u683C (leftParentCell)" }),
778
- /* @__PURE__ */ jsx2(
779
- "input",
780
- {
781
- type: "text",
782
- placeholder: "\u5982 A6 \u6216 none",
783
- value: cellMeta.leftParentCell ?? "",
784
- onChange: (e) => patchCellMeta({ leftParentCell: e.target.value.trim() || void 0 })
785
- }
786
- )
783
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2(Fragment, { children: [
784
+ /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
785
+ /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
786
+ /* @__PURE__ */ jsx2("span", { children: "\u5DE6\u7236\u683C (leftParentCell)" }),
787
+ /* @__PURE__ */ jsx2(
788
+ "input",
789
+ {
790
+ type: "text",
791
+ placeholder: "\u5982 A6 \u6216 none",
792
+ value: cellMeta.leftParentCell ?? "",
793
+ onChange: (e) => patchCellMeta({ leftParentCell: e.target.value.trim() || void 0 })
794
+ }
795
+ )
796
+ ] }),
797
+ /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
798
+ /* @__PURE__ */ jsx2("span", { children: "\u4E0A\u7236\u683C (topParentCell)" }),
799
+ /* @__PURE__ */ jsx2(
800
+ "input",
801
+ {
802
+ type: "text",
803
+ placeholder: "\u5982 B5 \u6216 none",
804
+ value: cellMeta.topParentCell ?? "",
805
+ onChange: (e) => patchCellMeta({ topParentCell: e.target.value.trim() || void 0 })
806
+ }
807
+ )
808
+ ] })
787
809
  ] }),
788
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
789
- /* @__PURE__ */ jsx2("span", { children: "\u4E0A\u7236\u683C (topParentCell)" }),
790
- /* @__PURE__ */ jsx2(
791
- "input",
792
- {
793
- type: "text",
794
- placeholder: "\u5982 B5 \u6216 none",
795
- value: cellMeta.topParentCell ?? "",
796
- onChange: (e) => patchCellMeta({ topParentCell: e.target.value.trim() || void 0 })
797
- }
798
- )
799
- ] })
800
- ] }),
801
- /* @__PURE__ */ jsxs2(
802
- "div",
803
- {
804
- style: {
805
- background: "#F9FAFB",
806
- border: "1px solid #E3E5EA",
807
- borderRadius: 6,
808
- padding: "6px 8px",
809
- display: "flex",
810
- flexDirection: "column",
811
- gap: 5
812
- },
813
- children: [
814
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
815
- /* @__PURE__ */ jsx2("span", { style: { fontSize: 11, fontWeight: 600, color: "#31363F" }, children: t("yudaoSheets.inspector.cellFilterTitle") }),
816
- /* @__PURE__ */ jsx2(
817
- "button",
810
+ /* @__PURE__ */ jsxs2(
811
+ "div",
812
+ {
813
+ style: {
814
+ background: "#F9FAFB",
815
+ border: "1px solid #E3E5EA",
816
+ borderRadius: 6,
817
+ padding: "6px 8px",
818
+ display: "flex",
819
+ flexDirection: "column",
820
+ gap: 5
821
+ },
822
+ children: [
823
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
824
+ /* @__PURE__ */ jsx2("span", { style: { fontSize: 11, fontWeight: 600, color: "#31363F" }, children: t("yudaoSheets.inspector.cellFilterTitle") }),
825
+ /* @__PURE__ */ jsx2(
826
+ "button",
827
+ {
828
+ type: "button",
829
+ className: "yudao-sheet-btn",
830
+ style: { padding: "2px 6px", fontSize: 10.5 },
831
+ onClick: () => {
832
+ const nextList = [
833
+ ...cellMeta.cellFilterConditions ?? [],
834
+ {
835
+ id: `cf_${generateRandomId(5)}`,
836
+ property: "",
837
+ operator: "==",
838
+ value: "",
839
+ join: "and"
840
+ }
841
+ ];
842
+ patchCellMeta({ cellFilterConditions: nextList });
843
+ },
844
+ children: t("yudaoSheets.inspector.cellFilterAddBtn")
845
+ }
846
+ )
847
+ ] }),
848
+ (cellMeta.cellFilterConditions ?? []).length === 0 ? /* @__PURE__ */ jsx2("div", { style: { fontSize: 10.5, color: "#7D8698" }, children: t("yudaoSheets.inspector.cellFilterEmptyHint") }) : (cellMeta.cellFilterConditions ?? []).map((cond, idx) => /* @__PURE__ */ jsxs2(
849
+ "div",
818
850
  {
819
- type: "button",
820
- className: "yudao-sheet-btn",
821
- style: { padding: "2px 6px", fontSize: 10.5 },
822
- onClick: () => {
823
- const nextList = [
824
- ...cellMeta.cellFilterConditions ?? [],
851
+ style: { display: "grid", gridTemplateColumns: "44px 1fr 56px 1fr 20px", gap: 4, alignItems: "center" },
852
+ children: [
853
+ /* @__PURE__ */ jsxs2(
854
+ "select",
825
855
  {
826
- id: `cf_${generateRandomId(5)}`,
827
- property: "",
828
- operator: "==",
829
- value: "",
830
- join: "and"
856
+ style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
857
+ value: cond.join ?? "and",
858
+ disabled: idx === 0,
859
+ onChange: (e) => {
860
+ const next = [...cellMeta.cellFilterConditions ?? []];
861
+ next[idx] = { ...cond, join: e.target.value };
862
+ patchCellMeta({ cellFilterConditions: next });
863
+ },
864
+ children: [
865
+ /* @__PURE__ */ jsx2("option", { value: "and", children: "AND" }),
866
+ /* @__PURE__ */ jsx2("option", { value: "or", children: "OR" })
867
+ ]
831
868
  }
832
- ];
833
- patchCellMeta({ cellFilterConditions: nextList });
834
- },
835
- children: t("yudaoSheets.inspector.cellFilterAddBtn")
869
+ ),
870
+ /* @__PURE__ */ jsx2(
871
+ "input",
872
+ {
873
+ type: "text",
874
+ placeholder: t("yudaoSheets.inspector.cellFilterFieldPlaceholder"),
875
+ style: { fontSize: 11, padding: "2px 5px", height: 24 },
876
+ value: cond.property,
877
+ onChange: (e) => {
878
+ const next = [...cellMeta.cellFilterConditions ?? []];
879
+ next[idx] = { ...cond, property: e.target.value };
880
+ patchCellMeta({ cellFilterConditions: next });
881
+ }
882
+ }
883
+ ),
884
+ /* @__PURE__ */ jsxs2(
885
+ "select",
886
+ {
887
+ style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
888
+ value: cond.operator,
889
+ onChange: (e) => {
890
+ const next = [...cellMeta.cellFilterConditions ?? []];
891
+ next[idx] = { ...cond, operator: e.target.value };
892
+ patchCellMeta({ cellFilterConditions: next });
893
+ },
894
+ children: [
895
+ /* @__PURE__ */ jsx2("option", { value: "==", children: "==" }),
896
+ /* @__PURE__ */ jsx2("option", { value: "!=", children: "!=" }),
897
+ /* @__PURE__ */ jsx2("option", { value: ">", children: ">" }),
898
+ /* @__PURE__ */ jsx2("option", { value: ">=", children: ">=" }),
899
+ /* @__PURE__ */ jsx2("option", { value: "<", children: "<" }),
900
+ /* @__PURE__ */ jsx2("option", { value: "<=", children: "<=" }),
901
+ /* @__PURE__ */ jsx2("option", { value: "in", children: "in" }),
902
+ /* @__PURE__ */ jsx2("option", { value: "notIn", children: "notIn" }),
903
+ /* @__PURE__ */ jsx2("option", { value: "contains", children: "contains" }),
904
+ /* @__PURE__ */ jsx2("option", { value: "like", children: "like" })
905
+ ]
906
+ }
907
+ ),
908
+ /* @__PURE__ */ jsx2(
909
+ "input",
910
+ {
911
+ type: "text",
912
+ placeholder: t("yudaoSheets.inspector.cellFilterValuePlaceholder"),
913
+ style: { fontSize: 11, padding: "2px 5px", height: 24 },
914
+ value: cond.value == null ? "" : String(cond.value),
915
+ onChange: (e) => {
916
+ const next = [...cellMeta.cellFilterConditions ?? []];
917
+ next[idx] = { ...cond, value: e.target.value };
918
+ patchCellMeta({ cellFilterConditions: next });
919
+ }
920
+ }
921
+ ),
922
+ /* @__PURE__ */ jsx2(
923
+ "button",
924
+ {
925
+ type: "button",
926
+ className: "yudao-sheet-btn",
927
+ style: { padding: 0, width: 20, height: 24, fontSize: 11 },
928
+ onClick: () => {
929
+ const next = (cellMeta.cellFilterConditions ?? []).filter((_, i) => i !== idx);
930
+ patchCellMeta({ cellFilterConditions: next.length > 0 ? next : void 0 });
931
+ },
932
+ children: "\xD7"
933
+ }
934
+ )
935
+ ]
936
+ },
937
+ cond.id ?? idx
938
+ ))
939
+ ]
940
+ }
941
+ ),
942
+ /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
943
+ /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
944
+ /* @__PURE__ */ jsx2("span", { children: "\u72EC\u7ACB\u6269\u5C55\u5206\u533A (zoneId)" }),
945
+ /* @__PURE__ */ jsx2(
946
+ "input",
947
+ {
948
+ type: "text",
949
+ placeholder: "\u5982 left / right\uFF08\u5E76\u6392\u591A\u8868\uFF09",
950
+ value: cellMeta.zoneId ?? "",
951
+ onChange: (e) => {
952
+ const zid = e.target.value.trim();
953
+ patchCellMeta({
954
+ zoneId: zid || void 0,
955
+ independentZone: zid ? true : void 0,
956
+ zoneMode: zid ? "independent" : void 0
957
+ });
836
958
  }
837
- )
838
- ] }),
839
- (cellMeta.cellFilterConditions ?? []).length === 0 ? /* @__PURE__ */ jsx2("div", { style: { fontSize: 10.5, color: "#7D8698" }, children: t("yudaoSheets.inspector.cellFilterEmptyHint") }) : (cellMeta.cellFilterConditions ?? []).map((cond, idx) => /* @__PURE__ */ jsxs2(
840
- "div",
959
+ }
960
+ )
961
+ ] }),
962
+ /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
963
+ /* @__PURE__ */ jsx2("span", { children: "\u6C47\u603B\u8BA1\u7B97\u6392\u9664 (calcExclude)" }),
964
+ /* @__PURE__ */ jsxs2(
965
+ "select",
841
966
  {
842
- style: { display: "grid", gridTemplateColumns: "44px 1fr 56px 1fr 20px", gap: 4, alignItems: "center" },
967
+ value: cellMeta.calcExclude ?? "none",
968
+ onChange: (e) => patchCellMeta({
969
+ calcExclude: e.target.value === "none" ? void 0 : e.target.value
970
+ }),
843
971
  children: [
844
- /* @__PURE__ */ jsxs2(
845
- "select",
846
- {
847
- style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
848
- value: cond.join ?? "and",
849
- disabled: idx === 0,
850
- onChange: (e) => {
851
- const next = [...cellMeta.cellFilterConditions ?? []];
852
- next[idx] = { ...cond, join: e.target.value };
853
- patchCellMeta({ cellFilterConditions: next });
854
- },
855
- children: [
856
- /* @__PURE__ */ jsx2("option", { value: "and", children: "AND" }),
857
- /* @__PURE__ */ jsx2("option", { value: "or", children: "OR" })
858
- ]
859
- }
860
- ),
861
- /* @__PURE__ */ jsx2(
862
- "input",
863
- {
864
- type: "text",
865
- placeholder: t("yudaoSheets.inspector.cellFilterFieldPlaceholder"),
866
- style: { fontSize: 11, padding: "2px 5px", height: 24 },
867
- value: cond.property,
868
- onChange: (e) => {
869
- const next = [...cellMeta.cellFilterConditions ?? []];
870
- next[idx] = { ...cond, property: e.target.value };
871
- patchCellMeta({ cellFilterConditions: next });
872
- }
873
- }
874
- ),
875
- /* @__PURE__ */ jsxs2(
876
- "select",
877
- {
878
- style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
879
- value: cond.operator,
880
- onChange: (e) => {
881
- const next = [...cellMeta.cellFilterConditions ?? []];
882
- next[idx] = { ...cond, operator: e.target.value };
883
- patchCellMeta({ cellFilterConditions: next });
884
- },
885
- children: [
886
- /* @__PURE__ */ jsx2("option", { value: "==", children: "==" }),
887
- /* @__PURE__ */ jsx2("option", { value: "!=", children: "!=" }),
888
- /* @__PURE__ */ jsx2("option", { value: ">", children: ">" }),
889
- /* @__PURE__ */ jsx2("option", { value: ">=", children: ">=" }),
890
- /* @__PURE__ */ jsx2("option", { value: "<", children: "<" }),
891
- /* @__PURE__ */ jsx2("option", { value: "<=", children: "<=" }),
892
- /* @__PURE__ */ jsx2("option", { value: "in", children: "in" }),
893
- /* @__PURE__ */ jsx2("option", { value: "notIn", children: "notIn" }),
894
- /* @__PURE__ */ jsx2("option", { value: "contains", children: "contains" }),
895
- /* @__PURE__ */ jsx2("option", { value: "like", children: "like" })
896
- ]
897
- }
898
- ),
899
- /* @__PURE__ */ jsx2(
900
- "input",
901
- {
902
- type: "text",
903
- placeholder: t("yudaoSheets.inspector.cellFilterValuePlaceholder"),
904
- style: { fontSize: 11, padding: "2px 5px", height: 24 },
905
- value: cond.value == null ? "" : String(cond.value),
906
- onChange: (e) => {
907
- const next = [...cellMeta.cellFilterConditions ?? []];
908
- next[idx] = { ...cond, value: e.target.value };
909
- patchCellMeta({ cellFilterConditions: next });
910
- }
911
- }
912
- ),
913
- /* @__PURE__ */ jsx2(
914
- "button",
915
- {
916
- type: "button",
917
- className: "yudao-sheet-btn",
918
- style: { padding: 0, width: 20, height: 24, fontSize: 11 },
919
- onClick: () => {
920
- const next = (cellMeta.cellFilterConditions ?? []).filter((_, i) => i !== idx);
921
- patchCellMeta({ cellFilterConditions: next.length > 0 ? next : void 0 });
922
- },
923
- children: "\xD7"
924
- }
925
- )
972
+ /* @__PURE__ */ jsx2("option", { value: "none", children: "\u6B63\u5E38\u53C2\u4E0E\u6C47\u603B" }),
973
+ /* @__PURE__ */ jsx2("option", { value: "negatives", children: "\u6392\u9664\u8D1F\u6570 (negatives)" }),
974
+ /* @__PURE__ */ jsx2("option", { value: "zeros", children: "\u6392\u9664\u96F6\u503C (zeros)" }),
975
+ /* @__PURE__ */ jsx2("option", { value: "all", children: "\u5B8C\u5168\u6392\u9664 (all)" })
926
976
  ]
927
- },
928
- cond.id ?? idx
929
- ))
930
- ]
931
- }
932
- ),
933
- /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
934
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
935
- /* @__PURE__ */ jsx2("span", { children: "\u72EC\u7ACB\u6269\u5C55\u5206\u533A (zoneId)" }),
936
- /* @__PURE__ */ jsx2(
937
- "input",
938
- {
939
- type: "text",
940
- placeholder: "\u5982 left / right\uFF08\u5E76\u6392\u591A\u8868\uFF09",
941
- value: cellMeta.zoneId ?? "",
942
- onChange: (e) => {
943
- const zid = e.target.value.trim();
944
- patchCellMeta({
945
- zoneId: zid || void 0,
946
- independentZone: zid ? true : void 0,
947
- zoneMode: zid ? "independent" : void 0
948
- });
949
977
  }
950
- }
951
- )
952
- ] }),
953
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
954
- /* @__PURE__ */ jsx2("span", { children: "\u6C47\u603B\u8BA1\u7B97\u6392\u9664 (calcExclude)" }),
955
- /* @__PURE__ */ jsxs2(
956
- "select",
957
- {
958
- value: cellMeta.calcExclude ?? "none",
959
- onChange: (e) => patchCellMeta({
960
- calcExclude: e.target.value === "none" ? void 0 : e.target.value
961
- }),
962
- children: [
963
- /* @__PURE__ */ jsx2("option", { value: "none", children: "\u6B63\u5E38\u53C2\u4E0E\u6C47\u603B" }),
964
- /* @__PURE__ */ jsx2("option", { value: "negatives", children: "\u6392\u9664\u8D1F\u6570 (negatives)" }),
965
- /* @__PURE__ */ jsx2("option", { value: "zeros", children: "\u6392\u9664\u96F6\u503C (zeros)" }),
966
- /* @__PURE__ */ jsx2("option", { value: "all", children: "\u5B8C\u5168\u6392\u9664 (all)" })
967
- ]
968
- }
969
- )
978
+ )
979
+ ] })
970
980
  ] })
971
981
  ] }),
972
982
  /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: [
@@ -981,7 +991,7 @@ var SheetInspectorPanel = () => {
981
991
  ),
982
992
  /* @__PURE__ */ jsx2("span", { children: "\u76F8\u90BB\u76F8\u540C\u5206\u7EC4\u503C\u81EA\u52A8\u7EB5\u5411\u5408\u5E76\u5355\u5143\u683C (Group)" })
983
993
  ] }),
984
- /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
994
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
985
995
  /* @__PURE__ */ jsx2(
986
996
  "input",
987
997
  {
@@ -1003,7 +1013,7 @@ var SheetInspectorPanel = () => {
1003
1013
  ),
1004
1014
  /* @__PURE__ */ jsx2("span", { children: "\u4F34\u968F\u540C\u884C\u5217\u8868\u81EA\u52A8\u590D\u5236\u6269\u5C55 (auto)" })
1005
1015
  ] }),
1006
- /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
1016
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
1007
1017
  /* @__PURE__ */ jsx2(
1008
1018
  "input",
1009
1019
  {
@@ -1029,7 +1039,7 @@ var SheetInspectorPanel = () => {
1029
1039
  /* @__PURE__ */ jsx2("span", { children: "\u542F\u7528\u6811\u5F62\u6298\u53E0\u62A5\u8868 (\u5DE6\u7236\u683C/\u6811\u5F62\u6298\u53E0)" })
1030
1040
  ] })
1031
1041
  ] }),
1032
- cellMeta.treeConfig?.enabled && /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
1042
+ features.advancedCellBinding && cellMeta.treeConfig?.enabled && /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
1033
1043
  /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1034
1044
  /* @__PURE__ */ jsx2("span", { children: "\u8282\u70B9\u4E3B\u952E\u5B57\u6BB5 (idField)" }),
1035
1045
  /* @__PURE__ */ jsx2(
@@ -1057,8 +1067,8 @@ var SheetInspectorPanel = () => {
1057
1067
  )
1058
1068
  ] })
1059
1069
  ] }),
1060
- /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
1061
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1070
+ (features.advancedCellBinding || features.loopBlocks) && /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
1071
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1062
1072
  /* @__PURE__ */ jsx2("span", { children: "\u5206\u7EC4\u5C0F\u8BA1 (Subtotal)" }),
1063
1073
  /* @__PURE__ */ jsxs2(
1064
1074
  "select",
@@ -1138,38 +1148,48 @@ var SheetInspectorPanel = () => {
1138
1148
  )
1139
1149
  ] })
1140
1150
  ] }),
1141
- /* @__PURE__ */ jsxs2("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
1142
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1143
- /* @__PURE__ */ jsx2("span", { children: "\u6761\u4EF6\u9690\u85CF\u884C (hideIf)" }),
1144
- /* @__PURE__ */ jsx2(
1145
- "input",
1146
- {
1147
- type: "text",
1148
- placeholder: "\u5982 ==0 \u6216 <=0",
1149
- value: cellMeta.hideIf ?? "",
1150
- onChange: (e) => patchCellMeta({ hideIf: e.target.value || void 0 })
1151
- }
1152
- )
1153
- ] }),
1154
- /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1155
- /* @__PURE__ */ jsx2("span", { children: "\u7968\u636E\u8865\u8DB3 N \u500D\u6570\u7A7A\u884C" }),
1156
- /* @__PURE__ */ jsx2(
1157
- "input",
1158
- {
1159
- type: "number",
1160
- min: 0,
1161
- max: 50,
1162
- placeholder: "0 \u4E0D\u8865",
1163
- value: cellMeta.padBlankRowsToMultipleOf ?? 0,
1164
- onChange: (e) => {
1165
- const n = Number(e.target.value);
1166
- patchCellMeta({ padBlankRowsToMultipleOf: n > 1 ? n : void 0 });
1167
- }
1168
- }
1169
- )
1170
- ] })
1171
- ] }),
1172
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: [
1151
+ /* @__PURE__ */ jsxs2(
1152
+ "div",
1153
+ {
1154
+ style: {
1155
+ display: "grid",
1156
+ gridTemplateColumns: features.advancedCellBinding ? "1fr 1fr" : "1fr",
1157
+ gap: 6
1158
+ },
1159
+ children: [
1160
+ /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1161
+ /* @__PURE__ */ jsx2("span", { children: "\u6761\u4EF6\u9690\u85CF\u884C (hideIf)" }),
1162
+ /* @__PURE__ */ jsx2(
1163
+ "input",
1164
+ {
1165
+ type: "text",
1166
+ placeholder: "\u5982 ==0 \u6216 <=0",
1167
+ value: cellMeta.hideIf ?? "",
1168
+ onChange: (e) => patchCellMeta({ hideIf: e.target.value || void 0 })
1169
+ }
1170
+ )
1171
+ ] }),
1172
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2("label", { className: "yudao-sheet-field-row", children: [
1173
+ /* @__PURE__ */ jsx2("span", { children: "\u7968\u636E\u8865\u8DB3 N \u500D\u6570\u7A7A\u884C" }),
1174
+ /* @__PURE__ */ jsx2(
1175
+ "input",
1176
+ {
1177
+ type: "number",
1178
+ min: 0,
1179
+ max: 50,
1180
+ placeholder: "0 \u4E0D\u8865",
1181
+ value: cellMeta.padBlankRowsToMultipleOf ?? 0,
1182
+ onChange: (e) => {
1183
+ const n = Number(e.target.value);
1184
+ patchCellMeta({ padBlankRowsToMultipleOf: n > 1 ? n : void 0 });
1185
+ }
1186
+ }
1187
+ )
1188
+ ] })
1189
+ ]
1190
+ }
1191
+ ),
1192
+ features.advancedCellBinding && /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: [
1173
1193
  /* @__PURE__ */ jsx2(
1174
1194
  "button",
1175
1195
  {
@@ -3396,7 +3416,7 @@ var SheetInspectorPanel = () => {
3396
3416
  ] }),
3397
3417
  pkgStatusMsg && /* @__PURE__ */ jsx2("div", { style: { fontSize: 10.5, color: "#4E5565", lineHeight: 1.35 }, children: pkgStatusMsg })
3398
3418
  ] }),
3399
- /* @__PURE__ */ jsx2(
3419
+ features.builtinPreviewModal && /* @__PURE__ */ jsx2(
3400
3420
  "button",
3401
3421
  {
3402
3422
  type: "button",
@@ -3617,11 +3637,16 @@ var SheetLeftSidebar = () => {
3617
3637
  "button",
3618
3638
  {
3619
3639
  type: "button",
3620
- draggable: true,
3640
+ draggable: features.fieldDrag,
3641
+ "data-sheet-field": fieldExpr,
3621
3642
  className: "yudao-sheet-field-btn",
3622
3643
  onDragStart: (e) => {
3644
+ if (!features.fieldDrag) return;
3623
3645
  e.dataTransfer.setData("application/x-yudao-sheet-field", fieldExpr);
3624
- e.dataTransfer.setData("text/plain", fieldExpr);
3646
+ e.dataTransfer.setData(
3647
+ "text/plain",
3648
+ metadata.placeholderSyntax === "hash" ? `#{${fieldExpr.replace(/^#/, "")}}` : fieldExpr
3649
+ );
3625
3650
  e.dataTransfer.effectAllowed = "copy";
3626
3651
  },
3627
3652
  onClick: () => commandService.syncExecuteCommand(BindSheetCellDatasetCommand2.id, {
@@ -7614,7 +7639,18 @@ var SheetsExtUIController = class extends Disposable2 {
7614
7639
  this.disposeWithMe({ dispose: () => printSub.unsubscribe() });
7615
7640
  }
7616
7641
  if (this._config.defaultOpenInspector && (this._config.features?.datasetBinding || this._config.features?.printTemplate)) {
7617
- setTimeout(() => openSheetInspectorSidebar(this._sidebarService), 120);
7642
+ let disposed = false;
7643
+ const timer = setTimeout(() => {
7644
+ if (!disposed) {
7645
+ openSheetInspectorSidebar(this._sidebarService);
7646
+ }
7647
+ }, 120);
7648
+ this.disposeWithMe({
7649
+ dispose: () => {
7650
+ disposed = true;
7651
+ clearTimeout(timer);
7652
+ }
7653
+ });
7618
7654
  }
7619
7655
  }
7620
7656
  _initIcons() {