oasis-editor 0.0.412 → 0.0.414
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/dist/OasisEditorApp-BeGnnOPx.js +1 -0
- package/dist/assets/{importDocxWorker-Cza4hyf3.js → importDocxWorker-C4M8keWl.js} +1243 -1126
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/fieldCode.d.ts +18 -0
- package/dist/core/commands/indexEntries.d.ts +27 -0
- package/dist/core/commands/legacyForms.d.ts +15 -0
- package/dist/core/commands/mailMerge.d.ts +8 -0
- package/dist/core/commands/publicCommandTypes.d.ts +48 -0
- package/dist/core/commands/tableOfAuthorities.d.ts +22 -0
- package/dist/core/commands/tableOfFigures.d.ts +12 -0
- package/dist/core/document/bookmarkScope.d.ts +6 -0
- package/dist/core/document/captionEntries.d.ts +24 -0
- package/dist/core/document/fieldCodeDisplay.d.ts +12 -0
- package/dist/core/document/fieldComparison.d.ts +7 -0
- package/dist/core/document/formulaFields.d.ts +10 -0
- package/dist/core/document/indexPlan.d.ts +59 -0
- package/dist/core/document/indexRefresh.d.ts +35 -0
- package/dist/core/document/mergeFields.d.ts +64 -0
- package/dist/core/document/tableOfFigures.d.ts +38 -0
- package/dist/core/document/toaEntries.d.ts +33 -0
- package/dist/core/document/toaPlan.d.ts +36 -0
- package/dist/core/document/toaRefresh.d.ts +29 -0
- package/dist/core/document/tocFields.d.ts +13 -0
- package/dist/core/document/variableFields.d.ts +58 -0
- package/dist/core/document/xeEntries.d.ts +50 -0
- package/dist/core/document/xeRanges.d.ts +16 -0
- package/dist/core/format/fieldResultFormat.d.ts +19 -0
- package/dist/core/model/editorState.d.ts +2 -0
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/primitives.d.ts +32 -0
- package/dist/defaultToolbar-BFmfRwzv.js +1 -0
- package/dist/i18n/locales/en.d.ts +37 -0
- package/dist/i18n/locales/pt-BR.d.ts +37 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ooxml/word/fieldFormatSwitches.d.ts +40 -0
- package/dist/ooxml/word/legacyFormFields.d.ts +5 -0
- package/dist/plugins/internal/essentialsCapabilities.d.ts +27 -0
- package/dist/sourcePackage-DWdP3w1_.js +1 -0
- package/dist/ui/components/Toolbar/controls/FieldFamilyPanel.d.ts +9 -0
- package/dist/ui/components/Toolbar/controls/IndexEntryPanel.d.ts +6 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-BALWTakH.js +0 -1
- package/dist/defaultToolbar-DOUMCB_G.js +0 -1
- package/dist/sourcePackage-CHvo6ql3.js +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FieldInstructionToken } from './fieldInstruction.js';
|
|
2
|
+
import { FormatSwitchName } from '../../core/format/fieldResultFormat.js';
|
|
3
|
+
export type TextFormatSwitch = "MERGEFORMAT" | "CHARFORMAT" | "Caps" | "FirstCap" | "Upper" | "Lower";
|
|
4
|
+
export type NumberFormatSwitch = "alphabetic" | "ALPHABETIC" | "Arabic" | "ArabicDash" | "CardText" | "DollarText" | "Hex" | "OrdText" | "Ordinal" | "roman" | "ROMAN";
|
|
5
|
+
export type { FormatSwitchName } from '../../core/format/fieldResultFormat.js';
|
|
6
|
+
export interface FieldFormatSwitchProfile {
|
|
7
|
+
/** `\*` MERGEFORMAT, CHARFORMAT and capitalization words. */
|
|
8
|
+
text?: boolean;
|
|
9
|
+
/** `\*` number words (ArabicDash only with `arabicDash`). */
|
|
10
|
+
number?: boolean;
|
|
11
|
+
arabicDash?: boolean;
|
|
12
|
+
/** `\#` numeric picture. */
|
|
13
|
+
numericPicture?: boolean;
|
|
14
|
+
/** `\@` date/time picture. */
|
|
15
|
+
datePicture?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Per-command capabilities. A switch documented for one family is never
|
|
18
|
+
* silently available in another (e.g. `ArabicDash` is PAGE only). */
|
|
19
|
+
export declare const FIELD_FORMAT_SWITCH_PROFILES: Readonly<Record<string, FieldFormatSwitchProfile>>;
|
|
20
|
+
export interface FieldFormatSwitches {
|
|
21
|
+
mergeFormat?: true;
|
|
22
|
+
charFormat?: true;
|
|
23
|
+
capitalization?: FormatSwitchName;
|
|
24
|
+
numericPicture?: string;
|
|
25
|
+
datePicture?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ParsedFieldFormatSwitches {
|
|
28
|
+
switches: FieldFormatSwitches;
|
|
29
|
+
/** Tokens that are not general formatting switches, in original order. */
|
|
30
|
+
remaining: readonly FieldInstructionToken[];
|
|
31
|
+
}
|
|
32
|
+
/** Extract general formatting switches from instruction tokens. The command
|
|
33
|
+
* token (if present) is kept in `remaining` for the caller's own grammar. */
|
|
34
|
+
export declare function parseFormatSwitchesFromTokens(tokens: readonly FieldInstructionToken[], profile: FieldFormatSwitchProfile): ParsedFieldFormatSwitches | undefined;
|
|
35
|
+
/** Convenience for a whole instruction. A missing/unknown command uses an
|
|
36
|
+
* empty profile, so recognized switches are left untouched rather than
|
|
37
|
+
* coerced into a family that does not own them. */
|
|
38
|
+
export declare function parseFieldFormatSwitches(tokens: readonly FieldInstructionToken[], command: string | null): ParsedFieldFormatSwitches | undefined;
|
|
39
|
+
/** Canonical, deterministic serialization of qualified switches. */
|
|
40
|
+
export declare function serializeFieldFormatSwitches(switches: FieldFormatSwitches): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Element as XmlElement } from '@xmldom/xmldom';
|
|
2
|
+
import { EditorLegacyFormFieldData } from '../../core/model.js';
|
|
3
|
+
export declare function parseFfData(ffData: XmlElement): EditorLegacyFormFieldData | undefined;
|
|
4
|
+
export declare function serializeFfData(data: EditorLegacyFormFieldData): string;
|
|
5
|
+
export declare function isLegacyFormInstruction(raw: string): boolean;
|
|
@@ -539,10 +539,37 @@ export interface EssentialsBookmarkCapability {
|
|
|
539
539
|
list: () => BookmarkDescriptor[];
|
|
540
540
|
}
|
|
541
541
|
export interface EssentialsFieldsCapability {
|
|
542
|
+
markIndexEntry?: (options: import('../../core/commands/indexEntries.js').MarkIndexEntryOptions) => boolean;
|
|
543
|
+
insertIndex?: (options: import('../../core/commands/indexEntries.js').InsertIndexOptions) => boolean;
|
|
544
|
+
updateIndex?: (locale?: string) => boolean;
|
|
545
|
+
canMarkIndexEntry?: () => boolean;
|
|
546
|
+
canInsertIndex?: () => boolean;
|
|
547
|
+
canUpdateIndex?: () => boolean;
|
|
542
548
|
/** Explicit bounded refresh of eligible main-body fields. */
|
|
543
549
|
updateBodyFields?: () => void;
|
|
544
550
|
updateSelectedFields?: () => void;
|
|
545
551
|
canUpdateBodyFields?: () => boolean;
|
|
552
|
+
/** Generic field-code editing (preserved complex fields). */
|
|
553
|
+
insertFieldCode?: (code: string) => boolean;
|
|
554
|
+
editFieldCode?: (instructionRunId: string, code: string) => boolean;
|
|
555
|
+
editFieldCodeAtSelection?: (code: string) => boolean;
|
|
556
|
+
toggleFieldLock?: (fieldRunId: string) => boolean;
|
|
557
|
+
toggleFieldCodes?: (show: boolean) => void;
|
|
558
|
+
navigateField?: (direction: "next" | "previous") => void;
|
|
559
|
+
/** Table of authorities / figures. */
|
|
560
|
+
markAuthorityEntry?: (options: import('../../core/commands/tableOfAuthorities.js').MarkAuthorityEntryOptions) => boolean;
|
|
561
|
+
insertTableOfAuthorities?: (options: import('../../core/commands/tableOfAuthorities.js').InsertTableOfAuthoritiesOptions) => boolean;
|
|
562
|
+
updateTableOfAuthorities?: (locale?: string) => boolean;
|
|
563
|
+
insertTableOfFigures?: (options: import('../../core/commands/tableOfFigures.js').InsertTableOfFiguresOptions) => boolean;
|
|
564
|
+
updateTableOfFigures?: () => boolean;
|
|
565
|
+
/** Mail merge with caller-supplied records only. */
|
|
566
|
+
previewMergeRecord?: (records: readonly Readonly<Record<string, string>>[], index: number) => boolean;
|
|
567
|
+
mergeToNewDocuments?: (records: readonly Readonly<Record<string, string>>[]) => number;
|
|
568
|
+
/** Variable/ASK/FILLIN/formula refresh with an injected prompt resolver. */
|
|
569
|
+
updateVariableFields?: () => boolean;
|
|
570
|
+
/** Legacy form fields. */
|
|
571
|
+
setFormFieldValue?: (name: string, value: string) => boolean;
|
|
572
|
+
toggleFormCheckbox?: (name: string) => boolean;
|
|
546
573
|
/** Insert a DATE field at the active caret with the current date. */
|
|
547
574
|
insertDate: () => void;
|
|
548
575
|
/** Insert the current date as plain text (WordCraft `insert.dateTime`, update:false). */
|