devexpress-richedit 24.1.6-build-24232-0102 → 24.2.1-alpha-24260-0102
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/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +860 -788
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/api/loading-panel.js +3 -3
- package/lib/client/bars/rich-edit-ribbon/ribbon-items-data.d.ts +2 -2
- package/lib/client/client-rich-edit.d.ts +1 -0
- package/lib/client/client-rich-edit.js +15 -11
- package/lib/client/commands/open-document-command.d.ts +1 -1
- package/lib/client/dialogs/dialog-base.js +3 -3
- package/lib/client/document-processor/public/processor.js +3 -3
- package/lib/client/formats/docx/export/data.js +5 -5
- package/lib/client/formats/docx/export/exporters/base/sections.js +4 -4
- package/lib/client/formats/docx/export/exporters/base.js +1 -1
- package/lib/client/formats/docx/export/exporters/content-types.js +4 -4
- package/lib/client/formats/docx/export/exporters/relations/relation-collection.js +1 -1
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.d.ts +1 -1
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.js +3 -3
- package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.js +1 -1
- package/lib/client/formats/docx/import/data.js +2 -2
- package/lib/client/formats/docx/import/destination/character-properties/run-properties-base-destination.js +1 -1
- package/lib/client/formats/docx/import/destination/destination.d.ts +2 -2
- package/lib/client/formats/docx/import/destination/destination.js +7 -7
- package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-position-destination.js +9 -9
- package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-relative-size-destination.js +6 -6
- package/lib/client/formats/docx/import/destination/drawing/drawing-destination.js +38 -38
- package/lib/client/formats/docx/import/destination/drawing/non-visual-pucture-properties-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/drawing/shape-properties-destination.js +9 -9
- package/lib/client/formats/docx/import/destination/notes/note-destination.d.ts +1 -1
- package/lib/client/formats/docx/import/destination/notes/note-properties-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/numbering/numberings-destination.js +15 -15
- package/lib/client/formats/docx/import/destination/paragraph/paragraph-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-numbering-reference-destination.js +5 -5
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-base-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-destination.js +7 -7
- package/lib/client/formats/docx/import/destination/relationships/relationships-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/runs/inline-object-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/style/destinations/style-paragraph-properties-destination.js +4 -4
- package/lib/client/formats/docx/import/destination/table/cell/properties/table-cell-properties-destination-core.js +3 -3
- package/lib/client/formats/docx/import/destination/table/cell/table-cell-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/table/row/properties/table-row-properties-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/table/row/table-row-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/table/table/properties/table-cell-margins-destination.d.ts +1 -1
- package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination-core.js +3 -3
- package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-leaf-element-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/table/table/table-destination.js +3 -3
- package/lib/client/formats/docx/import/destination/themes/color/drawing-color-properties-destination-base.js +3 -3
- package/lib/client/formats/docx/import/destination/themes/font/office-theme-font-collection-scheme-destination.js +7 -7
- package/lib/client/formats/docx/import/destination/vml/v-mlshape-destination.js +7 -7
- package/lib/client/formats/docx/import/importers/character-importer.js +6 -6
- package/lib/client/formats/docx/import/importers/comments-importer.js +1 -1
- package/lib/client/formats/docx/import/importers/field-importer.js +2 -2
- package/lib/client/formats/docx/import/importers/table-importer.js +1 -1
- package/lib/client/formats/docx/import/list/open-xml-list-level-override.js +3 -3
- package/lib/client/formats/docx/import/list/open-xml-numbering-list-info.d.ts +1 -1
- package/lib/client/formats/docx/utils/constants.js +6 -6
- package/lib/client/formats/docx/zip/xml-reader.js +10 -10
- package/lib/client/i-rich-constructor-settings.d.ts +3 -1
- package/lib/client/model-api/api-utils/parameter-checker.d.ts +1 -1
- package/lib/client/model-api/fonts/control-font.js +4 -4
- package/lib/client/model-api/images/image-iterator.js +3 -3
- package/lib/client/model-api/interval.js +1 -1
- package/lib/client/public/api/authentication-options.js +3 -3
- package/lib/client/public/api/range-permission-options.js +3 -3
- package/lib/client/public/client-events.d.ts +2 -1
- package/lib/client/public/client-events.js +3 -1
- package/lib/client/public/commands/enum.d.ts +1 -1
- package/lib/client/public/context-menu/menu.js +5 -5
- package/lib/client/public/events.d.ts +6 -0
- package/lib/client/public/events.js +8 -0
- package/lib/client/public/nusa/external-types.d.ts +2 -2
- package/lib/client/public/nusa/settings.js +1 -1
- package/lib/client/public/options.d.ts +2 -0
- package/lib/client/public/ribbon/item-ids.d.ts +1 -1
- package/lib/client/public/ribbon/tab.d.ts +4 -4
- package/lib/client/public/ribbon/tab.js +2 -2
- package/lib/client/public/rich-edit.js +1 -1
- package/lib/client/ribbon/i-toolbar-item-options.d.ts +1 -1
- package/lib/client/ribbon/ribbon.d.ts +3 -3
- package/lib/client/ribbon/ribbon.js +1 -1
- package/lib/client/ribbon/toolbar-items/toolbar-interactive-item.d.ts +2 -2
- package/lib/client/settings.js +4 -0
- package/lib/client/utils/devextreme/devextreme-types.d.ts +17 -17
- package/lib/client/utils/devextreme/dxt-utils.d.ts +1 -1
- package/lib/common/auto-correct/auto-correct-providers.js +1 -1
- package/lib/common/bars/base.js +1 -1
- package/lib/common/canvas/canvas-manager.js +3 -3
- package/lib/common/canvas/canvas-scroll-manager.js +2 -2
- package/lib/common/canvas/listeners/anchor-listener.js +3 -3
- package/lib/common/canvas/listeners/resize-box-listener.js +5 -5
- package/lib/common/canvas/renderes/canvas-listener/canvas-listener.js +1 -1
- package/lib/common/canvas/renderes/change-active-sub-document/renderer.js +10 -10
- package/lib/common/canvas/renderes/common/document-renderer.d.ts +1 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +1 -1
- package/lib/common/canvas/renderes/view-manager.js +3 -3
- package/lib/common/client-side-events.d.ts +1 -0
- package/lib/common/client-side-events.js +3 -0
- package/lib/common/commands/command-base.js +10 -10
- package/lib/common/commands/command-states.js +3 -3
- package/lib/common/commands/dialogs/dialog-spell-checker-command.js +3 -3
- package/lib/common/commands/document/print-document-on-client-command.js +4 -4
- package/lib/common/commands/fields/open-hyperlink-command.js +6 -2
- package/lib/common/commands/ruler/toggle-show-horizontal-ruler-command.js +3 -1
- package/lib/common/commands/text/change-text-case-commands.d.ts +1 -1
- package/lib/common/event-manager.js +4 -4
- package/lib/common/formats/html/export/html-document-exporter.js +1 -1
- package/lib/common/formats/html/export/html-export.js +4 -4
- package/lib/common/formats/html/import/html-importer.d.ts +1 -1
- package/lib/common/formats/html/import/html-importer.js +12 -12
- package/lib/common/formats/html/import/html-model-inserter.js +4 -4
- package/lib/common/formats/html/import/importers/base.js +1 -1
- package/lib/common/formats/html/import/utils/character-properties-utils.js +4 -4
- package/lib/common/formats/i-document-importer.d.ts +2 -2
- package/lib/common/formats/pdf/exporter.js +3 -3
- package/lib/common/formats/pdf/interfaces.d.ts +2 -2
- package/lib/common/formats/rtf/export/exporter.js +1 -1
- package/lib/common/formats/rtf/export/exporters/rtf-anchored-picture-run-exporter.js +5 -5
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +1 -1
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +2 -2
- package/lib/common/formats/rtf/export/rtf-builder.d.ts +2 -2
- package/lib/common/formats/rtf/import/destination/base/destination.d.ts +4 -4
- package/lib/common/formats/rtf/import/destination/base/destination.js +1 -1
- package/lib/common/formats/rtf/import/destination/base/skip-destination.js +3 -3
- package/lib/common/formats/rtf/import/destination/base/string-property-base-destination.js +2 -2
- package/lib/common/formats/rtf/import/destination/base/string-property-destination.js +2 -2
- package/lib/common/formats/rtf/import/destination/base/unicode-destination.js +2 -2
- package/lib/common/formats/rtf/import/destination/fields/field-sub-destination.js +1 -1
- package/lib/common/formats/rtf/import/destination/fields/table-content-field-destination.js +1 -1
- package/lib/common/formats/rtf/import/destination/font-table-destination.js +3 -3
- package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-paragraph-numbering.js +1 -1
- package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-section-numbering-level.js +1 -1
- package/lib/common/formats/rtf/import/destination/picture/picture-destination.js +4 -4
- package/lib/common/formats/rtf/import/destination/shape/shape-properties-destination-base.js +2 -2
- package/lib/common/formats/rtf/import/destination/shape/shape-property-destination.js +2 -2
- package/lib/common/formats/rtf/import/destination/shape/shape-property-hsv-value-destination.js +2 -2
- package/lib/common/formats/rtf/import/destination/styles/character-style-destination.js +5 -5
- package/lib/common/formats/rtf/import/destination/styles/style-sheet-destination.js +3 -3
- package/lib/common/formats/rtf/import/destination/styles/table-style-destination.js +7 -7
- package/lib/common/formats/rtf/import/destination/sub-document/destination-sub-document.js +2 -2
- package/lib/common/formats/rtf/import/destination/sub-document/section-header-footer-destination-base.js +1 -1
- package/lib/common/formats/rtf/import/importers/character-importer.js +1 -1
- package/lib/common/formats/rtf/import/importers/field-importer.js +2 -2
- package/lib/common/formats/rtf/import/importers/paragraph-importer.js +4 -4
- package/lib/common/formats/rtf/import/importers/range-permission-importer.js +1 -1
- package/lib/common/formats/rtf/import/importers/section-importer.js +4 -4
- package/lib/common/formats/rtf/import/importers/styles/paragraph-style-importer.js +4 -4
- package/lib/common/formats/rtf/import/model/numbering-lists/rtf-old-list-level-info.js +10 -10
- package/lib/common/formats/rtf/import/rtf-import-data.js +13 -13
- package/lib/common/formats/txt/txt-exporter.js +1 -1
- package/lib/common/global-event-dispatcher.d.ts +1 -1
- package/lib/common/interfaces/i-control-owner.d.ts +1 -0
- package/lib/common/layout/main-structures/layout-boxes/layout-anchored-object-box.d.ts +1 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-dash-box.js +1 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-line-break-box.js +4 -4
- package/lib/common/layout/main-structures/layout-boxes/layout-numbering-list-box.js +10 -10
- package/lib/common/layout/main-structures/layout-boxes/layout-page-break-box.js +4 -4
- package/lib/common/layout/main-structures/layout-row.js +1 -1
- package/lib/common/layout/table/table-cell-iterator.js +6 -6
- package/lib/common/layout-engine/hit-test-manager/hit-test-result.d.ts +1 -1
- package/lib/common/layout-engine/selection/selection-formatter.js +1 -1
- package/lib/common/layout-formatter/box/generator/box-infos-generator.js +3 -3
- package/lib/common/layout-formatter/changes/changes/layout-change-base.js +12 -12
- package/lib/common/layout-formatter/invalidator/layout-invalidator.js +3 -3
- package/lib/common/layout-formatter/managers/formatter-manager.d.ts +1 -1
- package/lib/common/layout-formatter/managers/formatter-manager.js +2 -2
- package/lib/common/layout-formatter/row/result.js +3 -3
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +2 -2
- package/lib/common/layout-formatter/row/size-engine/row-height-calculator.js +3 -3
- package/lib/common/layout-formatter/row/tab-info.js +8 -8
- package/lib/common/layout-formatter/table/borders/border-helper.d.ts +1 -1
- package/lib/common/layout-formatter/table/borders/border-helper.js +5 -5
- package/lib/common/layout-formatter/table/formatter.js +12 -12
- package/lib/common/layout-formatter/table/grid-engine/calculators/column-interval.js +3 -3
- package/lib/common/layout-formatter/table/grid-engine/calculators/grid-calculator.js +3 -3
- package/lib/common/layout-formatter/table/grid-engine/calculators/table-properties-cache.js +7 -7
- package/lib/common/layout-formatter/table/info/cell-info.js +8 -8
- package/lib/common/layout-formatter/table/info/row-info.js +1 -1
- package/lib/common/layout-formatter/table/info/table-info.js +17 -17
- package/lib/common/model/bookmarks.js +7 -7
- package/lib/common/model/borders/border-base.js +3 -3
- package/lib/common/model/caches/hash-based-cache.d.ts +1 -1
- package/lib/common/model/caches/hash-based-cache.js +2 -2
- package/lib/common/model/caches/images.js +11 -11
- package/lib/common/model/changes/change.d.ts +1 -1
- package/lib/common/model/changes/sub-document/list/paragraph-numbering-list-changed.js +1 -1
- package/lib/common/model/changes/sub-document/table/cell-property-changed.js +1 -1
- package/lib/common/model/changes/sub-document/table/property-changed.js +1 -1
- package/lib/common/model/changes/sub-document/table/row-property-changed.js +1 -1
- package/lib/common/model/character/character-property-descriptor.d.ts +1 -1
- package/lib/common/model/color/color-model-info.js +6 -6
- package/lib/common/model/creator/font-corrector.js +5 -5
- package/lib/common/model/document-model.js +10 -10
- package/lib/common/model/fields/field-request-manager.d.ts +1 -1
- package/lib/common/model/fields/field-request-manager.js +2 -2
- package/lib/common/model/fields/parsers/field-code-parser.d.ts +2 -2
- package/lib/common/model/fields/tree-creator.js +1 -1
- package/lib/common/model/floating-objects/sizes.js +2 -2
- package/lib/common/model/fonts/control-font.js +9 -9
- package/lib/common/model/fonts/loader.js +1 -1
- package/lib/common/model/footnotes/footnote.d.ts +1 -1
- package/lib/common/model/history/base/history-item.js +6 -6
- package/lib/common/model/history/base/interval-based-history-item.js +2 -2
- package/lib/common/model/history/base/position-based-history-item.js +2 -2
- package/lib/common/model/history/items/insert-text-history-item.js +3 -3
- package/lib/common/model/history/selection/scroll-history-item.js +3 -3
- package/lib/common/model/history/selection/selection-history-item.js +3 -3
- package/lib/common/model/json/importers/sub-document/run-importers.d.ts +2 -2
- package/lib/common/model/manipulators/base-manipulator.js +2 -2
- package/lib/common/model/manipulators/document/sub-document-inserter.js +6 -6
- package/lib/common/model/manipulators/model-manipulator.js +1 -1
- package/lib/common/model/manipulators/picture-manipulator/insert-picture-manipulator-params.js +1 -1
- package/lib/common/model/manipulators/picture-manipulator/loader/image-loading-options.d.ts +1 -1
- package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.d.ts +1 -1
- package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.js +1 -1
- package/lib/common/model/manipulators/range/create-range-copy-operation.js +3 -3
- package/lib/common/model/manipulators/tables/insert-table-cell-operation.js +1 -1
- package/lib/common/model/manipulators/tables/insert-table-row-operation.js +1 -1
- package/lib/common/model/manipulators/tables/merge-table-cells-operation.js +1 -1
- package/lib/common/model/manipulators/tables/table-normalizator.d.ts +2 -2
- package/lib/common/model/options/fields.d.ts +2 -0
- package/lib/common/model/options/fields.js +7 -3
- package/lib/common/model/options/pdf.d.ts +2 -2
- package/lib/common/model/options/rich-options.js +3 -3
- package/lib/common/model/paragraph/paragraph-property-descriptors.d.ts +1 -1
- package/lib/common/model/paragraph/paragraph.js +1 -1
- package/lib/common/model/position/linked-interval.js +4 -4
- package/lib/common/model/range-permissions.js +3 -3
- package/lib/common/model/runs/anchored-picture-run.js +4 -4
- package/lib/common/model/runs/inline-picture-run.d.ts +1 -1
- package/lib/common/model/runs/inline-picture-run.js +1 -1
- package/lib/common/model/runs/run-base.js +4 -4
- package/lib/common/model/section/section-property-descriptor.d.ts +1 -1
- package/lib/common/model/shadings/shading-info.js +3 -3
- package/lib/common/model/styles-manager.d.ts +1 -1
- package/lib/common/model/tables/main-structures/table-row.js +1 -1
- package/lib/common/mouse-handler/base/manipulator-handler-state-base.js +2 -2
- package/lib/common/mouse-handler/mouse-handler/mouse-handler-drag-column-or-row-state.d.ts +1 -1
- package/lib/common/rich-edit-core.js +11 -11
- package/lib/common/rich-utils/debug/runtime-template-model-creator.js +6 -6
- package/lib/common/scroll/model-states.d.ts +1 -1
- package/lib/common/scroll/model-states.js +4 -4
- package/lib/common/selection/input-position.js +17 -6
- package/lib/common/selection/selected-cells-engine.js +12 -12
- package/lib/common/selection/selection-intervals-info.js +7 -7
- package/lib/common/selection/selection-state.js +5 -5
- package/lib/common/selection/selection.js +13 -13
- package/lib/common/ui/quick-search-panel.js +1 -1
- package/lib/common/ui/ruler/controls/base.js +1 -1
- package/lib/common/ui/ruler/controls/column.js +1 -1
- package/lib/common/ui/ruler/controls/divisions.js +1 -1
- package/lib/common/ui/ruler/controls/indent/first-line.js +5 -5
- package/lib/common/ui/ruler/controls/indent/left.js +2 -2
- package/lib/common/ui/ruler/controls/indent/right.js +5 -5
- package/lib/common/ui/ruler/controls/margin/left.js +3 -3
- package/lib/common/ui/ruler/controls/owner.js +1 -1
- package/lib/common/ui/ruler/controls/ruler.js +4 -4
- package/lib/common/ui/ruler/controls/tab/tab-type.js +2 -2
- package/lib/common/ui/ruler/manager.js +18 -18
- package/lib/common/ui/ruler/model-data.js +4 -4
- package/lib/common/ui/ruler/ruler.js +2 -2
- package/lib/common/utils/utils.d.ts +7 -0
- package/lib/common/utils/utils.js +26 -0
- package/lib/common/view-settings/views-settings.js +6 -6
- package/package.json +3 -3
@@ -95,6 +95,12 @@ export class Options {
|
|
95
95
|
}
|
96
96
|
}
|
97
97
|
export class Creator {
|
98
|
+
get documentModel() { ListUtils.addListOnTail(this.idMap.createdVariables, this.str); return this.idMap.createdVariables.join("\r\n"); }
|
99
|
+
get tables() { return this.subDocument.tables; }
|
100
|
+
get table() { return this.tables[this.tblIndex]; }
|
101
|
+
static create(model, layout = null, options = new Options()) {
|
102
|
+
return new Creator(model, layout, options).documentModel;
|
103
|
+
}
|
98
104
|
constructor(model, layout = null, options = new Options()) {
|
99
105
|
this.layout = layout;
|
100
106
|
this.subDocument = model.mainSubDocument;
|
@@ -131,12 +137,6 @@ export class Creator {
|
|
131
137
|
this.fillPage(p);
|
132
138
|
this.str.push(`], model).getLayout();`);
|
133
139
|
}
|
134
|
-
get documentModel() { ListUtils.addListOnTail(this.idMap.createdVariables, this.str); return this.idMap.createdVariables.join("\r\n"); }
|
135
|
-
get tables() { return this.subDocument.tables; }
|
136
|
-
get table() { return this.tables[this.tblIndex]; }
|
137
|
-
static create(model, layout = null, options = new Options()) {
|
138
|
-
return new Creator(model, layout, options).documentModel;
|
139
|
-
}
|
140
140
|
static getSubDocumentVariableName(sd) {
|
141
141
|
if (sd.isMain())
|
142
142
|
return "subDocument";
|
@@ -4,7 +4,7 @@ import { ScrollTopInfo } from '../canvas/canvas-manager';
|
|
4
4
|
import { CanvasSizeInfo } from '../canvas/canvas-size-info';
|
5
5
|
import { Selection } from '../selection/selection';
|
6
6
|
import { ICanvasState } from './canvas-states';
|
7
|
-
export
|
7
|
+
export type GetVertivalOffset = (sizes: CanvasSizeInfo) => number;
|
8
8
|
export declare enum RelativePosition {
|
9
9
|
Top = 0,
|
10
10
|
Bottom = 1,
|
@@ -21,15 +21,15 @@ export class ScrollState {
|
|
21
21
|
get nothing() { return new ModelStateEmpty(); }
|
22
22
|
}
|
23
23
|
export class ModelStateByModelPosition {
|
24
|
+
get subDocument() {
|
25
|
+
var _a;
|
26
|
+
return this._subDocument = (_a = this._subDocument) === null || _a === void 0 ? void 0 : _a.getActualSubDocument();
|
27
|
+
}
|
24
28
|
constructor(subDocument, endOfLine, pageIndex) {
|
25
29
|
this._subDocument = subDocument;
|
26
30
|
this.endOfLine = endOfLine;
|
27
31
|
this.pageIndex = pageIndex;
|
28
32
|
}
|
29
|
-
get subDocument() {
|
30
|
-
var _a;
|
31
|
-
return this._subDocument = (_a = this._subDocument) === null || _a === void 0 ? void 0 : _a.getActualSubDocument();
|
32
|
-
}
|
33
33
|
getModelPosition() {
|
34
34
|
return this.modelPosition;
|
35
35
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Section } from '../model/section/section';
|
1
2
|
import { SectionPropertyDescriptor } from '../model/section/section-property-descriptor';
|
2
3
|
import { InputPositionBase } from './input-position-base';
|
3
4
|
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
@@ -18,13 +19,23 @@ export class InputPosition extends InputPositionBase {
|
|
18
19
|
}
|
19
20
|
getMergedSectionPropertiesRaw() {
|
20
21
|
if (!this.mergedSectionPropertiesRaw) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
let sectionIndex;
|
23
|
+
let intervalEndPosition;
|
24
|
+
const sections = this.model.sections;
|
25
|
+
const pageIndex = this.selection.pageIndex;
|
26
|
+
if (pageIndex < 0) {
|
27
|
+
const interval = this.intervalsInfo.interval;
|
28
|
+
const intervalStartPosition = interval.start;
|
29
|
+
intervalEndPosition = interval.end;
|
30
|
+
sectionIndex = SearchUtils.normedInterpolationIndexOf(sections, (s) => s.startLogPosition.value, intervalStartPosition);
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
const layoutPage = this.selection.layout.pages[pageIndex];
|
34
|
+
sectionIndex = Section.getPageSectionIndex(layoutPage, sections);
|
35
|
+
intervalEndPosition = layoutPage.getEndPosition();
|
36
|
+
}
|
26
37
|
this.mergedSectionPropertiesRaw = sections[sectionIndex++].sectionProperties.clone();
|
27
|
-
for (
|
38
|
+
for (let section; (section = sections[sectionIndex]) && (section.startLogPosition.value < intervalEndPosition); sectionIndex++)
|
28
39
|
InputPositionBase.mergePropertiesRaw(this.mergedSectionPropertiesRaw, section.sectionProperties, SectionPropertyDescriptor.ALL_FIELDS);
|
29
40
|
}
|
30
41
|
return this.mergedSectionPropertiesRaw;
|
@@ -8,11 +8,11 @@ import { CellGridInfoManager } from '../layout-formatter/table/grid-engine/cell-
|
|
8
8
|
import { Table, TablePosition } from '../model/tables/main-structures/table';
|
9
9
|
import { TableCellMergingState } from '../model/tables/secondary-structures/table-base-structures';
|
10
10
|
export class SelectedTableRowInfo {
|
11
|
+
get row() { return this.cells[0].cell.parentRow; }
|
11
12
|
constructor(rowIndex, cells) {
|
12
13
|
this.rowIndex = rowIndex;
|
13
14
|
this.cells = cells;
|
14
15
|
}
|
15
|
-
get row() { return this.cells[0].cell.parentRow; }
|
16
16
|
get isSeries() {
|
17
17
|
return ListUtils.allOf(this.cells, (cellInfo, cellInd) => cellInfo.cellIndex == this.cells[cellInd - 1].cellIndex + 1, 1);
|
18
18
|
}
|
@@ -27,16 +27,6 @@ export class SelectedTableCellInfo {
|
|
27
27
|
}
|
28
28
|
}
|
29
29
|
export class TableSelectionData {
|
30
|
-
constructor(info, rows) {
|
31
|
-
this.info = info;
|
32
|
-
this.rows = rows;
|
33
|
-
if (!rows[0]) {
|
34
|
-
this._isSquare = false;
|
35
|
-
this._isSelectedEntireTable = false;
|
36
|
-
this._withoutGapByRows = false;
|
37
|
-
this._areCellsSelectedInSeries = false;
|
38
|
-
}
|
39
|
-
}
|
40
30
|
get numRows() { return this.rows.length; }
|
41
31
|
get startRowIndex() { return this.rows[0].rowIndex; }
|
42
32
|
get isSquare() { return this._isSquare === undefined ? (this._isSquare = this.calculateIsSquare()) : this._isSquare; }
|
@@ -62,6 +52,16 @@ export class TableSelectionData {
|
|
62
52
|
(this._areCellsSelectedInSeries = ListUtils.allOf(this.rows, (rowInfo, rowInd) => (rowInd == 0 || (rowInfo.rowIndex == this.rows[rowInd - 1].rowIndex + 1)) && rowInfo.isSeries)) :
|
63
53
|
this._areCellsSelectedInSeries;
|
64
54
|
}
|
55
|
+
constructor(info, rows) {
|
56
|
+
this.info = info;
|
57
|
+
this.rows = rows;
|
58
|
+
if (!rows[0]) {
|
59
|
+
this._isSquare = false;
|
60
|
+
this._isSelectedEntireTable = false;
|
61
|
+
this._withoutGapByRows = false;
|
62
|
+
this._areCellsSelectedInSeries = false;
|
63
|
+
}
|
64
|
+
}
|
65
65
|
foreach(onEachRowCallback, onEachCellCallback) {
|
66
66
|
for (let rowOffset = 0, rowInfo; rowInfo = this.rows[rowOffset]; rowOffset++) {
|
67
67
|
onEachRowCallback(rowInfo);
|
@@ -99,13 +99,13 @@ export class TableSelectionData {
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
export class SelectedTableInfo {
|
102
|
+
get isSelected() { return !!this.rawData.rows.length; }
|
102
103
|
constructor(table, gridInfoManager, rawRowsData, extendedRowsData) {
|
103
104
|
this.table = table;
|
104
105
|
this.gridInfoManager = gridInfoManager;
|
105
106
|
this.rawData = new TableSelectionData(this, rawRowsData);
|
106
107
|
this.extendedData = new TableSelectionData(this, extendedRowsData);
|
107
108
|
}
|
108
|
-
get isSelected() { return !!this.rawData.rows.length; }
|
109
109
|
}
|
110
110
|
export class SelectedCellsCalculator {
|
111
111
|
constructor() {
|
@@ -4,13 +4,6 @@ import { SubDocumentInterval, SubDocumentIntervals, SubDocumentPosition } from '
|
|
4
4
|
import { SelectedCellsCalculator } from './selected-cells-engine';
|
5
5
|
import { SelectedSpecialRunInfo } from './selected-special-run-info';
|
6
6
|
export class SelectionIntervalsInfo {
|
7
|
-
constructor(subDocument, intervals, lastIntervalIndex = intervals.length - 1) {
|
8
|
-
this.specialRunInfo = new SelectedSpecialRunInfo();
|
9
|
-
this.subDocument = subDocument;
|
10
|
-
this._intervals = intervals;
|
11
|
-
this.lastIntervalIndex = lastIntervalIndex;
|
12
|
-
this._tableInfo = null;
|
13
|
-
}
|
14
7
|
resetTableInfo() {
|
15
8
|
this._tableInfo = null;
|
16
9
|
}
|
@@ -37,6 +30,13 @@ export class SelectionIntervalsInfo {
|
|
37
30
|
get subDocPosition() { return new SubDocumentPosition(this.subDocument, this.position); }
|
38
31
|
get multiselection() { return this.intervals.length > 1; }
|
39
32
|
get isCollapsed() { return !this._intervals[1] && this._intervals[0].isCollapsed(); }
|
33
|
+
constructor(subDocument, intervals, lastIntervalIndex = intervals.length - 1) {
|
34
|
+
this.specialRunInfo = new SelectedSpecialRunInfo();
|
35
|
+
this.subDocument = subDocument;
|
36
|
+
this._intervals = intervals;
|
37
|
+
this.lastIntervalIndex = lastIntervalIndex;
|
38
|
+
this._tableInfo = null;
|
39
|
+
}
|
40
40
|
static fromPosition(subDocument, position) {
|
41
41
|
return new SelectionIntervalsInfo(subDocument, [new FixedInterval(position, 0)], 0);
|
42
42
|
}
|
@@ -3,6 +3,11 @@ import { SelectionIntervalsInfo } from './selection-intervals-info';
|
|
3
3
|
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
4
4
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
5
5
|
export class SelectionState {
|
6
|
+
get interval() { return this.intervalsInfo.interval; }
|
7
|
+
;
|
8
|
+
get anchorPostion() { return this.forwardDirection ? this.interval.start : this.interval.end; }
|
9
|
+
get activePostion() { return this.forwardDirection ? this.interval.end : this.interval.start; }
|
10
|
+
get reversedAnchorPostion() { return this.forwardDirection ? this.interval.end : this.interval.start; }
|
6
11
|
constructor(intervalsInfo, forwardDirection, endOfLine, pageIndex) {
|
7
12
|
this.forwardDirection = true;
|
8
13
|
this.endOfLine = false;
|
@@ -13,11 +18,6 @@ export class SelectionState {
|
|
13
18
|
this.endOfLine = endOfLine;
|
14
19
|
this.pageIndex = pageIndex;
|
15
20
|
}
|
16
|
-
get interval() { return this.intervalsInfo.interval; }
|
17
|
-
;
|
18
|
-
get anchorPostion() { return this.forwardDirection ? this.interval.start : this.interval.end; }
|
19
|
-
get activePostion() { return this.forwardDirection ? this.interval.end : this.interval.start; }
|
20
|
-
get reversedAnchorPostion() { return this.forwardDirection ? this.interval.end : this.interval.start; }
|
21
21
|
setEndOfLine(endOfLine) {
|
22
22
|
this.endOfLine = endOfLine;
|
23
23
|
return this;
|
@@ -35,19 +35,6 @@ export class SetSelectionStateOptions {
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
export class Selection extends BatchUpdatableObject {
|
38
|
-
constructor(model, layout, activeSubDocument) {
|
39
|
-
super();
|
40
|
-
this.searchIntervals = [];
|
41
|
-
this.misspelledIntervals = [];
|
42
|
-
this.onChanged = new EventDispatcher();
|
43
|
-
this.onSearchChanged = new EventDispatcher();
|
44
|
-
this.onMisspelledSelectionChanged = new EventDispatcher();
|
45
|
-
this.model = model;
|
46
|
-
this.layout = layout;
|
47
|
-
this.scrollManager = new ModelScrollManager();
|
48
|
-
this._prevState = SelectionState.getDefault(activeSubDocument);
|
49
|
-
this._state = SelectionState.getDefault(activeSubDocument);
|
50
|
-
}
|
51
38
|
get currState() { return this._state; }
|
52
39
|
get keepX() { return this._state.keepX; }
|
53
40
|
set keepX(val) { this._state.keepX = val; }
|
@@ -73,6 +60,19 @@ export class Selection extends BatchUpdatableObject {
|
|
73
60
|
get specialRunInfo() { return this._state.intervalsInfo.specialRunInfo; }
|
74
61
|
;
|
75
62
|
get tableInfo() { return this._state.intervalsInfo.tableInfo; }
|
63
|
+
constructor(model, layout, activeSubDocument) {
|
64
|
+
super();
|
65
|
+
this.searchIntervals = [];
|
66
|
+
this.misspelledIntervals = [];
|
67
|
+
this.onChanged = new EventDispatcher();
|
68
|
+
this.onSearchChanged = new EventDispatcher();
|
69
|
+
this.onMisspelledSelectionChanged = new EventDispatcher();
|
70
|
+
this.model = model;
|
71
|
+
this.layout = layout;
|
72
|
+
this.scrollManager = new ModelScrollManager();
|
73
|
+
this._prevState = SelectionState.getDefault(activeSubDocument);
|
74
|
+
this._state = SelectionState.getDefault(activeSubDocument);
|
75
|
+
}
|
76
76
|
dispose() {
|
77
77
|
this.onChanged.dispose();
|
78
78
|
}
|
@@ -4,12 +4,12 @@ import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
|
4
4
|
import { KeyCode, KeyUtils } from '@devexpress/utils/lib/utils/key';
|
5
5
|
import { RichEditClientCommand } from '../commands/client-command';
|
6
6
|
export class QuickSearchPanel {
|
7
|
+
get core() { return this.owner.core; }
|
7
8
|
constructor(owner, searchManager) {
|
8
9
|
this.owner = owner;
|
9
10
|
this.searchManager = searchManager;
|
10
11
|
this.initialize();
|
11
12
|
}
|
12
|
-
get core() { return this.owner.core; }
|
13
13
|
dispose() {
|
14
14
|
if (this.isVisible())
|
15
15
|
this.onClose(true);
|
@@ -10,13 +10,13 @@ export class RulerModelState {
|
|
10
10
|
}
|
11
11
|
}
|
12
12
|
export class RulerBase {
|
13
|
+
get visible() { return this._visible; }
|
13
14
|
constructor(modelData, controls) {
|
14
15
|
this._visible = true;
|
15
16
|
this.modelData = modelData;
|
16
17
|
this.controls = controls;
|
17
18
|
this.rootElement = DocumentRenderer.renderContainer(this.getRootClassName());
|
18
19
|
}
|
19
|
-
get visible() { return this._visible; }
|
20
20
|
dispose() {
|
21
21
|
DomUtils.hideNode(this.rootElement);
|
22
22
|
this.rootElement = null;
|
@@ -33,12 +33,12 @@ export var ColumnAction;
|
|
33
33
|
ColumnAction[ColumnAction["ColumnWidth"] = 3] = "ColumnWidth";
|
34
34
|
})(ColumnAction || (ColumnAction = {}));
|
35
35
|
export class RulerColumnModelState {
|
36
|
+
get rightPos() { return this.leftPos + this.width; }
|
36
37
|
constructor(leftPos, width, space) {
|
37
38
|
this.leftPos = leftPos;
|
38
39
|
this.width = width;
|
39
40
|
this.space = space;
|
40
41
|
}
|
41
|
-
get rightPos() { return this.leftPos + this.width; }
|
42
42
|
clone() {
|
43
43
|
return new RulerColumnModelState(this.leftPos, this.width, this.space);
|
44
44
|
}
|
@@ -13,6 +13,7 @@ export const DIVISION_MINOR_CLASS_NAME = RULER_CLASS_NAME + "Minor" + DIVISION_C
|
|
13
13
|
export const DIVISION_MAJOR_CLASS_NAME = RULER_CLASS_NAME + "Major" + DIVISION_CLASS_NAME;
|
14
14
|
export const DIVISION_NUMBER_CLASS_NAME = RULER_CLASS_NAME + "Number" + DIVISION_CLASS_NAME;
|
15
15
|
export class RulerDivisionsControl extends RulerBase {
|
16
|
+
getRootClassName() { return DIVISION_CONTAINER_CLASS_NAME; }
|
16
17
|
constructor(modelData, controls, divisionInfo, maxPageWidth) {
|
17
18
|
super(modelData, controls);
|
18
19
|
this.height = 0;
|
@@ -25,7 +26,6 @@ export class RulerDivisionsControl extends RulerBase {
|
|
25
26
|
createDivisionElements(this.rootElement, unitCount, divisionInfo, this.height);
|
26
27
|
this.initialLeft = -(unitCount * divisionInfo.unitSize - RULLER_NUMBER_CORRECTION);
|
27
28
|
}
|
28
|
-
getRootClassName() { return DIVISION_CONTAINER_CLASS_NAME; }
|
29
29
|
update() {
|
30
30
|
this.updateModelState();
|
31
31
|
this.updateView();
|
@@ -7,6 +7,11 @@ import { RulerTemplateManager } from '../template-manager';
|
|
7
7
|
import { RulerBaseIndentControl, RulerMinDistanceBetweenIndents } from './base';
|
8
8
|
import { SizeUtils } from '../../../../../common/utils/size-utils';
|
9
9
|
export class RulerFirstLineIndentDragHandle extends RulerBaseIndentControl {
|
10
|
+
get heightOfProtrudingPart() { return this.modelData.settings.showLeftIndent ? this._heightOfProtrudingPart : 0; }
|
11
|
+
getRootClassName() {
|
12
|
+
return this.modelData.settings.styles.firstLineIndentImage.spriteCssClass + " " +
|
13
|
+
this.modelData.settings.styles.firstLineIndent.className;
|
14
|
+
}
|
10
15
|
constructor(modelData, controls) {
|
11
16
|
super(modelData, controls);
|
12
17
|
const template = RulerTemplateManager.getFirstLineIndentElementTemplate();
|
@@ -18,11 +23,6 @@ export class RulerFirstLineIndentDragHandle extends RulerBaseIndentControl {
|
|
18
23
|
this.leftCorrection = Math.round(SizeUtils.getOffsetWidth(this.rootElement) / 2);
|
19
24
|
this._heightOfProtrudingPart = SizeUtils.getOffsetHeight(this.rootElement) - this.controls.divisions.height / 2;
|
20
25
|
}
|
21
|
-
get heightOfProtrudingPart() { return this.modelData.settings.showLeftIndent ? this._heightOfProtrudingPart : 0; }
|
22
|
-
getRootClassName() {
|
23
|
-
return this.modelData.settings.styles.firstLineIndentImage.spriteCssClass + " " +
|
24
|
-
this.modelData.settings.styles.firstLineIndent.className;
|
25
|
-
}
|
26
26
|
adjustByTop() {
|
27
27
|
const mainElementHeight = SizeUtils.getOffsetHeight(this.rootElement);
|
28
28
|
const divisionsControlHeight = this.controls.divisions.height;
|
@@ -9,6 +9,8 @@ import { RulerBaseIndentControl, RulerMinDistanceBetweenIndents } from './base';
|
|
9
9
|
import { SizeUtils } from '../../../../../common/utils/size-utils';
|
10
10
|
const LEFT_INDENT_DRAG_HANDLE_BODY = RICH_EDIT_CLASS_NAME_PREFIX + "leftIndentDragHandleBody";
|
11
11
|
export class RulerLeftIndentDragHandle extends RulerBaseIndentControl {
|
12
|
+
get heightOfProtrudingPart() { return this.modelData.settings.showLeftIndent ? this._heightOfProtrudingPart : 0; }
|
13
|
+
getRootClassName() { return this.modelData.settings.styles.leftIndent.className; }
|
12
14
|
constructor(modelData, controls) {
|
13
15
|
super(modelData, controls);
|
14
16
|
this.isActionLeftIndent = false;
|
@@ -35,8 +37,6 @@ export class RulerLeftIndentDragHandle extends RulerBaseIndentControl {
|
|
35
37
|
this.leftCorrection = Math.round(SizeUtils.getOffsetWidth(this.rootElement) / 2);
|
36
38
|
this._heightOfProtrudingPart = SizeUtils.getOffsetHeight(this.rootElement) - this.controls.divisions.height / 2;
|
37
39
|
}
|
38
|
-
get heightOfProtrudingPart() { return this.modelData.settings.showLeftIndent ? this._heightOfProtrudingPart : 0; }
|
39
|
-
getRootClassName() { return this.modelData.settings.styles.leftIndent.className; }
|
40
40
|
adjustByTop() {
|
41
41
|
const mainElementHeight = SizeUtils.getOffsetHeight(this.rootElement);
|
42
42
|
const divisionsControlHeight = this.controls.divisions.height;
|
@@ -7,6 +7,11 @@ import { SnapTo } from '../vertical-line';
|
|
7
7
|
import { RulerBaseIndentControl, RulerMinDistanceBetweenIndents } from './base';
|
8
8
|
const RulerMinDistanceBetweenIndentsOnView = 5;
|
9
9
|
export class RulerRightIndentDragHandle extends RulerBaseIndentControl {
|
10
|
+
get viewStateRelativeLeft() { return this.controls.ruler.pageWidth - this.viewState; }
|
11
|
+
getRootClassName() {
|
12
|
+
return this.modelData.settings.styles.rightIndentImage.spriteCssClass + " " +
|
13
|
+
this.modelData.settings.styles.rightIndent.className;
|
14
|
+
}
|
10
15
|
constructor(modelData, controls) {
|
11
16
|
super(modelData, controls);
|
12
17
|
const template = RulerTemplateManager.getRightIndentElementTemplate();
|
@@ -17,11 +22,6 @@ export class RulerRightIndentDragHandle extends RulerBaseIndentControl {
|
|
17
22
|
this.adjustByTop();
|
18
23
|
this.leftCorrection = Math.round(this.rootElement.offsetWidth / 2);
|
19
24
|
}
|
20
|
-
get viewStateRelativeLeft() { return this.controls.ruler.pageWidth - this.viewState; }
|
21
|
-
getRootClassName() {
|
22
|
-
return this.modelData.settings.styles.rightIndentImage.spriteCssClass + " " +
|
23
|
-
this.modelData.settings.styles.rightIndent.className;
|
24
|
-
}
|
25
25
|
adjustByTop() {
|
26
26
|
const divisionsControlHeight = this.controls.divisions.height;
|
27
27
|
this.rootElement.style.marginTop = divisionsControlHeight / 2 + "px";
|
@@ -8,6 +8,9 @@ export const RulerMinDistanceBetweenMargins = 50;
|
|
8
8
|
const DIVISION_MARGIN_LEFT_CURSOR_CLASS_NAME = RULER_CLASS_NAME + "MarginLeftHandlePanel";
|
9
9
|
const DIVISION_MARGIN_LEFT_CLASS_NAME = RULER_CLASS_NAME + "MarginLeftPanel";
|
10
10
|
export class RulerLeftMarginDragHandle extends RulerBaseMarginControl {
|
11
|
+
getRootClassName() { return ''; }
|
12
|
+
;
|
13
|
+
get commandType() { return RichEditClientCommand.RulerSectionMarginLeft; }
|
11
14
|
constructor(modelData, controls, maxPageWidth) {
|
12
15
|
super(modelData, controls);
|
13
16
|
this.initialLeft = -(Math.ceil(maxPageWidth) - RULLER_NUMBER_CORRECTION);
|
@@ -19,9 +22,6 @@ export class RulerLeftMarginDragHandle extends RulerBaseMarginControl {
|
|
19
22
|
this.controls.ruler.rootElement.appendChild(this.marginPanelElement);
|
20
23
|
this.controls.ruler.rootElement.appendChild(this.handlePanelElement);
|
21
24
|
}
|
22
|
-
getRootClassName() { return ''; }
|
23
|
-
;
|
24
|
-
get commandType() { return RichEditClientCommand.RulerSectionMarginLeft; }
|
25
25
|
setViewStateToElement(element) {
|
26
26
|
element.style.left = this.viewState + this.initialLeft + "px";
|
27
27
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export class RulerMultiControl {
|
2
|
+
get activeSubControl() { return this.subControls[this.handleControlIndex]; }
|
2
3
|
constructor(modelData, controls) {
|
3
4
|
this.subControls = [];
|
4
5
|
this.handleControlIndex = -1;
|
@@ -6,7 +7,6 @@ export class RulerMultiControl {
|
|
6
7
|
this.modelData = modelData;
|
7
8
|
this.controls = controls;
|
8
9
|
}
|
9
|
-
get activeSubControl() { return this.subControls[this.handleControlIndex]; }
|
10
10
|
dispose() {
|
11
11
|
for (let elem of this.subControls)
|
12
12
|
elem.dispose();
|
@@ -6,6 +6,10 @@ import { RULLER_NUMBER_CORRECTION } from '../settings';
|
|
6
6
|
import { RulerBase } from './base';
|
7
7
|
import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
8
8
|
export class RulerControl extends RulerBase {
|
9
|
+
getRootClassName() { return this.modelData.settings.styles.control.className; }
|
10
|
+
;
|
11
|
+
get pageWidth() { return this.currPageWidth; }
|
12
|
+
;
|
9
13
|
constructor(modelData, controls) {
|
10
14
|
super(modelData, controls);
|
11
15
|
this.canHandleScroll = false;
|
@@ -17,10 +21,6 @@ export class RulerControl extends RulerBase {
|
|
17
21
|
DomUtils.addClassName(this.rootElement, TouchUtils.msTouchDraggableClassName);
|
18
22
|
this.controls.wrapper.rootElement.appendChild(this.rootElement);
|
19
23
|
}
|
20
|
-
getRootClassName() { return this.modelData.settings.styles.control.className; }
|
21
|
-
;
|
22
|
-
get pageWidth() { return this.currPageWidth; }
|
23
|
-
;
|
24
24
|
init() {
|
25
25
|
this.rootElement.style.height = this.controls.divisions.height + "px";
|
26
26
|
this.setPaddings();
|
@@ -8,6 +8,8 @@ import { RulerBase } from '../base';
|
|
8
8
|
import { RulerTabUtils } from './utils';
|
9
9
|
const TAB_ALIGN_BOX_PART_HANDLE_CLASS_NAME = RICH_EDIT_CLASS_NAME_PREFIX + "rulertabAlignBox";
|
10
10
|
export class RulerTabTypeControl extends RulerBase {
|
11
|
+
getRootClassName() { return TAB_ALIGN_BOX_PART_HANDLE_CLASS_NAME; }
|
12
|
+
;
|
11
13
|
constructor(modelData, controls) {
|
12
14
|
super(modelData, controls);
|
13
15
|
this.evtHandlersHolder = new DomEventHandlersHolder();
|
@@ -20,8 +22,6 @@ export class RulerTabTypeControl extends RulerBase {
|
|
20
22
|
this.controls.wrapper.rootElement.appendChild(this.rootElement);
|
21
23
|
this.evtHandlersHolder.addListener(this.innerSquareElement, TouchUtils.touchMouseDownEventName, this.onMouseDown.bind(this));
|
22
24
|
}
|
23
|
-
getRootClassName() { return TAB_ALIGN_BOX_PART_HANDLE_CLASS_NAME; }
|
24
|
-
;
|
25
25
|
init() {
|
26
26
|
this.adjust();
|
27
27
|
}
|
@@ -20,6 +20,24 @@ import { RulerMouseEventsManager } from './events/mouse';
|
|
20
20
|
import { RulerViewElementScrollManager } from './events/scroll';
|
21
21
|
import { RulerMouseHandler } from './mouse-handler';
|
22
22
|
export class RulerControls {
|
23
|
+
get paragraphLeftPosition() {
|
24
|
+
let pos = this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.leftPos;
|
25
|
+
if (this.tables.currModelState.columnSeparators.hasItems) {
|
26
|
+
const item = this.tables.currModelState.columnSeparators.currItem;
|
27
|
+
pos += this.tables.currModelState.columnSeparators.cellSpacing + item.leftMargin + item.position;
|
28
|
+
}
|
29
|
+
return pos;
|
30
|
+
}
|
31
|
+
get paragraphRightPosition() {
|
32
|
+
const colSeps = this.tables.currModelState.columnSeparators;
|
33
|
+
if (colSeps.hasItems) {
|
34
|
+
const nextSeparatorItem = colSeps.items[colSeps.index + 1];
|
35
|
+
return this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.leftPos +
|
36
|
+
(nextSeparatorItem.position - colSeps.cellSpacing - colSeps.currItem.rightMargin);
|
37
|
+
}
|
38
|
+
else
|
39
|
+
return this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.rightPos;
|
40
|
+
}
|
23
41
|
constructor(canvas, modelData) {
|
24
42
|
this.mouseEventsManager = new RulerMouseEventsManager();
|
25
43
|
this.viewElementScrollManager = new RulerViewElementScrollManager();
|
@@ -46,24 +64,6 @@ export class RulerControls {
|
|
46
64
|
this.mouseEventsManager.addListener(this.mouseHandler);
|
47
65
|
this.viewElementScrollManager.addListener(this.ruler, this.canvas);
|
48
66
|
}
|
49
|
-
get paragraphLeftPosition() {
|
50
|
-
let pos = this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.leftPos;
|
51
|
-
if (this.tables.currModelState.columnSeparators.hasItems) {
|
52
|
-
const item = this.tables.currModelState.columnSeparators.currItem;
|
53
|
-
pos += this.tables.currModelState.columnSeparators.cellSpacing + item.leftMargin + item.position;
|
54
|
-
}
|
55
|
-
return pos;
|
56
|
-
}
|
57
|
-
get paragraphRightPosition() {
|
58
|
-
const colSeps = this.tables.currModelState.columnSeparators;
|
59
|
-
if (colSeps.hasItems) {
|
60
|
-
const nextSeparatorItem = colSeps.items[colSeps.index + 1];
|
61
|
-
return this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.leftPos +
|
62
|
-
(nextSeparatorItem.position - colSeps.cellSpacing - colSeps.currItem.rightMargin);
|
63
|
-
}
|
64
|
-
else
|
65
|
-
return this.leftMargin.currModelState.modelValue + this.columns.currModelState.activeColumn.rightPos;
|
66
|
-
}
|
67
67
|
dispose() {
|
68
68
|
this.lineControl.dispose();
|
69
69
|
this.wrapper.dispose();
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import { ReadOnlyMode } from '../../interfaces/i-rich-edit-core';
|
2
2
|
import { RulerStyleInfo } from './settings';
|
3
3
|
export class RulerModelData {
|
4
|
-
constructor(core, settings) {
|
5
|
-
this.core = core;
|
6
|
-
this.settings = this.fixSettings(settings);
|
7
|
-
}
|
8
4
|
get inputPosition() { return this.core.inputPosition; }
|
9
5
|
;
|
10
6
|
get commandManager() { return this.core.commandManager; }
|
@@ -13,6 +9,10 @@ export class RulerModelData {
|
|
13
9
|
get isReadOnly() { return this.core.readOnly != ReadOnlyMode.None; }
|
14
10
|
get unitType() { return this.core.uiUnitConverter.getUnits(); }
|
15
11
|
get selection() { return this.core.selection; }
|
12
|
+
constructor(core, settings) {
|
13
|
+
this.core = core;
|
14
|
+
this.settings = this.fixSettings(settings);
|
15
|
+
}
|
16
16
|
fixSettings(settings) {
|
17
17
|
if (!settings.styles.firstLineIndent)
|
18
18
|
settings.styles.firstLineIndent = this.getDefaultStyle('dxreFirstLineIndentDragHandle');
|
@@ -12,6 +12,8 @@ var HorizontalRulerEventType;
|
|
12
12
|
HorizontalRulerEventType[HorizontalRulerEventType["CheckSelectionChange"] = 2] = "CheckSelectionChange";
|
13
13
|
})(HorizontalRulerEventType || (HorizontalRulerEventType = {}));
|
14
14
|
export class HorizontalRulerControl extends BatchUpdatableObject {
|
15
|
+
get initialized() { return !!this.controls; }
|
16
|
+
;
|
15
17
|
constructor(core, settings, canvas) {
|
16
18
|
super();
|
17
19
|
this.controls = null;
|
@@ -23,8 +25,6 @@ export class HorizontalRulerControl extends BatchUpdatableObject {
|
|
23
25
|
this.modelData = new RulerModelData(core, settings);
|
24
26
|
this.canvas = canvas;
|
25
27
|
}
|
26
|
-
get initialized() { return !!this.controls; }
|
27
|
-
;
|
28
28
|
dispose() {
|
29
29
|
if (this.initialized)
|
30
30
|
this.controls.dispose();
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Point } from '@devexpress/utils/lib/geometry/point';
|
2
|
+
import { IRichEditControl } from '../interfaces/i-rich-edit-core';
|
2
3
|
export declare function rotatePoint(point: Point, angle: number, center: Point): Point;
|
3
4
|
export declare class SearchTreeItemResult<T> {
|
4
5
|
readonly parentList: T[];
|
@@ -11,3 +12,9 @@ export declare function searchTreeItem<T extends {
|
|
11
12
|
}>(items: T[], comparer: (item: T) => boolean): SearchTreeItemResult<T> | null;
|
12
13
|
export declare function convertToFunction(func: any): any | null;
|
13
14
|
export declare function splitByLines(text: string): string[];
|
15
|
+
export interface IUrlValidationOptions {
|
16
|
+
allowRelativeUrl?: boolean;
|
17
|
+
allowedProtocols?: string[];
|
18
|
+
}
|
19
|
+
export declare function createUrlValidationOptions(control: IRichEditControl): IUrlValidationOptions;
|
20
|
+
export declare function isUrlValid(url: string, options?: IUrlValidationOptions): boolean;
|
@@ -56,3 +56,29 @@ export function convertToFunction(func) {
|
|
56
56
|
export function splitByLines(text) {
|
57
57
|
return text ? text.split(/\r\n|\r|\n/) : [''];
|
58
58
|
}
|
59
|
+
export function createUrlValidationOptions(control) {
|
60
|
+
const fieldSettings = control.modelManager.richOptions.fields;
|
61
|
+
return {
|
62
|
+
allowRelativeUrl: !fieldSettings.disableRelativeHyperlinkUri,
|
63
|
+
allowedProtocols: fieldSettings.allowedHyperlinkUriProtocols
|
64
|
+
};
|
65
|
+
}
|
66
|
+
const disallowedProtocols = [
|
67
|
+
'data',
|
68
|
+
'javascript'
|
69
|
+
];
|
70
|
+
export function isUrlValid(url, options) {
|
71
|
+
let currentLocation;
|
72
|
+
if (options === null || options === void 0 ? void 0 : options.allowRelativeUrl)
|
73
|
+
currentLocation = window.location.href;
|
74
|
+
try {
|
75
|
+
const resultUrl = new URL(url, currentLocation);
|
76
|
+
const protocol = resultUrl.protocol.slice(0, -1);
|
77
|
+
const allowedProtocols = options === null || options === void 0 ? void 0 : options.allowedProtocols;
|
78
|
+
if (allowedProtocols)
|
79
|
+
return allowedProtocols.includes(protocol);
|
80
|
+
return !disallowedProtocols.includes(protocol);
|
81
|
+
}
|
82
|
+
catch (_a) { }
|
83
|
+
return false;
|
84
|
+
}
|
@@ -42,12 +42,6 @@ export class RenderPageVertivalInfo {
|
|
42
42
|
}
|
43
43
|
}
|
44
44
|
export class ViewSettings {
|
45
|
-
constructor() {
|
46
|
-
this.viewType = ViewType.PrintLayout;
|
47
|
-
this.paddings = new Margins(15, 15, 15, 15);
|
48
|
-
this.pageVerticalInfo = new RenderPageVertivalInfo();
|
49
|
-
this.showHorizontalRuler = true;
|
50
|
-
}
|
51
45
|
get isFixedWidthMode() { return this.fixedWidth !== undefined && this.fixedWidth !== null; }
|
52
46
|
set widthOfPage(val) { this._widthOfPage = val; }
|
53
47
|
get widthOfPage() {
|
@@ -58,6 +52,12 @@ export class ViewSettings {
|
|
58
52
|
}
|
59
53
|
get isSimpleView() { return this.viewType == ViewType.Simple; }
|
60
54
|
get isPrintLayoutView() { return this.viewType == ViewType.PrintLayout; }
|
55
|
+
constructor() {
|
56
|
+
this.viewType = ViewType.PrintLayout;
|
57
|
+
this.paddings = new Margins(15, 15, 15, 15);
|
58
|
+
this.pageVerticalInfo = new RenderPageVertivalInfo();
|
59
|
+
this.showHorizontalRuler = true;
|
60
|
+
}
|
61
61
|
copyFrom(obj) {
|
62
62
|
this.paddings = new Margins(obj.paddings.left, obj.paddings.right, obj.paddings.top, obj.paddings.bottom);
|
63
63
|
this.viewType = obj.viewType;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.1
|
3
|
+
"version": "24.2.1-alpha-24260-0102",
|
4
4
|
"homepage": "https://www.devexpress.com/",
|
5
5
|
"bugs": "https://www.devexpress.com/support/",
|
6
6
|
"author": "Developer Express Inc.",
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
|
15
15
|
},
|
16
16
|
"peerDependencies": {
|
17
|
-
"devextreme": "24.1
|
18
|
-
"devextreme-dist": "24.1
|
17
|
+
"devextreme": "24.2.1-alpha-24256-1935",
|
18
|
+
"devextreme-dist": "24.2.1-alpha-24256-1935"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|