Skip to content

Commit

Permalink
v28.2.3 is released
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeline committed Jan 29, 2025
1 parent caf1904 commit d08063b
Show file tree
Hide file tree
Showing 472 changed files with 22,321 additions and 713 deletions.
2 changes: 1 addition & 1 deletion controls/barcodegenerator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.1.41 (2025-01-21)
## 28.2.3 (2025-01-29)

### Barcode

Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.1.41 (2025-01-21)
## 28.2.3 (2025-01-29)

### Switch

Expand Down
2 changes: 1 addition & 1 deletion controls/calendars/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.1.41 (2025-01-21)
## 28.2.3 (2025-01-29)

### DatePicker

Expand Down
8 changes: 8 additions & 0 deletions controls/charts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## [Unreleased]

## 28.2.3 (2025-01-29)

### Chart

#### Bug Fixes

- `#I679703` - The arguments in the `axisMultiLabelRender` event can now be modified correctly.

## 28.1.41 (2025-01-21)

### Chart
Expand Down
2 changes: 1 addition & 1 deletion controls/charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-charts",
"version": "28.1.39",
"version": "28.1.41",
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { AccPoints, AccumulationSeries } from '../model/acc-base';
import { Size, PathOption } from '@syncfusion/ej2-svg-base';
import { ChartLocation, appendChildElement, removeElement } from '../../common/utils/helper';
import { ChartLocation, ColorValue, appendChildElement, removeElement } from '../../common/utils/helper';
import { AccumulationChart } from '../accumulation';
import { TriangularBase } from './triangular-base';

Expand Down Expand Up @@ -141,7 +141,6 @@ export class FunnelSeries extends TriangularBase {
}
}


/**
* To get the module name of the funnel series.
*
Expand Down
8 changes: 5 additions & 3 deletions controls/charts/src/chart/axis/multi-level-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Chart } from '../chart';
import { Axis } from '../axis/axis';
import { FontModel } from '../../common/model/base-model';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
import { extend, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
import { textWrap, appendClipElement, appendChildElement } from '../../common/utils/helper';
import { valueToCoefficient, textTrim, textElement, withInBounds } from '../../common/utils/helper';
import { Size, measureText, TextOption, PathOption, Rect, SvgRenderer } from '@syncfusion/ej2-svg-base';
Expand Down Expand Up @@ -148,8 +148,9 @@ export class MultiLevelLabel {
pathRect = '';
start = typeof categoryLabel.start === 'string' ? Number(new Date(categoryLabel.start)) : categoryLabel.start;
end = typeof categoryLabel.end === 'string' ? Number(new Date(categoryLabel.end)) : categoryLabel.end;
const labelFontStyle: FontModel = <FontModel>(extend({}, getValue('properties', multiLevel.textStyle), null, true));
argsData = this.triggerMultiLabelRender(
axis, categoryLabel.text, axis.multiLevelLabels[level as number].textStyle,
axis, categoryLabel.text, labelFontStyle,
axis.multiLevelLabels[level as number].alignment, categoryLabel.customAttributes);
if (!argsData.cancel) {
startX = valueToCoefficient(<number>start, axis) * axisRect.width;
Expand Down Expand Up @@ -385,8 +386,9 @@ export class MultiLevelLabel {
startY = valueToCoefficient(<number>(start), axis) * (rect.height);
endY = valueToCoefficient(<number>(end), axis) * (rect.height);
endY = isInversed ? [startY, startY = endY][0] : endY;
const labelFontStyle: FontModel = <FontModel>(extend({}, getValue('properties', multiLevel.textStyle), null, true));
argsData = this.triggerMultiLabelRender(
axis, categoryLabel.text, multiLevel.textStyle, multiLevel.alignment, categoryLabel.customAttributes);
axis, categoryLabel.text, labelFontStyle, multiLevel.alignment, categoryLabel.customAttributes);
if (!argsData.cancel) {
const maximumWidth: number = ((categoryLabel.maximumTextWidth === null ?
(this.yAxisMultiLabelHeight[level as number] / 2) : categoryLabel.maximumTextWidth / 2));
Expand Down
2 changes: 1 addition & 1 deletion controls/data/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.1.41 (2025-01-21)
## 28.2.3 (2025-01-29)

### DataManager

Expand Down
2 changes: 1 addition & 1 deletion controls/diagrams/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.1.41 (2025-01-21)
## 28.2.3 (2025-01-29)

### Diagram

Expand Down
50 changes: 50 additions & 0 deletions controls/documenteditor/spec/implementation/editor_4.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,3 +903,53 @@ describe('Select and delete multiple paragraph', () => {
expect(((editor.documentHelper.pages[0].bodyWidgets[0].childWidgets[0] as ParagraphWidget).childWidgets[0] as LineWidget).children[3] instanceof BookmarkElementBox).toBe(true);
});
});

describe('Insert text after and before the block content control', () => {
let editor: DocumentEditor;
beforeAll((): void => {
let ele: HTMLElement = createElement('div', { id: 'container' });
document.body.appendChild(ele);
editor = new DocumentEditor({ enableEditor: true, isReadOnly: false });
DocumentEditor.Inject(Editor, Selection, EditorHistory); editor.enableEditorHistory = true;
(editor.documentHelper as any).containerCanvasIn = TestHelper.containerCanvas;
(editor.documentHelper as any).selectionCanvasIn = TestHelper.selectionCanvas;
(editor.documentHelper.render as any).pageCanvasIn = TestHelper.pageCanvas;
(editor.documentHelper.render as any).selectionCanvasIn = TestHelper.pageSelectionCanvas;
editor.appendTo('#container');
});
afterAll((done): void => {
editor.destroy();
document.body.removeChild(document.getElementById('container'));
editor = undefined;
setTimeout(function () {
document.body.innerHTML = '';
done();
}, 1000);
});
it('Insert text before the block content control', () => {
console.log('Insert text before the block content control');
editor.editor.insertText('Text before the content control1');
editor.editor.onEnter();
editor.editor.insertText('Text before the content control2');
editor.selectionModule.selectAll();
editor.editor.insertContentControl('RichText');
editor.selectionModule.select('0;0;0', '0;0;0');
editor.editor.insertText('Syncfusion');
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(3);
editor.editorHistoryModule.undo();
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(2);
editor.editorHistoryModule.redo();
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(3);
editor.editorHistoryModule.undo();
});
it('Insert text after the block content control', () => {
console.log('Insert text after the block content control');
editor.selectionModule.select('0;1;33', '0;1;33');
editor.editor.insertText('Syncfusion');
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(3);
editor.editorHistoryModule.undo();
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(2);
editor.editorHistoryModule.redo();
expect(editor.documentHelper.pages[0].bodyWidgets[0].childWidgets.length).toBe(3);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export class HistoryInfo extends BaseHistoryInfo {
const action: Action = this.action;
let operations: Operation[] = [];
switch (action) {
case 'Insert':
for (let i: number = 0; i < this.modifiedActions.length; i++) {
const currentHistory: BaseHistoryInfo = this.modifiedActions[parseInt(i.toString(), 10)];
operations.push(currentHistory.getInsertOperation(currentHistory.action));
}
break;
case 'InsertContentControl':
for (let i: number = 0; i < this.modifiedActions.length; i++) {
const currentHistory: BaseHistoryInfo = this.modifiedActions[parseInt(i.toString(), 10)];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3590,6 +3590,27 @@ export class Editor {
if (this.documentHelper.isBookmarkInserted && selection.bookmarks.length > 0) {
this.extendSelectionToBookmarkStart();
}
let initComplexHistory: boolean = false;
if (selection.isEmpty) {
const isAtParagraphStart = selection.start.isAtParagraphStart;
const isAtParagraphEnd = selection.end.isAtParagraphEnd;
if (isAtParagraphStart || isAtParagraphEnd) {
const inlineObj: ElementInfo = selection.start.currentWidget.getInline(selection.start.offset, 0);
const element: ElementBox = inlineObj.element;
if (element && element instanceof ContentControl && element.contentControlWidgetType === 'Block' && element.reference &&
element.paragraph !== element.reference.paragraph) {
this.initComplexHistory('Insert');
initComplexHistory = true;
this.onEnter();
if (isAtParagraphStart) {
const previousParagraph: Widget = element.paragraph.previousWidget;
if (previousParagraph instanceof ParagraphWidget && previousParagraph.isEmpty()) {
selection.moveToPreviousParagraph();
}
}
}
}
}
if (isNullOrUndefined(revisionType) || revisionType === 'Insertion') {
this.initHistory('Insert');
if (!isNullOrUndefined(this.editorHistory) && !isNullOrUndefined(this.editorHistory.currentBaseHistoryInfo)) {
Expand Down Expand Up @@ -3863,6 +3884,9 @@ export class Editor {
if ((isNullOrUndefined(revisionType) || revisionType === 'Insertion') && !this.isFieldOperation) {
this.reLayout(selection);
}
if (initComplexHistory && this.editorHistory) {
this.editorHistory.updateComplexHistory();
}
this.documentHelper.isTextInput = false;
}
this.updateXmlMappedContentControl();
Expand Down Expand Up @@ -11550,10 +11574,8 @@ export class Editor {
private applyCharFormat(paragraph: ParagraphWidget, selection: Selection, start: TextPosition, end: TextPosition, property: string, value: Object, update: boolean): BlockWidget {
let previousSplittedWidget: ParagraphWidget = paragraph.previousSplitWidget as ParagraphWidget;
let isPageBreak: boolean = false;
if (!isNullOrUndefined(previousSplittedWidget) && previousSplittedWidget instanceof ParagraphWidget) {
if (previousSplittedWidget.isEndsWithPageBreak) {
isPageBreak = true;
}
if (!isNullOrUndefined(previousSplittedWidget) && previousSplittedWidget instanceof ParagraphWidget && previousSplittedWidget.isEndsWithPageBreak) {
isPageBreak = true;
}
paragraph = paragraph.combineWidget(this.owner.viewer) as ParagraphWidget;
let startOffset: number = 0;
Expand Down Expand Up @@ -20608,14 +20630,14 @@ export class Editor {
let context = draw.getContext('2d');
context.scale(displayPixelRatio, displayPixelRatio);
context.drawImage(drawImage, 0, 0, width, height);
imageElementBox.imageString = draw.toDataURL('image/png', 1);
if (this.owner.enableCollaborativeEditing) {
this.documentHelper.addBase64StringInCollection(imageElementBox);
imageElementBox.element.src = this.documentHelper.getImageString(imageElementBox);
this.insertPictureInternal(imageElementBox, isUiInteracted, this.isRemoteAction);
this.isImageInsert = false;
this.isRemoteAction = false;
}
this.viewer.documentHelper.images.get(parseInt(imageElementBox.imageString))[1] = draw.toDataURL('image/png', 1);
};
drawImage.src = base64String;
if (this.isRemoteAction) {
Expand Down Expand Up @@ -20900,13 +20922,16 @@ export class Editor {
* @returns {void}
*/
public updateListItemsTillEnd(blockAdv: BlockWidget, updateNextBlockList: boolean): void {
let block: BlockWidget = updateNextBlockList ? this.documentHelper.selection.getNextRenderedBlock(blockAdv) : blockAdv;
while (!isNullOrUndefined(block) && !this.documentHelper.isTextInput) {
//Updates the list value of the rendered paragraph.
this.updateRenderedListItems(block);
block = block.getSplitWidgets().pop().nextRenderedWidget as BlockWidget;
}

let splittedWidget: BlockWidget[] = blockAdv.getSplitWidgets() as BlockWidget[];
let nextBlock: BlockWidget = splittedWidget[splittedWidget.length - 1].nextRenderedWidget as BlockWidget;
if (!isNullOrUndefined(nextBlock)) {
let block: BlockWidget = updateNextBlockList ? this.documentHelper.selection.getNextRenderedBlock(blockAdv) : blockAdv;
while (!isNullOrUndefined(block) && !this.documentHelper.isTextInput) {
//Updates the list value of the rendered paragraph.
this.updateRenderedListItems(block);
block = block.getSplitWidgets().pop().nextRenderedWidget as BlockWidget;
}
}
}
/**
* @param block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ export class TableResizer {
this.owner.editorModule.isSkipOperationsBuild = false;
if (dragValue) {
this.startingPoint.x += HelperMethods.convertPointToPixel(dragValue);
this.resizerPosition = this.getCellReSizerPosition(this.startingPoint);
// this.resizerPosition = this.getCellReSizerPosition(this.startingPoint);
}
}
private getColumnCells(table: TableWidget, columnIndex: number, isLeftSideCollection: boolean): TableCellWidget[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class TextSearch {
&& (inlineElement.textFrame as TextFrame).childWidgets.length > 0) {
this.findInlineText(inlineElement.textFrame, pattern, findOption, isFirstMatch, results, selectionEnd);
}
if (!(inlineElement instanceof TextElementBox)) {
if (!(inlineElement instanceof TextElementBox) && !(inlineElement instanceof ListTextElementBox)) {
previousElementCount += inlineElement.length;
}
if (!isNullOrUndefined(inlineElement) && isNullOrUndefined(inlineElement.nextNode)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3959,16 +3959,17 @@ export class Selection {
* @private
* @returns {boolean}
*/
public isParagraphMarkSelected (): boolean {
let line: LineWidget = this.end.currentWidget;
public isParagraphMarkSelected(): boolean {
let end: TextPosition = this.isForward ? this.end : this.start;
let line: LineWidget = end.currentWidget;
let paraElement: ParagraphWidget;
if(line instanceof LineWidget){
if (line instanceof LineWidget) {
paraElement = line.paragraph;
}
let paraLength: number = this.getParagraphLength(paraElement);
let endIndices: any = this.endOffset.split(';');
let endIndices: any = this.getHierarchicalIndexByPosition(end).split(';');
let endIndex: number = parseInt(endIndices[endIndices.length - 1]);
if(endIndex > paraLength){
if (endIndex > paraLength) {
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2176,6 +2176,7 @@ export class Layout {
&& (element.reference.paragraph.lastChild as LineWidget).children[(element.reference.paragraph.lastChild as LineWidget).children.length - 1] !== element.reference) {
element.contentControlWidgetType = 'Inline';
element.reference.contentControlWidgetType = 'Inline';
element.contentControlProperties.contentControlWidgetType = 'Inline';
let block: BlockWidget = element.paragraph;
if (block === element.reference.paragraph && element.reference.paragraph.contentControlProperties) {
element.reference.paragraph.contentControlProperties = undefined;
Expand Down Expand Up @@ -6415,7 +6416,7 @@ export class Layout {
// Calculates tabwidth based on pageleftmargin and defaulttabwidth property
let defaultTabWidth: number = HelperMethods.convertPointToPixel(this.documentHelper.defaultTabWidth);
if (tabs.length === 0 && (position > 0 && defaultTabWidth > Math.round(position) && isList ||
defaultTabWidth === this.defaultTabWidthPixel && defaultTabWidth > Math.round(position))) {
defaultTabWidth === this.defaultTabWidthPixel && defaultTabWidth > Math.round(position) && position > 0)) {
return defaultTabWidth - position;
} else {
let breaked: boolean = false;
Expand Down Expand Up @@ -6448,6 +6449,9 @@ export class Layout {
}
if (!isCustomTab) {
let diff: number = parseFloat(((position * 100) % (defaultTabWidth * 100) / 100).toFixed(2));
if (diff < 0 && isList) {
diff += defaultTabWidth;
}
let cnt: number = (position - diff) / defaultTabWidth;
fPosition = (cnt + 1) * defaultTabWidth;
}
Expand Down Expand Up @@ -7335,7 +7339,7 @@ export class Layout {
let cellWidget: TableCellWidget = tableRowWidget.childWidgets[i] as TableCellWidget;
if (i === 0 && cellWidget.childWidgets.length > 0 && cellWidget.columnIndex === 0
&& cellWidget.cellFormat.rowSpan === 1 && this.documentHelper.compatibilityMode === 'Word2013'
&& !this.isVerticalMergedCellContinue(tableRowWidget) && this.documentHelper.splittedCellWidgets.length === 0) {
&& this.documentHelper.splittedCellWidgets.length === 0) {
const firstBlock: ParagraphWidget = this.documentHelper.getFirstParagraphInCell(cellWidget as TableCellWidget);
if (!isNullOrUndefined(firstBlock) && firstBlock.paragraphFormat.keepWithNext && !isNullOrUndefined(this.getPreviousBlock(tableRowWidget))) {
return tableRowWidget;
Expand Down
Loading

0 comments on commit d08063b

Please sign in to comment.