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