@a3s-lab/office 0.18.0 → 0.19.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/README.md +11 -4
- package/dist/0~spreadsheet-editor.js +4434 -4015
- package/dist/0~work-office-diagnostics.js +1 -1
- package/dist/4104.js +18 -9
- package/dist/{1992.js → 6164.js} +107 -1
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/features/work/editors/spreadsheet-alignment-ribbon.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-format.d.ts +2 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-ribbon.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +110 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +4 -2
- package/dist/internal/features/work/editors/spreadsheet-command-selection.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-editing-ribbon.d.ts +6 -0
- package/dist/internal/features/work/editors/spreadsheet-keyboard-shortcut-runners.d.ts +16 -0
- package/dist/internal/features/work/editors/spreadsheet-keyboard-shortcuts.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-rows-columns-ribbon.d.ts +5 -0
- package/dist/internal/features/work/editors/spreadsheet-selection-navigation-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-structure-command.d.ts +5 -0
- package/dist/internal/features/work/editors/spreadsheet-text-orientation-command.d.ts +18 -0
- package/dist/internal/features/work/editors/spreadsheet-view-ribbon.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-visibility-shortcuts.d.ts +3 -0
- package/dist/internal/features/work/work-spreadsheet-text-orientation.d.ts +21 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +48 -0
- package/package.json +3 -1
|
@@ -5,7 +5,7 @@ import { markDocxParagraphShading, inspectDocxPageSize, docxCaptionBookmark, has
|
|
|
5
5
|
import { normalizeDocumentHref } from "./0~work-document-links.js";
|
|
6
6
|
import { xmlAttributeLocalName, parseDocxParagraphDefaultCollapsed, readDocxBibliography, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, createDocxThemeResolver } from "./0~2805.js";
|
|
7
7
|
import { updateSpreadsheetWorksheetCompatibilitySummary, inspectXlsxPivotTables, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, xlsxChartNodeUsesStackedGrouping, isSupportedXlsxChartSeriesFormatting, readXlsxFormulaFeaturesFromPackage, inspectXlsxHeaderFooterText, emptySpreadsheetWorksheetCompatibilitySummary, xlsxChartSeriesFormattingShapeProperties, MAX_XLSX_WORKSHEET_IMAGE_BYTES, isSupportedXlsxWorksheetImageContentType, xlsxWorksheetCellEntries, diagnoseXlsxProtection, isEditableXlsxPaperSizeCode, isSupportedXlsxCombinationChartNodes } from "./4104.js";
|
|
8
|
-
import { spreadsheetConditionalComparisonNeedsUpperValue, isSpreadsheetConditionalIconSetName, isSpreadsheetConditionalComparisonOperator, spreadsheetConditionalIconSetCount } from "./
|
|
8
|
+
import { spreadsheetConditionalComparisonNeedsUpperValue, isSpreadsheetConditionalIconSetName, isSpreadsheetConditionalComparisonOperator, spreadsheetConditionalIconSetCount } from "./6164.js";
|
|
9
9
|
import { formulaHasStructuredReference, formulaHasExternalReference, parseSpreadsheetPrintTitles, volatileSpreadsheetFormulaFunctions, stripSpreadsheetSheetQualifier } from "./8715.js";
|
|
10
10
|
import { unsupportedSpreadsheetFormulaFunctions } from "./0~work-spreadsheet-formula-support.js";
|
|
11
11
|
var work_office_diagnostics_namespaceObject = {};
|
package/dist/4104.js
CHANGED
|
@@ -5,7 +5,7 @@ import { OFFICE_COLLABORATION_PROTOCOL as WORK_OFFICE_COLLABORATION_PROTOCOL, Of
|
|
|
5
5
|
import { contentTypeForPart, directChildren, bytesToDataUrl, OoxmlPackage as work_ooxml_package_OoxmlPackage, parseXml, firstDescendant, xmlNamespacePrefix, descendants, directChild, createArtifact as createWorkArtifact, xmlContainsAnyElement, createOfficeId as createWorkId, attribute as work_ooxml_package_attribute } from "./5184.js";
|
|
6
6
|
import { mountWorkLiveDocumentCapture, materializeWorkDocumentContent as work_document_model_codec_materializeWorkDocumentContent, documentPageSurfaceGeometryForElement, createWorkDocumentModel, documentContentLayoutProperties, documentModelForContent, createWorkDocumentExtensions, positionWorkLiveDocumentCapture } from "./6282.js";
|
|
7
7
|
import { normalizeWorkSpreadsheetDataLabels, workSpreadsheetChartSupportsGrouping, normalizeSpreadsheetPrintArea, normalizeWorkSpreadsheetChartLegendPosition, formatSpreadsheetCellRanges, spreadsheetCellAddress, normalizeWorkSpreadsheetChartSmoothLines, spreadsheetFormulaRangeForCell, normalizeWorkSpreadsheetChartColor, readXlsxDrawingAnchor, sparseArrayEntries, qualifySpreadsheetRange, normalizeWorkSpreadsheetBubbleScale, normalizeWorkSpreadsheetChartSeriesStyle, normalizeSpreadsheetPrintTitleRows, normalizeSpreadsheetPrintTitleColumns, spreadsheetPivotFilterValueKey, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetBubbleSizeRepresents, workSpreadsheetChartSupportsTrendlines, stripSpreadsheetSheetQualifier, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsBarSpacing, workSpreadsheetChartSupportsSmoothLines, workSpreadsheetChartGroupingIsStacked, xlsxDrawingAnchorToBounds, xlsxTwoCellAnchorMarkers, workSpreadsheetChartSupportsErrorBars, sparseMatrixColumnCount, refreshSpreadsheetPivotTables, normalizeWorkSpreadsheetChartAxisGroup, isValidSpreadsheetDefinedName, normalizeWorkSpreadsheetScatterStyle, workSpreadsheetChartAxisDefaultLabelPosition, spreadsheetPivotValidation, resolveSpreadsheetChart, parseSpreadsheetCellRanges, workSpreadsheetChartAxisIsCategoryAxis, spreadsheetPivotFields, normalizeWorkSpreadsheetDoughnutHoleSize, normalizeWorkSpreadsheetChartAxes, parseSpreadsheetPrintTitles, spreadsheetFormulaRangeConflict, spreadsheetFormulaForXlsx, editableSpreadsheetFormula, workSpreadsheetChartUsesNumericXAxis, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartSupportsAxes, workSpreadsheetChartAxisShowsMajorGridlinesByDefault, normalizeWorkSpreadsheetCombinationSeriesType, effectiveSpreadsheetCalculationSettings, normalizeWorkSpreadsheetTrendline, normalizeWorkSpreadsheetRadarStyle } from "./8715.js";
|
|
8
|
-
import { freezeImportedSpreadsheetCell, editableRangeRequiresCredentials,
|
|
8
|
+
import { normalizeSpreadsheetDateValidationBoundary, freezeImportedSpreadsheetCell, editableRangeRequiresCredentials, spreadsheetTextOrientationCellStyle, normalizeSpreadsheetConditionalIconSetFormat, defaultSpreadsheetDataBarOptions, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetPaperSize, spreadsheetTextOrientationXlsxValueFromCell, normalizeSheetProtectionAuthority, defaultSpreadsheetColorScaleThresholds, importedSheetProtectionAuthority, spreadsheetDateValidationFormula, spreadsheetUnderlineCellValueFromXlsx, sheetHasProtectionState, spreadsheetTextOrientationFromXlsx, spreadsheetConditionalComparisonNeedsUpperValue, isSpreadsheetConditionalComparisonOperator, registerImportedSpreadsheetMatrix, spreadsheetExplicitTextOrientationFromCell, spreadsheetUnderlineStyle, defaultSpreadsheetConditionalIconThresholds, isSpreadsheetConditionalIconSetName, DEFAULT_PROTECTION_HINT, spreadsheetConditionalThresholdsEqual, spreadsheetUnderlineCellValueFromSheetJs, spreadsheetConditionalIconSetCount } from "./6164.js";
|
|
9
9
|
import { WorkFileImportController, materializeWorkFileSource } from "./9356.js";
|
|
10
10
|
import "./2591.js";
|
|
11
11
|
import "./3818.js";
|
|
@@ -3364,7 +3364,7 @@ function writeXlsxAlignment(document1, xf, style) {
|
|
|
3364
3364
|
if (void 0 !== style.horizontal) alignment.setAttribute('horizontal', style.horizontal);
|
|
3365
3365
|
if (void 0 !== style.vertical) alignment.setAttribute('vertical', style.vertical);
|
|
3366
3366
|
if (void 0 !== style.wrapText) alignment.setAttribute('wrapText', style.wrapText ? '1' : '0');
|
|
3367
|
-
if (void 0 !== style.textRotation) alignment.setAttribute('textRotation', String(style.textRotation));
|
|
3367
|
+
if (void 0 !== style.textRotation && Number.isInteger(style.textRotation) && (style.textRotation >= 0 && style.textRotation <= 180 || 255 === style.textRotation)) alignment.setAttribute('textRotation', String(style.textRotation));
|
|
3368
3368
|
}
|
|
3369
3369
|
function setXlsxValueChild(document1, parent, name, value, order) {
|
|
3370
3370
|
removeXlsxChildren(parent, name);
|
|
@@ -3624,7 +3624,7 @@ class XlsxDirectCellStyleWriter {
|
|
|
3624
3624
|
}
|
|
3625
3625
|
}
|
|
3626
3626
|
function hasXlsxDirectCellStyle(cell) {
|
|
3627
|
-
return Boolean(hasXlsxDirectFontStyle(cell) || void 0 !== cell.bg || void 0 !== cell.ht || void 0 !== cell.vt || void 0 !== cell.tb || void 0 !== cell.tr);
|
|
3627
|
+
return Boolean(hasXlsxDirectFontStyle(cell) || void 0 !== cell.bg || void 0 !== cell.ht || void 0 !== cell.vt || void 0 !== cell.tb || void 0 !== cell.rt || void 0 !== cell.tr);
|
|
3628
3628
|
}
|
|
3629
3629
|
function hasXlsxDirectFontStyle(cell) {
|
|
3630
3630
|
return Boolean(void 0 !== cell.bl || void 0 !== cell.it || void 0 !== cell.un || void 0 !== cell.cl || void 0 !== cell.ff || void 0 !== cell.fs || void 0 !== cell.fc);
|
|
@@ -3660,10 +3660,8 @@ function directAlignment(cell) {
|
|
|
3660
3660
|
if (void 0 !== cell.ht) alignment.horizontal = 0 === Number(cell.ht) ? 'center' : 2 === Number(cell.ht) ? 'right' : 'left';
|
|
3661
3661
|
if (void 0 !== cell.vt) alignment.vertical = 0 === Number(cell.vt) ? 'center' : 1 === Number(cell.vt) ? 'top' : 'bottom';
|
|
3662
3662
|
if (void 0 !== cell.tb) alignment.wrapText = '2' === cell.tb;
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
if (Number.isFinite(rotation) && rotation >= 0 && rotation <= 180) alignment.textRotation = Math.round(rotation);
|
|
3666
|
-
}
|
|
3663
|
+
const rotation = spreadsheetTextOrientationXlsxValueFromCell(cell);
|
|
3664
|
+
if (null !== rotation) alignment.textRotation = rotation;
|
|
3667
3665
|
return Object.keys(alignment).length ? alignment : null;
|
|
3668
3666
|
}
|
|
3669
3667
|
function work_xlsx_cell_style_writer_nonNegativeInteger(value) {
|
|
@@ -3999,7 +3997,9 @@ function readDirectAlignmentStyle(style, alignment) {
|
|
|
3999
3997
|
else if ('bottom' === vertical) style.vt = 2;
|
|
4000
3998
|
if (work_xlsx_cell_styles_booleanAttribute(alignment, 'wrapText')) style.tb = '2';
|
|
4001
3999
|
const rotation = work_xlsx_cell_styles_nonNegativeInteger(work_ooxml_package_attribute(alignment, 'textRotation'));
|
|
4002
|
-
|
|
4000
|
+
const orientation = spreadsheetTextOrientationFromXlsx(rotation);
|
|
4001
|
+
const orientationStyle = spreadsheetTextOrientationCellStyle(orientation);
|
|
4002
|
+
if (orientationStyle) Object.assign(style, orientationStyle);
|
|
4003
4003
|
}
|
|
4004
4004
|
function readDirectCellBorder(xf, borders, colors) {
|
|
4005
4005
|
const borderId = work_xlsx_cell_styles_nonNegativeInteger(work_ooxml_package_attribute(xf, 'borderId')) ?? 0;
|
|
@@ -8537,6 +8537,13 @@ function fortuneCellFromXlsx(source, row, column, sheetId, hyperlink, comment, X
|
|
|
8537
8537
|
...fortuneCellStyle(source),
|
|
8538
8538
|
...directStyle
|
|
8539
8539
|
};
|
|
8540
|
+
const orientation = spreadsheetExplicitTextOrientationFromCell(cell);
|
|
8541
|
+
if (orientation) {
|
|
8542
|
+
const orientationStyle = spreadsheetTextOrientationCellStyle(orientation);
|
|
8543
|
+
delete cell.rt;
|
|
8544
|
+
delete cell.tr;
|
|
8545
|
+
if (orientationStyle) Object.assign(cell, orientationStyle);
|
|
8546
|
+
}
|
|
8540
8547
|
if (void 0 !== source.v) cell.v = source.v;
|
|
8541
8548
|
const displayText = fortuneCellDisplayText(source, XLSX);
|
|
8542
8549
|
if (void 0 !== displayText) cell.m = displayText;
|
|
@@ -8579,7 +8586,9 @@ function fortuneCellStyle(source) {
|
|
|
8579
8586
|
else if (alignment?.vertical === 'top') target.vt = 1;
|
|
8580
8587
|
else if (alignment?.vertical === 'bottom') target.vt = 2;
|
|
8581
8588
|
if (alignment?.wrapText) target.tb = '2';
|
|
8582
|
-
|
|
8589
|
+
const orientation = spreadsheetTextOrientationFromXlsx(alignment?.textRotation);
|
|
8590
|
+
const orientationStyle = spreadsheetTextOrientationCellStyle(orientation);
|
|
8591
|
+
if (orientationStyle) Object.assign(target, orientationStyle);
|
|
8583
8592
|
if (source.z && 'General' !== source.z || 'e' === source.t) target.ct = {
|
|
8584
8593
|
fa: source.z && 'General' !== source.z ? String(source.z) : void 0,
|
|
8585
8594
|
t: source.t
|
package/dist/{1992.js → 6164.js}
RENAMED
|
@@ -2150,6 +2150,112 @@ function spreadsheetUnderlineCellValueFromSheetJs(value) {
|
|
|
2150
2150
|
if (isSpreadsheetUnderlineStyle(value)) return spreadsheetUnderlineCellValue(value);
|
|
2151
2151
|
return spreadsheetUnderlineCellValue(spreadsheetUnderlineStyle(value));
|
|
2152
2152
|
}
|
|
2153
|
+
const spreadsheetTextOrientationIds = [
|
|
2154
|
+
'horizontal',
|
|
2155
|
+
'angleCounterclockwise',
|
|
2156
|
+
'angleClockwise',
|
|
2157
|
+
'vertical',
|
|
2158
|
+
'rotateUp',
|
|
2159
|
+
'rotateDown'
|
|
2160
|
+
];
|
|
2161
|
+
const presetAngles = {
|
|
2162
|
+
horizontal: 0,
|
|
2163
|
+
angleCounterclockwise: 45,
|
|
2164
|
+
angleClockwise: -45,
|
|
2165
|
+
rotateUp: 90,
|
|
2166
|
+
rotateDown: -90
|
|
2167
|
+
};
|
|
2168
|
+
const legacyFortunePresetAngles = {
|
|
2169
|
+
0: 0,
|
|
2170
|
+
1: 45,
|
|
2171
|
+
2: -45,
|
|
2172
|
+
4: 90,
|
|
2173
|
+
5: -90
|
|
2174
|
+
};
|
|
2175
|
+
function isSpreadsheetTextOrientationId(value) {
|
|
2176
|
+
return spreadsheetTextOrientationIds.includes(value);
|
|
2177
|
+
}
|
|
2178
|
+
function spreadsheetTextOrientationFromChoice(choice) {
|
|
2179
|
+
return 'vertical' === choice ? {
|
|
2180
|
+
kind: 'stacked'
|
|
2181
|
+
} : {
|
|
2182
|
+
kind: 'rotation',
|
|
2183
|
+
angle: presetAngles[choice]
|
|
2184
|
+
};
|
|
2185
|
+
}
|
|
2186
|
+
function spreadsheetTextOrientationFromAngle(value) {
|
|
2187
|
+
const angle = integer(value);
|
|
2188
|
+
return null !== angle && angle >= -90 && angle <= 90 ? {
|
|
2189
|
+
kind: 'rotation',
|
|
2190
|
+
angle
|
|
2191
|
+
} : null;
|
|
2192
|
+
}
|
|
2193
|
+
function spreadsheetTextOrientationFromXlsx(value) {
|
|
2194
|
+
const rotation = integer(value);
|
|
2195
|
+
if (255 === rotation) return {
|
|
2196
|
+
kind: 'stacked'
|
|
2197
|
+
};
|
|
2198
|
+
if (null === rotation || rotation < 0 || rotation > 180) return null;
|
|
2199
|
+
return {
|
|
2200
|
+
kind: 'rotation',
|
|
2201
|
+
angle: rotation <= 90 ? rotation : 90 - rotation
|
|
2202
|
+
};
|
|
2203
|
+
}
|
|
2204
|
+
function spreadsheetExplicitTextOrientationFromCell(cell) {
|
|
2205
|
+
if (cell?.rt !== void 0 && null !== cell.rt) {
|
|
2206
|
+
const direct = spreadsheetTextOrientationFromXlsx(cell.rt);
|
|
2207
|
+
if (direct) return direct;
|
|
2208
|
+
}
|
|
2209
|
+
const legacy = String(cell?.tr ?? '').trim();
|
|
2210
|
+
if (!legacy) return null;
|
|
2211
|
+
if ('3' === legacy || '255' === legacy) return {
|
|
2212
|
+
kind: 'stacked'
|
|
2213
|
+
};
|
|
2214
|
+
const presetAngle = legacyFortunePresetAngles[legacy];
|
|
2215
|
+
if (void 0 !== presetAngle) return {
|
|
2216
|
+
kind: 'rotation',
|
|
2217
|
+
angle: presetAngle
|
|
2218
|
+
};
|
|
2219
|
+
const raw = integer(legacy);
|
|
2220
|
+
return null !== raw && raw >= 6 ? spreadsheetTextOrientationFromXlsx(raw) : null;
|
|
2221
|
+
}
|
|
2222
|
+
function spreadsheetTextOrientationFromCell(cell) {
|
|
2223
|
+
return spreadsheetExplicitTextOrientationFromCell(cell) ?? {
|
|
2224
|
+
kind: 'rotation',
|
|
2225
|
+
angle: 0
|
|
2226
|
+
};
|
|
2227
|
+
}
|
|
2228
|
+
function spreadsheetTextOrientationCellStyle(orientation) {
|
|
2229
|
+
if (!orientation) return null;
|
|
2230
|
+
if ('stacked' === orientation.kind) return {
|
|
2231
|
+
tr: '3'
|
|
2232
|
+
};
|
|
2233
|
+
return {
|
|
2234
|
+
rt: orientation.angle < 0 ? 90 - orientation.angle : orientation.angle
|
|
2235
|
+
};
|
|
2236
|
+
}
|
|
2237
|
+
function spreadsheetTextOrientationXlsxValue(orientation) {
|
|
2238
|
+
if (!orientation) return null;
|
|
2239
|
+
if ('stacked' === orientation.kind) return 255;
|
|
2240
|
+
return orientation.angle < 0 ? 90 - orientation.angle : orientation.angle;
|
|
2241
|
+
}
|
|
2242
|
+
function spreadsheetTextOrientationXlsxValueFromCell(cell) {
|
|
2243
|
+
return spreadsheetTextOrientationXlsxValue(spreadsheetExplicitTextOrientationFromCell(cell));
|
|
2244
|
+
}
|
|
2245
|
+
function spreadsheetVisibleTextRotationFromCell(cell) {
|
|
2246
|
+
const orientation = spreadsheetTextOrientationFromCell(cell);
|
|
2247
|
+
return 'rotation' === orientation.kind ? orientation.angle : 0;
|
|
2248
|
+
}
|
|
2249
|
+
function spreadsheetTextOrientationChoiceFromCell(cell) {
|
|
2250
|
+
const orientation = spreadsheetTextOrientationFromCell(cell);
|
|
2251
|
+
if ('stacked' === orientation.kind) return 'vertical';
|
|
2252
|
+
return Object.entries(presetAngles).find(([, angle])=>angle === orientation.angle)?.[0] ?? null;
|
|
2253
|
+
}
|
|
2254
|
+
function integer(value) {
|
|
2255
|
+
if ('string' == typeof value && !/^-?\d+$/.test(value.trim())) return null;
|
|
2256
|
+
const parsed = 'number' == typeof value ? value : Number(value);
|
|
2257
|
+
return Number.isSafeInteger(parsed) ? parsed : null;
|
|
2258
|
+
}
|
|
2153
2259
|
const SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS = [
|
|
2154
2260
|
'greaterThan',
|
|
2155
2261
|
'greaterThanOrEqual',
|
|
@@ -2643,4 +2749,4 @@ function boundedInteger(value, minimum, maximum, fallback) {
|
|
|
2643
2749
|
function boundedNumber(value, minimum, maximum, fallback) {
|
|
2644
2750
|
return 'number' == typeof value && Number.isFinite(value) && value >= minimum && value <= maximum ? value : fallback;
|
|
2645
2751
|
}
|
|
2646
|
-
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, attachSpreadsheetShownCommentCells, createWorkOfficeSpreadsheetCollaborationBinding as createOfficeSpreadsheetCollaborationBinding, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, freezeImportedSpreadsheetCell, importedSheetProtectionAuthority, initializeWorkOfficeSpreadsheetCollaboration as initializeOfficeSpreadsheetCollaboration, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, isSpreadsheetUnderlineStyle, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetDateValidationBoundary, normalizeSpreadsheetPaperSize, protectedSheetCount, readWorkOfficeSpreadsheetCollaboration as readOfficeSpreadsheetCollaboration, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, replaceWorkOfficeSpreadsheetCollaboration as replaceOfficeSpreadsheetCollaboration, sameSpreadsheetHistoryValue, sheetHasProtectionState, sheetProtectionAuthority, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetDateValidationFormula, spreadsheetMatrixProfile, spreadsheetProtectionKey, spreadsheetUnderlineCellValue, spreadsheetUnderlineCellValueFromSheetJs, spreadsheetUnderlineCellValueFromXlsx, spreadsheetUnderlineStyle, unlockedCellCount, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withoutEditableRange };
|
|
2752
|
+
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, attachSpreadsheetShownCommentCells, createWorkOfficeSpreadsheetCollaborationBinding as createOfficeSpreadsheetCollaborationBinding, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, freezeImportedSpreadsheetCell, importedSheetProtectionAuthority, initializeWorkOfficeSpreadsheetCollaboration as initializeOfficeSpreadsheetCollaboration, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, isSpreadsheetTextOrientationId, isSpreadsheetUnderlineStyle, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetDateValidationBoundary, normalizeSpreadsheetPaperSize, protectedSheetCount, readWorkOfficeSpreadsheetCollaboration as readOfficeSpreadsheetCollaboration, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, replaceWorkOfficeSpreadsheetCollaboration as replaceOfficeSpreadsheetCollaboration, sameSpreadsheetHistoryValue, sheetHasProtectionState, sheetProtectionAuthority, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetDateValidationFormula, spreadsheetExplicitTextOrientationFromCell, spreadsheetMatrixProfile, spreadsheetProtectionKey, spreadsheetTextOrientationCellStyle, spreadsheetTextOrientationChoiceFromCell, spreadsheetTextOrientationFromAngle, spreadsheetTextOrientationFromCell, spreadsheetTextOrientationFromChoice, spreadsheetTextOrientationFromXlsx, spreadsheetTextOrientationXlsxValueFromCell, spreadsheetUnderlineCellValue, spreadsheetUnderlineCellValueFromSheetJs, spreadsheetUnderlineCellValueFromXlsx, spreadsheetUnderlineStyle, spreadsheetVisibleTextRotationFromCell, unlockedCellCount, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withoutEditableRange };
|
package/dist/core.js
CHANGED
|
@@ -7,6 +7,6 @@ export { createArtifact, createOfficeId, officeTemplates } from "./5184.js";
|
|
|
7
7
|
export { createOfficeDocumentCollaborationBinding, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration } from "./6282.js";
|
|
8
8
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
9
9
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
|
10
|
-
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./
|
|
10
|
+
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./6164.js";
|
|
11
11
|
export { normalizeWorkSpreadsheetBubbleScale, normalizeWorkSpreadsheetBubbleSizeRepresents, normalizeWorkSpreadsheetChartAxisGroup, normalizeWorkSpreadsheetCombinationSeriesType, normalizeWorkSpreadsheetDataLabelPosition, normalizeWorkSpreadsheetDataLabels, normalizeWorkSpreadsheetDoughnutHoleSize, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetRadarStyle, normalizeWorkSpreadsheetScatterStyle, normalizeWorkSpreadsheetTrendline, normalizeWorkSpreadsheetTrendlineType, workSpreadsheetChartSupportsAxes, workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsTrendlines, workSpreadsheetChartTypeLabel, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetCombinationSeriesTypeLabel, workSpreadsheetDataLabelPositionLabel, workSpreadsheetErrorBarTypeLabel, workSpreadsheetErrorBarValueTypeLabel, workSpreadsheetTrendlineTypeLabel } from "./8715.js";
|
|
12
12
|
export { core_OFFICE_COLLABORATION_VERSION as OFFICE_COLLABORATION_VERSION };
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,6 @@ export { createArtifact, createOfficeId, officeTemplates } from "./5184.js";
|
|
|
10
10
|
export { createOfficeDocumentCollaborationBinding, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration } from "./6282.js";
|
|
11
11
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
12
12
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
|
13
|
-
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./
|
|
13
|
+
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./6164.js";
|
|
14
14
|
export { normalizeWorkSpreadsheetBubbleScale, normalizeWorkSpreadsheetBubbleSizeRepresents, normalizeWorkSpreadsheetChartAxisGroup, normalizeWorkSpreadsheetCombinationSeriesType, normalizeWorkSpreadsheetDataLabelPosition, normalizeWorkSpreadsheetDataLabels, normalizeWorkSpreadsheetDoughnutHoleSize, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetRadarStyle, normalizeWorkSpreadsheetScatterStyle, normalizeWorkSpreadsheetTrendline, normalizeWorkSpreadsheetTrendlineType, workSpreadsheetChartSupportsAxes, workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsTrendlines, workSpreadsheetChartTypeLabel, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetCombinationSeriesTypeLabel, workSpreadsheetDataLabelPositionLabel, workSpreadsheetErrorBarTypeLabel, workSpreadsheetErrorBarValueTypeLabel, workSpreadsheetTrendlineTypeLabel } from "./8715.js";
|
|
15
15
|
export { src_DOCUMENT_SNAPSHOT_VERSION as DOCUMENT_SNAPSHOT_VERSION, src_DOCUMENT_SOURCE_VERSION as DOCUMENT_SOURCE_VERSION, src_OFFICE_COLLABORATION_VERSION as OFFICE_COLLABORATION_VERSION };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare function SpreadsheetAlignmentRibbonGroup({ can, commands, toolbarCell, }: {
|
|
4
|
+
can: SpreadsheetEditorCanCommands;
|
|
5
|
+
commands: SpreadsheetEditorCommands;
|
|
6
|
+
toolbarCell: Cell | null | undefined;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Cell } from '@fortune-sheet/core';
|
|
2
2
|
import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
|
|
3
3
|
import { type SpreadsheetUnderlineStyle } from '../work-spreadsheet-underline';
|
|
4
|
+
import { type SpreadsheetTextOrientationId } from '../work-spreadsheet-text-orientation';
|
|
4
5
|
import { type SpreadsheetCellBorderFormat } from './spreadsheet-cell-border';
|
|
5
6
|
import { type SpreadsheetCellRange } from './spreadsheet-cell-range';
|
|
6
7
|
export declare const MAX_SPREADSHEET_CELL_FORMAT_CELLS = 10000;
|
|
@@ -12,6 +13,7 @@ export interface SpreadsheetCellFormatPatch {
|
|
|
12
13
|
verticalAlignment?: SpreadsheetVerticalAlignment;
|
|
13
14
|
wrapText?: boolean;
|
|
14
15
|
rotation?: number;
|
|
16
|
+
textOrientation?: SpreadsheetTextOrientationId;
|
|
15
17
|
fontFamily?: string;
|
|
16
18
|
fontSize?: number;
|
|
17
19
|
fontColor?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
2
|
+
import type { SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
|
|
3
|
+
export declare function SpreadsheetClipboardRibbonGroup({ can, commands, formatPainterMode, }: {
|
|
4
|
+
can: SpreadsheetEditorCanCommands;
|
|
5
|
+
commands: SpreadsheetEditorCommands;
|
|
6
|
+
formatPainterMode: SpreadsheetFormatPainterMode | null;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -487,6 +487,60 @@ export declare const spreadsheetCommandCatalog: {
|
|
|
487
487
|
readonly group: "font";
|
|
488
488
|
};
|
|
489
489
|
};
|
|
490
|
+
readonly textOrientationHorizontal: {
|
|
491
|
+
readonly id: "alignment.textOrientation.horizontal";
|
|
492
|
+
readonly label: "横排文字";
|
|
493
|
+
readonly location: {
|
|
494
|
+
readonly area: "ribbon";
|
|
495
|
+
readonly tab: "home";
|
|
496
|
+
readonly group: "alignment";
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
readonly textOrientationAngleCounterclockwise: {
|
|
500
|
+
readonly id: "alignment.textOrientation.angleCounterclockwise";
|
|
501
|
+
readonly label: "逆时针倾斜";
|
|
502
|
+
readonly location: {
|
|
503
|
+
readonly area: "ribbon";
|
|
504
|
+
readonly tab: "home";
|
|
505
|
+
readonly group: "alignment";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
readonly textOrientationAngleClockwise: {
|
|
509
|
+
readonly id: "alignment.textOrientation.angleClockwise";
|
|
510
|
+
readonly label: "顺时针倾斜";
|
|
511
|
+
readonly location: {
|
|
512
|
+
readonly area: "ribbon";
|
|
513
|
+
readonly tab: "home";
|
|
514
|
+
readonly group: "alignment";
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
readonly textOrientationVertical: {
|
|
518
|
+
readonly id: "alignment.textOrientation.vertical";
|
|
519
|
+
readonly label: "竖排文字";
|
|
520
|
+
readonly location: {
|
|
521
|
+
readonly area: "ribbon";
|
|
522
|
+
readonly tab: "home";
|
|
523
|
+
readonly group: "alignment";
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
readonly textOrientationRotateUp: {
|
|
527
|
+
readonly id: "alignment.textOrientation.rotateUp";
|
|
528
|
+
readonly label: "向上旋转文字";
|
|
529
|
+
readonly location: {
|
|
530
|
+
readonly area: "ribbon";
|
|
531
|
+
readonly tab: "home";
|
|
532
|
+
readonly group: "alignment";
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
readonly textOrientationRotateDown: {
|
|
536
|
+
readonly id: "alignment.textOrientation.rotateDown";
|
|
537
|
+
readonly label: "向下旋转文字";
|
|
538
|
+
readonly location: {
|
|
539
|
+
readonly area: "ribbon";
|
|
540
|
+
readonly tab: "home";
|
|
541
|
+
readonly group: "alignment";
|
|
542
|
+
};
|
|
543
|
+
};
|
|
490
544
|
readonly mergeAndCenter: {
|
|
491
545
|
readonly id: "alignment.mergeAndCenter";
|
|
492
546
|
readonly label: "合并居中";
|
|
@@ -609,6 +663,62 @@ export declare const spreadsheetCommandCatalog: {
|
|
|
609
663
|
readonly group: "cells";
|
|
610
664
|
};
|
|
611
665
|
};
|
|
666
|
+
readonly hideRows: {
|
|
667
|
+
readonly id: "cells.hideRows";
|
|
668
|
+
readonly label: "隐藏所选行";
|
|
669
|
+
readonly location: {
|
|
670
|
+
readonly area: "ribbon";
|
|
671
|
+
readonly tab: "home";
|
|
672
|
+
readonly group: "cells";
|
|
673
|
+
};
|
|
674
|
+
readonly shortcut: {
|
|
675
|
+
readonly label: "Cmd/Ctrl+9";
|
|
676
|
+
readonly aria: "Control+9 Meta+9";
|
|
677
|
+
readonly editor: readonly ["Mod-9"];
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
readonly hideColumns: {
|
|
681
|
+
readonly id: "cells.hideColumns";
|
|
682
|
+
readonly label: "隐藏所选列";
|
|
683
|
+
readonly location: {
|
|
684
|
+
readonly area: "ribbon";
|
|
685
|
+
readonly tab: "home";
|
|
686
|
+
readonly group: "cells";
|
|
687
|
+
};
|
|
688
|
+
readonly shortcut: {
|
|
689
|
+
readonly label: "Cmd/Ctrl+0";
|
|
690
|
+
readonly aria: "Control+0 Meta+0";
|
|
691
|
+
readonly editor: readonly ["Mod-0"];
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
readonly unhideRows: {
|
|
695
|
+
readonly id: "cells.unhideRows";
|
|
696
|
+
readonly label: "取消隐藏所选行";
|
|
697
|
+
readonly location: {
|
|
698
|
+
readonly area: "ribbon";
|
|
699
|
+
readonly tab: "home";
|
|
700
|
+
readonly group: "cells";
|
|
701
|
+
};
|
|
702
|
+
readonly shortcut: {
|
|
703
|
+
readonly label: "Cmd/Ctrl+Shift+9";
|
|
704
|
+
readonly aria: "Control+Shift+9 Meta+Shift+9";
|
|
705
|
+
readonly editor: readonly ["Mod-Shift-9"];
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
readonly unhideColumns: {
|
|
709
|
+
readonly id: "cells.unhideColumns";
|
|
710
|
+
readonly label: "取消隐藏所选列";
|
|
711
|
+
readonly location: {
|
|
712
|
+
readonly area: "ribbon";
|
|
713
|
+
readonly tab: "home";
|
|
714
|
+
readonly group: "cells";
|
|
715
|
+
};
|
|
716
|
+
readonly shortcut: {
|
|
717
|
+
readonly label: "Cmd/Ctrl+Shift+0";
|
|
718
|
+
readonly aria: "Control+Shift+0 Meta+Shift+0";
|
|
719
|
+
readonly editor: readonly ["Mod-Shift-0"];
|
|
720
|
+
};
|
|
721
|
+
};
|
|
612
722
|
readonly autoSum: {
|
|
613
723
|
readonly id: "editing.autoSum";
|
|
614
724
|
readonly label: "自动求和";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Cell, Selection, Sheet } from '@fortune-sheet/core';
|
|
2
|
-
import {
|
|
2
|
+
import type { SpreadsheetGridSize } from '../spreadsheet-sparse';
|
|
3
3
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
4
|
+
import type { SpreadsheetTextOrientationId } from '../work-spreadsheet-text-orientation';
|
|
4
5
|
import { type OfficeEditorCanCommands, type OfficeEditorExtension } from './office-editor-extension';
|
|
5
6
|
import type { SpreadsheetAutoSumFunction } from './spreadsheet-auto-sum';
|
|
6
7
|
import { type SpreadsheetCellClearMode } from './spreadsheet-cell-clear';
|
|
@@ -15,7 +16,7 @@ import { type SpreadsheetCellMergeCommand } from './spreadsheet-cell-merge';
|
|
|
15
16
|
import type { SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
|
|
16
17
|
import type { SpreadsheetHyperlinkCell, SpreadsheetHyperlinkRequest } from './spreadsheet-hyperlink';
|
|
17
18
|
import { type SpreadsheetFreezePanePreset } from './spreadsheet-freeze-panes';
|
|
18
|
-
import {
|
|
19
|
+
import type { SpreadsheetKeyboardSelection, SpreadsheetSelectionMove, SpreadsheetSelectionScope } from './spreadsheet-keyboard-navigation';
|
|
19
20
|
import type { SpreadsheetPasteContent } from './spreadsheet-paste-special';
|
|
20
21
|
import { type SpreadsheetDecimalPlacesDirection } from './spreadsheet-number-format-command';
|
|
21
22
|
import { type SpreadsheetSheetMoveDirection } from './spreadsheet-sheet-model';
|
|
@@ -188,6 +189,7 @@ export interface SpreadsheetEditorCommands {
|
|
|
188
189
|
renameSheet: (sheetId: string, name: string) => boolean;
|
|
189
190
|
redo: () => boolean;
|
|
190
191
|
setCellFormat: (attribute: keyof Cell, value: unknown) => boolean;
|
|
192
|
+
setTextOrientation: (orientation: SpreadsheetTextOrientationId) => boolean;
|
|
191
193
|
setSelectedCellBorders: (format: SpreadsheetCellBorderFormat) => boolean;
|
|
192
194
|
setFreezePanes: (preset: SpreadsheetFreezePanePreset) => boolean;
|
|
193
195
|
setGridLines: (visible: boolean) => boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SpreadsheetCommandContext, SpreadsheetCommandRange } from './spreadsheet-command-controller';
|
|
2
|
+
export declare function canEditSpreadsheetSelection(context: SpreadsheetCommandContext): boolean;
|
|
3
|
+
export declare function spreadsheetLiveCommandRange(context: SpreadsheetCommandContext): SpreadsheetCommandRange;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
2
|
+
export declare function SpreadsheetEditingRibbonGroup({ can, commands, findOpen, }: {
|
|
3
|
+
can: SpreadsheetEditorCanCommands;
|
|
4
|
+
commands: SpreadsheetEditorCommands;
|
|
5
|
+
findOpen: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
+
import type { SpreadsheetCellFillDirection } from './spreadsheet-cell-fill';
|
|
3
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
4
|
+
import { type SpreadsheetNumberFormatChoice } from './spreadsheet-number-format';
|
|
5
|
+
import { type SpreadsheetSheetMoveDirection } from './spreadsheet-sheet-model';
|
|
6
|
+
export declare function runSpreadsheetHistoryShortcut(event: KeyboardEvent, canExecute: () => boolean, execute: () => boolean): boolean;
|
|
7
|
+
export declare function runSpreadsheetCellFormatShortcut(event: KeyboardEvent, context: SpreadsheetCommandContext, canExecute: SpreadsheetEditorCanCommands['setCellFormat'], execute: SpreadsheetEditorCommands['setCellFormat'], attribute: Extract<keyof Cell, 'bl' | 'cl' | 'it' | 'un'>): boolean;
|
|
8
|
+
export declare function runSpreadsheetNumberFormatShortcut(event: KeyboardEvent, context: SpreadsheetCommandContext, canExecute: SpreadsheetEditorCanCommands['setCellFormat'], execute: SpreadsheetEditorCommands['setCellFormat'], preset: SpreadsheetNumberFormatChoice): boolean;
|
|
9
|
+
export declare function runSpreadsheetMergeShortcut(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['mergeSelectedCells'], execute: SpreadsheetEditorCommands['mergeSelectedCells']): boolean;
|
|
10
|
+
export declare function runSpreadsheetClearShortcut(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['clearSelectedCells'], execute: SpreadsheetEditorCommands['clearSelectedCells']): boolean;
|
|
11
|
+
export declare function runSpreadsheetFillShortcut(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['fillSelectedCells'], execute: SpreadsheetEditorCommands['fillSelectedCells'], direction: SpreadsheetCellFillDirection): boolean;
|
|
12
|
+
export declare function runSpreadsheetAutoFilterShortcut(event: KeyboardEvent, canExecute: () => boolean, execute: () => boolean): boolean;
|
|
13
|
+
export declare function runSpreadsheetFormatPainterEscape(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['cancelFormatPainter'], execute: SpreadsheetEditorCommands['cancelFormatPainter']): boolean;
|
|
14
|
+
export declare function runSpreadsheetSheetNavigationShortcut(event: KeyboardEvent, context: SpreadsheetCommandContext, activateSheet: SpreadsheetEditorCommands['activateSheet'], direction: SpreadsheetSheetMoveDirection): boolean;
|
|
15
|
+
export declare function runSpreadsheetAddSheetShortcut(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['addSheet'], execute: SpreadsheetEditorCommands['addSheet']): boolean;
|
|
16
|
+
export declare function runSpreadsheetRecalculationShortcut(event: KeyboardEvent, canExecute: SpreadsheetEditorCanCommands['recalculateFormula'], execute: SpreadsheetEditorCommands['recalculateFormula']): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
2
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare function createSpreadsheetKeyboardShortcutExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
2
|
+
export declare function SpreadsheetRowsAndColumnsMenu({ can, commands, }: {
|
|
3
|
+
can: SpreadsheetEditorCanCommands;
|
|
4
|
+
commands: SpreadsheetEditorCommands;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
2
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare function createSpreadsheetSelectionNavigationExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
2
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare const MAX_SPREADSHEET_VISIBILITY_ROWS = 10000;
|
|
4
|
+
export declare const MAX_SPREADSHEET_VISIBILITY_COLUMNS = 1000;
|
|
5
|
+
export declare function createSpreadsheetStructureExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
+
import { type SpreadsheetTextOrientationId } from '../work-spreadsheet-text-orientation';
|
|
3
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
4
|
+
import type { SpreadsheetCommandContext, SpreadsheetCommandRange, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
5
|
+
export declare const MAX_SPREADSHEET_TEXT_ORIENTATION_CELLS = 10000;
|
|
6
|
+
export interface SpreadsheetTextOrientationApiCall {
|
|
7
|
+
name: 'setCellFormatByRange';
|
|
8
|
+
args: [
|
|
9
|
+
'rt' | 'tr',
|
|
10
|
+
Cell['rt'] | Cell['tr'] | undefined,
|
|
11
|
+
SpreadsheetCommandRange,
|
|
12
|
+
{
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
export declare function createSpreadsheetTextOrientationExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
|
18
|
+
export declare function spreadsheetTextOrientationApiCalls(range: SpreadsheetCommandRange, sheetId: string, choice: SpreadsheetTextOrientationId): SpreadsheetTextOrientationApiCall[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Selection } from '@fortune-sheet/core';
|
|
2
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare function SpreadsheetFreezePanesMenu({ active, can, commands, selection, }: {
|
|
4
|
+
active: boolean;
|
|
5
|
+
can: SpreadsheetEditorCanCommands;
|
|
6
|
+
commands: SpreadsheetEditorCommands;
|
|
7
|
+
selection: Selection;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
2
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
3
|
+
export declare function createSpreadsheetVisibilityShortcutExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
+
export declare const spreadsheetTextOrientationIds: readonly ["horizontal", "angleCounterclockwise", "angleClockwise", "vertical", "rotateUp", "rotateDown"];
|
|
3
|
+
export type SpreadsheetTextOrientationId = (typeof spreadsheetTextOrientationIds)[number];
|
|
4
|
+
export type SpreadsheetTextOrientation = {
|
|
5
|
+
kind: 'rotation';
|
|
6
|
+
angle: number;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'stacked';
|
|
9
|
+
};
|
|
10
|
+
export type SpreadsheetTextOrientationCellStyle = Pick<Cell, 'rt' | 'tr'>;
|
|
11
|
+
export declare function isSpreadsheetTextOrientationId(value: unknown): value is SpreadsheetTextOrientationId;
|
|
12
|
+
export declare function spreadsheetTextOrientationFromChoice(choice: SpreadsheetTextOrientationId): SpreadsheetTextOrientation;
|
|
13
|
+
export declare function spreadsheetTextOrientationFromAngle(value: unknown): SpreadsheetTextOrientation | null;
|
|
14
|
+
export declare function spreadsheetTextOrientationFromXlsx(value: unknown): SpreadsheetTextOrientation | null;
|
|
15
|
+
export declare function spreadsheetExplicitTextOrientationFromCell(cell: Pick<Cell, 'rt' | 'tr'> | null | undefined): SpreadsheetTextOrientation | null;
|
|
16
|
+
export declare function spreadsheetTextOrientationFromCell(cell: Pick<Cell, 'rt' | 'tr'> | null | undefined): SpreadsheetTextOrientation;
|
|
17
|
+
export declare function spreadsheetTextOrientationCellStyle(orientation: SpreadsheetTextOrientation | null | undefined): SpreadsheetTextOrientationCellStyle | null;
|
|
18
|
+
export declare function spreadsheetTextOrientationXlsxValue(orientation: SpreadsheetTextOrientation | null | undefined): number | null;
|
|
19
|
+
export declare function spreadsheetTextOrientationXlsxValueFromCell(cell: Pick<Cell, 'rt' | 'tr'> | null | undefined): number | null;
|
|
20
|
+
export declare function spreadsheetVisibleTextRotationFromCell(cell: Pick<Cell, 'rt' | 'tr'> | null | undefined): number;
|
|
21
|
+
export declare function spreadsheetTextOrientationChoiceFromCell(cell: Pick<Cell, 'rt' | 'tr'> | null | undefined): SpreadsheetTextOrientationId | null;
|
package/dist/office-kernel.wasm
CHANGED
|
Binary file
|
package/dist/styles.css
CHANGED
|
@@ -14985,6 +14985,37 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
|
|
|
14985
14985
|
grid-template-columns: 20px minmax(0, 1fr);
|
|
14986
14986
|
}
|
|
14987
14987
|
|
|
14988
|
+
.work-spreadsheet-orientation-menu > button, .work-spreadsheet-rows-columns-menu > button {
|
|
14989
|
+
grid-template-columns: 20px minmax(0, 1fr) auto;
|
|
14990
|
+
}
|
|
14991
|
+
|
|
14992
|
+
.work-spreadsheet-orientation-menu > button:after {
|
|
14993
|
+
border: 1px solid var(--a3s-faint);
|
|
14994
|
+
content: "";
|
|
14995
|
+
border-radius: 50%;
|
|
14996
|
+
width: 9px;
|
|
14997
|
+
height: 9px;
|
|
14998
|
+
}
|
|
14999
|
+
|
|
15000
|
+
.work-spreadsheet-orientation-menu > button[aria-checked="true"]:after {
|
|
15001
|
+
border-color: var(--work-office-menu-accent);
|
|
15002
|
+
background: var(--work-office-menu-accent);
|
|
15003
|
+
box-shadow: inset 0 0 0 2px var(--a3s-overlay-surface);
|
|
15004
|
+
}
|
|
15005
|
+
|
|
15006
|
+
.work-spreadsheet-orientation-glyph {
|
|
15007
|
+
stroke: currentColor;
|
|
15008
|
+
stroke-width: 1.45px;
|
|
15009
|
+
stroke-linecap: round;
|
|
15010
|
+
stroke-linejoin: round;
|
|
15011
|
+
flex: none;
|
|
15012
|
+
overflow: visible;
|
|
15013
|
+
}
|
|
15014
|
+
|
|
15015
|
+
.work-spreadsheet-orientation-trigger.active .work-spreadsheet-orientation-glyph {
|
|
15016
|
+
color: var(--work-spreadsheet-accent);
|
|
15017
|
+
}
|
|
15018
|
+
|
|
14988
15019
|
.work-spreadsheet-find-select-menu > button, .work-spreadsheet-paste-menu > button {
|
|
14989
15020
|
grid-template-columns: 20px minmax(0, 1fr) auto;
|
|
14990
15021
|
}
|
|
@@ -15021,6 +15052,23 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
|
|
|
15021
15052
|
color: currentColor;
|
|
15022
15053
|
}
|
|
15023
15054
|
|
|
15055
|
+
@media (width <= 640px) {
|
|
15056
|
+
.work-spreadsheet-orientation-menu, .work-spreadsheet-rows-columns-menu {
|
|
15057
|
+
border-radius: 12px;
|
|
15058
|
+
width: calc(100vw - 16px);
|
|
15059
|
+
max-width: none;
|
|
15060
|
+
max-height: min(68dvh, 520px);
|
|
15061
|
+
padding: 8px;
|
|
15062
|
+
}
|
|
15063
|
+
|
|
15064
|
+
.work-spreadsheet-orientation-menu > button, .work-spreadsheet-rows-columns-menu > button {
|
|
15065
|
+
gap: 10px;
|
|
15066
|
+
min-height: 44px;
|
|
15067
|
+
padding: 9px 10px;
|
|
15068
|
+
font-size: 12px;
|
|
15069
|
+
}
|
|
15070
|
+
}
|
|
15071
|
+
|
|
15024
15072
|
.work-spreadsheet-cell-style-panel {
|
|
15025
15073
|
gap: 10px;
|
|
15026
15074
|
width: min(440px, 100vw - 32px);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a3s-lab/office",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"office",
|
|
@@ -134,6 +134,8 @@
|
|
|
134
134
|
"test:e2e:writer-ribbon:check": "a3s-test check tests/e2e/word-ribbon-collapse.acl --json",
|
|
135
135
|
"test:e2e:spreadsheet-ribbon": "a3s-test run tests/e2e/spreadsheet-ribbon-alignment.acl --json",
|
|
136
136
|
"test:e2e:spreadsheet-ribbon:check": "a3s-test check tests/e2e/spreadsheet-ribbon-alignment.acl --json",
|
|
137
|
+
"test:e2e:spreadsheet-orientation-visibility": "a3s-test run tests/e2e/spreadsheet-ribbon-orientation-visibility.acl --json",
|
|
138
|
+
"test:e2e:spreadsheet-orientation-visibility:check": "a3s-test check tests/e2e/spreadsheet-ribbon-orientation-visibility.acl --json",
|
|
137
139
|
"test:e2e:spreadsheet-cell-style": "a3s-test run tests/e2e/spreadsheet-cell-style.acl --json",
|
|
138
140
|
"test:e2e:spreadsheet-cell-style:check": "a3s-test check tests/e2e/spreadsheet-cell-style.acl --json",
|
|
139
141
|
"test:e2e:spreadsheet-font-size-border-shortcuts": "a3s-test run tests/e2e/spreadsheet-font-size-border-shortcuts.acl --json",
|