@talrace/ngx-noder 0.0.6 → 0.0.8
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/README.md +5 -4
- package/esm2022/lib/apart-components/add-link-dialog/add-link-dialog.component.mjs +61 -0
- package/esm2022/lib/apart-components/add-link-dialog/validation.helper.mjs +7 -0
- package/esm2022/lib/apart-components/add-link-mobile/add-link-mobile.component.mjs +47 -0
- package/esm2022/lib/apart-components/confirm-dialog/confirm-dialog.component.mjs +32 -0
- package/esm2022/lib/apart-components/editor-search/editor-search-dialog.component.mjs +64 -0
- package/esm2022/lib/apart-components/editor-title/editor-title.component.mjs +89 -0
- package/esm2022/lib/apart-components/editor-title-mobile/editor-title-mobile.component.mjs +22 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/base-toolbar.component.mjs +111 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/color-picker/color-picker.component.mjs +37 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font/font.component.mjs +49 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font-size/font-size.component.mjs +90 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/font-style/font-style.component.mjs +81 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/format/format.component.mjs +28 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/heading/heading.component.mjs +22 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/numbering/numbering.component.mjs +53 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/print/print.component.mjs +18 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/undo-redo/undo-redo.component.mjs +27 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/buttons/zoom/zoom.component.mjs +71 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.mjs +94 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/menu-dropdowns-mobile.component.mjs +24 -0
- package/esm2022/lib/apart-components/editor-toolbar/components/toolbar-actions/toolbar-actions.component.mjs +65 -0
- package/esm2022/lib/apart-components/editor-toolbar/editor-mobile-toolbar/editor-mobile-toolbar.component.mjs +84 -0
- package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.mjs +90 -0
- package/esm2022/lib/apart-components/editor-toolbar/editor-toolbar.module.mjs +117 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/constants/editor-toolbar-modes.const.mjs +8 -0
- package/esm2022/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/constants/numbering-templates.const.mjs +6 -6
- package/esm2022/lib/apart-components/editor-toolbar/shared/constants/svg-icons.const.mjs +157 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/enums/alignment.enum.mjs +8 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/enums/editor-toolbar-mode.enum.mjs +11 -0
- package/esm2022/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-template-type.enum.mjs +1 -1
- package/esm2022/lib/apart-components/editor-toolbar/shared/enums/numbering-type.enum.mjs +6 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/services/custom-icon.service.mjs +34 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/services/editor-toolbar.service.mjs +26 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/services/toolbar-core.service.mjs +60 -0
- package/esm2022/lib/apart-components/editor-toolbar/shared/toolbar-styles.helper.mjs +55 -0
- package/esm2022/lib/apart-components/insert-table/insert-table.component.mjs +54 -0
- package/esm2022/lib/apart-components/insert-table-mobile/insert-table-mobile.component.mjs +84 -0
- package/esm2022/lib/apart-components/text-format-mobile/text-format-mobile.component.mjs +123 -0
- package/esm2022/lib/editor/components/edges/edge-element.model.mjs +9 -0
- package/esm2022/lib/editor/components/edges/edge-type.enum.mjs +6 -0
- package/esm2022/lib/editor/components/edges/edge.component.mjs +99 -0
- package/esm2022/lib/editor/components/edges/edges.mjs +108 -0
- package/esm2022/lib/editor/components/edges/page-type.enum.mjs +7 -0
- package/esm2022/lib/editor/components/editor.component.mjs +112 -0
- package/esm2022/lib/editor/components/external-element/external-element.service.mjs +6 -0
- package/esm2022/lib/editor/components/external-element/external-elements.const.mjs +4 -0
- package/esm2022/lib/editor/components/external-element/external-sidenav.interface.mjs +2 -0
- package/esm2022/lib/editor/components/external-element/external.component.mjs +41 -0
- package/esm2022/lib/editor/components/external-element/models/element-data.model.mjs +9 -0
- package/esm2022/lib/editor/components/external-element/models/external-element.model.mjs +11 -0
- package/esm2022/lib/editor/components/external-element/models/external-sidenav.model.mjs +15 -0
- package/esm2022/lib/editor/components/image/components/image.component.mjs +88 -0
- package/esm2022/lib/editor/components/image/image-api.service.mjs +36 -0
- package/esm2022/lib/editor/components/image/input-handler/image-input.handler.mjs +38 -0
- package/esm2022/lib/editor/components/image/resizer/coordinate.mjs +2 -0
- package/esm2022/lib/editor/components/image/resizer/direction-wrapper.mjs +19 -0
- package/esm2022/lib/editor/components/image/resizer/direction.enum.mjs +12 -0
- package/esm2022/lib/editor/components/image/resizer/resizer.component.mjs +106 -0
- package/esm2022/lib/editor/components/image/resizer/size-delta.mjs +2 -0
- package/esm2022/lib/editor/components/image/resizer/size-wrapper.mjs +52 -0
- package/esm2022/lib/editor/components/image/size.mjs +2 -0
- package/esm2022/lib/editor/components/shared/abstract/base.component.mjs +59 -0
- package/esm2022/lib/editor/components/shared/abstract/destroy.component.mjs +18 -0
- package/esm2022/lib/editor/components/shared/custom-component.hepler.mjs +43 -0
- package/esm2022/lib/editor/components/shared/custom-components.interface.mjs +2 -0
- package/esm2022/lib/editor/components/shared/custom-content-markers.const.mjs +3 -0
- package/esm2022/lib/editor/components/shared/custom-content.mjs +2 -0
- package/esm2022/lib/editor/components/shared/services/component.service.mjs +64 -0
- package/esm2022/lib/editor/components/shared/services/custom-content.service.mjs +163 -0
- package/esm2022/lib/editor/components/shared/services/overlay.service.mjs +55 -0
- package/esm2022/lib/editor/components/tab/tab.component.mjs +44 -0
- package/esm2022/lib/editor/components/tab/tab.helper.mjs +6 -0
- package/esm2022/lib/editor/components/table/cell-resizer/cell-resizer.mjs +118 -0
- package/esm2022/lib/editor/components/table/components/table-cell.component.mjs +97 -0
- package/esm2022/lib/editor/components/table/components/table.component.mjs +401 -0
- package/esm2022/lib/{+shared/editor/core → editor/components/table}/enums/hrule.enum.mjs +1 -1
- package/esm2022/lib/editor/components/table/enums/reisizer-side.enum.mjs +8 -0
- package/esm2022/lib/editor/components/table/enums/vertical-merge.enum.mjs +6 -0
- package/esm2022/lib/editor/components/table/models/cell-data.model.mjs +18 -0
- package/esm2022/lib/editor/components/table/models/cell-resizer-parameters.model.mjs +9 -0
- package/esm2022/lib/editor/components/table/models/row-data.model.mjs +8 -0
- package/esm2022/lib/editor/components/table/models/selection-range.model.mjs +7 -0
- package/esm2022/lib/editor/components/table/overlay-menu/overlay-menu.component.mjs +74 -0
- package/esm2022/lib/editor/components/table/selection/table-selection.mjs +366 -0
- package/esm2022/lib/editor/content/constants/display-values.const.mjs +8 -0
- package/esm2022/lib/editor/content/constants/document-info.const.mjs +13 -0
- package/esm2022/lib/editor/content/constants/editor.const.mjs +62 -0
- package/esm2022/lib/editor/content/contents.interface.mjs +2 -0
- package/esm2022/lib/editor/content/display-data/display-token.model.mjs +12 -0
- package/esm2022/lib/editor/content/display-data/document.mjs +134 -0
- package/esm2022/lib/editor/content/display-data/format-ext.model.mjs +10 -0
- package/esm2022/lib/editor/content/display-data/general-properties.model.mjs +11 -0
- package/esm2022/lib/editor/content/display-data/indent.model.mjs +9 -0
- package/esm2022/lib/editor/content/display-data/line-info.model.mjs +9 -0
- package/esm2022/lib/editor/content/display-data/lines.mjs +96 -0
- package/esm2022/lib/editor/content/display-data/pages.wrap.mjs +226 -0
- package/esm2022/lib/editor/content/display-data/paragraph-info.interface.mjs +2 -0
- package/esm2022/lib/editor/content/display-data/paragraph.mjs +52 -0
- package/esm2022/lib/editor/content/display-data/text-line-info.mjs +34 -0
- package/esm2022/lib/editor/content/display-data/toolbar-styles.interface.mjs +2 -0
- package/esm2022/lib/editor/content/helpers/content-style.helper.mjs +96 -0
- package/esm2022/lib/{+shared/editor → editor/content}/helpers/format.helper.mjs +1 -1
- package/esm2022/lib/{+shared/editor → editor/content}/helpers/indexed-element.helper.mjs +1 -1
- package/esm2022/lib/editor/content/helpers/scaling.helper.mjs +9 -0
- package/esm2022/lib/editor/content/margin.model.mjs +16 -0
- package/esm2022/lib/editor/content/page-vertical-data.model.mjs +9 -0
- package/esm2022/lib/{+shared/editor/core/enums → editor/content}/vertical-alignment.enum.mjs +1 -1
- package/esm2022/lib/editor/core/event-emitting.mjs +56 -0
- package/esm2022/lib/editor/display/cell.interface.mjs +2 -0
- package/esm2022/lib/editor/display/event.helper.mjs +18 -0
- package/esm2022/lib/editor/display/layers/cursor.layer.mjs +101 -0
- package/esm2022/lib/editor/display/layers/layer.config.mjs +2 -0
- package/esm2022/lib/editor/display/layers/pages.layer.mjs +97 -0
- package/esm2022/lib/editor/display/layers/print.pages.layer.mjs +7 -0
- package/esm2022/lib/editor/display/layers/print.text.layer.mjs +7 -0
- package/esm2022/lib/editor/display/layers/selection.layer.mjs +113 -0
- package/esm2022/lib/editor/display/layers/text.layer.mjs +203 -0
- package/esm2022/lib/editor/display/print/print.helper.mjs +40 -0
- package/esm2022/lib/editor/display/print/print.renderer.mjs +67 -0
- package/esm2022/lib/editor/display/print/print.rendering.helper.mjs +7 -0
- package/esm2022/lib/editor/display/render-changes.interface.mjs +2 -0
- package/esm2022/lib/editor/display/render-changes.model.mjs +25 -0
- package/esm2022/lib/editor/display/renderer.mjs +206 -0
- package/esm2022/lib/editor/display/rendering.helper.mjs +187 -0
- package/esm2022/lib/editor/display/renderloop.mjs +26 -0
- package/esm2022/lib/editor/display/virtual.renderer.mjs +317 -0
- package/esm2022/lib/editor/display/visible-range.interface.mjs +2 -0
- package/esm2022/lib/editor/editor.module.mjs +67 -0
- package/esm2022/lib/editor/execution/distance.model.mjs +10 -0
- package/esm2022/lib/editor/execution/edit.session.mjs +1117 -0
- package/esm2022/lib/editor/execution/editor.mjs +1346 -0
- package/esm2022/lib/editor/execution/helpers/delta.helper.mjs +18 -0
- package/esm2022/lib/editor/execution/helpers/dom.helper.mjs +42 -0
- package/esm2022/lib/editor/execution/helpers/format-style.helper.mjs +64 -0
- package/esm2022/lib/editor/execution/helpers/page.helper.mjs +12 -0
- package/esm2022/lib/editor/execution/helpers/paragraph-style.helper.mjs +41 -0
- package/esm2022/lib/editor/execution/helpers/paragraph.helper.mjs +169 -0
- package/esm2022/lib/editor/execution/regulator.service.mjs +198 -0
- package/esm2022/lib/editor/execution/targeting/cell-session-source.model.mjs +19 -0
- package/esm2022/lib/editor/execution/targeting/edge-session-source.model.mjs +15 -0
- package/esm2022/lib/editor/execution/targeting/main-session-source.model.mjs +8 -0
- package/esm2022/lib/editor/execution/targeting/session-source.model.mjs +3 -0
- package/esm2022/lib/editor/execution/targeting/session.model.mjs +10 -0
- package/esm2022/lib/editor/gadgets/font-metrics/editor-version.const.mjs +2 -0
- package/esm2022/lib/editor/gadgets/font-metrics/font-metric-size.interface.mjs +2 -0
- package/esm2022/lib/editor/gadgets/font-metrics/font-metrics.helper.mjs +88 -0
- package/esm2022/lib/editor/gadgets/history/operation-history.mjs +206 -0
- package/esm2022/lib/editor/gadgets/history/operation.type.mjs +2 -0
- package/esm2022/lib/editor/gadgets/history/operations-history-info.model.mjs +7 -0
- package/esm2022/lib/editor/gadgets/numbering/numbering-data.model.mjs +9 -0
- package/esm2022/lib/{+shared/editor/core/enums → editor/gadgets/numbering}/numbering-marker-type.enum.mjs +1 -1
- package/esm2022/lib/editor/gadgets/numbering/numbering.helper.mjs +82 -0
- package/esm2022/lib/editor/gadgets/page-break/break-types.enum.mjs +7 -0
- package/esm2022/lib/editor/gadgets/page-break/break.helper.mjs +18 -0
- package/esm2022/lib/editor/gadgets/scrollbar.mjs +81 -0
- package/esm2022/lib/editor/gadgets/search/replace.interface.mjs +2 -0
- package/esm2022/lib/editor/gadgets/search/search-iteration.interface.mjs +2 -0
- package/esm2022/lib/editor/gadgets/search/search.mjs +231 -0
- package/esm2022/lib/editor/gadgets/unicode/unicode-chars.const.mjs +5 -0
- package/esm2022/lib/editor/gadgets/unicode/unicode.helper.mjs +20 -0
- package/esm2022/lib/editor/interaction/base.handler.mjs +19 -0
- package/esm2022/lib/editor/interaction/document.handler.mjs +27 -0
- package/esm2022/lib/editor/interaction/editor.service.mjs +325 -0
- package/esm2022/lib/editor/interaction/input.handler.mjs +149 -0
- package/esm2022/lib/{+shared/enums → editor/interaction}/mode.enum.mjs +1 -1
- package/esm2022/lib/editor/interaction/mouse-button.enum.mjs +7 -0
- package/esm2022/lib/editor/interaction/mouse.handler.mjs +49 -0
- package/esm2022/lib/editor/interaction/text-input.mjs +53 -0
- package/esm2022/lib/editor/operations/commands.service.mjs +20 -0
- package/esm2022/lib/editor/operations/enums/command-type.enum.mjs +32 -0
- package/esm2022/lib/editor/operations/enums/target-type.enum.mjs +7 -0
- package/esm2022/lib/editor/operations/helpers/break-operations.helper.mjs +9 -0
- package/esm2022/lib/editor/operations/helpers/content-operations.helper.mjs +15 -0
- package/esm2022/lib/editor/operations/helpers/format-operations.helper.mjs +55 -0
- package/esm2022/lib/editor/operations/helpers/image-operations.helper.mjs +19 -0
- package/esm2022/lib/editor/operations/helpers/indexed-element-operations.helper.mjs +43 -0
- package/esm2022/lib/editor/operations/helpers/link-operations.helper.mjs +28 -0
- package/esm2022/lib/editor/operations/helpers/numbering-operations.helper.mjs +55 -0
- package/esm2022/lib/editor/operations/helpers/paragraph-operations.helper.mjs +114 -0
- package/esm2022/lib/editor/operations/helpers/tab-operations.helper.mjs +16 -0
- package/esm2022/lib/editor/operations/helpers/table-operations.helper.mjs +374 -0
- package/esm2022/lib/editor/operations/operations-helper.helper.mjs +432 -0
- package/esm2022/lib/editor/operations/save-commands.helper.mjs +127 -0
- package/esm2022/lib/editor/operations/target-operations.helper.mjs +23 -0
- package/esm2022/lib/editor/positioning/alignments.const.mjs +8 -0
- package/esm2022/lib/editor/positioning/content.helper.mjs +36 -0
- package/esm2022/lib/editor/positioning/cursor-paragraph.mjs +13 -0
- package/esm2022/lib/editor/positioning/cursor-position.interface.mjs +2 -0
- package/esm2022/lib/editor/positioning/insert-index.interface.mjs +2 -0
- package/esm2022/lib/editor/positioning/line-width.helper.mjs +13 -0
- package/esm2022/lib/editor/positioning/position.helper.mjs +194 -0
- package/esm2022/lib/editor/positioning/range.mjs +94 -0
- package/esm2022/lib/editor/positioning/selection.mjs +307 -0
- package/esm2022/lib/editor/revision.helper.mjs +91 -0
- package/esm2022/lib/models/generated/command.model.mjs +5 -1
- package/esm2022/lib/models/generated/insert-paragraph.model.mjs +20 -0
- package/esm2022/lib/models/generated/replace.model.mjs +5 -1
- package/esm2022/public-api.mjs +36 -33
- package/fesm2022/talrace-ngx-noder.mjs +3583 -3278
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/{+shared → apart-components}/add-link-dialog/add-link-dialog.component.d.ts +1 -1
- package/lib/apart-components/add-link-mobile/add-link-mobile.component.d.ts +19 -0
- package/lib/{+shared → apart-components}/confirm-dialog/confirm-dialog.component.d.ts +1 -1
- package/lib/{+shared → apart-components}/editor-search/editor-search-dialog.component.d.ts +6 -7
- package/lib/{+shared → apart-components}/editor-title/editor-title.component.d.ts +4 -3
- package/lib/apart-components/editor-title-mobile/editor-title-mobile.component.d.ts +6 -0
- package/lib/apart-components/editor-toolbar/components/base-toolbar.component.d.ts +49 -0
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/color-picker/color-picker.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font/font.component.d.ts +2 -2
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-size/font-size.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-style/font-style.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/format/format.component.d.ts +2 -2
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/heading/heading.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/numbering/numbering.component.d.ts +3 -3
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/print/print.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/undo-redo/undo-redo.component.d.ts +1 -1
- package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/zoom/zoom.component.d.ts +1 -1
- package/lib/apart-components/editor-toolbar/components/menu-dropdowns/menu-dropdowns.component.d.ts +36 -0
- package/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/menu-dropdowns-mobile.component.d.ts +14 -0
- package/lib/apart-components/editor-toolbar/components/toolbar-actions/toolbar-actions.component.d.ts +23 -0
- package/lib/apart-components/editor-toolbar/editor-mobile-toolbar/editor-mobile-toolbar.component.d.ts +26 -0
- package/lib/apart-components/editor-toolbar/editor-toolbar/editor-toolbar.component.d.ts +40 -0
- package/lib/apart-components/editor-toolbar/editor-toolbar.module.d.ts +32 -0
- package/lib/apart-components/editor-toolbar/shared/constants/editor-toolbar-modes.const.d.ts +2 -0
- package/lib/apart-components/editor-toolbar/shared/constants/numbering-templates.const.d.ts +6 -0
- package/lib/apart-components/editor-toolbar/shared/enums/editor-toolbar-mode.enum.d.ts +9 -0
- package/lib/apart-components/editor-toolbar/shared/services/editor-toolbar.service.d.ts +14 -0
- package/lib/apart-components/editor-toolbar/shared/services/toolbar-core.service.d.ts +38 -0
- package/lib/{+shared/editor-toolbar/helpers → apart-components/editor-toolbar/shared}/toolbar-styles.helper.d.ts +2 -2
- package/lib/{+shared → apart-components}/insert-table/insert-table.component.d.ts +1 -1
- package/lib/apart-components/insert-table-mobile/insert-table-mobile.component.d.ts +30 -0
- package/lib/apart-components/text-format-mobile/text-format-mobile.component.d.ts +35 -0
- package/lib/{+shared/editor/core/models → editor/components/edges}/edge-element.model.d.ts +1 -1
- package/lib/editor/components/edges/edge.component.d.ts +44 -0
- package/lib/{+shared/editor/core → editor}/components/edges/edges.d.ts +7 -7
- package/lib/{+shared/editor → editor/components}/editor.component.d.ts +10 -7
- package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-sidenav.interface.d.ts +1 -1
- package/lib/{+shared/editor/custom-components → editor/components}/external-element/external.component.d.ts +4 -4
- package/lib/{+shared/editor/custom-components → editor/components}/image/components/image.component.d.ts +4 -4
- package/lib/editor/components/image/image-api.service.d.ts +17 -0
- package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/resizer.component.d.ts +2 -2
- package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/size-wrapper.d.ts +1 -1
- package/lib/{+shared/editor/custom-components → editor/components}/shared/abstract/base.component.d.ts +4 -4
- package/lib/editor/components/shared/abstract/destroy.component.d.ts +9 -0
- package/lib/{+shared/editor/custom-components/shared/helpers → editor/components/shared}/custom-component.hepler.d.ts +3 -3
- package/lib/editor/components/shared/custom-components.interface.d.ts +13 -0
- package/lib/editor/components/shared/custom-content.d.ts +5 -0
- package/lib/{+shared/editor/custom-components/shared/services/component → editor/components/shared/services}/component.service.d.ts +1 -1
- package/lib/{+shared/editor/custom-components/shared/services/custom-content → editor/components/shared/services}/custom-content.service.d.ts +14 -12
- package/lib/{+shared/editor/custom-components → editor/components}/tab/tab.component.d.ts +2 -2
- package/lib/{+shared/editor/custom-components → editor/components}/table/cell-resizer/cell-resizer.d.ts +1 -1
- package/lib/{+shared/editor/custom-components → editor/components}/table/components/table-cell.component.d.ts +10 -10
- package/lib/{+shared/editor/custom-components → editor/components}/table/components/table.component.d.ts +8 -8
- package/lib/{+shared/editor/custom-components → editor/components}/table/overlay-menu/overlay-menu.component.d.ts +2 -2
- package/lib/{+shared/editor/custom-components → editor/components}/table/selection/table-selection.d.ts +3 -3
- package/lib/{+shared/editor/core → editor/content}/constants/editor.const.d.ts +3 -3
- package/lib/editor/content/contents.interface.d.ts +22 -0
- package/lib/{+shared/editor/core/models → editor/content/display-data}/display-token.model.d.ts +1 -1
- package/lib/{+shared/editor/core → editor/content/display-data}/document.d.ts +9 -9
- package/lib/{+shared/editor/core/models → editor/content/display-data}/format-ext.model.d.ts +1 -1
- package/lib/{+shared/editor/execution/models → editor/content/display-data}/general-properties.model.d.ts +1 -1
- package/lib/{+shared/editor/core/layers → editor/content/display-data}/lines.d.ts +1 -1
- package/lib/{+shared/editor/core/paging → editor/content/display-data}/pages.wrap.d.ts +13 -13
- package/lib/{+shared/editor/core/paging → editor/content/display-data}/paragraph.d.ts +4 -4
- package/lib/{+shared/editor/core/paging → editor/content/display-data}/text-line-info.d.ts +2 -2
- package/lib/editor/content/helpers/content-style.helper.d.ts +11 -0
- package/lib/{+shared/editor → editor/content}/helpers/indexed-element.helper.d.ts +1 -1
- package/lib/{+shared/editor/core/paging → editor/content}/page-vertical-data.model.d.ts +1 -1
- package/lib/{+shared/editor/core/base → editor/core}/event-emitting.d.ts +0 -5
- package/lib/{+shared/editor/core → editor/display}/layers/cursor.layer.d.ts +7 -8
- package/lib/{+shared/editor/core/interfaces → editor/display/layers}/layer.config.d.ts +2 -2
- package/lib/{+shared/editor/core → editor/display}/layers/pages.layer.d.ts +5 -6
- package/lib/editor/display/layers/print.text.layer.d.ts +4 -0
- package/lib/{+shared/editor/core → editor/display}/layers/selection.layer.d.ts +5 -6
- package/lib/editor/display/layers/text.layer.d.ts +34 -0
- package/lib/{+shared/helpers → editor/display/print}/print.helper.d.ts +3 -3
- package/lib/editor/display/print/print.renderer.d.ts +23 -0
- package/lib/{+shared/editor/core/helpers → editor/display/print}/print.rendering.helper.d.ts +2 -2
- package/lib/{+shared/editor/core/models → editor/display}/render-changes.model.d.ts +1 -1
- package/lib/{+shared/editor/core → editor/display}/renderer.d.ts +10 -13
- package/lib/{+shared/editor/core/helpers → editor/display}/rendering.helper.d.ts +7 -7
- package/lib/{+shared/editor/core/layers → editor/display}/renderloop.d.ts +2 -2
- package/lib/{+shared/editor/core → editor/display}/virtual.renderer.d.ts +14 -29
- package/lib/{+shared/editor → editor}/editor.module.d.ts +12 -10
- package/lib/{+shared/editor/core → editor/execution}/edit.session.d.ts +65 -63
- package/lib/{+shared/editor/core → editor/execution}/editor.d.ts +48 -43
- package/lib/editor/execution/helpers/delta.helper.d.ts +6 -0
- package/lib/{+shared/editor/core → editor/execution}/helpers/format-style.helper.d.ts +3 -5
- package/lib/{+shared/editor/core → editor/execution}/helpers/page.helper.d.ts +1 -1
- package/lib/{+shared/editor/core → editor/execution}/helpers/paragraph-style.helper.d.ts +1 -1
- package/lib/{+shared/editor/core → editor/execution}/helpers/paragraph.helper.d.ts +11 -8
- package/lib/{+shared/editor → editor}/execution/regulator.service.d.ts +15 -14
- package/lib/{+shared/editor/execution/models → editor/execution/targeting}/cell-session-source.model.d.ts +3 -3
- package/lib/{+shared/editor/execution/models → editor/execution/targeting}/edge-session-source.model.d.ts +3 -3
- package/lib/{+shared/editor/execution/models → editor/execution/targeting}/main-session-source.model.d.ts +1 -1
- package/lib/{+shared/editor/execution/models → editor/execution/targeting}/session-source.model.d.ts +1 -1
- package/lib/{+shared/editor/execution/models → editor/execution/targeting}/session.model.d.ts +3 -3
- package/lib/{+shared/editor/core/helpers → editor/gadgets/font-metrics}/font-metrics.helper.d.ts +1 -1
- package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operation-history.d.ts +9 -7
- package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operation.type.d.ts +2 -1
- package/lib/{+shared/editor/core/models → editor/gadgets/numbering}/numbering-data.model.d.ts +1 -1
- package/lib/{+shared/editor/core/helpers → editor/gadgets/numbering}/numbering.helper.d.ts +8 -8
- package/lib/{+shared/editor/helpers → editor/gadgets/page-break}/break.helper.d.ts +2 -2
- package/lib/{+shared/editor/core/layers → editor/gadgets}/scrollbar.d.ts +9 -18
- package/lib/{+shared/editor/core → editor/gadgets/search}/search.d.ts +4 -4
- package/lib/editor/interaction/base.handler.d.ts +9 -0
- package/lib/editor/interaction/document.handler.d.ts +10 -0
- package/lib/{+shared/editor → editor}/interaction/editor.service.d.ts +24 -18
- package/lib/{+shared/editor → editor}/interaction/input.handler.d.ts +4 -5
- package/lib/{+shared/editor → editor}/interaction/mouse.handler.d.ts +1 -1
- package/lib/{+shared/editor → editor}/operations/enums/command-type.enum.d.ts +11 -10
- package/lib/{+shared/editor → editor}/operations/helpers/break-operations.helper.d.ts +2 -2
- package/lib/{+shared/editor → editor}/operations/helpers/format-operations.helper.d.ts +2 -2
- package/lib/editor/operations/helpers/image-operations.helper.d.ts +7 -0
- package/lib/{+shared/editor → editor}/operations/helpers/indexed-element-operations.helper.d.ts +1 -1
- package/lib/{+shared/editor → editor}/operations/helpers/link-operations.helper.d.ts +1 -1
- package/lib/{+shared/editor → editor}/operations/helpers/numbering-operations.helper.d.ts +3 -3
- package/lib/{+shared/editor → editor}/operations/helpers/paragraph-operations.helper.d.ts +3 -2
- package/lib/{+shared/editor → editor}/operations/helpers/tab-operations.helper.d.ts +1 -1
- package/lib/{+shared/editor → editor}/operations/helpers/table-operations.helper.d.ts +6 -6
- package/lib/{+shared/editor/operations/helpers → editor/operations}/operations-helper.helper.d.ts +21 -19
- package/lib/{+shared/editor/operations/helpers → editor/operations}/save-commands.helper.d.ts +28 -22
- package/lib/editor/operations/target-operations.helper.d.ts +6 -0
- package/lib/{+shared/editor/helpers → editor/positioning}/content.helper.d.ts +10 -5
- package/lib/editor/positioning/cursor-paragraph.d.ts +7 -0
- package/lib/{+shared/editor/core/interfaces → editor/positioning}/cursor-position.interface.d.ts +1 -1
- package/lib/{+shared/editor/core/helpers → editor/positioning}/line-width.helper.d.ts +2 -2
- package/lib/{+shared/editor/core/helpers → editor/positioning}/position.helper.d.ts +9 -9
- package/lib/{+shared/editor/core → editor/positioning}/range.d.ts +12 -12
- package/lib/{+shared/editor → editor}/positioning/selection.d.ts +10 -10
- package/lib/editor/revision.helper.d.ts +15 -0
- package/lib/models/generated/command.model.d.ts +2 -0
- package/lib/models/generated/insert-paragraph.model.d.ts +10 -0
- package/lib/models/generated/replace.model.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +35 -32
- package/src/_ngx-noder.theme.scss +14 -9
- package/src/assets/fonts/nc-iconfont.css +112 -106
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.svg +4 -1
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/lib/{+shared → apart-components}/add-link-dialog/_add-link-dialog.theme.scss +1 -1
- package/src/lib/apart-components/add-link-mobile/_add-link-mobile.theme.scss +25 -0
- package/src/lib/{+shared → apart-components}/confirm-dialog/_theme.scss +1 -1
- package/src/lib/{+shared → apart-components}/editor-title/_editor-title.theme.scss +1 -1
- package/src/lib/apart-components/editor-title-mobile/_editor-title-mobile.theme.scss +42 -0
- package/src/lib/apart-components/editor-toolbar/_editor-toolbar.theme.scss +27 -0
- package/src/lib/apart-components/editor-toolbar/_theme.scss +25 -0
- package/src/lib/apart-components/editor-toolbar/components/buttons/color-picker/_color-picker.theme.scss +12 -0
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font/_font.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-size/_font-size.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/font-style/_font-style.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/format/_format.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/numbering/_numbering.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components/buttons}/undo-redo/_undo-redo.theme.scss +1 -1
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components}/menu-dropdowns/_menu-dropdowns.theme.scss +1 -1
- package/src/lib/apart-components/editor-toolbar/components/menu-dropdowns-mobile/_menu-dropdowns-mobile.theme.scss +33 -0
- package/src/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/components}/toolbar-actions/_toolbar-actions.theme.scss +2 -1
- package/src/lib/{+shared → apart-components}/insert-table/_insert-table.theme.scss +1 -1
- package/src/lib/apart-components/insert-table-mobile/_insert-table-mobile.theme.scss +54 -0
- package/src/lib/apart-components/text-format-mobile/_text-format-mobile.theme.scss +86 -0
- package/src/lib/{+shared/editor → editor}/_theme.scss +1 -1
- package/src/lib/{+shared/editor → editor/components}/_editor.theme.scss +10 -2
- package/src/scss/base-editor.scss +329 -0
- package/src/styles.scss +3 -58
- package/esm2022/lib/+shared/abstract/base-api.service.mjs +0 -99
- package/esm2022/lib/+shared/abstract/observer.component.mjs +0 -24
- package/esm2022/lib/+shared/add-link-dialog/add-link-dialog.component.mjs +0 -71
- package/esm2022/lib/+shared/confirm-dialog/confirm-dialog.component.mjs +0 -32
- package/esm2022/lib/+shared/constants/default-file-name.const.mjs +0 -2
- package/esm2022/lib/+shared/constants/paginator-sizes.const.mjs +0 -3
- package/esm2022/lib/+shared/editor/core/base/event-emitting.mjs +0 -71
- package/esm2022/lib/+shared/editor/core/components/edges/edge-type.enum.mjs +0 -6
- package/esm2022/lib/+shared/editor/core/components/edges/edge.component.mjs +0 -100
- package/esm2022/lib/+shared/editor/core/components/edges/edges.mjs +0 -104
- package/esm2022/lib/+shared/editor/core/constants/alignments.const.mjs +0 -8
- package/esm2022/lib/+shared/editor/core/constants/clipboardEventTypes.const.mjs +0 -6
- package/esm2022/lib/+shared/editor/core/constants/content-style-change.const.mjs +0 -15
- package/esm2022/lib/+shared/editor/core/constants/display-values.const.mjs +0 -8
- package/esm2022/lib/+shared/editor/core/constants/document-info.const.mjs +0 -13
- package/esm2022/lib/+shared/editor/core/constants/editor-version.const.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/constants/editor.const.mjs +0 -62
- package/esm2022/lib/+shared/editor/core/constants/unicode-chars.const.mjs +0 -5
- package/esm2022/lib/+shared/editor/core/document.mjs +0 -134
- package/esm2022/lib/+shared/editor/core/edit.session.mjs +0 -1099
- package/esm2022/lib/+shared/editor/core/editor.mjs +0 -1274
- package/esm2022/lib/+shared/editor/core/enums/break-types.enum.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/enums/mouse-button.enum.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/enums/page-type.enum.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/helpers/content-style.helper.mjs +0 -156
- package/esm2022/lib/+shared/editor/core/helpers/delta.helper.mjs +0 -18
- package/esm2022/lib/+shared/editor/core/helpers/dom.helper.mjs +0 -42
- package/esm2022/lib/+shared/editor/core/helpers/event.helper.mjs +0 -18
- package/esm2022/lib/+shared/editor/core/helpers/font-metrics.helper.mjs +0 -88
- package/esm2022/lib/+shared/editor/core/helpers/format-style.helper.mjs +0 -72
- package/esm2022/lib/+shared/editor/core/helpers/line-width.helper.mjs +0 -13
- package/esm2022/lib/+shared/editor/core/helpers/numbering.helper.mjs +0 -83
- package/esm2022/lib/+shared/editor/core/helpers/page.helper.mjs +0 -12
- package/esm2022/lib/+shared/editor/core/helpers/paragraph-style.helper.mjs +0 -41
- package/esm2022/lib/+shared/editor/core/helpers/paragraph.helper.mjs +0 -169
- package/esm2022/lib/+shared/editor/core/helpers/position.helper.mjs +0 -194
- package/esm2022/lib/+shared/editor/core/helpers/print.rendering.helper.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/helpers/rendering.helper.mjs +0 -187
- package/esm2022/lib/+shared/editor/core/helpers/unicode.helper.mjs +0 -20
- package/esm2022/lib/+shared/editor/core/interfaces/cell.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/cursor-position.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/font-metric-size.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/layer.config.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/paragraph-info.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/render-changes.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/replace.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/search-iteration.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/toolbar-styles.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/visible-line-info.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/interfaces/visible-range.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/core/keyboard/text-input.mjs +0 -53
- package/esm2022/lib/+shared/editor/core/layers/cursor.layer.mjs +0 -103
- package/esm2022/lib/+shared/editor/core/layers/edges.layer.mjs +0 -99
- package/esm2022/lib/+shared/editor/core/layers/lines.mjs +0 -96
- package/esm2022/lib/+shared/editor/core/layers/pages.layer.mjs +0 -106
- package/esm2022/lib/+shared/editor/core/layers/print.edges.layer.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/layers/print.pages.layer.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/layers/print.text.layer.mjs +0 -7
- package/esm2022/lib/+shared/editor/core/layers/renderloop.mjs +0 -26
- package/esm2022/lib/+shared/editor/core/layers/scrollbar.mjs +0 -100
- package/esm2022/lib/+shared/editor/core/layers/selection.layer.mjs +0 -115
- package/esm2022/lib/+shared/editor/core/layers/text.layer.mjs +0 -124
- package/esm2022/lib/+shared/editor/core/models/display-token.model.mjs +0 -12
- package/esm2022/lib/+shared/editor/core/models/distance.model.mjs +0 -10
- package/esm2022/lib/+shared/editor/core/models/edge-element.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/core/models/format-ext.model.mjs +0 -10
- package/esm2022/lib/+shared/editor/core/models/indent.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/core/models/line-info.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/core/models/margin.model.mjs +0 -16
- package/esm2022/lib/+shared/editor/core/models/numbering-data.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/core/models/render-changes.model.mjs +0 -25
- package/esm2022/lib/+shared/editor/core/paging/page-vertical-data.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/core/paging/pages.wrap.mjs +0 -226
- package/esm2022/lib/+shared/editor/core/paging/paragraph.mjs +0 -52
- package/esm2022/lib/+shared/editor/core/paging/text-line-info.mjs +0 -34
- package/esm2022/lib/+shared/editor/core/point.mjs +0 -13
- package/esm2022/lib/+shared/editor/core/print.renderer.mjs +0 -72
- package/esm2022/lib/+shared/editor/core/range.mjs +0 -94
- package/esm2022/lib/+shared/editor/core/renderer.mjs +0 -217
- package/esm2022/lib/+shared/editor/core/search.mjs +0 -231
- package/esm2022/lib/+shared/editor/core/virtual.renderer.mjs +0 -356
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-element.service.mjs +0 -6
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-elements.const.mjs +0 -4
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/external-element/external.component.mjs +0 -41
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/element-data.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-element.model.mjs +0 -11
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.mjs +0 -15
- package/esm2022/lib/+shared/editor/custom-components/image/components/image.component.mjs +0 -88
- package/esm2022/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.mjs +0 -38
- package/esm2022/lib/+shared/editor/custom-components/image/interfaces/size.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/coordinate.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.mjs +0 -19
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction.enum.mjs +0 -12
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/resizer.component.mjs +0 -106
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-delta.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-wrapper.mjs +0 -52
- package/esm2022/lib/+shared/editor/custom-components/image/services/image-api.service.mjs +0 -14
- package/esm2022/lib/+shared/editor/custom-components/shared/abstract/base.component.mjs +0 -59
- package/esm2022/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.mjs +0 -3
- package/esm2022/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.mjs +0 -43
- package/esm2022/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/shared/services/component/component.service.mjs +0 -64
- package/esm2022/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.mjs +0 -115
- package/esm2022/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.mjs +0 -55
- package/esm2022/lib/+shared/editor/custom-components/shared/types/custom-content.mjs +0 -2
- package/esm2022/lib/+shared/editor/custom-components/tab/tab.component.mjs +0 -44
- package/esm2022/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.mjs +0 -118
- package/esm2022/lib/+shared/editor/custom-components/table/components/table-cell.component.mjs +0 -97
- package/esm2022/lib/+shared/editor/custom-components/table/components/table.component.mjs +0 -401
- package/esm2022/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.mjs +0 -8
- package/esm2022/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.mjs +0 -6
- package/esm2022/lib/+shared/editor/custom-components/table/models/cell-data.model.mjs +0 -18
- package/esm2022/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.mjs +0 -9
- package/esm2022/lib/+shared/editor/custom-components/table/models/row-data.model.mjs +0 -8
- package/esm2022/lib/+shared/editor/custom-components/table/models/selection-range.model.mjs +0 -7
- package/esm2022/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.mjs +0 -74
- package/esm2022/lib/+shared/editor/custom-components/table/selection/table-selection.mjs +0 -364
- package/esm2022/lib/+shared/editor/editor.component.mjs +0 -98
- package/esm2022/lib/+shared/editor/editor.module.mjs +0 -82
- package/esm2022/lib/+shared/editor/execution/models/cell-session-source.model.mjs +0 -19
- package/esm2022/lib/+shared/editor/execution/models/edge-session-source.model.mjs +0 -15
- package/esm2022/lib/+shared/editor/execution/models/general-properties.model.mjs +0 -11
- package/esm2022/lib/+shared/editor/execution/models/main-session-source.model.mjs +0 -8
- package/esm2022/lib/+shared/editor/execution/models/session-source.model.mjs +0 -3
- package/esm2022/lib/+shared/editor/execution/models/session.model.mjs +0 -10
- package/esm2022/lib/+shared/editor/execution/regulator.service.mjs +0 -203
- package/esm2022/lib/+shared/editor/helpers/break.helper.mjs +0 -18
- package/esm2022/lib/+shared/editor/helpers/content.helper.mjs +0 -30
- package/esm2022/lib/+shared/editor/helpers/tab.helper.mjs +0 -6
- package/esm2022/lib/+shared/editor/interaction/editor.service.mjs +0 -309
- package/esm2022/lib/+shared/editor/interaction/input.handler.mjs +0 -160
- package/esm2022/lib/+shared/editor/interaction/mouse.handler.mjs +0 -49
- package/esm2022/lib/+shared/editor/interfaces/contents.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/interfaces/insert-index.interface.mjs +0 -2
- package/esm2022/lib/+shared/editor/operation-history/operation-history.mjs +0 -184
- package/esm2022/lib/+shared/editor/operation-history/operation.type.mjs +0 -2
- package/esm2022/lib/+shared/editor/operation-history/operations-history-info.model.mjs +0 -7
- package/esm2022/lib/+shared/editor/operations/enums/command-type.enum.mjs +0 -31
- package/esm2022/lib/+shared/editor/operations/enums/target-type.enum.mjs +0 -7
- package/esm2022/lib/+shared/editor/operations/helpers/break-operations.helper.mjs +0 -9
- package/esm2022/lib/+shared/editor/operations/helpers/content-operations.helper.mjs +0 -15
- package/esm2022/lib/+shared/editor/operations/helpers/format-operations.helper.mjs +0 -56
- package/esm2022/lib/+shared/editor/operations/helpers/image-operations.helper.mjs +0 -19
- package/esm2022/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.mjs +0 -43
- package/esm2022/lib/+shared/editor/operations/helpers/link-operations.helper.mjs +0 -28
- package/esm2022/lib/+shared/editor/operations/helpers/numbering-operations.helper.mjs +0 -55
- package/esm2022/lib/+shared/editor/operations/helpers/operations-helper.helper.mjs +0 -394
- package/esm2022/lib/+shared/editor/operations/helpers/paragraph-operations.helper.mjs +0 -83
- package/esm2022/lib/+shared/editor/operations/helpers/save-commands.helper.mjs +0 -118
- package/esm2022/lib/+shared/editor/operations/helpers/tab-operations.helper.mjs +0 -16
- package/esm2022/lib/+shared/editor/operations/helpers/table-operations.helper.mjs +0 -374
- package/esm2022/lib/+shared/editor/operations/helpers/target-operations.helper.mjs +0 -23
- package/esm2022/lib/+shared/editor/positioning/selection.mjs +0 -307
- package/esm2022/lib/+shared/editor/store/editor.actions.mjs +0 -13
- package/esm2022/lib/+shared/editor-search/editor-search-dialog.component.mjs +0 -71
- package/esm2022/lib/+shared/editor-title/editor-title.component.mjs +0 -83
- package/esm2022/lib/+shared/editor-toolbar/color-picker/color-picker.component.mjs +0 -32
- package/esm2022/lib/+shared/editor-toolbar/constants/svg-icons.const.mjs +0 -157
- package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.component.mjs +0 -101
- package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.module.mjs +0 -117
- package/esm2022/lib/+shared/editor-toolbar/enums/alignment.enum.mjs +0 -8
- package/esm2022/lib/+shared/editor-toolbar/enums/numbering-type.enum.mjs +0 -6
- package/esm2022/lib/+shared/editor-toolbar/font/font.component.mjs +0 -45
- package/esm2022/lib/+shared/editor-toolbar/font-size/font-size.component.mjs +0 -85
- package/esm2022/lib/+shared/editor-toolbar/font-style/font-style.component.mjs +0 -80
- package/esm2022/lib/+shared/editor-toolbar/format/format.component.mjs +0 -28
- package/esm2022/lib/+shared/editor-toolbar/heading/heading.component.mjs +0 -23
- package/esm2022/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.mjs +0 -55
- package/esm2022/lib/+shared/editor-toolbar/menu-dropdowns/menu-dropdowns.component.mjs +0 -194
- package/esm2022/lib/+shared/editor-toolbar/numbering/numbering.component.mjs +0 -53
- package/esm2022/lib/+shared/editor-toolbar/print/print.component.mjs +0 -18
- package/esm2022/lib/+shared/editor-toolbar/toolbar-actions/toolbar-actions.component.mjs +0 -126
- package/esm2022/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.mjs +0 -27
- package/esm2022/lib/+shared/editor-toolbar/zoom/zoom.component.mjs +0 -74
- package/esm2022/lib/+shared/helpers/print.helper.mjs +0 -40
- package/esm2022/lib/+shared/helpers/revision.helper.mjs +0 -91
- package/esm2022/lib/+shared/helpers/scaling.helper.mjs +0 -9
- package/esm2022/lib/+shared/helpers/validation.helper.mjs +0 -7
- package/esm2022/lib/+shared/insert-table/insert-table.component.mjs +0 -54
- package/esm2022/lib/+shared/services/commands.service.mjs +0 -20
- package/esm2022/lib/+shared/services/custom-icon.service.mjs +0 -34
- package/lib/+shared/abstract/base-api.service.d.ts +0 -23
- package/lib/+shared/abstract/observer.component.d.ts +0 -10
- package/lib/+shared/constants/default-file-name.const.d.ts +0 -1
- package/lib/+shared/constants/paginator-sizes.const.d.ts +0 -2
- package/lib/+shared/editor/core/components/edges/edge.component.d.ts +0 -45
- package/lib/+shared/editor/core/constants/clipboardEventTypes.const.d.ts +0 -5
- package/lib/+shared/editor/core/constants/content-style-change.const.d.ts +0 -14
- package/lib/+shared/editor/core/helpers/content-style.helper.d.ts +0 -16
- package/lib/+shared/editor/core/helpers/delta.helper.d.ts +0 -6
- package/lib/+shared/editor/core/interfaces/visible-line-info.interface.d.ts +0 -5
- package/lib/+shared/editor/core/layers/edges.layer.d.ts +0 -24
- package/lib/+shared/editor/core/layers/print.edges.layer.d.ts +0 -4
- package/lib/+shared/editor/core/layers/print.text.layer.d.ts +0 -5
- package/lib/+shared/editor/core/layers/text.layer.d.ts +0 -22
- package/lib/+shared/editor/core/point.d.ts +0 -7
- package/lib/+shared/editor/core/print.renderer.d.ts +0 -25
- package/lib/+shared/editor/custom-components/image/services/image-api.service.d.ts +0 -8
- package/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.d.ts +0 -13
- package/lib/+shared/editor/custom-components/shared/types/custom-content.d.ts +0 -5
- package/lib/+shared/editor/interfaces/contents.interface.d.ts +0 -22
- package/lib/+shared/editor/operations/helpers/image-operations.helper.d.ts +0 -7
- package/lib/+shared/editor/operations/helpers/target-operations.helper.d.ts +0 -6
- package/lib/+shared/editor/store/editor.actions.d.ts +0 -11
- package/lib/+shared/editor-toolbar/constants/numbering-templates.const.d.ts +0 -6
- package/lib/+shared/editor-toolbar/editor-toolbar.component.d.ts +0 -45
- package/lib/+shared/editor-toolbar/editor-toolbar.module.d.ts +0 -31
- package/lib/+shared/editor-toolbar/menu-dropdowns/menu-dropdowns.component.d.ts +0 -73
- package/lib/+shared/editor-toolbar/toolbar-actions/toolbar-actions.component.d.ts +0 -49
- package/lib/+shared/helpers/revision.helper.d.ts +0 -15
- package/src/lib/+shared/editor-toolbar/_editor-toolbar.theme.scss +0 -10
- package/src/lib/+shared/editor-toolbar/_theme.scss +0 -21
- package/src/scss/_mixins.scss +0 -14
- package/src/scss/_variables.scss +0 -1
- /package/lib/{+shared/helpers → apart-components/add-link-dialog}/validation.helper.d.ts +0 -0
- /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/constants/svg-icons.const.d.ts +0 -0
- /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/alignment.enum.d.ts +0 -0
- /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-template-type.enum.d.ts +0 -0
- /package/lib/{+shared/editor-toolbar → apart-components/editor-toolbar/shared}/enums/numbering-type.enum.d.ts +0 -0
- /package/lib/{+shared → apart-components/editor-toolbar/shared}/services/custom-icon.service.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor}/components/edges/edge-type.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/enums → editor/components/edges}/page-type.enum.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-element.service.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/external-element/external-elements.const.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/element-data.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/external-element.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/external-element/models/external-sidenav.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/image/input-handler/image-input.handler.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/coordinate.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/direction-wrapper.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/direction.enum.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/image/resizer/size-delta.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components/image/interfaces → editor/components/image}/size.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components/shared/constants → editor/components/shared}/custom-content-markers.const.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components/shared/services/overlay → editor/components/shared/services}/overlay.service.d.ts +0 -0
- /package/lib/{+shared/editor/helpers → editor/components/tab}/tab.helper.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor/components/table}/enums/hrule.enum.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/enums/reisizer-side.enum.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/enums/vertical-merge.enum.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/models/cell-data.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/models/cell-resizer-parameters.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/models/row-data.model.d.ts +0 -0
- /package/lib/{+shared/editor/custom-components → editor/components}/table/models/selection-range.model.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor/content}/constants/display-values.const.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor/content}/constants/document-info.const.d.ts +0 -0
- /package/lib/{+shared/editor/core/models → editor/content/display-data}/indent.model.d.ts +0 -0
- /package/lib/{+shared/editor/core/models → editor/content/display-data}/line-info.model.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/content/display-data}/paragraph-info.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/content/display-data}/toolbar-styles.interface.d.ts +0 -0
- /package/lib/{+shared/editor → editor/content}/helpers/format.helper.d.ts +0 -0
- /package/lib/{+shared → editor/content}/helpers/scaling.helper.d.ts +0 -0
- /package/lib/{+shared/editor/core/models → editor/content}/margin.model.d.ts +0 -0
- /package/lib/{+shared/editor/core/enums → editor/content}/vertical-alignment.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/display}/cell.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/helpers → editor/display}/event.helper.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor/display}/layers/print.pages.layer.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/display}/render-changes.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/display}/visible-range.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/models → editor/execution}/distance.model.d.ts +0 -0
- /package/lib/{+shared/editor/core → editor/execution}/helpers/dom.helper.d.ts +0 -0
- /package/lib/{+shared/editor/core/constants → editor/gadgets/font-metrics}/editor-version.const.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/gadgets/font-metrics}/font-metric-size.interface.d.ts +0 -0
- /package/lib/{+shared/editor/operation-history → editor/gadgets/history}/operations-history-info.model.d.ts +0 -0
- /package/lib/{+shared/editor/core/enums → editor/gadgets/numbering}/numbering-marker-type.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/enums → editor/gadgets/page-break}/break-types.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/gadgets/search}/replace.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/interfaces → editor/gadgets/search}/search-iteration.interface.d.ts +0 -0
- /package/lib/{+shared/editor/core/constants → editor/gadgets/unicode}/unicode-chars.const.d.ts +0 -0
- /package/lib/{+shared/editor/core/helpers → editor/gadgets/unicode}/unicode.helper.d.ts +0 -0
- /package/lib/{+shared/enums → editor/interaction}/mode.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/enums → editor/interaction}/mouse-button.enum.d.ts +0 -0
- /package/lib/{+shared/editor/core/keyboard → editor/interaction}/text-input.d.ts +0 -0
- /package/lib/{+shared/services → editor/operations}/commands.service.d.ts +0 -0
- /package/lib/{+shared/editor → editor}/operations/enums/target-type.enum.d.ts +0 -0
- /package/lib/{+shared/editor → editor}/operations/helpers/content-operations.helper.d.ts +0 -0
- /package/lib/{+shared/editor/core/constants → editor/positioning}/alignments.const.d.ts +0 -0
- /package/lib/{+shared/editor/interfaces → editor/positioning}/insert-index.interface.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const DisplayValue = {
|
|
2
|
+
char: 1,
|
|
3
|
+
customContent: 3,
|
|
4
|
+
punctuation: 9,
|
|
5
|
+
space: 10,
|
|
6
|
+
emptyLine: 13
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGxheS12YWx1ZXMuY29uc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi9lZGl0b3IvY29udGVudC9jb25zdGFudHMvZGlzcGxheS12YWx1ZXMuY29uc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sWUFBWSxHQUFHO0lBQ3hCLElBQUksRUFBRSxDQUFDO0lBQ1AsYUFBYSxFQUFFLENBQUM7SUFDaEIsV0FBVyxFQUFFLENBQUM7SUFDZCxLQUFLLEVBQUUsRUFBRTtJQUNULFNBQVMsRUFBRSxFQUFFO0NBQ2hCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgRGlzcGxheVZhbHVlID0ge1xuICAgIGNoYXI6IDEsXG4gICAgY3VzdG9tQ29udGVudDogMyxcbiAgICBwdW5jdHVhdGlvbjogOSxcbiAgICBzcGFjZTogMTAsXG4gICAgZW1wdHlMaW5lOiAxM1xufTtcbiJdfQ==
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const DocumentInfo = {
|
|
2
|
+
width: 794,
|
|
3
|
+
widthInInches: 8.267,
|
|
4
|
+
height: 1123,
|
|
5
|
+
pagesSpace: 8,
|
|
6
|
+
paddingTop: 96,
|
|
7
|
+
paddingRight: 48,
|
|
8
|
+
paddingBottom: 96,
|
|
9
|
+
paddingLeft: 48,
|
|
10
|
+
paddingHeader: 48,
|
|
11
|
+
paddingFooter: 48
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtaW5mby5jb25zdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub2Rlci9zcmMvbGliL2VkaXRvci9jb250ZW50L2NvbnN0YW50cy9kb2N1bWVudC1pbmZvLmNvbnN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLFlBQVksR0FBRztJQUN4QixLQUFLLEVBQUUsR0FBRztJQUNWLGFBQWEsRUFBRSxLQUFLO0lBQ3BCLE1BQU0sRUFBRSxJQUFJO0lBQ1osVUFBVSxFQUFFLENBQUM7SUFDYixVQUFVLEVBQUUsRUFBRTtJQUNkLFlBQVksRUFBRSxFQUFFO0lBQ2hCLGFBQWEsRUFBRSxFQUFFO0lBQ2pCLFdBQVcsRUFBRSxFQUFFO0lBQ2YsYUFBYSxFQUFFLEVBQUU7SUFDakIsYUFBYSxFQUFFLEVBQUU7Q0FDcEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBEb2N1bWVudEluZm8gPSB7XG4gICAgd2lkdGg6IDc5NCxcbiAgICB3aWR0aEluSW5jaGVzOiA4LjI2NyxcbiAgICBoZWlnaHQ6IDExMjMsXG4gICAgcGFnZXNTcGFjZTogOCxcbiAgICBwYWRkaW5nVG9wOiA5NixcbiAgICBwYWRkaW5nUmlnaHQ6IDQ4LFxuICAgIHBhZGRpbmdCb3R0b206IDk2LFxuICAgIHBhZGRpbmdMZWZ0OiA0OCxcbiAgICBwYWRkaW5nSGVhZGVyOiA0OCxcbiAgICBwYWRkaW5nRm9vdGVyOiA0OFxufTtcbiJdfQ==
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Alignment } from '../../positioning/alignments.const';
|
|
2
|
+
import { HeadingModel } from '../../../models/generated/heading.model';
|
|
3
|
+
import { ParagraphStyleModel } from '../../../models/generated/paragraph-style.model';
|
|
4
|
+
import { TextStyleModel } from '../../../models/generated/text-style.model';
|
|
5
|
+
import { VerticalAlignment } from '../vertical-alignment.enum';
|
|
6
|
+
export const DEFAULT_BACKGROUND_COLOR = 'transparent';
|
|
7
|
+
export const DEFAULT_FONT_FAMILY = 'Roboto';
|
|
8
|
+
export const DEFAULT_FONT_SIZE = 14;
|
|
9
|
+
export const DEFAULT_FONT_COLOR = '#000';
|
|
10
|
+
export const HYPERLINK_FONT_COLOR = '#0000EE';
|
|
11
|
+
export const DEFAULT_HEADING_STYLE_ID = 'Default';
|
|
12
|
+
export const HYPERLINK_HEADING_STYLE_ID = 'Hyperlink';
|
|
13
|
+
export const DEFAULT_TEXT_STYLE = new TextStyleModel({
|
|
14
|
+
highlightColor: DEFAULT_BACKGROUND_COLOR,
|
|
15
|
+
bold: false,
|
|
16
|
+
fontColor: DEFAULT_FONT_COLOR,
|
|
17
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
18
|
+
fontSize: DEFAULT_FONT_SIZE,
|
|
19
|
+
headingStyleId: DEFAULT_HEADING_STYLE_ID,
|
|
20
|
+
isSmallCaps: false,
|
|
21
|
+
italic: false,
|
|
22
|
+
strikethrough: false,
|
|
23
|
+
underline: false,
|
|
24
|
+
verticalAlignment: VerticalAlignment.None
|
|
25
|
+
});
|
|
26
|
+
export const DEFAULT_PARAGRAPH_STYLE = new ParagraphStyleModel({
|
|
27
|
+
alignment: Alignment.left,
|
|
28
|
+
backgroundColor: DEFAULT_BACKGROUND_COLOR,
|
|
29
|
+
headingStyleId: DEFAULT_HEADING_STYLE_ID,
|
|
30
|
+
indentFirstLine: 0,
|
|
31
|
+
indentHanging: 0,
|
|
32
|
+
indentLeft: 0,
|
|
33
|
+
indentRight: 0,
|
|
34
|
+
lineSpacing: 1,
|
|
35
|
+
spaceAfter: 0,
|
|
36
|
+
spaceBefore: 0,
|
|
37
|
+
numberingId: null,
|
|
38
|
+
numberingLevel: null,
|
|
39
|
+
contextualSpacing: false,
|
|
40
|
+
beforeAutospacing: false,
|
|
41
|
+
afterAutospacing: false
|
|
42
|
+
});
|
|
43
|
+
export const DEFAULT_HEADINGS = [
|
|
44
|
+
new HeadingModel({
|
|
45
|
+
basedOn: null,
|
|
46
|
+
name: DEFAULT_HEADING_STYLE_ID,
|
|
47
|
+
paragraphStyle: DEFAULT_PARAGRAPH_STYLE,
|
|
48
|
+
styleId: DEFAULT_HEADING_STYLE_ID,
|
|
49
|
+
textStyle: DEFAULT_TEXT_STYLE
|
|
50
|
+
}),
|
|
51
|
+
new HeadingModel({
|
|
52
|
+
basedOn: DEFAULT_HEADING_STYLE_ID,
|
|
53
|
+
name: 'Default Paragraph Font',
|
|
54
|
+
paragraphStyle: DEFAULT_PARAGRAPH_STYLE,
|
|
55
|
+
styleId: 'DefaultParagraphFont',
|
|
56
|
+
textStyle: DEFAULT_TEXT_STYLE
|
|
57
|
+
})
|
|
58
|
+
];
|
|
59
|
+
export const NEW_LINE_MARKUP = '\n';
|
|
60
|
+
export const DEFAULT_TAB_WIDTH = 48;
|
|
61
|
+
export const DEFAULT_EDGE_MAX_HEIGHT_MULTIPLIER = 0.4;
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmNvbnN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvZWRpdG9yL2NvbnRlbnQvY29uc3RhbnRzL2VkaXRvci5jb25zdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDL0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlEQUFpRCxDQUFDO0FBQ3RGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQztBQUM1RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUUvRCxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxhQUFhLENBQUM7QUFDdEQsTUFBTSxDQUFDLE1BQU0sbUJBQW1CLEdBQUcsUUFBUSxDQUFDO0FBQzVDLE1BQU0sQ0FBQyxNQUFNLGlCQUFpQixHQUFHLEVBQUUsQ0FBQztBQUNwQyxNQUFNLENBQU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biAgICB0YWJzOiBUYWJNb2RlbFtdO1xufVxuIl19
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class DisplayToken {
|
|
2
|
+
get breaksLine() {
|
|
3
|
+
return this.isPageBreak || this.isLineBreak;
|
|
4
|
+
}
|
|
5
|
+
constructor(fields) {
|
|
6
|
+
if (!fields) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
Object.assign(this, fields);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGxheS10b2tlbi5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub2Rlci9zcmMvbGliL2VkaXRvci9jb250ZW50L2Rpc3BsYXktZGF0YS9kaXNwbGF5LXRva2VuLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxZQUFZO0lBd0JyQixJQUFJLFVBQVU7UUFDVixPQUFPLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQztJQUNoRCxDQUFDO0lBRUQsWUFBbUIsTUFBOEI7UUFDN0MsSUFBSSxDQUFDLE1BQU0sRUFBRTtZQUNULE9BQU87U0FDVjtRQUVELE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQ2hDLENBQUM7Q0FDSiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IElGb250TWV0cmljU2l6ZSB9IGZyb20gJy4uLy4uL2dhZGdldHMvZm9udC1tZXRyaWNzL2ZvbnQtbWV0cmljLXNpemUuaW50ZXJmYWNlJztcblxuZXhwb3J0IGNsYXNzIERpc3BsYXlUb2tlbiBpbXBsZW1lbnRzIElGb250TWV0cmljU2l6ZSB7XG4gICAgd2lkdGg6IG51bWJlcjtcbiAgICBoZWlnaHQ6IG51bWJlcjtcbiAgICBiYXNlbGluZTogbnVtYmVyO1xuICAgIGNvbnRlbnQ6IG51bWJlcjtcbiAgICBmb250OiBudW1iZXI7XG4gICAgbGluZTogbnVtYmVyO1xuICAgIGxpbmVTcGFjaW5nOiBudW1iZXI7XG4gICAgbXVsdGlwbGllcjogbnVtYmVyO1xuICAgIGFzY2VudDogbnVtYmVyO1xuICAgIGRlc2NlbnQ6IG51bWJlcjtcbiAgICBkaXNwbGF5VmFsdWU6IG51bWJlcjtcbiAgICBhbGlnbjogbnVtYmVyO1xuICAgIGluZGVudEZpcnN0TGluZTogbnVtYmVyO1xuICAgIGluZGVudEhhbmdpbmc6IG51bWJlcjtcbiAgICBpbmRlbnRMZWZ0OiBudW1iZXI7XG4gICAgaW5kZW50UmlnaHQ6IG51bWJlcjtcbiAgICBpbmRlbnRCZWZvcmU6IG51bWJlcjtcbiAgICBpbmRlbnRBZnRlcjogbnVtYmVyO1xuICAgIGlzUGFnZUJyZWFrOiBib29sZWFuO1xuICAgIGlzTGluZUJyZWFrOiBib29sZWFuO1xuICAgIGlzVGFiOiBib29sZWFuO1xuICAgIGlzVGFibGU6IGJvb2xlYW47XG5cbiAgICBnZXQgYnJlYWtzTGluZSgpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuaXNQYWdlQnJlYWsgfHwgdGhpcy5pc0xpbmVCcmVhaztcbiAgICB9XG5cbiAgICBwdWJsaWMgY29uc3RydWN0b3IoZmllbGRzPzogUGFydGlhbDxEaXNwbGF5VG9rZW4+KSB7XG4gICAgICAgIGlmICghZmllbGRzKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBPYmplY3QuYXNzaWduKHRoaXMsIGZpZWxkcyk7XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { BreakTypes } from '../../gadgets/page-break/break-types.enum';
|
|
2
|
+
import { CursorParagraph } from '../../positioning/cursor-paragraph';
|
|
3
|
+
import { DeltaHelper } from '../../execution/helpers/delta.helper';
|
|
4
|
+
import { NEW_LINE_MARKUP } from '../constants/editor.const';
|
|
5
|
+
import { Range } from '../../positioning/range';
|
|
6
|
+
export class Document {
|
|
7
|
+
/**
|
|
8
|
+
* Returns all the lines in the document as a single string, joined by the new line character.
|
|
9
|
+
**/
|
|
10
|
+
get text() {
|
|
11
|
+
return this.lines.join(NEW_LINE_MARKUP);
|
|
12
|
+
}
|
|
13
|
+
get length() {
|
|
14
|
+
return this.lines.length;
|
|
15
|
+
}
|
|
16
|
+
constructor(model, pageMargin, pagesSpace, pageWidth, pageHeight) {
|
|
17
|
+
this.model = model;
|
|
18
|
+
this.pageMargin = pageMargin;
|
|
19
|
+
this.pagesSpace = pagesSpace;
|
|
20
|
+
this.pageWidth = pageWidth;
|
|
21
|
+
this.pageHeight = pageHeight;
|
|
22
|
+
this.lines = [''];
|
|
23
|
+
this.lines = DeltaHelper.splitByParagraphs(this.model.content);
|
|
24
|
+
}
|
|
25
|
+
insertText(position, text) {
|
|
26
|
+
const endPoint = DeltaHelper.insertTextAndReturnEndCursorPosition(this.lines, text, position);
|
|
27
|
+
return endPoint;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Removes the `range` from the document.
|
|
31
|
+
**/
|
|
32
|
+
removeRange(range) {
|
|
33
|
+
DeltaHelper.remove(this.lines, range.start, range.end);
|
|
34
|
+
}
|
|
35
|
+
getLine(lines, index) {
|
|
36
|
+
return lines[index] || '';
|
|
37
|
+
}
|
|
38
|
+
getAllLines() {
|
|
39
|
+
return this.getLines(0, this.getLinesCount());
|
|
40
|
+
}
|
|
41
|
+
getLinesCount() {
|
|
42
|
+
return this.lines.length - 1;
|
|
43
|
+
}
|
|
44
|
+
getLines(firstRow, lastRow) {
|
|
45
|
+
return this.lines.slice(firstRow, lastRow + 1);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns all the text within `range` as an array of lines.
|
|
49
|
+
**/
|
|
50
|
+
getLinesForRange(range) {
|
|
51
|
+
if (range.isSingleLine) {
|
|
52
|
+
const line = this.getLine(this.lines, range.start.row);
|
|
53
|
+
const linePartInRange = line.slice(range.start.column, range.end.column);
|
|
54
|
+
return [linePartInRange];
|
|
55
|
+
}
|
|
56
|
+
const lines = this.getLines(range.start.row, range.end.row);
|
|
57
|
+
lines[0] = (lines[0] || '').slice(range.start.column);
|
|
58
|
+
const lastIndex = lines.length - 1;
|
|
59
|
+
lines[lastIndex] = lines[lastIndex].slice(0, range.end.column);
|
|
60
|
+
return lines;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns all the text within `range` as a single string.
|
|
64
|
+
**/
|
|
65
|
+
getTextRange(range) {
|
|
66
|
+
return this.getLinesForRange(range).join(NEW_LINE_MARKUP);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Converts the position in a document to the character's index.
|
|
70
|
+
*/
|
|
71
|
+
positionToIndex(position, startRow = 0) {
|
|
72
|
+
let index = 0;
|
|
73
|
+
const endRow = Math.min(position.row, this.lines.length);
|
|
74
|
+
for (let i = startRow || 0; i < endRow; i++) {
|
|
75
|
+
index += this.lines[i].length + 1;
|
|
76
|
+
}
|
|
77
|
+
return index + position.column;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Converts an index position in a document to the position.
|
|
81
|
+
* See 'positionToIndex' for more information.
|
|
82
|
+
*/
|
|
83
|
+
indexToPosition(positionIndex, startRow) {
|
|
84
|
+
const newlineLength = NEW_LINE_MARKUP.length;
|
|
85
|
+
for (let lineIndex = startRow || 0; lineIndex < this.lines.length; lineIndex++) {
|
|
86
|
+
positionIndex -= this.lines[lineIndex].length + newlineLength;
|
|
87
|
+
if (positionIndex < 0) {
|
|
88
|
+
const column = positionIndex + this.lines[lineIndex].length + newlineLength;
|
|
89
|
+
return new CursorParagraph(lineIndex, column);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const column = positionIndex + this.lines[this.lines.length - 1].length + newlineLength;
|
|
93
|
+
return new CursorParagraph(this.lines.length - 1, column);
|
|
94
|
+
}
|
|
95
|
+
indexesToRange(startIndex, endIndex) {
|
|
96
|
+
const startPoint = this.indexToPosition(startIndex, 0);
|
|
97
|
+
const endPoint = this.indexToPosition(endIndex, 0);
|
|
98
|
+
return new Range(startPoint, endPoint);
|
|
99
|
+
}
|
|
100
|
+
isNewLineSymbol(index) {
|
|
101
|
+
const text = this.text;
|
|
102
|
+
return !text || !text[index] || text[index] === NEW_LINE_MARKUP;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Converts the selection range in a document to the selected paragraphs indexes (start and end of paragraphs).
|
|
106
|
+
* start/end refers to the "absolute position" of a character in the document.
|
|
107
|
+
*/
|
|
108
|
+
getSelectedParagraphsByRange(range) {
|
|
109
|
+
const newlineLength = NEW_LINE_MARKUP.length;
|
|
110
|
+
let start = 0;
|
|
111
|
+
let end = 0;
|
|
112
|
+
let i;
|
|
113
|
+
const row = Math.min(range.end.row, this.lines.length - 1);
|
|
114
|
+
for (i = 0; i < row; i++) {
|
|
115
|
+
if (i < range.start.row) {
|
|
116
|
+
start += this.lines[i].length + newlineLength;
|
|
117
|
+
}
|
|
118
|
+
end += this.lines[i].length + newlineLength;
|
|
119
|
+
}
|
|
120
|
+
if (i < this.lines.length) {
|
|
121
|
+
end += this.lines[i].length;
|
|
122
|
+
}
|
|
123
|
+
return { start, end };
|
|
124
|
+
}
|
|
125
|
+
getPositionAfterBreak(position, breakType) {
|
|
126
|
+
if (breakType === BreakTypes.TextWrapping) {
|
|
127
|
+
return position;
|
|
128
|
+
}
|
|
129
|
+
const isLastColumn = position.column === this.lines[position.row].length;
|
|
130
|
+
const isLastParagraph = position.row === this.lines.length - 1;
|
|
131
|
+
return isLastColumn && !isLastParagraph ? new CursorParagraph(position.row + 1, 0) : position;
|
|
132
|
+
}
|
|
133
|
+
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lvbi5yb3ddLmxlbmd0aDtcbiAgICAgICAgY29uc3QgaXNMYXN0UGFyYWdyYXBoID0gcG9zaXRpb24ucm93ID09PSB0aGlzLmxpbmVzLmxlbmd0aCAtIDE7XG4gICAgICAgIHJldHVybiBpc0xhc3RDb2x1bW4gJiYgIWlzTGFzdFBhcmFncmFwaCA/IG5ldyBDdXJzb3JQYXJhZ3JhcGgocG9zaXRpb24ucm93ICsgMSwgMCkgOiBwb3NpdGlvbjtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormatModel } from '../../../models/generated/format.model';
|
|
2
|
+
export class FormatExtModel extends FormatModel {
|
|
3
|
+
constructor(fields) {
|
|
4
|
+
super(fields);
|
|
5
|
+
if (fields) {
|
|
6
|
+
Object.assign(this, fields);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0LWV4dC5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub2Rlci9zcmMvbGliL2VkaXRvci9jb250ZW50L2Rpc3BsYXktZGF0YS9mb3JtYXQtZXh0Lm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQztBQUVyRSxNQUFNLE9BQU8sY0FBZSxTQUFRLFdBQVc7SUFHM0MsWUFBWSxNQUFnQztRQUN4QyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUM7UUFFZCxJQUFJLE1BQU0sRUFBRTtZQUNSLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO1NBQy9CO0lBQ0wsQ0FBQztDQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRm9ybWF0TW9kZWwgfSBmcm9tICcuLi8uLi8uLi9tb2RlbHMvZ2VuZXJhdGVkL2Zvcm1hdC5tb2RlbCc7XG5cbmV4cG9ydCBjbGFzcyBGb3JtYXRFeHRNb2RlbCBleHRlbmRzIEZvcm1hdE1vZGVsIHtcbiAgICBjb250ZW50OiBzdHJpbmc7XG5cbiAgICBjb25zdHJ1Y3RvcihmaWVsZHM/OiBQYXJ0aWFsPEZvcm1hdEV4dE1vZGVsPikge1xuICAgICAgICBzdXBlcihmaWVsZHMpO1xuXG4gICAgICAgIGlmIChmaWVsZHMpIHtcbiAgICAgICAgICAgIE9iamVjdC5hc3NpZ24odGhpcywgZmllbGRzKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DEFAULT_TAB_WIDTH } from '../constants/editor.const';
|
|
2
|
+
export class GeneralPropertiesModel {
|
|
3
|
+
constructor(fields) {
|
|
4
|
+
if (!fields) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
fields.defaultTabWidth ??= DEFAULT_TAB_WIDTH;
|
|
8
|
+
Object.assign(this, fields);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhbC1wcm9wZXJ0aWVzLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvZWRpdG9yL2NvbnRlbnQvZGlzcGxheS1kYXRhL2dlbmVyYWwtcHJvcGVydGllcy5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUc5RCxNQUFNLE9BQU8sc0JBQXNCO0lBTS9CLFlBQVksTUFBd0M7UUFDaEQsSUFBSSxDQUFDLE1BQU0sRUFBRTtZQUNULE9BQU87U0FDVjtRQUVELE1BQU0sQ0FBQyxlQUFlLEtBQUssaUJBQWlCLENBQUM7UUFFN0MsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDaEMsQ0FBQztDQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgREVGQVVMVF9UQUJfV0lEVEggfSBmcm9tICcuLi9jb25zdGFudHMvZWRpdG9yLmNvbnN0JztcbmltcG9ydCB7IE51bWJlcmluZ01vZGVsIH0gZnJvbSAnLi4vLi4vLi4vbW9kZWxzL2dlbmVyYXRlZC9udW1iZXJpbmcubW9kZWwnO1xuXG5leHBvcnQgY2xhc3MgR2VuZXJhbFByb3BlcnRpZXNNb2RlbCB7XG4gICAgZGVmYXVsdFRhYldpZHRoOiBudW1iZXI7XG4gICAgbnVtYmVyaW5nczogTnVtYmVyaW5nTW9kZWxbXTtcbiAgICBtYXhFZGdlSGVpZ2h0OiBudW1iZXI7XG4gICAgc2NhbGluZ1JhdGlvOiBudW1iZXI7XG5cbiAgICBjb25zdHJ1Y3RvcihmaWVsZHM/OiBQYXJ0aWFsPEdlbmVyYWxQcm9wZXJ0aWVzTW9kZWw+KSB7XG4gICAgICAgIGlmICghZmllbGRzKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBmaWVsZHMuZGVmYXVsdFRhYldpZHRoID8/PSBERUZBVUxUX1RBQl9XSURUSDtcblxuICAgICAgICBPYmplY3QuYXNzaWduKHRoaXMsIGZpZWxkcyk7XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class IndentModel {
|
|
2
|
+
constructor(firstLine, hanging, left, right) {
|
|
3
|
+
this.firstLine = firstLine;
|
|
4
|
+
this.hanging = hanging;
|
|
5
|
+
this.left = left;
|
|
6
|
+
this.right = right;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZW50Lm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvZWRpdG9yL2NvbnRlbnQvZGlzcGxheS1kYXRhL2luZGVudC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLE9BQU8sV0FBVztJQUNwQixZQUFtQixTQUFpQixFQUFTLE9BQWUsRUFBUyxJQUFZLEVBQVMsS0FBYTtRQUFwRixjQUFTLEdBQVQsU0FBUyxDQUFRO1FBQVMsWUFBTyxHQUFQLE9BQU8sQ0FBUTtRQUFTLFNBQUksR0FBSixJQUFJLENBQVE7UUFBUyxVQUFLLEdBQUwsS0FBSyxDQUFRO0lBQUcsQ0FBQztDQUM5RyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBJbmRlbnRNb2RlbCB7XG4gICAgY29uc3RydWN0b3IocHVibGljIGZpcnN0TGluZTogbnVtYmVyLCBwdWJsaWMgaGFuZ2luZzogbnVtYmVyLCBwdWJsaWMgbGVmdDogbnVtYmVyLCBwdWJsaWMgcmlnaHQ6IG51bWJlcikge31cbn1cbiJdfQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class LineInfoModel {
|
|
2
|
+
constructor(fields) {
|
|
3
|
+
if (!fields) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
Object.assign(this, fields);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1pbmZvLm1vZGVsLmpzIiwic291cmNlUm9vdCI6I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ICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { DocumentInfo } from '../constants/document-info.const';
|
|
2
|
+
import { DomHelper } from '../../execution/helpers/dom.helper';
|
|
3
|
+
export class Lines {
|
|
4
|
+
get length() {
|
|
5
|
+
return this.cells.length;
|
|
6
|
+
}
|
|
7
|
+
get last() {
|
|
8
|
+
return this.cells.length ? this.cells[this.cells.length - 1] : null;
|
|
9
|
+
}
|
|
10
|
+
get pageSize() {
|
|
11
|
+
return this._pageSize || DocumentInfo.height;
|
|
12
|
+
}
|
|
13
|
+
get pagesCount() {
|
|
14
|
+
return this._pagesCount || 1; // default page count
|
|
15
|
+
}
|
|
16
|
+
constructor(element) {
|
|
17
|
+
this.element = element;
|
|
18
|
+
this.cells = [];
|
|
19
|
+
this.cellCache = [];
|
|
20
|
+
this.setContainerSize();
|
|
21
|
+
}
|
|
22
|
+
shift() {
|
|
23
|
+
const cell = this.cells.shift();
|
|
24
|
+
DomHelper.removeElement(cell.element);
|
|
25
|
+
this.cacheCell(cell);
|
|
26
|
+
}
|
|
27
|
+
pop() {
|
|
28
|
+
const cell = this.cells.pop();
|
|
29
|
+
DomHelper.removeElement(cell.element);
|
|
30
|
+
this.cacheCell(cell);
|
|
31
|
+
}
|
|
32
|
+
push(data) {
|
|
33
|
+
if (Array.isArray(data)) {
|
|
34
|
+
this.cells.push(...data);
|
|
35
|
+
const fragment = DomHelper.createFragment(this.element);
|
|
36
|
+
for (const cell of data) {
|
|
37
|
+
fragment.appendChild(cell.element);
|
|
38
|
+
}
|
|
39
|
+
this.element.appendChild(fragment);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.cells.push(data);
|
|
43
|
+
this.element.appendChild(data.element);
|
|
44
|
+
}
|
|
45
|
+
unshift(data) {
|
|
46
|
+
if (Array.isArray(data)) {
|
|
47
|
+
this.cells.unshift(...data);
|
|
48
|
+
const fragment = DomHelper.createFragment(this.element);
|
|
49
|
+
for (const cell of data) {
|
|
50
|
+
fragment.appendChild(cell.element);
|
|
51
|
+
}
|
|
52
|
+
if (this.element.firstChild) {
|
|
53
|
+
this.element.insertBefore(fragment, this.element.firstChild);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.element.appendChild(fragment);
|
|
57
|
+
}
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.cells.unshift(data);
|
|
61
|
+
this.element.insertAdjacentElement('afterbegin', data.element);
|
|
62
|
+
}
|
|
63
|
+
cacheCell(cell) {
|
|
64
|
+
if (!cell) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.cellCache.push(cell);
|
|
68
|
+
}
|
|
69
|
+
createCell(row, page = 0) {
|
|
70
|
+
let cell = this.cellCache.pop();
|
|
71
|
+
if (!cell) {
|
|
72
|
+
const element = document.createElement('div');
|
|
73
|
+
this.element.appendChild(element);
|
|
74
|
+
cell = {
|
|
75
|
+
element,
|
|
76
|
+
row,
|
|
77
|
+
page
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
cell.row = row;
|
|
81
|
+
cell.page = page;
|
|
82
|
+
return cell;
|
|
83
|
+
}
|
|
84
|
+
setSizes(pagesCount, pageHeight) {
|
|
85
|
+
if (this._pageSize === pageHeight && this._pagesCount === pagesCount) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this._pageSize = pageHeight || DocumentInfo.height;
|
|
89
|
+
this._pagesCount = pagesCount;
|
|
90
|
+
this.setContainerSize();
|
|
91
|
+
}
|
|
92
|
+
setContainerSize() {
|
|
93
|
+
this.element.style.height = this.pagesCount * this.pageSize + 'px';
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3J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