devexpress-richedit 24.1.8-build-24316-0102 → 24.2.2-beta
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 +12 -1
- package/dist/dx.richedit.js +1174 -907
- 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/bars/rich-edit-ribbon/ribbon-items-data.js +2 -1
- package/lib/client/client-rich-edit.d.ts +1 -0
- package/lib/client/client-rich-edit.js +15 -11
- package/lib/client/commands/commands.js +3 -0
- package/lib/client/commands/new-document-command.js +2 -1
- package/lib/client/commands/open-document-command.d.ts +1 -1
- package/lib/client/default-localization.js +2 -0
- 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 +2 -1
- package/lib/client/model-api/api-utils/parameter-checker.d.ts +1 -1
- package/lib/client/model-api/collections/drawing-object-collection.js +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 +2 -1
- package/lib/client/public/commands/enum.js +1 -0
- 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 +1 -0
- package/lib/client/public/ribbon/item-ids.d.ts +2 -1
- package/lib/client/public/ribbon/item-ids.js +1 -0
- 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 +2 -2
- 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 +2 -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/client-command.d.ts +2 -1
- package/lib/common/commands/client-command.js +1 -0
- package/lib/common/commands/command-base.js +10 -10
- package/lib/common/commands/command-manager.js +2 -1
- 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/create-field-command.d.ts +4 -0
- package/lib/common/commands/fields/create-field-command.js +8 -0
- package/lib/common/commands/fields/open-hyperlink-command.js +3 -2
- package/lib/common/commands/floating-objects/floating-object-drag-drop-change-position-command.js +1 -1
- package/lib/common/commands/floating-objects/insert-anchored-text-box-command.js +1 -1
- 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.d.ts +7 -1
- package/lib/common/formats/html/export/html-export.js +38 -38
- 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/importers/list-base.js +4 -4
- 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/input-controller.d.ts +14 -1
- package/lib/common/input-controller.js +58 -20
- package/lib/common/interfaces/i-control-owner.d.ts +1 -0
- package/lib/common/layout/document-layout.js +1 -1
- 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-boxes/layout-space-box.js +1 -1
- 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/names.d.ts +2 -1
- package/lib/common/model/fields/names.js +1 -0
- package/lib/common/model/fields/parsers/field-code-parser-client-updating-base.js +1 -1
- package/lib/common/model/fields/parsers/field-code-parser-doc-variable.js +1 -1
- package/lib/common/model/fields/parsers/field-code-parser-hyperlink.js +1 -1
- package/lib/common/model/fields/parsers/field-code-parser-if.d.ts +39 -0
- package/lib/common/model/fields/parsers/field-code-parser-if.js +138 -0
- package/lib/common/model/fields/parsers/field-code-parser-merge-field.js +1 -1
- package/lib/common/model/fields/parsers/field-code-parser.d.ts +5 -4
- package/lib/common/model/fields/parsers/field-code-parser.js +6 -12
- package/lib/common/model/fields/tree-creator.js +3 -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/floating-objects/insert-anchored-picture-history-item.js +1 -0
- package/lib/common/model/history/items/insert-text-history-item.js +3 -3
- package/lib/common/model/history/items/switch-text-box-sub-documents-state-history-item.js +0 -1
- 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/range/remove-interval-operation.js +8 -2
- 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/manipulators/text-box-manipulator.d.ts +1 -1
- package/lib/common/model/manipulators/text-box-manipulator.js +2 -1
- package/lib/common/model/options/fields.d.ts +1 -0
- package/lib/common/model/options/fields.js +3 -1
- 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/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 +15 -14
- 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 +7 -7
- package/lib/common/ui/ruler/controls/indent/left.js +6 -6
- package/lib/common/ui/ruler/controls/indent/right.js +7 -7
- package/lib/common/ui/ruler/controls/margin/left.js +4 -4
- package/lib/common/ui/ruler/controls/margin/right.js +1 -1
- package/lib/common/ui/ruler/controls/owner.js +1 -1
- package/lib/common/ui/ruler/controls/ruler.js +5 -5
- package/lib/common/ui/ruler/controls/tab/tab-type.js +5 -5
- package/lib/common/ui/ruler/controls/tab/tab.js +7 -7
- package/lib/common/ui/ruler/controls/tab/utils.d.ts +2 -2
- package/lib/common/ui/ruler/controls/tab/utils.js +5 -5
- package/lib/common/ui/ruler/controls/table.js +1 -1
- package/lib/common/ui/ruler/controls/vertical-line.d.ts +1 -2
- package/lib/common/ui/ruler/controls/vertical-line.js +2 -2
- package/lib/common/ui/ruler/controls/wrapper.js +1 -1
- package/lib/common/ui/ruler/manager.js +19 -19
- package/lib/common/ui/ruler/model-data.d.ts +8 -2
- package/lib/common/ui/ruler/model-data.js +10 -4
- package/lib/common/ui/ruler/ruler.js +4 -3
- package/lib/common/utils/utils.d.ts +8 -1
- package/lib/common/utils/utils.js +39 -8
- package/lib/common/view-settings/views-settings.js +6 -6
- package/package.json +3 -3
@@ -4,7 +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 { UrlUtils } from '../../../common/utils/utils';
|
7
|
+
import { createUrlValidationOptions, UrlUtils } from '../../../common/utils/utils';
|
8
8
|
export class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
9
9
|
executeCore(state, options) {
|
10
10
|
let field;
|
@@ -26,8 +26,9 @@ export class OpenHyperlinkCommand extends HyperlinkCommandBase {
|
|
26
26
|
this.aspxForceSendingRequest();
|
27
27
|
}
|
28
28
|
if (hyperlinkInfo.isUri()) {
|
29
|
+
const options = createUrlValidationOptions(this.control.modelManager);
|
29
30
|
let uri = hyperlinkInfo.getUriWithAnchor();
|
30
|
-
if (!UrlUtils.isValid(uri))
|
31
|
+
if (!UrlUtils.isValid(uri, options))
|
31
32
|
uri = UrlUtils.EmptyPage;
|
32
33
|
Url.navigate(uri, "_blank");
|
33
34
|
}
|
package/lib/common/commands/floating-objects/floating-object-drag-drop-change-position-command.js
CHANGED
@@ -200,7 +200,7 @@ export class FloatingObjectDragDropChangePositionCommand extends CommandBase {
|
|
200
200
|
const newRun = this.activeSubDocument.getRunAndIndexesByPosition(position).run;
|
201
201
|
if (newRun.getType() == RunType.AnchoredTextBoxRun) {
|
202
202
|
const oldTextBoxRun = oldRun;
|
203
|
-
const originalSubDocument = this.control.modelManager.model.
|
203
|
+
const originalSubDocument = this.control.modelManager.model.subDocumentsCollection.collection[oldTextBoxRun.subDocId];
|
204
204
|
this.history.addAndRedo(new SwitchTextBoxSubDocumentsStateHistoryItem(this.modelManipulator, originalSubDocument, this.activeSubDocument, position));
|
205
205
|
}
|
206
206
|
}
|
@@ -44,7 +44,7 @@ export class InsertAnchoredTextBoxCommand extends CommandBase {
|
|
44
44
|
anchorInfo.zOrder = this.modelManipulator.floatingObject.zOrder.getNewZOrder(options.subDocument);
|
45
45
|
anchorInfo.layoutTableCell = true;
|
46
46
|
history.addTransaction(() => {
|
47
|
-
this.modelManipulator.textBox.
|
47
|
+
this.modelManipulator.textBox.insertAnchoredTextBoxViaHistory(new SubDocumentPosition(this.selection.activeSubDocument, this.selection.lastSelectedInterval.start), this.inputPosition.charPropsBundle, new BaseTextBoxInfo(null, size, new Shape(ColorUtils.fromString(ColorUtils.colorNames.white), ColorHelper.BLACK_COLOR, UnitConverter.pointsToTwips(3.0 / 4)), anchorInfo, textBoxProperties, new NonVisualDrawingObjectInfo()));
|
48
48
|
this.history.addAndRedo(new SelectionHistoryItem(this.modelManipulator, this.selection, this.selection.getState(), this.selection.getState().setInterval(new FixedInterval(this.selection.lastSelectedInterval.start, 1))));
|
49
49
|
this.control.commandManager.getCommand(RichEditClientCommand.ChangeActiveSubDocumentToTextBox)
|
50
50
|
.execute(this.control.commandManager.isPublicApiCall, options);
|
@@ -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 }));
|
@@ -6,21 +6,27 @@ import { SubDocument } from '../../../model/sub-document';
|
|
6
6
|
import { HtmlBuilder } from './html-builder';
|
7
7
|
import { IExportModelOptions } from '../../i-document-exporter';
|
8
8
|
interface List {
|
9
|
+
parentList?: List;
|
9
10
|
numberingListIndex: number;
|
10
11
|
listLevelIndex: number;
|
11
12
|
start: number;
|
12
13
|
end: number;
|
13
14
|
}
|
15
|
+
interface IHtmlExporterOptions {
|
16
|
+
sanitaizeHyperlinkURIs?: boolean;
|
17
|
+
convertRelativeURIsToAbsolute?: boolean;
|
18
|
+
}
|
14
19
|
export declare class HtmlExporter {
|
15
20
|
rangeCopy: RangeCopy;
|
16
21
|
private exportModelOptions;
|
22
|
+
private htmlExporterOptions;
|
17
23
|
private get modelManager();
|
18
24
|
private get colorProvider();
|
19
25
|
private get unitConverter();
|
20
26
|
private get documentRenderer();
|
21
27
|
private get lastMaxNumPages();
|
22
28
|
private get pageIndex();
|
23
|
-
constructor(exportModelOptions: IExportModelOptions);
|
29
|
+
constructor(exportModelOptions: IExportModelOptions, htmlExporterOptions?: IHtmlExporterOptions);
|
24
30
|
getHtmlElementsByInterval(model: DocumentModel, subDocument: SubDocument, interval: FixedInterval, guidLabel: string): HtmlBuilder;
|
25
31
|
getParagraphsByInterval(subDocument: SubDocument, interval: FixedInterval): Paragraph[];
|
26
32
|
getListsByParagraphs(paragraphs: Paragraph[]): List[];
|
@@ -24,11 +24,9 @@ import { TableWidthUnitType } from '../../../model/tables/secondary-structures/t
|
|
24
24
|
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
|
+
import { createUrlValidationOptions, UrlUtils } from '../../../../common/utils/utils';
|
28
|
+
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
27
29
|
export class HtmlExporter {
|
28
|
-
constructor(exportModelOptions) {
|
29
|
-
this.rangeCopy = null;
|
30
|
-
this.exportModelOptions = exportModelOptions;
|
31
|
-
}
|
32
30
|
get modelManager() { return this.exportModelOptions.modelManager; }
|
33
31
|
get colorProvider() { return this.modelManager.model.colorProvider; }
|
34
32
|
get unitConverter() { return this.exportModelOptions.uiUnitConverter; }
|
@@ -37,7 +35,13 @@ export class HtmlExporter {
|
|
37
35
|
;
|
38
36
|
get pageIndex() { return this.exportModelOptions.pageIndex; }
|
39
37
|
;
|
38
|
+
constructor(exportModelOptions, htmlExporterOptions = null) {
|
39
|
+
this.rangeCopy = null;
|
40
|
+
this.exportModelOptions = exportModelOptions;
|
41
|
+
this.htmlExporterOptions = htmlExporterOptions;
|
42
|
+
}
|
40
43
|
getHtmlElementsByInterval(model, subDocument, interval, guidLabel) {
|
44
|
+
var _a, _b, _c, _d;
|
41
45
|
if (interval.length === 0)
|
42
46
|
return;
|
43
47
|
const unitTypeToString = this.unitConverter.getUnits() == RichEditUnit.Centimeter ? "cm" : "in";
|
@@ -337,7 +341,18 @@ export class HtmlExporter {
|
|
337
341
|
break;
|
338
342
|
}
|
339
343
|
if (hyperlinkInfo && !isInsideHyperlink) {
|
340
|
-
const
|
344
|
+
const sanitaizeHyperlinkURIs = (_b = (_a = this.htmlExporterOptions) === null || _a === void 0 ? void 0 : _a.sanitaizeHyperlinkURIs) !== null && _b !== void 0 ? _b : false;
|
345
|
+
const convertRelativeURIsToAbsolute = (_d = (_c = this.htmlExporterOptions) === null || _c === void 0 ? void 0 : _c.convertRelativeURIsToAbsolute) !== null && _d !== void 0 ? _d : false;
|
346
|
+
let url = hyperlinkInfo.uri;
|
347
|
+
const options = createUrlValidationOptions(this.exportModelOptions.modelManager);
|
348
|
+
if (!sanitaizeHyperlinkURIs || UrlUtils.isValid(url, options)) {
|
349
|
+
if (convertRelativeURIsToAbsolute && UrlUtils.isRelative(url))
|
350
|
+
url = UrlUtils.convertToAbsolute(url).href;
|
351
|
+
if (hyperlinkInfo.anchor != "")
|
352
|
+
url = url + "#" + hyperlinkInfo.anchor;
|
353
|
+
}
|
354
|
+
else
|
355
|
+
url = UrlUtils.EmptyPage;
|
341
356
|
const tooltip = hyperlinkInfo.tip;
|
342
357
|
html
|
343
358
|
.clear()
|
@@ -455,42 +470,27 @@ export class HtmlExporter {
|
|
455
470
|
}
|
456
471
|
getListsByParagraphs(paragraphs) {
|
457
472
|
const listsInInterval = [];
|
473
|
+
let previousList = null;
|
458
474
|
for (let i = 0, paragraph; paragraph = paragraphs[i]; i++) {
|
459
475
|
if (paragraph.isInList()) {
|
460
|
-
const
|
461
|
-
const
|
462
|
-
const
|
463
|
-
const
|
464
|
-
let
|
465
|
-
|
466
|
-
|
467
|
-
&&
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
existingItem.end = paragraphEnd;
|
474
|
-
}
|
475
|
-
else {
|
476
|
-
listsInInterval.push({
|
477
|
-
numberingListIndex: paragraphNumberingListIndex,
|
478
|
-
listLevelIndex: paragraphListLevelIndex,
|
479
|
-
start: paragraphStart,
|
480
|
-
end: paragraphEnd,
|
481
|
-
});
|
482
|
-
}
|
483
|
-
let listLevelIndex = paragraphListLevelIndex;
|
484
|
-
while (listLevelIndex > 0) {
|
485
|
-
let parentItem = null;
|
486
|
-
for (let j = 0; j < listsInInterval.length; j++) {
|
487
|
-
if (listsInInterval[j].listLevelIndex == listLevelIndex - 1)
|
488
|
-
parentItem = listsInInterval[j];
|
489
|
-
}
|
490
|
-
if (parentItem)
|
491
|
-
parentItem.end = paragraphEnd;
|
492
|
-
listLevelIndex--;
|
476
|
+
const numberingListIndex = paragraph.getNumberingListIndex();
|
477
|
+
const listLevelIndex = paragraph.getListLevelIndex();
|
478
|
+
const start = paragraph.startLogPosition.value;
|
479
|
+
const end = paragraph.getEndPosition();
|
480
|
+
let list = ListUtils.reverseElementBy(listsInInterval, (list) => {
|
481
|
+
return list.listLevelIndex <= (previousList === null || previousList === void 0 ? void 0 : previousList.listLevelIndex)
|
482
|
+
&& list.numberingListIndex === numberingListIndex
|
483
|
+
&& list.listLevelIndex === listLevelIndex;
|
484
|
+
});
|
485
|
+
if (!list) {
|
486
|
+
const parentList = (previousList === null || previousList === void 0 ? void 0 : previousList.numberingListIndex) === numberingListIndex ? previousList : null;
|
487
|
+
list = { parentList, numberingListIndex, listLevelIndex, start, end };
|
488
|
+
listsInInterval.push(list);
|
493
489
|
}
|
490
|
+
previousList = list;
|
491
|
+
do {
|
492
|
+
list.end = end;
|
493
|
+
} while (list = list.parentList);
|
494
494
|
}
|
495
495
|
}
|
496
496
|
return listsInInterval;
|
@@ -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[];
|
@@ -68,6 +68,18 @@ export class HtmlImportData {
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
export class HtmlImporter {
|
71
|
+
get currElement() { return ListUtils.last(this.levelInfo).element; }
|
72
|
+
;
|
73
|
+
get currElementChildren() { return ListUtils.last(this.levelInfo).childElements; }
|
74
|
+
;
|
75
|
+
get prevLevelInfo() { return this.levelInfo[this.levelInfo.length - 2]; }
|
76
|
+
get currLevelInfo() { return ListUtils.last(this.levelInfo); }
|
77
|
+
get currListItemLevelInfo() { return ListUtils.reverseElementBy(this.levelInfo, (levelInfo) => { var _a; return ((_a = levelInfo.tagImporter) === null || _a === void 0 ? void 0 : _a.elementTag()) === 'LI'; }); }
|
78
|
+
get currListInfo() {
|
79
|
+
const currListItemLevelInfo = this.currListItemLevelInfo;
|
80
|
+
return currListItemLevelInfo && !currListItemLevelInfo.tagImporter.paragraphWasAddedBefore ? ListUtils.last(this.listInfos) : null;
|
81
|
+
}
|
82
|
+
get subDocument() { return this.subDocPosition.subDocument; }
|
71
83
|
constructor(modelManager, measurer, subDocPosition, initElements, charPropsBundle, formatImagesImporter) {
|
72
84
|
this.fieldsId = 0;
|
73
85
|
this.listIndex = 0;
|
@@ -119,18 +131,6 @@ export class HtmlImporter {
|
|
119
131
|
for (let importerConst of HtmlImporter.importers)
|
120
132
|
this.tagImporters[new importerConst(this).elementTag()] = importerConst;
|
121
133
|
}
|
122
|
-
get currElement() { return ListUtils.last(this.levelInfo).element; }
|
123
|
-
;
|
124
|
-
get currElementChildren() { return ListUtils.last(this.levelInfo).childElements; }
|
125
|
-
;
|
126
|
-
get prevLevelInfo() { return this.levelInfo[this.levelInfo.length - 2]; }
|
127
|
-
get currLevelInfo() { return ListUtils.last(this.levelInfo); }
|
128
|
-
get currListItemLevelInfo() { return ListUtils.reverseElementBy(this.levelInfo, (levelInfo) => { var _a; return ((_a = levelInfo.tagImporter) === null || _a === void 0 ? void 0 : _a.elementTag()) === 'LI'; }); }
|
129
|
-
get currListInfo() {
|
130
|
-
const currListItemLevelInfo = this.currListItemLevelInfo;
|
131
|
-
return currListItemLevelInfo && !currListItemLevelInfo.tagImporter.paragraphWasAddedBefore ? ListUtils.last(this.listInfos) : null;
|
132
|
-
}
|
133
|
-
get subDocument() { return this.subDocPosition.subDocument; }
|
134
134
|
import() {
|
135
135
|
this.importStarted = false;
|
136
136
|
this.importedRunsInfo = [];
|
@@ -11,6 +11,10 @@ import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
|
11
11
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
12
12
|
import { PasteHtmlDataHistoryItem } from '../model/history/paste-html-data-history-item';
|
13
13
|
export class HtmlModelInserter {
|
14
|
+
get options() { return this.modelManager.richOptions.control; }
|
15
|
+
;
|
16
|
+
get subDocument() { return this.subDocPos.subDocument; }
|
17
|
+
;
|
14
18
|
constructor(modelManager, subDocPos, htmlData, charPropsBundle) {
|
15
19
|
this.pastedListsIndices = {};
|
16
20
|
this.fieldsMap = {};
|
@@ -38,10 +42,6 @@ export class HtmlModelInserter {
|
|
38
42
|
HtmlModelInserter.runConverterMap[RunType.FieldResultEndRun] = this.convertFieldResultEndRun;
|
39
43
|
}
|
40
44
|
}
|
41
|
-
get options() { return this.modelManager.richOptions.control; }
|
42
|
-
;
|
43
|
-
get subDocument() { return this.subDocPos.subDocument; }
|
44
|
-
;
|
45
45
|
insert() {
|
46
46
|
for (let runInfo of this.htmlData.runsInfo)
|
47
47
|
this.position += HtmlModelInserter.runConverterMap[runInfo.runType].call(this, runInfo);
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
2
2
|
export class HtmlTagImporterBase {
|
3
|
+
get colorProvider() { return this.importer.modelManager.model.colorProvider; }
|
3
4
|
constructor(importer) {
|
4
5
|
this.enablePreserveLineBreaks = false;
|
5
6
|
this.paragraphWasAddedBefore = false;
|
6
7
|
this.importer = importer;
|
7
8
|
}
|
8
|
-
get colorProvider() { return this.importer.modelManager.model.colorProvider; }
|
9
9
|
getClosestImporterByTagName(tagName) {
|
10
10
|
return ListUtils.reverseElementBy(this.importer.levelInfo, (levelInfo) => levelInfo.tagImporter.elementTag() == tagName).tagImporter;
|
11
11
|
}
|
@@ -13,9 +13,7 @@ export class HtmlListTagImporterBase extends HtmlTagImporterBase {
|
|
13
13
|
this.importer.addCurrLevelParagraphRunIfNeeded();
|
14
14
|
const listIndex = this.importer.listIndex;
|
15
15
|
const parentList = ListUtils.last(this.importer.listInfos);
|
16
|
-
const listLevel = parentList
|
17
|
-
? parentList.listLevel + 1
|
18
|
-
: 0;
|
16
|
+
const listLevel = parentList ? parentList.listLevel + 1 : 0;
|
19
17
|
if (listLevel === 9) {
|
20
18
|
this._ignored = true;
|
21
19
|
return;
|
@@ -31,6 +29,8 @@ export class HtmlListTagImporterBase extends HtmlTagImporterBase {
|
|
31
29
|
if (this._ignored)
|
32
30
|
return;
|
33
31
|
this.importer.listInfos.pop();
|
34
|
-
this.importer.
|
32
|
+
const parentList = ListUtils.last(this.importer.listInfos);
|
33
|
+
if (!parentList)
|
34
|
+
this.importer.listIndex++;
|
35
35
|
}
|
36
36
|
}
|
@@ -9,16 +9,16 @@ import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
|
9
9
|
import { LoadFontInfo } from '../load-font-info';
|
10
10
|
import { HtmlImporterFontUtils } from './font-utils';
|
11
11
|
export class HtmlImporterMaskedCharacterProperties {
|
12
|
+
get model() { return this.importer.modelManager.model; }
|
13
|
+
;
|
14
|
+
get controlOptions() { return this.importer.modelManager.richOptions.control; }
|
15
|
+
;
|
12
16
|
constructor(importer, loadFontInfos, tempFontInfoCache, allowCreateNewFonts) {
|
13
17
|
this.importer = importer;
|
14
18
|
this.loadFontInfos = loadFontInfos;
|
15
19
|
this.tempFontInfoCache = tempFontInfoCache;
|
16
20
|
this.allowCreateNewFonts = allowCreateNewFonts;
|
17
21
|
}
|
18
|
-
get model() { return this.importer.modelManager.model; }
|
19
|
-
;
|
20
|
-
get controlOptions() { return this.importer.modelManager.richOptions.control; }
|
21
|
-
;
|
22
22
|
getBundleFrom(element, interval) {
|
23
23
|
return new MaskedCharacterPropertiesBundle(this.import(element, interval, this.importer.charPropsBundle.props), this.importer.charPropsBundle.style);
|
24
24
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { DocumentModel, IModelOptions } from '../model/document-model';
|
2
2
|
import { DocumentImporterErrors } from './document-importer-errors';
|
3
3
|
import { FormatImagesImporter } from './utils/images-import';
|
4
|
-
export
|
5
|
-
export
|
4
|
+
export type FormatImportCallback = (model: DocumentModel, formatImagesImporter: FormatImagesImporter) => void;
|
5
|
+
export type FormatImportReject = (reason: DocumentImporterErrors) => void;
|
6
6
|
export interface IDocumentImporter {
|
7
7
|
importFromFile(blob: Blob, modelOptions: IModelOptions, callback: FormatImportCallback, reject: FormatImportReject): void;
|
8
8
|
}
|
@@ -7,9 +7,6 @@ import { afterFontsLoaded, fontWebApiAvailable } from '@devexpress/utils/lib/uti
|
|
7
7
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
8
8
|
import { PdfLayoutPageExporter } from './page-exporter';
|
9
9
|
export class PdfExporter {
|
10
|
-
constructor(docProcessor) {
|
11
|
-
this.docProcessor = docProcessor;
|
12
|
-
}
|
13
10
|
get layoutFormatterManager() {
|
14
11
|
return this.docProcessor.layoutFormatterManager;
|
15
12
|
}
|
@@ -25,6 +22,9 @@ export class PdfExporter {
|
|
25
22
|
get fontsSettings() {
|
26
23
|
return this.docProcessor.modelManager.richOptions.fonts;
|
27
24
|
}
|
25
|
+
constructor(docProcessor) {
|
26
|
+
this.docProcessor = docProcessor;
|
27
|
+
}
|
28
28
|
export(callback, options) {
|
29
29
|
const modifyPdfDocument = typeof options == 'function' ? options :
|
30
30
|
(!options || !options.modifyPdfDocument ? () => { } : options.modifyPdfDocument);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
export
|
2
|
+
export type IPdfKitColorValue = string | [number, number, number] | [number, number, number, number];
|
3
3
|
export interface IPdfKitDocument {
|
4
4
|
pipe(stream: any): void;
|
5
5
|
registerFont(font: string, source: ArrayBuffer, fontFamily: string): IPdfKitDocument;
|
@@ -31,7 +31,7 @@ export interface IPdfKitDocument {
|
|
31
31
|
fillOpacity(opacity: number): IPdfKitDocument;
|
32
32
|
fill(rule: IPdfKitRuleValue): IPdfKitDocument;
|
33
33
|
}
|
34
|
-
export
|
34
|
+
export type IPdfKitRuleValue = 'even-odd' | 'evenodd' | 'non-zero' | 'nonzero';
|
35
35
|
export interface IPdfKitPageOptions {
|
36
36
|
size?: [number, number] | string;
|
37
37
|
margin?: number;
|
@@ -10,6 +10,7 @@ import { RtfExportSR } from '../translation-table/rtf-export-sr';
|
|
10
10
|
import { RtfContentExporter } from './exporters/rtf-content-exporter';
|
11
11
|
import { RtfExportHelper } from './helpers/rtf-export-helper';
|
12
12
|
export class RtfExporter {
|
13
|
+
get documentModel() { return this.modelManipulator.model; }
|
13
14
|
constructor(modelManipulator, options) {
|
14
15
|
this.modelManipulator = modelManipulator;
|
15
16
|
this.options = options;
|
@@ -17,7 +18,6 @@ export class RtfExporter {
|
|
17
18
|
this.contentExporter = new RtfContentExporter(this.documentModel, options, this.rtfExportHelper);
|
18
19
|
this.rtfBuilder = this.contentExporter.createRtfBuilder();
|
19
20
|
}
|
20
|
-
get documentModel() { return this.modelManipulator.model; }
|
21
21
|
exportToBlob(callback) {
|
22
22
|
this.modelManipulator.picture.loader.ensureAllPicturesLoaded(this.options.ensurePictureLoadedTimeout, (_loaded) => {
|
23
23
|
callback(new Blob([this.exportAsString()], { type: 'application/rtf' }));
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { RtfFloatingObjectPictureExportStrategy } from './picture/rtf-floating-object-picture-export-strategy';
|
2
2
|
import { RtfAnchoredRunExporter } from './rtf-anchored-run-exporter';
|
3
3
|
export class RtfAnchoredPictureRunExporter extends RtfAnchoredRunExporter {
|
4
|
-
constructor(rtfBuilder, pictureRun, imageCache) {
|
5
|
-
super(rtfBuilder, pictureRun.anchorInfo, pictureRun.shape, pictureRun.size, pictureRun.info.containerProperties);
|
6
|
-
this.pictureRun = pictureRun;
|
7
|
-
this.imageCache = imageCache;
|
8
|
-
}
|
9
4
|
getWidth() {
|
10
5
|
return this.size.actualSize.width;
|
11
6
|
}
|
12
7
|
getHeight() {
|
13
8
|
return this.size.actualSize.height;
|
14
9
|
}
|
10
|
+
constructor(rtfBuilder, pictureRun, imageCache) {
|
11
|
+
super(rtfBuilder, pictureRun.anchorInfo, pictureRun.shape, pictureRun.size, pictureRun.info.containerProperties);
|
12
|
+
this.pictureRun = pictureRun;
|
13
|
+
this.imageCache = imageCache;
|
14
|
+
}
|
15
15
|
exportContent() {
|
16
16
|
const exportStrategy = new RtfFloatingObjectPictureExportStrategy();
|
17
17
|
exportStrategy.export(this.rtfBuilder, this.pictureRun.info, this.imageCache, this.pictureRun.info.containerProperties);
|
@@ -15,7 +15,7 @@ import { DocumentPropertyNames, RtfDocumentExporterOptions } from '../rtf-docume
|
|
15
15
|
import { RtfCharacterPropertiesExporter } from './rtf-character-properties-exporter';
|
16
16
|
import { RtfParagraphPropertiesExporter } from './rtf-paragraph-properties-exporter';
|
17
17
|
import { RtfSectionPropertiesExporter } from './rtf-section-properties-exporter';
|
18
|
-
export
|
18
|
+
export type RunHandler = (run: RunBase, runText: string, absolutePosition: number) => void;
|
19
19
|
export declare class RtfContentExporter {
|
20
20
|
documentModel: DocumentModel;
|
21
21
|
subDocument: SubDocument;
|
@@ -35,6 +35,8 @@ import { RtfSectionPropertiesExporter } from './rtf-section-properties-exporter'
|
|
35
35
|
import { RtfStyleExporter } from './rtf-style-exporter';
|
36
36
|
import { RtfTableExporter } from './table/rtf-table-exporter';
|
37
37
|
export class RtfContentExporter {
|
38
|
+
get shouldExportHiddenText() { return true; }
|
39
|
+
;
|
38
40
|
constructor(documentModel, options, rtfExportHelper) {
|
39
41
|
this.shouldFourceUpdateIterators = false;
|
40
42
|
this.documentModel = documentModel;
|
@@ -57,8 +59,6 @@ export class RtfContentExporter {
|
|
57
59
|
.add(RunType.AnchoredTextBoxRun, this.anchoredTextBoxRunHandler)
|
58
60
|
.get();
|
59
61
|
}
|
60
|
-
get shouldExportHiddenText() { return true; }
|
61
|
-
;
|
62
62
|
createRtfBuilder() {
|
63
63
|
return new RtfBuilder();
|
64
64
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ChunkedText } from '@devexpress/utils/lib/class/chunked-text';
|
2
2
|
import { NonVisualDrawingObjectInfo } from '../../../model/manipulators/picture-manipulator/non-visual-drawing-object-info';
|
3
|
-
|
4
|
-
|
3
|
+
type SpecialMarksTable = Record<string, string>;
|
4
|
+
type Action = () => void;
|
5
5
|
export declare class RtfBuilder {
|
6
6
|
static readonly specialMarks: SpecialMarksTable;
|
7
7
|
static readonly byteToHexString: string[];
|
@@ -2,10 +2,10 @@ import { SubDocument } from '../../../../../model/sub-document';
|
|
2
2
|
import { RtfFormattingInfo } from '../../model/character/rtf-formatting-info';
|
3
3
|
import { RtfImportData } from '../../rtf-import-data';
|
4
4
|
import { DestinationType } from '../utils/destination-type';
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
5
|
+
export type TranslateControlCharHandler = (importer: RtfImportData, ch: string) => void;
|
6
|
+
export type ControlCharTranslatorTable = Record<string, TranslateControlCharHandler>;
|
7
|
+
export type TranslateKeywordHandler = (importer: RtfImportData, parameterValue: number, hasParameter: boolean) => void;
|
8
|
+
export type KeywordTranslatorTable = Record<string, TranslateKeywordHandler>;
|
9
9
|
export declare abstract class DestinationBase {
|
10
10
|
static readonly macCodePage: number;
|
11
11
|
static readonly pcCodePage: number;
|
@@ -4,6 +4,7 @@ import { RtfFormattingInfo } from '../../model/character/rtf-formatting-info';
|
|
4
4
|
import { RtfParsingState } from '../../model/enums';
|
5
5
|
import { DestinationType } from '../utils/destination-type';
|
6
6
|
export class DestinationBase {
|
7
|
+
static get empty() { return EmptyDestination._empty; }
|
7
8
|
constructor(importer) {
|
8
9
|
if (importer) {
|
9
10
|
this.importer = importer;
|
@@ -13,7 +14,6 @@ export class DestinationBase {
|
|
13
14
|
importer.importers.character.characterFormatting.rtfFormattingInfo = rtfFormattingInfo;
|
14
15
|
}
|
15
16
|
}
|
16
|
-
static get empty() { return EmptyDestination._empty; }
|
17
17
|
createRtfFormattingInfo() {
|
18
18
|
return new RtfFormattingInfo();
|
19
19
|
}
|
@@ -2,15 +2,15 @@ import { SkipCharacterDecoder } from '../../encoding/skip-character-decoder';
|
|
2
2
|
import { DestinationType } from '../utils/destination-type';
|
3
3
|
import { DestinationBase } from './destination';
|
4
4
|
export class SkipDestination extends DestinationBase {
|
5
|
+
get destinationType() { return DestinationType.SkipDestination; }
|
6
|
+
get controlCharHT() { return null; }
|
7
|
+
;
|
5
8
|
constructor(importer) {
|
6
9
|
super(importer);
|
7
10
|
const formInfo = this.importer.importers.character.characterFormatting.rtfFormattingInfo;
|
8
11
|
this.oldDecoder = formInfo.activeDecoder;
|
9
12
|
formInfo.activeDecoder = new SkipCharacterDecoder();
|
10
13
|
}
|
11
|
-
get destinationType() { return DestinationType.SkipDestination; }
|
12
|
-
get controlCharHT() { return null; }
|
13
|
-
;
|
14
14
|
beforePopRtfState() {
|
15
15
|
this.importer.importers.character.characterFormatting.rtfFormattingInfo.activeDecoder = this.oldDecoder;
|
16
16
|
super.beforePopRtfState();
|
@@ -3,13 +3,13 @@ import { StringUtils } from '@devexpress/utils/lib/utils/string';
|
|
3
3
|
import { DestinationType } from '../utils/destination-type';
|
4
4
|
import { DestinationBase } from './destination';
|
5
5
|
export class StringPropertyBaseDestination extends DestinationBase {
|
6
|
+
get destinationType() { return DestinationType.StringPropertyBaseDestination; }
|
7
|
+
get controlCharHT() { return StringPropertyBaseDestination.controlCharHT; }
|
6
8
|
constructor(importer, modifier) {
|
7
9
|
super(importer);
|
8
10
|
this.value = [];
|
9
11
|
this.modifier = modifier;
|
10
12
|
}
|
11
|
-
get destinationType() { return DestinationType.StringPropertyBaseDestination; }
|
12
|
-
get controlCharHT() { return StringPropertyBaseDestination.controlCharHT; }
|
13
13
|
processCharCore(ch) {
|
14
14
|
this.value.push(ch);
|
15
15
|
}
|
@@ -3,12 +3,12 @@ import { StringUtils } from '@devexpress/utils/lib/utils/string';
|
|
3
3
|
import { DestinationType } from '../utils/destination-type';
|
4
4
|
import { UnicodeStringValueDestination } from './unicode-string-value-destination';
|
5
5
|
export class StringPropertyDestination extends UnicodeStringValueDestination {
|
6
|
+
get destinationType() { return DestinationType.StringPropertyDestination; }
|
7
|
+
get controlCharHT() { return StringPropertyDestination.controlCharHT; }
|
6
8
|
constructor(importer, setProperty) {
|
7
9
|
super(importer);
|
8
10
|
this.setProperty = setProperty;
|
9
11
|
}
|
10
|
-
get destinationType() { return DestinationType.StringPropertyDestination; }
|
11
|
-
get controlCharHT() { return StringPropertyDestination.controlCharHT; }
|
12
12
|
createEmptyClone() {
|
13
13
|
return new StringPropertyDestination(this.importer, this.setProperty);
|
14
14
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { DestinationType } from '../utils/destination-type';
|
2
2
|
import { DestinationBase } from './destination';
|
3
3
|
export class UnicodeDestination extends DestinationBase {
|
4
|
+
get destinationType() { return DestinationType.UnicodeDestination; }
|
5
|
+
get controlCharHT() { return null; }
|
4
6
|
constructor(importer, lastDestination) {
|
5
7
|
super(importer);
|
6
8
|
this.lastDestination = lastDestination;
|
7
9
|
}
|
8
|
-
get destinationType() { return DestinationType.UnicodeDestination; }
|
9
|
-
get controlCharHT() { return null; }
|
10
10
|
createClone() {
|
11
11
|
return new UnicodeDestination(this.importer, this.lastDestination);
|
12
12
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { DefaultDestination } from '../sub-document/default-destination';
|
2
2
|
import { DestinationType } from '../utils/destination-type';
|
3
3
|
export class FieldSubDestination extends DefaultDestination {
|
4
|
+
get destinationType() { return DestinationType.FieldSubDestination; }
|
4
5
|
constructor(importer) {
|
5
6
|
super(importer, importer.subDocument);
|
6
7
|
this.nestedGroupLevel = 1;
|
7
8
|
}
|
8
|
-
get destinationType() { return DestinationType.FieldSubDestination; }
|
9
9
|
createClone() {
|
10
10
|
const clone = this.createInstance();
|
11
11
|
clone.nestedGroupLevel = this.nestedGroupLevel;
|
@@ -2,13 +2,13 @@ import { DestinationType } from '../utils/destination-type';
|
|
2
2
|
import { TCFieldState } from './enums';
|
3
3
|
import { FieldSubDestination } from './field-sub-destination';
|
4
4
|
export class TableContentFieldDestination extends FieldSubDestination {
|
5
|
+
get destinationType() { return DestinationType.TableContentFieldDestination; }
|
5
6
|
constructor(importer, createField) {
|
6
7
|
super(importer);
|
7
8
|
if (!createField)
|
8
9
|
return;
|
9
10
|
this.insertTextCore(TableContentFieldDestination.tcFieldName);
|
10
11
|
}
|
11
|
-
get destinationType() { return DestinationType.TableContentFieldDestination; }
|
12
12
|
tableOfContentsEntryLevelNumberKeyword(parameterValue, hasParameter) {
|
13
13
|
this.closeQuotes();
|
14
14
|
super.tableOfContentsEntryLevelNumberKeyword(parameterValue, hasParameter);
|