oasis-editor 0.0.116 → 0.0.118
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-DY_N4M54.js → OasisEditorApp-DxTXNB8H.js} +2148 -859
- package/dist/{index-DLKF27_V.js → index-DxemmUXw.js} +1077 -796
- package/dist/index.d.ts +2 -2
- package/dist/layoutProjection/constants.d.ts +7 -1
- package/dist/layoutProjection/footnotePagination.d.ts +0 -1
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +63 -55
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +2 -99
- package/dist/ui/components/Dialogs/font-dialog/FontTab.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/AltTextTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/CellTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/ColumnTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/RowTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/TablePropertiesController.d.ts +12 -0
- package/dist/ui/components/Dialogs/table-properties/TablePropertiesTypes.d.ts +160 -0
- package/dist/ui/components/Dialogs/table-properties/TableTabPanel.d.ts +6 -0
- package/dist/ui/components/Dialogs/table-properties/fields.d.ts +9 -0
- package/dist/ui/components/Dialogs/table-properties/useTablePropertiesController.d.ts +4 -0
- package/dist/ui/components/Toolbar/primitives/useSurfaceRect.d.ts +20 -0
- package/dist/ui/public/ActionRow.d.ts +7 -0
- package/dist/ui/public/FieldGroup.d.ts +7 -0
- package/dist/ui/public/FieldRow.d.ts +13 -0
- package/dist/ui/public/FormField.d.ts +10 -0
- package/dist/ui/public/Heading.d.ts +6 -0
- package/dist/ui/public/NumberField.d.ts +13 -0
- package/dist/ui/public/Radio.d.ts +38 -0
- package/dist/ui/public/SelectField.d.ts +2 -0
- package/dist/ui/public/StatusText.d.ts +7 -0
- package/dist/ui/public/SurfaceButton.d.ts +10 -0
- package/dist/ui/public/Text.d.ts +8 -0
- package/dist/ui/public/TextAreaField.d.ts +11 -0
- package/dist/ui/public/TextField.d.ts +2 -0
- package/dist/ui/public/ToggleChip.d.ts +14 -0
- package/dist/ui/public/index.d.ts +24 -0
- package/package.json +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { E as EMPTY_PROJECTION_CONTEXT, d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as
|
|
4
|
+
import { E as EMPTY_PROJECTION_CONTEXT, d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as getPageBodyBottom, b as getPageBodyTop, c as getPageContentWidth, F as FOOTNOTE_MARKER_GUTTER_PX, f as getParagraphText, h as getBlockParagraphs, i as getRunFootnoteReference, l as listReferencedEndnotes, j as getFootnoteDisplayMarker, k as createProjectionContext, m as getDocumentSections, n as getRunField, o as projectBlocksLayout, u as useContext, s as splitProps, q as spread, r as mergeProps, t as memo, v as insert, w as createComponent, x as createRenderEffect, y as setAttribute, S as Show, z as className, A as For, B as createContext, C as template, D as createUniqueId, G as style, H as visitRun, I as assertNever, J as createSignal, K as createEditorStateFromDocument, L as createInitialEditorState, M as STANDARD_FONT_SIZES_PT, N as fontSizePxToPt, O as probeLocalFontFamilies, P as createEditorParagraphFromRuns, Q as isInlineObjectRun, R as createEditorStyledRun, T as getParagraphLength, U as getActiveZone, V as getActiveSectionIndex, W as getParagraphs, X as normalizeSelection, Y as positionToParagraphOffset, Z as paragraphOffsetToPosition, _ as clampPosition, $ as findParagraphIndex, a0 as createCollapsedSelection, a1 as isSelectionCollapsed, a2 as parseFontSizePtToPx, a3 as formatFontSizePt, a4 as createEditorParagraph, a5 as findParagraphTableLocation, a6 as buildTableCellLayout, a7 as PT_PER_PX, a8 as createEditorTableCell, a9 as createEditorTableRow, aa as createEditorTable, ab as PX_PER_POINT, ac as underlineStyleToCssDecorationStyle, ad as resolveImageSrc, ae as listKindForTag, af as isParagraphTag, ag as collectInlineRuns, ah as parseParagraphStyle, ai as getRunImage, aj as InlineShell, ak as BalloonShell, al as DocumentShell, am as createMemo, an as getCaretRectFromSnapshot, ao as getParagraphRectFromSnapshot, ap as CaretOverlay, aq as setStyleProperty, ar as Button, as as useI18n, at as createEffect, au as TextField, av as Dialog, aw as SelectField, ax as UNDERLINE_STYLE_OPTIONS, ay as delegateEvents, az as Text, aA as Checkbox, aB as StatusText, aC as FieldGroup, aD as Tabs, aE as FieldRow, aF as NumberField, aG as createStore, aH as reconcile, aI as TextAreaField, aJ as SurfaceButton, aK as ActionRow, aL as onMount, aM as onCleanup, aN as use, aO as PluginUiHost, aP as OasisEditorEditor, aQ as OasisBrandMark, aR as setPreciseFontPreference, aS as setWelcomeSeen, aT as enablePreciseFontMode, aU as TWIPS_PER_POINT, aV as PX_PER_INCH, aW as TWIPS_PER_INCH, aX as normalizeHex6, aY as TABLE_CONDITIONAL_FLAG_ATTRIBUTES, aZ as TABLE_BORDER_EDGE_KEYS, a_ as resolveEffectiveParagraphStyle, a$ as resolveEffectiveTextStyleForParagraph, b0 as EMU_PER_PT, b1 as OOXML_ROTATION_UNITS, b2 as OOXML_PERCENT_DENOMINATOR, b3 as parseHexColorToRgb255, b4 as EMU_PER_PX, b5 as getRunEndnoteReference, b6 as iterateFootnoteReferenceRuns, b7 as iterateEndnoteReferenceRuns, b8 as imageContentTypeDefaults, b9 as getRunFieldChar, ba as getRunFieldInstruction, bb as createEditorRun, bc as JSZip, bd as imageExtensionFromMime, be as pxToPt$1, bf as resolveFloatingObjectRect, bg as getTextBoxFloatingGeometry, bh as getPresetPathSegments, bi as buildListLabels, bj as DEFAULT_FONT_SIZE_PX, bk as resolveGradientAxis, bl as isDoubleUnderlineStyle, bm as isWavyUnderlineStyle, bn as underlineStyleLineWidthPx, bo as WAVY_UNDERLINE_WAVELENGTH_PX, bp as WAVY_UNDERLINE_AMPLITUDE_PX, bq as DOUBLE_UNDERLINE_OFFSET_PX, br as underlineStyleDashArray, bs as EMPHASIS_GLYPH, bt as rgb255ToHex, bu as getImageFloatingGeometry, bv as textStyleToFontSizePt, bw as TEXT_BASELINE_RATIO, bx as resolveOpenTypeFeatureTags, by as resolveDecorationLineY, bz as DOUBLE_STRIKE_OFFSET_PX, bA as resolveListLabel, bB as getListLabelInset, bC as getAlignedListLabelInset, bD as getParagraphBorderInsets, bE as buildSegmentTable, bF as buildCanvasTableLayout, bG as resolveCanvasTableWidth, bH as resolveFloatingTableRect, bI as normalizeFamily, bJ as ROBOTO_FONT_FILES, bK as loadFontAsset, bL as OFFICE_COMPAT_FONT_FAMILIES, bM as BinaryReader, bN as buildSfnt, bO as defaultFontDecoderRegistry, bP as SfntFontProgram, bQ as collectPdfFontFamilies, bR as outlineFrom, bS as getPageHeaderZoneTop, bT as getPageColumnRects, bU as findFootnoteReference, bV as resolveImporterForFile, bW as roundTo, bX as getDocumentSectionsCanonical, bY as getDocumentParagraphsCanonical, bZ as getDocumentParagraphs, b_ as getDocumentPageSettings, b$ as getTableCellContentWidthForParagraph, c0 as layoutMetricsEpoch, c1 as bumpLayoutMetricsEpoch, c2 as createCanvasLayoutSnapshotProvider, c3 as on, c4 as debounce, c5 as unwrap, c6 as perfTimer, c7 as getRunTextBox, c8 as createEditorDocument, c9 as resolveResizedDimensions, ca as resolveTextBoxRenderHeight, cb as getToolbarStyleState, cc as VERTICAL_HIT_WEIGHT, cd as getCachedCanvasImage, ce as measureParagraphMinContentWidthPx, cf as getEditableBlocksForZone, cg as findParagraphLocation, ch as createSectionBoundaryParagraph, ci as normalizePageSettings, cj as DEFAULT_EDITOR_PAGE_SETTINGS, ck as markStart, cl as markEnd, cm as getParagraphEntries, cn as getParagraphById, co as createEditorFootnote, cp as createFootnoteReferenceRun, cq as renumberFootnotes, cr as getHeadingLevel, cs as preciseFontModeVersion, ct as isPreciseFontModeEnabled, cu as resolveNamedTextStyle, cv as togglePreciseFontMode, cw as nextFontSizePt, cx as previousFontSizePt, cy as fontSizePtToPx, cz as createDefaultToolbarPreset, cA as MenuRegistry, cB as createToolbarRegistry, cC as Editor, cD as resolveCommandRef, cE as commandRefName, cF as createOasisEditorClient, cG as createEditorZoom, cH as startLongTaskObserver, cI as installGlobalReport, cJ as applyStoredPreciseFontPreference, cK as getWelcomeSeen, cL as isLocalFontAccessSupported, cM as EDITOR_SCROLL_PADDING_PX, cN as Toolbar, cO as OasisEditorLoading, cP as I18nProvider, cQ as createTranslator, cR as createEditorLogger, cS as registerDomStatsSurface } from "./index-DxemmUXw.js";
|
|
5
5
|
function projectHeaderFooterBlocksWithDependencies(blocks, deps, context = {}) {
|
|
6
6
|
const {
|
|
7
7
|
pageIndex,
|
|
@@ -77,6 +77,148 @@ function projectHeaderFooterBlocks(blocks, context = {}) {
|
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
|
+
const FOOTNOTE_SEPARATOR_HEIGHT = 10;
|
|
81
|
+
const FOOTNOTE_BLOCK_GAP = 2;
|
|
82
|
+
const MAX_FOOTNOTE_LAYOUT_ITERATIONS = 4;
|
|
83
|
+
function getProjectedBlocksHeight$1(blocks) {
|
|
84
|
+
if (!blocks || blocks.length === 0) {
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
return blocks.reduce((sum, block) => sum + block.estimatedHeight, 0);
|
|
88
|
+
}
|
|
89
|
+
function collectFootnoteReferencesFromBlock(block) {
|
|
90
|
+
var _a2, _b2;
|
|
91
|
+
const result = [];
|
|
92
|
+
const appendFromParagraph = (paragraph, startOffset, endOffset) => {
|
|
93
|
+
let runStart = 0;
|
|
94
|
+
for (const run of paragraph.runs) {
|
|
95
|
+
const runEnd = runStart + run.text.length;
|
|
96
|
+
const footnoteReference = getRunFootnoteReference(run);
|
|
97
|
+
if (footnoteReference && runEnd > startOffset && runStart < endOffset) {
|
|
98
|
+
result.push(footnoteReference.footnoteId);
|
|
99
|
+
}
|
|
100
|
+
runStart = runEnd;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
if (block.sourceBlock.type === "paragraph") {
|
|
104
|
+
appendFromParagraph(
|
|
105
|
+
block.sourceBlock,
|
|
106
|
+
((_a2 = block.layout) == null ? void 0 : _a2.startOffset) ?? 0,
|
|
107
|
+
((_b2 = block.layout) == null ? void 0 : _b2.endOffset) ?? getParagraphText(block.sourceBlock).length
|
|
108
|
+
);
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
for (const paragraph of getBlockParagraphs(block.sourceBlock)) {
|
|
112
|
+
appendFromParagraph(paragraph, 0, getParagraphText(paragraph).length);
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
function collectPageFootnoteReferenceIds(page) {
|
|
117
|
+
const seen = /* @__PURE__ */ new Set();
|
|
118
|
+
const ids = [];
|
|
119
|
+
for (const block of page.blocks) {
|
|
120
|
+
for (const footnoteId of collectFootnoteReferencesFromBlock(block)) {
|
|
121
|
+
if (seen.has(footnoteId)) continue;
|
|
122
|
+
seen.add(footnoteId);
|
|
123
|
+
ids.push(footnoteId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return ids;
|
|
127
|
+
}
|
|
128
|
+
function projectFootnoteBlocksForPage(document2, footnoteReferenceIds, page, totalPages, measuredHeights, measuredParagraphLayouts, measurer, projectBlocks) {
|
|
129
|
+
var _a2, _b2, _c;
|
|
130
|
+
const contentWidth = Math.max(
|
|
131
|
+
24,
|
|
132
|
+
getPageContentWidth(page.pageSettings) - FOOTNOTE_MARKER_GUTTER_PX
|
|
133
|
+
);
|
|
134
|
+
const blocks = [];
|
|
135
|
+
for (const footnoteId of footnoteReferenceIds) {
|
|
136
|
+
const footnote = (_b2 = (_a2 = document2.footnotes) == null ? void 0 : _a2.items) == null ? void 0 : _b2[footnoteId];
|
|
137
|
+
if (!footnote) continue;
|
|
138
|
+
const projected = projectBlocks(footnote.blocks, {
|
|
139
|
+
pageIndex: page.index,
|
|
140
|
+
totalPages,
|
|
141
|
+
measuredHeights,
|
|
142
|
+
measuredParagraphLayouts,
|
|
143
|
+
styles: document2.styles,
|
|
144
|
+
contentWidth,
|
|
145
|
+
measurer,
|
|
146
|
+
defaultTabStop: (_c = document2.settings) == null ? void 0 : _c.defaultTabStop
|
|
147
|
+
});
|
|
148
|
+
for (const block of projected) {
|
|
149
|
+
blocks.push({
|
|
150
|
+
...block,
|
|
151
|
+
blockId: `${footnoteId}:${block.blockId}`
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return blocks;
|
|
156
|
+
}
|
|
157
|
+
function buildFootnoteReservations(pages, context) {
|
|
158
|
+
const reservations = /* @__PURE__ */ new Map();
|
|
159
|
+
for (const page of pages) {
|
|
160
|
+
const footnoteReferenceIds = collectPageFootnoteReferenceIds(page);
|
|
161
|
+
if (footnoteReferenceIds.length === 0) continue;
|
|
162
|
+
const footnoteBlocks = projectFootnoteBlocksForPage(
|
|
163
|
+
context.document,
|
|
164
|
+
footnoteReferenceIds,
|
|
165
|
+
page,
|
|
166
|
+
context.totalPages,
|
|
167
|
+
context.measuredHeights,
|
|
168
|
+
context.measuredParagraphLayouts,
|
|
169
|
+
context.measurer,
|
|
170
|
+
context.projectBlocks
|
|
171
|
+
);
|
|
172
|
+
if (footnoteBlocks.length === 0) continue;
|
|
173
|
+
const blockGaps = Math.max(0, footnoteBlocks.length - 1) * FOOTNOTE_BLOCK_GAP;
|
|
174
|
+
reservations.set(
|
|
175
|
+
page.index,
|
|
176
|
+
FOOTNOTE_SEPARATOR_HEIGHT + getProjectedBlocksHeight$1(footnoteBlocks) + blockGaps
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
return reservations;
|
|
180
|
+
}
|
|
181
|
+
function reservationSignature(reservations) {
|
|
182
|
+
return [...reservations.entries()].sort(([left], [right]) => left - right).map(([pageIndex, height]) => `${pageIndex}:${Math.round(height)}`).join("|");
|
|
183
|
+
}
|
|
184
|
+
function applyFootnotesToPages(pages, context) {
|
|
185
|
+
return pages.map((page) => {
|
|
186
|
+
const footnoteReferenceIds = collectPageFootnoteReferenceIds(page);
|
|
187
|
+
if (footnoteReferenceIds.length === 0) {
|
|
188
|
+
return {
|
|
189
|
+
...page,
|
|
190
|
+
footnoteBlocks: void 0,
|
|
191
|
+
footnoteReferenceIds: void 0,
|
|
192
|
+
footnoteTop: void 0,
|
|
193
|
+
footnoteSeparatorTop: void 0
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const footnoteBlocks = projectFootnoteBlocksForPage(
|
|
197
|
+
context.document,
|
|
198
|
+
footnoteReferenceIds,
|
|
199
|
+
page,
|
|
200
|
+
context.totalPages,
|
|
201
|
+
context.measuredHeights,
|
|
202
|
+
context.measuredParagraphLayouts,
|
|
203
|
+
context.measurer,
|
|
204
|
+
context.projectBlocks
|
|
205
|
+
);
|
|
206
|
+
const bodyBottom = page.bodyBottom ?? getPageBodyBottom(page.pageSettings);
|
|
207
|
+
const footnoteSeparatorTop = Math.max(
|
|
208
|
+
page.bodyTop ?? getPageBodyTop(page.pageSettings),
|
|
209
|
+
bodyBottom
|
|
210
|
+
);
|
|
211
|
+
const footnoteTop = footnoteSeparatorTop + FOOTNOTE_SEPARATOR_HEIGHT;
|
|
212
|
+
return {
|
|
213
|
+
...page,
|
|
214
|
+
footnoteBlocks,
|
|
215
|
+
footnoteReferenceIds,
|
|
216
|
+
footnoteSeparatorTop,
|
|
217
|
+
footnoteTop,
|
|
218
|
+
bodyBottom
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
}
|
|
80
222
|
function getProjectedBlocksHeight(blocks) {
|
|
81
223
|
if (!blocks || blocks.length === 0) {
|
|
82
224
|
return 0;
|
|
@@ -464,6 +606,163 @@ function projectDocumentLayout(document2, maxPageHeightOverride, measuredHeights
|
|
|
464
606
|
pages: applyFootnotesToPages(pages, footnoteContext)
|
|
465
607
|
};
|
|
466
608
|
}
|
|
609
|
+
var _tmpl$$g = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$6 = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$4$2 = /* @__PURE__ */ template(`<div role=radiogroup>`);
|
|
610
|
+
const RadioGroupCtx = createContext();
|
|
611
|
+
function Radio$1(props) {
|
|
612
|
+
const fallbackId = createUniqueId();
|
|
613
|
+
const group = useContext(RadioGroupCtx);
|
|
614
|
+
const [local, others] = splitProps(props, ["label", "description", "value", "onChange", "class", "id", "checked", "name", "disabled"]);
|
|
615
|
+
const id = () => local.id ?? fallbackId;
|
|
616
|
+
const descriptionId = () => `${id()}-description`;
|
|
617
|
+
const checked = () => group ? group.value() === local.value : Boolean(local.checked);
|
|
618
|
+
const disabled = () => Boolean(local.disabled) || (group ? group.disabled() : false);
|
|
619
|
+
return (() => {
|
|
620
|
+
var _el$ = _tmpl$2$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
621
|
+
_el$2.addEventListener("change", (event) => {
|
|
622
|
+
var _a2;
|
|
623
|
+
if (group) group.onSelect(local.value);
|
|
624
|
+
(_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.checked);
|
|
625
|
+
});
|
|
626
|
+
spread(_el$2, mergeProps({
|
|
627
|
+
get id() {
|
|
628
|
+
return id();
|
|
629
|
+
},
|
|
630
|
+
get name() {
|
|
631
|
+
return local.name ?? (group == null ? void 0 : group.name);
|
|
632
|
+
},
|
|
633
|
+
get value() {
|
|
634
|
+
return local.value;
|
|
635
|
+
},
|
|
636
|
+
get checked() {
|
|
637
|
+
return checked();
|
|
638
|
+
},
|
|
639
|
+
get disabled() {
|
|
640
|
+
return disabled();
|
|
641
|
+
},
|
|
642
|
+
get ["aria-describedby"]() {
|
|
643
|
+
return memo(() => !!local.description)() ? descriptionId() : void 0;
|
|
644
|
+
}
|
|
645
|
+
}, others), false, false);
|
|
646
|
+
insert(_el$4, () => local.label);
|
|
647
|
+
insert(_el$3, createComponent(Show, {
|
|
648
|
+
get when() {
|
|
649
|
+
return local.description;
|
|
650
|
+
},
|
|
651
|
+
get children() {
|
|
652
|
+
var _el$5 = _tmpl$$g();
|
|
653
|
+
insert(_el$5, () => local.description);
|
|
654
|
+
createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
|
|
655
|
+
return _el$5;
|
|
656
|
+
}
|
|
657
|
+
}), null);
|
|
658
|
+
createRenderEffect((_p$) => {
|
|
659
|
+
var _v$ = `oasis-editor-ui-radio ${local.class ?? ""}`, _v$2 = id();
|
|
660
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
661
|
+
_v$2 !== _p$.t && setAttribute(_el$, "for", _p$.t = _v$2);
|
|
662
|
+
return _p$;
|
|
663
|
+
}, {
|
|
664
|
+
e: void 0,
|
|
665
|
+
t: void 0
|
|
666
|
+
});
|
|
667
|
+
return _el$;
|
|
668
|
+
})();
|
|
669
|
+
}
|
|
670
|
+
function RadioGroup(props) {
|
|
671
|
+
const fallbackName = createUniqueId();
|
|
672
|
+
const ctx = {
|
|
673
|
+
name: props.name ?? fallbackName,
|
|
674
|
+
value: () => props.value,
|
|
675
|
+
onSelect: (value) => {
|
|
676
|
+
var _a2;
|
|
677
|
+
return (_a2 = props.onChange) == null ? void 0 : _a2.call(props, value);
|
|
678
|
+
},
|
|
679
|
+
disabled: () => Boolean(props.disabled)
|
|
680
|
+
};
|
|
681
|
+
return createComponent(RadioGroupCtx.Provider, {
|
|
682
|
+
value: ctx,
|
|
683
|
+
get children() {
|
|
684
|
+
var _el$6 = _tmpl$4$2();
|
|
685
|
+
insert(_el$6, createComponent(Show, {
|
|
686
|
+
get when() {
|
|
687
|
+
return props.label;
|
|
688
|
+
},
|
|
689
|
+
get children() {
|
|
690
|
+
var _el$7 = _tmpl$3$5();
|
|
691
|
+
insert(_el$7, () => props.label);
|
|
692
|
+
return _el$7;
|
|
693
|
+
}
|
|
694
|
+
}), null);
|
|
695
|
+
insert(_el$6, createComponent(Show, {
|
|
696
|
+
get when() {
|
|
697
|
+
return props.options;
|
|
698
|
+
},
|
|
699
|
+
get fallback() {
|
|
700
|
+
return props.children;
|
|
701
|
+
},
|
|
702
|
+
get children() {
|
|
703
|
+
return createComponent(For, {
|
|
704
|
+
get each() {
|
|
705
|
+
return props.options;
|
|
706
|
+
},
|
|
707
|
+
children: (option) => createComponent(Radio$1, {
|
|
708
|
+
get value() {
|
|
709
|
+
return option.value;
|
|
710
|
+
},
|
|
711
|
+
get label() {
|
|
712
|
+
return option.label;
|
|
713
|
+
},
|
|
714
|
+
get description() {
|
|
715
|
+
return option.description;
|
|
716
|
+
},
|
|
717
|
+
get disabled() {
|
|
718
|
+
return option.disabled;
|
|
719
|
+
}
|
|
720
|
+
})
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
}), null);
|
|
724
|
+
createRenderEffect((_p$) => {
|
|
725
|
+
var _v$3 = `oasis-editor-ui-radio-group ${props.class ?? ""}`, _v$4 = props.label;
|
|
726
|
+
_v$3 !== _p$.e && className(_el$6, _p$.e = _v$3);
|
|
727
|
+
_v$4 !== _p$.t && setAttribute(_el$6, "aria-label", _p$.t = _v$4);
|
|
728
|
+
return _p$;
|
|
729
|
+
}, {
|
|
730
|
+
e: void 0,
|
|
731
|
+
t: void 0
|
|
732
|
+
});
|
|
733
|
+
return _el$6;
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
var _tmpl$$f = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>`);
|
|
738
|
+
function ToggleChip(props) {
|
|
739
|
+
const [local, others] = splitProps(props, ["label", "labelStyle", "onChange", "class", "checked"]);
|
|
740
|
+
return (() => {
|
|
741
|
+
var _el$ = _tmpl$$f(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
742
|
+
_el$2.addEventListener("change", (event) => {
|
|
743
|
+
var _a2;
|
|
744
|
+
return (_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.checked);
|
|
745
|
+
});
|
|
746
|
+
spread(_el$2, mergeProps({
|
|
747
|
+
get checked() {
|
|
748
|
+
return local.checked;
|
|
749
|
+
}
|
|
750
|
+
}, others), false, false);
|
|
751
|
+
insert(_el$3, () => local.label);
|
|
752
|
+
createRenderEffect((_p$) => {
|
|
753
|
+
var _v$ = `oasis-editor-ui-toggle-chip ${local.class ?? ""}`, _v$2 = !!Boolean(local.checked), _v$3 = local.labelStyle;
|
|
754
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
755
|
+
_v$2 !== _p$.t && _el$.classList.toggle("is-active", _p$.t = _v$2);
|
|
756
|
+
_p$.a = style(_el$3, _v$3, _p$.a);
|
|
757
|
+
return _p$;
|
|
758
|
+
}, {
|
|
759
|
+
e: void 0,
|
|
760
|
+
t: void 0,
|
|
761
|
+
a: void 0
|
|
762
|
+
});
|
|
763
|
+
return _el$;
|
|
764
|
+
})();
|
|
765
|
+
}
|
|
467
766
|
function cloneStyle(style2) {
|
|
468
767
|
return style2 ? { ...style2 } : void 0;
|
|
469
768
|
}
|
|
@@ -31149,14 +31448,14 @@ function DropCaret(props) {
|
|
|
31149
31448
|
})
|
|
31150
31449
|
});
|
|
31151
31450
|
}
|
|
31152
|
-
var _tmpl$$
|
|
31451
|
+
var _tmpl$$e = /* @__PURE__ */ template(`<div class=oasis-editor-table-resize-guide>`), _tmpl$2$5 = /* @__PURE__ */ template(`<img class=oasis-editor-image-ghost>`), _tmpl$3$4 = /* @__PURE__ */ template(`<div class=oasis-editor-table-ghost>`);
|
|
31153
31452
|
function EditorDragLayers(props) {
|
|
31154
31453
|
return [createComponent(Show, {
|
|
31155
31454
|
get when() {
|
|
31156
31455
|
return props.tableResize.resizing();
|
|
31157
31456
|
},
|
|
31158
31457
|
children: (resizing) => (() => {
|
|
31159
|
-
var _el$ = _tmpl$$
|
|
31458
|
+
var _el$ = _tmpl$$e();
|
|
31160
31459
|
createRenderEffect((_p$) => {
|
|
31161
31460
|
var _v$ = !!(resizing().type === "column"), _v$2 = !!(resizing().type === "row"), _v$3 = {
|
|
31162
31461
|
...resizing().type === "column" ? {
|
|
@@ -31187,7 +31486,7 @@ function EditorDragLayers(props) {
|
|
|
31187
31486
|
return memo(() => !!props.imageOps.dragging())() && props.imageOps.draggedImageInfo();
|
|
31188
31487
|
},
|
|
31189
31488
|
children: (info) => (() => {
|
|
31190
|
-
var _el$2 = _tmpl$2$
|
|
31489
|
+
var _el$2 = _tmpl$2$5();
|
|
31191
31490
|
createRenderEffect((_p$) => {
|
|
31192
31491
|
var _v$4 = info().src, _v$5 = `${info().width}px`, _v$6 = `${info().height}px`, _v$7 = `${props.imageOps.mousePos().x - info().offsetX}px`, _v$8 = `${props.imageOps.mousePos().y - info().offsetY}px`;
|
|
31193
31492
|
_v$4 !== _p$.e && setAttribute(_el$2, "src", _p$.e = _v$4);
|
|
@@ -31300,24 +31599,31 @@ function EditorDragLayers(props) {
|
|
|
31300
31599
|
})
|
|
31301
31600
|
})];
|
|
31302
31601
|
}
|
|
31303
|
-
var _tmpl$$c = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary">`), _tmpl$2$6 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary">`);
|
|
31304
31602
|
function DialogFooter(props) {
|
|
31305
|
-
return [(
|
|
31306
|
-
|
|
31307
|
-
|
|
31308
|
-
|
|
31309
|
-
|
|
31310
|
-
|
|
31311
|
-
|
|
31312
|
-
|
|
31313
|
-
|
|
31314
|
-
|
|
31315
|
-
|
|
31316
|
-
|
|
31317
|
-
|
|
31318
|
-
|
|
31319
|
-
|
|
31320
|
-
|
|
31603
|
+
return [createComponent(Button, {
|
|
31604
|
+
variant: "secondary",
|
|
31605
|
+
get onClick() {
|
|
31606
|
+
return props.onCancel;
|
|
31607
|
+
},
|
|
31608
|
+
get ["data-testid"]() {
|
|
31609
|
+
return props.cancelTestId;
|
|
31610
|
+
},
|
|
31611
|
+
get children() {
|
|
31612
|
+
return props.cancelLabel;
|
|
31613
|
+
}
|
|
31614
|
+
}), createComponent(Button, {
|
|
31615
|
+
variant: "primary",
|
|
31616
|
+
get onClick() {
|
|
31617
|
+
return props.onConfirm;
|
|
31618
|
+
},
|
|
31619
|
+
get ["data-testid"]() {
|
|
31620
|
+
return props.confirmTestId;
|
|
31621
|
+
},
|
|
31622
|
+
get children() {
|
|
31623
|
+
return props.confirmLabel;
|
|
31624
|
+
}
|
|
31625
|
+
})];
|
|
31626
|
+
}
|
|
31321
31627
|
function TextInputDialog(props) {
|
|
31322
31628
|
const t = useI18n();
|
|
31323
31629
|
const [value, setValue] = createSignal(props.initialValue);
|
|
@@ -31365,28 +31671,30 @@ function TextInputDialog(props) {
|
|
|
31365
31671
|
});
|
|
31366
31672
|
},
|
|
31367
31673
|
get children() {
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31377
|
-
|
|
31378
|
-
|
|
31379
|
-
|
|
31380
|
-
|
|
31381
|
-
|
|
31382
|
-
|
|
31674
|
+
return createComponent(TextField, {
|
|
31675
|
+
ref(r$) {
|
|
31676
|
+
var _ref$ = inputRef;
|
|
31677
|
+
typeof _ref$ === "function" ? _ref$(r$) : inputRef = r$;
|
|
31678
|
+
},
|
|
31679
|
+
get label() {
|
|
31680
|
+
return props.label;
|
|
31681
|
+
},
|
|
31682
|
+
get value() {
|
|
31683
|
+
return value();
|
|
31684
|
+
},
|
|
31685
|
+
onChange: setValue,
|
|
31686
|
+
onKeyDown: (e) => e.key === "Enter" && handleConfirm(),
|
|
31687
|
+
get placeholder() {
|
|
31688
|
+
return props.placeholder;
|
|
31689
|
+
},
|
|
31690
|
+
get ["data-testid"]() {
|
|
31691
|
+
var _a2;
|
|
31692
|
+
return (_a2 = props.testIds) == null ? void 0 : _a2.input;
|
|
31693
|
+
}
|
|
31383
31694
|
});
|
|
31384
|
-
createRenderEffect(() => _el$3.value = value());
|
|
31385
|
-
return _el$;
|
|
31386
31695
|
}
|
|
31387
31696
|
});
|
|
31388
31697
|
}
|
|
31389
|
-
delegateEvents(["input", "keydown"]);
|
|
31390
31698
|
function LinkDialog(props) {
|
|
31391
31699
|
const t = useI18n();
|
|
31392
31700
|
return createComponent(TextInputDialog, {
|
|
@@ -31797,11 +32105,11 @@ function useFontDialogController(props) {
|
|
|
31797
32105
|
handleApply
|
|
31798
32106
|
};
|
|
31799
32107
|
}
|
|
31800
|
-
var _tmpl$$
|
|
32108
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<div>`);
|
|
31801
32109
|
function FontPreview(props) {
|
|
31802
32110
|
const t = useI18n();
|
|
31803
32111
|
return (() => {
|
|
31804
|
-
var _el$ = _tmpl$$
|
|
32112
|
+
var _el$ = _tmpl$$d();
|
|
31805
32113
|
insert(_el$, () => t("dialog.font.previewText"));
|
|
31806
32114
|
createRenderEffect((_p$) => {
|
|
31807
32115
|
var _v$ = props.class ?? "oasis-editor-dialog-preview", _v$2 = props.testId, _v$3 = props.style;
|
|
@@ -31817,133 +32125,253 @@ function FontPreview(props) {
|
|
|
31817
32125
|
return _el$;
|
|
31818
32126
|
})();
|
|
31819
32127
|
}
|
|
31820
|
-
var _tmpl$$
|
|
32128
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<div class="oasis-editor-font-dialog-panel oasis-editor-font-dialog-font-panel"><div class=oasis-editor-dialog-row></div><div class=oasis-editor-dialog-row></div><div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-font-dialog-custom-size-group"><span class=oasis-editor-dialog-help-text></span></div></div><div class="oasis-editor-dialog-row oasis-editor-font-dialog-color-row"><div class="oasis-editor-dialog-input-group oasis-editor-font-dialog-color-mode-group"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-font-dialog-color-mode><option value=automatic></option><option value=custom></option></select><input type=color class=oasis-editor-dialog-color data-testid=editor-font-dialog-color></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-color data-testid=editor-font-dialog-highlight></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-color data-testid=editor-font-dialog-shading></div></div><div class=oasis-editor-dialog-row><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-color data-testid=editor-font-dialog-underline-color></div></div><div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-style-row></div></div></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label>`);
|
|
31821
32129
|
function FontTab(props) {
|
|
31822
32130
|
const t = useI18n();
|
|
31823
32131
|
const {
|
|
31824
32132
|
ctrl
|
|
31825
32133
|
} = props;
|
|
32134
|
+
const effectToggles = () => [{
|
|
32135
|
+
testId: "editor-font-dialog-bold",
|
|
32136
|
+
label: t("dialog.font.bold"),
|
|
32137
|
+
labelStyle: {
|
|
32138
|
+
"font-weight": 700
|
|
32139
|
+
},
|
|
32140
|
+
checked: () => ctrl.fontTabValues().bold,
|
|
32141
|
+
onChange: (checked) => ctrl.updateFontTab("bold", checked)
|
|
32142
|
+
}, {
|
|
32143
|
+
testId: "editor-font-dialog-italic",
|
|
32144
|
+
label: t("dialog.font.italic"),
|
|
32145
|
+
labelStyle: {
|
|
32146
|
+
"font-style": "italic"
|
|
32147
|
+
},
|
|
32148
|
+
checked: () => ctrl.fontTabValues().italic,
|
|
32149
|
+
onChange: (checked) => ctrl.updateFontTab("italic", checked)
|
|
32150
|
+
}, {
|
|
32151
|
+
testId: "editor-font-dialog-underline",
|
|
32152
|
+
label: t("dialog.font.underline"),
|
|
32153
|
+
labelStyle: {
|
|
32154
|
+
"text-decoration": "underline"
|
|
32155
|
+
},
|
|
32156
|
+
checked: () => ctrl.fontTabValues().underline,
|
|
32157
|
+
onChange: (checked) => ctrl.setFontTabValues((current) => ({
|
|
32158
|
+
...current,
|
|
32159
|
+
underline: checked,
|
|
32160
|
+
underlineStyle: checked ? current.underlineStyle === "none" ? "single" : current.underlineStyle : "none"
|
|
32161
|
+
}))
|
|
32162
|
+
}, {
|
|
32163
|
+
testId: "editor-font-dialog-strike",
|
|
32164
|
+
label: t("dialog.font.strike"),
|
|
32165
|
+
labelStyle: {
|
|
32166
|
+
"text-decoration": "line-through"
|
|
32167
|
+
},
|
|
32168
|
+
checked: () => ctrl.fontTabValues().strike,
|
|
32169
|
+
onChange: (checked) => ctrl.setFontTabValues((current) => ({
|
|
32170
|
+
...current,
|
|
32171
|
+
strike: checked,
|
|
32172
|
+
doubleStrike: checked ? false : current.doubleStrike
|
|
32173
|
+
}))
|
|
32174
|
+
}, {
|
|
32175
|
+
testId: "editor-font-dialog-double-strike",
|
|
32176
|
+
label: t("dialog.font.doubleStrike"),
|
|
32177
|
+
checked: () => ctrl.fontTabValues().doubleStrike,
|
|
32178
|
+
onChange: (checked) => ctrl.setFontTabValues((current) => ({
|
|
32179
|
+
...current,
|
|
32180
|
+
doubleStrike: checked,
|
|
32181
|
+
strike: checked ? false : current.strike
|
|
32182
|
+
}))
|
|
32183
|
+
}, {
|
|
32184
|
+
testId: "editor-font-dialog-superscript",
|
|
32185
|
+
label: t("toolbar.superscript"),
|
|
32186
|
+
checked: () => ctrl.fontTabValues().superscript,
|
|
32187
|
+
onChange: (checked) => ctrl.setFontTabValues((current) => ({
|
|
32188
|
+
...current,
|
|
32189
|
+
superscript: checked,
|
|
32190
|
+
subscript: checked ? false : current.subscript
|
|
32191
|
+
}))
|
|
32192
|
+
}, {
|
|
32193
|
+
testId: "editor-font-dialog-subscript",
|
|
32194
|
+
label: t("toolbar.subscript"),
|
|
32195
|
+
checked: () => ctrl.fontTabValues().subscript,
|
|
32196
|
+
onChange: (checked) => ctrl.setFontTabValues((current) => ({
|
|
32197
|
+
...current,
|
|
32198
|
+
subscript: checked,
|
|
32199
|
+
superscript: checked ? false : current.superscript
|
|
32200
|
+
}))
|
|
32201
|
+
}, {
|
|
32202
|
+
testId: "editor-font-dialog-small-caps",
|
|
32203
|
+
label: t("dialog.font.smallCaps"),
|
|
32204
|
+
checked: () => ctrl.fontTabValues().smallCaps,
|
|
32205
|
+
onChange: (checked) => ctrl.updateFontTab("smallCaps", checked)
|
|
32206
|
+
}, {
|
|
32207
|
+
testId: "editor-font-dialog-all-caps",
|
|
32208
|
+
label: t("dialog.font.allCaps"),
|
|
32209
|
+
checked: () => ctrl.fontTabValues().allCaps,
|
|
32210
|
+
onChange: (checked) => ctrl.updateFontTab("allCaps", checked)
|
|
32211
|
+
}, {
|
|
32212
|
+
testId: "editor-font-dialog-hidden",
|
|
32213
|
+
label: t("dialog.font.hidden"),
|
|
32214
|
+
checked: () => ctrl.fontTabValues().hidden,
|
|
32215
|
+
onChange: (checked) => ctrl.updateFontTab("hidden", checked)
|
|
32216
|
+
}];
|
|
31826
32217
|
return (() => {
|
|
31827
|
-
var _el$ = _tmpl$$
|
|
31828
|
-
_el$
|
|
31829
|
-
|
|
31830
|
-
|
|
31831
|
-
|
|
31832
|
-
|
|
31833
|
-
|
|
31834
|
-
|
|
31835
|
-
_el$9.addEventListener("change", (e) => ctrl.updateFontTab("fontFamily", e.currentTarget.value));
|
|
31836
|
-
insert(_el$9, createComponent(For, {
|
|
31837
|
-
get each() {
|
|
31838
|
-
return ctrl.visibleFamilyOptions();
|
|
32218
|
+
var _el$ = _tmpl$$c(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$0.nextSibling, _el$12 = _el$8.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$7.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$18.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$22.nextSibling, _el$27 = _el$26.firstChild;
|
|
32219
|
+
insert(_el$2, createComponent(TextField, {
|
|
32220
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
32221
|
+
get label() {
|
|
32222
|
+
return t("dialog.font.familyFilter");
|
|
32223
|
+
},
|
|
32224
|
+
get value() {
|
|
32225
|
+
return ctrl.fontTabValues().familyFilter;
|
|
31839
32226
|
},
|
|
31840
|
-
|
|
31841
|
-
|
|
31842
|
-
|
|
31843
|
-
|
|
31844
|
-
|
|
31845
|
-
|
|
32227
|
+
onChange: (value) => ctrl.updateFontTab("familyFilter", value),
|
|
32228
|
+
"data-testid": "editor-font-dialog-family-filter"
|
|
32229
|
+
}));
|
|
32230
|
+
insert(_el$3, createComponent(SelectField, {
|
|
32231
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
32232
|
+
get label() {
|
|
32233
|
+
return t("dialog.font.family");
|
|
32234
|
+
},
|
|
32235
|
+
get value() {
|
|
32236
|
+
return ctrl.fontTabValues().fontFamily;
|
|
32237
|
+
},
|
|
32238
|
+
onChange: (value) => ctrl.updateFontTab("fontFamily", value),
|
|
32239
|
+
"data-testid": "editor-font-dialog-family",
|
|
32240
|
+
get options() {
|
|
32241
|
+
return [{
|
|
32242
|
+
value: "",
|
|
32243
|
+
label: "—"
|
|
32244
|
+
}, ...ctrl.visibleFamilyOptions().map((family) => ({
|
|
32245
|
+
value: family,
|
|
32246
|
+
label: family
|
|
32247
|
+
}))];
|
|
32248
|
+
}
|
|
31846
32249
|
}), null);
|
|
31847
|
-
insert(_el$
|
|
31848
|
-
|
|
31849
|
-
|
|
31850
|
-
|
|
31851
|
-
return ctrl.effectiveSizeOptions();
|
|
32250
|
+
insert(_el$3, createComponent(SelectField, {
|
|
32251
|
+
"class": "oasis-editor-font-dialog-size-group",
|
|
32252
|
+
get label() {
|
|
32253
|
+
return t("dialog.font.size");
|
|
31852
32254
|
},
|
|
31853
|
-
|
|
31854
|
-
|
|
31855
|
-
|
|
31856
|
-
|
|
31857
|
-
|
|
31858
|
-
|
|
32255
|
+
get value() {
|
|
32256
|
+
return ctrl.fontTabValues().fontSize;
|
|
32257
|
+
},
|
|
32258
|
+
onChange: (value) => ctrl.updateFontTab("fontSize", value),
|
|
32259
|
+
"data-testid": "editor-font-dialog-size",
|
|
32260
|
+
get options() {
|
|
32261
|
+
return [{
|
|
32262
|
+
value: "",
|
|
32263
|
+
label: "—"
|
|
32264
|
+
}, ...ctrl.effectiveSizeOptions().map((size) => ({
|
|
32265
|
+
value: String(size),
|
|
32266
|
+
label: String(size)
|
|
32267
|
+
}))];
|
|
32268
|
+
}
|
|
31859
32269
|
}), null);
|
|
31860
|
-
insert(_el$
|
|
31861
|
-
|
|
31862
|
-
|
|
31863
|
-
|
|
31864
|
-
|
|
31865
|
-
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
_el$
|
|
31871
|
-
insert(_el$
|
|
31872
|
-
|
|
31873
|
-
|
|
32270
|
+
insert(_el$5, createComponent(TextField, {
|
|
32271
|
+
get label() {
|
|
32272
|
+
return t("dialog.font.customSize");
|
|
32273
|
+
},
|
|
32274
|
+
get value() {
|
|
32275
|
+
return ctrl.fontTabValues().fontSize;
|
|
32276
|
+
},
|
|
32277
|
+
onChange: (value) => ctrl.updateFontTab("fontSize", value),
|
|
32278
|
+
"data-testid": "editor-font-dialog-custom-size"
|
|
32279
|
+
}), _el$6);
|
|
32280
|
+
insert(_el$6, () => ctrl.customSizeError());
|
|
32281
|
+
insert(_el$4, createComponent(SelectField, {
|
|
32282
|
+
"class": "oasis-editor-font-dialog-style-list-group",
|
|
32283
|
+
get label() {
|
|
32284
|
+
return t("dialog.font.styleList");
|
|
32285
|
+
},
|
|
32286
|
+
get value() {
|
|
32287
|
+
return ctrl.selectedFontStyle();
|
|
32288
|
+
},
|
|
32289
|
+
onChange: (value) => ctrl.applyFontStylePreset(value),
|
|
32290
|
+
"data-testid": "editor-font-dialog-style-list",
|
|
32291
|
+
get options() {
|
|
32292
|
+
return [{
|
|
32293
|
+
value: "regular",
|
|
32294
|
+
label: t("dialog.font.styleRegular")
|
|
32295
|
+
}, {
|
|
32296
|
+
value: "italic",
|
|
32297
|
+
label: t("dialog.font.styleItalic")
|
|
32298
|
+
}, {
|
|
32299
|
+
value: "bold",
|
|
32300
|
+
label: t("dialog.font.styleBold")
|
|
32301
|
+
}, {
|
|
32302
|
+
value: "boldItalic",
|
|
32303
|
+
label: t("dialog.font.styleBoldItalic")
|
|
32304
|
+
}];
|
|
32305
|
+
}
|
|
32306
|
+
}), null);
|
|
32307
|
+
insert(_el$9, () => t("dialog.font.color"));
|
|
32308
|
+
_el$0.addEventListener("change", (e) => ctrl.updateFontTab("colorMode", e.currentTarget.value));
|
|
32309
|
+
insert(_el$1, () => t("toolbar.colorAutomatic"));
|
|
32310
|
+
insert(_el$10, () => t("dialog.font.customColor"));
|
|
32311
|
+
_el$11.$$input = (e) => ctrl.setFontTabValues((current) => ({
|
|
31874
32312
|
...current,
|
|
31875
32313
|
color: e.currentTarget.value,
|
|
31876
32314
|
colorMode: "custom"
|
|
31877
32315
|
}));
|
|
31878
|
-
insert(_el$
|
|
31879
|
-
_el$
|
|
31880
|
-
insert(_el$
|
|
31881
|
-
_el$
|
|
31882
|
-
insert(_el$
|
|
31883
|
-
|
|
31884
|
-
|
|
31885
|
-
|
|
31886
|
-
|
|
31887
|
-
|
|
31888
|
-
|
|
31889
|
-
|
|
31890
|
-
|
|
31891
|
-
|
|
31892
|
-
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
|
|
31899
|
-
|
|
32316
|
+
insert(_el$13, () => t("dialog.font.highlight"));
|
|
32317
|
+
_el$14.$$input = (e) => ctrl.updateFontTab("highlight", e.currentTarget.value);
|
|
32318
|
+
insert(_el$16, () => t("dialog.font.shading"));
|
|
32319
|
+
_el$17.$$input = (e) => ctrl.updateFontTab("shading", e.currentTarget.value);
|
|
32320
|
+
insert(_el$18, createComponent(SelectField, {
|
|
32321
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
32322
|
+
get label() {
|
|
32323
|
+
return t("dialog.font.underlineStyle");
|
|
32324
|
+
},
|
|
32325
|
+
get value() {
|
|
32326
|
+
return ctrl.fontTabValues().underlineStyle;
|
|
32327
|
+
},
|
|
32328
|
+
onChange: (value) => ctrl.setFontTabValues((current) => ({
|
|
32329
|
+
...current,
|
|
32330
|
+
underlineStyle: value,
|
|
32331
|
+
underline: value !== "none"
|
|
32332
|
+
})),
|
|
32333
|
+
"data-testid": "editor-font-dialog-underline-style",
|
|
32334
|
+
get options() {
|
|
32335
|
+
return [{
|
|
32336
|
+
value: "none",
|
|
32337
|
+
label: t("toolbar.underlineRemove")
|
|
32338
|
+
}, ...UNDERLINE_STYLE_OPTIONS.map((option) => ({
|
|
32339
|
+
value: option.value,
|
|
32340
|
+
label: t(option.labelKey)
|
|
32341
|
+
}))];
|
|
32342
|
+
}
|
|
32343
|
+
}), _el$19);
|
|
32344
|
+
insert(_el$20, () => t("dialog.font.underlineColor"));
|
|
32345
|
+
_el$21.$$input = (e) => ctrl.setFontTabValues((current) => ({
|
|
31900
32346
|
...current,
|
|
31901
32347
|
underlineColor: e.currentTarget.value,
|
|
31902
32348
|
underline: current.underlineStyle !== "none"
|
|
31903
32349
|
}));
|
|
31904
|
-
insert(_el$
|
|
31905
|
-
_el$
|
|
31906
|
-
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
|
|
31910
|
-
|
|
31911
|
-
|
|
31912
|
-
|
|
31913
|
-
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
|
|
31917
|
-
|
|
31918
|
-
|
|
31919
|
-
|
|
31920
|
-
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
|
|
31927
|
-
_el$
|
|
31928
|
-
|
|
31929
|
-
superscript: e.currentTarget.checked,
|
|
31930
|
-
subscript: e.currentTarget.checked ? false : current.subscript
|
|
31931
|
-
})));
|
|
31932
|
-
insert(_el$67, () => t("toolbar.superscript"));
|
|
31933
|
-
_el$69.addEventListener("change", (e) => ctrl.setFontTabValues((current) => ({
|
|
31934
|
-
...current,
|
|
31935
|
-
subscript: e.currentTarget.checked,
|
|
31936
|
-
superscript: e.currentTarget.checked ? false : current.superscript
|
|
31937
|
-
})));
|
|
31938
|
-
insert(_el$70, () => t("toolbar.subscript"));
|
|
31939
|
-
_el$72.addEventListener("change", (e) => ctrl.updateFontTab("smallCaps", e.currentTarget.checked));
|
|
31940
|
-
insert(_el$73, () => t("dialog.font.smallCaps"));
|
|
31941
|
-
_el$75.addEventListener("change", (e) => ctrl.updateFontTab("allCaps", e.currentTarget.checked));
|
|
31942
|
-
insert(_el$76, () => t("dialog.font.allCaps"));
|
|
31943
|
-
_el$78.addEventListener("change", (e) => ctrl.updateFontTab("hidden", e.currentTarget.checked));
|
|
31944
|
-
insert(_el$79, () => t("dialog.font.hidden"));
|
|
31945
|
-
insert(_el$81, () => t("dialog.font.preview"));
|
|
31946
|
-
insert(_el$80, createComponent(FontPreview, {
|
|
32350
|
+
insert(_el$24, () => t("dialog.font.style"));
|
|
32351
|
+
insert(_el$25, createComponent(For, {
|
|
32352
|
+
get each() {
|
|
32353
|
+
return effectToggles();
|
|
32354
|
+
},
|
|
32355
|
+
children: (toggle) => createComponent(ToggleChip, {
|
|
32356
|
+
get label() {
|
|
32357
|
+
return toggle.label;
|
|
32358
|
+
},
|
|
32359
|
+
get labelStyle() {
|
|
32360
|
+
return toggle.labelStyle;
|
|
32361
|
+
},
|
|
32362
|
+
get checked() {
|
|
32363
|
+
return toggle.checked();
|
|
32364
|
+
},
|
|
32365
|
+
get onChange() {
|
|
32366
|
+
return toggle.onChange;
|
|
32367
|
+
},
|
|
32368
|
+
get ["data-testid"]() {
|
|
32369
|
+
return toggle.testId;
|
|
32370
|
+
}
|
|
32371
|
+
})
|
|
32372
|
+
}));
|
|
32373
|
+
insert(_el$27, () => t("dialog.font.preview"));
|
|
32374
|
+
insert(_el$26, createComponent(FontPreview, {
|
|
31947
32375
|
testId: "editor-font-dialog-preview",
|
|
31948
32376
|
get style() {
|
|
31949
32377
|
return ctrl.previewStyle();
|
|
@@ -31951,154 +32379,351 @@ function FontTab(props) {
|
|
|
31951
32379
|
}), null);
|
|
31952
32380
|
createRenderEffect((_p$) => {
|
|
31953
32381
|
var _v$ = ctrl.fontTabValues().colorMode === "automatic", _v$2 = ctrl.fontTabValues().underlineStyle === "none";
|
|
31954
|
-
_v$ !== _p$.e && (_el$
|
|
31955
|
-
_v$2 !== _p$.t && (_el$
|
|
32382
|
+
_v$ !== _p$.e && (_el$11.disabled = _p$.e = _v$);
|
|
32383
|
+
_v$2 !== _p$.t && (_el$21.disabled = _p$.t = _v$2);
|
|
31956
32384
|
return _p$;
|
|
31957
32385
|
}, {
|
|
31958
32386
|
e: void 0,
|
|
31959
32387
|
t: void 0
|
|
31960
32388
|
});
|
|
31961
|
-
createRenderEffect(() => _el$
|
|
31962
|
-
createRenderEffect(() => _el$
|
|
31963
|
-
createRenderEffect(() => _el$
|
|
31964
|
-
createRenderEffect(() => _el$
|
|
31965
|
-
createRenderEffect(() => _el$
|
|
31966
|
-
createRenderEffect(() => _el$28.value = ctrl.fontTabValues().colorMode);
|
|
31967
|
-
createRenderEffect(() => _el$31.value = ctrl.fontTabValues().color);
|
|
31968
|
-
createRenderEffect(() => _el$34.value = ctrl.fontTabValues().highlight || DEFAULT_HIGHLIGHT);
|
|
31969
|
-
createRenderEffect(() => _el$37.value = ctrl.fontTabValues().shading || DEFAULT_SHADING);
|
|
31970
|
-
createRenderEffect(() => _el$41.value = ctrl.fontTabValues().underlineStyle);
|
|
31971
|
-
createRenderEffect(() => _el$45.value = ctrl.fontTabValues().underlineColor || DEFAULT_COLOR);
|
|
31972
|
-
createRenderEffect(() => _el$51.checked = ctrl.fontTabValues().bold);
|
|
31973
|
-
createRenderEffect(() => _el$54.checked = ctrl.fontTabValues().italic);
|
|
31974
|
-
createRenderEffect(() => _el$57.checked = ctrl.fontTabValues().underline);
|
|
31975
|
-
createRenderEffect(() => _el$60.checked = ctrl.fontTabValues().strike);
|
|
31976
|
-
createRenderEffect(() => _el$63.checked = ctrl.fontTabValues().doubleStrike);
|
|
31977
|
-
createRenderEffect(() => _el$66.checked = ctrl.fontTabValues().superscript);
|
|
31978
|
-
createRenderEffect(() => _el$69.checked = ctrl.fontTabValues().subscript);
|
|
31979
|
-
createRenderEffect(() => _el$72.checked = ctrl.fontTabValues().smallCaps);
|
|
31980
|
-
createRenderEffect(() => _el$75.checked = ctrl.fontTabValues().allCaps);
|
|
31981
|
-
createRenderEffect(() => _el$78.checked = ctrl.fontTabValues().hidden);
|
|
32389
|
+
createRenderEffect(() => _el$0.value = ctrl.fontTabValues().colorMode);
|
|
32390
|
+
createRenderEffect(() => _el$11.value = ctrl.fontTabValues().color);
|
|
32391
|
+
createRenderEffect(() => _el$14.value = ctrl.fontTabValues().highlight || DEFAULT_HIGHLIGHT);
|
|
32392
|
+
createRenderEffect(() => _el$17.value = ctrl.fontTabValues().shading || DEFAULT_SHADING);
|
|
32393
|
+
createRenderEffect(() => _el$21.value = ctrl.fontTabValues().underlineColor || DEFAULT_COLOR);
|
|
31982
32394
|
return _el$;
|
|
31983
32395
|
})();
|
|
31984
32396
|
}
|
|
31985
32397
|
delegateEvents(["input"]);
|
|
31986
|
-
var _tmpl$$
|
|
32398
|
+
var _tmpl$$b = /* @__PURE__ */ template(`<div class=oasis-editor-font-dialog-word-row>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class="oasis-editor-font-dialog-word-row oasis-editor-font-dialog-kerning-row">`), _tmpl$3$3 = /* @__PURE__ */ template(`<div class="oasis-editor-font-dialog-panel oasis-editor-font-dialog-advanced-panel">`);
|
|
31987
32399
|
function AdvancedFontTab(props) {
|
|
31988
32400
|
const t = useI18n();
|
|
31989
32401
|
const {
|
|
31990
32402
|
ctrl
|
|
31991
32403
|
} = props;
|
|
31992
32404
|
return (() => {
|
|
31993
|
-
var _el$ = _tmpl
|
|
31994
|
-
insert(_el
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
each: WORD_CHARACTER_SCALES,
|
|
31999
|
-
children: (scale) => (() => {
|
|
32000
|
-
var _el$60 = _tmpl$2$4(), _el$61 = _el$60.firstChild;
|
|
32001
|
-
insert(_el$60, scale, _el$61);
|
|
32002
|
-
createRenderEffect(() => _el$60.value = String(scale));
|
|
32003
|
-
return _el$60;
|
|
32004
|
-
})()
|
|
32005
|
-
}));
|
|
32006
|
-
insert(_el$8, () => t("dialog.font.advancedSpacing"));
|
|
32007
|
-
_el$9.addEventListener("change", (e) => ctrl.updateAdvancedTab("spacingMode", e.currentTarget.value));
|
|
32008
|
-
insert(_el$0, () => t("dialog.font.advancedNormal"));
|
|
32009
|
-
insert(_el$1, () => t("dialog.font.advancedExpanded"));
|
|
32010
|
-
insert(_el$10, () => t("dialog.font.advancedCondensed"));
|
|
32011
|
-
insert(_el$11, () => t("dialog.font.advancedBy"));
|
|
32012
|
-
_el$12.$$input = (e) => ctrl.updateAdvancedTab("spacingAmount", e.currentTarget.value);
|
|
32013
|
-
insert(_el$14, () => t("dialog.font.advancedPosition"));
|
|
32014
|
-
_el$15.addEventListener("change", (e) => ctrl.updateAdvancedTab("positionMode", e.currentTarget.value));
|
|
32015
|
-
insert(_el$16, () => t("dialog.font.advancedNormal"));
|
|
32016
|
-
insert(_el$17, () => t("dialog.font.advancedRaised"));
|
|
32017
|
-
insert(_el$18, () => t("dialog.font.advancedLowered"));
|
|
32018
|
-
insert(_el$19, () => t("dialog.font.advancedBy"));
|
|
32019
|
-
_el$20.$$input = (e) => ctrl.updateAdvancedTab("positionAmount", e.currentTarget.value);
|
|
32020
|
-
_el$23.addEventListener("change", (e) => ctrl.setAdvancedTabValues((current) => ({
|
|
32021
|
-
...current,
|
|
32022
|
-
kerningEnabled: e.currentTarget.checked,
|
|
32023
|
-
kerningThreshold: e.currentTarget.checked ? current.kerningThreshold || "1" : current.kerningThreshold
|
|
32024
|
-
})));
|
|
32025
|
-
insert(_el$24, () => t("dialog.font.advancedKerning"));
|
|
32026
|
-
_el$25.$$input = (e) => ctrl.updateAdvancedTab("kerningThreshold", e.currentTarget.value);
|
|
32027
|
-
insert(_el$26, () => t("dialog.font.advancedKerningAbove"));
|
|
32028
|
-
insert(_el$28, () => t("dialog.font.advancedOpenTypeGroup"));
|
|
32029
|
-
insert(_el$30, () => t("dialog.font.advancedLigatures"));
|
|
32030
|
-
_el$31.addEventListener("change", (e) => ctrl.updateAdvancedTab("ligatures", e.currentTarget.value));
|
|
32031
|
-
insert(_el$32, () => t("dialog.font.advancedDefault"));
|
|
32032
|
-
insert(_el$33, () => t("dialog.font.advancedLigaturesNone"));
|
|
32033
|
-
insert(_el$34, () => t("dialog.font.advancedLigaturesStandard"));
|
|
32034
|
-
insert(_el$35, () => t("dialog.font.advancedLigaturesContextual"));
|
|
32035
|
-
insert(_el$36, () => t("dialog.font.advancedLigaturesHistorical"));
|
|
32036
|
-
insert(_el$37, () => t("dialog.font.advancedLigaturesStandardContextual"));
|
|
32037
|
-
insert(_el$39, () => t("dialog.font.advancedNumberSpacing"));
|
|
32038
|
-
_el$40.addEventListener("change", (e) => ctrl.updateAdvancedTab("numberSpacing", e.currentTarget.value));
|
|
32039
|
-
insert(_el$41, () => t("dialog.font.advancedDefault"));
|
|
32040
|
-
insert(_el$42, () => t("dialog.font.advancedNumberSpacingProportional"));
|
|
32041
|
-
insert(_el$43, () => t("dialog.font.advancedNumberSpacingTabular"));
|
|
32042
|
-
insert(_el$45, () => t("dialog.font.advancedNumberForm"));
|
|
32043
|
-
_el$46.addEventListener("change", (e) => ctrl.updateAdvancedTab("numberForm", e.currentTarget.value));
|
|
32044
|
-
insert(_el$47, () => t("dialog.font.advancedDefault"));
|
|
32045
|
-
insert(_el$48, () => t("dialog.font.advancedNumberFormLining"));
|
|
32046
|
-
insert(_el$49, () => t("dialog.font.advancedNumberFormOldStyle"));
|
|
32047
|
-
insert(_el$51, () => t("dialog.font.advancedStylisticSet"));
|
|
32048
|
-
_el$52.addEventListener("change", (e) => ctrl.updateAdvancedTab("stylisticSet", e.currentTarget.value));
|
|
32049
|
-
insert(_el$53, () => t("dialog.font.advancedDefault"));
|
|
32050
|
-
insert(_el$52, createComponent(For, {
|
|
32051
|
-
get each() {
|
|
32052
|
-
return Array.from({
|
|
32053
|
-
length: 20
|
|
32054
|
-
}, (_, index) => index + 1);
|
|
32405
|
+
var _el$ = _tmpl$3$3();
|
|
32406
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
32407
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
32408
|
+
get legend() {
|
|
32409
|
+
return t("dialog.font.advancedCharacterSpacingGroup");
|
|
32055
32410
|
},
|
|
32056
|
-
children
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32411
|
+
get children() {
|
|
32412
|
+
return [(() => {
|
|
32413
|
+
var _el$2 = _tmpl$$b();
|
|
32414
|
+
insert(_el$2, createComponent(Text, {
|
|
32415
|
+
"class": "oasis-editor-dialog-label",
|
|
32416
|
+
get children() {
|
|
32417
|
+
return t("dialog.font.advancedScale");
|
|
32418
|
+
}
|
|
32419
|
+
}), null);
|
|
32420
|
+
insert(_el$2, createComponent(SelectField, {
|
|
32421
|
+
get value() {
|
|
32422
|
+
return ctrl.advancedTabValues().characterScale || "100";
|
|
32423
|
+
},
|
|
32424
|
+
onChange: (value) => ctrl.updateAdvancedTab("characterScale", value),
|
|
32425
|
+
"data-testid": "editor-font-dialog-advanced-scale",
|
|
32426
|
+
get options() {
|
|
32427
|
+
return WORD_CHARACTER_SCALES.map((scale) => ({
|
|
32428
|
+
value: String(scale),
|
|
32429
|
+
label: `${scale}%`
|
|
32430
|
+
}));
|
|
32431
|
+
}
|
|
32432
|
+
}), null);
|
|
32433
|
+
return _el$2;
|
|
32434
|
+
})(), (() => {
|
|
32435
|
+
var _el$3 = _tmpl$$b();
|
|
32436
|
+
insert(_el$3, createComponent(Text, {
|
|
32437
|
+
"class": "oasis-editor-dialog-label",
|
|
32438
|
+
get children() {
|
|
32439
|
+
return t("dialog.font.advancedSpacing");
|
|
32440
|
+
}
|
|
32441
|
+
}), null);
|
|
32442
|
+
insert(_el$3, createComponent(SelectField, {
|
|
32443
|
+
get value() {
|
|
32444
|
+
return ctrl.advancedTabValues().spacingMode;
|
|
32445
|
+
},
|
|
32446
|
+
onChange: (value) => ctrl.updateAdvancedTab("spacingMode", value),
|
|
32447
|
+
"data-testid": "editor-font-dialog-advanced-spacing-mode",
|
|
32448
|
+
get options() {
|
|
32449
|
+
return [{
|
|
32450
|
+
value: "normal",
|
|
32451
|
+
label: t("dialog.font.advancedNormal")
|
|
32452
|
+
}, {
|
|
32453
|
+
value: "expanded",
|
|
32454
|
+
label: t("dialog.font.advancedExpanded")
|
|
32455
|
+
}, {
|
|
32456
|
+
value: "condensed",
|
|
32457
|
+
label: t("dialog.font.advancedCondensed")
|
|
32458
|
+
}];
|
|
32459
|
+
}
|
|
32460
|
+
}), null);
|
|
32461
|
+
insert(_el$3, createComponent(Text, {
|
|
32462
|
+
"class": "oasis-editor-dialog-label oasis-editor-font-dialog-by-label",
|
|
32463
|
+
get children() {
|
|
32464
|
+
return t("dialog.font.advancedBy");
|
|
32465
|
+
}
|
|
32466
|
+
}), null);
|
|
32467
|
+
insert(_el$3, createComponent(TextField, {
|
|
32468
|
+
"class": "oasis-editor-font-dialog-small-input",
|
|
32469
|
+
get value() {
|
|
32470
|
+
return ctrl.advancedTabValues().spacingAmount;
|
|
32471
|
+
},
|
|
32472
|
+
get disabled() {
|
|
32473
|
+
return ctrl.advancedTabValues().spacingMode === "normal";
|
|
32474
|
+
},
|
|
32475
|
+
onChange: (value) => ctrl.updateAdvancedTab("spacingAmount", value),
|
|
32476
|
+
"data-testid": "editor-font-dialog-advanced-spacing-amount"
|
|
32477
|
+
}), null);
|
|
32478
|
+
return _el$3;
|
|
32479
|
+
})(), (() => {
|
|
32480
|
+
var _el$4 = _tmpl$$b();
|
|
32481
|
+
insert(_el$4, createComponent(Text, {
|
|
32482
|
+
"class": "oasis-editor-dialog-label",
|
|
32483
|
+
get children() {
|
|
32484
|
+
return t("dialog.font.advancedPosition");
|
|
32485
|
+
}
|
|
32486
|
+
}), null);
|
|
32487
|
+
insert(_el$4, createComponent(SelectField, {
|
|
32488
|
+
get value() {
|
|
32489
|
+
return ctrl.advancedTabValues().positionMode;
|
|
32490
|
+
},
|
|
32491
|
+
onChange: (value) => ctrl.updateAdvancedTab("positionMode", value),
|
|
32492
|
+
"data-testid": "editor-font-dialog-advanced-position-mode",
|
|
32493
|
+
get options() {
|
|
32494
|
+
return [{
|
|
32495
|
+
value: "normal",
|
|
32496
|
+
label: t("dialog.font.advancedNormal")
|
|
32497
|
+
}, {
|
|
32498
|
+
value: "raised",
|
|
32499
|
+
label: t("dialog.font.advancedRaised")
|
|
32500
|
+
}, {
|
|
32501
|
+
value: "lowered",
|
|
32502
|
+
label: t("dialog.font.advancedLowered")
|
|
32503
|
+
}];
|
|
32504
|
+
}
|
|
32505
|
+
}), null);
|
|
32506
|
+
insert(_el$4, createComponent(Text, {
|
|
32507
|
+
"class": "oasis-editor-dialog-label oasis-editor-font-dialog-by-label",
|
|
32508
|
+
get children() {
|
|
32509
|
+
return t("dialog.font.advancedBy");
|
|
32510
|
+
}
|
|
32511
|
+
}), null);
|
|
32512
|
+
insert(_el$4, createComponent(TextField, {
|
|
32513
|
+
"class": "oasis-editor-font-dialog-small-input",
|
|
32514
|
+
get value() {
|
|
32515
|
+
return ctrl.advancedTabValues().positionAmount;
|
|
32516
|
+
},
|
|
32517
|
+
get disabled() {
|
|
32518
|
+
return ctrl.advancedTabValues().positionMode === "normal";
|
|
32519
|
+
},
|
|
32520
|
+
onChange: (value) => ctrl.updateAdvancedTab("positionAmount", value),
|
|
32521
|
+
"data-testid": "editor-font-dialog-advanced-position-amount"
|
|
32522
|
+
}), null);
|
|
32523
|
+
return _el$4;
|
|
32524
|
+
})(), (() => {
|
|
32525
|
+
var _el$5 = _tmpl$2$4();
|
|
32526
|
+
insert(_el$5, createComponent(Checkbox, {
|
|
32527
|
+
"class": "oasis-editor-font-dialog-kerning-toggle",
|
|
32528
|
+
get label() {
|
|
32529
|
+
return t("dialog.font.advancedKerning");
|
|
32530
|
+
},
|
|
32531
|
+
get checked() {
|
|
32532
|
+
return ctrl.advancedTabValues().kerningEnabled;
|
|
32533
|
+
},
|
|
32534
|
+
onChange: (checked) => ctrl.setAdvancedTabValues((current) => ({
|
|
32535
|
+
...current,
|
|
32536
|
+
kerningEnabled: checked,
|
|
32537
|
+
kerningThreshold: checked ? current.kerningThreshold || "1" : current.kerningThreshold
|
|
32538
|
+
})),
|
|
32539
|
+
"data-testid": "editor-font-dialog-advanced-kerning-enabled"
|
|
32540
|
+
}), null);
|
|
32541
|
+
insert(_el$5, createComponent(TextField, {
|
|
32542
|
+
"class": "oasis-editor-font-dialog-kerning-input",
|
|
32543
|
+
get value() {
|
|
32544
|
+
return ctrl.advancedTabValues().kerningThreshold;
|
|
32545
|
+
},
|
|
32546
|
+
get disabled() {
|
|
32547
|
+
return !ctrl.advancedTabValues().kerningEnabled;
|
|
32548
|
+
},
|
|
32549
|
+
onChange: (value) => ctrl.updateAdvancedTab("kerningThreshold", value),
|
|
32550
|
+
"data-testid": "editor-font-dialog-advanced-kerning"
|
|
32551
|
+
}), null);
|
|
32552
|
+
insert(_el$5, createComponent(StatusText, {
|
|
32553
|
+
"class": "oasis-editor-dialog-help-text oasis-editor-font-dialog-kerning-suffix",
|
|
32554
|
+
get children() {
|
|
32555
|
+
return t("dialog.font.advancedKerningAbove");
|
|
32556
|
+
}
|
|
32557
|
+
}), null);
|
|
32558
|
+
return _el$5;
|
|
32559
|
+
})()];
|
|
32560
|
+
}
|
|
32062
32561
|
}), null);
|
|
32063
|
-
_el
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32562
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
32563
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
32564
|
+
get legend() {
|
|
32565
|
+
return t("dialog.font.advancedOpenTypeGroup");
|
|
32566
|
+
},
|
|
32567
|
+
get children() {
|
|
32568
|
+
return [(() => {
|
|
32569
|
+
var _el$6 = _tmpl$$b();
|
|
32570
|
+
insert(_el$6, createComponent(Text, {
|
|
32571
|
+
"class": "oasis-editor-dialog-label",
|
|
32572
|
+
get children() {
|
|
32573
|
+
return t("dialog.font.advancedLigatures");
|
|
32574
|
+
}
|
|
32575
|
+
}), null);
|
|
32576
|
+
insert(_el$6, createComponent(SelectField, {
|
|
32577
|
+
get value() {
|
|
32578
|
+
return ctrl.advancedTabValues().ligatures;
|
|
32579
|
+
},
|
|
32580
|
+
onChange: (value) => ctrl.updateAdvancedTab("ligatures", value),
|
|
32581
|
+
"data-testid": "editor-font-dialog-advanced-ligatures",
|
|
32582
|
+
get options() {
|
|
32583
|
+
return [{
|
|
32584
|
+
value: "",
|
|
32585
|
+
label: t("dialog.font.advancedDefault")
|
|
32586
|
+
}, {
|
|
32587
|
+
value: "none",
|
|
32588
|
+
label: t("dialog.font.advancedLigaturesNone")
|
|
32589
|
+
}, {
|
|
32590
|
+
value: "standard",
|
|
32591
|
+
label: t("dialog.font.advancedLigaturesStandard")
|
|
32592
|
+
}, {
|
|
32593
|
+
value: "contextual",
|
|
32594
|
+
label: t("dialog.font.advancedLigaturesContextual")
|
|
32595
|
+
}, {
|
|
32596
|
+
value: "historical",
|
|
32597
|
+
label: t("dialog.font.advancedLigaturesHistorical")
|
|
32598
|
+
}, {
|
|
32599
|
+
value: "standardContextual",
|
|
32600
|
+
label: t("dialog.font.advancedLigaturesStandardContextual")
|
|
32601
|
+
}];
|
|
32602
|
+
}
|
|
32603
|
+
}), null);
|
|
32604
|
+
return _el$6;
|
|
32605
|
+
})(), (() => {
|
|
32606
|
+
var _el$7 = _tmpl$$b();
|
|
32607
|
+
insert(_el$7, createComponent(Text, {
|
|
32608
|
+
"class": "oasis-editor-dialog-label",
|
|
32609
|
+
get children() {
|
|
32610
|
+
return t("dialog.font.advancedNumberSpacing");
|
|
32611
|
+
}
|
|
32612
|
+
}), null);
|
|
32613
|
+
insert(_el$7, createComponent(SelectField, {
|
|
32614
|
+
get value() {
|
|
32615
|
+
return ctrl.advancedTabValues().numberSpacing;
|
|
32616
|
+
},
|
|
32617
|
+
onChange: (value) => ctrl.updateAdvancedTab("numberSpacing", value),
|
|
32618
|
+
"data-testid": "editor-font-dialog-advanced-number-spacing",
|
|
32619
|
+
get options() {
|
|
32620
|
+
return [{
|
|
32621
|
+
value: "",
|
|
32622
|
+
label: t("dialog.font.advancedDefault")
|
|
32623
|
+
}, {
|
|
32624
|
+
value: "proportional",
|
|
32625
|
+
label: t("dialog.font.advancedNumberSpacingProportional")
|
|
32626
|
+
}, {
|
|
32627
|
+
value: "tabular",
|
|
32628
|
+
label: t("dialog.font.advancedNumberSpacingTabular")
|
|
32629
|
+
}];
|
|
32630
|
+
}
|
|
32631
|
+
}), null);
|
|
32632
|
+
return _el$7;
|
|
32633
|
+
})(), (() => {
|
|
32634
|
+
var _el$8 = _tmpl$$b();
|
|
32635
|
+
insert(_el$8, createComponent(Text, {
|
|
32636
|
+
"class": "oasis-editor-dialog-label",
|
|
32637
|
+
get children() {
|
|
32638
|
+
return t("dialog.font.advancedNumberForm");
|
|
32639
|
+
}
|
|
32640
|
+
}), null);
|
|
32641
|
+
insert(_el$8, createComponent(SelectField, {
|
|
32642
|
+
get value() {
|
|
32643
|
+
return ctrl.advancedTabValues().numberForm;
|
|
32644
|
+
},
|
|
32645
|
+
onChange: (value) => ctrl.updateAdvancedTab("numberForm", value),
|
|
32646
|
+
"data-testid": "editor-font-dialog-advanced-number-form",
|
|
32647
|
+
get options() {
|
|
32648
|
+
return [{
|
|
32649
|
+
value: "",
|
|
32650
|
+
label: t("dialog.font.advancedDefault")
|
|
32651
|
+
}, {
|
|
32652
|
+
value: "lining",
|
|
32653
|
+
label: t("dialog.font.advancedNumberFormLining")
|
|
32654
|
+
}, {
|
|
32655
|
+
value: "oldStyle",
|
|
32656
|
+
label: t("dialog.font.advancedNumberFormOldStyle")
|
|
32657
|
+
}];
|
|
32658
|
+
}
|
|
32659
|
+
}), null);
|
|
32660
|
+
return _el$8;
|
|
32661
|
+
})(), (() => {
|
|
32662
|
+
var _el$9 = _tmpl$$b();
|
|
32663
|
+
insert(_el$9, createComponent(Text, {
|
|
32664
|
+
"class": "oasis-editor-dialog-label",
|
|
32665
|
+
get children() {
|
|
32666
|
+
return t("dialog.font.advancedStylisticSet");
|
|
32667
|
+
}
|
|
32668
|
+
}), null);
|
|
32669
|
+
insert(_el$9, createComponent(SelectField, {
|
|
32670
|
+
get value() {
|
|
32671
|
+
return ctrl.advancedTabValues().stylisticSet;
|
|
32672
|
+
},
|
|
32673
|
+
onChange: (value) => ctrl.updateAdvancedTab("stylisticSet", value),
|
|
32674
|
+
"data-testid": "editor-font-dialog-advanced-stylistic-set",
|
|
32675
|
+
get options() {
|
|
32676
|
+
return [{
|
|
32677
|
+
value: "",
|
|
32678
|
+
label: t("dialog.font.advancedDefault")
|
|
32679
|
+
}, ...Array.from({
|
|
32680
|
+
length: 20
|
|
32681
|
+
}, (_, index) => index + 1).map((set) => ({
|
|
32682
|
+
value: String(set),
|
|
32683
|
+
label: String(set)
|
|
32684
|
+
}))];
|
|
32685
|
+
}
|
|
32686
|
+
}), null);
|
|
32687
|
+
return _el$9;
|
|
32688
|
+
})(), createComponent(Checkbox, {
|
|
32689
|
+
"class": "oasis-editor-font-dialog-contextual-toggle",
|
|
32690
|
+
get label() {
|
|
32691
|
+
return t("dialog.font.advancedContextualAlternates");
|
|
32692
|
+
},
|
|
32693
|
+
get checked() {
|
|
32694
|
+
return ctrl.advancedTabValues().contextualAlternates;
|
|
32695
|
+
},
|
|
32696
|
+
onChange: (checked) => ctrl.updateAdvancedTab("contextualAlternates", checked),
|
|
32697
|
+
"data-testid": "editor-font-dialog-advanced-contextual-alternates"
|
|
32698
|
+
})];
|
|
32699
|
+
}
|
|
32700
|
+
}), null);
|
|
32701
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
32702
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
32703
|
+
get legend() {
|
|
32704
|
+
return t("dialog.font.advancedPreviewGroup");
|
|
32705
|
+
},
|
|
32706
|
+
get children() {
|
|
32707
|
+
return createComponent(FontPreview, {
|
|
32708
|
+
"class": "oasis-editor-dialog-preview oasis-editor-font-dialog-advanced-preview",
|
|
32709
|
+
testId: "editor-font-dialog-advanced-preview",
|
|
32710
|
+
get style() {
|
|
32711
|
+
return ctrl.previewStyle();
|
|
32712
|
+
}
|
|
32713
|
+
});
|
|
32714
|
+
}
|
|
32715
|
+
}), null);
|
|
32716
|
+
insert(_el$, createComponent(StatusText, {
|
|
32717
|
+
as: "p",
|
|
32718
|
+
"class": "oasis-editor-dialog-help-text",
|
|
32719
|
+
"data-testid": "editor-font-dialog-advanced-placeholder",
|
|
32720
|
+
get children() {
|
|
32721
|
+
return ctrl.advancedValidationError() || t("dialog.font.advancedPlaceholder");
|
|
32071
32722
|
}
|
|
32072
32723
|
}), null);
|
|
32073
|
-
insert(_el$59, () => ctrl.advancedValidationError() || t("dialog.font.advancedPlaceholder"));
|
|
32074
|
-
createRenderEffect((_p$) => {
|
|
32075
|
-
var _v$ = ctrl.advancedTabValues().spacingMode === "normal", _v$2 = ctrl.advancedTabValues().positionMode === "normal", _v$3 = !ctrl.advancedTabValues().kerningEnabled;
|
|
32076
|
-
_v$ !== _p$.e && (_el$12.disabled = _p$.e = _v$);
|
|
32077
|
-
_v$2 !== _p$.t && (_el$20.disabled = _p$.t = _v$2);
|
|
32078
|
-
_v$3 !== _p$.a && (_el$25.disabled = _p$.a = _v$3);
|
|
32079
|
-
return _p$;
|
|
32080
|
-
}, {
|
|
32081
|
-
e: void 0,
|
|
32082
|
-
t: void 0,
|
|
32083
|
-
a: void 0
|
|
32084
|
-
});
|
|
32085
|
-
createRenderEffect(() => _el$6.value = ctrl.advancedTabValues().characterScale || "100");
|
|
32086
|
-
createRenderEffect(() => _el$9.value = ctrl.advancedTabValues().spacingMode);
|
|
32087
|
-
createRenderEffect(() => _el$12.value = ctrl.advancedTabValues().spacingAmount);
|
|
32088
|
-
createRenderEffect(() => _el$15.value = ctrl.advancedTabValues().positionMode);
|
|
32089
|
-
createRenderEffect(() => _el$20.value = ctrl.advancedTabValues().positionAmount);
|
|
32090
|
-
createRenderEffect(() => _el$23.checked = ctrl.advancedTabValues().kerningEnabled);
|
|
32091
|
-
createRenderEffect(() => _el$25.value = ctrl.advancedTabValues().kerningThreshold);
|
|
32092
|
-
createRenderEffect(() => _el$31.value = ctrl.advancedTabValues().ligatures);
|
|
32093
|
-
createRenderEffect(() => _el$40.value = ctrl.advancedTabValues().numberSpacing);
|
|
32094
|
-
createRenderEffect(() => _el$46.value = ctrl.advancedTabValues().numberForm);
|
|
32095
|
-
createRenderEffect(() => _el$52.value = ctrl.advancedTabValues().stylisticSet);
|
|
32096
|
-
createRenderEffect(() => _el$55.checked = ctrl.advancedTabValues().contextualAlternates);
|
|
32097
32724
|
return _el$;
|
|
32098
32725
|
})();
|
|
32099
32726
|
}
|
|
32100
|
-
delegateEvents(["input"]);
|
|
32101
|
-
var _tmpl$$7 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary"data-testid=editor-font-dialog-cancel>`), _tmpl$2$3 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary"data-testid=editor-font-dialog-apply>`);
|
|
32102
32727
|
function FontDialog(props) {
|
|
32103
32728
|
const t = useI18n();
|
|
32104
32729
|
const ctrl = useFontDialogController(props);
|
|
@@ -32116,17 +32741,22 @@ function FontDialog(props) {
|
|
|
32116
32741
|
bodyClass: "oasis-editor-font-dialog-body",
|
|
32117
32742
|
size: "font",
|
|
32118
32743
|
get footer() {
|
|
32119
|
-
return
|
|
32120
|
-
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32127
|
-
|
|
32128
|
-
|
|
32129
|
-
|
|
32744
|
+
return createComponent(DialogFooter, {
|
|
32745
|
+
get onCancel() {
|
|
32746
|
+
return props.onClose;
|
|
32747
|
+
},
|
|
32748
|
+
get onConfirm() {
|
|
32749
|
+
return ctrl.handleApply;
|
|
32750
|
+
},
|
|
32751
|
+
get cancelLabel() {
|
|
32752
|
+
return t("generic.cancel");
|
|
32753
|
+
},
|
|
32754
|
+
get confirmLabel() {
|
|
32755
|
+
return t("generic.ok");
|
|
32756
|
+
},
|
|
32757
|
+
cancelTestId: "editor-font-dialog-cancel",
|
|
32758
|
+
confirmTestId: "editor-font-dialog-apply"
|
|
32759
|
+
});
|
|
32130
32760
|
},
|
|
32131
32761
|
get children() {
|
|
32132
32762
|
return createComponent(Tabs, {
|
|
@@ -32159,8 +32789,7 @@ function FontDialog(props) {
|
|
|
32159
32789
|
}
|
|
32160
32790
|
});
|
|
32161
32791
|
}
|
|
32162
|
-
|
|
32163
|
-
var _tmpl$$6 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-align><option value=left></option><option value=center></option><option value=right></option><option value=justify>`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input step=1 data-testid=editor-paragraph-dialog-indent-left></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input step=1 data-testid=editor-paragraph-dialog-indent-right>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-special><option value=none></option><option value=firstLine></option><option value=hanging></option></select></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-paragraph-dialog-special-by>`), _tmpl$4$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-paragraph-dialog-spacing-before></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-paragraph-dialog-spacing-after></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0.5 step=0.05 data-testid=editor-paragraph-dialog-line-height>`), _tmpl$5$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-border-style><option value=none></option><option value=solid></option><option value=dashed></option><option value=dotted></option></select></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=0.25 data-testid=editor-paragraph-dialog-border-width></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-border-color></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-shading>`), _tmpl$6$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-style-row><label class=oasis-editor-dialog-style-toggle><input type=checkbox data-testid=editor-paragraph-dialog-border-side-top></label><label class=oasis-editor-dialog-style-toggle><input type=checkbox data-testid=editor-paragraph-dialog-border-side-right></label><label class=oasis-editor-dialog-style-toggle><input type=checkbox data-testid=editor-paragraph-dialog-border-side-bottom></label><label class=oasis-editor-dialog-style-toggle><input type=checkbox data-testid=editor-paragraph-dialog-border-side-left>`), _tmpl$7$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-paragraph-dialog-preview>`);
|
|
32792
|
+
var _tmpl$$a = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-border-color></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-paragraph-dialog-shading>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-style-row>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-paragraph-dialog-preview>`);
|
|
32164
32793
|
const DEFAULT_BORDER_WIDTH_PT$1 = 0.5;
|
|
32165
32794
|
const DEFAULT_BORDER_COLOR$1 = "#000000";
|
|
32166
32795
|
function parseNumber$1(value) {
|
|
@@ -32171,16 +32800,16 @@ function parseNumber$1(value) {
|
|
|
32171
32800
|
function ParagraphDialog(props) {
|
|
32172
32801
|
const t = useI18n();
|
|
32173
32802
|
const [align, setAlign] = createSignal("");
|
|
32174
|
-
const [indentLeft, setIndentLeft] = createSignal(
|
|
32175
|
-
const [indentRight, setIndentRight] = createSignal(
|
|
32803
|
+
const [indentLeft, setIndentLeft] = createSignal(null);
|
|
32804
|
+
const [indentRight, setIndentRight] = createSignal(null);
|
|
32176
32805
|
const [special, setSpecial] = createSignal("none");
|
|
32177
|
-
const [specialBy, setSpecialBy] = createSignal(
|
|
32178
|
-
const [spacingBefore, setSpacingBefore] = createSignal(
|
|
32179
|
-
const [spacingAfter, setSpacingAfter] = createSignal(
|
|
32180
|
-
const [lineHeight, setLineHeight] = createSignal(
|
|
32806
|
+
const [specialBy, setSpecialBy] = createSignal(null);
|
|
32807
|
+
const [spacingBefore, setSpacingBefore] = createSignal(null);
|
|
32808
|
+
const [spacingAfter, setSpacingAfter] = createSignal(null);
|
|
32809
|
+
const [lineHeight, setLineHeight] = createSignal(null);
|
|
32181
32810
|
const [shading, setShading] = createSignal("");
|
|
32182
32811
|
const [borderStyle, setBorderStyle] = createSignal("none");
|
|
32183
|
-
const [borderWidth, setBorderWidth] = createSignal(
|
|
32812
|
+
const [borderWidth, setBorderWidth] = createSignal(null);
|
|
32184
32813
|
const [borderColor, setBorderColor] = createSignal("");
|
|
32185
32814
|
const [sideTop, setSideTop] = createSignal(false);
|
|
32186
32815
|
const [sideRight, setSideRight] = createSignal(false);
|
|
@@ -32189,15 +32818,15 @@ function ParagraphDialog(props) {
|
|
|
32189
32818
|
createEffect(() => {
|
|
32190
32819
|
if (props.isOpen) {
|
|
32191
32820
|
setAlign(props.initial.align ?? "");
|
|
32192
|
-
setIndentLeft(props.initial.indentLeft ?? "");
|
|
32193
|
-
setIndentRight(props.initial.indentRight ?? "");
|
|
32194
|
-
setSpacingBefore(props.initial.spacingBefore ?? "");
|
|
32195
|
-
setSpacingAfter(props.initial.spacingAfter ?? "");
|
|
32196
|
-
setLineHeight(props.initial.lineHeight ?? "");
|
|
32821
|
+
setIndentLeft(parseNumber$1(props.initial.indentLeft ?? ""));
|
|
32822
|
+
setIndentRight(parseNumber$1(props.initial.indentRight ?? ""));
|
|
32823
|
+
setSpacingBefore(parseNumber$1(props.initial.spacingBefore ?? ""));
|
|
32824
|
+
setSpacingAfter(parseNumber$1(props.initial.spacingAfter ?? ""));
|
|
32825
|
+
setLineHeight(parseNumber$1(props.initial.lineHeight ?? ""));
|
|
32197
32826
|
setShading(props.initial.shading ?? "");
|
|
32198
32827
|
const initialBorderStyle = props.initial.borderStyle;
|
|
32199
32828
|
setBorderStyle(initialBorderStyle === "solid" || initialBorderStyle === "dashed" || initialBorderStyle === "dotted" ? initialBorderStyle : "none");
|
|
32200
|
-
setBorderWidth(props.initial.borderWidth ?? "");
|
|
32829
|
+
setBorderWidth(parseNumber$1(props.initial.borderWidth ?? ""));
|
|
32201
32830
|
setBorderColor(props.initial.borderColor ?? "");
|
|
32202
32831
|
setSideTop(props.initial.borderSideTop ?? false);
|
|
32203
32832
|
setSideRight(props.initial.borderSideRight ?? false);
|
|
@@ -32207,24 +32836,24 @@ function ParagraphDialog(props) {
|
|
|
32207
32836
|
const hanging = parseNumber$1(props.initial.indentHanging ?? "");
|
|
32208
32837
|
if (hanging !== null && hanging > 0) {
|
|
32209
32838
|
setSpecial("hanging");
|
|
32210
|
-
setSpecialBy(
|
|
32839
|
+
setSpecialBy(hanging);
|
|
32211
32840
|
} else if (firstLine !== null && firstLine > 0) {
|
|
32212
32841
|
setSpecial("firstLine");
|
|
32213
|
-
setSpecialBy(
|
|
32842
|
+
setSpecialBy(firstLine);
|
|
32214
32843
|
} else {
|
|
32215
32844
|
setSpecial("none");
|
|
32216
|
-
setSpecialBy(
|
|
32845
|
+
setSpecialBy(null);
|
|
32217
32846
|
}
|
|
32218
32847
|
}
|
|
32219
32848
|
});
|
|
32220
32849
|
const previewStyle = createMemo(() => {
|
|
32221
|
-
const lh =
|
|
32222
|
-
const left =
|
|
32223
|
-
const right =
|
|
32224
|
-
const firstLine = special() === "firstLine" ?
|
|
32225
|
-
const hanging = special() === "hanging" ?
|
|
32850
|
+
const lh = lineHeight();
|
|
32851
|
+
const left = indentLeft();
|
|
32852
|
+
const right = indentRight();
|
|
32853
|
+
const firstLine = special() === "firstLine" ? specialBy() : null;
|
|
32854
|
+
const hanging = special() === "hanging" ? specialBy() : null;
|
|
32226
32855
|
const textIndent = firstLine !== null ? firstLine : hanging !== null ? -hanging : null;
|
|
32227
|
-
const borderCss = borderStyle() !== "none" ? `${
|
|
32856
|
+
const borderCss = borderStyle() !== "none" ? `${borderWidth() ?? DEFAULT_BORDER_WIDTH_PT$1}pt ${borderStyle()} ${borderColor().trim() || DEFAULT_BORDER_COLOR$1}` : void 0;
|
|
32228
32857
|
return {
|
|
32229
32858
|
"text-align": align() || void 0,
|
|
32230
32859
|
"line-height": lh !== null && lh > 0 ? String(lh) : void 0,
|
|
@@ -32248,7 +32877,7 @@ function ParagraphDialog(props) {
|
|
|
32248
32877
|
left: null
|
|
32249
32878
|
};
|
|
32250
32879
|
}
|
|
32251
|
-
const width =
|
|
32880
|
+
const width = borderWidth();
|
|
32252
32881
|
const border = {
|
|
32253
32882
|
type: style2,
|
|
32254
32883
|
width: width !== null && width > 0 ? width : DEFAULT_BORDER_WIDTH_PT$1,
|
|
@@ -32262,16 +32891,16 @@ function ParagraphDialog(props) {
|
|
|
32262
32891
|
};
|
|
32263
32892
|
};
|
|
32264
32893
|
const handleApply = () => {
|
|
32265
|
-
const by =
|
|
32894
|
+
const by = specialBy();
|
|
32266
32895
|
props.onApply({
|
|
32267
32896
|
align: align() || null,
|
|
32268
|
-
indentLeft:
|
|
32269
|
-
indentRight:
|
|
32897
|
+
indentLeft: indentLeft(),
|
|
32898
|
+
indentRight: indentRight(),
|
|
32270
32899
|
indentFirstLine: special() === "firstLine" ? by : null,
|
|
32271
32900
|
indentHanging: special() === "hanging" ? by : null,
|
|
32272
|
-
spacingBefore:
|
|
32273
|
-
spacingAfter:
|
|
32274
|
-
lineHeight:
|
|
32901
|
+
spacingBefore: spacingBefore(),
|
|
32902
|
+
spacingAfter: spacingAfter(),
|
|
32903
|
+
lineHeight: lineHeight(),
|
|
32275
32904
|
shading: shading().trim() || null,
|
|
32276
32905
|
borders: resolveBorders()
|
|
32277
32906
|
}, props.initial);
|
|
@@ -32304,137 +32933,271 @@ function ParagraphDialog(props) {
|
|
|
32304
32933
|
});
|
|
32305
32934
|
},
|
|
32306
32935
|
get children() {
|
|
32307
|
-
return [(
|
|
32308
|
-
|
|
32309
|
-
|
|
32310
|
-
|
|
32311
|
-
|
|
32312
|
-
|
|
32313
|
-
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
32333
|
-
|
|
32334
|
-
|
|
32335
|
-
|
|
32336
|
-
|
|
32337
|
-
|
|
32338
|
-
|
|
32339
|
-
|
|
32340
|
-
|
|
32341
|
-
|
|
32342
|
-
|
|
32343
|
-
|
|
32344
|
-
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32357
|
-
|
|
32358
|
-
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
32362
|
-
|
|
32363
|
-
|
|
32364
|
-
|
|
32365
|
-
|
|
32366
|
-
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
|
|
32936
|
+
return [createComponent(FieldRow, {
|
|
32937
|
+
get children() {
|
|
32938
|
+
return createComponent(SelectField, {
|
|
32939
|
+
get label() {
|
|
32940
|
+
return t("paragraph.alignLabel");
|
|
32941
|
+
},
|
|
32942
|
+
get value() {
|
|
32943
|
+
return align();
|
|
32944
|
+
},
|
|
32945
|
+
onChange: setAlign,
|
|
32946
|
+
"data-testid": "editor-paragraph-dialog-align",
|
|
32947
|
+
get options() {
|
|
32948
|
+
return [{
|
|
32949
|
+
value: "left",
|
|
32950
|
+
label: t("paragraph.alignLeft")
|
|
32951
|
+
}, {
|
|
32952
|
+
value: "center",
|
|
32953
|
+
label: t("paragraph.alignCenter")
|
|
32954
|
+
}, {
|
|
32955
|
+
value: "right",
|
|
32956
|
+
label: t("paragraph.alignRight")
|
|
32957
|
+
}, {
|
|
32958
|
+
value: "justify",
|
|
32959
|
+
label: t("paragraph.alignJustify")
|
|
32960
|
+
}];
|
|
32961
|
+
}
|
|
32962
|
+
});
|
|
32963
|
+
}
|
|
32964
|
+
}), createComponent(FieldRow, {
|
|
32965
|
+
get children() {
|
|
32966
|
+
return [createComponent(NumberField, {
|
|
32967
|
+
get label() {
|
|
32968
|
+
return t("paragraph.indentLeftLabel");
|
|
32969
|
+
},
|
|
32970
|
+
step: "1",
|
|
32971
|
+
get value() {
|
|
32972
|
+
return indentLeft() ?? "";
|
|
32973
|
+
},
|
|
32974
|
+
onChange: setIndentLeft,
|
|
32975
|
+
"data-testid": "editor-paragraph-dialog-indent-left"
|
|
32976
|
+
}), createComponent(NumberField, {
|
|
32977
|
+
get label() {
|
|
32978
|
+
return t("paragraph.indentRightLabel");
|
|
32979
|
+
},
|
|
32980
|
+
step: "1",
|
|
32981
|
+
get value() {
|
|
32982
|
+
return indentRight() ?? "";
|
|
32983
|
+
},
|
|
32984
|
+
onChange: setIndentRight,
|
|
32985
|
+
"data-testid": "editor-paragraph-dialog-indent-right"
|
|
32986
|
+
})];
|
|
32987
|
+
}
|
|
32988
|
+
}), createComponent(FieldRow, {
|
|
32989
|
+
get children() {
|
|
32990
|
+
return [createComponent(SelectField, {
|
|
32991
|
+
get label() {
|
|
32992
|
+
return t("paragraph.specialLabel");
|
|
32993
|
+
},
|
|
32994
|
+
get value() {
|
|
32995
|
+
return special();
|
|
32996
|
+
},
|
|
32997
|
+
onChange: (value) => {
|
|
32998
|
+
const next = value;
|
|
32999
|
+
setSpecial(next);
|
|
33000
|
+
if (next === "none") setSpecialBy(null);
|
|
33001
|
+
},
|
|
33002
|
+
"data-testid": "editor-paragraph-dialog-special",
|
|
33003
|
+
get options() {
|
|
33004
|
+
return [{
|
|
33005
|
+
value: "none",
|
|
33006
|
+
label: t("paragraph.specialNone")
|
|
33007
|
+
}, {
|
|
33008
|
+
value: "firstLine",
|
|
33009
|
+
label: t("paragraph.specialFirstLine")
|
|
33010
|
+
}, {
|
|
33011
|
+
value: "hanging",
|
|
33012
|
+
label: t("paragraph.specialHanging")
|
|
33013
|
+
}];
|
|
33014
|
+
}
|
|
33015
|
+
}), createComponent(NumberField, {
|
|
33016
|
+
get label() {
|
|
33017
|
+
return t("paragraph.specialByLabel");
|
|
33018
|
+
},
|
|
33019
|
+
min: "0",
|
|
33020
|
+
step: "1",
|
|
33021
|
+
get disabled() {
|
|
33022
|
+
return special() === "none";
|
|
33023
|
+
},
|
|
33024
|
+
get value() {
|
|
33025
|
+
return specialBy() ?? "";
|
|
33026
|
+
},
|
|
33027
|
+
onChange: setSpecialBy,
|
|
33028
|
+
"data-testid": "editor-paragraph-dialog-special-by"
|
|
33029
|
+
})];
|
|
33030
|
+
}
|
|
33031
|
+
}), createComponent(FieldRow, {
|
|
33032
|
+
get children() {
|
|
33033
|
+
return [createComponent(NumberField, {
|
|
33034
|
+
get label() {
|
|
33035
|
+
return t("paragraph.spacingBeforeLabel");
|
|
33036
|
+
},
|
|
33037
|
+
min: "0",
|
|
33038
|
+
step: "1",
|
|
33039
|
+
get value() {
|
|
33040
|
+
return spacingBefore() ?? "";
|
|
33041
|
+
},
|
|
33042
|
+
onChange: setSpacingBefore,
|
|
33043
|
+
"data-testid": "editor-paragraph-dialog-spacing-before"
|
|
33044
|
+
}), createComponent(NumberField, {
|
|
33045
|
+
get label() {
|
|
33046
|
+
return t("paragraph.spacingAfterLabel");
|
|
33047
|
+
},
|
|
33048
|
+
min: "0",
|
|
33049
|
+
step: "1",
|
|
33050
|
+
get value() {
|
|
33051
|
+
return spacingAfter() ?? "";
|
|
33052
|
+
},
|
|
33053
|
+
onChange: setSpacingAfter,
|
|
33054
|
+
"data-testid": "editor-paragraph-dialog-spacing-after"
|
|
33055
|
+
}), createComponent(NumberField, {
|
|
33056
|
+
get label() {
|
|
33057
|
+
return t("paragraph.lineSpacingLabel");
|
|
33058
|
+
},
|
|
33059
|
+
min: "0.5",
|
|
33060
|
+
step: "0.05",
|
|
33061
|
+
get value() {
|
|
33062
|
+
return lineHeight() ?? "";
|
|
33063
|
+
},
|
|
33064
|
+
onChange: setLineHeight,
|
|
33065
|
+
"data-testid": "editor-paragraph-dialog-line-height"
|
|
33066
|
+
})];
|
|
33067
|
+
}
|
|
33068
|
+
}), (() => {
|
|
33069
|
+
var _el$ = _tmpl$$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
33070
|
+
insert(_el$, createComponent(SelectField, {
|
|
33071
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33072
|
+
get label() {
|
|
33073
|
+
return t("paragraph.borderStyleLabel");
|
|
33074
|
+
},
|
|
33075
|
+
get value() {
|
|
33076
|
+
return borderStyle();
|
|
33077
|
+
},
|
|
33078
|
+
onChange: (value) => {
|
|
33079
|
+
const next = value;
|
|
33080
|
+
setBorderStyle(next);
|
|
33081
|
+
if (next === "none") {
|
|
33082
|
+
setSideTop(false);
|
|
33083
|
+
setSideRight(false);
|
|
33084
|
+
setSideBottom(false);
|
|
33085
|
+
setSideLeft(false);
|
|
33086
|
+
} else if (!sideTop() && !sideRight() && !sideBottom() && !sideLeft()) {
|
|
33087
|
+
setSideTop(true);
|
|
33088
|
+
setSideRight(true);
|
|
33089
|
+
setSideBottom(true);
|
|
33090
|
+
setSideLeft(true);
|
|
33091
|
+
}
|
|
33092
|
+
},
|
|
33093
|
+
"data-testid": "editor-paragraph-dialog-border-style",
|
|
33094
|
+
get options() {
|
|
33095
|
+
return [{
|
|
33096
|
+
value: "none",
|
|
33097
|
+
label: t("paragraph.borderNone")
|
|
33098
|
+
}, {
|
|
33099
|
+
value: "solid",
|
|
33100
|
+
label: t("paragraph.borderSolid")
|
|
33101
|
+
}, {
|
|
33102
|
+
value: "dashed",
|
|
33103
|
+
label: t("paragraph.borderDashed")
|
|
33104
|
+
}, {
|
|
33105
|
+
value: "dotted",
|
|
33106
|
+
label: t("paragraph.borderDotted")
|
|
33107
|
+
}];
|
|
32371
33108
|
}
|
|
32372
|
-
});
|
|
32373
|
-
insert(_el
|
|
32374
|
-
|
|
32375
|
-
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
|
|
32380
|
-
|
|
32381
|
-
|
|
32382
|
-
|
|
32383
|
-
|
|
32384
|
-
|
|
32385
|
-
|
|
32386
|
-
|
|
32387
|
-
|
|
32388
|
-
},
|
|
32389
|
-
|
|
32390
|
-
|
|
32391
|
-
|
|
32392
|
-
|
|
32393
|
-
createRenderEffect(() => _el$
|
|
32394
|
-
createRenderEffect(() => _el$
|
|
32395
|
-
createRenderEffect(() => _el$
|
|
32396
|
-
return _el
|
|
33109
|
+
}), _el$2);
|
|
33110
|
+
insert(_el$, createComponent(NumberField, {
|
|
33111
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33112
|
+
get label() {
|
|
33113
|
+
return t("paragraph.borderWidthLabel");
|
|
33114
|
+
},
|
|
33115
|
+
min: "0",
|
|
33116
|
+
step: "0.25",
|
|
33117
|
+
get disabled() {
|
|
33118
|
+
return borderStyle() === "none";
|
|
33119
|
+
},
|
|
33120
|
+
get value() {
|
|
33121
|
+
return borderWidth() ?? "";
|
|
33122
|
+
},
|
|
33123
|
+
onChange: setBorderWidth,
|
|
33124
|
+
"data-testid": "editor-paragraph-dialog-border-width"
|
|
33125
|
+
}), _el$2);
|
|
33126
|
+
insert(_el$3, () => t("paragraph.borderColorLabel"));
|
|
33127
|
+
_el$4.$$input = (e) => setBorderColor(e.currentTarget.value);
|
|
33128
|
+
insert(_el$6, () => t("paragraph.shadingLabel"));
|
|
33129
|
+
_el$7.$$input = (e) => setShading(e.currentTarget.value);
|
|
33130
|
+
createRenderEffect(() => _el$4.disabled = borderStyle() === "none");
|
|
33131
|
+
createRenderEffect(() => _el$4.value = borderColor() || DEFAULT_BORDER_COLOR$1);
|
|
33132
|
+
createRenderEffect(() => _el$7.value = shading() || "#ffffff");
|
|
33133
|
+
return _el$;
|
|
32397
33134
|
})(), (() => {
|
|
32398
|
-
var _el$
|
|
32399
|
-
insert(_el$
|
|
32400
|
-
_el$
|
|
32401
|
-
|
|
32402
|
-
|
|
32403
|
-
|
|
32404
|
-
|
|
32405
|
-
|
|
32406
|
-
|
|
32407
|
-
|
|
32408
|
-
|
|
32409
|
-
|
|
32410
|
-
|
|
32411
|
-
|
|
32412
|
-
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32417
|
-
|
|
32418
|
-
|
|
32419
|
-
|
|
32420
|
-
|
|
32421
|
-
|
|
32422
|
-
|
|
32423
|
-
|
|
32424
|
-
|
|
32425
|
-
|
|
33135
|
+
var _el$8 = _tmpl$2$3(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
33136
|
+
insert(_el$0, () => t("paragraph.borderSidesLabel"));
|
|
33137
|
+
insert(_el$1, createComponent(Checkbox, {
|
|
33138
|
+
get label() {
|
|
33139
|
+
return t("paragraph.borderSideTop");
|
|
33140
|
+
},
|
|
33141
|
+
get disabled() {
|
|
33142
|
+
return borderStyle() === "none";
|
|
33143
|
+
},
|
|
33144
|
+
get checked() {
|
|
33145
|
+
return sideTop();
|
|
33146
|
+
},
|
|
33147
|
+
onChange: setSideTop,
|
|
33148
|
+
"data-testid": "editor-paragraph-dialog-border-side-top"
|
|
33149
|
+
}), null);
|
|
33150
|
+
insert(_el$1, createComponent(Checkbox, {
|
|
33151
|
+
get label() {
|
|
33152
|
+
return t("paragraph.borderSideRight");
|
|
33153
|
+
},
|
|
33154
|
+
get disabled() {
|
|
33155
|
+
return borderStyle() === "none";
|
|
33156
|
+
},
|
|
33157
|
+
get checked() {
|
|
33158
|
+
return sideRight();
|
|
33159
|
+
},
|
|
33160
|
+
onChange: setSideRight,
|
|
33161
|
+
"data-testid": "editor-paragraph-dialog-border-side-right"
|
|
33162
|
+
}), null);
|
|
33163
|
+
insert(_el$1, createComponent(Checkbox, {
|
|
33164
|
+
get label() {
|
|
33165
|
+
return t("paragraph.borderSideBottom");
|
|
33166
|
+
},
|
|
33167
|
+
get disabled() {
|
|
33168
|
+
return borderStyle() === "none";
|
|
33169
|
+
},
|
|
33170
|
+
get checked() {
|
|
33171
|
+
return sideBottom();
|
|
33172
|
+
},
|
|
33173
|
+
onChange: setSideBottom,
|
|
33174
|
+
"data-testid": "editor-paragraph-dialog-border-side-bottom"
|
|
33175
|
+
}), null);
|
|
33176
|
+
insert(_el$1, createComponent(Checkbox, {
|
|
33177
|
+
get label() {
|
|
33178
|
+
return t("paragraph.borderSideLeft");
|
|
33179
|
+
},
|
|
33180
|
+
get disabled() {
|
|
33181
|
+
return borderStyle() === "none";
|
|
33182
|
+
},
|
|
33183
|
+
get checked() {
|
|
33184
|
+
return sideLeft();
|
|
33185
|
+
},
|
|
33186
|
+
onChange: setSideLeft,
|
|
33187
|
+
"data-testid": "editor-paragraph-dialog-border-side-left"
|
|
33188
|
+
}), null);
|
|
33189
|
+
return _el$8;
|
|
32426
33190
|
})(), (() => {
|
|
32427
|
-
var _el$
|
|
32428
|
-
insert(_el$
|
|
32429
|
-
insert(_el$
|
|
32430
|
-
createRenderEffect((_$p) => style(_el$
|
|
32431
|
-
return _el$
|
|
33191
|
+
var _el$10 = _tmpl$3$2(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
|
|
33192
|
+
insert(_el$11, () => t("paragraph.preview"));
|
|
33193
|
+
insert(_el$12, () => t("paragraph.previewText"));
|
|
33194
|
+
createRenderEffect((_$p) => style(_el$12, previewStyle(), _$p));
|
|
33195
|
+
return _el$10;
|
|
32432
33196
|
})()];
|
|
32433
33197
|
}
|
|
32434
33198
|
});
|
|
32435
33199
|
}
|
|
32436
33200
|
delegateEvents(["input"]);
|
|
32437
|
-
var _tmpl$$5 = /* @__PURE__ */ template(`<div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input step=1>`), _tmpl$2$1 = /* @__PURE__ */ template(`<label class=oasis-editor-dialog-style-toggle><input type=checkbox>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><label class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><span class=oasis-editor-dialog-label></span><select class=oasis-editor-dialog-input data-testid=editor-table-properties-floating-h-anchor><option value=margin></option><option value=page></option><option value=text></option></select></label><label class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><span class=oasis-editor-dialog-label></span><select class=oasis-editor-dialog-input data-testid=editor-table-properties-floating-v-anchor><option value=margin></option><option value=page></option><option value=text>`), _tmpl$4$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><label class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><span class=oasis-editor-dialog-label></span><select class=oasis-editor-dialog-input data-testid=editor-table-properties-floating-x-align><option value></option></select></label><label class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><span class=oasis-editor-dialog-label></span><select class=oasis-editor-dialog-input data-testid=editor-table-properties-floating-y-align><option value>`), _tmpl$5$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row>`), _tmpl$6$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-row><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-table-properties-table-width-unit><option value=points></option><option value=percent></option></select></div></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-style-row></div><div class=oasis-editor-dialog-row></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-style-row>`), _tmpl$7 = /* @__PURE__ */ template(`<label class=oasis-editor-dialog-style-toggle><input type=radio name=table-align>`), _tmpl$8 = /* @__PURE__ */ template(`<option>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-table-properties-row-height-rule><option value></option><option value=atLeast></option><option value=exact></option></select></div></div><div class=oasis-editor-dialog-style-row>`), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row>`), _tmpl$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-table-properties-cell-valign><option value></option><option value=top></option><option value=middle></option><option value=bottom></option></select></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-table-properties-cell-direction><option value></option><option value=lrTb>lrTb</option><option value=tbRl>tbRl</option><option value=btLr>btLr</option><option value=lrTbV>lrTbV</option><option value=tbRlV>tbRlV</option></select></div></div><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-style-row></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-row></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><select class=oasis-editor-dialog-input data-testid=editor-table-properties-border-style><option value=none></option><option value=solid></option><option value=dashed></option><option value=dotted></option></select></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-table-properties-border-color></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input type=color class=oasis-editor-dialog-input data-testid=editor-table-properties-shading></div></div><div class=oasis-editor-dialog-style-row></div><div class=oasis-editor-table-properties-cell-preview data-testid=editor-table-properties-cell-preview>`), _tmpl$10 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><input class=oasis-editor-dialog-input data-testid=editor-table-properties-alt-title></div><div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><textarea class="oasis-editor-dialog-input oasis-editor-table-properties-textarea"data-testid=editor-table-properties-alt-description>`);
|
|
32438
33201
|
const DEFAULT_BORDER_WIDTH_PT = 0.5;
|
|
32439
33202
|
const DEFAULT_BORDER_COLOR = "#000000";
|
|
32440
33203
|
function parseNumber(value) {
|
|
@@ -32456,241 +33219,8 @@ function resolveBorder(style2, widthValue, colorValue) {
|
|
|
32456
33219
|
color: colorValue.trim() || DEFAULT_BORDER_COLOR
|
|
32457
33220
|
};
|
|
32458
33221
|
}
|
|
32459
|
-
function
|
|
32460
|
-
return
|
|
32461
|
-
var _el$ = _tmpl$$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
32462
|
-
insert(_el$2, label);
|
|
32463
|
-
_el$3.$$input = (e) => setter(e.currentTarget.value);
|
|
32464
|
-
setAttribute(_el$3, "min", allowNegative ? void 0 : "0");
|
|
32465
|
-
_el$3.disabled = disabled;
|
|
32466
|
-
setAttribute(_el$3, "data-testid", testId);
|
|
32467
|
-
createRenderEffect(() => _el$3.value = value());
|
|
32468
|
-
return _el$;
|
|
32469
|
-
})();
|
|
32470
|
-
}
|
|
32471
|
-
function checkbox(label, checked, setter, testId, disabled = false) {
|
|
32472
|
-
return (() => {
|
|
32473
|
-
var _el$4 = _tmpl$2$1(), _el$5 = _el$4.firstChild;
|
|
32474
|
-
_el$5.addEventListener("change", (e) => setter(e.currentTarget.checked));
|
|
32475
|
-
_el$5.disabled = disabled;
|
|
32476
|
-
setAttribute(_el$5, "data-testid", testId);
|
|
32477
|
-
insert(_el$4, label, null);
|
|
32478
|
-
createRenderEffect(() => _el$5.checked = checked());
|
|
32479
|
-
return _el$4;
|
|
32480
|
-
})();
|
|
32481
|
-
}
|
|
32482
|
-
function TableTabPanel(p) {
|
|
32483
|
-
const t = useI18n();
|
|
32484
|
-
return (() => {
|
|
32485
|
-
var _el$6 = _tmpl$6$1(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$7.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.nextSibling, _el$17 = _el$13.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
|
|
32486
|
-
insert(_el$8, () => t("table.sizeSection"));
|
|
32487
|
-
insert(_el$9, () => numericInput(t("table.preferredWidth"), () => p.form.tableWidth, (v) => p.set("tableWidth", v), "editor-table-properties-table-width"), _el$0);
|
|
32488
|
-
insert(_el$1, () => t("table.measureIn"));
|
|
32489
|
-
_el$10.addEventListener("change", (e) => p.set("tableWidthUnit", e.currentTarget.value));
|
|
32490
|
-
insert(_el$11, () => t("table.points"));
|
|
32491
|
-
insert(_el$12, () => t("table.percent"));
|
|
32492
|
-
insert(_el$14, () => t("table.alignmentSection"));
|
|
32493
|
-
insert(_el$15, () => ["left", "center", "right"].map((align) => (() => {
|
|
32494
|
-
var _el$43 = _tmpl$7(), _el$44 = _el$43.firstChild;
|
|
32495
|
-
_el$44.addEventListener("change", () => p.set("tableAlign", align));
|
|
32496
|
-
setAttribute(_el$44, "data-testid", `editor-table-properties-align-${align}`);
|
|
32497
|
-
insert(_el$43, () => t(`table.align${align[0].toUpperCase()}${align.slice(1)}`), null);
|
|
32498
|
-
createRenderEffect(() => _el$44.checked = p.form.tableAlign === align);
|
|
32499
|
-
return _el$43;
|
|
32500
|
-
})()));
|
|
32501
|
-
insert(_el$16, () => numericInput(t("table.indentFromLeft"), () => p.form.tableIndentLeft, (v) => p.set("tableIndentLeft", v), "editor-table-properties-indent-left"));
|
|
32502
|
-
insert(_el$18, () => t("table.textWrappingSection"));
|
|
32503
|
-
insert(_el$19, () => checkbox(t("table.wrapNone"), () => p.form.tableWrapping === "none", () => p.set("tableWrapping", "none"), "editor-table-properties-wrap-none"), null);
|
|
32504
|
-
insert(_el$19, () => checkbox(t("table.wrapAround"), () => p.form.tableWrapping === "around", () => p.set("tableWrapping", "around"), "editor-table-properties-wrap-around"), null);
|
|
32505
|
-
insert(_el$17, createComponent(Show, {
|
|
32506
|
-
get when() {
|
|
32507
|
-
return p.form.tableWrapping === "around";
|
|
32508
|
-
},
|
|
32509
|
-
get children() {
|
|
32510
|
-
return [(() => {
|
|
32511
|
-
var _el$20 = _tmpl$3$1(), _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$25.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$32 = _el$31.nextSibling;
|
|
32512
|
-
insert(_el$22, () => t("table.horizontalAnchor"));
|
|
32513
|
-
_el$23.addEventListener("change", (e) => p.set("floatingHorizontalAnchor", e.currentTarget.value));
|
|
32514
|
-
insert(_el$24, () => t("table.anchorMargin"));
|
|
32515
|
-
insert(_el$25, () => t("table.anchorPage"));
|
|
32516
|
-
insert(_el$26, () => t("table.anchorText"));
|
|
32517
|
-
insert(_el$28, () => t("table.verticalAnchor"));
|
|
32518
|
-
_el$29.addEventListener("change", (e) => p.set("floatingVerticalAnchor", e.currentTarget.value));
|
|
32519
|
-
insert(_el$30, () => t("table.anchorMargin"));
|
|
32520
|
-
insert(_el$31, () => t("table.anchorPage"));
|
|
32521
|
-
insert(_el$32, () => t("table.anchorText"));
|
|
32522
|
-
createRenderEffect(() => _el$23.value = p.form.floatingHorizontalAnchor);
|
|
32523
|
-
createRenderEffect(() => _el$29.value = p.form.floatingVerticalAnchor);
|
|
32524
|
-
return _el$20;
|
|
32525
|
-
})(), (() => {
|
|
32526
|
-
var _el$33 = _tmpl$4$1(), _el$34 = _el$33.firstChild, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$36.firstChild, _el$38 = _el$34.nextSibling, _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling, _el$41 = _el$40.firstChild;
|
|
32527
|
-
insert(_el$33, () => numericInput(t("table.positionX"), () => p.form.floatingX, (v) => p.set("floatingX", v), "editor-table-properties-floating-x", Boolean(p.form.floatingXAlign), true), _el$34);
|
|
32528
|
-
insert(_el$33, () => numericInput(t("table.positionY"), () => p.form.floatingY, (v) => p.set("floatingY", v), "editor-table-properties-floating-y", Boolean(p.form.floatingYAlign), true), _el$34);
|
|
32529
|
-
insert(_el$35, () => t("table.horizontalAlignment"));
|
|
32530
|
-
_el$36.addEventListener("change", (e) => p.set("floatingXAlign", e.currentTarget.value));
|
|
32531
|
-
insert(_el$37, () => t("table.explicitOffset"));
|
|
32532
|
-
insert(_el$36, () => ["left", "center", "right", "inside", "outside"].map((value) => (() => {
|
|
32533
|
-
var _el$45 = _tmpl$8();
|
|
32534
|
-
_el$45.value = value;
|
|
32535
|
-
insert(_el$45, value);
|
|
32536
|
-
return _el$45;
|
|
32537
|
-
})()), null);
|
|
32538
|
-
insert(_el$39, () => t("table.verticalAlignment"));
|
|
32539
|
-
_el$40.addEventListener("change", (e) => p.set("floatingYAlign", e.currentTarget.value));
|
|
32540
|
-
insert(_el$41, () => t("table.explicitOffset"));
|
|
32541
|
-
insert(_el$40, () => ["top", "center", "bottom", "inside", "outside"].map((value) => (() => {
|
|
32542
|
-
var _el$46 = _tmpl$8();
|
|
32543
|
-
_el$46.value = value;
|
|
32544
|
-
insert(_el$46, value);
|
|
32545
|
-
return _el$46;
|
|
32546
|
-
})()), null);
|
|
32547
|
-
createRenderEffect(() => _el$36.value = p.form.floatingXAlign);
|
|
32548
|
-
createRenderEffect(() => _el$40.value = p.form.floatingYAlign);
|
|
32549
|
-
return _el$33;
|
|
32550
|
-
})(), (() => {
|
|
32551
|
-
var _el$42 = _tmpl$5$1();
|
|
32552
|
-
insert(_el$42, () => numericInput(t("table.distanceTop"), () => p.form.floatingDistanceTop, (v) => p.set("floatingDistanceTop", v), "editor-table-properties-floating-distance-top"), null);
|
|
32553
|
-
insert(_el$42, () => numericInput(t("table.distanceRight"), () => p.form.floatingDistanceRight, (v) => p.set("floatingDistanceRight", v), "editor-table-properties-floating-distance-right"), null);
|
|
32554
|
-
insert(_el$42, () => numericInput(t("table.distanceBottom"), () => p.form.floatingDistanceBottom, (v) => p.set("floatingDistanceBottom", v), "editor-table-properties-floating-distance-bottom"), null);
|
|
32555
|
-
insert(_el$42, () => numericInput(t("table.distanceLeft"), () => p.form.floatingDistanceLeft, (v) => p.set("floatingDistanceLeft", v), "editor-table-properties-floating-distance-left"), null);
|
|
32556
|
-
return _el$42;
|
|
32557
|
-
})(), memo(() => checkbox(t("table.allowOverlap"), () => p.form.floatingOverlap === "overlap", (value) => p.set("floatingOverlap", value ? "overlap" : "never"), "editor-table-properties-floating-overlap"))];
|
|
32558
|
-
}
|
|
32559
|
-
}), null);
|
|
32560
|
-
createRenderEffect(() => _el$10.value = p.form.tableWidthUnit);
|
|
32561
|
-
return _el$6;
|
|
32562
|
-
})();
|
|
32563
|
-
}
|
|
32564
|
-
function RowTabPanel(p) {
|
|
32565
|
-
const t = useI18n();
|
|
32566
|
-
return (() => {
|
|
32567
|
-
var _el$47 = _tmpl$9(), _el$48 = _el$47.firstChild, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$51.firstChild, _el$53 = _el$52.nextSibling, _el$54 = _el$53.nextSibling, _el$55 = _el$48.nextSibling;
|
|
32568
|
-
insert(_el$48, () => numericInput(t("table.rowHeight"), () => p.form.rowHeight, (v) => p.set("rowHeight", v), "editor-table-properties-row-height"), _el$49);
|
|
32569
|
-
insert(_el$50, () => t("table.rowHeightRule"));
|
|
32570
|
-
_el$51.addEventListener("change", (e) => p.set("rowHeightRule", e.currentTarget.value));
|
|
32571
|
-
insert(_el$52, () => t("table.rowAuto"));
|
|
32572
|
-
insert(_el$53, () => t("table.rowAtLeast"));
|
|
32573
|
-
insert(_el$54, () => t("table.rowExactly"));
|
|
32574
|
-
insert(_el$55, () => checkbox(t("table.repeatHeader"), () => p.form.repeatHeader, (v) => p.set("repeatHeader", v), "editor-table-properties-repeat-header"), null);
|
|
32575
|
-
insert(_el$55, () => checkbox(t("table.allowBreakAcrossPages"), () => p.form.allowBreakAcrossPages, (v) => p.set("allowBreakAcrossPages", v), "editor-table-properties-allow-break"), null);
|
|
32576
|
-
insert(_el$55, () => checkbox(t("table.hiddenRow"), () => p.form.hiddenRow, (v) => p.set("hiddenRow", v), "editor-table-properties-hidden-row"), null);
|
|
32577
|
-
createRenderEffect(() => _el$51.value = p.form.rowHeightRule);
|
|
32578
|
-
return _el$47;
|
|
32579
|
-
})();
|
|
32580
|
-
}
|
|
32581
|
-
function ColumnTabPanel(p) {
|
|
32582
|
-
const t = useI18n();
|
|
32583
|
-
return (() => {
|
|
32584
|
-
var _el$56 = _tmpl$0(), _el$57 = _el$56.firstChild;
|
|
32585
|
-
insert(_el$57, () => numericInput(t("table.columnWidth"), () => p.form.columnWidth, (v) => p.set("columnWidth", v), "editor-table-properties-column-width"));
|
|
32586
|
-
return _el$56;
|
|
32587
|
-
})();
|
|
32588
|
-
}
|
|
32589
|
-
function CellTabPanel(p) {
|
|
32590
|
-
const t = useI18n();
|
|
32591
|
-
const borderPreview = createMemo(() => {
|
|
32592
|
-
const border = resolveBorder(p.form.borderStyle, p.form.borderWidth, p.form.borderColor);
|
|
32593
|
-
const css = border ? `${border.width}pt ${border.type} ${border.color}` : void 0;
|
|
32594
|
-
return {
|
|
32595
|
-
"background-color": p.form.shading.trim() || void 0,
|
|
32596
|
-
"border-top": css && p.form.borderTop ? css : "1px solid #dadce0",
|
|
32597
|
-
"border-right": css && p.form.borderRight ? css : "1px solid #dadce0",
|
|
32598
|
-
"border-bottom": css && p.form.borderBottom ? css : "1px solid #dadce0",
|
|
32599
|
-
"border-left": css && p.form.borderLeft ? css : "1px solid #dadce0"
|
|
32600
|
-
};
|
|
32601
|
-
});
|
|
32602
|
-
return (() => {
|
|
32603
|
-
var _el$58 = _tmpl$1(), _el$59 = _el$58.firstChild, _el$60 = _el$59.firstChild, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling, _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling, _el$67 = _el$60.nextSibling, _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling, _el$70 = _el$69.firstChild, _el$71 = _el$59.nextSibling, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$71.nextSibling, _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling, _el$77 = _el$74.nextSibling, _el$78 = _el$77.firstChild, _el$79 = _el$78.nextSibling, _el$80 = _el$79.firstChild, _el$81 = _el$80.firstChild, _el$82 = _el$81.nextSibling, _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling, _el$85 = _el$84.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$80.nextSibling, _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling, _el$90 = _el$87.nextSibling, _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling, _el$93 = _el$79.nextSibling, _el$94 = _el$93.nextSibling;
|
|
32604
|
-
insert(_el$59, () => numericInput(t("table.cellWidth"), () => p.form.cellWidth, (v) => p.set("cellWidth", v), "editor-table-properties-cell-width"), _el$60);
|
|
32605
|
-
insert(_el$61, () => t("table.verticalAlignment"));
|
|
32606
|
-
_el$62.addEventListener("change", (e) => p.set("cellVerticalAlign", e.currentTarget.value));
|
|
32607
|
-
insert(_el$63, () => t("table.inherit"));
|
|
32608
|
-
insert(_el$64, () => t("table.valignTop"));
|
|
32609
|
-
insert(_el$65, () => t("table.valignMiddle"));
|
|
32610
|
-
insert(_el$66, () => t("table.valignBottom"));
|
|
32611
|
-
insert(_el$68, () => t("table.textDirection"));
|
|
32612
|
-
_el$69.addEventListener("change", (e) => p.set("cellTextDirection", e.currentTarget.value));
|
|
32613
|
-
insert(_el$70, () => t("table.inherit"));
|
|
32614
|
-
insert(_el$72, () => t("table.options"));
|
|
32615
|
-
insert(_el$73, () => checkbox(t("table.noWrap"), () => p.form.cellNoWrap, (v) => p.set("cellNoWrap", v), "editor-table-properties-cell-nowrap"), null);
|
|
32616
|
-
insert(_el$73, () => checkbox(t("table.fitText"), () => p.form.cellFitText, (v) => p.set("cellFitText", v), "editor-table-properties-cell-fit-text"), null);
|
|
32617
|
-
insert(_el$73, () => checkbox(t("table.hideMark"), () => p.form.cellHideMark, (v) => p.set("cellHideMark", v), "editor-table-properties-cell-hide-mark"), null);
|
|
32618
|
-
insert(_el$75, () => t("table.cellMargins"));
|
|
32619
|
-
insert(_el$76, () => numericInput(t("paragraph.borderSideTop"), () => p.form.marginTop, (v) => p.set("marginTop", v), "editor-table-properties-margin-top"), null);
|
|
32620
|
-
insert(_el$76, () => numericInput(t("paragraph.borderSideRight"), () => p.form.marginRight, (v) => p.set("marginRight", v), "editor-table-properties-margin-right"), null);
|
|
32621
|
-
insert(_el$76, () => numericInput(t("paragraph.borderSideBottom"), () => p.form.marginBottom, (v) => p.set("marginBottom", v), "editor-table-properties-margin-bottom"), null);
|
|
32622
|
-
insert(_el$76, () => numericInput(t("paragraph.borderSideLeft"), () => p.form.marginLeft, (v) => p.set("marginLeft", v), "editor-table-properties-margin-left"), null);
|
|
32623
|
-
insert(_el$78, () => t("paragraph.bordersSection"));
|
|
32624
|
-
insert(_el$81, () => t("paragraph.borderStyleLabel"));
|
|
32625
|
-
_el$82.addEventListener("change", (e) => {
|
|
32626
|
-
const next = e.currentTarget.value;
|
|
32627
|
-
p.set("borderStyle", next);
|
|
32628
|
-
if (next === "none") {
|
|
32629
|
-
p.set("borderTop", false);
|
|
32630
|
-
p.set("borderRight", false);
|
|
32631
|
-
p.set("borderBottom", false);
|
|
32632
|
-
p.set("borderLeft", false);
|
|
32633
|
-
p.set("borderStart", false);
|
|
32634
|
-
p.set("borderEnd", false);
|
|
32635
|
-
p.set("borderTlBr", false);
|
|
32636
|
-
p.set("borderTrBl", false);
|
|
32637
|
-
} else if (!p.form.borderTop && !p.form.borderRight && !p.form.borderBottom && !p.form.borderLeft) {
|
|
32638
|
-
p.set("borderTop", true);
|
|
32639
|
-
p.set("borderRight", true);
|
|
32640
|
-
p.set("borderBottom", true);
|
|
32641
|
-
p.set("borderLeft", true);
|
|
32642
|
-
}
|
|
32643
|
-
});
|
|
32644
|
-
insert(_el$83, () => t("paragraph.borderNone"));
|
|
32645
|
-
insert(_el$84, () => t("paragraph.borderSolid"));
|
|
32646
|
-
insert(_el$85, () => t("paragraph.borderDashed"));
|
|
32647
|
-
insert(_el$86, () => t("paragraph.borderDotted"));
|
|
32648
|
-
insert(_el$79, () => numericInput(t("paragraph.borderWidthLabel"), () => p.form.borderWidth, (v) => p.set("borderWidth", v), "editor-table-properties-border-width", p.form.borderStyle === "none"), _el$87);
|
|
32649
|
-
insert(_el$88, () => t("paragraph.borderColorLabel"));
|
|
32650
|
-
_el$89.$$input = (e) => p.set("borderColor", e.currentTarget.value);
|
|
32651
|
-
insert(_el$91, () => t("paragraph.shadingLabel"));
|
|
32652
|
-
_el$92.$$input = (e) => p.set("shading", e.currentTarget.value);
|
|
32653
|
-
insert(_el$93, () => checkbox(t("paragraph.borderSideTop"), () => p.form.borderTop, (v) => p.set("borderTop", v), "editor-table-properties-border-top", p.form.borderStyle === "none"), null);
|
|
32654
|
-
insert(_el$93, () => checkbox(t("paragraph.borderSideRight"), () => p.form.borderRight, (v) => p.set("borderRight", v), "editor-table-properties-border-right", p.form.borderStyle === "none"), null);
|
|
32655
|
-
insert(_el$93, () => checkbox(t("paragraph.borderSideBottom"), () => p.form.borderBottom, (v) => p.set("borderBottom", v), "editor-table-properties-border-bottom", p.form.borderStyle === "none"), null);
|
|
32656
|
-
insert(_el$93, () => checkbox(t("paragraph.borderSideLeft"), () => p.form.borderLeft, (v) => p.set("borderLeft", v), "editor-table-properties-border-left", p.form.borderStyle === "none"), null);
|
|
32657
|
-
insert(_el$93, () => checkbox(t("table.borderStart"), () => p.form.borderStart, (v) => p.set("borderStart", v), "editor-table-properties-border-start", p.form.borderStyle === "none"), null);
|
|
32658
|
-
insert(_el$93, () => checkbox(t("table.borderEnd"), () => p.form.borderEnd, (v) => p.set("borderEnd", v), "editor-table-properties-border-end", p.form.borderStyle === "none"), null);
|
|
32659
|
-
insert(_el$93, () => checkbox(t("table.borderTlBr"), () => p.form.borderTlBr, (v) => p.set("borderTlBr", v), "editor-table-properties-border-tlbr", p.form.borderStyle === "none"), null);
|
|
32660
|
-
insert(_el$93, () => checkbox(t("table.borderTrBl"), () => p.form.borderTrBl, (v) => p.set("borderTrBl", v), "editor-table-properties-border-trbl", p.form.borderStyle === "none"), null);
|
|
32661
|
-
createRenderEffect((_p$) => {
|
|
32662
|
-
var _v$ = p.form.borderStyle === "none", _v$2 = borderPreview();
|
|
32663
|
-
_v$ !== _p$.e && (_el$89.disabled = _p$.e = _v$);
|
|
32664
|
-
_p$.t = style(_el$94, _v$2, _p$.t);
|
|
32665
|
-
return _p$;
|
|
32666
|
-
}, {
|
|
32667
|
-
e: void 0,
|
|
32668
|
-
t: void 0
|
|
32669
|
-
});
|
|
32670
|
-
createRenderEffect(() => _el$62.value = p.form.cellVerticalAlign);
|
|
32671
|
-
createRenderEffect(() => _el$69.value = p.form.cellTextDirection);
|
|
32672
|
-
createRenderEffect(() => _el$82.value = p.form.borderStyle);
|
|
32673
|
-
createRenderEffect(() => _el$89.value = p.form.borderColor || DEFAULT_BORDER_COLOR);
|
|
32674
|
-
createRenderEffect(() => _el$92.value = p.form.shading || "#ffffff");
|
|
32675
|
-
return _el$58;
|
|
32676
|
-
})();
|
|
32677
|
-
}
|
|
32678
|
-
function AltTextTabPanel(p) {
|
|
32679
|
-
const t = useI18n();
|
|
32680
|
-
return (() => {
|
|
32681
|
-
var _el$95 = _tmpl$10(), _el$96 = _el$95.firstChild, _el$97 = _el$96.firstChild, _el$98 = _el$97.nextSibling, _el$99 = _el$96.nextSibling, _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling;
|
|
32682
|
-
insert(_el$97, () => t("table.altTitle"));
|
|
32683
|
-
_el$98.$$input = (e) => p.set("altTitle", e.currentTarget.value);
|
|
32684
|
-
insert(_el$100, () => t("table.altDescription"));
|
|
32685
|
-
_el$101.$$input = (e) => p.set("altDescription", e.currentTarget.value);
|
|
32686
|
-
createRenderEffect(() => _el$98.value = p.form.altTitle);
|
|
32687
|
-
createRenderEffect(() => _el$101.value = p.form.altDescription);
|
|
32688
|
-
return _el$95;
|
|
32689
|
-
})();
|
|
32690
|
-
}
|
|
32691
|
-
function TablePropertiesDialog(props) {
|
|
32692
|
-
const t = useI18n();
|
|
32693
|
-
const [form, setForm] = createStore({
|
|
33222
|
+
function createDefaultFormState() {
|
|
33223
|
+
return {
|
|
32694
33224
|
activeTab: "table",
|
|
32695
33225
|
tableWidth: "",
|
|
32696
33226
|
tableWidthUnit: "points",
|
|
@@ -32738,118 +33268,775 @@ function TablePropertiesDialog(props) {
|
|
|
32738
33268
|
shading: "",
|
|
32739
33269
|
altTitle: "",
|
|
32740
33270
|
altDescription: ""
|
|
32741
|
-
}
|
|
33271
|
+
};
|
|
33272
|
+
}
|
|
33273
|
+
function formStateFromInitial(initial) {
|
|
33274
|
+
return {
|
|
33275
|
+
activeTab: initial.activeTab ?? "table",
|
|
33276
|
+
tableWidth: initial.tableWidth,
|
|
33277
|
+
tableWidthUnit: initial.tableWidthUnit,
|
|
33278
|
+
tableAlign: initial.tableAlign,
|
|
33279
|
+
tableIndentLeft: initial.tableIndentLeft,
|
|
33280
|
+
tableWrapping: initial.tableWrapping,
|
|
33281
|
+
floatingHorizontalAnchor: initial.floatingHorizontalAnchor,
|
|
33282
|
+
floatingVerticalAnchor: initial.floatingVerticalAnchor,
|
|
33283
|
+
floatingX: initial.floatingX,
|
|
33284
|
+
floatingY: initial.floatingY,
|
|
33285
|
+
floatingXAlign: initial.floatingXAlign,
|
|
33286
|
+
floatingYAlign: initial.floatingYAlign,
|
|
33287
|
+
floatingDistanceTop: initial.floatingDistanceTop,
|
|
33288
|
+
floatingDistanceRight: initial.floatingDistanceRight,
|
|
33289
|
+
floatingDistanceBottom: initial.floatingDistanceBottom,
|
|
33290
|
+
floatingDistanceLeft: initial.floatingDistanceLeft,
|
|
33291
|
+
floatingOverlap: initial.floatingOverlap,
|
|
33292
|
+
rowHeight: initial.rowHeight,
|
|
33293
|
+
rowHeightRule: initial.rowHeightRule,
|
|
33294
|
+
repeatHeader: initial.repeatHeader,
|
|
33295
|
+
allowBreakAcrossPages: initial.allowBreakAcrossPages,
|
|
33296
|
+
hiddenRow: initial.hiddenRow,
|
|
33297
|
+
columnWidth: initial.columnWidth,
|
|
33298
|
+
cellWidth: initial.cellWidth,
|
|
33299
|
+
cellVerticalAlign: initial.cellVerticalAlign,
|
|
33300
|
+
cellTextDirection: initial.cellTextDirection,
|
|
33301
|
+
cellNoWrap: initial.cellNoWrap,
|
|
33302
|
+
cellFitText: initial.cellFitText,
|
|
33303
|
+
cellHideMark: initial.cellHideMark,
|
|
33304
|
+
marginTop: initial.marginTop,
|
|
33305
|
+
marginRight: initial.marginRight,
|
|
33306
|
+
marginBottom: initial.marginBottom,
|
|
33307
|
+
marginLeft: initial.marginLeft,
|
|
33308
|
+
borderStyle: initial.borderStyle,
|
|
33309
|
+
borderWidth: initial.borderWidth,
|
|
33310
|
+
borderColor: initial.borderColor,
|
|
33311
|
+
borderTop: initial.borderTop,
|
|
33312
|
+
borderRight: initial.borderRight,
|
|
33313
|
+
borderBottom: initial.borderBottom,
|
|
33314
|
+
borderLeft: initial.borderLeft,
|
|
33315
|
+
borderStart: initial.borderStart,
|
|
33316
|
+
borderEnd: initial.borderEnd,
|
|
33317
|
+
borderTlBr: initial.borderTopLeftToBottomRight,
|
|
33318
|
+
borderTrBl: initial.borderTopRightToBottomLeft,
|
|
33319
|
+
shading: initial.shading,
|
|
33320
|
+
altTitle: initial.altTitle,
|
|
33321
|
+
altDescription: initial.altDescription
|
|
33322
|
+
};
|
|
33323
|
+
}
|
|
33324
|
+
function buildTableApplyValues(form) {
|
|
33325
|
+
const border = resolveBorder(
|
|
33326
|
+
form.borderStyle,
|
|
33327
|
+
form.borderWidth,
|
|
33328
|
+
form.borderColor
|
|
33329
|
+
);
|
|
33330
|
+
return {
|
|
33331
|
+
tableWidth: parseWidth(form.tableWidth, form.tableWidthUnit),
|
|
33332
|
+
tableAlign: form.tableAlign || null,
|
|
33333
|
+
tableIndentLeft: parseWidth(form.tableIndentLeft, "points"),
|
|
33334
|
+
tableFloating: form.tableWrapping === "around" ? {
|
|
33335
|
+
horizontalAnchor: form.floatingHorizontalAnchor,
|
|
33336
|
+
verticalAnchor: form.floatingVerticalAnchor,
|
|
33337
|
+
...form.floatingXAlign ? {
|
|
33338
|
+
xAlign: form.floatingXAlign
|
|
33339
|
+
} : { x: parseNumber(form.floatingX) ?? 0 },
|
|
33340
|
+
...form.floatingYAlign ? {
|
|
33341
|
+
yAlign: form.floatingYAlign
|
|
33342
|
+
} : { y: parseNumber(form.floatingY) ?? 0 },
|
|
33343
|
+
distanceTop: parseNumber(form.floatingDistanceTop) ?? 0,
|
|
33344
|
+
distanceRight: parseNumber(form.floatingDistanceRight) ?? 0,
|
|
33345
|
+
distanceBottom: parseNumber(form.floatingDistanceBottom) ?? 0,
|
|
33346
|
+
distanceLeft: parseNumber(form.floatingDistanceLeft) ?? 0
|
|
33347
|
+
} : null,
|
|
33348
|
+
tableOverlap: form.tableWrapping === "around" ? form.floatingOverlap : null,
|
|
33349
|
+
rowHeight: parseWidth(form.rowHeight, "points"),
|
|
33350
|
+
rowHeightRule: form.rowHeightRule || null,
|
|
33351
|
+
repeatHeader: form.repeatHeader,
|
|
33352
|
+
cantSplit: !form.allowBreakAcrossPages,
|
|
33353
|
+
hiddenRow: form.hiddenRow,
|
|
33354
|
+
columnWidth: parseWidth(form.columnWidth, "points"),
|
|
33355
|
+
cellWidth: parseWidth(form.cellWidth, "points"),
|
|
33356
|
+
cellVerticalAlign: form.cellVerticalAlign || null,
|
|
33357
|
+
cellTextDirection: form.cellTextDirection || null,
|
|
33358
|
+
cellNoWrap: form.cellNoWrap,
|
|
33359
|
+
cellFitText: form.cellFitText,
|
|
33360
|
+
cellHideMark: form.cellHideMark,
|
|
33361
|
+
margins: {
|
|
33362
|
+
top: parseNumber(form.marginTop),
|
|
33363
|
+
right: parseNumber(form.marginRight),
|
|
33364
|
+
bottom: parseNumber(form.marginBottom),
|
|
33365
|
+
left: parseNumber(form.marginLeft)
|
|
33366
|
+
},
|
|
33367
|
+
borders: {
|
|
33368
|
+
top: form.borderTop ? border : null,
|
|
33369
|
+
right: form.borderRight ? border : null,
|
|
33370
|
+
bottom: form.borderBottom ? border : null,
|
|
33371
|
+
left: form.borderLeft ? border : null,
|
|
33372
|
+
start: form.borderStart ? border : null,
|
|
33373
|
+
end: form.borderEnd ? border : null,
|
|
33374
|
+
topLeftToBottomRight: form.borderTlBr ? border : null,
|
|
33375
|
+
topRightToBottomLeft: form.borderTrBl ? border : null
|
|
33376
|
+
},
|
|
33377
|
+
shading: form.shading.trim() || null,
|
|
33378
|
+
altTitle: form.altTitle.trim() || null,
|
|
33379
|
+
altDescription: form.altDescription.trim() || null
|
|
33380
|
+
};
|
|
33381
|
+
}
|
|
33382
|
+
function useTablePropertiesController(props) {
|
|
33383
|
+
const [form, setForm] = createStore(createDefaultFormState());
|
|
32742
33384
|
createEffect(() => {
|
|
32743
33385
|
if (!props.isOpen) return;
|
|
32744
|
-
setForm(reconcile(
|
|
32745
|
-
activeTab: props.initial.activeTab ?? "table",
|
|
32746
|
-
tableWidth: props.initial.tableWidth,
|
|
32747
|
-
tableWidthUnit: props.initial.tableWidthUnit,
|
|
32748
|
-
tableAlign: props.initial.tableAlign,
|
|
32749
|
-
tableIndentLeft: props.initial.tableIndentLeft,
|
|
32750
|
-
tableWrapping: props.initial.tableWrapping,
|
|
32751
|
-
floatingHorizontalAnchor: props.initial.floatingHorizontalAnchor,
|
|
32752
|
-
floatingVerticalAnchor: props.initial.floatingVerticalAnchor,
|
|
32753
|
-
floatingX: props.initial.floatingX,
|
|
32754
|
-
floatingY: props.initial.floatingY,
|
|
32755
|
-
floatingXAlign: props.initial.floatingXAlign,
|
|
32756
|
-
floatingYAlign: props.initial.floatingYAlign,
|
|
32757
|
-
floatingDistanceTop: props.initial.floatingDistanceTop,
|
|
32758
|
-
floatingDistanceRight: props.initial.floatingDistanceRight,
|
|
32759
|
-
floatingDistanceBottom: props.initial.floatingDistanceBottom,
|
|
32760
|
-
floatingDistanceLeft: props.initial.floatingDistanceLeft,
|
|
32761
|
-
floatingOverlap: props.initial.floatingOverlap,
|
|
32762
|
-
rowHeight: props.initial.rowHeight,
|
|
32763
|
-
rowHeightRule: props.initial.rowHeightRule,
|
|
32764
|
-
repeatHeader: props.initial.repeatHeader,
|
|
32765
|
-
allowBreakAcrossPages: props.initial.allowBreakAcrossPages,
|
|
32766
|
-
hiddenRow: props.initial.hiddenRow,
|
|
32767
|
-
columnWidth: props.initial.columnWidth,
|
|
32768
|
-
cellWidth: props.initial.cellWidth,
|
|
32769
|
-
cellVerticalAlign: props.initial.cellVerticalAlign,
|
|
32770
|
-
cellTextDirection: props.initial.cellTextDirection,
|
|
32771
|
-
cellNoWrap: props.initial.cellNoWrap,
|
|
32772
|
-
cellFitText: props.initial.cellFitText,
|
|
32773
|
-
cellHideMark: props.initial.cellHideMark,
|
|
32774
|
-
marginTop: props.initial.marginTop,
|
|
32775
|
-
marginRight: props.initial.marginRight,
|
|
32776
|
-
marginBottom: props.initial.marginBottom,
|
|
32777
|
-
marginLeft: props.initial.marginLeft,
|
|
32778
|
-
borderStyle: props.initial.borderStyle,
|
|
32779
|
-
borderWidth: props.initial.borderWidth,
|
|
32780
|
-
borderColor: props.initial.borderColor,
|
|
32781
|
-
borderTop: props.initial.borderTop,
|
|
32782
|
-
borderRight: props.initial.borderRight,
|
|
32783
|
-
borderBottom: props.initial.borderBottom,
|
|
32784
|
-
borderLeft: props.initial.borderLeft,
|
|
32785
|
-
borderStart: props.initial.borderStart,
|
|
32786
|
-
borderEnd: props.initial.borderEnd,
|
|
32787
|
-
borderTlBr: props.initial.borderTopLeftToBottomRight,
|
|
32788
|
-
borderTrBl: props.initial.borderTopRightToBottomLeft,
|
|
32789
|
-
shading: props.initial.shading,
|
|
32790
|
-
altTitle: props.initial.altTitle,
|
|
32791
|
-
altDescription: props.initial.altDescription
|
|
32792
|
-
}));
|
|
33386
|
+
setForm(reconcile(formStateFromInitial(props.initial)));
|
|
32793
33387
|
});
|
|
32794
33388
|
const handleApply = () => {
|
|
32795
|
-
|
|
32796
|
-
props.onApply({
|
|
32797
|
-
tableWidth: parseWidth(form.tableWidth, form.tableWidthUnit),
|
|
32798
|
-
tableAlign: form.tableAlign || null,
|
|
32799
|
-
tableIndentLeft: parseWidth(form.tableIndentLeft, "points"),
|
|
32800
|
-
tableFloating: form.tableWrapping === "around" ? {
|
|
32801
|
-
horizontalAnchor: form.floatingHorizontalAnchor,
|
|
32802
|
-
verticalAnchor: form.floatingVerticalAnchor,
|
|
32803
|
-
...form.floatingXAlign ? {
|
|
32804
|
-
xAlign: form.floatingXAlign
|
|
32805
|
-
} : {
|
|
32806
|
-
x: parseNumber(form.floatingX) ?? 0
|
|
32807
|
-
},
|
|
32808
|
-
...form.floatingYAlign ? {
|
|
32809
|
-
yAlign: form.floatingYAlign
|
|
32810
|
-
} : {
|
|
32811
|
-
y: parseNumber(form.floatingY) ?? 0
|
|
32812
|
-
},
|
|
32813
|
-
distanceTop: parseNumber(form.floatingDistanceTop) ?? 0,
|
|
32814
|
-
distanceRight: parseNumber(form.floatingDistanceRight) ?? 0,
|
|
32815
|
-
distanceBottom: parseNumber(form.floatingDistanceBottom) ?? 0,
|
|
32816
|
-
distanceLeft: parseNumber(form.floatingDistanceLeft) ?? 0
|
|
32817
|
-
} : null,
|
|
32818
|
-
tableOverlap: form.tableWrapping === "around" ? form.floatingOverlap : null,
|
|
32819
|
-
rowHeight: parseWidth(form.rowHeight, "points"),
|
|
32820
|
-
rowHeightRule: form.rowHeightRule || null,
|
|
32821
|
-
repeatHeader: form.repeatHeader,
|
|
32822
|
-
cantSplit: !form.allowBreakAcrossPages,
|
|
32823
|
-
hiddenRow: form.hiddenRow,
|
|
32824
|
-
columnWidth: parseWidth(form.columnWidth, "points"),
|
|
32825
|
-
cellWidth: parseWidth(form.cellWidth, "points"),
|
|
32826
|
-
cellVerticalAlign: form.cellVerticalAlign || null,
|
|
32827
|
-
cellTextDirection: form.cellTextDirection || null,
|
|
32828
|
-
cellNoWrap: form.cellNoWrap,
|
|
32829
|
-
cellFitText: form.cellFitText,
|
|
32830
|
-
cellHideMark: form.cellHideMark,
|
|
32831
|
-
margins: {
|
|
32832
|
-
top: parseNumber(form.marginTop),
|
|
32833
|
-
right: parseNumber(form.marginRight),
|
|
32834
|
-
bottom: parseNumber(form.marginBottom),
|
|
32835
|
-
left: parseNumber(form.marginLeft)
|
|
32836
|
-
},
|
|
32837
|
-
borders: {
|
|
32838
|
-
top: form.borderTop ? border : null,
|
|
32839
|
-
right: form.borderRight ? border : null,
|
|
32840
|
-
bottom: form.borderBottom ? border : null,
|
|
32841
|
-
left: form.borderLeft ? border : null,
|
|
32842
|
-
start: form.borderStart ? border : null,
|
|
32843
|
-
end: form.borderEnd ? border : null,
|
|
32844
|
-
topLeftToBottomRight: form.borderTlBr ? border : null,
|
|
32845
|
-
topRightToBottomLeft: form.borderTrBl ? border : null
|
|
32846
|
-
},
|
|
32847
|
-
shading: form.shading.trim() || null,
|
|
32848
|
-
altTitle: form.altTitle.trim() || null,
|
|
32849
|
-
altDescription: form.altDescription.trim() || null
|
|
32850
|
-
}, props.initial);
|
|
33389
|
+
props.onApply(buildTableApplyValues(form), props.initial);
|
|
32851
33390
|
props.onClose();
|
|
32852
33391
|
};
|
|
33392
|
+
return { form, set: setForm, handleApply };
|
|
33393
|
+
}
|
|
33394
|
+
function NumField(label, value, setter, testId, disabled = false, allowNegative = false) {
|
|
33395
|
+
return createComponent(TextField, {
|
|
33396
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33397
|
+
type: "number",
|
|
33398
|
+
label,
|
|
33399
|
+
min: allowNegative ? void 0 : "0",
|
|
33400
|
+
step: "1",
|
|
33401
|
+
get value() {
|
|
33402
|
+
return value();
|
|
33403
|
+
},
|
|
33404
|
+
disabled,
|
|
33405
|
+
onChange: setter,
|
|
33406
|
+
"data-testid": testId
|
|
33407
|
+
});
|
|
33408
|
+
}
|
|
33409
|
+
var _tmpl$$9 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row>`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-row></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-row></div></fieldset><fieldset class=oasis-editor-font-dialog-fieldset><legend></legend><div class=oasis-editor-dialog-style-row>`);
|
|
33410
|
+
function TableTabPanel(props) {
|
|
33411
|
+
const t = useI18n();
|
|
33412
|
+
const form = () => props.ctrl.form;
|
|
33413
|
+
const set = props.ctrl.set;
|
|
33414
|
+
return (() => {
|
|
33415
|
+
var _el$ = _tmpl$2$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
33416
|
+
insert(_el$3, () => t("table.sizeSection"));
|
|
33417
|
+
insert(_el$4, () => NumField(t("table.preferredWidth"), () => form().tableWidth, (v) => set("tableWidth", v), "editor-table-properties-table-width"), null);
|
|
33418
|
+
insert(_el$4, createComponent(SelectField, {
|
|
33419
|
+
get label() {
|
|
33420
|
+
return t("table.measureIn");
|
|
33421
|
+
},
|
|
33422
|
+
get value() {
|
|
33423
|
+
return form().tableWidthUnit;
|
|
33424
|
+
},
|
|
33425
|
+
onChange: (value) => set("tableWidthUnit", value),
|
|
33426
|
+
"data-testid": "editor-table-properties-table-width-unit",
|
|
33427
|
+
get options() {
|
|
33428
|
+
return [{
|
|
33429
|
+
value: "points",
|
|
33430
|
+
label: t("table.points")
|
|
33431
|
+
}, {
|
|
33432
|
+
value: "percent",
|
|
33433
|
+
label: t("table.percent")
|
|
33434
|
+
}];
|
|
33435
|
+
}
|
|
33436
|
+
}), null);
|
|
33437
|
+
insert(_el$6, () => t("table.alignmentSection"));
|
|
33438
|
+
insert(_el$5, createComponent(RadioGroup, {
|
|
33439
|
+
"class": "oasis-editor-dialog-style-row",
|
|
33440
|
+
name: "table-align",
|
|
33441
|
+
get value() {
|
|
33442
|
+
return form().tableAlign;
|
|
33443
|
+
},
|
|
33444
|
+
onChange: (value) => set("tableAlign", value),
|
|
33445
|
+
get children() {
|
|
33446
|
+
return ["left", "center", "right"].map((align) => createComponent(Radio$1, {
|
|
33447
|
+
value: align,
|
|
33448
|
+
get label() {
|
|
33449
|
+
return t(`table.align${align[0].toUpperCase()}${align.slice(1)}`);
|
|
33450
|
+
},
|
|
33451
|
+
"data-testid": `editor-table-properties-align-${align}`
|
|
33452
|
+
}));
|
|
33453
|
+
}
|
|
33454
|
+
}), _el$7);
|
|
33455
|
+
insert(_el$7, () => NumField(t("table.indentFromLeft"), () => form().tableIndentLeft, (v) => set("tableIndentLeft", v), "editor-table-properties-indent-left"));
|
|
33456
|
+
insert(_el$9, () => t("table.textWrappingSection"));
|
|
33457
|
+
insert(_el$0, createComponent(Checkbox, {
|
|
33458
|
+
get label() {
|
|
33459
|
+
return t("table.wrapNone");
|
|
33460
|
+
},
|
|
33461
|
+
get checked() {
|
|
33462
|
+
return form().tableWrapping === "none";
|
|
33463
|
+
},
|
|
33464
|
+
onChange: () => set("tableWrapping", "none"),
|
|
33465
|
+
"data-testid": "editor-table-properties-wrap-none"
|
|
33466
|
+
}), null);
|
|
33467
|
+
insert(_el$0, createComponent(Checkbox, {
|
|
33468
|
+
get label() {
|
|
33469
|
+
return t("table.wrapAround");
|
|
33470
|
+
},
|
|
33471
|
+
get checked() {
|
|
33472
|
+
return form().tableWrapping === "around";
|
|
33473
|
+
},
|
|
33474
|
+
onChange: () => set("tableWrapping", "around"),
|
|
33475
|
+
"data-testid": "editor-table-properties-wrap-around"
|
|
33476
|
+
}), null);
|
|
33477
|
+
insert(_el$8, createComponent(Show, {
|
|
33478
|
+
get when() {
|
|
33479
|
+
return form().tableWrapping === "around";
|
|
33480
|
+
},
|
|
33481
|
+
get children() {
|
|
33482
|
+
return [(() => {
|
|
33483
|
+
var _el$1 = _tmpl$$9();
|
|
33484
|
+
insert(_el$1, createComponent(SelectField, {
|
|
33485
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33486
|
+
get label() {
|
|
33487
|
+
return t("table.horizontalAnchor");
|
|
33488
|
+
},
|
|
33489
|
+
get value() {
|
|
33490
|
+
return form().floatingHorizontalAnchor;
|
|
33491
|
+
},
|
|
33492
|
+
onChange: (value) => set("floatingHorizontalAnchor", value),
|
|
33493
|
+
"data-testid": "editor-table-properties-floating-h-anchor",
|
|
33494
|
+
get options() {
|
|
33495
|
+
return [{
|
|
33496
|
+
value: "margin",
|
|
33497
|
+
label: t("table.anchorMargin")
|
|
33498
|
+
}, {
|
|
33499
|
+
value: "page",
|
|
33500
|
+
label: t("table.anchorPage")
|
|
33501
|
+
}, {
|
|
33502
|
+
value: "text",
|
|
33503
|
+
label: t("table.anchorText")
|
|
33504
|
+
}];
|
|
33505
|
+
}
|
|
33506
|
+
}), null);
|
|
33507
|
+
insert(_el$1, createComponent(SelectField, {
|
|
33508
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33509
|
+
get label() {
|
|
33510
|
+
return t("table.verticalAnchor");
|
|
33511
|
+
},
|
|
33512
|
+
get value() {
|
|
33513
|
+
return form().floatingVerticalAnchor;
|
|
33514
|
+
},
|
|
33515
|
+
onChange: (value) => set("floatingVerticalAnchor", value),
|
|
33516
|
+
"data-testid": "editor-table-properties-floating-v-anchor",
|
|
33517
|
+
get options() {
|
|
33518
|
+
return [{
|
|
33519
|
+
value: "margin",
|
|
33520
|
+
label: t("table.anchorMargin")
|
|
33521
|
+
}, {
|
|
33522
|
+
value: "page",
|
|
33523
|
+
label: t("table.anchorPage")
|
|
33524
|
+
}, {
|
|
33525
|
+
value: "text",
|
|
33526
|
+
label: t("table.anchorText")
|
|
33527
|
+
}];
|
|
33528
|
+
}
|
|
33529
|
+
}), null);
|
|
33530
|
+
return _el$1;
|
|
33531
|
+
})(), (() => {
|
|
33532
|
+
var _el$10 = _tmpl$$9();
|
|
33533
|
+
insert(_el$10, () => NumField(t("table.positionX"), () => form().floatingX, (v) => set("floatingX", v), "editor-table-properties-floating-x", Boolean(form().floatingXAlign), true), null);
|
|
33534
|
+
insert(_el$10, () => NumField(t("table.positionY"), () => form().floatingY, (v) => set("floatingY", v), "editor-table-properties-floating-y", Boolean(form().floatingYAlign), true), null);
|
|
33535
|
+
insert(_el$10, createComponent(SelectField, {
|
|
33536
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33537
|
+
get label() {
|
|
33538
|
+
return t("table.horizontalAlignment");
|
|
33539
|
+
},
|
|
33540
|
+
get value() {
|
|
33541
|
+
return form().floatingXAlign;
|
|
33542
|
+
},
|
|
33543
|
+
onChange: (value) => set("floatingXAlign", value),
|
|
33544
|
+
"data-testid": "editor-table-properties-floating-x-align",
|
|
33545
|
+
get options() {
|
|
33546
|
+
return [{
|
|
33547
|
+
value: "",
|
|
33548
|
+
label: t("table.explicitOffset")
|
|
33549
|
+
}, ...["left", "center", "right", "inside", "outside"].map((value) => ({
|
|
33550
|
+
value,
|
|
33551
|
+
label: value
|
|
33552
|
+
}))];
|
|
33553
|
+
}
|
|
33554
|
+
}), null);
|
|
33555
|
+
insert(_el$10, createComponent(SelectField, {
|
|
33556
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33557
|
+
get label() {
|
|
33558
|
+
return t("table.verticalAlignment");
|
|
33559
|
+
},
|
|
33560
|
+
get value() {
|
|
33561
|
+
return form().floatingYAlign;
|
|
33562
|
+
},
|
|
33563
|
+
onChange: (value) => set("floatingYAlign", value),
|
|
33564
|
+
"data-testid": "editor-table-properties-floating-y-align",
|
|
33565
|
+
get options() {
|
|
33566
|
+
return [{
|
|
33567
|
+
value: "",
|
|
33568
|
+
label: t("table.explicitOffset")
|
|
33569
|
+
}, ...["top", "center", "bottom", "inside", "outside"].map((value) => ({
|
|
33570
|
+
value,
|
|
33571
|
+
label: value
|
|
33572
|
+
}))];
|
|
33573
|
+
}
|
|
33574
|
+
}), null);
|
|
33575
|
+
return _el$10;
|
|
33576
|
+
})(), (() => {
|
|
33577
|
+
var _el$11 = _tmpl$$9();
|
|
33578
|
+
insert(_el$11, () => NumField(t("table.distanceTop"), () => form().floatingDistanceTop, (v) => set("floatingDistanceTop", v), "editor-table-properties-floating-distance-top"), null);
|
|
33579
|
+
insert(_el$11, () => NumField(t("table.distanceRight"), () => form().floatingDistanceRight, (v) => set("floatingDistanceRight", v), "editor-table-properties-floating-distance-right"), null);
|
|
33580
|
+
insert(_el$11, () => NumField(t("table.distanceBottom"), () => form().floatingDistanceBottom, (v) => set("floatingDistanceBottom", v), "editor-table-properties-floating-distance-bottom"), null);
|
|
33581
|
+
insert(_el$11, () => NumField(t("table.distanceLeft"), () => form().floatingDistanceLeft, (v) => set("floatingDistanceLeft", v), "editor-table-properties-floating-distance-left"), null);
|
|
33582
|
+
return _el$11;
|
|
33583
|
+
})(), createComponent(Checkbox, {
|
|
33584
|
+
get label() {
|
|
33585
|
+
return t("table.allowOverlap");
|
|
33586
|
+
},
|
|
33587
|
+
get checked() {
|
|
33588
|
+
return form().floatingOverlap === "overlap";
|
|
33589
|
+
},
|
|
33590
|
+
onChange: (value) => set("floatingOverlap", value ? "overlap" : "never"),
|
|
33591
|
+
"data-testid": "editor-table-properties-floating-overlap"
|
|
33592
|
+
})];
|
|
33593
|
+
}
|
|
33594
|
+
}), null);
|
|
33595
|
+
return _el$;
|
|
33596
|
+
})();
|
|
33597
|
+
}
|
|
33598
|
+
var _tmpl$$8 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row></div><div class=oasis-editor-dialog-style-row>`);
|
|
33599
|
+
function RowTabPanel(props) {
|
|
33600
|
+
const t = useI18n();
|
|
33601
|
+
const form = () => props.ctrl.form;
|
|
33602
|
+
const set = props.ctrl.set;
|
|
33603
|
+
return (() => {
|
|
33604
|
+
var _el$ = _tmpl$$8(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
33605
|
+
insert(_el$2, () => NumField(t("table.rowHeight"), () => form().rowHeight, (v) => set("rowHeight", v), "editor-table-properties-row-height"), null);
|
|
33606
|
+
insert(_el$2, createComponent(SelectField, {
|
|
33607
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33608
|
+
get label() {
|
|
33609
|
+
return t("table.rowHeightRule");
|
|
33610
|
+
},
|
|
33611
|
+
get value() {
|
|
33612
|
+
return form().rowHeightRule;
|
|
33613
|
+
},
|
|
33614
|
+
onChange: (value) => set("rowHeightRule", value),
|
|
33615
|
+
"data-testid": "editor-table-properties-row-height-rule",
|
|
33616
|
+
get options() {
|
|
33617
|
+
return [{
|
|
33618
|
+
value: "",
|
|
33619
|
+
label: t("table.rowAuto")
|
|
33620
|
+
}, {
|
|
33621
|
+
value: "atLeast",
|
|
33622
|
+
label: t("table.rowAtLeast")
|
|
33623
|
+
}, {
|
|
33624
|
+
value: "exact",
|
|
33625
|
+
label: t("table.rowExactly")
|
|
33626
|
+
}];
|
|
33627
|
+
}
|
|
33628
|
+
}), null);
|
|
33629
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33630
|
+
get label() {
|
|
33631
|
+
return t("table.repeatHeader");
|
|
33632
|
+
},
|
|
33633
|
+
get checked() {
|
|
33634
|
+
return form().repeatHeader;
|
|
33635
|
+
},
|
|
33636
|
+
onChange: (v) => set("repeatHeader", v),
|
|
33637
|
+
"data-testid": "editor-table-properties-repeat-header"
|
|
33638
|
+
}), null);
|
|
33639
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33640
|
+
get label() {
|
|
33641
|
+
return t("table.allowBreakAcrossPages");
|
|
33642
|
+
},
|
|
33643
|
+
get checked() {
|
|
33644
|
+
return form().allowBreakAcrossPages;
|
|
33645
|
+
},
|
|
33646
|
+
onChange: (v) => set("allowBreakAcrossPages", v),
|
|
33647
|
+
"data-testid": "editor-table-properties-allow-break"
|
|
33648
|
+
}), null);
|
|
33649
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33650
|
+
get label() {
|
|
33651
|
+
return t("table.hiddenRow");
|
|
33652
|
+
},
|
|
33653
|
+
get checked() {
|
|
33654
|
+
return form().hiddenRow;
|
|
33655
|
+
},
|
|
33656
|
+
onChange: (v) => set("hiddenRow", v),
|
|
33657
|
+
"data-testid": "editor-table-properties-hidden-row"
|
|
33658
|
+
}), null);
|
|
33659
|
+
return _el$;
|
|
33660
|
+
})();
|
|
33661
|
+
}
|
|
33662
|
+
var _tmpl$$7 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row>`);
|
|
33663
|
+
function ColumnTabPanel(props) {
|
|
33664
|
+
const t = useI18n();
|
|
33665
|
+
const form = () => props.ctrl.form;
|
|
33666
|
+
const set = props.ctrl.set;
|
|
33667
|
+
return (() => {
|
|
33668
|
+
var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild;
|
|
33669
|
+
insert(_el$2, () => NumField(t("table.columnWidth"), () => form().columnWidth, (v) => set("columnWidth", v), "editor-table-properties-column-width"));
|
|
33670
|
+
return _el$;
|
|
33671
|
+
})();
|
|
33672
|
+
}
|
|
33673
|
+
var _tmpl$$6 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-style-row>`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row>`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-cell-preview data-testid=editor-table-properties-cell-preview>`), _tmpl$4$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel><div class=oasis-editor-dialog-row>`);
|
|
33674
|
+
function CellTabPanel(props) {
|
|
33675
|
+
const t = useI18n();
|
|
33676
|
+
const form = () => props.ctrl.form;
|
|
33677
|
+
const set = props.ctrl.set;
|
|
33678
|
+
const borderPreview = createMemo(() => {
|
|
33679
|
+
const border = resolveBorder(form().borderStyle, form().borderWidth, form().borderColor);
|
|
33680
|
+
const css = border ? `${border.width}pt ${border.type} ${border.color}` : void 0;
|
|
33681
|
+
return {
|
|
33682
|
+
"background-color": form().shading.trim() || void 0,
|
|
33683
|
+
"border-top": css && form().borderTop ? css : "1px solid #dadce0",
|
|
33684
|
+
"border-right": css && form().borderRight ? css : "1px solid #dadce0",
|
|
33685
|
+
"border-bottom": css && form().borderBottom ? css : "1px solid #dadce0",
|
|
33686
|
+
"border-left": css && form().borderLeft ? css : "1px solid #dadce0"
|
|
33687
|
+
};
|
|
33688
|
+
});
|
|
33689
|
+
const borderDisabled = () => form().borderStyle === "none";
|
|
33690
|
+
return (() => {
|
|
33691
|
+
var _el$ = _tmpl$4$1(), _el$2 = _el$.firstChild;
|
|
33692
|
+
insert(_el$2, () => NumField(t("table.cellWidth"), () => form().cellWidth, (v) => set("cellWidth", v), "editor-table-properties-cell-width"), null);
|
|
33693
|
+
insert(_el$2, createComponent(SelectField, {
|
|
33694
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33695
|
+
get label() {
|
|
33696
|
+
return t("table.verticalAlignment");
|
|
33697
|
+
},
|
|
33698
|
+
get value() {
|
|
33699
|
+
return form().cellVerticalAlign;
|
|
33700
|
+
},
|
|
33701
|
+
onChange: (value) => set("cellVerticalAlign", value),
|
|
33702
|
+
"data-testid": "editor-table-properties-cell-valign",
|
|
33703
|
+
get options() {
|
|
33704
|
+
return [{
|
|
33705
|
+
value: "",
|
|
33706
|
+
label: t("table.inherit")
|
|
33707
|
+
}, {
|
|
33708
|
+
value: "top",
|
|
33709
|
+
label: t("table.valignTop")
|
|
33710
|
+
}, {
|
|
33711
|
+
value: "middle",
|
|
33712
|
+
label: t("table.valignMiddle")
|
|
33713
|
+
}, {
|
|
33714
|
+
value: "bottom",
|
|
33715
|
+
label: t("table.valignBottom")
|
|
33716
|
+
}];
|
|
33717
|
+
}
|
|
33718
|
+
}), null);
|
|
33719
|
+
insert(_el$2, createComponent(SelectField, {
|
|
33720
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33721
|
+
get label() {
|
|
33722
|
+
return t("table.textDirection");
|
|
33723
|
+
},
|
|
33724
|
+
get value() {
|
|
33725
|
+
return form().cellTextDirection;
|
|
33726
|
+
},
|
|
33727
|
+
onChange: (value) => set("cellTextDirection", value),
|
|
33728
|
+
"data-testid": "editor-table-properties-cell-direction",
|
|
33729
|
+
get options() {
|
|
33730
|
+
return [{
|
|
33731
|
+
value: "",
|
|
33732
|
+
label: t("table.inherit")
|
|
33733
|
+
}, {
|
|
33734
|
+
value: "lrTb",
|
|
33735
|
+
label: "lrTb"
|
|
33736
|
+
}, {
|
|
33737
|
+
value: "tbRl",
|
|
33738
|
+
label: "tbRl"
|
|
33739
|
+
}, {
|
|
33740
|
+
value: "btLr",
|
|
33741
|
+
label: "btLr"
|
|
33742
|
+
}, {
|
|
33743
|
+
value: "lrTbV",
|
|
33744
|
+
label: "lrTbV"
|
|
33745
|
+
}, {
|
|
33746
|
+
value: "tbRlV",
|
|
33747
|
+
label: "tbRlV"
|
|
33748
|
+
}];
|
|
33749
|
+
}
|
|
33750
|
+
}), null);
|
|
33751
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
33752
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
33753
|
+
get legend() {
|
|
33754
|
+
return t("table.options");
|
|
33755
|
+
},
|
|
33756
|
+
get children() {
|
|
33757
|
+
var _el$3 = _tmpl$$6();
|
|
33758
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33759
|
+
get label() {
|
|
33760
|
+
return t("table.noWrap");
|
|
33761
|
+
},
|
|
33762
|
+
get checked() {
|
|
33763
|
+
return form().cellNoWrap;
|
|
33764
|
+
},
|
|
33765
|
+
onChange: (v) => set("cellNoWrap", v),
|
|
33766
|
+
"data-testid": "editor-table-properties-cell-nowrap"
|
|
33767
|
+
}), null);
|
|
33768
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33769
|
+
get label() {
|
|
33770
|
+
return t("table.fitText");
|
|
33771
|
+
},
|
|
33772
|
+
get checked() {
|
|
33773
|
+
return form().cellFitText;
|
|
33774
|
+
},
|
|
33775
|
+
onChange: (v) => set("cellFitText", v),
|
|
33776
|
+
"data-testid": "editor-table-properties-cell-fit-text"
|
|
33777
|
+
}), null);
|
|
33778
|
+
insert(_el$3, createComponent(Checkbox, {
|
|
33779
|
+
get label() {
|
|
33780
|
+
return t("table.hideMark");
|
|
33781
|
+
},
|
|
33782
|
+
get checked() {
|
|
33783
|
+
return form().cellHideMark;
|
|
33784
|
+
},
|
|
33785
|
+
onChange: (v) => set("cellHideMark", v),
|
|
33786
|
+
"data-testid": "editor-table-properties-cell-hide-mark"
|
|
33787
|
+
}), null);
|
|
33788
|
+
return _el$3;
|
|
33789
|
+
}
|
|
33790
|
+
}), null);
|
|
33791
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
33792
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
33793
|
+
get legend() {
|
|
33794
|
+
return t("table.cellMargins");
|
|
33795
|
+
},
|
|
33796
|
+
get children() {
|
|
33797
|
+
var _el$4 = _tmpl$2$1();
|
|
33798
|
+
insert(_el$4, () => NumField(t("paragraph.borderSideTop"), () => form().marginTop, (v) => set("marginTop", v), "editor-table-properties-margin-top"), null);
|
|
33799
|
+
insert(_el$4, () => NumField(t("paragraph.borderSideRight"), () => form().marginRight, (v) => set("marginRight", v), "editor-table-properties-margin-right"), null);
|
|
33800
|
+
insert(_el$4, () => NumField(t("paragraph.borderSideBottom"), () => form().marginBottom, (v) => set("marginBottom", v), "editor-table-properties-margin-bottom"), null);
|
|
33801
|
+
insert(_el$4, () => NumField(t("paragraph.borderSideLeft"), () => form().marginLeft, (v) => set("marginLeft", v), "editor-table-properties-margin-left"), null);
|
|
33802
|
+
return _el$4;
|
|
33803
|
+
}
|
|
33804
|
+
}), null);
|
|
33805
|
+
insert(_el$, createComponent(FieldGroup, {
|
|
33806
|
+
"class": "oasis-editor-font-dialog-fieldset",
|
|
33807
|
+
get legend() {
|
|
33808
|
+
return t("paragraph.bordersSection");
|
|
33809
|
+
},
|
|
33810
|
+
get children() {
|
|
33811
|
+
return [(() => {
|
|
33812
|
+
var _el$5 = _tmpl$2$1();
|
|
33813
|
+
insert(_el$5, createComponent(SelectField, {
|
|
33814
|
+
"class": "oasis-editor-dialog-input-group-grow",
|
|
33815
|
+
get label() {
|
|
33816
|
+
return t("paragraph.borderStyleLabel");
|
|
33817
|
+
},
|
|
33818
|
+
get value() {
|
|
33819
|
+
return form().borderStyle;
|
|
33820
|
+
},
|
|
33821
|
+
onChange: (value) => {
|
|
33822
|
+
const next = value;
|
|
33823
|
+
set("borderStyle", next);
|
|
33824
|
+
if (next === "none") {
|
|
33825
|
+
set("borderTop", false);
|
|
33826
|
+
set("borderRight", false);
|
|
33827
|
+
set("borderBottom", false);
|
|
33828
|
+
set("borderLeft", false);
|
|
33829
|
+
set("borderStart", false);
|
|
33830
|
+
set("borderEnd", false);
|
|
33831
|
+
set("borderTlBr", false);
|
|
33832
|
+
set("borderTrBl", false);
|
|
33833
|
+
} else if (!form().borderTop && !form().borderRight && !form().borderBottom && !form().borderLeft) {
|
|
33834
|
+
set("borderTop", true);
|
|
33835
|
+
set("borderRight", true);
|
|
33836
|
+
set("borderBottom", true);
|
|
33837
|
+
set("borderLeft", true);
|
|
33838
|
+
}
|
|
33839
|
+
},
|
|
33840
|
+
"data-testid": "editor-table-properties-border-style",
|
|
33841
|
+
get options() {
|
|
33842
|
+
return [{
|
|
33843
|
+
value: "none",
|
|
33844
|
+
label: t("paragraph.borderNone")
|
|
33845
|
+
}, {
|
|
33846
|
+
value: "solid",
|
|
33847
|
+
label: t("paragraph.borderSolid")
|
|
33848
|
+
}, {
|
|
33849
|
+
value: "dashed",
|
|
33850
|
+
label: t("paragraph.borderDashed")
|
|
33851
|
+
}, {
|
|
33852
|
+
value: "dotted",
|
|
33853
|
+
label: t("paragraph.borderDotted")
|
|
33854
|
+
}];
|
|
33855
|
+
}
|
|
33856
|
+
}), null);
|
|
33857
|
+
insert(_el$5, () => NumField(t("paragraph.borderWidthLabel"), () => form().borderWidth, (v) => set("borderWidth", v), "editor-table-properties-border-width", borderDisabled()), null);
|
|
33858
|
+
insert(_el$5, createComponent(TextField, {
|
|
33859
|
+
type: "color",
|
|
33860
|
+
"class": "oasis-editor-dialog-input-group",
|
|
33861
|
+
controlClass: "oasis-editor-dialog-input",
|
|
33862
|
+
get label() {
|
|
33863
|
+
return t("paragraph.borderColorLabel");
|
|
33864
|
+
},
|
|
33865
|
+
get value() {
|
|
33866
|
+
return form().borderColor || DEFAULT_BORDER_COLOR;
|
|
33867
|
+
},
|
|
33868
|
+
get disabled() {
|
|
33869
|
+
return borderDisabled();
|
|
33870
|
+
},
|
|
33871
|
+
onChange: (value) => set("borderColor", value),
|
|
33872
|
+
"data-testid": "editor-table-properties-border-color"
|
|
33873
|
+
}), null);
|
|
33874
|
+
insert(_el$5, createComponent(TextField, {
|
|
33875
|
+
type: "color",
|
|
33876
|
+
"class": "oasis-editor-dialog-input-group",
|
|
33877
|
+
controlClass: "oasis-editor-dialog-input",
|
|
33878
|
+
get label() {
|
|
33879
|
+
return t("paragraph.shadingLabel");
|
|
33880
|
+
},
|
|
33881
|
+
get value() {
|
|
33882
|
+
return form().shading || "#ffffff";
|
|
33883
|
+
},
|
|
33884
|
+
onChange: (value) => set("shading", value),
|
|
33885
|
+
"data-testid": "editor-table-properties-shading"
|
|
33886
|
+
}), null);
|
|
33887
|
+
return _el$5;
|
|
33888
|
+
})(), (() => {
|
|
33889
|
+
var _el$6 = _tmpl$$6();
|
|
33890
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33891
|
+
get label() {
|
|
33892
|
+
return t("paragraph.borderSideTop");
|
|
33893
|
+
},
|
|
33894
|
+
get checked() {
|
|
33895
|
+
return form().borderTop;
|
|
33896
|
+
},
|
|
33897
|
+
get disabled() {
|
|
33898
|
+
return borderDisabled();
|
|
33899
|
+
},
|
|
33900
|
+
onChange: (v) => set("borderTop", v),
|
|
33901
|
+
"data-testid": "editor-table-properties-border-top"
|
|
33902
|
+
}), null);
|
|
33903
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33904
|
+
get label() {
|
|
33905
|
+
return t("paragraph.borderSideRight");
|
|
33906
|
+
},
|
|
33907
|
+
get checked() {
|
|
33908
|
+
return form().borderRight;
|
|
33909
|
+
},
|
|
33910
|
+
get disabled() {
|
|
33911
|
+
return borderDisabled();
|
|
33912
|
+
},
|
|
33913
|
+
onChange: (v) => set("borderRight", v),
|
|
33914
|
+
"data-testid": "editor-table-properties-border-right"
|
|
33915
|
+
}), null);
|
|
33916
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33917
|
+
get label() {
|
|
33918
|
+
return t("paragraph.borderSideBottom");
|
|
33919
|
+
},
|
|
33920
|
+
get checked() {
|
|
33921
|
+
return form().borderBottom;
|
|
33922
|
+
},
|
|
33923
|
+
get disabled() {
|
|
33924
|
+
return borderDisabled();
|
|
33925
|
+
},
|
|
33926
|
+
onChange: (v) => set("borderBottom", v),
|
|
33927
|
+
"data-testid": "editor-table-properties-border-bottom"
|
|
33928
|
+
}), null);
|
|
33929
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33930
|
+
get label() {
|
|
33931
|
+
return t("paragraph.borderSideLeft");
|
|
33932
|
+
},
|
|
33933
|
+
get checked() {
|
|
33934
|
+
return form().borderLeft;
|
|
33935
|
+
},
|
|
33936
|
+
get disabled() {
|
|
33937
|
+
return borderDisabled();
|
|
33938
|
+
},
|
|
33939
|
+
onChange: (v) => set("borderLeft", v),
|
|
33940
|
+
"data-testid": "editor-table-properties-border-left"
|
|
33941
|
+
}), null);
|
|
33942
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33943
|
+
get label() {
|
|
33944
|
+
return t("table.borderStart");
|
|
33945
|
+
},
|
|
33946
|
+
get checked() {
|
|
33947
|
+
return form().borderStart;
|
|
33948
|
+
},
|
|
33949
|
+
get disabled() {
|
|
33950
|
+
return borderDisabled();
|
|
33951
|
+
},
|
|
33952
|
+
onChange: (v) => set("borderStart", v),
|
|
33953
|
+
"data-testid": "editor-table-properties-border-start"
|
|
33954
|
+
}), null);
|
|
33955
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33956
|
+
get label() {
|
|
33957
|
+
return t("table.borderEnd");
|
|
33958
|
+
},
|
|
33959
|
+
get checked() {
|
|
33960
|
+
return form().borderEnd;
|
|
33961
|
+
},
|
|
33962
|
+
get disabled() {
|
|
33963
|
+
return borderDisabled();
|
|
33964
|
+
},
|
|
33965
|
+
onChange: (v) => set("borderEnd", v),
|
|
33966
|
+
"data-testid": "editor-table-properties-border-end"
|
|
33967
|
+
}), null);
|
|
33968
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33969
|
+
get label() {
|
|
33970
|
+
return t("table.borderTlBr");
|
|
33971
|
+
},
|
|
33972
|
+
get checked() {
|
|
33973
|
+
return form().borderTlBr;
|
|
33974
|
+
},
|
|
33975
|
+
get disabled() {
|
|
33976
|
+
return borderDisabled();
|
|
33977
|
+
},
|
|
33978
|
+
onChange: (v) => set("borderTlBr", v),
|
|
33979
|
+
"data-testid": "editor-table-properties-border-tlbr"
|
|
33980
|
+
}), null);
|
|
33981
|
+
insert(_el$6, createComponent(Checkbox, {
|
|
33982
|
+
get label() {
|
|
33983
|
+
return t("table.borderTrBl");
|
|
33984
|
+
},
|
|
33985
|
+
get checked() {
|
|
33986
|
+
return form().borderTrBl;
|
|
33987
|
+
},
|
|
33988
|
+
get disabled() {
|
|
33989
|
+
return borderDisabled();
|
|
33990
|
+
},
|
|
33991
|
+
onChange: (v) => set("borderTrBl", v),
|
|
33992
|
+
"data-testid": "editor-table-properties-border-trbl"
|
|
33993
|
+
}), null);
|
|
33994
|
+
return _el$6;
|
|
33995
|
+
})(), (() => {
|
|
33996
|
+
var _el$7 = _tmpl$3$1();
|
|
33997
|
+
createRenderEffect((_$p) => style(_el$7, borderPreview(), _$p));
|
|
33998
|
+
return _el$7;
|
|
33999
|
+
})()];
|
|
34000
|
+
}
|
|
34001
|
+
}), null);
|
|
34002
|
+
return _el$;
|
|
34003
|
+
})();
|
|
34004
|
+
}
|
|
34005
|
+
var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-table-properties-panel>`);
|
|
34006
|
+
function AltTextTabPanel(props) {
|
|
34007
|
+
const t = useI18n();
|
|
34008
|
+
const form = () => props.ctrl.form;
|
|
34009
|
+
const set = props.ctrl.set;
|
|
34010
|
+
return (() => {
|
|
34011
|
+
var _el$ = _tmpl$$5();
|
|
34012
|
+
insert(_el$, createComponent(TextField, {
|
|
34013
|
+
get label() {
|
|
34014
|
+
return t("table.altTitle");
|
|
34015
|
+
},
|
|
34016
|
+
get value() {
|
|
34017
|
+
return form().altTitle;
|
|
34018
|
+
},
|
|
34019
|
+
onChange: (v) => set("altTitle", v),
|
|
34020
|
+
"data-testid": "editor-table-properties-alt-title"
|
|
34021
|
+
}), null);
|
|
34022
|
+
insert(_el$, createComponent(TextAreaField, {
|
|
34023
|
+
"class": "oasis-editor-dialog-input-group",
|
|
34024
|
+
get label() {
|
|
34025
|
+
return t("table.altDescription");
|
|
34026
|
+
},
|
|
34027
|
+
controlClass: "oasis-editor-table-properties-textarea",
|
|
34028
|
+
get value() {
|
|
34029
|
+
return form().altDescription;
|
|
34030
|
+
},
|
|
34031
|
+
onChange: (value) => set("altDescription", value),
|
|
34032
|
+
"data-testid": "editor-table-properties-alt-description"
|
|
34033
|
+
}), null);
|
|
34034
|
+
return _el$;
|
|
34035
|
+
})();
|
|
34036
|
+
}
|
|
34037
|
+
function TablePropertiesDialog(props) {
|
|
34038
|
+
const t = useI18n();
|
|
34039
|
+
const ctrl = useTablePropertiesController(props);
|
|
32853
34040
|
return createComponent(Dialog, {
|
|
32854
34041
|
get isOpen() {
|
|
32855
34042
|
return props.isOpen;
|
|
@@ -32868,7 +34055,9 @@ function TablePropertiesDialog(props) {
|
|
|
32868
34055
|
get onCancel() {
|
|
32869
34056
|
return props.onClose;
|
|
32870
34057
|
},
|
|
32871
|
-
onConfirm
|
|
34058
|
+
get onConfirm() {
|
|
34059
|
+
return ctrl.handleApply;
|
|
34060
|
+
},
|
|
32872
34061
|
get cancelLabel() {
|
|
32873
34062
|
return t("generic.cancel");
|
|
32874
34063
|
},
|
|
@@ -32882,9 +34071,9 @@ function TablePropertiesDialog(props) {
|
|
|
32882
34071
|
get children() {
|
|
32883
34072
|
return createComponent(Tabs, {
|
|
32884
34073
|
get value() {
|
|
32885
|
-
return form.activeTab;
|
|
34074
|
+
return ctrl.form.activeTab;
|
|
32886
34075
|
},
|
|
32887
|
-
onChange: (tab) =>
|
|
34076
|
+
onChange: (tab) => ctrl.set("activeTab", tab),
|
|
32888
34077
|
get ariaLabel() {
|
|
32889
34078
|
return t("table.propertiesTitle");
|
|
32890
34079
|
},
|
|
@@ -32895,40 +34084,35 @@ function TablePropertiesDialog(props) {
|
|
|
32895
34084
|
label: t("table.tabTable"),
|
|
32896
34085
|
testId: "editor-table-properties-tab-table",
|
|
32897
34086
|
panel: createComponent(TableTabPanel, {
|
|
32898
|
-
|
|
32899
|
-
set: setForm
|
|
34087
|
+
ctrl
|
|
32900
34088
|
})
|
|
32901
34089
|
}, {
|
|
32902
34090
|
id: "row",
|
|
32903
34091
|
label: t("table.tabRow"),
|
|
32904
34092
|
testId: "editor-table-properties-tab-row",
|
|
32905
34093
|
panel: createComponent(RowTabPanel, {
|
|
32906
|
-
|
|
32907
|
-
set: setForm
|
|
34094
|
+
ctrl
|
|
32908
34095
|
})
|
|
32909
34096
|
}, {
|
|
32910
34097
|
id: "column",
|
|
32911
34098
|
label: t("table.tabColumn"),
|
|
32912
34099
|
testId: "editor-table-properties-tab-column",
|
|
32913
34100
|
panel: createComponent(ColumnTabPanel, {
|
|
32914
|
-
|
|
32915
|
-
set: setForm
|
|
34101
|
+
ctrl
|
|
32916
34102
|
})
|
|
32917
34103
|
}, {
|
|
32918
34104
|
id: "cell",
|
|
32919
34105
|
label: t("table.tabCell"),
|
|
32920
34106
|
testId: "editor-table-properties-tab-cell",
|
|
32921
34107
|
panel: createComponent(CellTabPanel, {
|
|
32922
|
-
|
|
32923
|
-
set: setForm
|
|
34108
|
+
ctrl
|
|
32924
34109
|
})
|
|
32925
34110
|
}, {
|
|
32926
34111
|
id: "altText",
|
|
32927
34112
|
label: t("table.tabAltText"),
|
|
32928
34113
|
testId: "editor-table-properties-tab-alt-text",
|
|
32929
34114
|
panel: createComponent(AltTextTabPanel, {
|
|
32930
|
-
|
|
32931
|
-
set: setForm
|
|
34115
|
+
ctrl
|
|
32932
34116
|
})
|
|
32933
34117
|
}];
|
|
32934
34118
|
}
|
|
@@ -32936,8 +34120,7 @@ function TablePropertiesDialog(props) {
|
|
|
32936
34120
|
}
|
|
32937
34121
|
});
|
|
32938
34122
|
}
|
|
32939
|
-
|
|
32940
|
-
var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-find-replace-dialog><div class=oasis-editor-fr-header><span></span><button class=oasis-editor-fr-close><i data-lucide=x></i></button></div><div class=oasis-editor-fr-body><div class=oasis-editor-fr-input-group><div class=oasis-editor-fr-input-wrapper><input type=text autofocus class=oasis-editor-fr-input><span class=oasis-editor-fr-counter></span></div><div class=oasis-editor-fr-actions><button><i data-lucide=chevron-up></i></button><button><i data-lucide=chevron-down></i></button></div></div><div class=oasis-editor-fr-input-group><input type=text class=oasis-editor-fr-input><div class=oasis-editor-fr-actions><button class=oasis-editor-fr-btn-text></button><button class=oasis-editor-fr-btn-text></button></div></div><div class=oasis-editor-fr-options><label class=oasis-editor-fr-checkbox><input type=checkbox><span></span></label><label class=oasis-editor-fr-checkbox><input type=checkbox><span>`);
|
|
34123
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<div class=oasis-editor-find-replace-dialog><div class=oasis-editor-fr-header></div><div class=oasis-editor-fr-body><div class=oasis-editor-fr-input-group><div class=oasis-editor-fr-input-wrapper></div></div><div class=oasis-editor-fr-input-group>`);
|
|
32941
34124
|
function FindReplaceDialog(props) {
|
|
32942
34125
|
const t = useI18n();
|
|
32943
34126
|
const {
|
|
@@ -32960,64 +34143,143 @@ function FindReplaceDialog(props) {
|
|
|
32960
34143
|
return fr.isOpen();
|
|
32961
34144
|
},
|
|
32962
34145
|
get children() {
|
|
32963
|
-
var _el$ = _tmpl$$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.
|
|
34146
|
+
var _el$ = _tmpl$$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
32964
34147
|
_el$.$$keydown = handleKeyDown;
|
|
32965
|
-
insert(_el$
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32974
|
-
|
|
32975
|
-
|
|
32976
|
-
|
|
32977
|
-
|
|
32978
|
-
insert(_el$
|
|
32979
|
-
|
|
32980
|
-
|
|
32981
|
-
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
|
|
32987
|
-
|
|
32988
|
-
|
|
32989
|
-
|
|
32990
|
-
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
|
|
32996
|
-
|
|
32997
|
-
|
|
32998
|
-
|
|
32999
|
-
|
|
33000
|
-
|
|
33001
|
-
|
|
33002
|
-
|
|
33003
|
-
|
|
33004
|
-
|
|
33005
|
-
|
|
33006
|
-
|
|
33007
|
-
|
|
33008
|
-
|
|
33009
|
-
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
34148
|
+
insert(_el$2, createComponent(Text, {
|
|
34149
|
+
get children() {
|
|
34150
|
+
return t("find.title");
|
|
34151
|
+
}
|
|
34152
|
+
}), null);
|
|
34153
|
+
insert(_el$2, createComponent(SurfaceButton, {
|
|
34154
|
+
"class": "oasis-editor-fr-close",
|
|
34155
|
+
icon: "x",
|
|
34156
|
+
onClick: () => fr.setIsOpen(false),
|
|
34157
|
+
get label() {
|
|
34158
|
+
return t("generic.close");
|
|
34159
|
+
}
|
|
34160
|
+
}), null);
|
|
34161
|
+
insert(_el$5, createComponent(TextField, {
|
|
34162
|
+
type: "text",
|
|
34163
|
+
get placeholder() {
|
|
34164
|
+
return t("find.placeholder");
|
|
34165
|
+
},
|
|
34166
|
+
get value() {
|
|
34167
|
+
return fr.searchTerm();
|
|
34168
|
+
},
|
|
34169
|
+
onChange: (value) => fr.setSearchTerm(value),
|
|
34170
|
+
autofocus: true,
|
|
34171
|
+
controlClass: "oasis-editor-fr-input"
|
|
34172
|
+
}), null);
|
|
34173
|
+
insert(_el$5, createComponent(StatusText, {
|
|
34174
|
+
"class": "oasis-editor-fr-counter",
|
|
34175
|
+
get children() {
|
|
34176
|
+
return memo(() => fr.matches().length > 0)() ? `${fr.currentIndex() + 1} / ${fr.matches().length}` : t("find.noMatches");
|
|
34177
|
+
}
|
|
34178
|
+
}), null);
|
|
34179
|
+
insert(_el$4, createComponent(ActionRow, {
|
|
34180
|
+
"class": "oasis-editor-fr-actions",
|
|
34181
|
+
wrap: false,
|
|
34182
|
+
get children() {
|
|
34183
|
+
return [createComponent(SurfaceButton, {
|
|
34184
|
+
get onClick() {
|
|
34185
|
+
return fr.findPrevious;
|
|
34186
|
+
},
|
|
34187
|
+
get disabled() {
|
|
34188
|
+
return fr.matches().length === 0;
|
|
34189
|
+
},
|
|
34190
|
+
icon: "chevron-up",
|
|
34191
|
+
get label() {
|
|
34192
|
+
return t("find.prevTooltip");
|
|
34193
|
+
}
|
|
34194
|
+
}), createComponent(SurfaceButton, {
|
|
34195
|
+
get onClick() {
|
|
34196
|
+
return fr.findNext;
|
|
34197
|
+
},
|
|
34198
|
+
get disabled() {
|
|
34199
|
+
return fr.matches().length === 0;
|
|
34200
|
+
},
|
|
34201
|
+
icon: "chevron-down",
|
|
34202
|
+
get label() {
|
|
34203
|
+
return t("find.nextTooltip");
|
|
34204
|
+
}
|
|
34205
|
+
})];
|
|
34206
|
+
}
|
|
34207
|
+
}), null);
|
|
34208
|
+
insert(_el$6, createComponent(TextField, {
|
|
34209
|
+
type: "text",
|
|
34210
|
+
get placeholder() {
|
|
34211
|
+
return t("replace.placeholder");
|
|
34212
|
+
},
|
|
34213
|
+
get value() {
|
|
34214
|
+
return fr.replaceTerm();
|
|
34215
|
+
},
|
|
34216
|
+
onChange: (value) => fr.setReplaceTerm(value),
|
|
34217
|
+
controlClass: "oasis-editor-fr-input"
|
|
34218
|
+
}), null);
|
|
34219
|
+
insert(_el$6, createComponent(ActionRow, {
|
|
34220
|
+
"class": "oasis-editor-fr-actions",
|
|
34221
|
+
wrap: false,
|
|
34222
|
+
get children() {
|
|
34223
|
+
return [createComponent(SurfaceButton, {
|
|
34224
|
+
"class": "oasis-editor-fr-btn-text",
|
|
34225
|
+
get onClick() {
|
|
34226
|
+
return fr.replace;
|
|
34227
|
+
},
|
|
34228
|
+
get disabled() {
|
|
34229
|
+
return fr.matches().length === 0;
|
|
34230
|
+
},
|
|
34231
|
+
get children() {
|
|
34232
|
+
return t("replace.one");
|
|
34233
|
+
}
|
|
34234
|
+
}), createComponent(SurfaceButton, {
|
|
34235
|
+
"class": "oasis-editor-fr-btn-text",
|
|
34236
|
+
get onClick() {
|
|
34237
|
+
return fr.replaceAll;
|
|
34238
|
+
},
|
|
34239
|
+
get disabled() {
|
|
34240
|
+
return fr.matches().length === 0;
|
|
34241
|
+
},
|
|
34242
|
+
get children() {
|
|
34243
|
+
return t("replace.allBtn");
|
|
34244
|
+
}
|
|
34245
|
+
})];
|
|
34246
|
+
}
|
|
34247
|
+
}), null);
|
|
34248
|
+
insert(_el$3, createComponent(ActionRow, {
|
|
34249
|
+
"class": "oasis-editor-fr-options",
|
|
34250
|
+
get children() {
|
|
34251
|
+
return [createComponent(Checkbox, {
|
|
34252
|
+
"class": "oasis-editor-fr-checkbox",
|
|
34253
|
+
get label() {
|
|
34254
|
+
return t("find.matchCase");
|
|
34255
|
+
},
|
|
34256
|
+
get checked() {
|
|
34257
|
+
return fr.findOptions().matchCase;
|
|
34258
|
+
},
|
|
34259
|
+
onChange: (checked) => fr.setFindOptions({
|
|
34260
|
+
...fr.findOptions(),
|
|
34261
|
+
matchCase: checked
|
|
34262
|
+
})
|
|
34263
|
+
}), createComponent(Checkbox, {
|
|
34264
|
+
"class": "oasis-editor-fr-checkbox",
|
|
34265
|
+
get label() {
|
|
34266
|
+
return t("find.wholeWord");
|
|
34267
|
+
},
|
|
34268
|
+
get checked() {
|
|
34269
|
+
return fr.findOptions().wholeWord;
|
|
34270
|
+
},
|
|
34271
|
+
onChange: (checked) => fr.setFindOptions({
|
|
34272
|
+
...fr.findOptions(),
|
|
34273
|
+
wholeWord: checked
|
|
34274
|
+
})
|
|
34275
|
+
})];
|
|
34276
|
+
}
|
|
34277
|
+
}), null);
|
|
33016
34278
|
return _el$;
|
|
33017
34279
|
}
|
|
33018
34280
|
});
|
|
33019
34281
|
}
|
|
33020
|
-
delegateEvents(["keydown"
|
|
34282
|
+
delegateEvents(["keydown"]);
|
|
33021
34283
|
var _tmpl$$3 = /* @__PURE__ */ template(`<div class=oasis-editor-context-menu role=menu data-testid=editor-context-menu>`), _tmpl$2 = /* @__PURE__ */ template(`<i>`), _tmpl$3 = /* @__PURE__ */ template(`<span class=oasis-editor-context-menu-shortcut>`), _tmpl$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-context-menu-item role=menuitem><span class=oasis-editor-context-menu-label>`), _tmpl$5 = /* @__PURE__ */ template(`<div class=oasis-editor-context-menu-separator>`), _tmpl$6 = /* @__PURE__ */ template(`<i data-lucide=check style=visibility:hidden>`);
|
|
33022
34284
|
function ContextMenu(props) {
|
|
33023
34285
|
let menuRef;
|
|
@@ -33530,7 +34792,7 @@ function EditorWorkspace(props) {
|
|
|
33530
34792
|
}
|
|
33531
34793
|
})];
|
|
33532
34794
|
}
|
|
33533
|
-
var _tmpl$$1 = /* @__PURE__ */ template(`<div class=oasis-editor-welcome-overlay role=dialog aria-modal=true aria-labelledby=oasis-editor-welcome-title><div class=oasis-editor-welcome-card><h2 id=oasis-editor-welcome-title class=oasis-editor-welcome-title></h2><p class=oasis-editor-welcome-body></p><p class=oasis-editor-welcome-note></p><div class=oasis-editor-welcome-actions
|
|
34795
|
+
var _tmpl$$1 = /* @__PURE__ */ template(`<div class=oasis-editor-welcome-overlay role=dialog aria-modal=true aria-labelledby=oasis-editor-welcome-title><div class=oasis-editor-welcome-card><h2 id=oasis-editor-welcome-title class=oasis-editor-welcome-title></h2><p class=oasis-editor-welcome-body></p><p class=oasis-editor-welcome-note></p><div class=oasis-editor-welcome-actions>`);
|
|
33534
34796
|
function WelcomeOverlay(props) {
|
|
33535
34797
|
const t = useI18n();
|
|
33536
34798
|
const handleEnable = () => {
|
|
@@ -33548,7 +34810,7 @@ function WelcomeOverlay(props) {
|
|
|
33548
34810
|
return props.isOpen;
|
|
33549
34811
|
},
|
|
33550
34812
|
get children() {
|
|
33551
|
-
var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling
|
|
34813
|
+
var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
33552
34814
|
insert(_el$2, createComponent(OasisBrandMark, {
|
|
33553
34815
|
height: 72,
|
|
33554
34816
|
"class": "oasis-editor-welcome-mark"
|
|
@@ -33556,15 +34818,26 @@ function WelcomeOverlay(props) {
|
|
|
33556
34818
|
insert(_el$3, () => t("welcome.title"));
|
|
33557
34819
|
insert(_el$4, () => t("welcome.body"));
|
|
33558
34820
|
insert(_el$5, () => t("welcome.note"));
|
|
33559
|
-
_el$
|
|
33560
|
-
|
|
33561
|
-
|
|
33562
|
-
|
|
34821
|
+
insert(_el$6, createComponent(Button, {
|
|
34822
|
+
variant: "secondary",
|
|
34823
|
+
onClick: handleSkip,
|
|
34824
|
+
"data-testid": "editor-welcome-skip",
|
|
34825
|
+
get children() {
|
|
34826
|
+
return t("welcome.skip");
|
|
34827
|
+
}
|
|
34828
|
+
}), null);
|
|
34829
|
+
insert(_el$6, createComponent(Button, {
|
|
34830
|
+
variant: "primary",
|
|
34831
|
+
onClick: handleEnable,
|
|
34832
|
+
"data-testid": "editor-welcome-enable",
|
|
34833
|
+
get children() {
|
|
34834
|
+
return t("welcome.enable");
|
|
34835
|
+
}
|
|
34836
|
+
}), null);
|
|
33563
34837
|
return _el$;
|
|
33564
34838
|
}
|
|
33565
34839
|
});
|
|
33566
34840
|
}
|
|
33567
|
-
delegateEvents(["click"]);
|
|
33568
34841
|
const WORD_NS$1 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
|
|
33569
34842
|
const PACKAGE_REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
33570
34843
|
const OFFICE_REL_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
@@ -37308,7 +38581,15 @@ async function drawFragmentText(writer, pageIndex, paragraph, line, fragment, do
|
|
|
37308
38581
|
const text = chars.map((char) => styles.allCaps ? char.char.toUpperCase() : char.char).join("");
|
|
37309
38582
|
const firstChar = chars[0];
|
|
37310
38583
|
if (!firstChar || text.length === 0) return;
|
|
37311
|
-
drawLinkAnnotation(
|
|
38584
|
+
drawLinkAnnotation(
|
|
38585
|
+
writer,
|
|
38586
|
+
pageIndex,
|
|
38587
|
+
line,
|
|
38588
|
+
fragment,
|
|
38589
|
+
originX,
|
|
38590
|
+
originY,
|
|
38591
|
+
styles
|
|
38592
|
+
);
|
|
37312
38593
|
drawFragmentShading(
|
|
37313
38594
|
writer,
|
|
37314
38595
|
pageIndex,
|
|
@@ -37381,7 +38662,15 @@ async function drawFragmentText(writer, pageIndex, paragraph, line, fragment, do
|
|
|
37381
38662
|
styles,
|
|
37382
38663
|
baseTextOptions
|
|
37383
38664
|
};
|
|
37384
|
-
emitFragmentGlyphs(
|
|
38665
|
+
emitFragmentGlyphs(
|
|
38666
|
+
chunkCtx,
|
|
38667
|
+
chars,
|
|
38668
|
+
originX,
|
|
38669
|
+
styles,
|
|
38670
|
+
line,
|
|
38671
|
+
fragment,
|
|
38672
|
+
paragraphAlign
|
|
38673
|
+
);
|
|
37385
38674
|
if (styles.underline) {
|
|
37386
38675
|
drawFragmentDecoration(
|
|
37387
38676
|
writer,
|