@a3s-lab/office 0.37.0 → 0.37.1
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 +6 -1
- package/dist/0~3557.js +2 -1
- package/dist/0~3635.js +4 -1
- package/dist/0~9073.js +7 -2
- package/dist/0~presentation-editor.js +45 -9
- package/dist/0~spreadsheet-editor.js +13345 -10343
- package/dist/{3266.js → 5416.js} +1139 -15
- package/dist/9333.js +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +112 -26
- package/dist/index.js +1 -1
- package/dist/internal/features/work/editors/office-shortcuts.d.ts +1 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter-condition-dialog-model.d.ts +27 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter-condition-dialog.d.ts +17 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter-menu.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +16 -4
- package/dist/internal/features/work/editors/spreadsheet-cell-range.d.ts +1 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +13 -1
- package/dist/internal/features/work/editors/spreadsheet-current-region.d.ts +12 -0
- package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-appearance.d.ts +45 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-collation.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-custom-list-editor.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-custom-list-store.d.ts +13 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-custom-list.d.ts +26 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-dialog.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-matrix.d.ts +4 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-options-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-order-controls.d.ts +16 -0
- package/dist/internal/features/work/editors/spreadsheet-sort-range-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-sort.d.ts +138 -0
- package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +12 -3
- package/dist/internal/features/work/editors/use-spreadsheet-sort.d.ts +26 -0
- package/dist/internal/features/work/editors/work-office-chrome.d.ts +3 -0
- package/dist/internal/features/work/work-spreadsheet-auto-filter.d.ts +14 -0
- package/dist/internal/features/work/work-spreadsheet-dynamic-filter.d.ts +7 -0
- package/dist/internal/features/work/work-spreadsheet-filter-contract.d.ts +3 -0
- package/dist/internal/features/work/work-spreadsheet-wildcard.d.ts +7 -0
- package/dist/internal/features/work/work-types.d.ts +31 -7
- package/dist/internal/features/work/work-xlsx-interop.d.ts +2 -1
- package/dist/internal/features/work/work-xlsx-table-filters.d.ts +3 -1
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +544 -20
- package/dist/vue.d.ts +3 -1
- package/dist/vue.js +2 -0
- package/dist/web-component.d.ts +3 -1
- package/dist/web-component.js +9 -0
- package/dist/work-spreadsheet-package-scan.worker.js +2 -1
- package/docs/latest/en/browser-editor-architecture.md +128 -0
- package/package.json +21 -1
package/dist/9333.js
CHANGED
|
@@ -1846,4 +1846,4 @@ function work_spreadsheet_page_setup_boundedInteger(value, minimum, maximum, fal
|
|
|
1846
1846
|
function work_spreadsheet_page_setup_boundedNumber(value, minimum, maximum, fallback) {
|
|
1847
1847
|
return 'number' == typeof value && Number.isFinite(value) && value >= minimum && value <= maximum ? value : fallback;
|
|
1848
1848
|
}
|
|
1849
|
-
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, XLSX_GRADIENT_FILL_CELL_KEY, XLSX_PATTERN_FILL_CELL_KEY, activeXlsxGradientFill, activeXlsxPatternFill, applyXlsxSemanticColorOrigin, attachSpreadsheetShownCommentCells, createXlsxColorResolver, decodeXlsxCellAddress, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, defaultXlsxBorder, defaultXlsxFill, deleteXlsxGradientFill, deleteXlsxPatternFill, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, ensureXlsxStyleCollection, freezeImportedSpreadsheetCell, importedSheetProtectionAuthority, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetPaperSize, normalizeXlsxGradientFill, normalizeXlsxPatternFill, normalizeXlsxSemanticColorOrigin, prepareXlsxSemanticPalette, protectedSheetCount, readXlsxGradientFill, readXlsxPatternFill, readXlsxSemanticColorOrigin, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, resolveXlsxColor, sameSpreadsheetHistoryValue, setXlsxBorderLine, setXlsxColorChild, setXlsxToggleChild, setXlsxUnderlineChild, setXlsxValueChild, sheetHasProtectionState, sheetProtectionAuthority, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetMatrixProfile, spreadsheetProtectionKey, unlockedCellCount, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withXlsxCellStyleOrigin, withXlsxGradientFill, withXlsxPatternFill, withoutEditableRange, writeXlsxAlignment, xlsxCellAddress, xlsxCellStyleOrigin, xlsxCellStyleOriginSemanticColors, xlsxColorElementMatchesOrigin, xlsxGradientFillFallbackColor, xlsxGradientFillKey, xlsxGradientFillSemanticColors, xlsxPatternFillKey, xlsxPatternFillSemanticColors, xlsxPatternFillTypes, xlsxRgbColor, xlsxSemanticColorMatchesValue, xlsxSemanticColorOriginKey, xlsxSemanticColorOriginSupported, xlsxWorksheetCellEntries };
|
|
1849
|
+
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, XLSX_GRADIENT_FILL_CELL_KEY, XLSX_PATTERN_FILL_CELL_KEY, activeXlsxGradientFill, activeXlsxPatternFill, applyXlsxSemanticColorOrigin, attachSpreadsheetShownCommentCells, createXlsxColorResolver, decodeXlsxCellAddress, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, defaultXlsxBorder, defaultXlsxFill, deleteXlsxGradientFill, deleteXlsxPatternFill, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, ensureXlsxStyleCollection, freezeImportedSpreadsheetCell, importedSheetProtectionAuthority, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetPaperSize, normalizeXlsxGradientFill, normalizeXlsxPatternFill, normalizeXlsxSemanticColorOrigin, prepareXlsxSemanticPalette, protectedSheetCount, readXlsxGradientFill, readXlsxPatternFill, readXlsxSemanticColorOrigin, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, resolveXlsxColor, sameSpreadsheetHistoryValue, setXlsxBorderLine, setXlsxColorChild, setXlsxToggleChild, setXlsxUnderlineChild, setXlsxValueChild, sheetHasProtectionState, sheetProtectionAuthority, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconAppearance, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetMatrixProfile, spreadsheetProtectionKey, unlockedCellCount, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withXlsxCellStyleOrigin, withXlsxGradientFill, withXlsxPatternFill, withoutEditableRange, writeXlsxAlignment, xlsxCellAddress, xlsxCellStyleOrigin, xlsxCellStyleOriginSemanticColors, xlsxColorElementMatchesOrigin, xlsxGradientFillFallbackColor, xlsxGradientFillKey, xlsxGradientFillSemanticColors, xlsxPatternFillKey, xlsxPatternFillSemanticColors, xlsxPatternFillTypes, xlsxRgbColor, xlsxSemanticColorMatchesValue, xlsxSemanticColorOriginKey, xlsxSemanticColorOriginSupported, xlsxWorksheetCellEntries };
|
package/dist/core.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export type { WorkGetMarkdownSelectionMenuItems as GetMarkdownSelectionMenuItems
|
|
|
29
29
|
export { exportWorkArtifactPdf as downloadArtifactPdf, type WorkPdfExportOptions as PdfExportOptions, workPdfPagesForExport as pdfPagesForExport, } from './internal/features/work/work-pdf-export';
|
|
30
30
|
export type { PdfPageOrganizationExport } from './internal/features/work/editors/use-pdf-page-organization';
|
|
31
31
|
export { defaultPptxRuntimeUrl } from './internal/features/work/work-presentation-file-io';
|
|
32
|
+
export { DEFAULT_SPREADSHEET_SORT_CUSTOM_LIST_STORAGE_KEY, LocalStorageSpreadsheetSortCustomListStore, type SpreadsheetSortCustomListStore, } from './internal/features/work/editors/spreadsheet-sort-custom-list-store';
|
|
32
33
|
export { forgetWorkSourceBlob as forgetSourceBlob, readWorkSourceBlob as readSourceBlob, rememberWorkSourceBlob as registerSourceBlob, } from './internal/features/work/work-repository';
|
|
33
34
|
export { createWorkArtifact as createArtifact, createWorkId as createOfficeId, WORK_TEMPLATES as officeTemplates, } from './internal/features/work/work-templates';
|
|
34
35
|
export type { WorkArtifact as OfficeArtifact, WorkArtifactContent as OfficeArtifactContent, WorkArtifactKind as OfficeArtifactKind, WorkCompatibilityIssue as CompatibilityIssue, WorkCompatibilityReport as CompatibilityReport, WorkDocumentContent as DocumentContent, WorkMarkdownContent as MarkdownContent, WorkPdfContent as PdfContent, WorkPresentationContent as PresentationContent, WorkSourceFile as SourceFile, WorkSpreadsheetContent as SpreadsheetContent, WorkTemplate as OfficeTemplate, } from './internal/features/work/work-types';
|
package/dist/core.js
CHANGED
|
@@ -5,7 +5,7 @@ import { OFFICE_COLLABORATION_PROTOCOL as WORK_OFFICE_COLLABORATION_PROTOCOL, Of
|
|
|
5
5
|
import { directChildren, OoxmlPackage as work_ooxml_package_OoxmlPackage, parseXml, firstDescendant, directChild, descendants, createArtifact as createWorkArtifact, xmlContainsAnyElement, createOfficeId as createWorkId, attribute as work_ooxml_package_attribute } from "./4121.js";
|
|
6
6
|
import { fileNameWithoutExtension, work_file_download_downloadBlob, mountWorkLiveDocumentCapture, importWorkDocumentFile, moveWorkSourceBlob, materializeWorkDocumentContent as work_document_model_codec_materializeWorkDocumentContent, createWorkDocumentModel, work_file_download_safeFileName, documentPageSurfaceGeometryForElement, registerSourceBlob as rememberWorkSourceBlob, documentModelForContent, readSourceBlob as readWorkSourceBlob, createWorkDocumentExtensions, positionWorkLiveDocumentCapture, createWorkDocumentBlob } from "./4174.js";
|
|
7
7
|
import { normalizeSpreadsheetPrintTitleRows, sparseMatrixColumnCount, normalizeSpreadsheetPrintArea, parseSpreadsheetPrintTitles, isValidSpreadsheetDefinedName, formatSpreadsheetCellRanges, stripSpreadsheetSheetQualifier, editableSpreadsheetFormula, sparseArrayEntries, qualifySpreadsheetRange, refreshSpreadsheetPivotTables, parseSpreadsheetCellRanges, normalizeSpreadsheetPrintTitleColumns } from "./8715.js";
|
|
8
|
-
import { xlsxColorMatches, xlsxRichTextCellText, spreadsheetCellValueWithDiagonalBorder, xlsxRichTextStyleOrigins, normalizeSpreadsheetDataValidationErrorStyle, directXlsxAlignment, spreadsheetTableTotalsFunctionToOoxml, spreadsheetTextOrientationFromXlsx, directXlsxFontStyle, hasXlsxDirectFontStyle, applyImportedXlsxRichText, xlsxStyleCollectionIndex, sheetHasXlsxRichTextCells, spreadsheetExplicitTextOrientationFromCell, activeXlsxNativeFill,
|
|
8
|
+
import { xlsxColorMatches, xlsxRichTextCellText, spreadsheetCellValueWithDiagonalBorder, xlsxRichTextStyleOrigins, normalizeSpreadsheetDataValidationErrorStyle, workSpreadsheetAutoFilterCriteriaEntries, directXlsxAlignment, spreadsheetTableTotalsFunctionToOoxml, spreadsheetTextOrientationFromXlsx, directXlsxFontStyle, hasXlsxDirectFontStyle, applyImportedXlsxRichText, xlsxStyleCollectionIndex, sheetHasXlsxRichTextCells, spreadsheetExplicitTextOrientationFromCell, activeXlsxNativeFill, workSpreadsheetHasUnescapedWildcard, readXlsxRichTextCells, createXlsxRichTextReadContext, normalizeSpreadsheetDateValidationBoundary, boundedSpreadsheetDataValidationText, xlsxNativeFillKey, xlsxBooleanAttribute, xlsxAlignmentMatches, xlsxBorderLineMatches, spreadsheetTextOrientationCellStyle, spreadsheetTableTotalsFunctionFromOoxml, spreadsheetDateValidationFormula, spreadsheetDiagonalBorderFromCellValue, workSpreadsheetSheetWithImportedAutoFilterCriteria, xlsxUnderlineStyle, spreadsheetUnderlineCellValueFromXlsx, xlsxToggleEnabled, normalizeSpreadsheetTableTotalsLabel, activeXlsxSemanticColorOrigin, writeXlsxRichTextCells, xlsxNativeFillSemanticColors, normalizeSpreadsheetTableCalculatedFormula, normalizeSpreadsheetTableTotalsFormula, spreadsheetUnderlineCellValueFromSheetJs } from "./5416.js";
|
|
9
9
|
import { freezeImportedSpreadsheetCell, readXlsxGradientFill, withXlsxPatternFill, xlsxCellStyleOriginSemanticColors, setXlsxToggleChild, withXlsxCellStyleOrigin, normalizeSpreadsheetConditionalVisualOptions, xlsxColorElementMatchesOrigin, withXlsxGradientFill, ensureXlsxStyleCollection, xlsxCellStyleOrigin, xlsxSemanticColorOriginKey, readXlsxPatternFill, isSpreadsheetConditionalComparisonOperator, registerImportedSpreadsheetMatrix, defaultSpreadsheetConditionalIconThresholds, readXlsxSemanticColorOrigin, setXlsxUnderlineChild, xlsxGradientFillFallbackColor, setXlsxColorChild, createXlsxColorResolver, resolveXlsxColor, setXlsxBorderLine, normalizeSpreadsheetConditionalIconSetFormat, defaultSpreadsheetDataBarOptions, defaultXlsxBorder, prepareXlsxSemanticPalette, importedSheetProtectionAuthority, defaultSpreadsheetColorScaleThresholds, xlsxRgbColor, writeXlsxAlignment, xlsxGradientFillKey, applyXlsxSemanticColorOrigin, spreadsheetConditionalComparisonNeedsUpperValue, sheetHasProtectionState, xlsxWorksheetCellEntries, isSpreadsheetConditionalIconSetName, setXlsxValueChild, defaultXlsxFill, spreadsheetConditionalThresholdsEqual, spreadsheetConditionalIconSetCount } from "./9333.js";
|
|
10
10
|
import { updateSpreadsheetWorksheetCompatibilitySummary, inspectXlsxPivotTables, readXlsxWorksheetCharts, createXlsxFormulaCell, patchXlsxWorksheetDrawings, readXlsxWorksheetImages, writeXlsxProtection, xlsxWorksheetChartsToSheet, readXlsxFormulaFeaturesFromPackage, emptySpreadsheetWorksheetCompatibilitySummary, createSpreadsheetFormulaMetadata, createXlsxErrorCell, xlsxWorksheetImagesToSheet, readXlsxProtection, patchXlsxFormulaFeatures, patchXlsxPivotTables, writeXlsxPageSetup, XlsxCellProtectionWriter, applyImportedXlsxPivotTables, readXlsxPageSetup } from "./4166.js";
|
|
11
11
|
import { WorkFileImportController, materializeWorkFileSource } from "./9356.js";
|
|
@@ -2191,6 +2191,7 @@ function work_xlsx_page_breaks_booleanAttribute(element, name) {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
const IMPORTED_WORKSHEET_ELEMENTS = new Set([
|
|
2193
2193
|
'pane',
|
|
2194
|
+
'autoFilter',
|
|
2194
2195
|
'dataValidation',
|
|
2195
2196
|
'conditionalFormatting',
|
|
2196
2197
|
'sheetProtection',
|
|
@@ -2218,7 +2219,7 @@ const DIAGNOSTIC_WORKSHEET_ELEMENTS = new Set([
|
|
|
2218
2219
|
'rowBreaks',
|
|
2219
2220
|
'colBreaks'
|
|
2220
2221
|
]);
|
|
2221
|
-
const WORKSHEET_SCAN_PATTERN = /<(?:[A-Za-z_][\w.-]*:)?(?:(cols|f|pane|dataValidation|conditionalFormatting|sheetProtection|protectedRange|rowBreaks|colBreaks|pageSetup|pageMargins|printOptions|headerFooter|pageSetUpPr|drawing|tableParts)(?=[\s/>])|(row)(?=[\s/>])[^>]*\s(?:collapsed|customFormat|customHeight|hidden|ht|outlineLevel|thickBot|thickTop)\s*=|(c)(?=[\s/>])[^>]*\ss\s*=|(r)(?=[\s/>]))/g;
|
|
2222
|
+
const WORKSHEET_SCAN_PATTERN = /<(?:[A-Za-z_][\w.-]*:)?(?:(cols|f|pane|autoFilter|dataValidation|conditionalFormatting|sheetProtection|protectedRange|rowBreaks|colBreaks|pageSetup|pageMargins|printOptions|headerFooter|pageSetUpPr|drawing|tableParts)(?=[\s/>])|(row)(?=[\s/>])[^>]*\s(?:collapsed|customFormat|customHeight|hidden|ht|outlineLevel|thickBot|thickTop)\s*=|(c)(?=[\s/>])[^>]*\ss\s*=|(r)(?=[\s/>]))/g;
|
|
2222
2223
|
function scanXlsxWorksheetXml(source) {
|
|
2223
2224
|
let hasDirectCellStyles = false;
|
|
2224
2225
|
let hasDiagnosticFeatures = false;
|
|
@@ -2395,6 +2396,9 @@ const OOXML_DYNAMIC_FILTERS = new Map([
|
|
|
2395
2396
|
function readXlsxTableFilters(table, width) {
|
|
2396
2397
|
const autoFilter = directChild(table.documentElement, 'autoFilter');
|
|
2397
2398
|
if (!autoFilter) return [];
|
|
2399
|
+
return readXlsxAutoFilterColumns(autoFilter, width);
|
|
2400
|
+
}
|
|
2401
|
+
function readXlsxAutoFilterColumns(autoFilter, width) {
|
|
2398
2402
|
const result = [];
|
|
2399
2403
|
const observed = new Set();
|
|
2400
2404
|
for (const column of directChildren(autoFilter, 'filterColumn')){
|
|
@@ -2413,8 +2417,11 @@ function readXlsxTableFilters(table, width) {
|
|
|
2413
2417
|
}
|
|
2414
2418
|
function xlsxTableAutoFilterXml(filters, rangeReference, totalsRow) {
|
|
2415
2419
|
const filterRange = totalsRow ? tableRangeWithoutFinalRow(rangeReference) : rangeReference;
|
|
2420
|
+
return xlsxAutoFilterXml(filters, filterRange);
|
|
2421
|
+
}
|
|
2422
|
+
function xlsxAutoFilterXml(filters, rangeReference) {
|
|
2416
2423
|
const columns = filters.slice().sort((left, right)=>left.column - right.column).map((filter)=>`<filterColumn colId="${filter.column}">${criteriaXml(filter.criteria)}</filterColumn>`).join('');
|
|
2417
|
-
return `<autoFilter ref="${escapeXml(
|
|
2424
|
+
return `<autoFilter ref="${escapeXml(rangeReference)}">${columns}</autoFilter>`;
|
|
2418
2425
|
}
|
|
2419
2426
|
function parseFilterCriteria(column) {
|
|
2420
2427
|
const filters = directChild(column, 'filters');
|
|
@@ -2461,6 +2468,16 @@ function parseFilterCriteria(column) {
|
|
|
2461
2468
|
lower: first.value,
|
|
2462
2469
|
upper: second.value
|
|
2463
2470
|
};
|
|
2471
|
+
const firstCondition = customFilterCondition(first);
|
|
2472
|
+
const secondCondition = customFilterCondition(second);
|
|
2473
|
+
if (firstCondition && secondCondition) return {
|
|
2474
|
+
type: 'compound',
|
|
2475
|
+
conjunction: conjunction ? 'and' : 'or',
|
|
2476
|
+
conditions: [
|
|
2477
|
+
firstCondition,
|
|
2478
|
+
secondCondition
|
|
2479
|
+
]
|
|
2480
|
+
};
|
|
2464
2481
|
}
|
|
2465
2482
|
}
|
|
2466
2483
|
const top = directChild(column, 'top10');
|
|
@@ -2498,6 +2515,9 @@ function singleCustomFilter(item) {
|
|
|
2498
2515
|
if ('notEqual' === item.operator && '' === item.value) return {
|
|
2499
2516
|
type: 'non-blanks'
|
|
2500
2517
|
};
|
|
2518
|
+
return customFilterCondition(item);
|
|
2519
|
+
}
|
|
2520
|
+
function customFilterCondition(item) {
|
|
2501
2521
|
if ('equal' === item.operator) {
|
|
2502
2522
|
const wildcard = wildcardCriterion(item.value);
|
|
2503
2523
|
return wildcard ?? {
|
|
@@ -2511,10 +2531,22 @@ function singleCustomFilter(item) {
|
|
|
2511
2531
|
type: 'not-equals',
|
|
2512
2532
|
value: unescapeWildcards(item.value)
|
|
2513
2533
|
};
|
|
2514
|
-
|
|
2534
|
+
if ('contains' === wildcard.type) return {
|
|
2515
2535
|
type: 'does-not-contain',
|
|
2516
2536
|
value: wildcard.value
|
|
2517
|
-
}
|
|
2537
|
+
};
|
|
2538
|
+
if ('begins-with' === wildcard.type) return {
|
|
2539
|
+
type: 'does-not-begin-with',
|
|
2540
|
+
value: wildcard.value
|
|
2541
|
+
};
|
|
2542
|
+
if ('matches-wildcard' === wildcard.type) return {
|
|
2543
|
+
type: 'does-not-match-wildcard',
|
|
2544
|
+
value: wildcard.value
|
|
2545
|
+
};
|
|
2546
|
+
return {
|
|
2547
|
+
type: 'does-not-end-with',
|
|
2548
|
+
value: wildcard.value
|
|
2549
|
+
};
|
|
2518
2550
|
}
|
|
2519
2551
|
const types = {
|
|
2520
2552
|
greaterThan: 'greater-than',
|
|
@@ -2531,19 +2563,25 @@ function singleCustomFilter(item) {
|
|
|
2531
2563
|
function wildcardCriterion(source) {
|
|
2532
2564
|
const starts = source.startsWith('*');
|
|
2533
2565
|
const ends = unescapedFinalAsterisk(source);
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2566
|
+
const inner = source.slice(starts ? 1 : 0, ends ? -1 : void 0);
|
|
2567
|
+
if ((starts || ends) && inner.length > 0 && !workSpreadsheetHasUnescapedWildcard(inner)) {
|
|
2568
|
+
const value = unescapeWildcards(inner);
|
|
2569
|
+
if (starts && ends) return {
|
|
2570
|
+
type: 'contains',
|
|
2571
|
+
value
|
|
2572
|
+
};
|
|
2573
|
+
return starts ? {
|
|
2574
|
+
type: 'ends-with',
|
|
2575
|
+
value
|
|
2576
|
+
} : {
|
|
2577
|
+
type: 'begins-with',
|
|
2578
|
+
value
|
|
2579
|
+
};
|
|
2580
|
+
}
|
|
2581
|
+
return workSpreadsheetHasUnescapedWildcard(source) ? {
|
|
2582
|
+
type: 'matches-wildcard',
|
|
2583
|
+
value: source
|
|
2584
|
+
} : null;
|
|
2547
2585
|
}
|
|
2548
2586
|
function criteriaXml(criteria) {
|
|
2549
2587
|
if ('values' === criteria.type) {
|
|
@@ -2554,6 +2592,11 @@ function criteriaXml(criteria) {
|
|
|
2554
2592
|
if ('non-blanks' === criteria.type) return customFilterXml('notEqual', '');
|
|
2555
2593
|
if ('between' === criteria.type) return customFilterPairXml(true, 'greaterThanOrEqual', criteria.lower, 'lessThanOrEqual', criteria.upper);
|
|
2556
2594
|
if ('not-between' === criteria.type) return customFilterPairXml(false, 'lessThan', criteria.lower, 'greaterThan', criteria.upper);
|
|
2595
|
+
if ('compound' === criteria.type) {
|
|
2596
|
+
const [firstOperator, firstValue] = customFilterParts(criteria.conditions[0]);
|
|
2597
|
+
const [secondOperator, secondValue] = customFilterParts(criteria.conditions[1]);
|
|
2598
|
+
return customFilterPairXml('and' === criteria.conjunction, firstOperator, firstValue, secondOperator, secondValue);
|
|
2599
|
+
}
|
|
2557
2600
|
if ('top' === criteria.type) return topXml(true, false, criteria.count);
|
|
2558
2601
|
if ('top-percent' === criteria.type) return topXml(true, true, criteria.percent);
|
|
2559
2602
|
if ('bottom' === criteria.type) return topXml(false, false, criteria.count);
|
|
@@ -2562,22 +2605,48 @@ function criteriaXml(criteria) {
|
|
|
2562
2605
|
const kind = OOXML_DYNAMIC_FILTERS.get(criteria.kind);
|
|
2563
2606
|
return kind ? `<dynamicFilter type="${kind}"/>` : '';
|
|
2564
2607
|
}
|
|
2565
|
-
const operator =
|
|
2566
|
-
const value = 'contains' === criteria.type ? `*${escapeWildcards(criteria.value)}*` : 'does-not-contain' === criteria.type ? `*${escapeWildcards(criteria.value)}*` : 'begins-with' === criteria.type ? `${escapeWildcards(criteria.value)}*` : 'ends-with' === criteria.type ? `*${escapeWildcards(criteria.value)}` : 'equals' === criteria.type || 'not-equals' === criteria.type ? escapeWildcards(criteria.value) : criteria.value;
|
|
2608
|
+
const [operator, value] = customFilterParts(criteria);
|
|
2567
2609
|
return customFilterXml(operator, value);
|
|
2568
2610
|
}
|
|
2611
|
+
function customFilterParts(criteria) {
|
|
2612
|
+
const operator = comparisonOperator(criteria.type);
|
|
2613
|
+
if ('contains' === criteria.type || 'does-not-contain' === criteria.type) return [
|
|
2614
|
+
operator,
|
|
2615
|
+
`*${escapeWildcards(criteria.value)}*`
|
|
2616
|
+
];
|
|
2617
|
+
if ('begins-with' === criteria.type || 'does-not-begin-with' === criteria.type) return [
|
|
2618
|
+
operator,
|
|
2619
|
+
`${escapeWildcards(criteria.value)}*`
|
|
2620
|
+
];
|
|
2621
|
+
if ('ends-with' === criteria.type || 'does-not-end-with' === criteria.type) return [
|
|
2622
|
+
operator,
|
|
2623
|
+
`*${escapeWildcards(criteria.value)}`
|
|
2624
|
+
];
|
|
2625
|
+
if ('matches-wildcard' === criteria.type || 'does-not-match-wildcard' === criteria.type) return [
|
|
2626
|
+
operator,
|
|
2627
|
+
criteria.value
|
|
2628
|
+
];
|
|
2629
|
+
return [
|
|
2630
|
+
operator,
|
|
2631
|
+
'equals' === criteria.type || 'not-equals' === criteria.type ? escapeWildcards(criteria.value) : criteria.value
|
|
2632
|
+
];
|
|
2633
|
+
}
|
|
2569
2634
|
function comparisonOperator(type) {
|
|
2570
2635
|
const operators = {
|
|
2571
2636
|
'begins-with': 'equal',
|
|
2572
2637
|
contains: 'equal',
|
|
2638
|
+
'does-not-begin-with': 'notEqual',
|
|
2573
2639
|
'does-not-contain': 'notEqual',
|
|
2640
|
+
'does-not-end-with': 'notEqual',
|
|
2641
|
+
'does-not-match-wildcard': 'notEqual',
|
|
2574
2642
|
'ends-with': 'equal',
|
|
2575
2643
|
equals: 'equal',
|
|
2576
2644
|
'greater-than': 'greaterThan',
|
|
2577
2645
|
'greater-than-or-equal': 'greaterThanOrEqual',
|
|
2578
2646
|
'less-than': 'lessThan',
|
|
2579
2647
|
'less-than-or-equal': 'lessThanOrEqual',
|
|
2580
|
-
'not-equals': 'notEqual'
|
|
2648
|
+
'not-equals': 'notEqual',
|
|
2649
|
+
'matches-wildcard': 'equal'
|
|
2581
2650
|
};
|
|
2582
2651
|
return operators[type];
|
|
2583
2652
|
}
|
|
@@ -2951,6 +3020,7 @@ async function readXlsxSheetFeaturesFromPackage(archive, worksheetScans) {
|
|
|
2951
3020
|
}
|
|
2952
3021
|
const document1 = parseXml(source, partPath);
|
|
2953
3022
|
features.set(sheetName, {
|
|
3023
|
+
autoFilterCriteria: readWorksheetAutoFilterCriteria(document1),
|
|
2954
3024
|
directCellStyles: readXlsxDirectCellStyles(document1, styles, theme),
|
|
2955
3025
|
frozen: parseFrozenPane(document1) ?? void 0,
|
|
2956
3026
|
validations: parseDataValidations(document1, uses1904DateSystem),
|
|
@@ -2971,6 +3041,7 @@ function xlsxWorksheetMayReferenceSharedStrings(source) {
|
|
|
2971
3041
|
}
|
|
2972
3042
|
function emptyXlsxSheetFeatures() {
|
|
2973
3043
|
return {
|
|
3044
|
+
autoFilterCriteria: [],
|
|
2974
3045
|
directCellStyles: [],
|
|
2975
3046
|
validations: [],
|
|
2976
3047
|
conditionalFormats: [],
|
|
@@ -2997,7 +3068,7 @@ async function patchXlsxSheetFeatures(buffer, content) {
|
|
|
2997
3068
|
pageSetup.sheetId,
|
|
2998
3069
|
pageSetup
|
|
2999
3070
|
]));
|
|
3000
|
-
if (!sheets.some((sheet)=>sheet.frozen || Object.keys(sheet.dataVerification ?? {}).length || sheet.dataValidationRanges?.length || sheet.luckysheet_conditionformat_save?.length || sheetHasXlsxRichTextCells(sheet) || sheetHasDirectCellStyles(sheet) || sheetHasProtectionState(sheet) || Boolean(sheet.id && (pageBreaksBySheetId.get(sheet.id)?.rows?.length ?? 0) + (pageBreaksBySheetId.get(sheet.id)?.columns?.length ?? 0)) || Boolean(sheet.id && pageSetupsBySheetId.has(sheet.id)))) return buffer;
|
|
3071
|
+
if (!sheets.some((sheet)=>sheet.frozen || Object.keys(sheet.dataVerification ?? {}).length || sheet.dataValidationRanges?.length || sheet.luckysheet_conditionformat_save?.length || workSpreadsheetAutoFilterCriteriaEntries(sheet).length || sheetHasXlsxRichTextCells(sheet) || sheetHasDirectCellStyles(sheet) || sheetHasProtectionState(sheet) || Boolean(sheet.id && (pageBreaksBySheetId.get(sheet.id)?.rows?.length ?? 0) + (pageBreaksBySheetId.get(sheet.id)?.columns?.length ?? 0)) || Boolean(sheet.id && pageSetupsBySheetId.has(sheet.id)))) return buffer;
|
|
3001
3072
|
const archive = await work_ooxml_package_OoxmlPackage.load(buffer);
|
|
3002
3073
|
const worksheetParts = await readWorksheetParts(archive);
|
|
3003
3074
|
const zip = await jszip.loadAsync(buffer);
|
|
@@ -3010,7 +3081,7 @@ async function patchXlsxSheetFeatures(buffer, content) {
|
|
|
3010
3081
|
for (const sheet of sheets){
|
|
3011
3082
|
const pageBreaks = sheet.id ? pageBreaksBySheetId.get(sheet.id) : void 0;
|
|
3012
3083
|
const pageSetup = sheet.id ? pageSetupsBySheetId.get(sheet.id) : void 0;
|
|
3013
|
-
if (!sheet.frozen && !Object.keys(sheet.dataVerification ?? {}).length && !sheet.dataValidationRanges?.length && !sheet.luckysheet_conditionformat_save?.length && !sheetHasXlsxRichTextCells(sheet) && !sheetHasDirectCellStyles(sheet) && !sheetHasProtectionState(sheet) && !(pageBreaks?.rows?.length || pageBreaks?.columns?.length) && !pageSetup) continue;
|
|
3084
|
+
if (!sheet.frozen && !Object.keys(sheet.dataVerification ?? {}).length && !sheet.dataValidationRanges?.length && !sheet.luckysheet_conditionformat_save?.length && !workSpreadsheetAutoFilterCriteriaEntries(sheet).length && !sheetHasXlsxRichTextCells(sheet) && !sheetHasDirectCellStyles(sheet) && !sheetHasProtectionState(sheet) && !(pageBreaks?.rows?.length || pageBreaks?.columns?.length) && !pageSetup) continue;
|
|
3014
3085
|
const exportedName = sheet.name.slice(0, 31) || '工作表';
|
|
3015
3086
|
const partPath = worksheetParts.get(exportedName);
|
|
3016
3087
|
const entry = partPath ? zip.file(partPath) : null;
|
|
@@ -3019,6 +3090,7 @@ async function patchXlsxSheetFeatures(buffer, content) {
|
|
|
3019
3090
|
if (sheet.frozen) writeFrozenPane(document1, sheet.frozen);
|
|
3020
3091
|
writeDataValidations(document1, sheet.dataVerification, sheet.dataValidationRanges, new Set((content.namedRanges ?? []).filter((namedRange)=>!namedRange.scopeSheetId || namedRange.scopeSheetId === sheet.id).map((namedRange)=>namedRange.name.trim().toLocaleLowerCase())));
|
|
3021
3092
|
writeXlsxConditionalFormats(document1, sheet.luckysheet_conditionformat_save, differentialFormats);
|
|
3093
|
+
writeWorksheetAutoFilterCriteria(document1, workSpreadsheetAutoFilterCriteriaEntries(sheet));
|
|
3022
3094
|
if (directCellStyles) writeXlsxDirectCellStyles(document1, sheet, directCellStyles);
|
|
3023
3095
|
writeXlsxRichTextCells(document1, sheet, semanticPalette?.palette);
|
|
3024
3096
|
writeXlsxProtection(document1, sheet, cellProtection);
|
|
@@ -3033,6 +3105,20 @@ async function patchXlsxSheetFeatures(buffer, content) {
|
|
|
3033
3105
|
compression: 'DEFLATE'
|
|
3034
3106
|
});
|
|
3035
3107
|
}
|
|
3108
|
+
function readWorksheetAutoFilterCriteria(document1) {
|
|
3109
|
+
const autoFilter = directChild(document1.documentElement, 'autoFilter');
|
|
3110
|
+
return autoFilter ? readXlsxAutoFilterColumns(autoFilter, 16384) : [];
|
|
3111
|
+
}
|
|
3112
|
+
function writeWorksheetAutoFilterCriteria(document1, filters) {
|
|
3113
|
+
if (!filters.length) return;
|
|
3114
|
+
const current = directChild(document1.documentElement, 'autoFilter');
|
|
3115
|
+
const reference = current ? work_ooxml_package_attribute(current, 'ref') : null;
|
|
3116
|
+
if (!current || !reference) return;
|
|
3117
|
+
const namespace = document1.documentElement.namespaceURI;
|
|
3118
|
+
const source = xlsxAutoFilterXml(filters, reference).replace('<autoFilter ', `<autoFilter xmlns="${namespace ?? ''}" `);
|
|
3119
|
+
const replacement = document1.importNode(parseXml(source, 'worksheet AutoFilter').documentElement, true);
|
|
3120
|
+
current.parentNode?.replaceChild(replacement, current);
|
|
3121
|
+
}
|
|
3036
3122
|
function spreadsheetXlsxSemanticColors(content) {
|
|
3037
3123
|
const colors = [];
|
|
3038
3124
|
for (const sheet of content.sheets){
|
|
@@ -4194,7 +4280,7 @@ async function importWorkSpreadsheetFile(file, extension, context) {
|
|
|
4194
4280
|
const filterSelect = XLSX ? fortuneSheetFilter(worksheet, XLSX) : void 0;
|
|
4195
4281
|
const dataVerification = XLSX ? fortuneSheetDataVerification(features?.validations ?? [], rowCount, columnCount, XLSX) : {};
|
|
4196
4282
|
const dataValidationRanges = XLSX ? fortuneSheetDataValidationRanges(features?.validations ?? [], rowCount, columnCount, XLSX) : [];
|
|
4197
|
-
sheets.push({
|
|
4283
|
+
sheets.push(workSpreadsheetSheetWithImportedAutoFilterCriteria({
|
|
4198
4284
|
id,
|
|
4199
4285
|
name,
|
|
4200
4286
|
order: index,
|
|
@@ -4215,7 +4301,7 @@ async function importWorkSpreadsheetFile(file, extension, context) {
|
|
|
4215
4301
|
charts: features?.charts.length ? xlsxWorksheetChartsToSheet(features.charts, config) : void 0,
|
|
4216
4302
|
tables: features?.tables.length ? features.tables : void 0,
|
|
4217
4303
|
formulaMetadata
|
|
4218
|
-
});
|
|
4304
|
+
}, features?.autoFilterCriteria ?? []));
|
|
4219
4305
|
await context.controller.checkpoint('parsing', sheetProgressStart + sheetProgressSize);
|
|
4220
4306
|
}
|
|
4221
4307
|
const workbookMetadata = importXlsxDefinedNames(workbook, sheets);
|
|
@@ -5293,12 +5379,12 @@ function work_pdf_export_safeFileName(value) {
|
|
|
5293
5379
|
}
|
|
5294
5380
|
var core_OFFICE_COLLABORATION_VERSION = 1;
|
|
5295
5381
|
export { AGENT_PROPOSAL_PROTOCOL, OFFICE_NOTIFICATION_EVENT, createAgentProposalInstruction, createAgentProposalRequest, getAgentProposalStatus, subscribeOfficeNotifications } from "./6489.js";
|
|
5382
|
+
export { DEFAULT_SPREADSHEET_SORT_CUSTOM_LIST_STORAGE_KEY, LocalStorageSpreadsheetSortCustomListStore, createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./5416.js";
|
|
5296
5383
|
export { OFFICE_COLLABORATION_NAMESPACE, OFFICE_COLLABORATION_PROTOCOL, OfficeCollaborationError, createOfficeCollaborationSession, readOfficeCollaborationMetadata } from "./9787.js";
|
|
5297
5384
|
export { assertPdfCollaborationSource, createOfficePdfCollaborationBinding, initializeOfficePdfCollaboration, readOfficePdfCollaboration, readOfficePdfCollaborationSource, replaceOfficePdfCollaboration } from "./3818.js";
|
|
5298
5385
|
export { createArtifact, createOfficeId, officeTemplates } from "./4121.js";
|
|
5299
5386
|
export { createOfficeDocumentCollaborationBinding, forgetSourceBlob, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration, readSourceBlob, registerSourceBlob } from "./4174.js";
|
|
5300
5387
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
5301
5388
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
|
5302
|
-
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./3266.js";
|
|
5303
5389
|
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";
|
|
5304
5390
|
export { WORK_DOCUMENT_SNAPSHOT_MEDIA_TYPE as DOCUMENT_SNAPSHOT_MEDIA_TYPE, WORK_DOCUMENT_SNAPSHOT_SCHEMA as DOCUMENT_SNAPSHOT_SCHEMA, WORK_DOCUMENT_SNAPSHOT_VERSION as DOCUMENT_SNAPSHOT_VERSION, WORK_DOCUMENT_SOURCE_MEDIA_TYPE as DOCUMENT_SOURCE_MEDIA_TYPE, WORK_DOCUMENT_SOURCE_SCHEMA as DOCUMENT_SOURCE_SCHEMA, WORK_DOCUMENT_SOURCE_VERSION as DOCUMENT_SOURCE_VERSION, WORK_IMPORT_ACCEPT as OFFICE_FILE_ACCEPT, WORK_OFFICE_COLLABORATION_DEFAULT_MAX_TRANSPORT_PAYLOAD_BYTES as OFFICE_COLLABORATION_DEFAULT_MAX_TRANSPORT_PAYLOAD_BYTES, WORK_OFFICE_COLLABORATION_MAX_TRANSPORT_PAYLOAD_BYTES as OFFICE_COLLABORATION_MAX_TRANSPORT_PAYLOAD_BYTES, WORK_OFFICE_COLLABORATION_PRESENCE_FIELD as OFFICE_COLLABORATION_PRESENCE_FIELD, applyWorkDocumentSource as applyDocumentSource, core_OFFICE_COLLABORATION_VERSION as OFFICE_COLLABORATION_VERSION, createWorkArtifactBlob as createArtifactBlob, createWorkOfficeCollaborationPresence as createOfficeCollaborationPresence, createWorkOfficeCollaborationTransportBinding as createOfficeCollaborationTransportBinding, createWorkPdfCollaborationContent as createPdfCollaborationContent, decodeWorkDocumentSnapshot as decodeDocumentSnapshot, defaultPptxRuntimeUrl, encodeWorkDocumentSnapshot as encodeDocumentSnapshot, exportWorkArtifact as downloadArtifact, exportWorkArtifactPdf as downloadArtifactPdf, importWorkFile as importOfficeFile, projectWorkDocumentSource as projectDocumentSource, workArtifactExtension as artifactExtension, workArtifactExtension, workArtifactKindLabel as artifactKindLabel, workArtifactKindLabel, workKindForFile as officeKindForFile, workPdfPagesForExport as pdfPagesForExport };
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ var src_DOCUMENT_SNAPSHOT_VERSION = 1;
|
|
|
2
2
|
var src_DOCUMENT_SOURCE_VERSION = 1;
|
|
3
3
|
var src_OFFICE_COLLABORATION_VERSION = 1;
|
|
4
4
|
export { AGENT_PROPOSAL_PROTOCOL, OFFICE_NOTIFICATION_EVENT, createAgentProposalInstruction, createAgentProposalRequest, getAgentProposalStatus, subscribeOfficeNotifications } from "./6489.js";
|
|
5
|
+
export { DEFAULT_SPREADSHEET_SORT_CUSTOM_LIST_STORAGE_KEY, LocalStorageSpreadsheetSortCustomListStore, createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./5416.js";
|
|
5
6
|
export { DOCUMENT_SNAPSHOT_MEDIA_TYPE, DOCUMENT_SNAPSHOT_SCHEMA, DOCUMENT_SOURCE_MEDIA_TYPE, DOCUMENT_SOURCE_SCHEMA, OFFICE_COLLABORATION_DEFAULT_MAX_TRANSPORT_PAYLOAD_BYTES, OFFICE_COLLABORATION_MAX_TRANSPORT_PAYLOAD_BYTES, OFFICE_COLLABORATION_PRESENCE_FIELD, OFFICE_FILE_ACCEPT, applyDocumentSource, artifactExtension, artifactExtension as workArtifactExtension, artifactKindLabel, artifactKindLabel as workArtifactKindLabel, createArtifactBlob, createOfficeCollaborationPresence, createOfficeCollaborationTransportBinding, createPdfCollaborationContent, decodeDocumentSnapshot, defaultPptxRuntimeUrl, downloadArtifact, downloadArtifactPdf, encodeDocumentSnapshot, importOfficeFile, officeKindForFile, pdfPagesForExport, projectDocumentSource } from "./core.js";
|
|
6
7
|
export { DocumentEditor, MarkdownEditor, PDF_EVIDENCE_COORDINATE_BASIS, PdfViewer, PresentationEditor, SpreadsheetEditor, defaultDocumentArabicLayoutFontUrl, defaultDocumentHebrewLayoutFontUrl, defaultDocumentLatinLayoutFontUrl, defaultDocumentLayoutFontUrl, defaultDocumentLayoutFonts, defaultOfficeKernelWasmUrl, defaultPdfiumWasmUrl, preloadOfficeEditor } from "./432.js";
|
|
7
8
|
export { OFFICE_COLLABORATION_NAMESPACE, OFFICE_COLLABORATION_PROTOCOL, OfficeCollaborationError, createOfficeCollaborationSession, readOfficeCollaborationMetadata } from "./9787.js";
|
|
@@ -10,6 +11,5 @@ export { createArtifact, createOfficeId, officeTemplates } from "./4121.js";
|
|
|
10
11
|
export { createOfficeDocumentCollaborationBinding, forgetSourceBlob, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration, readSourceBlob, registerSourceBlob } from "./4174.js";
|
|
11
12
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
12
13
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
|
13
|
-
export { createOfficeSpreadsheetCollaborationBinding, initializeOfficeSpreadsheetCollaboration, readOfficeSpreadsheetCollaboration, replaceOfficeSpreadsheetCollaboration } from "./3266.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,3 @@
|
|
|
1
|
+
import type { SpreadsheetCommandContext, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
2
|
+
import { type OfficeEditorExtension } from './office-editor-extension';
|
|
3
|
+
export declare function createSpreadsheetAutoFilterExtension(): OfficeEditorExtension<SpreadsheetCommandContext, SpreadsheetEditorCommands>;
|
package/dist/internal/features/work/editors/spreadsheet-auto-filter-condition-dialog-model.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WorkSpreadsheetCustomFilterCondition, WorkSpreadsheetDynamicFilter, WorkSpreadsheetFilterCriteria } from '../work-types';
|
|
2
|
+
export type SpreadsheetAutoFilterConditionType = WorkSpreadsheetCustomFilterCondition['type'] | WorkSpreadsheetDynamicFilter | 'between' | 'not-between' | 'top' | 'top-percent' | 'bottom' | 'bottom-percent' | 'blanks' | 'non-blanks';
|
|
3
|
+
export declare const CONDITION_LABELS: Readonly<Record<SpreadsheetAutoFilterConditionType, string>>;
|
|
4
|
+
export declare const TEXT_CONDITIONS: readonly SpreadsheetAutoFilterConditionType[];
|
|
5
|
+
export declare const WILDCARD_CONDITIONS: readonly ["matches-wildcard", "does-not-match-wildcard"];
|
|
6
|
+
export declare const NUMBER_COMPARISON_CONDITIONS: readonly ["greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal"];
|
|
7
|
+
export declare const NUMBER_CONDITIONS: readonly SpreadsheetAutoFilterConditionType[];
|
|
8
|
+
export declare const RANK_CONDITIONS: readonly ["top", "top-percent", "bottom", "bottom-percent"];
|
|
9
|
+
export declare const AVERAGE_CONDITIONS: readonly ["above-average", "below-average"];
|
|
10
|
+
export declare const DATE_CONDITIONS: readonly ["today", "yesterday", "tomorrow", "this-week", "last-week", "next-week", "this-month", "last-month", "next-month", "this-quarter", "last-quarter", "next-quarter", "this-year", "last-year", "next-year", "year-to-date", "quarter-1", "quarter-2", "quarter-3", "quarter-4", "month-1", "month-2", "month-3", "month-4", "month-5", "month-6", "month-7", "month-8", "month-9", "month-10", "month-11", "month-12"];
|
|
11
|
+
export declare const BLANK_CONDITIONS: readonly SpreadsheetAutoFilterConditionType[];
|
|
12
|
+
export interface SpreadsheetAutoFilterConditionDraft {
|
|
13
|
+
conjunction: 'and' | 'or';
|
|
14
|
+
secondType: WorkSpreadsheetCustomFilterCondition['type'];
|
|
15
|
+
secondValue: string;
|
|
16
|
+
type: SpreadsheetAutoFilterConditionType;
|
|
17
|
+
upperValue: string;
|
|
18
|
+
useSecond: boolean;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function spreadsheetAutoFilterConditionDraft(criteria: WorkSpreadsheetFilterCriteria | null, numeric: boolean, date: boolean): SpreadsheetAutoFilterConditionDraft;
|
|
22
|
+
export declare function spreadsheetAutoFilterConditionCriteria(draft: SpreadsheetAutoFilterConditionDraft): WorkSpreadsheetFilterCriteria | null;
|
|
23
|
+
export declare function spreadsheetAutoFilterPrimaryConditionError(draft: SpreadsheetAutoFilterConditionDraft): string | null;
|
|
24
|
+
export declare function spreadsheetAutoFilterValueError(type: SpreadsheetAutoFilterConditionType, value: string): string | null;
|
|
25
|
+
export declare function spreadsheetAutoFilterCustomConditionType(value: string): value is WorkSpreadsheetCustomFilterCondition['type'];
|
|
26
|
+
export declare function spreadsheetAutoFilterRankConditionType(value: string): value is (typeof RANK_CONDITIONS)[number];
|
|
27
|
+
export declare function spreadsheetAutoFilterDynamicConditionType(value: string): value is WorkSpreadsheetDynamicFilter;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WorkSpreadsheetFilterCriteria } from '../work-types';
|
|
2
|
+
export type { SpreadsheetAutoFilterConditionType } from './spreadsheet-auto-filter-condition-dialog-model';
|
|
3
|
+
export interface SpreadsheetAutoFilterConditionDialogSource {
|
|
4
|
+
columnLabel: string;
|
|
5
|
+
criteria: WorkSpreadsheetFilterCriteria | null;
|
|
6
|
+
date: boolean;
|
|
7
|
+
hasActiveFilter: boolean;
|
|
8
|
+
numeric: boolean;
|
|
9
|
+
sheetName: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function SpreadsheetAutoFilterConditionDialog({ source, restoreFocusTarget, onApply, onClear, onClose, }: {
|
|
12
|
+
source: SpreadsheetAutoFilterConditionDialogSource;
|
|
13
|
+
restoreFocusTarget: () => HTMLElement | null;
|
|
14
|
+
onApply: (criteria: WorkSpreadsheetFilterCriteria) => boolean;
|
|
15
|
+
onClear: () => boolean;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkSpreadsheetSheet } from '../work-types';
|
|
2
|
+
export declare const SPREADSHEET_AUTO_FILTER_MENU_ITEMS: string[];
|
|
3
|
+
export declare function enhanceSpreadsheetAutoFilterSurface(container: HTMLElement, sheet: WorkSpreadsheetSheet | undefined, invoker: HTMLElement | null): HTMLElement | null;
|
|
4
|
+
export declare function focusSpreadsheetAutoFilterMenu(container: HTMLElement): void;
|
|
5
|
+
export declare function spreadsheetAutoFilterMenuFocusable(menu: HTMLElement): HTMLElement[];
|
|
6
|
+
export declare function spreadsheetAutoFilterTrigger(target: EventTarget | null): HTMLElement | null;
|
|
7
|
+
export declare function spreadsheetAutoFilterMenu(target: EventTarget | null): HTMLElement | null;
|
|
8
|
+
export declare function spreadsheetAutoFilterConditionAction(target: EventTarget | null): HTMLElement | null;
|
|
9
|
+
export declare function spreadsheetAutoFilterRankAction(target: EventTarget | null): HTMLElement | null;
|
|
10
|
+
export declare function spreadsheetAutoFilterColumnLabel(sheet: WorkSpreadsheetSheet | undefined, row: number, column: number): string;
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import type { Selection } from '@fortune-sheet/core';
|
|
2
|
-
import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { WorkSpreadsheetFilterCriteria, WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
|
|
3
|
+
import { type WorkSpreadsheetAutoFilterRange } from '../work-spreadsheet-auto-filter';
|
|
4
|
+
import { type WorkSpreadsheetDynamicFilterContext } from '../work-spreadsheet-dynamic-filter';
|
|
5
|
+
export type SpreadsheetAutoFilterRange = WorkSpreadsheetAutoFilterRange;
|
|
6
|
+
export interface SpreadsheetAutoFilterTarget {
|
|
7
|
+
column: number;
|
|
8
|
+
filterRange: SpreadsheetAutoFilterRange;
|
|
9
|
+
sheetId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SpreadsheetAutoFilterCriteriaRequest extends SpreadsheetAutoFilterTarget {
|
|
12
|
+
criteria: WorkSpreadsheetFilterCriteria;
|
|
6
13
|
}
|
|
7
14
|
export declare function spreadsheetAutoFilterRange(sheet: WorkSpreadsheetSheet, selection: Selection): SpreadsheetAutoFilterRange | null;
|
|
8
15
|
export declare function spreadsheetSelectionOrCurrentRegion(sheet: WorkSpreadsheetSheet, selection: Selection): SpreadsheetAutoFilterRange | null;
|
|
9
16
|
export declare function spreadsheetAutoFilterHeaderColumn(sheet: WorkSpreadsheetSheet | undefined, selection: Selection): number | null;
|
|
10
17
|
export declare function toggleSpreadsheetAutoFilter(content: WorkSpreadsheetContent, sheetId: string, selection: Selection): WorkSpreadsheetContent | null;
|
|
18
|
+
export declare function spreadsheetAutoFilterCriteria(sheet: WorkSpreadsheetSheet | undefined, column: number): WorkSpreadsheetFilterCriteria | null;
|
|
19
|
+
export declare function spreadsheetAutoFilterColumnIsNumeric(sheet: WorkSpreadsheetSheet, range: SpreadsheetAutoFilterRange, column: number): boolean;
|
|
20
|
+
export declare function spreadsheetAutoFilterColumnIsDate(sheet: WorkSpreadsheetSheet, range: SpreadsheetAutoFilterRange, column: number): boolean;
|
|
21
|
+
export declare function applySpreadsheetAutoFilterCriteria(content: WorkSpreadsheetContent, sheetId: string, column: number, criteria: WorkSpreadsheetFilterCriteria, context?: WorkSpreadsheetDynamicFilterContext): WorkSpreadsheetContent | null;
|
|
22
|
+
export declare function clearSpreadsheetAutoFilterCriteria(content: WorkSpreadsheetContent, sheetId: string, column: number): WorkSpreadsheetContent | null;
|
|
@@ -10,5 +10,6 @@ export declare function normalizeSpreadsheetCellRange(value: SpreadsheetCellRang
|
|
|
10
10
|
export declare function parseSpreadsheetCellRange(value: unknown): SpreadsheetCellRange | null;
|
|
11
11
|
export declare function subtractSpreadsheetCellRange(source: SpreadsheetCellRange, removed: SpreadsheetCellRange): SpreadsheetCellRange[];
|
|
12
12
|
export declare function spreadsheetCellRangesIntersect(left: SpreadsheetCellRange, right: SpreadsheetCellRange): boolean;
|
|
13
|
+
export declare function spreadsheetCellRangesEqual(left: SpreadsheetCellRangeInput, right: SpreadsheetCellRangeInput): boolean;
|
|
13
14
|
export declare function spreadsheetCellRangeContains(range: SpreadsheetCellRange, row: number, column: number): boolean;
|
|
14
15
|
export declare function spreadsheetCellRangeArea(range: SpreadsheetCellRange): number;
|
|
@@ -1091,6 +1091,15 @@ export declare const spreadsheetCommandCatalog: {
|
|
|
1091
1091
|
readonly group: "sortAndFilter";
|
|
1092
1092
|
};
|
|
1093
1093
|
};
|
|
1094
|
+
readonly customSort: {
|
|
1095
|
+
readonly id: "data.customSort";
|
|
1096
|
+
readonly label: "自定义排序";
|
|
1097
|
+
readonly location: {
|
|
1098
|
+
readonly area: "ribbon";
|
|
1099
|
+
readonly tab: "data";
|
|
1100
|
+
readonly group: "sortAndFilter";
|
|
1101
|
+
};
|
|
1102
|
+
};
|
|
1094
1103
|
readonly autoFilter: {
|
|
1095
1104
|
readonly id: "data.autoFilter";
|
|
1096
1105
|
readonly label: "自动筛选";
|
|
@@ -4,6 +4,7 @@ import type { SpreadsheetTextOrientationId } from '../work-spreadsheet-text-orie
|
|
|
4
4
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
5
5
|
import { type OfficeEditorCanCommands, type OfficeEditorExtension } from './office-editor-extension';
|
|
6
6
|
import type { SpreadsheetAutoSumFunction } from './spreadsheet-auto-sum';
|
|
7
|
+
import type { SpreadsheetAutoFilterCriteriaRequest, SpreadsheetAutoFilterTarget } from './spreadsheet-auto-filter';
|
|
7
8
|
import type { SpreadsheetCellBorderFormat } from './spreadsheet-cell-border';
|
|
8
9
|
import { type SpreadsheetCellClearMode } from './spreadsheet-cell-clear';
|
|
9
10
|
import type { SpreadsheetCellFillDirection } from './spreadsheet-cell-fill';
|
|
@@ -24,6 +25,7 @@ import { type SpreadsheetDecimalPlacesDirection } from './spreadsheet-number-for
|
|
|
24
25
|
import type { SpreadsheetPasteContent } from './spreadsheet-paste-special';
|
|
25
26
|
import type { SpreadsheetRichTextToggleAttribute } from './spreadsheet-rich-text-selection-format';
|
|
26
27
|
import { type SpreadsheetSheetMoveDirection } from './spreadsheet-sheet-model';
|
|
28
|
+
import type { SpreadsheetSortDirection, SpreadsheetSortOpenRequest, SpreadsheetSortRequest } from './spreadsheet-sort';
|
|
27
29
|
import type { SpreadsheetTableDesignPatch, SpreadsheetTableRequest, SpreadsheetTableTarget } from './spreadsheet-table';
|
|
28
30
|
export interface SpreadsheetWorkbookCommandPort {
|
|
29
31
|
autoFillCell: (copyRange: SpreadsheetCommandRange, applyRange: SpreadsheetCommandRange, direction: SpreadsheetCellFillDirection) => void;
|
|
@@ -78,7 +80,7 @@ export interface SpreadsheetSelectionRef {
|
|
|
78
80
|
}
|
|
79
81
|
export type SpreadsheetStructureAxis = 'row' | 'column';
|
|
80
82
|
export type SpreadsheetStructureInsertPosition = 'before' | 'after';
|
|
81
|
-
export type SpreadsheetSortDirection
|
|
83
|
+
export type { SpreadsheetSortDirection } from './spreadsheet-sort';
|
|
82
84
|
export type SpreadsheetCalculationCommand = {
|
|
83
85
|
scope: 'workbook';
|
|
84
86
|
} | {
|
|
@@ -148,6 +150,11 @@ export interface SpreadsheetTableCommandPort {
|
|
|
148
150
|
canOpen: boolean;
|
|
149
151
|
open: (target: SpreadsheetTableTarget) => boolean;
|
|
150
152
|
}
|
|
153
|
+
export interface SpreadsheetSortCommandPort {
|
|
154
|
+
canApply: (request: SpreadsheetSortRequest, liveRange: SpreadsheetCommandRange) => boolean;
|
|
155
|
+
canOpen: boolean;
|
|
156
|
+
open: (request: SpreadsheetSortOpenRequest) => boolean;
|
|
157
|
+
}
|
|
151
158
|
export interface SpreadsheetNavigationCommandPort {
|
|
152
159
|
canOpenFind: boolean;
|
|
153
160
|
canOpenGoTo: boolean;
|
|
@@ -174,13 +181,16 @@ export interface SpreadsheetEditorCommands {
|
|
|
174
181
|
adjustFontSize: (direction: SpreadsheetFontSizeDirection) => boolean;
|
|
175
182
|
applyCellStyle: (preset: SpreadsheetCellStyleChoice) => boolean;
|
|
176
183
|
applyCellFormat: (request: SpreadsheetCellFormatRequest) => boolean;
|
|
184
|
+
applyAutoFilterCriteria: (request: SpreadsheetAutoFilterCriteriaRequest) => boolean;
|
|
177
185
|
applyDataValidation: (request: SpreadsheetDataValidationRequest) => boolean;
|
|
178
186
|
applyAutoSum: (functionName: SpreadsheetAutoSumFunction) => boolean;
|
|
179
187
|
applyFormatPainter: (target: SpreadsheetCommandSelection) => boolean;
|
|
180
188
|
applyHyperlink: (request: SpreadsheetHyperlinkRequest) => boolean;
|
|
181
189
|
applyTable: (request: SpreadsheetTableRequest) => boolean;
|
|
190
|
+
applyCustomSort: (request: SpreadsheetSortRequest) => boolean;
|
|
182
191
|
cancelFormatPainter: () => boolean;
|
|
183
192
|
clearSelectedCells: (mode?: SpreadsheetCellClearMode) => boolean;
|
|
193
|
+
clearAutoFilterCriteria: (target: SpreadsheetAutoFilterTarget) => boolean;
|
|
184
194
|
copyCellFromAbove: (kind: SpreadsheetCopyFromAboveKind) => boolean;
|
|
185
195
|
copySelection: () => boolean;
|
|
186
196
|
cutSelection: () => boolean;
|
|
@@ -201,6 +211,7 @@ export interface SpreadsheetEditorCommands {
|
|
|
201
211
|
openGoTo: () => boolean;
|
|
202
212
|
openHyperlink: () => boolean;
|
|
203
213
|
openPasteSpecial: () => boolean;
|
|
214
|
+
openCustomSort: () => boolean;
|
|
204
215
|
openTable: () => boolean;
|
|
205
216
|
pasteCells: (values: readonly (readonly unknown[])[]) => boolean;
|
|
206
217
|
pasteSelection: () => boolean;
|
|
@@ -248,6 +259,7 @@ export interface SpreadsheetCommandContext {
|
|
|
248
259
|
richTextFormat?: SpreadsheetRichTextFormatCommandPort | null;
|
|
249
260
|
selection: SpreadsheetCommandSelection | null;
|
|
250
261
|
selectionRef?: SpreadsheetSelectionRef;
|
|
262
|
+
sort: SpreadsheetSortCommandPort;
|
|
251
263
|
table: SpreadsheetTableCommandPort;
|
|
252
264
|
targetSheetGridSize?: SpreadsheetGridSize | null;
|
|
253
265
|
targetSheetId: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkSpreadsheetSheet } from '../work-types';
|
|
3
|
+
import { type SpreadsheetCellRange, type SpreadsheetCellRangeInput } from './spreadsheet-cell-range';
|
|
4
|
+
/**
|
|
5
|
+
* Finds the bounded rectangular current region that contains a seed range.
|
|
6
|
+
* Dense and sparse worksheets share this reader so filter and sort commands do
|
|
7
|
+
* not derive different expansion boundaries from the same controlled sheet.
|
|
8
|
+
*/
|
|
9
|
+
export declare function spreadsheetCurrentRegion(sheet: WorkSpreadsheetSheet, seed: SpreadsheetCellRangeInput): SpreadsheetCellRange | null;
|
|
10
|
+
export declare function spreadsheetRowHasContent(cellAt: (row: number, column: number) => Cell | null, row: number, startColumn: number, endColumn: number): boolean;
|
|
11
|
+
export declare function spreadsheetCellHasContent(cell: Cell | null): boolean;
|
|
12
|
+
export declare function spreadsheetSheetCellReader(sheet: WorkSpreadsheetSheet): (row: number, column: number) => Cell | null;
|
|
@@ -2,6 +2,7 @@ import type { WorkOfficeCollaborationSession } from '../../../collaboration/offi
|
|
|
2
2
|
import type { WorkEditorAgentRequest } from '../work-agent-request';
|
|
3
3
|
import type { WorkSpreadsheetContent } from '../work-types';
|
|
4
4
|
import { type SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
5
|
+
import type { SpreadsheetSortCustomListStore } from './spreadsheet-sort-custom-list-store';
|
|
5
6
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
6
7
|
export interface SpreadsheetEditorProps {
|
|
7
8
|
autoFocus?: boolean;
|
|
@@ -10,6 +11,7 @@ export interface SpreadsheetEditorProps {
|
|
|
10
11
|
kernelWasmUrl?: string;
|
|
11
12
|
preview: boolean;
|
|
12
13
|
saveStatus?: string;
|
|
14
|
+
sortCustomListStore?: SpreadsheetSortCustomListStore;
|
|
13
15
|
fileActions?: readonly WorkOfficeFileAction[];
|
|
14
16
|
onChange: (content: WorkSpreadsheetContent) => void;
|
|
15
17
|
onAgentRequest?: (request: WorkEditorAgentRequest) => void | Promise<void>;
|
|
@@ -19,4 +21,5 @@ export declare function focusSpreadsheetGrid(container: HTMLElement | null, { fo
|
|
|
19
21
|
focusOrigin?: Element | null;
|
|
20
22
|
forceInitial?: boolean;
|
|
21
23
|
}): void;
|
|
24
|
+
export declare function preserveSpreadsheetGridFocus(container: HTMLElement | null, target: EventTarget | null): void;
|
|
22
25
|
export declare function spreadsheetCommandsWithGridFocus(commands: SpreadsheetEditorCommands, restoreFocus: () => void): SpreadsheetEditorCommands;
|