@a3s-lab/office 0.43.0 → 0.44.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 +18 -1
- package/dist/0~1403.js +1 -1
- package/dist/0~2330.js +1 -1
- package/dist/0~3539.js +2 -2
- package/dist/0~3557.js +1 -1
- package/dist/0~4980.js +1 -1
- package/dist/0~5024.js +1 -1
- package/dist/0~7828.js +1 -1
- package/dist/{0~7048.js → 0~7831.js} +2 -547
- package/dist/0~document-editor.js +4 -3
- package/dist/{0~3635.js → 0~office-color-picker.js} +1 -12
- package/dist/0~pdf-viewer.js +22 -8
- package/dist/0~presentation-editor.js +4 -3
- package/dist/0~spreadsheet-editor.js +200 -3669
- package/dist/0~work-docx-export.js +1 -1
- package/dist/0~work-docx-import.js +1 -1
- package/dist/0~work-office-diagnostics.js +1 -1
- package/dist/0~work-pptx-export.js +1 -1
- package/dist/0~work-pptx-import.js +1 -1
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/3818.js +1 -1
- package/dist/4166.js +1 -1
- package/dist/4174.js +3 -3
- package/dist/4560.js +2 -2
- package/dist/{5416.js → 610.js} +4335 -410
- package/dist/{4121.js → 6968.js} +622 -13
- package/dist/7060.js +1 -1
- package/dist/{4650.js → 816.js} +12 -1
- package/dist/8715.js +1 -1
- package/dist/9333.js +17 -17
- package/dist/core.js +7 -5
- package/dist/index.js +2 -2
- package/dist/internal/features/work/editors/spreadsheet-data-validation-list.d.ts +44 -0
- package/dist/internal/features/work/editors/spreadsheet-data-validation.d.ts +2 -1
- package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +1 -1
- package/dist/internal/features/work/work-types.d.ts +4 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -309,6 +309,23 @@ and [CLI reference](./docs/latest/en/cli-reference.md).
|
|
|
309
309
|
|
|
310
310
|
## Current release
|
|
311
311
|
|
|
312
|
+
Version `0.44.0` adds dependent local dropdowns to Spreadsheet Data Validation
|
|
313
|
+
without introducing a remote service:
|
|
314
|
+
|
|
315
|
+
- **Data → Data Tools → Data Validation** accepts a bounded
|
|
316
|
+
`=INDIRECT(...)` source composed of quoted text and single-cell references.
|
|
317
|
+
Relative drivers are re-evaluated for every target cell, so a Region column
|
|
318
|
+
can drive a Regional owner list through workbook-local named ranges or
|
|
319
|
+
one-row/one-column areas.
|
|
320
|
+
- Empty drivers show an empty list. External books, whole-row/column ranges,
|
|
321
|
+
missing sheets, uncached formulas, and malformed expressions fail closed;
|
|
322
|
+
formulas stay within 255 Unicode characters and local range reads stay
|
|
323
|
+
bounded.
|
|
324
|
+
- The controlled model keeps the authored formula compact while the grid gets
|
|
325
|
+
a bounded runtime projection. Native XLSX import/export/reopen preserves the
|
|
326
|
+
list formula and names, and the public **新建 → 数据验证** template includes
|
|
327
|
+
the Region → Regional owner example.
|
|
328
|
+
|
|
312
329
|
Version `0.43.0` makes Spreadsheet formula conditional formatting a local,
|
|
313
330
|
editable workflow instead of a file-only preservation path:
|
|
314
331
|
|
|
@@ -402,7 +419,7 @@ ordered-list numbering revisions:
|
|
|
402
419
|
|
|
403
420
|
Browse the product-focused [What's new](https://a3s-lab.github.io/Office/docs/changelog.html)
|
|
404
421
|
page or the exhaustive engineering [changelog](./CHANGELOG.md). The Playground
|
|
405
|
-
exposes
|
|
422
|
+
exposes these workflows from the release-labelled template grid.
|
|
406
423
|
|
|
407
424
|
## Capabilities and boundaries
|
|
408
425
|
|
package/dist/0~1403.js
CHANGED
package/dist/0~2330.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { documentRunBorderDomAttributes, normalizeDocumentRunBorder, normalizeDocumentParagraphBorder, serializeDocumentRunBorder, serializeDocumentRunShading, documentIndexEntryHtml, attribute as work_ooxml_package_attribute, documentScriptFontFallbackSlots, documentScriptFontsDomAttributes, documentHighlightFromDocxValue, serializeDocxThemeReference, directChildren as work_ooxml_package_directChildren, documentParagraphShadingDomAttributes, documentTableOfContentsHtml, documentParagraphBordersDomAttributes, normalizeDocumentScriptFontHint, normalizeDocumentScriptFonts, DOCUMENT_PARAGRAPH_BORDER_STYLES, normalizeDocumentParagraphBorders as work_document_paragraph_borders_normalizeDocumentParagraphBorders, DOCUMENT_PARAGRAPH_BORDER_EDGES, documentScriptFontFamily, normalizeDocumentThemeFont, normalizeDocumentParagraphId, documentHighlightDomAttributes, descendants, documentIndexHtml, documentHighlightCssColor, xmlNamespacePrefix, normalizeDocumentFontName, documentProofingDomAttributes, work_document_paragraph_shading_DOCUMENT_PARAGRAPH_SHADING_PATTERNS, directChild, documentScriptFontSegments, childPath, parseDocumentTableOfContentsInstruction, documentRunShadingDomAttributes } from "./
|
|
1
|
+
import { documentRunBorderDomAttributes, normalizeDocumentRunBorder, normalizeDocumentParagraphBorder, serializeDocumentRunBorder, serializeDocumentRunShading, documentIndexEntryHtml, attribute as work_ooxml_package_attribute, documentScriptFontFallbackSlots, documentScriptFontsDomAttributes, documentHighlightFromDocxValue, serializeDocxThemeReference, directChildren as work_ooxml_package_directChildren, documentParagraphShadingDomAttributes, documentTableOfContentsHtml, documentParagraphBordersDomAttributes, normalizeDocumentScriptFontHint, normalizeDocumentScriptFonts, DOCUMENT_PARAGRAPH_BORDER_STYLES, normalizeDocumentParagraphBorders as work_document_paragraph_borders_normalizeDocumentParagraphBorders, DOCUMENT_PARAGRAPH_BORDER_EDGES, documentScriptFontFamily, normalizeDocumentThemeFont, normalizeDocumentParagraphId, documentHighlightDomAttributes, descendants, documentIndexHtml, documentHighlightCssColor, xmlNamespacePrefix, normalizeDocumentFontName, documentProofingDomAttributes, work_document_paragraph_shading_DOCUMENT_PARAGRAPH_SHADING_PATTERNS, directChild, documentScriptFontSegments, childPath, parseDocumentTableOfContentsInstruction, documentRunShadingDomAttributes } from "./6968.js";
|
|
2
2
|
import { docxThemeFont, XML_NAMESPACE as work_docx_settings_xml_XML_NAMESPACE, parseDocumentIndexEntryInstruction, resolveDocxProofing, parseDocumentIndexInstruction, DOCX_WORD_2010_NAMESPACE, XMLNS_NAMESPACE as work_docx_settings_xml_XMLNS_NAMESPACE, STRICT_WORDPROCESSING_NAMESPACE, docxCharacterSpacingTwipsFromProperties, parseBoundedDocxInteger, xmlAttributeLocalName, resolveDocxOpenTypeFeatures, docxCharacterScalePercentFromProperties, resolveDocxEmphasisMark, docxCharacterPositionHalfPointsFromProperties, docxThemeColor, parseDocxParagraphDefaultCollapsed, resolveDocxKerningThresholdHalfPoints, resolveDocxThemeResolver as work_docx_theme_resolveDocxThemeResolver, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, parseDocxTwipsMeasure } from "./0~5024.js";
|
|
3
3
|
import { normalizeDocumentEmphasisMark, normalizeDocumentPageBorders, documentCharacterPositionDomAttributes, DOCUMENT_PAGE_BORDER_EDGES, normalizeDocumentTabStops, documentTextCaseFromWordFlags, documentStrikeDomAttributes, serializeDocumentNumberingChange, numberingTypeFromFormat, normalizeDocumentUnderlineColor, documentAutoLineHeight, documentKerningDomAttributes, documentCharacterScaleDomAttributes, serializeDocumentParagraphFormatting, normalizeDocumentPaperSource, documentEquationText, documentLegacyTextEffectsDomAttributes, documentLegacyTextEffectsConflict, documentCharacterSpacingDomAttributes, normalizeDocumentParagraphIndent, normalizeDocumentEquation, documentOpenTypeDomAttributes, renderDocumentAutoLineHeight, documentUnderlineDomAttributes, MAX_DOCUMENT_NUMBERING_START, normalizeDocumentUnderlineStyle, applyDocumentTextCaseStyle, documentHiddenTextDomAttributes, importedDocumentCharacterFormatting, DOCUMENT_LEGACY_TEXT_EFFECT_NAMES, createDocumentEquationElement, normalizeDocumentPageGeometry, serializeDocumentTabStops, documentWordLineHeightFactor, documentEmphasisMarkDomAttributes, normalizeDocumentPageMargins } from "./4174.js";
|
|
4
4
|
function docxCaptionSequenceKind(instruction) {
|
package/dist/0~3539.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
|
|
4
4
|
import { showToast, createAgentProposalRequest as createWorkAgentProposalRequest } from "./6489.js";
|
|
5
5
|
import { effectiveSpreadsheetCalculationSettings, workSpreadsheetCombinationSeriesTypeLabel, workSpreadsheetChartSupportsGrouping, spreadsheetPivotIntersects, workSpreadsheetErrorBarValueTypeLabel, workSpreadsheetChartAxisTickMarkLabel, normalizeWorkSpreadsheetChartSmoothLines, spreadsheetFormulaRangesForSelection, normalizeWorkSpreadsheetChartSeriesStyle, workSpreadsheetErrorBarTypeLabel, workSpreadsheetChartAxisPositionLabel, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetChartLegendOverlay, workSpreadsheetChartSupportsTrendlines, normalizeWorkSpreadsheetChartGapWidth, workSpreadsheetChartSupportsBarSpacing, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsSmoothLines, parseSpreadsheetChartReference, workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartLegendPositionLabel, workSpreadsheetChartAxisLabelPositionLabel, normalizeWorkSpreadsheetChartAxisGroup, workSpreadsheetChartAxisDefaultLabelPosition, workSpreadsheetChartGroupingLabel, workSpreadsheetDataLabelPositionLabel, workSpreadsheetChartSupportsSeriesAnalysis, defaultWorkSpreadsheetChartSeriesStyle, spreadsheetPivotAggregationLabel, resolveSpreadsheetChart, spreadsheetPivotFields, parseSpreadsheetCellRanges, normalizeWorkSpreadsheetChartAxes, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartUsesNumericXAxis, normalizeWorkSpreadsheetChartLegendPosition, workSpreadsheetChartTypeLabel, workSpreadsheetTrendlineTypeLabel, normalizeWorkSpreadsheetTrendline, normalizeWorkSpreadsheetCombinationSeriesType, spreadsheetChartSeriesStyleContext, normalizeWorkSpreadsheetDataLabels } from "./8715.js";
|
|
6
6
|
import { presentationChartLegendPositionLabel, presentationChartShowsLegend, normalizePresentationChartLegendPosition, presentationChartUsesNumericXAxis, normalizePresentationBubbleSizeRepresents, normalizePresentationBubbleScale, presentationChartAxes, normalizePresentationChartDataLabels, presentationChartTypeLabel, presentationChartDataLabelPositionLabel, normalizePresentationScatterStyle } from "./0~work-presentation-charts.js";
|
|
7
|
-
import { OfficeCheckbox, CommittedOfficeNumberField, CollectionState } from "./0~
|
|
8
|
-
import { OfficeColorPicker } from "./0~
|
|
7
|
+
import { OfficeCheckbox, CommittedOfficeNumberField, CollectionState } from "./0~7831.js";
|
|
8
|
+
import { OfficeColorPicker } from "./0~office-color-picker.js";
|
|
9
9
|
import { OfficeSelect } from "./0~9073.js";
|
|
10
10
|
import { office_text_field_OfficeTextField, CommittedOfficeTextField } from "./0~8136.js";
|
|
11
11
|
function spreadsheetAgentMenuItems(selection, onAgentRequest, applyProposal) {
|
package/dist/0~3557.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
|
|
2
|
-
import { isOfficeCompositionKeyboardEvent } from "./
|
|
2
|
+
import { isOfficeCompositionKeyboardEvent } from "./816.js";
|
|
3
3
|
import { matchesOfficeEditorKeyboardShortcut } from "./0~8136.js";
|
|
4
4
|
const DEFAULT_EXTENSION_PRIORITY = 100;
|
|
5
5
|
function createOfficeEditorExtension(config) {
|
package/dist/0~4980.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import jszip from "jszip";
|
|
2
2
|
import { documentNoteKey } from "./4174.js";
|
|
3
|
-
import { directChild, xmlNamespacePrefix, attribute, parseXml } from "./
|
|
3
|
+
import { directChild, xmlNamespacePrefix, attribute, parseXml } from "./6968.js";
|
|
4
4
|
import { DEFAULT_DOCUMENT_PAGE_COLOR, normalizeDocumentPageColor } from "./0~work-document-page-color.js";
|
|
5
5
|
const MAX_NATIVE_ID = 2147483647;
|
|
6
6
|
const MIN_NATIVE_COMMENT_ID = -2147483648;
|
package/dist/0~5024.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import jszip from "jszip";
|
|
2
|
-
import { normalizeDocumentIndexEntryDraft, serializeUtf8Xml, directChildren, xmlNamespacePrefix, normalizeDocumentLanguageTag, parseXml, firstDescendant, decodeXmlBytes, directChild, descendants, normalizeDocumentProofingLanguages, attribute as work_ooxml_package_attribute, normalizeDocumentIndexOptions } from "./
|
|
2
|
+
import { normalizeDocumentIndexEntryDraft, serializeUtf8Xml, directChildren, xmlNamespacePrefix, normalizeDocumentLanguageTag, parseXml, firstDescendant, decodeXmlBytes, directChild, descendants, normalizeDocumentProofingLanguages, attribute as work_ooxml_package_attribute, normalizeDocumentIndexOptions } from "./6968.js";
|
|
3
3
|
import { normalizeDocumentEmphasisMark, normalizeDocumentCharacterScalePercent, documentCitationStyle, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentCharacterPositionHalfPoints, normalizeDocumentCharacterSpacingTwips, normalizeDocumentOpenTypeNumberSpacing, createDocumentBibliography, normalizeDocumentOpenTypeNumberForm, normalizeDocumentOpenTypeLigatures, normalizeDocumentTabStops, documentCitationStyleDetails, normalizeDocumentOpenTypeStylisticSets } from "./4174.js";
|
|
4
4
|
const BIBLIOGRAPHY_NAMESPACE = 'http://schemas.openxmlformats.org/officeDocument/2006/bibliography';
|
|
5
5
|
const CUSTOM_XML_NAMESPACE = 'http://schemas.openxmlformats.org/officeDocument/2006/customXml';
|
package/dist/0~7828.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import jszip from "jszip";
|
|
2
|
-
import { directChildren, xmlNamespacePrefix, parseXml, firstDescendant, descendants, directChild, attribute, createOfficeId as createWorkId } from "./
|
|
2
|
+
import { directChildren, xmlNamespacePrefix, parseXml, firstDescendant, descendants, directChild, attribute, createOfficeId as createWorkId } from "./6968.js";
|
|
3
3
|
import { normalizePresentationChartDataLabelPosition, normalizePresentationChartDataLabels, normalizePresentationChartSeriesStyle } from "./0~work-presentation-charts.js";
|
|
4
4
|
import { parseXlsxChartSeriesStyle, xlsxChartSeriesMarkerXml, parseXlsxTrendline, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, isSupportedXlsxChartSeriesFormatting, parseXlsxChartPlotLayout, parseXlsxChartLegend, xlsxChartSeriesShapePropertiesXml, parseXlsxErrorBars } from "./4166.js";
|
|
5
5
|
import { workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsGrouping, normalizeWorkSpreadsheetChartSmoothLines, workSpreadsheetChartSupportsSeriesAnalysis, normalizeWorkSpreadsheetChartSeriesStyle, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetChartSupportsBarSpacing, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsTrendlines, workSpreadsheetChartSupportsSmoothLines, normalizeWorkSpreadsheetTrendline } from "./8715.js";
|
|
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
3
|
import { Check, ChevronDown, ChevronUp, Minus } from "lucide-react";
|
|
4
4
|
import { button_Button, office_text_field_OfficeTextArea, office_text_field_OfficeTextField, Dialog } from "./0~8136.js";
|
|
5
|
-
import { OFFICE_KERNEL_SPREADSHEET_MAX_ROWS as office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS,
|
|
5
|
+
import { isOfficeKernelSpreadsheetError, browserScalarFunctionArities, evaluateParserSubtotal, OFFICE_KERNEL_SPREADSHEET_MAX_ROWS as office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS, normalizeSpreadsheetFunctionName, normalizeFormulaForFortuneParser } from "./6968.js";
|
|
6
6
|
function CollectionState({ children, icon, actions, tone = 'neutral', role, className = '' }) {
|
|
7
7
|
return /*#__PURE__*/ jsxs("div", {
|
|
8
8
|
className: `ds-collection-state ${tone}${className ? ` ${className}` : ''}`,
|
|
@@ -467,215 +467,6 @@ function OfficeCheckbox({ ariaLabel, checked, onCheckedChange, children, disable
|
|
|
467
467
|
]
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
const officeFontFamilies = [
|
|
471
|
-
{
|
|
472
|
-
id: 'microsoft-yahei',
|
|
473
|
-
name: 'Microsoft YaHei',
|
|
474
|
-
cssValue: '"Microsoft YaHei"',
|
|
475
|
-
cssFamily: '"Microsoft YaHei", "PingFang SC", sans-serif',
|
|
476
|
-
label: '微软雅黑',
|
|
477
|
-
group: '中文字体'
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
id: 'pingfang-sc',
|
|
481
|
-
name: 'PingFang SC',
|
|
482
|
-
cssValue: '"PingFang SC"',
|
|
483
|
-
cssFamily: '"PingFang SC", "Microsoft YaHei", sans-serif',
|
|
484
|
-
label: '苹方',
|
|
485
|
-
group: '中文字体'
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
id: 'simsun',
|
|
489
|
-
name: 'SimSun',
|
|
490
|
-
cssValue: 'SimSun',
|
|
491
|
-
cssFamily: 'SimSun, "Songti SC", serif',
|
|
492
|
-
label: '宋体',
|
|
493
|
-
group: '中文字体'
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
id: 'stsong',
|
|
497
|
-
name: 'STSong',
|
|
498
|
-
cssValue: 'STSong',
|
|
499
|
-
cssFamily: 'STSong, "Songti SC", SimSun, serif',
|
|
500
|
-
label: '华文宋体',
|
|
501
|
-
group: '中文字体'
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
id: 'simhei',
|
|
505
|
-
name: 'SimHei',
|
|
506
|
-
cssValue: 'SimHei',
|
|
507
|
-
cssFamily: 'SimHei, "Heiti SC", sans-serif',
|
|
508
|
-
label: '黑体',
|
|
509
|
-
group: '中文字体'
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
id: 'stheiti',
|
|
513
|
-
name: 'STHeiti',
|
|
514
|
-
cssValue: 'STHeiti',
|
|
515
|
-
cssFamily: 'STHeiti, "Heiti SC", SimHei, sans-serif',
|
|
516
|
-
label: '华文黑体',
|
|
517
|
-
group: '中文字体'
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
id: 'kaiti',
|
|
521
|
-
name: 'KaiTi',
|
|
522
|
-
cssValue: 'KaiTi',
|
|
523
|
-
cssFamily: 'KaiTi, "Kaiti SC", serif',
|
|
524
|
-
label: '楷体',
|
|
525
|
-
group: '中文字体'
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
id: 'fangsong',
|
|
529
|
-
name: 'FangSong',
|
|
530
|
-
cssValue: 'FangSong',
|
|
531
|
-
cssFamily: 'FangSong, STFangsong, serif',
|
|
532
|
-
label: '仿宋',
|
|
533
|
-
group: '中文字体'
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
id: 'hiragino-sans-gb',
|
|
537
|
-
name: 'Hiragino Sans GB',
|
|
538
|
-
cssValue: '"Hiragino Sans GB"',
|
|
539
|
-
cssFamily: '"Hiragino Sans GB", "PingFang SC", sans-serif',
|
|
540
|
-
label: '冬青黑体',
|
|
541
|
-
group: '中文字体'
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
id: 'aptos',
|
|
545
|
-
name: 'Aptos',
|
|
546
|
-
cssValue: 'Aptos',
|
|
547
|
-
cssFamily: 'Aptos, sans-serif',
|
|
548
|
-
label: 'Aptos',
|
|
549
|
-
group: '西文字体'
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
id: 'calibri',
|
|
553
|
-
name: 'Calibri',
|
|
554
|
-
cssValue: 'Calibri',
|
|
555
|
-
cssFamily: 'Calibri',
|
|
556
|
-
label: 'Calibri',
|
|
557
|
-
group: '西文字体'
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
id: 'arial',
|
|
561
|
-
name: 'Arial',
|
|
562
|
-
cssValue: 'Arial',
|
|
563
|
-
cssFamily: 'Arial, sans-serif',
|
|
564
|
-
label: 'Arial',
|
|
565
|
-
group: '西文字体'
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
id: 'helvetica',
|
|
569
|
-
name: 'Helvetica',
|
|
570
|
-
cssValue: 'Helvetica',
|
|
571
|
-
cssFamily: 'Helvetica, Arial, sans-serif',
|
|
572
|
-
label: 'Helvetica',
|
|
573
|
-
group: '西文字体'
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
id: 'times-new-roman',
|
|
577
|
-
name: 'Times New Roman',
|
|
578
|
-
cssValue: '"Times New Roman"',
|
|
579
|
-
cssFamily: '"Times New Roman", Times, serif',
|
|
580
|
-
label: 'Times New Roman',
|
|
581
|
-
group: '西文字体'
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
id: 'georgia',
|
|
585
|
-
name: 'Georgia',
|
|
586
|
-
cssValue: 'Georgia',
|
|
587
|
-
cssFamily: 'Georgia, "Times New Roman", serif',
|
|
588
|
-
label: 'Georgia',
|
|
589
|
-
group: '西文字体'
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
id: 'cambria',
|
|
593
|
-
name: 'Cambria',
|
|
594
|
-
cssValue: 'Cambria',
|
|
595
|
-
cssFamily: 'Cambria, Georgia, serif',
|
|
596
|
-
label: 'Cambria',
|
|
597
|
-
group: '西文字体'
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
id: 'garamond',
|
|
601
|
-
name: 'Garamond',
|
|
602
|
-
cssValue: 'Garamond',
|
|
603
|
-
cssFamily: 'Garamond, Georgia, serif',
|
|
604
|
-
label: 'Garamond',
|
|
605
|
-
group: '西文字体'
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
id: 'verdana',
|
|
609
|
-
name: 'Verdana',
|
|
610
|
-
cssValue: 'Verdana',
|
|
611
|
-
cssFamily: 'Verdana, Arial, sans-serif',
|
|
612
|
-
label: 'Verdana',
|
|
613
|
-
group: '西文字体'
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
id: 'tahoma',
|
|
617
|
-
name: 'Tahoma',
|
|
618
|
-
cssValue: 'Tahoma',
|
|
619
|
-
cssFamily: 'Tahoma, Verdana, sans-serif',
|
|
620
|
-
label: 'Tahoma',
|
|
621
|
-
group: '西文字体'
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
id: 'trebuchet-ms',
|
|
625
|
-
name: 'Trebuchet MS',
|
|
626
|
-
cssValue: '"Trebuchet MS"',
|
|
627
|
-
cssFamily: '"Trebuchet MS", Arial, sans-serif',
|
|
628
|
-
label: 'Trebuchet MS',
|
|
629
|
-
group: '西文字体'
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
id: 'sf-mono',
|
|
633
|
-
name: 'SFMono-Regular',
|
|
634
|
-
cssValue: 'SFMono-Regular',
|
|
635
|
-
cssFamily: 'SFMono-Regular, Menlo, Consolas, monospace',
|
|
636
|
-
label: 'SF Mono',
|
|
637
|
-
group: '等宽字体'
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
id: 'menlo',
|
|
641
|
-
name: 'Menlo',
|
|
642
|
-
cssValue: 'Menlo',
|
|
643
|
-
cssFamily: 'Menlo, SFMono-Regular, Consolas, monospace',
|
|
644
|
-
label: 'Menlo',
|
|
645
|
-
group: '等宽字体'
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
id: 'consolas',
|
|
649
|
-
name: 'Consolas',
|
|
650
|
-
cssValue: 'Consolas',
|
|
651
|
-
cssFamily: 'Consolas, "Courier New", monospace',
|
|
652
|
-
label: 'Consolas',
|
|
653
|
-
group: '等宽字体'
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
id: 'courier-new',
|
|
657
|
-
name: 'Courier New',
|
|
658
|
-
cssValue: '"Courier New"',
|
|
659
|
-
cssFamily: '"Courier New", Courier, monospace',
|
|
660
|
-
label: 'Courier New',
|
|
661
|
-
group: '等宽字体'
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
id: 'monaco',
|
|
665
|
-
name: 'Monaco',
|
|
666
|
-
cssValue: 'Monaco',
|
|
667
|
-
cssFamily: 'Monaco, Menlo, Consolas, monospace',
|
|
668
|
-
label: 'Monaco',
|
|
669
|
-
group: '等宽字体'
|
|
670
|
-
}
|
|
671
|
-
];
|
|
672
|
-
function officeFontFamilyLabel(value) {
|
|
673
|
-
const firstFamily = value.split(',')[0]?.trim() || value.trim();
|
|
674
|
-
return firstFamily.replace(/^(['"])(.*)\1$/, '$2');
|
|
675
|
-
}
|
|
676
|
-
function normalizeOfficeFontFamily(value) {
|
|
677
|
-
return officeFontFamilyLabel(value).toLocaleLowerCase();
|
|
678
|
-
}
|
|
679
470
|
const MAX_LAYOUT_BLOCKS = 200000;
|
|
680
471
|
const MAX_LAYOUT_PAGE_STYLES = 10000;
|
|
681
472
|
const MAX_LAYOUT_EXTENT = 1000000;
|
|
@@ -1197,342 +988,6 @@ function office_kernel_presentation_fallback_kernelError(code, message) {
|
|
|
1197
988
|
code
|
|
1198
989
|
});
|
|
1199
990
|
}
|
|
1200
|
-
const browserScalarFunctionArities = new Map([
|
|
1201
|
-
[
|
|
1202
|
-
'ABS',
|
|
1203
|
-
[
|
|
1204
|
-
1,
|
|
1205
|
-
1
|
|
1206
|
-
]
|
|
1207
|
-
],
|
|
1208
|
-
[
|
|
1209
|
-
'AND',
|
|
1210
|
-
[
|
|
1211
|
-
1,
|
|
1212
|
-
255
|
|
1213
|
-
]
|
|
1214
|
-
],
|
|
1215
|
-
[
|
|
1216
|
-
'AVERAGE',
|
|
1217
|
-
[
|
|
1218
|
-
1,
|
|
1219
|
-
255
|
|
1220
|
-
]
|
|
1221
|
-
],
|
|
1222
|
-
[
|
|
1223
|
-
'COLUMN',
|
|
1224
|
-
[
|
|
1225
|
-
0,
|
|
1226
|
-
0
|
|
1227
|
-
]
|
|
1228
|
-
],
|
|
1229
|
-
[
|
|
1230
|
-
'CONCAT',
|
|
1231
|
-
[
|
|
1232
|
-
1,
|
|
1233
|
-
255
|
|
1234
|
-
]
|
|
1235
|
-
],
|
|
1236
|
-
[
|
|
1237
|
-
'CONCATENATE',
|
|
1238
|
-
[
|
|
1239
|
-
1,
|
|
1240
|
-
255
|
|
1241
|
-
]
|
|
1242
|
-
],
|
|
1243
|
-
[
|
|
1244
|
-
'COUNT',
|
|
1245
|
-
[
|
|
1246
|
-
1,
|
|
1247
|
-
255
|
|
1248
|
-
]
|
|
1249
|
-
],
|
|
1250
|
-
[
|
|
1251
|
-
'COUNTA',
|
|
1252
|
-
[
|
|
1253
|
-
1,
|
|
1254
|
-
255
|
|
1255
|
-
]
|
|
1256
|
-
],
|
|
1257
|
-
[
|
|
1258
|
-
'FALSE',
|
|
1259
|
-
[
|
|
1260
|
-
0,
|
|
1261
|
-
0
|
|
1262
|
-
]
|
|
1263
|
-
],
|
|
1264
|
-
[
|
|
1265
|
-
'IF',
|
|
1266
|
-
[
|
|
1267
|
-
2,
|
|
1268
|
-
3
|
|
1269
|
-
]
|
|
1270
|
-
],
|
|
1271
|
-
[
|
|
1272
|
-
'IFERROR',
|
|
1273
|
-
[
|
|
1274
|
-
2,
|
|
1275
|
-
2
|
|
1276
|
-
]
|
|
1277
|
-
],
|
|
1278
|
-
[
|
|
1279
|
-
'MAX',
|
|
1280
|
-
[
|
|
1281
|
-
1,
|
|
1282
|
-
255
|
|
1283
|
-
]
|
|
1284
|
-
],
|
|
1285
|
-
[
|
|
1286
|
-
'MIN',
|
|
1287
|
-
[
|
|
1288
|
-
1,
|
|
1289
|
-
255
|
|
1290
|
-
]
|
|
1291
|
-
],
|
|
1292
|
-
[
|
|
1293
|
-
'MOD',
|
|
1294
|
-
[
|
|
1295
|
-
2,
|
|
1296
|
-
2
|
|
1297
|
-
]
|
|
1298
|
-
],
|
|
1299
|
-
[
|
|
1300
|
-
'NA',
|
|
1301
|
-
[
|
|
1302
|
-
0,
|
|
1303
|
-
0
|
|
1304
|
-
]
|
|
1305
|
-
],
|
|
1306
|
-
[
|
|
1307
|
-
'NOT',
|
|
1308
|
-
[
|
|
1309
|
-
1,
|
|
1310
|
-
1
|
|
1311
|
-
]
|
|
1312
|
-
],
|
|
1313
|
-
[
|
|
1314
|
-
'OR',
|
|
1315
|
-
[
|
|
1316
|
-
1,
|
|
1317
|
-
255
|
|
1318
|
-
]
|
|
1319
|
-
],
|
|
1320
|
-
[
|
|
1321
|
-
'PI',
|
|
1322
|
-
[
|
|
1323
|
-
0,
|
|
1324
|
-
0
|
|
1325
|
-
]
|
|
1326
|
-
],
|
|
1327
|
-
[
|
|
1328
|
-
'POWER',
|
|
1329
|
-
[
|
|
1330
|
-
2,
|
|
1331
|
-
2
|
|
1332
|
-
]
|
|
1333
|
-
],
|
|
1334
|
-
[
|
|
1335
|
-
'ROUND',
|
|
1336
|
-
[
|
|
1337
|
-
2,
|
|
1338
|
-
2
|
|
1339
|
-
]
|
|
1340
|
-
],
|
|
1341
|
-
[
|
|
1342
|
-
'ROW',
|
|
1343
|
-
[
|
|
1344
|
-
0,
|
|
1345
|
-
0
|
|
1346
|
-
]
|
|
1347
|
-
],
|
|
1348
|
-
[
|
|
1349
|
-
'SQRT',
|
|
1350
|
-
[
|
|
1351
|
-
1,
|
|
1352
|
-
1
|
|
1353
|
-
]
|
|
1354
|
-
],
|
|
1355
|
-
[
|
|
1356
|
-
'SUBTOTAL',
|
|
1357
|
-
[
|
|
1358
|
-
2,
|
|
1359
|
-
255
|
|
1360
|
-
]
|
|
1361
|
-
],
|
|
1362
|
-
[
|
|
1363
|
-
'SUM',
|
|
1364
|
-
[
|
|
1365
|
-
1,
|
|
1366
|
-
255
|
|
1367
|
-
]
|
|
1368
|
-
],
|
|
1369
|
-
[
|
|
1370
|
-
'TRUE',
|
|
1371
|
-
[
|
|
1372
|
-
0,
|
|
1373
|
-
0
|
|
1374
|
-
]
|
|
1375
|
-
]
|
|
1376
|
-
]);
|
|
1377
|
-
function normalizeSpreadsheetFunctionName(name) {
|
|
1378
|
-
let normalized = name.toUpperCase();
|
|
1379
|
-
while(normalized.startsWith('_XLFN.') || normalized.startsWith('_XLWS.'))normalized = normalized.slice(6);
|
|
1380
|
-
return normalized;
|
|
1381
|
-
}
|
|
1382
|
-
function evaluateParserSubtotal(parameters) {
|
|
1383
|
-
const codeValue = parserNumericValue(parameters[0]);
|
|
1384
|
-
if (void 0 === codeValue) return 'VALUE!';
|
|
1385
|
-
const code = Math.trunc(codeValue);
|
|
1386
|
-
const values = parameters.slice(1).flatMap((parameter)=>flattenParserValues(parameter));
|
|
1387
|
-
for (const value of values){
|
|
1388
|
-
const error = parserErrorValue(value);
|
|
1389
|
-
if (error) return error;
|
|
1390
|
-
}
|
|
1391
|
-
switch(code){
|
|
1392
|
-
case 1:
|
|
1393
|
-
case 101:
|
|
1394
|
-
return parserSubtotalNumeric(values, 'average');
|
|
1395
|
-
case 2:
|
|
1396
|
-
case 102:
|
|
1397
|
-
return values.filter((value)=>'number' == typeof value).length;
|
|
1398
|
-
case 3:
|
|
1399
|
-
case 103:
|
|
1400
|
-
return values.filter((value)=>null != value).length;
|
|
1401
|
-
case 4:
|
|
1402
|
-
case 104:
|
|
1403
|
-
return parserSubtotalNumeric(values, 'max');
|
|
1404
|
-
case 5:
|
|
1405
|
-
case 105:
|
|
1406
|
-
return parserSubtotalNumeric(values, 'min');
|
|
1407
|
-
case 6:
|
|
1408
|
-
case 106:
|
|
1409
|
-
return parserSubtotalNumeric(values, 'product');
|
|
1410
|
-
case 7:
|
|
1411
|
-
case 107:
|
|
1412
|
-
return parserSubtotalNumeric(values, 'stddev');
|
|
1413
|
-
case 8:
|
|
1414
|
-
case 108:
|
|
1415
|
-
return parserSubtotalNumeric(values, 'stddevp');
|
|
1416
|
-
case 9:
|
|
1417
|
-
case 109:
|
|
1418
|
-
return parserSubtotalNumeric(values, 'sum');
|
|
1419
|
-
case 10:
|
|
1420
|
-
case 110:
|
|
1421
|
-
return parserSubtotalNumeric(values, 'var');
|
|
1422
|
-
case 11:
|
|
1423
|
-
case 111:
|
|
1424
|
-
return parserSubtotalNumeric(values, 'varp');
|
|
1425
|
-
default:
|
|
1426
|
-
return 'VALUE!';
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
function parserSubtotalNumeric(values, operation) {
|
|
1430
|
-
const numbers = values.filter((value)=>'number' == typeof value && Number.isFinite(value));
|
|
1431
|
-
const count = numbers.length;
|
|
1432
|
-
const sum = numbers.reduce((total, value)=>total + value, 0);
|
|
1433
|
-
if ('sum' === operation) return finiteParserNumber(sum);
|
|
1434
|
-
if ('average' === operation) return count ? finiteParserNumber(sum / count) : 'DIV/0!';
|
|
1435
|
-
if ('max' === operation) return finiteParserNumber(Math.max(...numbers, 0));
|
|
1436
|
-
if ('min' === operation) return finiteParserNumber(Math.min(...numbers, 0));
|
|
1437
|
-
if ('product' === operation) return finiteParserNumber(count ? numbers.reduce((total, value)=>total * value, 1) : 0);
|
|
1438
|
-
if ('stddev' === operation || 'var' === operation) {
|
|
1439
|
-
if (count < 2) return 'DIV/0!';
|
|
1440
|
-
} else if (0 === count) return 'DIV/0!';
|
|
1441
|
-
const mean = sum / count;
|
|
1442
|
-
const divisor = 'stddev' === operation || 'var' === operation ? count - 1 : count;
|
|
1443
|
-
const variance = numbers.reduce((total, value)=>total + (value - mean) ** 2, 0) / divisor;
|
|
1444
|
-
return finiteParserNumber('stddev' === operation || 'stddevp' === operation ? Math.sqrt(variance) : variance);
|
|
1445
|
-
}
|
|
1446
|
-
function flattenParserValues(value) {
|
|
1447
|
-
if (!Array.isArray(value)) return [
|
|
1448
|
-
value
|
|
1449
|
-
];
|
|
1450
|
-
return value.flatMap((entry)=>flattenParserValues(entry));
|
|
1451
|
-
}
|
|
1452
|
-
function parserNumericValue(value) {
|
|
1453
|
-
if ('number' == typeof value) return Number.isFinite(value) ? value : void 0;
|
|
1454
|
-
if ('boolean' == typeof value) return value ? 1 : 0;
|
|
1455
|
-
if ('string' != typeof value || !value.trim()) return;
|
|
1456
|
-
const parsed = Number(value);
|
|
1457
|
-
return Number.isFinite(parsed) ? parsed : void 0;
|
|
1458
|
-
}
|
|
1459
|
-
function parserErrorValue(value) {
|
|
1460
|
-
if (value instanceof Error) return value.message.startsWith('#') ? value.message.slice(1) : 'VALUE!';
|
|
1461
|
-
return 'string' == typeof value && value.startsWith('#') ? value.slice(1) : void 0;
|
|
1462
|
-
}
|
|
1463
|
-
function finiteParserNumber(value) {
|
|
1464
|
-
return Number.isFinite(value) ? value : 'NUM!';
|
|
1465
|
-
}
|
|
1466
|
-
function normalizeFormulaForFortuneParser(formula) {
|
|
1467
|
-
const source = formula.replace(/^=/, '');
|
|
1468
|
-
let output = '';
|
|
1469
|
-
let cursor = 0;
|
|
1470
|
-
let bracketDepth = 0;
|
|
1471
|
-
while(cursor < source.length){
|
|
1472
|
-
const character = source[cursor] ?? '';
|
|
1473
|
-
if ('"' === character || "'" === character) {
|
|
1474
|
-
const quote = character;
|
|
1475
|
-
output += quote;
|
|
1476
|
-
cursor += 1;
|
|
1477
|
-
while(cursor < source.length){
|
|
1478
|
-
const quoted = source[cursor] ?? '';
|
|
1479
|
-
output += quoted;
|
|
1480
|
-
cursor += 1;
|
|
1481
|
-
if (quoted !== quote) continue;
|
|
1482
|
-
if (source[cursor] === quote) {
|
|
1483
|
-
output += quote;
|
|
1484
|
-
cursor += 1;
|
|
1485
|
-
continue;
|
|
1486
|
-
}
|
|
1487
|
-
break;
|
|
1488
|
-
}
|
|
1489
|
-
continue;
|
|
1490
|
-
}
|
|
1491
|
-
if ('[' === character) {
|
|
1492
|
-
bracketDepth += 1;
|
|
1493
|
-
output += character;
|
|
1494
|
-
cursor += 1;
|
|
1495
|
-
continue;
|
|
1496
|
-
}
|
|
1497
|
-
if (']' === character && bracketDepth > 0) {
|
|
1498
|
-
bracketDepth -= 1;
|
|
1499
|
-
output += character;
|
|
1500
|
-
cursor += 1;
|
|
1501
|
-
continue;
|
|
1502
|
-
}
|
|
1503
|
-
if (0 === bracketDepth && isAsciiFormulaNameStart(character)) {
|
|
1504
|
-
const start = cursor;
|
|
1505
|
-
cursor += 1;
|
|
1506
|
-
while(cursor < source.length && isAsciiFormulaNameContinue(source[cursor] ?? ''))cursor += 1;
|
|
1507
|
-
const token = source.slice(start, cursor);
|
|
1508
|
-
const normalized = token.toUpperCase();
|
|
1509
|
-
const normalizedFunction = normalizeSpreadsheetFunctionName(token);
|
|
1510
|
-
const previous = adjacentNonWhitespace(source, start - 1, -1);
|
|
1511
|
-
const next = adjacentNonWhitespace(source, cursor, 1);
|
|
1512
|
-
if ('(' === next && normalizedFunction !== normalized) output += normalizedFunction;
|
|
1513
|
-
else if (('TRUE' === normalized || 'FALSE' === normalized) && '!' !== previous && '!' !== next && '(' !== next) output += `${token}()`;
|
|
1514
|
-
else output += token;
|
|
1515
|
-
continue;
|
|
1516
|
-
}
|
|
1517
|
-
output += character;
|
|
1518
|
-
cursor += 1;
|
|
1519
|
-
}
|
|
1520
|
-
return output;
|
|
1521
|
-
}
|
|
1522
|
-
function adjacentNonWhitespace(value, start, direction) {
|
|
1523
|
-
let cursor = start;
|
|
1524
|
-
while(cursor >= 0 && cursor < value.length){
|
|
1525
|
-
const character = value[cursor];
|
|
1526
|
-
if (character && !/\s/u.test(character)) return character;
|
|
1527
|
-
cursor += direction;
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
function isAsciiFormulaNameStart(value) {
|
|
1531
|
-
return /[A-Za-z_]/u.test(value);
|
|
1532
|
-
}
|
|
1533
|
-
function isAsciiFormulaNameContinue(value) {
|
|
1534
|
-
return /[A-Za-z0-9_.]/u.test(value);
|
|
1535
|
-
}
|
|
1536
991
|
const MAX_SPREADSHEET_INPUT_CELLS = 100000;
|
|
1537
992
|
const MAX_SPREADSHEET_FORMULA_CHARACTERS = 8192;
|
|
1538
993
|
const MAX_SPREADSHEET_SHEETS = 1024;
|
|
@@ -2733,4 +2188,4 @@ function abortError() {
|
|
|
2733
2188
|
function disposedError() {
|
|
2734
2189
|
return new Error('Office kernel client is disposed.');
|
|
2735
2190
|
}
|
|
2736
|
-
export { CollectionState, CommittedOfficeNumberField, OfficeCheckbox, OfficeNumberField, createOfficeKernelClient, handleOfficeTaskPaneKeyDown,
|
|
2191
|
+
export { CollectionState, CommittedOfficeNumberField, OfficeCheckbox, OfficeNumberField, createOfficeKernelClient, handleOfficeTaskPaneKeyDown, useOfficeDialog, useOfficeTaskPaneEscape, useOfficeTaskPaneModal };
|