@a3s-lab/office 0.29.0 → 0.30.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 +100 -3
- package/dist/{0~7043.js → 0~7231.js} +160 -2
- package/dist/{0~5093.js → 0~7360.js} +233 -52
- package/dist/0~document-editor.js +1159 -149
- package/dist/0~spreadsheet-editor.js +183 -34
- package/dist/0~work-docx-export.js +299 -11
- package/dist/0~work-docx-import.js +30 -7
- package/dist/0~work-office-diagnostics.js +125 -5
- package/dist/1544.js +13 -1
- package/dist/4104.js +29 -6
- package/dist/4121.js +1939 -1
- package/dist/6282.js +501 -1006
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +18 -0
- package/dist/internal/features/work/editors/document-font-dialog-model.d.ts +5 -2
- package/dist/internal/features/work/editors/document-font-dialog-run-shading-model.d.ts +23 -0
- package/dist/internal/features/work/editors/document-font-dialog-run-shading-section.d.ts +8 -0
- package/dist/internal/features/work/editors/document-page-chrome-ribbon.d.ts +2 -1
- package/dist/internal/features/work/editors/document-proofing-dialog-model.d.ts +22 -0
- package/dist/internal/features/work/editors/document-proofing-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/document-table-of-contents-dialog.d.ts +10 -0
- package/dist/internal/features/work/editors/document-toolbar.d.ts +3 -1
- package/dist/internal/features/work/editors/spreadsheet-data-validation.d.ts +7 -1
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +2 -0
- package/dist/internal/features/work/work-document-character-formatting.d.ts +8 -0
- package/dist/internal/features/work/work-document-format-changes.d.ts +6 -0
- package/dist/internal/features/work/work-document-highlight.d.ts +9 -0
- package/dist/internal/features/work/work-document-outline.d.ts +1 -0
- package/dist/internal/features/work/work-document-paragraph-shading.d.ts +6 -0
- package/dist/internal/features/work/work-document-proofing.d.ts +19 -0
- package/dist/internal/features/work/work-document-run-shading.d.ts +12 -0
- package/dist/internal/features/work/work-document-table-of-contents-node.d.ts +18 -0
- package/dist/internal/features/work/work-document-table-of-contents.d.ts +51 -0
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +1 -1
- package/dist/internal/features/work/work-docx-import.d.ts +3 -1
- package/dist/internal/features/work/work-docx-proofing-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-proofing.d.ts +38 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +7 -0
- package/dist/internal/features/work/work-docx-run-shading-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-run-shading-export.d.ts +17 -0
- package/dist/internal/features/work/work-docx-run-shading.d.ts +20 -0
- package/dist/internal/features/work/work-docx-table-of-contents-export.d.ts +11 -0
- package/dist/internal/features/work/work-docx-table-of-contents-import.d.ts +15 -0
- package/dist/internal/features/work/work-spreadsheet-data-validation.d.ts +7 -0
- package/dist/internal/features/work/work-types.d.ts +9 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +1 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +311 -4
- package/docs/latest/en/browser-editor-architecture.md +50 -1
- package/package.json +12 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
2
2
|
import { contentTypeForPart, directChildren, OoxmlPackage, parseXml, firstDescendant, isDocumentParagraphArtBorderStyle, descendants, directChild, xmlContainsAnyElement, attribute, documentRunBorderIsVisible } from "./4121.js";
|
|
3
3
|
import { normalizeDocumentBookmarkName, docxBookmarkReferenceTarget, normalizeDocumentBookmarkNativeId, DOCUMENT_LEGACY_TEXT_EFFECT_NAMES, supportedDocxBookmarkReferenceInstruction, documentCitationTagsFromInstruction, docxDocumentFieldKind } from "./6282.js";
|
|
4
|
-
import { markDocxParagraphShading, inspectDocxPageSize, docxCaptionBookmark, hasInvalidDocxFieldStructure, inspectDocxLegacyTextEffects, inspectDocxPageMargins, inspectDocxPaperSource, createDocxParagraphStyleResolver,
|
|
4
|
+
import { markDocxParagraphShading, inspectDocxPageSize, docxCaptionBookmark, hasInvalidDocxFieldStructure, inspectDocxLegacyTextEffects, inspectDocxPageMargins, inspectDocxPaperSource, createDocxParagraphStyleResolver, supportedDocxTableOfContentsField, docxFieldOccurrences, createDocxTableStyleResolver, inspectDocxRunFonts, inspectDocxEquation, inspectDocxPageMarginSettings, inspectDocxRunBorder, inspectDocxRunShading, markDocxParagraphBorders, isSupportedDocxParagraphFormattingChange, docxFieldOccurrenceIsInlineEditable, inspectDocxHiddenText, docxCaptionSequenceKind, inspectDocxPageBorders, isSupportedDocxRunFormattingChange, docxFieldInstructions, isSupportedDocxEquationPlacement } from "./0~7360.js";
|
|
5
5
|
import { normalizeDocumentHref } from "./0~work-document-links.js";
|
|
6
|
-
import { xmlAttributeLocalName, readDocxBibliography, inspectDocxEmphasisMark, createDocxThemeResolver, parseDocxParagraphDefaultCollapsed, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, inspectDocxKerningThresholdHalfPoints } from "./0~
|
|
6
|
+
import { xmlAttributeLocalName, inspectDocxProofingLanguages, readDocxBibliography, inspectDocxEmphasisMark, createDocxThemeResolver, inspectDocxNoProof, parseDocxParagraphDefaultCollapsed, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, inspectDocxKerningThresholdHalfPoints } from "./0~7231.js";
|
|
7
7
|
import { updateSpreadsheetWorksheetCompatibilitySummary, inspectXlsxPivotTables, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, xlsxChartNodeUsesStackedGrouping, isSupportedXlsxChartSeriesFormatting, readXlsxFormulaFeaturesFromPackage, inspectXlsxHeaderFooterText, emptySpreadsheetWorksheetCompatibilitySummary, isSupportedXlsxWorksheetImageContentType, MAX_XLSX_WORKSHEET_IMAGE_BYTES, xlsxChartSeriesFormattingShapeProperties, diagnoseXlsxProtection, isEditableXlsxPaperSizeCode, isSupportedXlsxCombinationChartNodes } from "./4104.js";
|
|
8
8
|
import { spreadsheetConditionalComparisonNeedsUpperValue, isSpreadsheetConditionalIconSetName, isSpreadsheetConditionalComparisonOperator, spreadsheetConditionalIconSetCount, xlsxWorksheetCellEntries } from "./1544.js";
|
|
9
9
|
import { formulaHasStructuredReference, formulaHasExternalReference, parseSpreadsheetPrintTitles, volatileSpreadsheetFormulaFunctions, stripSpreadsheetSheetQualifier } from "./8715.js";
|
|
@@ -92,10 +92,21 @@ function bookmarkIssue(code, message, severity = 'warning') {
|
|
|
92
92
|
}
|
|
93
93
|
function diagnoseDocxCaptions(document) {
|
|
94
94
|
const fields = docxFieldOccurrences(document);
|
|
95
|
+
const tableOfContentsFields = fields.filter(supportedDocxTableOfContentsField);
|
|
96
|
+
const tableOfContentsContainers = new Set(tableOfContentsFields.flatMap((field)=>{
|
|
97
|
+
const container = closestAncestor(field.start, 'sdt');
|
|
98
|
+
return container ? [
|
|
99
|
+
container
|
|
100
|
+
] : [];
|
|
101
|
+
}));
|
|
102
|
+
const isTableOfContentsField = (field)=>{
|
|
103
|
+
const container = closestAncestor(field.start, 'sdt');
|
|
104
|
+
return Boolean(container && tableOfContentsContainers.has(container));
|
|
105
|
+
};
|
|
95
106
|
const sequences = fields.filter((field)=>docxCaptionSequenceKind(field.instruction));
|
|
96
107
|
const bodyFields = fields.filter((field)=>'orphan' !== field.syntax && Boolean(docxDocumentFieldKind(field.instruction)));
|
|
97
108
|
const editableBodyFields = bodyFields.filter(docxFieldOccurrenceIsInlineEditable);
|
|
98
|
-
const hasUnsupportedFieldStructure = hasInvalidDocxFieldStructure(document) || bodyFields.some((field)=>!docxFieldOccurrenceIsInlineEditable(field));
|
|
109
|
+
const hasUnsupportedFieldStructure = hasInvalidDocxFieldStructure(document, isTableOfContentsField) || bodyFields.some((field)=>!docxFieldOccurrenceIsInlineEditable(field));
|
|
99
110
|
const bookmarkNames = new Set([
|
|
100
111
|
...captionBookmarkNames(sequences),
|
|
101
112
|
...pairedBookmarkNames(document)
|
|
@@ -118,6 +129,14 @@ function diagnoseDocxCaptions(document) {
|
|
|
118
129
|
severity: 'info'
|
|
119
130
|
}
|
|
120
131
|
] : [],
|
|
132
|
+
...tableOfContentsFields.length ? [
|
|
133
|
+
{
|
|
134
|
+
code: 'docx.tableOfContents',
|
|
135
|
+
feature: 'Table of contents',
|
|
136
|
+
message: 'Heading ranges, hyperlinks, page-number visibility and alignment, leader styles, cached entries, and refreshable native TOC fields remain editable and round-trip in DOCX output.',
|
|
137
|
+
severity: 'info'
|
|
138
|
+
}
|
|
139
|
+
] : [],
|
|
121
140
|
...hasUnsupportedFieldStructure ? [
|
|
122
141
|
{
|
|
123
142
|
code: 'docx.fields.structure',
|
|
@@ -127,7 +146,7 @@ function diagnoseDocxCaptions(document) {
|
|
|
127
146
|
}
|
|
128
147
|
] : []
|
|
129
148
|
],
|
|
130
|
-
hasUnsupportedFields: hasUnsupportedFieldStructure || fields.some((field)=>!isSupportedCaptionField(field.instruction, bookmarkNames))
|
|
149
|
+
hasUnsupportedFields: hasUnsupportedFieldStructure || fields.some((field)=>!isTableOfContentsField(field) && !isSupportedCaptionField(field.instruction, bookmarkNames))
|
|
131
150
|
};
|
|
132
151
|
}
|
|
133
152
|
function captionBookmarkNames(fields) {
|
|
@@ -846,6 +865,57 @@ async function diagnoseDocxParagraphShading(archive, document) {
|
|
|
846
865
|
});
|
|
847
866
|
return issues;
|
|
848
867
|
}
|
|
868
|
+
const PROOFING_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
|
|
869
|
+
async function diagnoseDocxProofing(archive, document) {
|
|
870
|
+
const parts = [
|
|
871
|
+
document
|
|
872
|
+
];
|
|
873
|
+
for (const path of archive.paths('word/'))if ('word/document.xml' !== path.toLowerCase() && PROOFING_PART_PATTERN.test(path)) parts.push(await archive.xml(path));
|
|
874
|
+
let languageCount = 0;
|
|
875
|
+
let proofingStateCount = 0;
|
|
876
|
+
let excludedCount = 0;
|
|
877
|
+
let checkedCount = 0;
|
|
878
|
+
let invalidCount = 0;
|
|
879
|
+
for (const part of parts){
|
|
880
|
+
for (const properties of descendants(part, 'rPr').filter((element)=>DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? ''))){
|
|
881
|
+
if (directChildren(properties, 'lang').length) {
|
|
882
|
+
const inspection = inspectDocxProofingLanguages(properties);
|
|
883
|
+
if ('valid' === inspection.status) languageCount += 1;
|
|
884
|
+
else invalidCount += 1 + inspection.spoofedCount;
|
|
885
|
+
}
|
|
886
|
+
if (directChildren(properties, 'noProof').length) {
|
|
887
|
+
const inspection = inspectDocxNoProof(properties);
|
|
888
|
+
if ('valid' === inspection.status) {
|
|
889
|
+
proofingStateCount += 1;
|
|
890
|
+
if (inspection.value) excludedCount += 1;
|
|
891
|
+
else checkedCount += 1;
|
|
892
|
+
} else invalidCount += 1 + inspection.spoofedCount;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
for (const name of [
|
|
896
|
+
'lang',
|
|
897
|
+
'noProof'
|
|
898
|
+
])invalidCount += descendants(part, name).filter((element)=>{
|
|
899
|
+
if (!DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? '')) return false;
|
|
900
|
+
const parent = element.parentElement;
|
|
901
|
+
return !parent || 'rPr' !== parent.localName || !DOCX_WORDPROCESSING_NAMESPACES.has(parent.namespaceURI ?? '');
|
|
902
|
+
}).length;
|
|
903
|
+
}
|
|
904
|
+
const issues = [];
|
|
905
|
+
if (languageCount || proofingStateCount) issues.push({
|
|
906
|
+
code: 'docx.proofing-language',
|
|
907
|
+
severity: 'info',
|
|
908
|
+
feature: 'Proofing languages',
|
|
909
|
+
message: `${languageCount} native language declaration(s) and ${proofingStateCount} explicit proofing state(s), including ${excludedCount} excluded and ${checkedCount} explicitly checked state(s), were detected across document defaults, styles, body, page chrome, notes, comments, and formatting revisions. Writer preserves independent Latin, East Asian, and bidi language slots plus native w:noProof true or false semantics through mixed-selection editing, one-step Undo, tracked formatting revisions, and exact DOCX export.`
|
|
910
|
+
});
|
|
911
|
+
if (invalidCount) issues.push({
|
|
912
|
+
code: 'docx.proofing-language.invalid',
|
|
913
|
+
severity: 'warning',
|
|
914
|
+
feature: 'Proofing languages',
|
|
915
|
+
message: `${invalidCount} malformed, duplicated, misplaced, namespace-spoofed, text-bearing, child-bearing, extra-attribute, invalid-language-tag, or invalid on/off proofing value(s) are ignored instead of enabling untrusted language metadata or inheriting stale proofing state.`
|
|
916
|
+
});
|
|
917
|
+
return issues;
|
|
918
|
+
}
|
|
849
919
|
const RUN_FONT_DIAGNOSTIC_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
|
|
850
920
|
async function diagnoseDocxRunFonts(archive, document) {
|
|
851
921
|
const parts = [
|
|
@@ -945,6 +1015,54 @@ async function diagnoseDocxRunBorders(archive, document) {
|
|
|
945
1015
|
});
|
|
946
1016
|
return issues;
|
|
947
1017
|
}
|
|
1018
|
+
const RUN_SHADING_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
|
|
1019
|
+
const VALID_SHADING_PARENTS = new Set([
|
|
1020
|
+
'rPr',
|
|
1021
|
+
'pPr',
|
|
1022
|
+
'tcPr',
|
|
1023
|
+
'tblPr'
|
|
1024
|
+
]);
|
|
1025
|
+
async function diagnoseDocxRunShading(archive, document) {
|
|
1026
|
+
const themePath = archive.paths('word/theme/').find((path)=>/\/theme\d*\.xml$/i.test(path));
|
|
1027
|
+
const themeDocument = themePath ? await archive.xml(themePath) : null;
|
|
1028
|
+
const settingsDocument = archive.has('word/settings.xml') ? await archive.xml('word/settings.xml') : null;
|
|
1029
|
+
const theme = createDocxThemeResolver(themeDocument, settingsDocument);
|
|
1030
|
+
const parts = [
|
|
1031
|
+
document
|
|
1032
|
+
];
|
|
1033
|
+
for (const path of archive.paths('word/'))if ('word/document.xml' !== path.toLowerCase() && RUN_SHADING_PART_PATTERN.test(path)) parts.push(await archive.xml(path));
|
|
1034
|
+
let validCount = 0;
|
|
1035
|
+
let resetCount = 0;
|
|
1036
|
+
let invalidCount = 0;
|
|
1037
|
+
for (const part of parts){
|
|
1038
|
+
for (const properties of descendants(part, 'rPr').filter((element)=>DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? ''))){
|
|
1039
|
+
if (!directChildren(properties, 'shd').length) continue;
|
|
1040
|
+
const inspection = inspectDocxRunShading(properties, theme);
|
|
1041
|
+
if ('valid' === inspection.status) {
|
|
1042
|
+
validCount += 1;
|
|
1043
|
+
if ('nil' === inspection.value.pattern) resetCount += 1;
|
|
1044
|
+
} else invalidCount += 1 + inspection.spoofedCount;
|
|
1045
|
+
}
|
|
1046
|
+
invalidCount += descendants(part, 'shd').filter((element)=>{
|
|
1047
|
+
const parent = element.parentElement;
|
|
1048
|
+
return DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? '') && (!parent || !VALID_SHADING_PARENTS.has(parent.localName));
|
|
1049
|
+
}).length;
|
|
1050
|
+
}
|
|
1051
|
+
const issues = [];
|
|
1052
|
+
if (validCount) issues.push({
|
|
1053
|
+
code: 'docx.run-shading',
|
|
1054
|
+
severity: 'info',
|
|
1055
|
+
feature: 'Character shading',
|
|
1056
|
+
message: `${validCount} native character shading value(s), including ${resetCount} explicit reset(s), were detected across document defaults, styles, body, page chrome, notes, comments, and formatting revisions. Writer preserves every Word pattern mask, direct or automatic foreground and background colors, independently tinted or shaded theme references, and explicit nil semantics through editing, Format Painter, one-step Undo, and exact DOCX export. Native highlight remains independent and takes display precedence.`
|
|
1057
|
+
});
|
|
1058
|
+
if (invalidCount) issues.push({
|
|
1059
|
+
code: 'docx.run-shading.invalid',
|
|
1060
|
+
severity: 'warning',
|
|
1061
|
+
feature: 'Character shading',
|
|
1062
|
+
message: `${invalidCount} malformed, duplicated, misplaced, namespace-spoofed, text-bearing, child-bearing, extra-attribute, or unresolved-theme character shading value(s) are normalized to explicit nil resets instead of enabling untrusted paint or inheriting stale formatting.`
|
|
1063
|
+
});
|
|
1064
|
+
return issues;
|
|
1065
|
+
}
|
|
948
1066
|
const SUPPORTED_CHART_ELEMENTS = new Set([
|
|
949
1067
|
'barChart',
|
|
950
1068
|
'lineChart',
|
|
@@ -1973,6 +2091,8 @@ async function analyzeDocxCompatibility(file, messages, sourcePackage) {
|
|
|
1973
2091
|
issues.push(...await diagnoseDocxHiddenText(archive, document));
|
|
1974
2092
|
issues.push(...await diagnoseDocxLegacyTextEffects(archive, document));
|
|
1975
2093
|
issues.push(...await diagnoseDocxRunBorders(archive, document));
|
|
2094
|
+
issues.push(...await diagnoseDocxRunShading(archive, document));
|
|
2095
|
+
issues.push(...await diagnoseDocxProofing(archive, document));
|
|
1976
2096
|
issues.push(...await diagnoseDocxRunFonts(archive, document));
|
|
1977
2097
|
}
|
|
1978
2098
|
issues.push(...await diagnoseDocxPageChrome(archive));
|
|
@@ -2004,7 +2124,7 @@ async function analyzeDocxCompatibility(file, messages, sourcePackage) {
|
|
|
2004
2124
|
const supportedRunFormattingRevisionCount = runFormattingRevisions.filter(isSupportedDocxRunFormattingChange).length;
|
|
2005
2125
|
const supportedParagraphFormattingRevisionCount = paragraphFormattingRevisions.filter(isSupportedDocxParagraphFormattingChange).length;
|
|
2006
2126
|
if (textRevisions.some((revision)=>descendants(revision, 't').length || descendants(revision, 'delText').length)) issues.push(work_office_diagnostics_issue('docx.revisions', 'Tracked changes', 'Body-text insertions and deletions preserve their author and date, remain reviewable in Work, and round-trip as native DOCX revisions.', 'info'));
|
|
2007
|
-
if (supportedRunFormattingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.formatting', 'Character-formatting revisions', `${supportedRunFormattingRevisionCount} bounded character-formatting revision(s) preserve author, date, current formatting, and prior bold, italic, underline, strike, text case, hidden text, outline, shadow, emboss, imprint, subscript, superscript, font, size, color, highlight, character scale, spacing, kerning threshold, emphasis mark, baseline position, and
|
|
2127
|
+
if (supportedRunFormattingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.formatting', 'Character-formatting revisions', `${supportedRunFormattingRevisionCount} bounded character-formatting revision(s) preserve author, date, current formatting, and prior bold, italic, underline, strike, text case, hidden text, outline, shadow, emboss, imprint, subscript, superscript, font, size, color, highlight, character borders, character shading, character scale, spacing, kerning threshold, emphasis mark, baseline position, grid state, proofing languages, and explicit proofing state. They remain reviewable in Work and round-trip as native w:rPrChange records.`, 'info'));
|
|
2008
2128
|
if (supportedParagraphFormattingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.paragraph-formatting', 'Paragraph-formatting revisions', `${supportedParagraphFormattingRevisionCount} bounded paragraph-formatting revision(s) preserve author, date, current formatting, and prior alignment, direction, indentation, spacing, pagination, outline, tab-stop, border, shading, and collapsed state. They remain reviewable in Work and round-trip as native w:pPrChange records.`, 'info'));
|
|
2009
2129
|
if (textRevisions.some((revision)=>!descendants(revision, 't').length && !descendants(revision, 'delText').length) || supportedRunFormattingRevisionCount !== runFormattingRevisions.length || supportedParagraphFormattingRevisionCount !== paragraphFormattingRevisions.length || [
|
|
2010
2130
|
'moveFrom',
|
package/dist/1544.js
CHANGED
|
@@ -2974,6 +2974,18 @@ function stringRecord(value) {
|
|
|
2974
2974
|
return entries.length ? Object.fromEntries(entries) : void 0;
|
|
2975
2975
|
}
|
|
2976
2976
|
const MILLISECONDS_PER_DAY = 86400000;
|
|
2977
|
+
const SPREADSHEET_DATA_VALIDATION_ERROR_STYLES = [
|
|
2978
|
+
'stop',
|
|
2979
|
+
'warning',
|
|
2980
|
+
'information'
|
|
2981
|
+
];
|
|
2982
|
+
function normalizeSpreadsheetDataValidationErrorStyle(value) {
|
|
2983
|
+
return SPREADSHEET_DATA_VALIDATION_ERROR_STYLES.includes(value) ? value : 'stop';
|
|
2984
|
+
}
|
|
2985
|
+
function boundedSpreadsheetDataValidationText(value, limit) {
|
|
2986
|
+
if ('string' != typeof value || !Number.isSafeInteger(limit) || limit < 0) return '';
|
|
2987
|
+
return Array.from(value.trim()).slice(0, limit).join('');
|
|
2988
|
+
}
|
|
2977
2989
|
function normalizeSpreadsheetDateValidationBoundary(value, uses1904DateSystem = false) {
|
|
2978
2990
|
const trimmed = value.trim().replace(/^=/, '');
|
|
2979
2991
|
const iso = normalizeIsoDate(trimmed);
|
|
@@ -4217,4 +4229,4 @@ function work_xlsx_rich_text_nonNegativeInteger(value) {
|
|
|
4217
4229
|
function work_xlsx_rich_text_isRecord(value) {
|
|
4218
4230
|
return 'object' == typeof value && null !== value && !Array.isArray(value);
|
|
4219
4231
|
}
|
|
4220
|
-
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, activeXlsxNativeFill, activeXlsxSemanticColorOrigin, applyImportedXlsxRichText, applyXlsxSemanticColorOrigin, attachSpreadsheetShownCommentCells, coalesceXlsxRichTextRuns, createWorkOfficeSpreadsheetCollaborationBinding as createOfficeSpreadsheetCollaborationBinding, createXlsxColorResolver, createXlsxRichTextReadContext, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, defaultXlsxBorder, defaultXlsxFill, deleteXlsxNativeFills, directXlsxAlignment, directXlsxFontStyle, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, ensureXlsxStyleCollection, freezeImportedSpreadsheetCell, hasXlsxDirectFontStyle, importedSheetProtectionAuthority, initializeWorkOfficeSpreadsheetCollaboration as initializeOfficeSpreadsheetCollaboration, isHighSurrogate, isLowSurrogate, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, isSpreadsheetTextOrientationId, isSpreadsheetUnderlineStyle, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetDateValidationBoundary, normalizeSpreadsheetPaperSize, normalizeXlsxGradientFill, normalizeXlsxPatternFill, normalizeXlsxRichTextCell, normalizeXlsxRichTextColor, normalizeXlsxRichTextEditSource, normalizeXlsxRichTextRun, normalizeXlsxSemanticColorOrigin, patchSpreadsheetRichTextFontRuns, prepareXlsxSemanticPalette, protectedSheetCount, readWorkOfficeSpreadsheetCollaboration as readOfficeSpreadsheetCollaboration, readXlsxGradientFill, readXlsxPatternFill, readXlsxRichTextCells, readXlsxSemanticColorOrigin, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, replaceWorkOfficeSpreadsheetCollaboration as replaceOfficeSpreadsheetCollaboration, resolveXlsxColor, sameSpreadsheetHistoryValue, sameXlsxRichTextRunStyle, setXlsxBorderLine, setXlsxColorChild, setXlsxToggleChild, setXlsxUnderlineChild, setXlsxValueChild, sheetHasProtectionState, sheetHasXlsxRichTextCells, sheetProtectionAuthority, spreadsheetCellValueWithDiagonalBorder, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetDateValidationFormula, spreadsheetDiagonalBorderFromCellValue, spreadsheetExplicitTextOrientationFromCell, spreadsheetMatrixProfile, spreadsheetProtectionKey, spreadsheetTextOrientationCellStyle, spreadsheetTextOrientationChoiceFromCell, spreadsheetTextOrientationFromAngle, spreadsheetTextOrientationFromCell, spreadsheetTextOrientationFromChoice, spreadsheetTextOrientationFromXlsx, spreadsheetUnderlineCellValue, spreadsheetUnderlineCellValueFromSheetJs, spreadsheetUnderlineCellValueFromXlsx, spreadsheetUnderlineStyle, spreadsheetVisibleTextRotationFromCell, unlockedCellCount, validXlsxRichText, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withXlsxCellStyleOrigin, withXlsxGradientFill, withXlsxPatternFill, withoutEditableRange, work_xlsx_cell_style_values_xlsxBooleanAttribute, writeXlsxAlignment, writeXlsxRichTextCells, xlsxAlignmentMatches, xlsxBorderLineMatches, xlsxCellStyleOrigin, xlsxCellStyleOriginSemanticColors, xlsxColorElementMatchesOrigin, xlsxColorMatches, xlsxGradientFillFallbackColor, xlsxGradientFillKey, xlsxNativeFillCellKeys, xlsxNativeFillKey, xlsxNativeFillSemanticColors, xlsxPatternFillTypes, xlsxRgbColor, xlsxRichTextCellText, xlsxRichTextStyleOrigins, xlsxSemanticColorMatchesValue, xlsxSemanticColorOriginKey, xlsxStyleCollectionIndex, xlsxToggleEnabled, xlsxUnderlineStyle, xlsxWorksheetCellEntries };
|
|
4232
|
+
export { DEFAULT_PROTECTION_HINT, SPREADSHEET_CONDITIONAL_COMPARISON_OPERATORS, SPREADSHEET_CONDITIONAL_ICON_SETS, activeXlsxNativeFill, activeXlsxSemanticColorOrigin, applyImportedXlsxRichText, applyXlsxSemanticColorOrigin, attachSpreadsheetShownCommentCells, boundedSpreadsheetDataValidationText, coalesceXlsxRichTextRuns, createWorkOfficeSpreadsheetCollaborationBinding as createOfficeSpreadsheetCollaborationBinding, createXlsxColorResolver, createXlsxRichTextReadContext, defaultSpreadsheetColorScaleThresholds, defaultSpreadsheetConditionalIconThresholds, defaultSpreadsheetDataBarOptions, defaultXlsxBorder, defaultXlsxFill, deleteXlsxNativeFills, directXlsxAlignment, directXlsxFontStyle, drawSpreadsheetConditionalIcon, editableRangeCellCount, editableRangeRequiresCredentials, effectiveSpreadsheetPageSetup, ensureXlsxStyleCollection, freezeImportedSpreadsheetCell, hasXlsxDirectFontStyle, importedSheetProtectionAuthority, initializeWorkOfficeSpreadsheetCollaboration as initializeOfficeSpreadsheetCollaboration, isHighSurrogate, isLowSurrogate, isSpreadsheetConditionalComparisonOperator, isSpreadsheetConditionalIconSetName, isSpreadsheetTextOrientationId, isSpreadsheetUnderlineStyle, normalizeSheetProtectionAuthority, normalizeSpreadsheetConditionalIconSetFormat, normalizeSpreadsheetConditionalVisualOptions, normalizeSpreadsheetDataValidationErrorStyle, normalizeSpreadsheetDateValidationBoundary, normalizeSpreadsheetPaperSize, normalizeXlsxGradientFill, normalizeXlsxPatternFill, normalizeXlsxRichTextCell, normalizeXlsxRichTextColor, normalizeXlsxRichTextEditSource, normalizeXlsxRichTextRun, normalizeXlsxSemanticColorOrigin, patchSpreadsheetRichTextFontRuns, prepareXlsxSemanticPalette, protectedSheetCount, readWorkOfficeSpreadsheetCollaboration as readOfficeSpreadsheetCollaboration, readXlsxGradientFill, readXlsxPatternFill, readXlsxRichTextCells, readXlsxSemanticColorOrigin, registerDerivedSpreadsheetMatrix, registerImportedSpreadsheetMatrix, replaceWorkOfficeSpreadsheetCollaboration as replaceOfficeSpreadsheetCollaboration, resolveXlsxColor, sameSpreadsheetHistoryValue, sameXlsxRichTextRunStyle, setXlsxBorderLine, setXlsxColorChild, setXlsxToggleChild, setXlsxUnderlineChild, setXlsxValueChild, sheetHasProtectionState, sheetHasXlsxRichTextCells, sheetProtectionAuthority, spreadsheetCellValueWithDiagonalBorder, spreadsheetConditionalComparisonNeedsUpperValue, spreadsheetConditionalIconForValue, spreadsheetConditionalIconSetCount, spreadsheetConditionalThresholdValue, spreadsheetConditionalThresholdsEqual, spreadsheetDateValidationFormula, spreadsheetDiagonalBorderFromCellValue, spreadsheetExplicitTextOrientationFromCell, spreadsheetMatrixProfile, spreadsheetProtectionKey, spreadsheetTextOrientationCellStyle, spreadsheetTextOrientationChoiceFromCell, spreadsheetTextOrientationFromAngle, spreadsheetTextOrientationFromCell, spreadsheetTextOrientationFromChoice, spreadsheetTextOrientationFromXlsx, spreadsheetUnderlineCellValue, spreadsheetUnderlineCellValueFromSheetJs, spreadsheetUnderlineCellValueFromXlsx, spreadsheetUnderlineStyle, spreadsheetVisibleTextRotationFromCell, unlockedCellCount, validXlsxRichText, withEditableRange, withSheetProtection, withSheetSelectionPermissions, withXlsxCellStyleOrigin, withXlsxGradientFill, withXlsxPatternFill, withoutEditableRange, work_xlsx_cell_style_values_xlsxBooleanAttribute, writeXlsxAlignment, writeXlsxRichTextCells, xlsxAlignmentMatches, xlsxBorderLineMatches, xlsxCellStyleOrigin, xlsxCellStyleOriginSemanticColors, xlsxColorElementMatchesOrigin, xlsxColorMatches, xlsxGradientFillFallbackColor, xlsxGradientFillKey, xlsxNativeFillCellKeys, xlsxNativeFillKey, xlsxNativeFillSemanticColors, xlsxPatternFillTypes, xlsxRgbColor, xlsxRichTextCellText, xlsxRichTextStyleOrigins, xlsxSemanticColorMatchesValue, xlsxSemanticColorOriginKey, xlsxStyleCollectionIndex, xlsxToggleEnabled, xlsxUnderlineStyle, xlsxWorksheetCellEntries };
|
package/dist/4104.js
CHANGED
|
@@ -5,7 +5,7 @@ import { OFFICE_COLLABORATION_PROTOCOL as WORK_OFFICE_COLLABORATION_PROTOCOL, Of
|
|
|
5
5
|
import { contentTypeForPart, directChildren, bytesToDataUrl, OoxmlPackage as work_ooxml_package_OoxmlPackage, parseXml, firstDescendant, xmlNamespacePrefix, descendants, directChild, createArtifact as createWorkArtifact, xmlContainsAnyElement, createOfficeId as createWorkId, attribute as work_ooxml_package_attribute } from "./4121.js";
|
|
6
6
|
import { mountWorkLiveDocumentCapture, materializeWorkDocumentContent as work_document_model_codec_materializeWorkDocumentContent, documentPageSurfaceGeometryForElement, createWorkDocumentModel, documentContentLayoutProperties, documentModelForContent, createWorkDocumentExtensions, positionWorkLiveDocumentCapture } from "./6282.js";
|
|
7
7
|
import { normalizeWorkSpreadsheetDataLabels, workSpreadsheetChartSupportsGrouping, normalizeSpreadsheetPrintArea, normalizeWorkSpreadsheetChartLegendPosition, formatSpreadsheetCellRanges, spreadsheetCellAddress, normalizeWorkSpreadsheetChartSmoothLines, spreadsheetFormulaRangeForCell, normalizeWorkSpreadsheetChartColor, readXlsxDrawingAnchor, sparseArrayEntries, qualifySpreadsheetRange, normalizeWorkSpreadsheetBubbleScale, normalizeWorkSpreadsheetChartSeriesStyle, normalizeSpreadsheetPrintTitleRows, normalizeSpreadsheetPrintTitleColumns, spreadsheetPivotFilterValueKey, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetBubbleSizeRepresents, workSpreadsheetChartSupportsTrendlines, stripSpreadsheetSheetQualifier, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsBarSpacing, workSpreadsheetChartSupportsSmoothLines, workSpreadsheetChartGroupingIsStacked, xlsxDrawingAnchorToBounds, xlsxTwoCellAnchorMarkers, workSpreadsheetChartSupportsErrorBars, sparseMatrixColumnCount, refreshSpreadsheetPivotTables, normalizeWorkSpreadsheetChartAxisGroup, isValidSpreadsheetDefinedName, normalizeWorkSpreadsheetScatterStyle, workSpreadsheetChartAxisDefaultLabelPosition, spreadsheetPivotValidation, resolveSpreadsheetChart, parseSpreadsheetCellRanges, workSpreadsheetChartAxisIsCategoryAxis, spreadsheetPivotFields, normalizeWorkSpreadsheetDoughnutHoleSize, normalizeWorkSpreadsheetChartAxes, parseSpreadsheetPrintTitles, spreadsheetFormulaRangeConflict, spreadsheetFormulaForXlsx, editableSpreadsheetFormula, workSpreadsheetChartUsesNumericXAxis, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartSupportsAxes, workSpreadsheetChartAxisShowsMajorGridlinesByDefault, normalizeWorkSpreadsheetCombinationSeriesType, effectiveSpreadsheetCalculationSettings, normalizeWorkSpreadsheetTrendline, normalizeWorkSpreadsheetRadarStyle } from "./8715.js";
|
|
8
|
-
import { freezeImportedSpreadsheetCell, readXlsxGradientFill, withXlsxPatternFill, xlsxCellStyleOriginSemanticColors, setXlsxToggleChild, work_xlsx_cell_style_values_xlsxBooleanAttribute, spreadsheetCellValueWithDiagonalBorder, xlsxRichTextCellText, xlsxColorElementMatchesOrigin, ensureXlsxStyleCollection, xlsxSemanticColorOriginKey, applyImportedXlsxRichText, hasXlsxDirectFontStyle, isSpreadsheetConditionalComparisonOperator, xlsxStyleCollectionIndex, spreadsheetExplicitTextOrientationFromCell, readXlsxSemanticColorOrigin, activeXlsxNativeFill, defaultSpreadsheetConditionalIconThresholds, DEFAULT_PROTECTION_HINT, sheetHasXlsxRichTextCells, normalizeSpreadsheetDateValidationBoundary, createXlsxColorResolver, resolveXlsxColor, setXlsxBorderLine, xlsxAlignmentMatches, xlsxBorderLineMatches, xlsxNativeFillKey, defaultXlsxBorder, editableRangeRequiresCredentials, spreadsheetDateValidationFormula, defaultSpreadsheetColorScaleThresholds, writeXlsxAlignment, xlsxGradientFillKey, applyXlsxSemanticColorOrigin, spreadsheetUnderlineCellValueFromXlsx, xlsxWorksheetCellEntries, defaultXlsxFill, spreadsheetConditionalThresholdsEqual, spreadsheetUnderlineCellValueFromSheetJs, xlsxColorMatches, withXlsxCellStyleOrigin, normalizeSpreadsheetPaperSize, normalizeSpreadsheetConditionalVisualOptions, xlsxRichTextStyleOrigins, withXlsxGradientFill, xlsxCellStyleOrigin, directXlsxAlignment, readXlsxPatternFill, spreadsheetTextOrientationFromXlsx, directXlsxFontStyle, registerImportedSpreadsheetMatrix, setXlsxUnderlineChild, readXlsxRichTextCells, xlsxGradientFillFallbackColor, setXlsxColorChild, createXlsxRichTextReadContext, spreadsheetTextOrientationCellStyle, normalizeSpreadsheetConditionalIconSetFormat, defaultSpreadsheetDataBarOptions, prepareXlsxSemanticPalette, normalizeSheetProtectionAuthority, importedSheetProtectionAuthority, spreadsheetDiagonalBorderFromCellValue, xlsxRgbColor, xlsxUnderlineStyle, sheetHasProtectionState, spreadsheetConditionalComparisonNeedsUpperValue, xlsxToggleEnabled, writeXlsxRichTextCells, activeXlsxSemanticColorOrigin, xlsxNativeFillSemanticColors, isSpreadsheetConditionalIconSetName, setXlsxValueChild, spreadsheetConditionalIconSetCount } from "./1544.js";
|
|
8
|
+
import { freezeImportedSpreadsheetCell, readXlsxGradientFill, withXlsxPatternFill, xlsxCellStyleOriginSemanticColors, setXlsxToggleChild, work_xlsx_cell_style_values_xlsxBooleanAttribute, spreadsheetCellValueWithDiagonalBorder, xlsxRichTextCellText, xlsxColorElementMatchesOrigin, ensureXlsxStyleCollection, xlsxSemanticColorOriginKey, applyImportedXlsxRichText, hasXlsxDirectFontStyle, isSpreadsheetConditionalComparisonOperator, xlsxStyleCollectionIndex, spreadsheetExplicitTextOrientationFromCell, readXlsxSemanticColorOrigin, activeXlsxNativeFill, defaultSpreadsheetConditionalIconThresholds, DEFAULT_PROTECTION_HINT, sheetHasXlsxRichTextCells, normalizeSpreadsheetDateValidationBoundary, createXlsxColorResolver, resolveXlsxColor, setXlsxBorderLine, xlsxAlignmentMatches, xlsxBorderLineMatches, xlsxNativeFillKey, defaultXlsxBorder, editableRangeRequiresCredentials, spreadsheetDateValidationFormula, defaultSpreadsheetColorScaleThresholds, writeXlsxAlignment, xlsxGradientFillKey, applyXlsxSemanticColorOrigin, spreadsheetUnderlineCellValueFromXlsx, xlsxWorksheetCellEntries, defaultXlsxFill, spreadsheetConditionalThresholdsEqual, spreadsheetUnderlineCellValueFromSheetJs, xlsxColorMatches, withXlsxCellStyleOrigin, normalizeSpreadsheetPaperSize, normalizeSpreadsheetConditionalVisualOptions, xlsxRichTextStyleOrigins, withXlsxGradientFill, normalizeSpreadsheetDataValidationErrorStyle, xlsxCellStyleOrigin, directXlsxAlignment, readXlsxPatternFill, spreadsheetTextOrientationFromXlsx, directXlsxFontStyle, registerImportedSpreadsheetMatrix, boundedSpreadsheetDataValidationText, setXlsxUnderlineChild, readXlsxRichTextCells, xlsxGradientFillFallbackColor, setXlsxColorChild, createXlsxRichTextReadContext, spreadsheetTextOrientationCellStyle, normalizeSpreadsheetConditionalIconSetFormat, defaultSpreadsheetDataBarOptions, prepareXlsxSemanticPalette, normalizeSheetProtectionAuthority, importedSheetProtectionAuthority, spreadsheetDiagonalBorderFromCellValue, xlsxRgbColor, xlsxUnderlineStyle, sheetHasProtectionState, spreadsheetConditionalComparisonNeedsUpperValue, xlsxToggleEnabled, writeXlsxRichTextCells, activeXlsxSemanticColorOrigin, xlsxNativeFillSemanticColors, isSpreadsheetConditionalIconSetName, setXlsxValueChild, spreadsheetConditionalIconSetCount } from "./1544.js";
|
|
9
9
|
import { WorkFileImportController, materializeWorkFileSource } from "./9356.js";
|
|
10
10
|
import "./2591.js";
|
|
11
11
|
import "./3818.js";
|
|
@@ -590,7 +590,7 @@ async function importWorkDocumentFile(file, extension, context) {
|
|
|
590
590
|
recordDocumentImportMeasure('a3s-office.document.mammoth', mammothStartedAt, documentImportNow());
|
|
591
591
|
context?.controller.report('parsing', 0.8);
|
|
592
592
|
const markersStartedAt = documentImportNow();
|
|
593
|
-
html = prepared ? applyDocxSectionsToHtml(result.value, prepared.sections, prepared.captionMarkers, prepared.bookmarkMarkers, prepared.changeMarkers, prepared.commentMarkers, prepared.fieldMarkers, prepared.equationMarkers, prepared.citationMarkers, prepared.listMarkers, prepared.imageLayoutMarkers, prepared.paragraphIdentityMarkers, prepared.paragraphFormattingChangeMarkers, prepared.paragraphAlignmentMarkers, prepared.runFormattingMarkers, prepared.paragraphDirectionMarkers, prepared.paragraphIndentMarkers, prepared.paragraphSpacingMarkers, prepared.paragraphBorderMarkers, prepared.paragraphShadingMarkers, prepared.paragraphPaginationMarkers, prepared.bibliography, prepared.tabStopMarkers, prepared.tableCellMarkers, prepared.tableRowMarkers, prepared.tableSizingMarkers) : result.value;
|
|
593
|
+
html = prepared ? applyDocxSectionsToHtml(result.value, prepared.sections, prepared.captionMarkers, prepared.bookmarkMarkers, prepared.changeMarkers, prepared.commentMarkers, prepared.fieldMarkers, prepared.tableOfContentsMarkers, prepared.equationMarkers, prepared.citationMarkers, prepared.listMarkers, prepared.imageLayoutMarkers, prepared.paragraphIdentityMarkers, prepared.paragraphFormattingChangeMarkers, prepared.paragraphAlignmentMarkers, prepared.runFormattingMarkers, prepared.paragraphDirectionMarkers, prepared.paragraphIndentMarkers, prepared.paragraphSpacingMarkers, prepared.paragraphBorderMarkers, prepared.paragraphShadingMarkers, prepared.paragraphPaginationMarkers, prepared.bibliography, prepared.tabStopMarkers, prepared.tableCellMarkers, prepared.tableRowMarkers, prepared.tableSizingMarkers) : result.value;
|
|
594
594
|
recordDocumentImportMeasure('a3s-office.document.markers', markersStartedAt, documentImportNow());
|
|
595
595
|
const layout = prepared ? {
|
|
596
596
|
...documentContentLayoutProperties(prepared.sections[0].layout),
|
|
@@ -6295,9 +6295,15 @@ function parseDataValidations(document1, uses1904DateSystem) {
|
|
|
6295
6295
|
value2: 'date' === type ? normalizeSpreadsheetDateValidationBoundary(formula2, uses1904DateSystem) ?? formula2 : formula2,
|
|
6296
6296
|
validity: '',
|
|
6297
6297
|
remote: false,
|
|
6298
|
+
allowBlank: work_xlsx_interop_booleanAttribute(element, 'allowBlank'),
|
|
6299
|
+
showDropdownArrow: 'dropdown' === type ? !work_xlsx_interop_booleanAttribute(element, 'showDropDown') : true,
|
|
6298
6300
|
prohibitInput: work_xlsx_interop_booleanAttribute(element, 'showErrorMessage'),
|
|
6301
|
+
errorStyle: normalizeSpreadsheetDataValidationErrorStyle(work_ooxml_package_attribute(element, 'errorStyle')),
|
|
6302
|
+
errorTitle: boundedSpreadsheetDataValidationText(work_ooxml_package_attribute(element, 'errorTitle'), 32),
|
|
6303
|
+
errorMessage: boundedSpreadsheetDataValidationText(work_ooxml_package_attribute(element, 'error'), 225),
|
|
6299
6304
|
hintShow: work_xlsx_interop_booleanAttribute(element, 'showInputMessage'),
|
|
6300
|
-
|
|
6305
|
+
hintTitle: boundedSpreadsheetDataValidationText(work_ooxml_package_attribute(element, 'promptTitle'), 32),
|
|
6306
|
+
hintValue: boundedSpreadsheetDataValidationText(work_ooxml_package_attribute(element, 'prompt'), 255),
|
|
6301
6307
|
checked: false
|
|
6302
6308
|
};
|
|
6303
6309
|
return [
|
|
@@ -6323,10 +6329,15 @@ function writeDataValidations(document1, source, compact, namedListSources) {
|
|
|
6323
6329
|
element.setAttribute('type', validationType);
|
|
6324
6330
|
const operator = xlsxValidationOperator(item.type2);
|
|
6325
6331
|
if (operator && 'list' !== validationType) element.setAttribute('operator', operator);
|
|
6326
|
-
element.setAttribute('allowBlank', '1');
|
|
6332
|
+
element.setAttribute('allowBlank', item.allowBlank ? '1' : '0');
|
|
6333
|
+
if ('list' === validationType) element.setAttribute('showDropDown', item.showDropdownArrow ? '0' : '1');
|
|
6327
6334
|
element.setAttribute('showErrorMessage', item.prohibitInput ? '1' : '0');
|
|
6335
|
+
element.setAttribute('errorStyle', item.errorStyle ?? 'stop');
|
|
6336
|
+
if (item.errorTitle) element.setAttribute('errorTitle', boundedSpreadsheetDataValidationText(item.errorTitle, 32));
|
|
6337
|
+
if (item.errorMessage) element.setAttribute('error', boundedSpreadsheetDataValidationText(item.errorMessage, 225));
|
|
6328
6338
|
element.setAttribute('showInputMessage', item.hintShow ? '1' : '0');
|
|
6329
|
-
if (item.
|
|
6339
|
+
if (item.hintTitle) element.setAttribute('promptTitle', boundedSpreadsheetDataValidationText(item.hintTitle, 32));
|
|
6340
|
+
if (item.hintValue) element.setAttribute('prompt', boundedSpreadsheetDataValidationText(item.hintValue, 255));
|
|
6330
6341
|
element.setAttribute('sqref', references.join(' '));
|
|
6331
6342
|
work_xlsx_interop_appendFormula(document1, element, 'formula1', xlsxValidationFormula(item, item.value1, namedListSources));
|
|
6332
6343
|
if (item.value2) work_xlsx_interop_appendFormula(document1, element, 'formula2', xlsxValidationFormula(item, item.value2, namedListSources));
|
|
@@ -6378,8 +6389,14 @@ function validationSignature(item) {
|
|
|
6378
6389
|
type2: item.type2,
|
|
6379
6390
|
value1: item.value1,
|
|
6380
6391
|
value2: item.value2,
|
|
6392
|
+
allowBlank: item.allowBlank,
|
|
6393
|
+
showDropdownArrow: item.showDropdownArrow,
|
|
6381
6394
|
prohibitInput: item.prohibitInput,
|
|
6395
|
+
errorStyle: item.errorStyle,
|
|
6396
|
+
errorTitle: item.errorTitle,
|
|
6397
|
+
errorMessage: item.errorMessage,
|
|
6382
6398
|
hintShow: item.hintShow,
|
|
6399
|
+
hintTitle: item.hintTitle,
|
|
6383
6400
|
hintValue: item.hintValue
|
|
6384
6401
|
});
|
|
6385
6402
|
}
|
|
@@ -6395,9 +6412,15 @@ function fortuneDataValidationItem(value) {
|
|
|
6395
6412
|
value2: 'string' == typeof item.value2 ? item.value2 : String(item.value2 ?? ''),
|
|
6396
6413
|
validity: 'string' == typeof item.validity ? item.validity : '',
|
|
6397
6414
|
remote: Boolean(item.remote),
|
|
6415
|
+
allowBlank: 'boolean' == typeof item.allowBlank ? item.allowBlank : true,
|
|
6416
|
+
showDropdownArrow: 'boolean' == typeof item.showDropdownArrow ? item.showDropdownArrow : true,
|
|
6398
6417
|
prohibitInput: Boolean(item.prohibitInput),
|
|
6418
|
+
errorStyle: normalizeSpreadsheetDataValidationErrorStyle(item.errorStyle),
|
|
6419
|
+
errorTitle: boundedSpreadsheetDataValidationText(item.errorTitle, 32),
|
|
6420
|
+
errorMessage: boundedSpreadsheetDataValidationText(item.errorMessage, 225),
|
|
6399
6421
|
hintShow: Boolean(item.hintShow),
|
|
6400
|
-
|
|
6422
|
+
hintTitle: boundedSpreadsheetDataValidationText(item.hintTitle, 32),
|
|
6423
|
+
hintValue: boundedSpreadsheetDataValidationText(item.hintValue, 255),
|
|
6401
6424
|
checked: Boolean(item.checked)
|
|
6402
6425
|
};
|
|
6403
6426
|
}
|