@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/cjs/index.js +266 -230
- package/lib/cjs/index.js.map +1 -1
- package/lib/es/index.js +266 -230
- package/lib/es/index.js.map +1 -1
- package/lib/types/index.d.ts +8 -0
- package/package.json +3 -3
package/lib/cjs/index.js
CHANGED
|
@@ -117,7 +117,11 @@ function resolveSheetsUIFeatures(raw) {
|
|
|
117
117
|
versionHistory: raw?.versionHistory ?? true,
|
|
118
118
|
loopBlocks: raw?.loopBlocks ?? datasetBinding,
|
|
119
119
|
outlines: raw?.outlines ?? datasetBinding,
|
|
120
|
-
queryParamsConfig: raw?.queryParamsConfig ?? datasetBinding
|
|
120
|
+
queryParamsConfig: raw?.queryParamsConfig ?? datasetBinding,
|
|
121
|
+
fieldDrag: raw?.fieldDrag ?? true,
|
|
122
|
+
syntaxSelector: raw?.syntaxSelector ?? true,
|
|
123
|
+
advancedCellBinding: raw?.advancedCellBinding ?? true,
|
|
124
|
+
builtinPreviewModal: raw?.builtinPreviewModal ?? true
|
|
121
125
|
};
|
|
122
126
|
}
|
|
123
127
|
var ISheetsUIFeatureService = (0, import_core.createIdentifier)(
|
|
@@ -865,7 +869,7 @@ var SheetInspectorPanel = () => {
|
|
|
865
869
|
}
|
|
866
870
|
)
|
|
867
871
|
] }),
|
|
868
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
872
|
+
features.syntaxSelector && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
869
873
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u5360\u4F4D\u7B26\u8BED\u6CD5\u89C4\u8303" }),
|
|
870
874
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
871
875
|
"select",
|
|
@@ -911,6 +915,10 @@ var SheetInspectorPanel = () => {
|
|
|
911
915
|
},
|
|
912
916
|
children: [
|
|
913
917
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "", children: "-- \u672A\u7ED1\u5B9A\uFF08\u666E\u901A\u5355\u5143\u683C\uFF09 --" }),
|
|
918
|
+
currentBoundKey && !allFields.some((f) => f.key === currentBoundKey) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("option", { value: currentBoundKey, children: [
|
|
919
|
+
currentBoundKey,
|
|
920
|
+
"\uFF08\u5F53\u524D\u5DF2\u7ED1\u5B9A\u5B57\u6BB5\uFF09"
|
|
921
|
+
] }),
|
|
914
922
|
allFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("option", { value: f.key, children: [
|
|
915
923
|
f.label,
|
|
916
924
|
" (",
|
|
@@ -931,206 +939,208 @@ var SheetInspectorPanel = () => {
|
|
|
931
939
|
children: [
|
|
932
940
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "v", children: "\u7EB5\u5411\u5411\u4E0B\u6269\u5C55\u884C (List)" }),
|
|
933
941
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "h", children: "\u6A2A\u5411\u5411\u53F3\u6269\u5C55\u5217 (Cross-Tab \u4EA4\u53C9\u8868)" }),
|
|
934
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "none", children: "\u4E0D\u6269\u5C55\uFF08\u9759\u6001\u5355\u503C\u66FF\u6362\uFF09" })
|
|
942
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "none", children: "\u4E0D\u6269\u5C55\uFF08\u9759\u6001\u5355\u503C\u66FF\u6362\uFF09" })
|
|
935
943
|
]
|
|
936
944
|
}
|
|
937
945
|
)
|
|
938
946
|
] }),
|
|
939
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
940
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("
|
|
941
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
947
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u5DE6\u7236\u683C (leftParentCell)" }),
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
952
|
+
"input",
|
|
953
|
+
{
|
|
954
|
+
type: "text",
|
|
955
|
+
placeholder: "\u5982 A6 \u6216 none",
|
|
956
|
+
value: cellMeta.leftParentCell ?? "",
|
|
957
|
+
onChange: (e) => patchCellMeta({ leftParentCell: e.target.value.trim() || void 0 })
|
|
958
|
+
}
|
|
959
|
+
)
|
|
960
|
+
] }),
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u4E0A\u7236\u683C (topParentCell)" }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
964
|
+
"input",
|
|
965
|
+
{
|
|
966
|
+
type: "text",
|
|
967
|
+
placeholder: "\u5982 B5 \u6216 none",
|
|
968
|
+
value: cellMeta.topParentCell ?? "",
|
|
969
|
+
onChange: (e) => patchCellMeta({ topParentCell: e.target.value.trim() || void 0 })
|
|
970
|
+
}
|
|
971
|
+
)
|
|
972
|
+
] })
|
|
951
973
|
] }),
|
|
952
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
975
|
+
"div",
|
|
976
|
+
{
|
|
977
|
+
style: {
|
|
978
|
+
background: "#F9FAFB",
|
|
979
|
+
border: "1px solid #E3E5EA",
|
|
980
|
+
borderRadius: 6,
|
|
981
|
+
padding: "6px 8px",
|
|
982
|
+
display: "flex",
|
|
983
|
+
flexDirection: "column",
|
|
984
|
+
gap: 5
|
|
985
|
+
},
|
|
986
|
+
children: [
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { fontSize: 11, fontWeight: 600, color: "#31363F" }, children: t("yudaoSheets.inspector.cellFilterTitle") }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
990
|
+
"button",
|
|
991
|
+
{
|
|
992
|
+
type: "button",
|
|
993
|
+
className: "yudao-sheet-btn",
|
|
994
|
+
style: { padding: "2px 6px", fontSize: 10.5 },
|
|
995
|
+
onClick: () => {
|
|
996
|
+
const nextList = [
|
|
997
|
+
...cellMeta.cellFilterConditions ?? [],
|
|
998
|
+
{
|
|
999
|
+
id: `cf_${(0, import_core4.generateRandomId)(5)}`,
|
|
1000
|
+
property: "",
|
|
1001
|
+
operator: "==",
|
|
1002
|
+
value: "",
|
|
1003
|
+
join: "and"
|
|
1004
|
+
}
|
|
1005
|
+
];
|
|
1006
|
+
patchCellMeta({ cellFilterConditions: nextList });
|
|
1007
|
+
},
|
|
1008
|
+
children: t("yudaoSheets.inspector.cellFilterAddBtn")
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
1011
|
+
] }),
|
|
1012
|
+
(cellMeta.cellFilterConditions ?? []).length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { fontSize: 10.5, color: "#7D8698" }, children: t("yudaoSheets.inspector.cellFilterEmptyHint") }) : (cellMeta.cellFilterConditions ?? []).map((cond, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1013
|
+
"div",
|
|
982
1014
|
{
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
const nextList = [
|
|
988
|
-
...cellMeta.cellFilterConditions ?? [],
|
|
1015
|
+
style: { display: "grid", gridTemplateColumns: "44px 1fr 56px 1fr 20px", gap: 4, alignItems: "center" },
|
|
1016
|
+
children: [
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1018
|
+
"select",
|
|
989
1019
|
{
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1020
|
+
style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
|
|
1021
|
+
value: cond.join ?? "and",
|
|
1022
|
+
disabled: idx === 0,
|
|
1023
|
+
onChange: (e) => {
|
|
1024
|
+
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1025
|
+
next[idx] = { ...cond, join: e.target.value };
|
|
1026
|
+
patchCellMeta({ cellFilterConditions: next });
|
|
1027
|
+
},
|
|
1028
|
+
children: [
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "and", children: "AND" }),
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "or", children: "OR" })
|
|
1031
|
+
]
|
|
995
1032
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1033
|
+
),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1035
|
+
"input",
|
|
1036
|
+
{
|
|
1037
|
+
type: "text",
|
|
1038
|
+
placeholder: t("yudaoSheets.inspector.cellFilterFieldPlaceholder"),
|
|
1039
|
+
style: { fontSize: 11, padding: "2px 5px", height: 24 },
|
|
1040
|
+
value: cond.property,
|
|
1041
|
+
onChange: (e) => {
|
|
1042
|
+
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1043
|
+
next[idx] = { ...cond, property: e.target.value };
|
|
1044
|
+
patchCellMeta({ cellFilterConditions: next });
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
),
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1049
|
+
"select",
|
|
1050
|
+
{
|
|
1051
|
+
style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
|
|
1052
|
+
value: cond.operator,
|
|
1053
|
+
onChange: (e) => {
|
|
1054
|
+
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1055
|
+
next[idx] = { ...cond, operator: e.target.value };
|
|
1056
|
+
patchCellMeta({ cellFilterConditions: next });
|
|
1057
|
+
},
|
|
1058
|
+
children: [
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "==", children: "==" }),
|
|
1060
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "!=", children: "!=" }),
|
|
1061
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: ">", children: ">" }),
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: ">=", children: ">=" }),
|
|
1063
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "<", children: "<" }),
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "<=", children: "<=" }),
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "in", children: "in" }),
|
|
1066
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "notIn", children: "notIn" }),
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "contains", children: "contains" }),
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "like", children: "like" })
|
|
1069
|
+
]
|
|
1070
|
+
}
|
|
1071
|
+
),
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1073
|
+
"input",
|
|
1074
|
+
{
|
|
1075
|
+
type: "text",
|
|
1076
|
+
placeholder: t("yudaoSheets.inspector.cellFilterValuePlaceholder"),
|
|
1077
|
+
style: { fontSize: 11, padding: "2px 5px", height: 24 },
|
|
1078
|
+
value: cond.value == null ? "" : String(cond.value),
|
|
1079
|
+
onChange: (e) => {
|
|
1080
|
+
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1081
|
+
next[idx] = { ...cond, value: e.target.value };
|
|
1082
|
+
patchCellMeta({ cellFilterConditions: next });
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1087
|
+
"button",
|
|
1088
|
+
{
|
|
1089
|
+
type: "button",
|
|
1090
|
+
className: "yudao-sheet-btn",
|
|
1091
|
+
style: { padding: 0, width: 20, height: 24, fontSize: 11 },
|
|
1092
|
+
onClick: () => {
|
|
1093
|
+
const next = (cellMeta.cellFilterConditions ?? []).filter((_, i) => i !== idx);
|
|
1094
|
+
patchCellMeta({ cellFilterConditions: next.length > 0 ? next : void 0 });
|
|
1095
|
+
},
|
|
1096
|
+
children: "\xD7"
|
|
1097
|
+
}
|
|
1098
|
+
)
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1101
|
+
cond.id ?? idx
|
|
1102
|
+
))
|
|
1103
|
+
]
|
|
1104
|
+
}
|
|
1105
|
+
),
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1107
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1108
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u72EC\u7ACB\u6269\u5C55\u5206\u533A (zoneId)" }),
|
|
1109
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1110
|
+
"input",
|
|
1111
|
+
{
|
|
1112
|
+
type: "text",
|
|
1113
|
+
placeholder: "\u5982 left / right\uFF08\u5E76\u6392\u591A\u8868\uFF09",
|
|
1114
|
+
value: cellMeta.zoneId ?? "",
|
|
1115
|
+
onChange: (e) => {
|
|
1116
|
+
const zid = e.target.value.trim();
|
|
1117
|
+
patchCellMeta({
|
|
1118
|
+
zoneId: zid || void 0,
|
|
1119
|
+
independentZone: zid ? true : void 0,
|
|
1120
|
+
zoneMode: zid ? "independent" : void 0
|
|
1121
|
+
});
|
|
1000
1122
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1125
|
+
] }),
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1127
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u6C47\u603B\u8BA1\u7B97\u6392\u9664 (calcExclude)" }),
|
|
1128
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1129
|
+
"select",
|
|
1005
1130
|
{
|
|
1006
|
-
|
|
1131
|
+
value: cellMeta.calcExclude ?? "none",
|
|
1132
|
+
onChange: (e) => patchCellMeta({
|
|
1133
|
+
calcExclude: e.target.value === "none" ? void 0 : e.target.value
|
|
1134
|
+
}),
|
|
1007
1135
|
children: [
|
|
1008
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
value: cond.join ?? "and",
|
|
1013
|
-
disabled: idx === 0,
|
|
1014
|
-
onChange: (e) => {
|
|
1015
|
-
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1016
|
-
next[idx] = { ...cond, join: e.target.value };
|
|
1017
|
-
patchCellMeta({ cellFilterConditions: next });
|
|
1018
|
-
},
|
|
1019
|
-
children: [
|
|
1020
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "and", children: "AND" }),
|
|
1021
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "or", children: "OR" })
|
|
1022
|
-
]
|
|
1023
|
-
}
|
|
1024
|
-
),
|
|
1025
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1026
|
-
"input",
|
|
1027
|
-
{
|
|
1028
|
-
type: "text",
|
|
1029
|
-
placeholder: t("yudaoSheets.inspector.cellFilterFieldPlaceholder"),
|
|
1030
|
-
style: { fontSize: 11, padding: "2px 5px", height: 24 },
|
|
1031
|
-
value: cond.property,
|
|
1032
|
-
onChange: (e) => {
|
|
1033
|
-
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1034
|
-
next[idx] = { ...cond, property: e.target.value };
|
|
1035
|
-
patchCellMeta({ cellFilterConditions: next });
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
),
|
|
1039
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1040
|
-
"select",
|
|
1041
|
-
{
|
|
1042
|
-
style: { fontSize: 10.5, padding: "2px 2px", height: 24 },
|
|
1043
|
-
value: cond.operator,
|
|
1044
|
-
onChange: (e) => {
|
|
1045
|
-
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1046
|
-
next[idx] = { ...cond, operator: e.target.value };
|
|
1047
|
-
patchCellMeta({ cellFilterConditions: next });
|
|
1048
|
-
},
|
|
1049
|
-
children: [
|
|
1050
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "==", children: "==" }),
|
|
1051
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "!=", children: "!=" }),
|
|
1052
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: ">", children: ">" }),
|
|
1053
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: ">=", children: ">=" }),
|
|
1054
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "<", children: "<" }),
|
|
1055
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "<=", children: "<=" }),
|
|
1056
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "in", children: "in" }),
|
|
1057
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "notIn", children: "notIn" }),
|
|
1058
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "contains", children: "contains" }),
|
|
1059
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "like", children: "like" })
|
|
1060
|
-
]
|
|
1061
|
-
}
|
|
1062
|
-
),
|
|
1063
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1064
|
-
"input",
|
|
1065
|
-
{
|
|
1066
|
-
type: "text",
|
|
1067
|
-
placeholder: t("yudaoSheets.inspector.cellFilterValuePlaceholder"),
|
|
1068
|
-
style: { fontSize: 11, padding: "2px 5px", height: 24 },
|
|
1069
|
-
value: cond.value == null ? "" : String(cond.value),
|
|
1070
|
-
onChange: (e) => {
|
|
1071
|
-
const next = [...cellMeta.cellFilterConditions ?? []];
|
|
1072
|
-
next[idx] = { ...cond, value: e.target.value };
|
|
1073
|
-
patchCellMeta({ cellFilterConditions: next });
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
),
|
|
1077
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1078
|
-
"button",
|
|
1079
|
-
{
|
|
1080
|
-
type: "button",
|
|
1081
|
-
className: "yudao-sheet-btn",
|
|
1082
|
-
style: { padding: 0, width: 20, height: 24, fontSize: 11 },
|
|
1083
|
-
onClick: () => {
|
|
1084
|
-
const next = (cellMeta.cellFilterConditions ?? []).filter((_, i) => i !== idx);
|
|
1085
|
-
patchCellMeta({ cellFilterConditions: next.length > 0 ? next : void 0 });
|
|
1086
|
-
},
|
|
1087
|
-
children: "\xD7"
|
|
1088
|
-
}
|
|
1089
|
-
)
|
|
1136
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "none", children: "\u6B63\u5E38\u53C2\u4E0E\u6C47\u603B" }),
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "negatives", children: "\u6392\u9664\u8D1F\u6570 (negatives)" }),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "zeros", children: "\u6392\u9664\u96F6\u503C (zeros)" }),
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "all", children: "\u5B8C\u5168\u6392\u9664 (all)" })
|
|
1090
1140
|
]
|
|
1091
|
-
},
|
|
1092
|
-
cond.id ?? idx
|
|
1093
|
-
))
|
|
1094
|
-
]
|
|
1095
|
-
}
|
|
1096
|
-
),
|
|
1097
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1098
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1099
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u72EC\u7ACB\u6269\u5C55\u5206\u533A (zoneId)" }),
|
|
1100
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1101
|
-
"input",
|
|
1102
|
-
{
|
|
1103
|
-
type: "text",
|
|
1104
|
-
placeholder: "\u5982 left / right\uFF08\u5E76\u6392\u591A\u8868\uFF09",
|
|
1105
|
-
value: cellMeta.zoneId ?? "",
|
|
1106
|
-
onChange: (e) => {
|
|
1107
|
-
const zid = e.target.value.trim();
|
|
1108
|
-
patchCellMeta({
|
|
1109
|
-
zoneId: zid || void 0,
|
|
1110
|
-
independentZone: zid ? true : void 0,
|
|
1111
|
-
zoneMode: zid ? "independent" : void 0
|
|
1112
|
-
});
|
|
1113
1141
|
}
|
|
1114
|
-
|
|
1115
|
-
)
|
|
1116
|
-
] }),
|
|
1117
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1118
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u6C47\u603B\u8BA1\u7B97\u6392\u9664 (calcExclude)" }),
|
|
1119
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1120
|
-
"select",
|
|
1121
|
-
{
|
|
1122
|
-
value: cellMeta.calcExclude ?? "none",
|
|
1123
|
-
onChange: (e) => patchCellMeta({
|
|
1124
|
-
calcExclude: e.target.value === "none" ? void 0 : e.target.value
|
|
1125
|
-
}),
|
|
1126
|
-
children: [
|
|
1127
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "none", children: "\u6B63\u5E38\u53C2\u4E0E\u6C47\u603B" }),
|
|
1128
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "negatives", children: "\u6392\u9664\u8D1F\u6570 (negatives)" }),
|
|
1129
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "zeros", children: "\u6392\u9664\u96F6\u503C (zeros)" }),
|
|
1130
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "all", children: "\u5B8C\u5168\u6392\u9664 (all)" })
|
|
1131
|
-
]
|
|
1132
|
-
}
|
|
1133
|
-
)
|
|
1142
|
+
)
|
|
1143
|
+
] })
|
|
1134
1144
|
] })
|
|
1135
1145
|
] }),
|
|
1136
1146
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: [
|
|
@@ -1145,7 +1155,7 @@ var SheetInspectorPanel = () => {
|
|
|
1145
1155
|
),
|
|
1146
1156
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u76F8\u90BB\u76F8\u540C\u5206\u7EC4\u503C\u81EA\u52A8\u7EB5\u5411\u5408\u5E76\u5355\u5143\u683C (Group)" })
|
|
1147
1157
|
] }),
|
|
1148
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
|
|
1158
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
|
|
1149
1159
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1150
1160
|
"input",
|
|
1151
1161
|
{
|
|
@@ -1167,7 +1177,7 @@ var SheetInspectorPanel = () => {
|
|
|
1167
1177
|
),
|
|
1168
1178
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u4F34\u968F\u540C\u884C\u5217\u8868\u81EA\u52A8\u590D\u5236\u6269\u5C55 (auto)" })
|
|
1169
1179
|
] }),
|
|
1170
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
|
|
1180
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer" }, children: [
|
|
1171
1181
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1172
1182
|
"input",
|
|
1173
1183
|
{
|
|
@@ -1193,7 +1203,7 @@ var SheetInspectorPanel = () => {
|
|
|
1193
1203
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u542F\u7528\u6811\u5F62\u6298\u53E0\u62A5\u8868 (\u5DE6\u7236\u683C/\u6811\u5F62\u6298\u53E0)" })
|
|
1194
1204
|
] })
|
|
1195
1205
|
] }),
|
|
1196
|
-
cellMeta.treeConfig?.enabled && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1206
|
+
features.advancedCellBinding && cellMeta.treeConfig?.enabled && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1197
1207
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1198
1208
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u8282\u70B9\u4E3B\u952E\u5B57\u6BB5 (idField)" }),
|
|
1199
1209
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -1221,8 +1231,8 @@ var SheetInspectorPanel = () => {
|
|
|
1221
1231
|
)
|
|
1222
1232
|
] })
|
|
1223
1233
|
] }),
|
|
1224
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1225
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1234
|
+
(features.advancedCellBinding || features.loopBlocks) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
|
|
1235
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1226
1236
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u5206\u7EC4\u5C0F\u8BA1 (Subtotal)" }),
|
|
1227
1237
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1228
1238
|
"select",
|
|
@@ -1302,38 +1312,48 @@ var SheetInspectorPanel = () => {
|
|
|
1302
1312
|
)
|
|
1303
1313
|
] })
|
|
1304
1314
|
] }),
|
|
1305
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
"
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1316
|
+
"div",
|
|
1317
|
+
{
|
|
1318
|
+
style: {
|
|
1319
|
+
display: "grid",
|
|
1320
|
+
gridTemplateColumns: features.advancedCellBinding ? "1fr 1fr" : "1fr",
|
|
1321
|
+
gap: 6
|
|
1322
|
+
},
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u6761\u4EF6\u9690\u85CF\u884C (hideIf)" }),
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1327
|
+
"input",
|
|
1328
|
+
{
|
|
1329
|
+
type: "text",
|
|
1330
|
+
placeholder: "\u5982 ==0 \u6216 <=0",
|
|
1331
|
+
value: cellMeta.hideIf ?? "",
|
|
1332
|
+
onChange: (e) => patchCellMeta({ hideIf: e.target.value || void 0 })
|
|
1333
|
+
}
|
|
1334
|
+
)
|
|
1335
|
+
] }),
|
|
1336
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "yudao-sheet-field-row", children: [
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u7968\u636E\u8865\u8DB3 N \u500D\u6570\u7A7A\u884C" }),
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1339
|
+
"input",
|
|
1340
|
+
{
|
|
1341
|
+
type: "number",
|
|
1342
|
+
min: 0,
|
|
1343
|
+
max: 50,
|
|
1344
|
+
placeholder: "0 \u4E0D\u8865",
|
|
1345
|
+
value: cellMeta.padBlankRowsToMultipleOf ?? 0,
|
|
1346
|
+
onChange: (e) => {
|
|
1347
|
+
const n = Number(e.target.value);
|
|
1348
|
+
patchCellMeta({ padBlankRowsToMultipleOf: n > 1 ? n : void 0 });
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
)
|
|
1352
|
+
] })
|
|
1353
|
+
]
|
|
1354
|
+
}
|
|
1355
|
+
),
|
|
1356
|
+
features.advancedCellBinding && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: [
|
|
1337
1357
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1338
1358
|
"button",
|
|
1339
1359
|
{
|
|
@@ -3560,7 +3580,7 @@ var SheetInspectorPanel = () => {
|
|
|
3560
3580
|
] }),
|
|
3561
3581
|
pkgStatusMsg && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { fontSize: 10.5, color: "#4E5565", lineHeight: 1.35 }, children: pkgStatusMsg })
|
|
3562
3582
|
] }),
|
|
3563
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3583
|
+
features.builtinPreviewModal && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
3564
3584
|
"button",
|
|
3565
3585
|
{
|
|
3566
3586
|
type: "button",
|
|
@@ -3766,11 +3786,16 @@ var SheetLeftSidebar = () => {
|
|
|
3766
3786
|
"button",
|
|
3767
3787
|
{
|
|
3768
3788
|
type: "button",
|
|
3769
|
-
draggable:
|
|
3789
|
+
draggable: features.fieldDrag,
|
|
3790
|
+
"data-sheet-field": fieldExpr,
|
|
3770
3791
|
className: "yudao-sheet-field-btn",
|
|
3771
3792
|
onDragStart: (e) => {
|
|
3793
|
+
if (!features.fieldDrag) return;
|
|
3772
3794
|
e.dataTransfer.setData("application/x-yudao-sheet-field", fieldExpr);
|
|
3773
|
-
e.dataTransfer.setData(
|
|
3795
|
+
e.dataTransfer.setData(
|
|
3796
|
+
"text/plain",
|
|
3797
|
+
metadata.placeholderSyntax === "hash" ? `#{${fieldExpr.replace(/^#/, "")}}` : fieldExpr
|
|
3798
|
+
);
|
|
3774
3799
|
e.dataTransfer.effectAllowed = "copy";
|
|
3775
3800
|
},
|
|
3776
3801
|
onClick: () => commandService.syncExecuteCommand(import_univer_sheets3.BindSheetCellDatasetCommand.id, {
|
|
@@ -7709,7 +7734,18 @@ var SheetsExtUIController = class extends import_core8.Disposable {
|
|
|
7709
7734
|
this.disposeWithMe({ dispose: () => printSub.unsubscribe() });
|
|
7710
7735
|
}
|
|
7711
7736
|
if (this._config.defaultOpenInspector && (this._config.features?.datasetBinding || this._config.features?.printTemplate)) {
|
|
7712
|
-
|
|
7737
|
+
let disposed = false;
|
|
7738
|
+
const timer = setTimeout(() => {
|
|
7739
|
+
if (!disposed) {
|
|
7740
|
+
openSheetInspectorSidebar(this._sidebarService);
|
|
7741
|
+
}
|
|
7742
|
+
}, 120);
|
|
7743
|
+
this.disposeWithMe({
|
|
7744
|
+
dispose: () => {
|
|
7745
|
+
disposed = true;
|
|
7746
|
+
clearTimeout(timer);
|
|
7747
|
+
}
|
|
7748
|
+
});
|
|
7713
7749
|
}
|
|
7714
7750
|
}
|
|
7715
7751
|
_initIcons() {
|