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
@@ -43,6 +43,7 @@ import { NusaSettings } from './nusa/settings';
|
|
43
43
|
import { Utils } from './utils';
|
44
44
|
import '../../common/utils/_license';
|
45
45
|
class RichEditPublic {
|
46
|
+
get events() { return this._native.events; }
|
46
47
|
constructor(htmlElement, options) {
|
47
48
|
this._native = new ClientRichEdit(htmlElement, options, this);
|
48
49
|
this.document = new RichEditDocument(this._native.core);
|
@@ -85,7 +86,6 @@ class RichEditPublic {
|
|
85
86
|
afterDocumentOpened(() => { });
|
86
87
|
}
|
87
88
|
}
|
88
|
-
get events() { return this._native.events; }
|
89
89
|
exportToBase64(callback, documentFormat) {
|
90
90
|
const exportModelOptions = this._native.core.getExportModelOptions({ documentFormat: documentFormat });
|
91
91
|
exportModelToBase64(exportModelOptions, callback);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ILocalizedRibbonItemOptions } from './i-localized-ribbon-item-options';
|
2
2
|
import { IToolbarItemTextOptions } from './i-ribbon-text-content-options';
|
3
|
-
export
|
3
|
+
export type IToolbarItemOptions = IToolbarButtonItemOptions | IToolbarButtonGroupItemOptions | IToolbarSelectBoxItemOptions | IToolbarMenuItemOptions | IToolbarNumberBoxItemOptions | IToolbarColorBoxItemOptions;
|
4
4
|
interface IToolbarItemOptionsBase {
|
5
5
|
type: 'Button' | 'ButtonGroup' | 'SelectBox' | 'Menu' | 'NumberBox' | 'ColorBox';
|
6
6
|
name?: string | number;
|
@@ -8,14 +8,14 @@ export interface IRibbonItem {
|
|
8
8
|
setVisible(visible: boolean): void;
|
9
9
|
setValue(value: any): void;
|
10
10
|
}
|
11
|
-
export
|
11
|
+
export type OnCommandExecutedHandler = (e: {
|
12
12
|
item: IRibbonItem;
|
13
13
|
parameter: any;
|
14
14
|
}) => void;
|
15
|
-
export
|
15
|
+
export type OnToolbarItemStateChangedHandler = (e: {
|
16
16
|
item: IRibbonItem;
|
17
17
|
}) => void;
|
18
|
-
export
|
18
|
+
export type OnToolbarItemCreatedHandler = (e: {
|
19
19
|
options: InteractiveItemOptions;
|
20
20
|
item: IRibbonItem;
|
21
21
|
tabIndex: number;
|
@@ -11,13 +11,13 @@ import { ToolbarSelectBoxItem } from './toolbar-items/toolbar-select-box-item';
|
|
11
11
|
import { ToolbarSeparatorItem } from './toolbar-items/toolbar-separator-item';
|
12
12
|
import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
13
13
|
export class Ribbon {
|
14
|
+
get element() { return this.options.element; }
|
14
15
|
constructor(options) {
|
15
16
|
this.options = options;
|
16
17
|
this.toolbars = [];
|
17
18
|
this.toolBarItemsByName = {};
|
18
19
|
this.contextItemIndexesByCategoryName = {};
|
19
20
|
}
|
20
|
-
get element() { return this.options.element; }
|
21
21
|
dispose() {
|
22
22
|
this.tabPanel.dispose();
|
23
23
|
this.toolbars.forEach(tb => tb.dispose());
|
@@ -7,8 +7,8 @@ import dxSelectBox from 'devextreme/ui/select_box';
|
|
7
7
|
import { IToolbarButtonGroupItemOptions, IToolbarButtonItemOptions, IToolbarColorBoxItemOptions, IToolbarMenuItemOptions, IToolbarNumberBoxItemOptions, IToolbarSelectBoxItemOptions } from '../i-toolbar-item-options';
|
8
8
|
import { IRibbonItem, OnCommandExecutedHandler } from '../ribbon';
|
9
9
|
import { ToolbarItemBase } from './toolbar-item-base';
|
10
|
-
export
|
11
|
-
|
10
|
+
export type InteractiveItemOptions = IToolbarButtonItemOptions | IToolbarButtonGroupItemOptions | IToolbarSelectBoxItemOptions | IToolbarMenuItemOptions | IToolbarNumberBoxItemOptions | IToolbarColorBoxItemOptions;
|
11
|
+
type WidgetTypeByOptionsType<T extends InteractiveItemOptions> = T extends IToolbarButtonItemOptions ? dxButton : T extends IToolbarButtonItemOptions ? dxButtonGroup : T extends IToolbarSelectBoxItemOptions ? dxSelectBox : T extends IToolbarNumberBoxItemOptions ? dxNumberBox : T extends IToolbarColorBoxItemOptions ? dxColorBox : dxMenu;
|
12
12
|
export declare abstract class ToolbarInteractiveItem<OptionsType extends InteractiveItemOptions> extends ToolbarItemBase implements IRibbonItem {
|
13
13
|
protected options: OptionsType;
|
14
14
|
protected onCommandExecuted: OnCommandExecutedHandler;
|
package/lib/client/settings.js
CHANGED
@@ -146,6 +146,10 @@ export class Settings {
|
|
146
146
|
result.fields.createHyperlinkTooltip = this.parseEventHandler(settings.fields.createHyperlinkTooltip);
|
147
147
|
if (isDefined(settings.fields.keepHyperlinkResultForInvalidReference))
|
148
148
|
result.fields.keepHyperlinkResultForInvalidReference = settings.fields.keepHyperlinkResultForInvalidReference;
|
149
|
+
if (isDefined(settings.fields.disableRelativeHyperlinkUri))
|
150
|
+
result.fields.disableRelativeHyperlinkUri = settings.fields.disableRelativeHyperlinkUri;
|
151
|
+
if (isDefined(settings.fields.allowedHyperlinkUriProtocols))
|
152
|
+
result.fields.allowedHyperlinkUriProtocols = settings.fields.allowedHyperlinkUriProtocols;
|
149
153
|
}
|
150
154
|
}
|
151
155
|
static parsePrintingSettings(settings, result) {
|
@@ -9,11 +9,11 @@ import dxTabPanel from 'devextreme/ui/tab_panel';
|
|
9
9
|
import { event } from 'devextreme/events/index';
|
10
10
|
import { Properties as dxColorBoxOptions } from 'devextreme/ui/color_box';
|
11
11
|
import Widget from 'devextreme/ui/widget/ui.widget';
|
12
|
-
|
12
|
+
type ComponentInitialized<TProperties> = (e: {
|
13
13
|
component?: Widget<TProperties>;
|
14
14
|
element?: dxElement;
|
15
15
|
}) => any;
|
16
|
-
export
|
16
|
+
export type EditorValueChangedHandler<TProperties> = (e: {
|
17
17
|
component?: Widget<TProperties>;
|
18
18
|
element?: dxElement;
|
19
19
|
model?: any;
|
@@ -21,20 +21,20 @@ export declare type EditorValueChangedHandler<TProperties> = (e: {
|
|
21
21
|
previousValue?: any;
|
22
22
|
event?: event;
|
23
23
|
}) => any;
|
24
|
-
export
|
24
|
+
export type EditorStateChangedHandler<TProperties> = (e: {
|
25
25
|
component?: Widget<TProperties>;
|
26
26
|
element?: dxElement;
|
27
27
|
model?: any;
|
28
28
|
}) => any;
|
29
|
-
export
|
29
|
+
export type ButtonClickHandler = (e: {
|
30
30
|
component?: dxButton;
|
31
31
|
element?: dxElement;
|
32
32
|
model?: any;
|
33
33
|
event?: event;
|
34
34
|
validationGroup?: any;
|
35
35
|
}) => any | string;
|
36
|
-
export
|
37
|
-
export
|
36
|
+
export type ButtonInitializedHandler = ComponentInitialized<dxButtonOptions>;
|
37
|
+
export type MenuItemRenderedHandler = (e: {
|
38
38
|
component?: dxMenu;
|
39
39
|
element?: dxElement;
|
40
40
|
model?: any;
|
@@ -42,7 +42,7 @@ export declare type MenuItemRenderedHandler = (e: {
|
|
42
42
|
itemElement?: dxElement;
|
43
43
|
itemIndex?: number;
|
44
44
|
}) => any;
|
45
|
-
export
|
45
|
+
export type MenuItemClickHandler = (e: {
|
46
46
|
component?: dxMenu;
|
47
47
|
element?: dxElement;
|
48
48
|
model?: any;
|
@@ -51,26 +51,26 @@ export declare type MenuItemClickHandler = (e: {
|
|
51
51
|
itemIndex?: number;
|
52
52
|
event?: event;
|
53
53
|
}) => any | string;
|
54
|
-
export
|
55
|
-
export
|
56
|
-
export
|
57
|
-
export
|
54
|
+
export type MenuInitializedHandler = ComponentInitialized<dxMenuOptions>;
|
55
|
+
export type SelectBoxInitializedHandler = ComponentInitialized<dxSelectBoxOptions>;
|
56
|
+
export type SelectBoxValueChangedHandler = EditorValueChangedHandler<dxSelectBoxOptions>;
|
57
|
+
export type TabPanelTitleClickHandler = (e: {
|
58
58
|
component?: dxTabPanel;
|
59
59
|
element?: dxElement;
|
60
60
|
model?: any;
|
61
61
|
itemData?: any;
|
62
62
|
itemElement?: dxElement;
|
63
63
|
}) => any | string;
|
64
|
-
export
|
64
|
+
export type TabPanelSelectionChangedHandler = (e: {
|
65
65
|
component?: dxTabPanel;
|
66
66
|
element?: dxElement;
|
67
67
|
model?: any;
|
68
68
|
addedItems?: Array<any>;
|
69
69
|
removedItems?: Array<any>;
|
70
70
|
}) => any;
|
71
|
-
export
|
72
|
-
export
|
73
|
-
export
|
74
|
-
export
|
75
|
-
export
|
71
|
+
export type NumberBoxInitializedHandler = ComponentInitialized<dxNumberBoxOptions>;
|
72
|
+
export type NumberBoxValueChangedHandler = EditorValueChangedHandler<dxNumberBoxOptions>;
|
73
|
+
export type ColorBoxInitializedHandler = ComponentInitialized<dxColorBoxOptions>;
|
74
|
+
export type ColorBoxValueChangedHandler = EditorValueChangedHandler<dxColorBoxOptions>;
|
75
|
+
export type ColorBoxStateChangedHandler = EditorStateChangedHandler<dxColorBoxOptions>;
|
76
76
|
export {};
|
@@ -18,10 +18,10 @@ import { IntervalCommandState } from '../commands/command-states';
|
|
18
18
|
import { SelectionHistoryItem } from '../model/history/selection/selection-history-item';
|
19
19
|
import { splitByLines } from '../utils/utils';
|
20
20
|
export class AutoCorrectProviderBase {
|
21
|
+
get subDocument() { return this.control.selection.activeSubDocument; }
|
21
22
|
constructor(control) {
|
22
23
|
this.control = control;
|
23
24
|
}
|
24
|
-
get subDocument() { return this.control.selection.activeSubDocument; }
|
25
25
|
revise() {
|
26
26
|
const pos = this.control.selection.lastSelectedInterval.start;
|
27
27
|
const lastInsertedChar = this.control.selection.activeSubDocument.getText(new FixedInterval(pos - 1, 1));
|
package/lib/common/bars/base.js
CHANGED
@@ -3,12 +3,12 @@ import { BatchUpdatableObject } from '@devexpress/utils/lib/class/batch-updatabl
|
|
3
3
|
import { isDefined } from '@devexpress/utils/lib/utils/common';
|
4
4
|
import { RichEditClientCommand } from '../commands/client-command';
|
5
5
|
export class BarBase extends BatchUpdatableObject {
|
6
|
+
get isInitialized() { return !!this.core; }
|
6
7
|
constructor(owner) {
|
7
8
|
super();
|
8
9
|
this.updateEnabled = true;
|
9
10
|
this.owner = owner;
|
10
11
|
}
|
11
|
-
get isInitialized() { return !!this.core; }
|
12
12
|
initialize(core) {
|
13
13
|
this.core = core;
|
14
14
|
}
|
@@ -18,6 +18,9 @@ const AUTOSCROLL_AREA_SIZE = 10;
|
|
18
18
|
const AUTOSCROLL_STEP = 10;
|
19
19
|
const MSTOUCH_MOVE_SENSITIVITY = 5;
|
20
20
|
export class CanvasManager extends BatchUpdatableObject {
|
21
|
+
get sizes() { return this.viewManager.sizes; }
|
22
|
+
get scroll() { return this.viewManager.scroll; }
|
23
|
+
get controlHeightProvider() { return this.sizes; }
|
21
24
|
constructor(viewManager, eventManager) {
|
22
25
|
super();
|
23
26
|
this.lastMousePosition = { x: -1, y: -1 };
|
@@ -39,9 +42,6 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
39
42
|
else
|
40
43
|
this.initMSPointerEvents();
|
41
44
|
}
|
42
|
-
get sizes() { return this.viewManager.sizes; }
|
43
|
-
get scroll() { return this.viewManager.scroll; }
|
44
|
-
get controlHeightProvider() { return this.sizes; }
|
45
45
|
get canvas() {
|
46
46
|
return this.viewManager.canvas;
|
47
47
|
}
|
@@ -2,14 +2,14 @@ import { DocumentLayoutDetailsLevel } from '../layout/document-layout-details-le
|
|
2
2
|
import { MouseHandler } from '../mouse-handler/mouse-handler/mouse-handler';
|
3
3
|
import { RelativePosition } from '../scroll/model-states';
|
4
4
|
export class CanvasScrollManager {
|
5
|
+
get canvas() { return this.viewManager.canvas; }
|
6
|
+
get sizes() { return this.viewManager.sizes; }
|
5
7
|
constructor(viewManager, horizontalRuler) {
|
6
8
|
this.updateScrollTimeoutId = null;
|
7
9
|
this.waitForDblClickTimeoutId = null;
|
8
10
|
this.viewManager = viewManager;
|
9
11
|
this.horizontalRuler = horizontalRuler;
|
10
12
|
}
|
11
|
-
get canvas() { return this.viewManager.canvas; }
|
12
|
-
get sizes() { return this.viewManager.sizes; }
|
13
13
|
dispose() {
|
14
14
|
clearTimeout(this.updateScrollTimeoutId);
|
15
15
|
clearTimeout(this.waitForDblClickTimeoutId);
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { RendererClassNames } from '../renderer-class-names';
|
2
2
|
import { FrameBaseListener } from './frame-base-listener';
|
3
3
|
export class AnchorListener extends FrameBaseListener {
|
4
|
+
baseFrameClassName() {
|
5
|
+
return RendererClassNames.ANCHOR;
|
6
|
+
}
|
4
7
|
constructor(rendererCache, stringResources, readOnlyPropertyHolder, fieldOptions) {
|
5
8
|
super(rendererCache, stringResources, fieldOptions);
|
6
9
|
this.readOnlyPropertyHolder = readOnlyPropertyHolder;
|
7
10
|
}
|
8
|
-
baseFrameClassName() {
|
9
|
-
return RendererClassNames.ANCHOR;
|
10
|
-
}
|
11
11
|
NotifyShow(pageIndex, bounds, tip, isTextBox, isAnchoredObject, rotation) {
|
12
12
|
if (this.readOnlyPropertyHolder.isReadOnlyPersistent)
|
13
13
|
super.NotifyHide();
|
@@ -4,11 +4,6 @@ import { MouseEventSource } from '../../mouse-handler/mouse-event-source';
|
|
4
4
|
import { DocumentRenderer } from '../renderes/common/document-renderer';
|
5
5
|
import { FrameBaseListener } from './frame-base-listener';
|
6
6
|
export class ResizeBoxListener extends FrameBaseListener {
|
7
|
-
constructor(rendererCache, stringResources, readOnlyPropertyHolder, fieldOptions) {
|
8
|
-
super(rendererCache, stringResources, fieldOptions);
|
9
|
-
this.readOnlyPropertyHolder = readOnlyPropertyHolder;
|
10
|
-
this.initElement(false);
|
11
|
-
}
|
12
7
|
baseFrameClassName() {
|
13
8
|
return FrameBaseListener.CLASSNAMES.CONTAINER;
|
14
9
|
}
|
@@ -16,6 +11,11 @@ export class ResizeBoxListener extends FrameBaseListener {
|
|
16
11
|
return FrameBaseListener.CLASSNAMES.CORNER_ELEM_PREFIX +
|
17
12
|
(Browser.TouchUI ? FrameBaseListener.CLASSNAMES.CORNER_TOUCH_POSTFIX : "");
|
18
13
|
}
|
14
|
+
constructor(rendererCache, stringResources, readOnlyPropertyHolder, fieldOptions) {
|
15
|
+
super(rendererCache, stringResources, fieldOptions);
|
16
|
+
this.readOnlyPropertyHolder = readOnlyPropertyHolder;
|
17
|
+
this.initElement(false);
|
18
|
+
}
|
19
19
|
initElement(reinit) {
|
20
20
|
if (reinit)
|
21
21
|
this.initFrameElement();
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { LayoutColumnChangesMerger, LayoutPageAreaChangesMerger, LayoutParagraphFrameChangesMerger, LayoutRowChangesMerger, LayoutTableChangesMerger } from '../../../layout-formatter/changes/engine/changes-merger';
|
2
2
|
export class CanvasListener {
|
3
|
+
get layout() { return this.viewManager.layout; }
|
3
4
|
constructor(viewManager, renderer) {
|
4
5
|
this.viewManager = viewManager;
|
5
6
|
this.renderer = renderer;
|
6
7
|
}
|
7
|
-
get layout() { return this.viewManager.layout; }
|
8
8
|
closeDocument() {
|
9
9
|
}
|
10
10
|
static mergeInnerPageChanges(pageChange) {
|
@@ -3,16 +3,6 @@ import { HeaderFooterLabelsRenderer } from './header-footer-labels-renderer';
|
|
3
3
|
import { HeaderFooterRenderer, MainRenderer } from './main-header-footer-renderer';
|
4
4
|
import { TextBoxRenderer } from './text-box-renderer';
|
5
5
|
export class RendererManager {
|
6
|
-
constructor(viewManager, stringResources) {
|
7
|
-
this.viewManager = viewManager;
|
8
|
-
this.renderers = [
|
9
|
-
new FloatingPictureRenderer(this),
|
10
|
-
new TextBoxRenderer(this),
|
11
|
-
new HeaderFooterRenderer(this),
|
12
|
-
new MainRenderer(this),
|
13
|
-
new HeaderFooterLabelsRenderer(this, stringResources.headerFooter),
|
14
|
-
];
|
15
|
-
}
|
16
6
|
get cache() { return this.viewManager.cache; }
|
17
7
|
;
|
18
8
|
get canvas() { return this.viewManager.canvas; }
|
@@ -23,6 +13,16 @@ export class RendererManager {
|
|
23
13
|
;
|
24
14
|
get canvasScrollManager() { return this.viewManager.canvasScrollManager; }
|
25
15
|
;
|
16
|
+
constructor(viewManager, stringResources) {
|
17
|
+
this.viewManager = viewManager;
|
18
|
+
this.renderers = [
|
19
|
+
new FloatingPictureRenderer(this),
|
20
|
+
new TextBoxRenderer(this),
|
21
|
+
new HeaderFooterRenderer(this),
|
22
|
+
new MainRenderer(this),
|
23
|
+
new HeaderFooterLabelsRenderer(this, stringResources.headerFooter),
|
24
|
+
];
|
25
|
+
}
|
26
26
|
init() {
|
27
27
|
for (let r of this.renderers)
|
28
28
|
r.init();
|
@@ -25,7 +25,7 @@ import { Size } from '@devexpress/utils/lib/geometry/size';
|
|
25
25
|
import { CanvasManager } from '../../canvas-manager';
|
26
26
|
import { ViewManager } from '../view-manager';
|
27
27
|
import { IRichEditControl } from '../../../interfaces/i-rich-edit-core';
|
28
|
-
export
|
28
|
+
export type GetSomeCanvasElementContainer = (node: Node) => Node;
|
29
29
|
export declare class SimpleViewCanvasSizeManager {
|
30
30
|
protected canvasManager: CanvasManager;
|
31
31
|
protected size: Size;
|
@@ -92,12 +92,12 @@ export class SimpleViewCanvasSizeManager {
|
|
92
92
|
}
|
93
93
|
}
|
94
94
|
export class DocumentRenderer {
|
95
|
+
get cache() { return this.viewManager.cache; }
|
95
96
|
constructor(viewManager) {
|
96
97
|
this.viewManager = viewManager;
|
97
98
|
if (this.viewManager.innerClientProperties.viewsSettings.isSimpleView)
|
98
99
|
DomUtils.addClassName(this.viewManager.canvas, RendererClassNames.SIMPLE_VIEW);
|
99
100
|
}
|
100
|
-
get cache() { return this.viewManager.cache; }
|
101
101
|
onViewTypeChanged() {
|
102
102
|
switch (this.viewManager.innerClientProperties.viewsSettings.viewType) {
|
103
103
|
case ViewType.Simple:
|
@@ -26,6 +26,9 @@ import { SearchSelectionRenderer } from './selection-renderers/search-selection-
|
|
26
26
|
import { SelectionRenderer } from './selection-renderers/selection-renderer';
|
27
27
|
import { SizeUtils } from '../../../common/utils/size-utils';
|
28
28
|
export class ViewManager {
|
29
|
+
get renderer() { return this.renderers[this.innerClientProperties.viewsSettings.viewType]; }
|
30
|
+
get printLayoutRenderer() { return this.renderers[ViewType.PrintLayout]; }
|
31
|
+
get canvasListener() { return this.canvasListeners[this.innerClientProperties.viewsSettings.viewType]; }
|
29
32
|
constructor(control, canvas, eventManager, stringResources, horizontalRuler, inputController, innerClientProperties, readOnlyPropertyHolder, layoutFormatterManagerHolder, internalApi, fieldOptions) {
|
30
33
|
this.cache = [];
|
31
34
|
this.sizes = new CanvasSizeInfo();
|
@@ -57,9 +60,6 @@ export class ViewManager {
|
|
57
60
|
this.rangePermission = new RangePermissionRenderer(this.cache, layoutSelection);
|
58
61
|
this.changeActiveSubDocumentRenderer = new RendererManager(this, stringResources);
|
59
62
|
}
|
60
|
-
get renderer() { return this.renderers[this.innerClientProperties.viewsSettings.viewType]; }
|
61
|
-
get printLayoutRenderer() { return this.renderers[ViewType.PrintLayout]; }
|
62
|
-
get canvasListener() { return this.canvasListeners[this.innerClientProperties.viewsSettings.viewType]; }
|
63
63
|
dispose() {
|
64
64
|
this.canvasManager.dispose();
|
65
65
|
this.canvasScrollManager.dispose();
|
@@ -13,13 +13,6 @@ import { ScrollHistoryItem } from '../model/history/selection/scroll-history-ite
|
|
13
13
|
import { SelectionHistoryItem } from '../model/history/selection/selection-history-item';
|
14
14
|
import { ScrollState } from '../scroll/model-states';
|
15
15
|
export class CommandOptions {
|
16
|
-
constructor(control) {
|
17
|
-
this.control = control;
|
18
|
-
this.changeSelection = true;
|
19
|
-
this.isSetManually = true;
|
20
|
-
if (control)
|
21
|
-
this.intervalsInfo = this.control.selection.intervalsInfo.clone();
|
22
|
-
}
|
23
16
|
get subDocument() { return this.intervalsInfo.subDocument; }
|
24
17
|
setChangeSelection(changeSelection) {
|
25
18
|
this.changeSelection = changeSelection;
|
@@ -29,6 +22,13 @@ export class CommandOptions {
|
|
29
22
|
this.intervalsInfo = intervalsInfo;
|
30
23
|
return this;
|
31
24
|
}
|
25
|
+
constructor(control) {
|
26
|
+
this.control = control;
|
27
|
+
this.changeSelection = true;
|
28
|
+
this.isSetManually = true;
|
29
|
+
if (control)
|
30
|
+
this.intervalsInfo = this.control.selection.intervalsInfo.clone();
|
31
|
+
}
|
32
32
|
}
|
33
33
|
export class CommandSimpleOptions extends CommandOptions {
|
34
34
|
constructor(control, parameter) {
|
@@ -37,13 +37,13 @@ export class CommandSimpleOptions extends CommandOptions {
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
export class CommandBase {
|
40
|
-
constructor(control) {
|
41
|
-
this.control = control;
|
42
|
-
}
|
43
40
|
get modelManipulator() { return this.control.modelManager.modelManipulator; }
|
44
41
|
get selection() { return this.control.selection; }
|
45
42
|
get history() { return this.control.modelManager.history; }
|
46
43
|
get inputPosition() { return this.control.inputPosition; }
|
44
|
+
constructor(control) {
|
45
|
+
this.control = control;
|
46
|
+
}
|
47
47
|
get colorProvider() { return this.control.modelManager.model.colorProvider; }
|
48
48
|
getRelatedCommands() {
|
49
49
|
return { [this.commandId]: true };
|
@@ -19,6 +19,9 @@ export class IntervalCommandStateEx extends SimpleCommandState {
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
export class ApplyStyleCommandState {
|
22
|
+
get enabled() {
|
23
|
+
return this.commandEnabled && (this.paragraphStyleChangeEnabled || this.characterStyleChangeEnabled);
|
24
|
+
}
|
22
25
|
constructor(commandEnabled, paragraphStyleChangeEnabled, characterStyleChangeEnabled, interval, value) {
|
23
26
|
this.commandEnabled = commandEnabled;
|
24
27
|
this.paragraphStyleChangeEnabled = paragraphStyleChangeEnabled;
|
@@ -28,9 +31,6 @@ export class ApplyStyleCommandState {
|
|
28
31
|
this.denyUpdateValue = false;
|
29
32
|
this.value = value;
|
30
33
|
}
|
31
|
-
get enabled() {
|
32
|
-
return this.commandEnabled && (this.paragraphStyleChangeEnabled || this.characterStyleChangeEnabled);
|
33
|
-
}
|
34
34
|
}
|
35
35
|
export class RulerSectionColumnsSettingsState extends IntervalCommandState {
|
36
36
|
constructor(enabled, interval, columns, equalWidth, activeIndex) {
|
@@ -40,13 +40,13 @@ export class SpellCheckerDialogParameters extends DialogParametersBase {
|
|
40
40
|
}
|
41
41
|
}
|
42
42
|
export class SpellCheckerDialogController {
|
43
|
+
get isRepeatingError() { return this.misspelledInterval.errorInfo.errorType == SpellingErrorType.Repeating; }
|
44
|
+
get canAddToDictionary() { return this.control.commandManager.getCommand(RichEditClientCommand.AddWordToDictionary).getState().enabled; }
|
45
|
+
get suggestions() { return this.misspelledInterval.errorInfo.suggestions; }
|
43
46
|
constructor(control, spellChecker) {
|
44
47
|
this.control = control;
|
45
48
|
this.spellChecker = spellChecker;
|
46
49
|
}
|
47
|
-
get isRepeatingError() { return this.misspelledInterval.errorInfo.errorType == SpellingErrorType.Repeating; }
|
48
|
-
get canAddToDictionary() { return this.control.commandManager.getCommand(RichEditClientCommand.AddWordToDictionary).getState().enabled; }
|
49
|
-
get suggestions() { return this.misspelledInterval.errorInfo.suggestions; }
|
50
50
|
tryFindNextError() {
|
51
51
|
this.misspelledInterval = this.spellChecker.findNextMisspelledInterval(this.control.selection.intervals[0].start);
|
52
52
|
if (this.misspelledInterval) {
|
@@ -17,10 +17,6 @@ import { CommandBase } from '../command-base';
|
|
17
17
|
import { SimpleCommandState } from '../command-states';
|
18
18
|
import { UpdateFieldCommandBase } from '../fields/update-field-command-base';
|
19
19
|
export class PrintDocumentOnClient extends CommandBase {
|
20
|
-
constructor(control, _nonce) {
|
21
|
-
super(control);
|
22
|
-
this._nonce = _nonce;
|
23
|
-
}
|
24
20
|
isEnabled() {
|
25
21
|
return super.isEnabled() && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.printing) &&
|
26
22
|
this.control.modelManager.model.isLoaded();
|
@@ -28,6 +24,10 @@ export class PrintDocumentOnClient extends CommandBase {
|
|
28
24
|
isEnabledInReadOnlyMode() {
|
29
25
|
return true;
|
30
26
|
}
|
27
|
+
constructor(control, _nonce) {
|
28
|
+
super(control);
|
29
|
+
this._nonce = _nonce;
|
30
|
+
}
|
31
31
|
getState() {
|
32
32
|
return new SimpleCommandState(this.isEnabled());
|
33
33
|
}
|
@@ -4,6 +4,7 @@ import { ReadOnlyMode } from '../../interfaces/i-rich-edit-core';
|
|
4
4
|
import { RichEditClientCommand } from '../client-command';
|
5
5
|
import { CommandSimpleOptions } from '../command-base';
|
6
6
|
import { HyperlinkCommandBase } from './hyperlink-command-base';
|
7
|
+
import { createUrlValidationOptions, isUrlValid } from '../../../common/utils/utils';
|
7
8
|
export class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
8
9
|
executeCore(state, options) {
|
9
10
|
let field;
|
@@ -27,8 +28,11 @@ export class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
27
28
|
if (hyperlinkInfo.anchor)
|
28
29
|
this.control.commandManager.getCommand(RichEditClientCommand.GoToBookmark)
|
29
30
|
.execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, hyperlinkInfo.anchor));
|
30
|
-
else
|
31
|
-
|
31
|
+
else {
|
32
|
+
const options = createUrlValidationOptions(this.control);
|
33
|
+
if (isUrlValid(hyperlinkInfo.uri, options))
|
34
|
+
Url.navigate(hyperlinkInfo.uri, "_blank");
|
35
|
+
}
|
32
36
|
return true;
|
33
37
|
}
|
34
38
|
isEnabledInReadOnlyMode() {
|
@@ -8,8 +8,10 @@ export class ToggleShowHorizontalRulerCommand extends CommandBase {
|
|
8
8
|
const visible = this.control.horizontalRulerControl.getVisible();
|
9
9
|
if (options.param == visible)
|
10
10
|
return false;
|
11
|
-
|
11
|
+
const toggledVisible = !visible;
|
12
|
+
this.control.horizontalRulerControl.setVisible(toggledVisible);
|
12
13
|
this.control.owner.adjustControl();
|
14
|
+
this.control.owner.raiseHorizontalRulerVisibleChanged(toggledVisible);
|
13
15
|
return true;
|
14
16
|
}
|
15
17
|
isEnabled(_options) {
|
@@ -6,7 +6,7 @@ import { ISelectionBase } from '../../selection/selection-base';
|
|
6
6
|
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
7
7
|
import { CommandBase, CommandOptions } from '../command-base';
|
8
8
|
import { IntervalCommandStateEx } from '../command-states';
|
9
|
-
|
9
|
+
type HistItemConstructor = new (modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, selection: ISelectionBase, layoutFormatterManager: FormatterManager) => ChangeCaseHistoryItemBase;
|
10
10
|
export declare class ChangeTextCaseCommandBaseBase extends CommandBase<IntervalCommandStateEx> {
|
11
11
|
getActualIntervals(): FixedInterval[];
|
12
12
|
getState(): IntervalCommandStateEx;
|
@@ -31,6 +31,10 @@ export var MouseButton;
|
|
31
31
|
MouseButton[MouseButton["Middle"] = 4] = "Middle";
|
32
32
|
})(MouseButton || (MouseButton = {}));
|
33
33
|
export class EventManager {
|
34
|
+
set mouseWheelEvent(val) {
|
35
|
+
this.mouseHandler.mouseWheelEvent = val;
|
36
|
+
this.touchHandler.mouseWheelEvent = val;
|
37
|
+
}
|
34
38
|
constructor(control, boxVisualizerManager) {
|
35
39
|
this.moveLocked = false;
|
36
40
|
this.shouldPreventContextMenuEvent = true;
|
@@ -42,10 +46,6 @@ export class EventManager {
|
|
42
46
|
this.touchHandler = new TouchHandler(control, boxVisualizerManager);
|
43
47
|
this.inputTypeHandlers = this.createInputTypeHandlers();
|
44
48
|
}
|
45
|
-
set mouseWheelEvent(val) {
|
46
|
-
this.mouseHandler.mouseWheelEvent = val;
|
47
|
-
this.touchHandler.mouseWheelEvent = val;
|
48
|
-
}
|
49
49
|
dispose() {
|
50
50
|
clearTimeout(this.accumulatedTextInsertId);
|
51
51
|
clearTimeout(this.lockMouseMoveTimerId);
|
@@ -3,11 +3,11 @@ import { HtmlMimeType } from "@devexpress/utils/lib/utils/mime-type";
|
|
3
3
|
import { RichUtils } from "../../../model/rich-utils";
|
4
4
|
import { HtmlExporter } from "./html-export";
|
5
5
|
export class HtmlDocumentExporter {
|
6
|
+
get modelManipulator() { return this.exportModelOptions.modelManager.modelManipulator; }
|
6
7
|
constructor(exportModelOptions, options) {
|
7
8
|
this.exportModelOptions = exportModelOptions;
|
8
9
|
this.options = options;
|
9
10
|
}
|
10
|
-
get modelManipulator() { return this.exportModelOptions.modelManager.modelManipulator; }
|
11
11
|
exportToBlob(callback) {
|
12
12
|
this.modelManipulator.picture.loader.ensureAllPicturesLoaded(this.options.ensurePictureLoadedTimeout, (_loaded) => {
|
13
13
|
callback(new Blob([this.exportAsString()], { type: HtmlMimeType }));
|
@@ -25,10 +25,6 @@ import { HtmlConverter } from '../../../rich-utils/html-converter';
|
|
25
25
|
import { HtmlBuilder } from './html-builder';
|
26
26
|
import { isDefined } from '@devexpress/utils/lib/utils/common';
|
27
27
|
export class HtmlExporter {
|
28
|
-
constructor(exportModelOptions) {
|
29
|
-
this.rangeCopy = null;
|
30
|
-
this.exportModelOptions = exportModelOptions;
|
31
|
-
}
|
32
28
|
get modelManager() { return this.exportModelOptions.modelManager; }
|
33
29
|
get colorProvider() { return this.modelManager.model.colorProvider; }
|
34
30
|
get unitConverter() { return this.exportModelOptions.uiUnitConverter; }
|
@@ -37,6 +33,10 @@ export class HtmlExporter {
|
|
37
33
|
;
|
38
34
|
get pageIndex() { return this.exportModelOptions.pageIndex; }
|
39
35
|
;
|
36
|
+
constructor(exportModelOptions) {
|
37
|
+
this.rangeCopy = null;
|
38
|
+
this.exportModelOptions = exportModelOptions;
|
39
|
+
}
|
40
40
|
getHtmlElementsByInterval(model, subDocument, interval, guidLabel) {
|
41
41
|
if (interval.length === 0)
|
42
42
|
return;
|
@@ -12,7 +12,7 @@ import { LoadFontInfo } from './load-font-info';
|
|
12
12
|
import { HtmlImporterMaskedCharacterProperties } from './utils/character-properties-utils';
|
13
13
|
import { ParagraphListPropertiesUtils } from './utils/paragraph-list-properties-utils';
|
14
14
|
import { FormatImagesImporter } from '../../utils/images-import';
|
15
|
-
export
|
15
|
+
export type TypeOfTagImporterConstructor = new (importer: HtmlImporter) => HtmlTagImporterBase;
|
16
16
|
export declare class LevelInfo {
|
17
17
|
element: HTMLElement;
|
18
18
|
childElements: HTMLElement[];
|