@univerjs/sheets-table-ui 1.0.0-alpha.8 → 1.0.0-beta.0
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 +35 -42
- package/lib/cjs/locale/ca-ES.js +3 -3
- package/lib/cjs/locale/zh-HK.js +14 -14
- package/lib/cjs/locale/zh-TW.js +14 -14
- package/lib/es/index.js +36 -43
- package/lib/es/locale/ca-ES.js +3 -3
- package/lib/es/locale/zh-HK.js +14 -14
- package/lib/es/locale/zh-TW.js +14 -14
- package/lib/index.js +36 -43
- package/lib/locale/ca-ES.js +3 -3
- package/lib/locale/zh-HK.js +14 -14
- package/lib/locale/zh-TW.js +14 -14
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -14
package/lib/cjs/index.js
CHANGED
|
@@ -50,14 +50,13 @@ const OpenTableSelectorOperation = {
|
|
|
50
50
|
type: _univerjs_core.CommandType.OPERATION,
|
|
51
51
|
id: "sheet.operation.open-table-selector",
|
|
52
52
|
async handler(accessor) {
|
|
53
|
-
var _lastSelection$range;
|
|
54
53
|
const univerInstanceService = accessor.get(_univerjs_core.IUniverInstanceService);
|
|
55
54
|
const commandService = accessor.get(_univerjs_core.ICommandService);
|
|
56
55
|
const target = (0, _univerjs_sheets.getSheetCommandTarget)(univerInstanceService);
|
|
57
56
|
if (!target) return false;
|
|
58
57
|
const { unitId, subUnitId, worksheet } = target;
|
|
59
58
|
const lastSelection = accessor.get(_univerjs_sheets.SheetsSelectionsService).getCurrentLastSelection();
|
|
60
|
-
const range = (
|
|
59
|
+
const range = (lastSelection === null || lastSelection === void 0 ? void 0 : lastSelection.range) ?? {
|
|
61
60
|
startRow: 0,
|
|
62
61
|
endRow: 0,
|
|
63
62
|
startColumn: 0,
|
|
@@ -249,7 +248,7 @@ const menuSchema = {
|
|
|
249
248
|
//#endregion
|
|
250
249
|
//#region package.json
|
|
251
250
|
var name = "@univerjs/sheets-table-ui";
|
|
252
|
-
var version = "1.0.0-
|
|
251
|
+
var version = "1.0.0-beta.0";
|
|
253
252
|
|
|
254
253
|
//#endregion
|
|
255
254
|
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
@@ -900,7 +899,7 @@ function getInitConditionInfo(tableFilter) {
|
|
|
900
899
|
//#endregion
|
|
901
900
|
//#region src/views/components/SheetTableConditionPanel.tsx
|
|
902
901
|
const SheetTableConditionPanel = (props) => {
|
|
903
|
-
var _conditionInfo$info$d, _conditionInfo$info$d2, _conditionInfo$info$
|
|
902
|
+
var _conditionInfo$info$d, _conditionInfo$info$d2, _conditionInfo$info$n, _conditionInfo$info$n3;
|
|
904
903
|
const { conditionInfo, onChange } = props;
|
|
905
904
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
906
905
|
const [conditionVisible, setConditionVisible] = (0, react.useState)(false);
|
|
@@ -908,13 +907,12 @@ const SheetTableConditionPanel = (props) => {
|
|
|
908
907
|
const cascaderOptions = getCascaderListOptions(injector);
|
|
909
908
|
const handleConditionInfo = (info, type, compare) => {
|
|
910
909
|
onChange({
|
|
911
|
-
type: type
|
|
912
|
-
compare: compare
|
|
910
|
+
type: type ?? conditionInfo.type,
|
|
911
|
+
compare: compare ?? conditionInfo.compare,
|
|
913
912
|
info
|
|
914
913
|
});
|
|
915
914
|
};
|
|
916
915
|
const handleChange = (value) => {
|
|
917
|
-
var _ref;
|
|
918
916
|
const type = value[0];
|
|
919
917
|
const compare = value[1];
|
|
920
918
|
if (compare) setConditionVisible(false);
|
|
@@ -925,7 +923,7 @@ const SheetTableConditionPanel = (props) => {
|
|
|
925
923
|
else info.dateRange = [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
|
|
926
924
|
else if (type === _univerjs_sheets_table.TableConditionTypeEnum.Number) info.number = 0;
|
|
927
925
|
else if (type === _univerjs_sheets_table.TableConditionTypeEnum.String) info.string = "";
|
|
928
|
-
handleConditionInfo(info, value[0],
|
|
926
|
+
handleConditionInfo(info, value[0], value[1] ?? _univerjs_sheets_table.TableStringCompareTypeEnum.Equal);
|
|
929
927
|
};
|
|
930
928
|
const subComponentType = getSubComponentType(conditionInfo.type, conditionInfo.compare);
|
|
931
929
|
let selectType = "";
|
|
@@ -967,7 +965,7 @@ const SheetTableConditionPanel = (props) => {
|
|
|
967
965
|
id: "univer-table-date-picker-wrapper",
|
|
968
966
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.DatePicker, {
|
|
969
967
|
className: "univer-w-full",
|
|
970
|
-
value:
|
|
968
|
+
value: conditionInfo.info.date ?? /* @__PURE__ */ new Date(),
|
|
971
969
|
onValueChange: (v) => handleConditionInfo({ date: v })
|
|
972
970
|
})
|
|
973
971
|
}),
|
|
@@ -975,7 +973,7 @@ const SheetTableConditionPanel = (props) => {
|
|
|
975
973
|
id: "univer-table-date-range-wrapper",
|
|
976
974
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.DateRangePicker, {
|
|
977
975
|
className: "univer-w-full",
|
|
978
|
-
value: [(
|
|
976
|
+
value: [((_conditionInfo$info$d = conditionInfo.info.dateRange) === null || _conditionInfo$info$d === void 0 ? void 0 : _conditionInfo$info$d[0]) ?? /* @__PURE__ */ new Date(), ((_conditionInfo$info$d2 = conditionInfo.info.dateRange) === null || _conditionInfo$info$d2 === void 0 ? void 0 : _conditionInfo$info$d2[1]) ?? /* @__PURE__ */ new Date()],
|
|
979
977
|
onValueChange: (v) => {
|
|
980
978
|
if (v) handleConditionInfo({ dateRange: v });
|
|
981
979
|
else handleConditionInfo({});
|
|
@@ -1012,7 +1010,7 @@ const SheetTableConditionPanel = (props) => {
|
|
|
1012
1010
|
}),
|
|
1013
1011
|
!!(subComponentType === "Select") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Select, {
|
|
1014
1012
|
className: "univer-w-full",
|
|
1015
|
-
value:
|
|
1013
|
+
value: conditionInfo.info.dateSelect ?? conditionDateOptions[0].value,
|
|
1016
1014
|
options: conditionDateOptions,
|
|
1017
1015
|
onChange: (v) => handleConditionInfo({ dateSelect: v })
|
|
1018
1016
|
})
|
|
@@ -1025,8 +1023,7 @@ const SheetTableConditionPanel = (props) => {
|
|
|
1025
1023
|
const getCheckedItemCount = (map, checkedItemSet) => {
|
|
1026
1024
|
let count = 0;
|
|
1027
1025
|
checkedItemSet.forEach((item) => {
|
|
1028
|
-
|
|
1029
|
-
count += (_map$get = map.get(item)) !== null && _map$get !== void 0 ? _map$get : 0;
|
|
1026
|
+
count += map.get(item) ?? 0;
|
|
1030
1027
|
});
|
|
1031
1028
|
return count;
|
|
1032
1029
|
};
|
|
@@ -1381,7 +1378,6 @@ function SheetTableFilterPanel() {
|
|
|
1381
1378
|
//#endregion
|
|
1382
1379
|
//#region src/views/components/SheetTableRenameDialog.tsx
|
|
1383
1380
|
function SheetTableRenameDialog(props) {
|
|
1384
|
-
var _table$getDisplayName;
|
|
1385
1381
|
const { unitId, tableId, onClose } = props;
|
|
1386
1382
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
1387
1383
|
const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
|
|
@@ -1389,7 +1385,7 @@ function SheetTableRenameDialog(props) {
|
|
|
1389
1385
|
const univerInstanceService = (0, _univerjs_ui.useDependency)(_univerjs_core.IUniverInstanceService);
|
|
1390
1386
|
const definedNamesService = (0, _univerjs_ui.useDependency)(_univerjs_engine_formula.IDefinedNamesService);
|
|
1391
1387
|
const table = tableManager.getTableById(unitId, tableId);
|
|
1392
|
-
const [value, setValue] = (0, react.useState)((
|
|
1388
|
+
const [value, setValue] = (0, react.useState)((table === null || table === void 0 ? void 0 : table.getDisplayName()) ?? "");
|
|
1393
1389
|
const [error, setError] = (0, react.useState)("");
|
|
1394
1390
|
const existingNames = (0, react.useMemo)(() => {
|
|
1395
1391
|
const names = (0, _univerjs_sheets_table.getExistingNamesSet)(unitId, {
|
|
@@ -1577,7 +1573,7 @@ SheetTableThemeUIController = __decorate([__decorateParam(0, (0, _univerjs_core.
|
|
|
1577
1573
|
//#endregion
|
|
1578
1574
|
//#region src/views/components/SheetTableThemePanel.tsx
|
|
1579
1575
|
const SheetTableThemePanel = (props) => {
|
|
1580
|
-
var _customStyle$getHeade, _customStyle$
|
|
1576
|
+
var _customStyle$getHeade, _customStyle$getFirst, _customStyle$getSecon, _customStyle$getLastR;
|
|
1581
1577
|
const { unitId, subUnitId, tableId } = props;
|
|
1582
1578
|
const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
|
|
1583
1579
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
@@ -1602,10 +1598,10 @@ const SheetTableThemePanel = (props) => {
|
|
|
1602
1598
|
const customSelected = customRangeThemes.find((item) => item === selectedTheme);
|
|
1603
1599
|
const customStyleName = customSelected || customRangeThemes[0];
|
|
1604
1600
|
const customStyle = rangeThemeModel.getCustomRangeThemeStyle(unitId, customStyleName);
|
|
1605
|
-
const headerBg = (
|
|
1606
|
-
const firstRowBg = (
|
|
1607
|
-
const secondRowBg = (
|
|
1608
|
-
const lastRowBg = (
|
|
1601
|
+
const headerBg = (customStyle === null || customStyle === void 0 || (_customStyle$getHeade = customStyle.getHeaderRowStyle()) === null || _customStyle$getHeade === void 0 || (_customStyle$getHeade = _customStyle$getHeade.bg) === null || _customStyle$getHeade === void 0 ? void 0 : _customStyle$getHeade.rgb) ?? "rgb(255, 255, 255)";
|
|
1602
|
+
const firstRowBg = (customStyle === null || customStyle === void 0 || (_customStyle$getFirst = customStyle.getFirstRowStyle()) === null || _customStyle$getFirst === void 0 || (_customStyle$getFirst = _customStyle$getFirst.bg) === null || _customStyle$getFirst === void 0 ? void 0 : _customStyle$getFirst.rgb) ?? "rgb(255, 255, 255)";
|
|
1603
|
+
const secondRowBg = (customStyle === null || customStyle === void 0 || (_customStyle$getSecon = customStyle.getSecondRowStyle()) === null || _customStyle$getSecon === void 0 || (_customStyle$getSecon = _customStyle$getSecon.bg) === null || _customStyle$getSecon === void 0 ? void 0 : _customStyle$getSecon.rgb) ?? "rgb(255, 255, 255)";
|
|
1604
|
+
const lastRowBg = (customStyle === null || customStyle === void 0 || (_customStyle$getLastR = customStyle.getLastRowStyle()) === null || _customStyle$getLastR === void 0 || (_customStyle$getLastR = _customStyle$getLastR.bg) === null || _customStyle$getLastR === void 0 ? void 0 : _customStyle$getLastR.rgb) ?? "rgb(255, 255, 255)";
|
|
1609
1605
|
const [hoverCustomId, setHoverCustomId] = (0, react.useState)(null);
|
|
1610
1606
|
const handleThemeChange = (theme) => {
|
|
1611
1607
|
commandService.executeCommand(_univerjs_sheets_table.SetSheetTableCommand.id, {
|
|
@@ -1712,28 +1708,28 @@ const SheetTableThemePanel = (props) => {
|
|
|
1712
1708
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1713
1709
|
className: "univer-box-border univer-h-2.5",
|
|
1714
1710
|
style: {
|
|
1715
|
-
background: headerRowBg
|
|
1711
|
+
background: headerRowBg ?? "none",
|
|
1716
1712
|
border: `${headerRowBg ? TABLE_BORDER_NONE : TABLE_BORDER_DEFAULT}`
|
|
1717
1713
|
}
|
|
1718
1714
|
}),
|
|
1719
1715
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1720
1716
|
className: "univer-box-border univer-h-2.5",
|
|
1721
1717
|
style: {
|
|
1722
|
-
background: firstRowBg
|
|
1718
|
+
background: firstRowBg ?? "none",
|
|
1723
1719
|
border: `${firstRowBg ? TABLE_BORDER_NONE : TABLE_BORDER_DEFAULT}`
|
|
1724
1720
|
}
|
|
1725
1721
|
}),
|
|
1726
1722
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1727
1723
|
className: "univer-box-border univer-h-2.5",
|
|
1728
1724
|
style: {
|
|
1729
|
-
background: secondRowBg
|
|
1725
|
+
background: secondRowBg ?? "none",
|
|
1730
1726
|
border: `${secondRowBg ? TABLE_BORDER_NONE : TABLE_BORDER_DEFAULT}`
|
|
1731
1727
|
}
|
|
1732
1728
|
}),
|
|
1733
1729
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1734
1730
|
className: "univer-box-border univer-h-2.5",
|
|
1735
1731
|
style: {
|
|
1736
|
-
background: lastRowBg
|
|
1732
|
+
background: lastRowBg ?? "none",
|
|
1737
1733
|
border: `${lastRowBg ? TABLE_BORDER_NONE : TABLE_BORDER_DEFAULT}`
|
|
1738
1734
|
}
|
|
1739
1735
|
}),
|
|
@@ -2056,12 +2052,11 @@ var SheetTableControlsShape = class extends _univerjs_engine_render.Shape {
|
|
|
2056
2052
|
ctx.textBaseline = "middle";
|
|
2057
2053
|
for (const item of this._items) this._drawAnchor(ctx, skeleton, item);
|
|
2058
2054
|
if (this._hoveredInsertRegion) {
|
|
2059
|
-
var _item$fill;
|
|
2060
2055
|
const item = this._items.find((renderItem) => {
|
|
2061
2056
|
var _this$_hoveredInsertR;
|
|
2062
2057
|
return renderItem.tableId === ((_this$_hoveredInsertR = this._hoveredInsertRegion) === null || _this$_hoveredInsertR === void 0 ? void 0 : _this$_hoveredInsertR.tableId);
|
|
2063
2058
|
});
|
|
2064
|
-
this._drawInsertButton(ctx, this._hoveredInsertRegion, (
|
|
2059
|
+
this._drawInsertButton(ctx, this._hoveredInsertRegion, (item === null || item === void 0 ? void 0 : item.fill) ?? "#355bb7");
|
|
2065
2060
|
this._regions.push(this._hoveredInsertRegion);
|
|
2066
2061
|
}
|
|
2067
2062
|
ctx.restore();
|
|
@@ -2255,7 +2250,7 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2255
2250
|
this._refresh();
|
|
2256
2251
|
}
|
|
2257
2252
|
_initShape() {
|
|
2258
|
-
var _this$_context$compon
|
|
2253
|
+
var _this$_context$compon;
|
|
2259
2254
|
this._context.scene.addObjects([this._shape], TABLE_CONTROLS_LAYER_INDEX);
|
|
2260
2255
|
this.disposeWithMe((0, _univerjs_core.toDisposable)(() => {
|
|
2261
2256
|
this._context.scene.removeObjects([this._shape]);
|
|
@@ -2269,11 +2264,11 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2269
2264
|
this.disposeWithMe(this._shape.onPointerDown$.subscribeEvent((evt, state) => {
|
|
2270
2265
|
this._handlePointerDown(evt, state);
|
|
2271
2266
|
}));
|
|
2272
|
-
this.disposeWithMe((_this$_context$compon =
|
|
2267
|
+
this.disposeWithMe(((_this$_context$compon = this._context.components.get(_univerjs_sheets_ui.SHEET_VIEW_KEY.MAIN)) === null || _this$_context$compon === void 0 ? void 0 : _this$_context$compon.onPointerMove$.subscribeEvent((evt) => {
|
|
2273
2268
|
const point = this._getLocalPoint(evt);
|
|
2274
2269
|
const insertRegion = this._getInsertRegionFromPoint(point.x, point.y);
|
|
2275
2270
|
this._shape.setHoveredInsertRegion(insertRegion);
|
|
2276
|
-
}))
|
|
2271
|
+
})) ?? (0, _univerjs_core.toDisposable)(() => {}));
|
|
2277
2272
|
}
|
|
2278
2273
|
_initRefresh() {
|
|
2279
2274
|
const commandExecuted$ = (0, _univerjs_core.fromCallback)(this._commandService.onCommandExecuted.bind(this._commandService)).pipe((0, rxjs.filter)(([command]) => {
|
|
@@ -2313,14 +2308,14 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2313
2308
|
const unitId = this._context.unit.getUnitId();
|
|
2314
2309
|
const subUnitId = worksheet.getSheetId();
|
|
2315
2310
|
const items = this._tableManager.getTablesBySubunitId(unitId, subUnitId).map((table) => {
|
|
2316
|
-
var _rangeTheme$getHeader, _rangeTheme$getHeader2
|
|
2311
|
+
var _rangeTheme$getHeader, _rangeTheme$getHeader2;
|
|
2317
2312
|
const rangeTheme = this._rangeThemeModel.getRangeThemeStyle(unitId, table.getTableStyleId());
|
|
2318
2313
|
return {
|
|
2319
2314
|
tableId: table.getId(),
|
|
2320
2315
|
tableName: table.getDisplayName(),
|
|
2321
2316
|
range: table.getRange(),
|
|
2322
|
-
fill: (
|
|
2323
|
-
text: (
|
|
2317
|
+
fill: (rangeTheme === null || rangeTheme === void 0 || (_rangeTheme$getHeader = rangeTheme.getHeaderRowStyle()) === null || _rangeTheme$getHeader === void 0 || (_rangeTheme$getHeader = _rangeTheme$getHeader.bg) === null || _rangeTheme$getHeader === void 0 ? void 0 : _rangeTheme$getHeader.rgb) ?? "rgb(53,91,183)",
|
|
2318
|
+
text: (rangeTheme === null || rangeTheme === void 0 || (_rangeTheme$getHeader2 = rangeTheme.getHeaderRowStyle()) === null || _rangeTheme$getHeader2 === void 0 || (_rangeTheme$getHeader2 = _rangeTheme$getHeader2.cl) === null || _rangeTheme$getHeader2 === void 0 ? void 0 : _rangeTheme$getHeader2.rgb) ?? "rgb(255,255,255)"
|
|
2324
2319
|
};
|
|
2325
2320
|
});
|
|
2326
2321
|
this._shape.setItems(items);
|
|
@@ -2337,7 +2332,7 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2337
2332
|
const point = this._getLocalPoint(evt);
|
|
2338
2333
|
const hit = this._shape.hitTest(point.x, point.y);
|
|
2339
2334
|
const insertRegion = this._isInsertHit(hit) ? hit : hit ? null : this._getInsertRegionFromPoint(point.x, point.y);
|
|
2340
|
-
const activeHit = hit
|
|
2335
|
+
const activeHit = hit ?? insertRegion;
|
|
2341
2336
|
this._shape.setHoveredRegion(this._isInsertHit(hit) ? null : hit);
|
|
2342
2337
|
this._shape.setHoveredInsertRegion(insertRegion);
|
|
2343
2338
|
if (activeHit) {
|
|
@@ -2355,10 +2350,9 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2355
2350
|
this._context.scene.resetCursor();
|
|
2356
2351
|
}
|
|
2357
2352
|
_handlePointerDown(evt, state) {
|
|
2358
|
-
var _this$_shape$hitTest;
|
|
2359
2353
|
if (evt.button === 2) return;
|
|
2360
2354
|
const point = this._getLocalPoint(evt);
|
|
2361
|
-
const hit =
|
|
2355
|
+
const hit = this._shape.hitTest(point.x, point.y) ?? this._getInsertRegionFromPoint(point.x, point.y);
|
|
2362
2356
|
if (!hit) {
|
|
2363
2357
|
this._closeFloatingControls();
|
|
2364
2358
|
return;
|
|
@@ -2515,12 +2509,11 @@ let SheetTableControlsRenderController = class SheetTableControlsRenderControlle
|
|
|
2515
2509
|
const previousTopGap = rowGaps[TABLE_CONTROL_GAP_ROW] ? { ...rowGaps[TABLE_CONTROL_GAP_ROW] } : null;
|
|
2516
2510
|
let shouldSync = false;
|
|
2517
2511
|
if (hasTopTable) {
|
|
2518
|
-
var _baseGap$size;
|
|
2519
2512
|
if (!this._topGapBaseBySkeleton.has(skeleton)) this._topGapBaseBySkeleton.set(skeleton, rowGaps[TABLE_CONTROL_GAP_ROW] ? { ...rowGaps[TABLE_CONTROL_GAP_ROW] } : null);
|
|
2520
2513
|
const baseGap = this._topGapBaseBySkeleton.get(skeleton);
|
|
2521
2514
|
rowGaps[TABLE_CONTROL_GAP_ROW] = {
|
|
2522
|
-
...baseGap
|
|
2523
|
-
size: ((
|
|
2515
|
+
...baseGap ?? rowGaps[TABLE_CONTROL_GAP_ROW],
|
|
2516
|
+
size: ((baseGap === null || baseGap === void 0 ? void 0 : baseGap.size) ?? 0) + 32
|
|
2524
2517
|
};
|
|
2525
2518
|
shouldSync = true;
|
|
2526
2519
|
} else if (this._topGapBaseBySkeleton.has(skeleton)) {
|
|
@@ -2741,12 +2734,12 @@ let SheetsTableFilterButtonRenderController = class SheetsTableFilterButtonRende
|
|
|
2741
2734
|
const worksheet = workbook.getSheetBySheetId(worksheetId);
|
|
2742
2735
|
if (!worksheet) return;
|
|
2743
2736
|
for (const { range, states, tableId } of tableFilterRanges) {
|
|
2744
|
-
var _this$_rangeThemeMode, _headerStyle$cl
|
|
2737
|
+
var _this$_rangeThemeMode, _headerStyle$cl, _headerStyle$bg;
|
|
2745
2738
|
const { startRow, startColumn, endColumn } = range;
|
|
2746
2739
|
const table = this._tableManager.getTableById(unitId, tableId);
|
|
2747
2740
|
const headerStyle = table ? (_this$_rangeThemeMode = this._rangeThemeModel.getRangeThemeStyle(unitId, table.getTableStyleId())) === null || _this$_rangeThemeMode === void 0 ? void 0 : _this$_rangeThemeMode.getHeaderRowStyle() : null;
|
|
2748
|
-
const iconColor = (
|
|
2749
|
-
const hoverIconColor = (
|
|
2741
|
+
const iconColor = (headerStyle === null || headerStyle === void 0 || (_headerStyle$cl = headerStyle.cl) === null || _headerStyle$cl === void 0 ? void 0 : _headerStyle$cl.rgb) ?? "#fff";
|
|
2742
|
+
const hoverIconColor = (headerStyle === null || headerStyle === void 0 || (_headerStyle$bg = headerStyle.bg) === null || _headerStyle$bg === void 0 ? void 0 : _headerStyle$bg.rgb) ?? "#202124";
|
|
2750
2743
|
this._interceptCellContent(unitId, worksheetId, range);
|
|
2751
2744
|
for (let col = startColumn; col <= endColumn; col++) {
|
|
2752
2745
|
const key = `sheets-table-filter-button-${startRow}-${col}`;
|
|
@@ -3017,7 +3010,7 @@ _defineProperty(UniverSheetsTableUIPlugin, "packageName", name);
|
|
|
3017
3010
|
_defineProperty(UniverSheetsTableUIPlugin, "version", version);
|
|
3018
3011
|
_defineProperty(UniverSheetsTableUIPlugin, "type", _univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
3019
3012
|
UniverSheetsTableUIPlugin = __decorate([
|
|
3020
|
-
(0, _univerjs_core.DependentOn)(_univerjs_engine_render.UniverRenderEnginePlugin, _univerjs_sheets.UniverSheetsPlugin,
|
|
3013
|
+
(0, _univerjs_core.DependentOn)(_univerjs_engine_render.UniverRenderEnginePlugin, _univerjs_sheets.UniverSheetsPlugin, _univerjs_sheets_table.UniverSheetsTablePlugin, _univerjs_sheets_ui.UniverSheetsUIPlugin),
|
|
3021
3014
|
__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector)),
|
|
3022
3015
|
__decorateParam(2, (0, _univerjs_core.Inject)(_univerjs_core.ICommandService)),
|
|
3023
3016
|
__decorateParam(3, _univerjs_core.IConfigService),
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -26,9 +26,9 @@ const locale = { "sheets-table-ui": {
|
|
|
26
26
|
tablePrefix: "Taula",
|
|
27
27
|
tableNameError: "El nom de la taula no pot contenir espais, no pot començar amb un número i no pot ser idèntic a un nom de taula existent",
|
|
28
28
|
columnMenu: {
|
|
29
|
-
"insert-left": "
|
|
30
|
-
"insert-right": "
|
|
31
|
-
delete: "
|
|
29
|
+
"insert-left": "Insereix una columna de taula a l’esquerra",
|
|
30
|
+
"insert-right": "Insereix una columna de taula a la dreta",
|
|
31
|
+
delete: "Suprimeix la columna de la taula"
|
|
32
32
|
},
|
|
33
33
|
sort: {
|
|
34
34
|
"sort-asc": "Ascendent",
|
package/lib/cjs/locale/zh-HK.js
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
const locale = { "sheets-table-ui": {
|
|
4
4
|
title: "表格",
|
|
5
5
|
selectRange: "選擇表格範圍",
|
|
6
|
-
rename: "
|
|
6
|
+
rename: "重新命名表格",
|
|
7
7
|
renamePlaceholder: "輸入表格名稱",
|
|
8
8
|
updateRange: "更新表格範圍",
|
|
9
9
|
tableRangeWithMergeError: "表格範圍不能與合併儲存格重疊",
|
|
10
10
|
tableRangeWithOtherTableError: "表格範圍不能與其他表格重疊",
|
|
11
|
-
tableRangeSingleRowError: "
|
|
12
|
-
updateError: "
|
|
11
|
+
tableRangeSingleRowError: "表格範圍不能只有一列",
|
|
12
|
+
updateError: "不能將表格範圍設定為與原範圍不重疊且不在同一列的範圍",
|
|
13
13
|
tableStyle: "表格樣式",
|
|
14
14
|
defaultStyle: "預設樣式",
|
|
15
|
-
customStyle: "
|
|
16
|
-
customTooMore: "
|
|
17
|
-
setTheme: "
|
|
15
|
+
customStyle: "自訂樣式",
|
|
16
|
+
customTooMore: "自訂主題數量超出上限,請刪除一些不需要的主題後再新增",
|
|
17
|
+
setTheme: "設定表格主題",
|
|
18
18
|
removeTable: "刪除表格",
|
|
19
19
|
cancel: "取消",
|
|
20
20
|
confirm: "確認",
|
|
21
21
|
header: "頁首",
|
|
22
22
|
footer: "頁尾",
|
|
23
|
-
firstLine: "
|
|
24
|
-
secondLine: "
|
|
25
|
-
columnPrefix: "
|
|
23
|
+
firstLine: "第一列",
|
|
24
|
+
secondLine: "第二列",
|
|
25
|
+
columnPrefix: "欄",
|
|
26
26
|
tablePrefix: "表格",
|
|
27
|
-
tableNameError: "
|
|
27
|
+
tableNameError: "表格名稱不能包含空格、以數字開頭或與現有表格名稱重複",
|
|
28
28
|
columnMenu: {
|
|
29
29
|
"insert-left": "向左插入 1 個表格欄",
|
|
30
30
|
"insert-right": "向右插入 1 個表格欄",
|
|
@@ -36,13 +36,13 @@ const locale = { "sheets-table-ui": {
|
|
|
36
36
|
},
|
|
37
37
|
insert: {
|
|
38
38
|
main: "表格插入",
|
|
39
|
-
row: "
|
|
40
|
-
col: "
|
|
39
|
+
row: "插入表格列",
|
|
40
|
+
col: "插入表格欄"
|
|
41
41
|
},
|
|
42
42
|
remove: {
|
|
43
43
|
main: "表格刪除",
|
|
44
|
-
row: "
|
|
45
|
-
col: "
|
|
44
|
+
row: "刪除表格列",
|
|
45
|
+
col: "刪除表格欄"
|
|
46
46
|
},
|
|
47
47
|
condition: {
|
|
48
48
|
string: "文字",
|
package/lib/cjs/locale/zh-TW.js
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
const locale = { "sheets-table-ui": {
|
|
4
4
|
title: "表格",
|
|
5
5
|
selectRange: "選擇表格範圍",
|
|
6
|
-
rename: "
|
|
6
|
+
rename: "重新命名表格",
|
|
7
7
|
renamePlaceholder: "輸入表格名稱",
|
|
8
8
|
updateRange: "更新表格範圍",
|
|
9
9
|
tableRangeWithMergeError: "表格範圍不能與合併儲存格重疊",
|
|
10
10
|
tableRangeWithOtherTableError: "表格範圍不能與其他表格重疊",
|
|
11
|
-
tableRangeSingleRowError: "
|
|
12
|
-
updateError: "
|
|
11
|
+
tableRangeSingleRowError: "表格範圍不能只有一列",
|
|
12
|
+
updateError: "不能將表格範圍設定為與原範圍不重疊且不在同一列的範圍",
|
|
13
13
|
tableStyle: "表格樣式",
|
|
14
14
|
defaultStyle: "預設樣式",
|
|
15
|
-
customStyle: "
|
|
16
|
-
customTooMore: "
|
|
17
|
-
setTheme: "
|
|
15
|
+
customStyle: "自訂樣式",
|
|
16
|
+
customTooMore: "自訂主題數量超出上限,請刪除一些不需要的主題後再新增",
|
|
17
|
+
setTheme: "設定表格主題",
|
|
18
18
|
removeTable: "刪除表格",
|
|
19
19
|
cancel: "取消",
|
|
20
20
|
confirm: "確認",
|
|
21
21
|
header: "頁首",
|
|
22
22
|
footer: "頁尾",
|
|
23
|
-
firstLine: "
|
|
24
|
-
secondLine: "
|
|
25
|
-
columnPrefix: "
|
|
23
|
+
firstLine: "第一列",
|
|
24
|
+
secondLine: "第二列",
|
|
25
|
+
columnPrefix: "欄",
|
|
26
26
|
tablePrefix: "表格",
|
|
27
|
-
tableNameError: "
|
|
27
|
+
tableNameError: "表格名稱不能包含空格、以數字開頭或與現有表格名稱重複",
|
|
28
28
|
columnMenu: {
|
|
29
29
|
"insert-left": "向左插入 1 個表格欄",
|
|
30
30
|
"insert-right": "向右插入 1 個表格欄",
|
|
@@ -36,13 +36,13 @@ const locale = { "sheets-table-ui": {
|
|
|
36
36
|
},
|
|
37
37
|
insert: {
|
|
38
38
|
main: "表格插入",
|
|
39
|
-
row: "
|
|
40
|
-
col: "
|
|
39
|
+
row: "插入表格列",
|
|
40
|
+
col: "插入表格欄"
|
|
41
41
|
},
|
|
42
42
|
remove: {
|
|
43
43
|
main: "表格刪除",
|
|
44
|
-
row: "
|
|
45
|
-
col: "
|
|
44
|
+
row: "刪除表格列",
|
|
45
|
+
col: "刪除表格欄"
|
|
46
46
|
},
|
|
47
47
|
condition: {
|
|
48
48
|
string: "文字",
|