@talrace/ngx-noder 0.0.7
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/LICENSE +21 -0
- package/README.md +274 -0
- package/esm2022/lib/+shared/abstract/base-api.service.mjs +99 -0
- package/esm2022/lib/+shared/abstract/observer.component.mjs +24 -0
- package/esm2022/lib/+shared/confirm-dialog/confirm-dialog.component.mjs +28 -0
- package/esm2022/lib/+shared/constants/default-file-name.const.mjs +2 -0
- package/esm2022/lib/+shared/constants/paginator-sizes.const.mjs +3 -0
- package/esm2022/lib/+shared/editor/core/base/event-emitting.mjs +71 -0
- package/esm2022/lib/+shared/editor/core/components/edges/edge-type.enum.mjs +6 -0
- package/esm2022/lib/+shared/editor/core/components/edges/edge.component.mjs +100 -0
- package/esm2022/lib/+shared/editor/core/components/edges/edges.mjs +104 -0
- package/esm2022/lib/+shared/editor/core/constants/alignments.const.mjs +8 -0
- package/esm2022/lib/+shared/editor/core/constants/clipboardEventTypes.const.mjs +6 -0
- package/esm2022/lib/+shared/editor/core/constants/content-style-change.const.mjs +15 -0
- package/esm2022/lib/+shared/editor/core/constants/display-values.const.mjs +8 -0
- package/esm2022/lib/+shared/editor/core/constants/document-info.const.mjs +13 -0
- package/esm2022/lib/+shared/editor/core/constants/editor-version.const.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/constants/editor.const.mjs +62 -0
- package/esm2022/lib/+shared/editor/core/constants/unicode-chars.const.mjs +5 -0
- package/esm2022/lib/+shared/editor/core/document.mjs +134 -0
- package/esm2022/lib/+shared/editor/core/edit.session.mjs +1102 -0
- package/esm2022/lib/+shared/editor/core/editor.mjs +1279 -0
- package/esm2022/lib/+shared/editor/core/enums/break-types.enum.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/enums/hrule.enum.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/enums/mouse-button.enum.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/enums/numbering-marker-type.enum.mjs +12 -0
- package/esm2022/lib/+shared/editor/core/enums/page-type.enum.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/enums/vertical-alignment.enum.mjs +11 -0
- package/esm2022/lib/+shared/editor/core/helpers/content-style.helper.mjs +156 -0
- package/esm2022/lib/+shared/editor/core/helpers/delta.helper.mjs +18 -0
- package/esm2022/lib/+shared/editor/core/helpers/dom.helper.mjs +42 -0
- package/esm2022/lib/+shared/editor/core/helpers/event.helper.mjs +18 -0
- package/esm2022/lib/+shared/editor/core/helpers/font-metrics.helper.mjs +88 -0
- package/esm2022/lib/+shared/editor/core/helpers/format-style.helper.mjs +72 -0
- package/esm2022/lib/+shared/editor/core/helpers/line-width.helper.mjs +13 -0
- package/esm2022/lib/+shared/editor/core/helpers/numbering.helper.mjs +83 -0
- package/esm2022/lib/+shared/editor/core/helpers/page.helper.mjs +12 -0
- package/esm2022/lib/+shared/editor/core/helpers/paragraph-style.helper.mjs +41 -0
- package/esm2022/lib/+shared/editor/core/helpers/paragraph.helper.mjs +132 -0
- package/esm2022/lib/+shared/editor/core/helpers/position.helper.mjs +191 -0
- package/esm2022/lib/+shared/editor/core/helpers/print.rendering.helper.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/helpers/rendering.helper.mjs +186 -0
- package/esm2022/lib/+shared/editor/core/helpers/unicode.helper.mjs +20 -0
- package/esm2022/lib/+shared/editor/core/interfaces/cell.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/cursor-position.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/font-metric-size.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/layer.config.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/paragraph-info.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/render-changes.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/replace.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/search-iteration.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/toolbar-styles.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/visible-line-info.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/interfaces/visible-range.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/core/keyboard/text-input.mjs +53 -0
- package/esm2022/lib/+shared/editor/core/layers/cursor.layer.mjs +103 -0
- package/esm2022/lib/+shared/editor/core/layers/edges.layer.mjs +99 -0
- package/esm2022/lib/+shared/editor/core/layers/lines.mjs +96 -0
- package/esm2022/lib/+shared/editor/core/layers/pages.layer.mjs +106 -0
- package/esm2022/lib/+shared/editor/core/layers/print.edges.layer.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/layers/print.pages.layer.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/layers/print.text.layer.mjs +7 -0
- package/esm2022/lib/+shared/editor/core/layers/renderloop.mjs +26 -0
- package/esm2022/lib/+shared/editor/core/layers/scrollbar.mjs +100 -0
- package/esm2022/lib/+shared/editor/core/layers/selection.layer.mjs +115 -0
- package/esm2022/lib/+shared/editor/core/layers/text.layer.mjs +124 -0
- package/esm2022/lib/+shared/editor/core/models/display-token.model.mjs +12 -0
- package/esm2022/lib/+shared/editor/core/models/distance.model.mjs +10 -0
- package/esm2022/lib/+shared/editor/core/models/edge-element.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/core/models/format-ext.model.mjs +10 -0
- package/esm2022/lib/+shared/editor/core/models/indent.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/core/models/line-info.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/core/models/margin.model.mjs +16 -0
- package/esm2022/lib/+shared/editor/core/models/numbering-data.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/core/models/render-changes.model.mjs +25 -0
- package/esm2022/lib/+shared/editor/core/paging/page-vertical-data.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/core/paging/pages.wrap.mjs +219 -0
- package/esm2022/lib/+shared/editor/core/paging/paragraph.mjs +52 -0
- package/esm2022/lib/+shared/editor/core/paging/text-line-info.mjs +34 -0
- package/esm2022/lib/+shared/editor/core/point.mjs +13 -0
- package/esm2022/lib/+shared/editor/core/print.renderer.mjs +72 -0
- package/esm2022/lib/+shared/editor/core/range.mjs +94 -0
- package/esm2022/lib/+shared/editor/core/renderer.mjs +217 -0
- package/esm2022/lib/+shared/editor/core/search.mjs +231 -0
- package/esm2022/lib/+shared/editor/core/virtual.renderer.mjs +356 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.mjs +35 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-element.service.mjs +6 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-elements.const.mjs +4 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/external.component.mjs +41 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/element-data.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-element.model.mjs +10 -0
- package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.mjs +15 -0
- package/esm2022/lib/+shared/editor/custom-components/image/components/image.component.mjs +87 -0
- package/esm2022/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.mjs +38 -0
- package/esm2022/lib/+shared/editor/custom-components/image/interfaces/size.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/coordinate.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.mjs +19 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction.enum.mjs +12 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/resizer.component.mjs +106 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-delta.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-wrapper.mjs +52 -0
- package/esm2022/lib/+shared/editor/custom-components/image/services/image-api.service.mjs +14 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/abstract/base.component.mjs +57 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.mjs +3 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.mjs +43 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/services/component/component.service.mjs +64 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.mjs +120 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.mjs +55 -0
- package/esm2022/lib/+shared/editor/custom-components/shared/types/custom-content.mjs +2 -0
- package/esm2022/lib/+shared/editor/custom-components/tab/tab.component.mjs +43 -0
- package/esm2022/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.mjs +118 -0
- package/esm2022/lib/+shared/editor/custom-components/table/components/table-cell.component.mjs +95 -0
- package/esm2022/lib/+shared/editor/custom-components/table/components/table.component.mjs +293 -0
- package/esm2022/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.mjs +8 -0
- package/esm2022/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.mjs +6 -0
- package/esm2022/lib/+shared/editor/custom-components/table/models/cell-data.model.mjs +18 -0
- package/esm2022/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.mjs +9 -0
- package/esm2022/lib/+shared/editor/custom-components/table/models/row-data.model.mjs +8 -0
- package/esm2022/lib/+shared/editor/custom-components/table/models/selection-range.model.mjs +7 -0
- package/esm2022/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.mjs +74 -0
- package/esm2022/lib/+shared/editor/custom-components/table/selection/table-selection.mjs +358 -0
- package/esm2022/lib/+shared/editor/editor.component.mjs +103 -0
- package/esm2022/lib/+shared/editor/editor.module.mjs +85 -0
- package/esm2022/lib/+shared/editor/execution/models/cell-session-source.model.mjs +19 -0
- package/esm2022/lib/+shared/editor/execution/models/edge-session-source.model.mjs +15 -0
- package/esm2022/lib/+shared/editor/execution/models/general-properties.model.mjs +11 -0
- package/esm2022/lib/+shared/editor/execution/models/main-session-source.model.mjs +8 -0
- package/esm2022/lib/+shared/editor/execution/models/session-source.model.mjs +3 -0
- package/esm2022/lib/+shared/editor/execution/models/session.model.mjs +10 -0
- package/esm2022/lib/+shared/editor/execution/regulator.service.mjs +193 -0
- package/esm2022/lib/+shared/editor/helpers/break.helper.mjs +18 -0
- package/esm2022/lib/+shared/editor/helpers/content.helper.mjs +30 -0
- package/esm2022/lib/+shared/editor/helpers/format.helper.mjs +23 -0
- package/esm2022/lib/+shared/editor/helpers/indexed-element.helper.mjs +6 -0
- package/esm2022/lib/+shared/editor/helpers/tab.helper.mjs +6 -0
- package/esm2022/lib/+shared/editor/interaction/editor.service.mjs +309 -0
- package/esm2022/lib/+shared/editor/interaction/input.handler.mjs +160 -0
- package/esm2022/lib/+shared/editor/interaction/mouse.handler.mjs +49 -0
- package/esm2022/lib/+shared/editor/interfaces/contents.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/interfaces/insert-index.interface.mjs +2 -0
- package/esm2022/lib/+shared/editor/operation-history/operation-history.mjs +184 -0
- package/esm2022/lib/+shared/editor/operation-history/operation.type.mjs +2 -0
- package/esm2022/lib/+shared/editor/operation-history/operations-history-info.model.mjs +7 -0
- package/esm2022/lib/+shared/editor/operations/enums/command-type.enum.mjs +31 -0
- package/esm2022/lib/+shared/editor/operations/enums/target-type.enum.mjs +7 -0
- package/esm2022/lib/+shared/editor/operations/helpers/break-operations.helper.mjs +9 -0
- package/esm2022/lib/+shared/editor/operations/helpers/content-operations.helper.mjs +15 -0
- package/esm2022/lib/+shared/editor/operations/helpers/format-operations.helper.mjs +56 -0
- package/esm2022/lib/+shared/editor/operations/helpers/image-operations.helper.mjs +19 -0
- package/esm2022/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.mjs +43 -0
- package/esm2022/lib/+shared/editor/operations/helpers/link-operations.helper.mjs +28 -0
- package/esm2022/lib/+shared/editor/operations/helpers/numbering-operations.helper.mjs +55 -0
- package/esm2022/lib/+shared/editor/operations/helpers/operations-helper.helper.mjs +394 -0
- package/esm2022/lib/+shared/editor/operations/helpers/paragraph-operations.helper.mjs +83 -0
- package/esm2022/lib/+shared/editor/operations/helpers/save-commands.helper.mjs +118 -0
- package/esm2022/lib/+shared/editor/operations/helpers/tab-operations.helper.mjs +16 -0
- package/esm2022/lib/+shared/editor/operations/helpers/table-operations.helper.mjs +371 -0
- package/esm2022/lib/+shared/editor/operations/helpers/target-operations.helper.mjs +23 -0
- package/esm2022/lib/+shared/editor/positioning/selection.mjs +307 -0
- package/esm2022/lib/+shared/editor/store/editor.actions.mjs +13 -0
- package/esm2022/lib/+shared/editor-header/editor-header.component.mjs +314 -0
- package/esm2022/lib/+shared/editor-search/editor-search-dialog.component.mjs +71 -0
- package/esm2022/lib/+shared/editor-toolbar/color-picker/color-picker.component.mjs +32 -0
- package/esm2022/lib/+shared/editor-toolbar/constants/numbering-templates.const.mjs +1148 -0
- package/esm2022/lib/+shared/editor-toolbar/constants/svg-icons.const.mjs +157 -0
- package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.component.mjs +115 -0
- package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.module.mjs +107 -0
- package/esm2022/lib/+shared/editor-toolbar/enums/alignment.enum.mjs +8 -0
- package/esm2022/lib/+shared/editor-toolbar/enums/numbering-template-type.enum.mjs +16 -0
- package/esm2022/lib/+shared/editor-toolbar/enums/numbering-type.enum.mjs +6 -0
- package/esm2022/lib/+shared/editor-toolbar/font/font.component.mjs +45 -0
- package/esm2022/lib/+shared/editor-toolbar/font-size/font-size.component.mjs +85 -0
- package/esm2022/lib/+shared/editor-toolbar/font-style/font-style.component.mjs +80 -0
- package/esm2022/lib/+shared/editor-toolbar/format/format.component.mjs +28 -0
- package/esm2022/lib/+shared/editor-toolbar/heading/heading.component.mjs +23 -0
- package/esm2022/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.mjs +55 -0
- package/esm2022/lib/+shared/editor-toolbar/numbering/numbering.component.mjs +53 -0
- package/esm2022/lib/+shared/editor-toolbar/print/print.component.mjs +18 -0
- package/esm2022/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.mjs +27 -0
- package/esm2022/lib/+shared/editor-toolbar/zoom/zoom.component.mjs +74 -0
- package/esm2022/lib/+shared/enums/mode.enum.mjs +7 -0
- package/esm2022/lib/+shared/helpers/print.helper.mjs +40 -0
- package/esm2022/lib/+shared/insert-table/insert-table.component.mjs +54 -0
- package/esm2022/lib/+shared/services/commands.service.mjs +20 -0
- package/esm2022/lib/+shared/services/custom-icon.service.mjs +34 -0
- package/esm2022/lib/models/generated/add-numbering.model.mjs +8 -0
- package/esm2022/lib/models/generated/apply-element-style.model.mjs +8 -0
- package/esm2022/lib/models/generated/apply-image-style.model.mjs +8 -0
- package/esm2022/lib/models/generated/apply-paragraph-style.model.mjs +12 -0
- package/esm2022/lib/models/generated/apply-text-style.model.mjs +12 -0
- package/esm2022/lib/models/generated/borders-style.model.mjs +8 -0
- package/esm2022/lib/models/generated/break.model.mjs +8 -0
- package/esm2022/lib/models/generated/cell.model.mjs +12 -0
- package/esm2022/lib/models/generated/column-section.model.mjs +8 -0
- package/esm2022/lib/models/generated/column.model.mjs +8 -0
- package/esm2022/lib/models/generated/command.model.mjs +116 -0
- package/esm2022/lib/models/generated/delete.model.mjs +8 -0
- package/esm2022/lib/models/generated/document-name.model.mjs +8 -0
- package/esm2022/lib/models/generated/document.model.mjs +8 -0
- package/esm2022/lib/models/generated/docx.model.mjs +12 -0
- package/esm2022/lib/models/generated/edge-target.model.mjs +8 -0
- package/esm2022/lib/models/generated/edge.model.mjs +8 -0
- package/esm2022/lib/models/generated/element.model.mjs +8 -0
- package/esm2022/lib/models/generated/file-source.model.mjs +8 -0
- package/esm2022/lib/models/generated/format.model.mjs +12 -0
- package/esm2022/lib/models/generated/heading.model.mjs +16 -0
- package/esm2022/lib/models/generated/image-data.model.mjs +8 -0
- package/esm2022/lib/models/generated/image.model.mjs +12 -0
- package/esm2022/lib/models/generated/insert-break.model.mjs +8 -0
- package/esm2022/lib/models/generated/insert-element.model.mjs +12 -0
- package/esm2022/lib/models/generated/insert-image.model.mjs +12 -0
- package/esm2022/lib/models/generated/insert-link.model.mjs +12 -0
- package/esm2022/lib/models/generated/insert-styled-text.model.mjs +12 -0
- package/esm2022/lib/models/generated/insert-tab.model.mjs +8 -0
- package/esm2022/lib/models/generated/insert-table-columns.model.mjs +8 -0
- package/esm2022/lib/models/generated/insert-table-rows.model.mjs +8 -0
- package/esm2022/lib/models/generated/insert-table.model.mjs +8 -0
- package/esm2022/lib/models/generated/insert-text.model.mjs +8 -0
- package/esm2022/lib/models/generated/last-document-revision.model.mjs +12 -0
- package/esm2022/lib/models/generated/link-data.model.mjs +8 -0
- package/esm2022/lib/models/generated/link.model.mjs +8 -0
- package/esm2022/lib/models/generated/margins.model.mjs +8 -0
- package/esm2022/lib/models/generated/numbering-level.model.mjs +12 -0
- package/esm2022/lib/models/generated/numbering.model.mjs +8 -0
- package/esm2022/lib/models/generated/operation.model.mjs +12 -0
- package/esm2022/lib/models/generated/page-numbers.model.mjs +8 -0
- package/esm2022/lib/models/generated/paragraph-style.model.mjs +8 -0
- package/esm2022/lib/models/generated/paragraph.model.mjs +12 -0
- package/esm2022/lib/models/generated/remove-numberings.model.mjs +8 -0
- package/esm2022/lib/models/generated/remove-table-columns.model.mjs +8 -0
- package/esm2022/lib/models/generated/remove-table-rows.model.mjs +8 -0
- package/esm2022/lib/models/generated/replace-by-text.model.mjs +8 -0
- package/esm2022/lib/models/generated/replace.model.mjs +40 -0
- package/esm2022/lib/models/generated/resize-table-columns.model.mjs +8 -0
- package/esm2022/lib/models/generated/restore-numberings.model.mjs +8 -0
- package/esm2022/lib/models/generated/restore-paragraph-styles.model.mjs +8 -0
- package/esm2022/lib/models/generated/restore-table.model.mjs +12 -0
- package/esm2022/lib/models/generated/restore-text-styles.model.mjs +8 -0
- package/esm2022/lib/models/generated/restore.model.mjs +8 -0
- package/esm2022/lib/models/generated/revision.model.mjs +12 -0
- package/esm2022/lib/models/generated/row.model.mjs +8 -0
- package/esm2022/lib/models/generated/tab.model.mjs +8 -0
- package/esm2022/lib/models/generated/table-cell.model.mjs +8 -0
- package/esm2022/lib/models/generated/table.model.mjs +12 -0
- package/esm2022/lib/models/generated/target.model.mjs +16 -0
- package/esm2022/lib/models/generated/text-style.model.mjs +8 -0
- package/esm2022/public-api.mjs +43 -0
- package/esm2022/talrace-ngx-noder.mjs +5 -0
- package/fesm2022/talrace-ngx-noder.mjs +13736 -0
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/+shared/abstract/base-api.service.d.ts +23 -0
- package/lib/+shared/abstract/observer.component.d.ts +10 -0
- package/lib/+shared/confirm-dialog/confirm-dialog.component.d.ts +16 -0
- package/lib/+shared/constants/default-file-name.const.d.ts +1 -0
- package/lib/+shared/constants/paginator-sizes.const.d.ts +2 -0
- package/lib/+shared/editor/core/base/event-emitting.d.ts +17 -0
- package/lib/+shared/editor/core/components/edges/edge-type.enum.d.ts +4 -0
- package/lib/+shared/editor/core/components/edges/edge.component.d.ts +45 -0
- package/lib/+shared/editor/core/components/edges/edges.d.ts +26 -0
- package/lib/+shared/editor/core/constants/alignments.const.d.ts +7 -0
- package/lib/+shared/editor/core/constants/clipboardEventTypes.const.d.ts +5 -0
- package/lib/+shared/editor/core/constants/content-style-change.const.d.ts +14 -0
- package/lib/+shared/editor/core/constants/display-values.const.d.ts +7 -0
- package/lib/+shared/editor/core/constants/document-info.const.d.ts +12 -0
- package/lib/+shared/editor/core/constants/editor-version.const.d.ts +1 -0
- package/lib/+shared/editor/core/constants/editor.const.d.ts +16 -0
- package/lib/+shared/editor/core/constants/unicode-chars.const.d.ts +1 -0
- package/lib/+shared/editor/core/document.d.ts +56 -0
- package/lib/+shared/editor/core/edit.session.d.ts +159 -0
- package/lib/+shared/editor/core/editor.d.ts +206 -0
- package/lib/+shared/editor/core/enums/break-types.enum.d.ts +5 -0
- package/lib/+shared/editor/core/enums/hrule.enum.d.ts +5 -0
- package/lib/+shared/editor/core/enums/mouse-button.enum.d.ts +5 -0
- package/lib/+shared/editor/core/enums/numbering-marker-type.enum.d.ts +10 -0
- package/lib/+shared/editor/core/enums/page-type.enum.d.ts +5 -0
- package/lib/+shared/editor/core/enums/vertical-alignment.enum.d.ts +9 -0
- package/lib/+shared/editor/core/helpers/content-style.helper.d.ts +16 -0
- package/lib/+shared/editor/core/helpers/delta.helper.d.ts +6 -0
- package/lib/+shared/editor/core/helpers/dom.helper.d.ts +10 -0
- package/lib/+shared/editor/core/helpers/event.helper.d.ts +4 -0
- package/lib/+shared/editor/core/helpers/font-metrics.helper.d.ts +32 -0
- package/lib/+shared/editor/core/helpers/format-style.helper.d.ts +11 -0
- package/lib/+shared/editor/core/helpers/line-width.helper.d.ts +5 -0
- package/lib/+shared/editor/core/helpers/numbering.helper.d.ts +19 -0
- package/lib/+shared/editor/core/helpers/page.helper.d.ts +4 -0
- package/lib/+shared/editor/core/helpers/paragraph-style.helper.d.ts +6 -0
- package/lib/+shared/editor/core/helpers/paragraph.helper.d.ts +27 -0
- package/lib/+shared/editor/core/helpers/position.helper.d.ts +34 -0
- package/lib/+shared/editor/core/helpers/print.rendering.helper.d.ts +6 -0
- package/lib/+shared/editor/core/helpers/rendering.helper.d.ts +26 -0
- package/lib/+shared/editor/core/helpers/unicode.helper.d.ts +4 -0
- package/lib/+shared/editor/core/interfaces/cell.interface.d.ts +5 -0
- package/lib/+shared/editor/core/interfaces/cursor-position.interface.d.ts +11 -0
- package/lib/+shared/editor/core/interfaces/font-metric-size.interface.d.ts +11 -0
- package/lib/+shared/editor/core/interfaces/layer.config.d.ts +13 -0
- package/lib/+shared/editor/core/interfaces/paragraph-info.interface.d.ts +7 -0
- package/lib/+shared/editor/core/interfaces/render-changes.interface.d.ts +10 -0
- package/lib/+shared/editor/core/interfaces/replace.interface.d.ts +4 -0
- package/lib/+shared/editor/core/interfaces/search-iteration.interface.d.ts +4 -0
- package/lib/+shared/editor/core/interfaces/toolbar-styles.interface.d.ts +18 -0
- package/lib/+shared/editor/core/interfaces/visible-line-info.interface.d.ts +5 -0
- package/lib/+shared/editor/core/interfaces/visible-range.interface.d.ts +11 -0
- package/lib/+shared/editor/core/keyboard/text-input.d.ts +10 -0
- package/lib/+shared/editor/core/layers/cursor.layer.d.ts +24 -0
- package/lib/+shared/editor/core/layers/edges.layer.d.ts +24 -0
- package/lib/+shared/editor/core/layers/lines.d.ts +21 -0
- package/lib/+shared/editor/core/layers/pages.layer.d.ts +27 -0
- package/lib/+shared/editor/core/layers/print.edges.layer.d.ts +4 -0
- package/lib/+shared/editor/core/layers/print.pages.layer.d.ts +4 -0
- package/lib/+shared/editor/core/layers/print.text.layer.d.ts +5 -0
- package/lib/+shared/editor/core/layers/renderloop.d.ts +8 -0
- package/lib/+shared/editor/core/layers/scrollbar.d.ts +41 -0
- package/lib/+shared/editor/core/layers/selection.layer.d.ts +19 -0
- package/lib/+shared/editor/core/layers/text.layer.d.ts +22 -0
- package/lib/+shared/editor/core/models/display-token.model.d.ts +27 -0
- package/lib/+shared/editor/core/models/distance.model.d.ts +6 -0
- package/lib/+shared/editor/core/models/edge-element.model.d.ts +7 -0
- package/lib/+shared/editor/core/models/format-ext.model.d.ts +5 -0
- package/lib/+shared/editor/core/models/indent.model.d.ts +7 -0
- package/lib/+shared/editor/core/models/line-info.model.d.ts +14 -0
- package/lib/+shared/editor/core/models/margin.model.d.ts +9 -0
- package/lib/+shared/editor/core/models/numbering-data.model.d.ts +11 -0
- package/lib/+shared/editor/core/models/render-changes.model.d.ts +14 -0
- package/lib/+shared/editor/core/paging/page-vertical-data.model.d.ts +8 -0
- package/lib/+shared/editor/core/paging/pages.wrap.d.ts +41 -0
- package/lib/+shared/editor/core/paging/paragraph.d.ts +44 -0
- package/lib/+shared/editor/core/paging/text-line-info.d.ts +17 -0
- package/lib/+shared/editor/core/point.d.ts +7 -0
- package/lib/+shared/editor/core/print.renderer.d.ts +25 -0
- package/lib/+shared/editor/core/range.d.ts +32 -0
- package/lib/+shared/editor/core/renderer.d.ts +60 -0
- package/lib/+shared/editor/core/search.d.ts +32 -0
- package/lib/+shared/editor/core/virtual.renderer.d.ts +93 -0
- package/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.d.ts +14 -0
- package/lib/+shared/editor/custom-components/external-element/external-element.service.d.ts +7 -0
- package/lib/+shared/editor/custom-components/external-element/external-elements.const.d.ts +5 -0
- package/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.d.ts +5 -0
- package/lib/+shared/editor/custom-components/external-element/external.component.d.ts +17 -0
- package/lib/+shared/editor/custom-components/external-element/models/element-data.model.d.ts +7 -0
- package/lib/+shared/editor/custom-components/external-element/models/external-element.model.d.ts +20 -0
- package/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.d.ts +7 -0
- package/lib/+shared/editor/custom-components/image/components/image.component.d.ts +31 -0
- package/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.d.ts +13 -0
- package/lib/+shared/editor/custom-components/image/interfaces/size.d.ts +4 -0
- package/lib/+shared/editor/custom-components/image/resizer/coordinate.d.ts +4 -0
- package/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.d.ts +9 -0
- package/lib/+shared/editor/custom-components/image/resizer/direction.enum.d.ts +10 -0
- package/lib/+shared/editor/custom-components/image/resizer/resizer.component.d.ts +26 -0
- package/lib/+shared/editor/custom-components/image/resizer/size-delta.d.ts +4 -0
- package/lib/+shared/editor/custom-components/image/resizer/size-wrapper.d.ts +19 -0
- package/lib/+shared/editor/custom-components/image/services/image-api.service.d.ts +8 -0
- package/lib/+shared/editor/custom-components/shared/abstract/base.component.d.ts +24 -0
- package/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.d.ts +2 -0
- package/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.d.ts +8 -0
- package/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.d.ts +13 -0
- package/lib/+shared/editor/custom-components/shared/services/component/component.service.d.ts +21 -0
- package/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.d.ts +30 -0
- package/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.d.ts +18 -0
- package/lib/+shared/editor/custom-components/shared/types/custom-content.d.ts +5 -0
- package/lib/+shared/editor/custom-components/tab/tab.component.d.ts +15 -0
- package/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.d.ts +31 -0
- package/lib/+shared/editor/custom-components/table/components/table-cell.component.d.ts +45 -0
- package/lib/+shared/editor/custom-components/table/components/table.component.d.ts +55 -0
- package/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.d.ts +6 -0
- package/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.d.ts +4 -0
- package/lib/+shared/editor/custom-components/table/models/cell-data.model.d.ts +11 -0
- package/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.d.ts +9 -0
- package/lib/+shared/editor/custom-components/table/models/row-data.model.d.ts +7 -0
- package/lib/+shared/editor/custom-components/table/models/selection-range.model.d.ts +17 -0
- package/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.d.ts +37 -0
- package/lib/+shared/editor/custom-components/table/selection/table-selection.d.ts +74 -0
- package/lib/+shared/editor/editor.component.d.ts +43 -0
- package/lib/+shared/editor/editor.module.d.ts +30 -0
- package/lib/+shared/editor/execution/models/cell-session-source.model.d.ts +11 -0
- package/lib/+shared/editor/execution/models/edge-session-source.model.d.ts +11 -0
- package/lib/+shared/editor/execution/models/general-properties.model.d.ts +7 -0
- package/lib/+shared/editor/execution/models/main-session-source.model.d.ts +5 -0
- package/lib/+shared/editor/execution/models/session-source.model.d.ts +5 -0
- package/lib/+shared/editor/execution/models/session.model.d.ts +12 -0
- package/lib/+shared/editor/execution/regulator.service.d.ts +45 -0
- package/lib/+shared/editor/helpers/break.helper.d.ts +7 -0
- package/lib/+shared/editor/helpers/content.helper.d.ts +9 -0
- package/lib/+shared/editor/helpers/format.helper.d.ts +4 -0
- package/lib/+shared/editor/helpers/indexed-element.helper.d.ts +4 -0
- package/lib/+shared/editor/helpers/tab.helper.d.ts +3 -0
- package/lib/+shared/editor/interaction/editor.service.d.ts +194 -0
- package/lib/+shared/editor/interaction/input.handler.d.ts +25 -0
- package/lib/+shared/editor/interaction/mouse.handler.d.ts +14 -0
- package/lib/+shared/editor/interfaces/contents.interface.d.ts +22 -0
- package/lib/+shared/editor/interfaces/insert-index.interface.d.ts +3 -0
- package/lib/+shared/editor/operation-history/operation-history.d.ts +65 -0
- package/lib/+shared/editor/operation-history/operation.type.d.ts +24 -0
- package/lib/+shared/editor/operation-history/operations-history-info.model.d.ts +5 -0
- package/lib/+shared/editor/operations/enums/command-type.enum.d.ts +29 -0
- package/lib/+shared/editor/operations/enums/target-type.enum.d.ts +5 -0
- package/lib/+shared/editor/operations/helpers/break-operations.helper.d.ts +5 -0
- package/lib/+shared/editor/operations/helpers/content-operations.helper.d.ts +5 -0
- package/lib/+shared/editor/operations/helpers/format-operations.helper.d.ts +11 -0
- package/lib/+shared/editor/operations/helpers/image-operations.helper.d.ts +7 -0
- package/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.d.ts +8 -0
- package/lib/+shared/editor/operations/helpers/link-operations.helper.d.ts +6 -0
- package/lib/+shared/editor/operations/helpers/numbering-operations.helper.d.ts +11 -0
- package/lib/+shared/editor/operations/helpers/operations-helper.helper.d.ts +52 -0
- package/lib/+shared/editor/operations/helpers/paragraph-operations.helper.d.ts +13 -0
- package/lib/+shared/editor/operations/helpers/save-commands.helper.d.ts +43 -0
- package/lib/+shared/editor/operations/helpers/tab-operations.helper.d.ts +4 -0
- package/lib/+shared/editor/operations/helpers/table-operations.helper.d.ts +30 -0
- package/lib/+shared/editor/operations/helpers/target-operations.helper.d.ts +6 -0
- package/lib/+shared/editor/positioning/selection.d.ts +50 -0
- package/lib/+shared/editor/store/editor.actions.d.ts +11 -0
- package/lib/+shared/editor-header/editor-header.component.d.ts +101 -0
- package/lib/+shared/editor-search/editor-search-dialog.component.d.ts +24 -0
- package/lib/+shared/editor-toolbar/color-picker/color-picker.component.d.ts +12 -0
- package/lib/+shared/editor-toolbar/constants/numbering-templates.const.d.ts +6 -0
- package/lib/+shared/editor-toolbar/constants/svg-icons.const.d.ts +12 -0
- package/lib/+shared/editor-toolbar/editor-toolbar.component.d.ts +44 -0
- package/lib/+shared/editor-toolbar/editor-toolbar.module.d.ts +28 -0
- package/lib/+shared/editor-toolbar/enums/alignment.enum.d.ts +6 -0
- package/lib/+shared/editor-toolbar/enums/numbering-template-type.enum.d.ts +14 -0
- package/lib/+shared/editor-toolbar/enums/numbering-type.enum.d.ts +4 -0
- package/lib/+shared/editor-toolbar/font/font.component.d.ts +13 -0
- package/lib/+shared/editor-toolbar/font-size/font-size.component.d.ts +24 -0
- package/lib/+shared/editor-toolbar/font-style/font-style.component.d.ts +24 -0
- package/lib/+shared/editor-toolbar/format/format.component.d.ts +12 -0
- package/lib/+shared/editor-toolbar/heading/heading.component.d.ts +8 -0
- package/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.d.ts +6 -0
- package/lib/+shared/editor-toolbar/numbering/numbering.component.d.ts +18 -0
- package/lib/+shared/editor-toolbar/print/print.component.d.ts +7 -0
- package/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.d.ts +10 -0
- package/lib/+shared/editor-toolbar/zoom/zoom.component.d.ts +22 -0
- package/lib/+shared/enums/mode.enum.d.ts +5 -0
- package/lib/+shared/helpers/print.helper.d.ts +9 -0
- package/lib/+shared/insert-table/insert-table.component.d.ts +21 -0
- package/lib/+shared/services/commands.service.d.ts +10 -0
- package/lib/+shared/services/custom-icon.service.d.ts +11 -0
- package/lib/models/generated/add-numbering.model.d.ts +7 -0
- package/lib/models/generated/apply-element-style.model.d.ts +6 -0
- package/lib/models/generated/apply-image-style.model.d.ts +6 -0
- package/lib/models/generated/apply-paragraph-style.model.d.ts +7 -0
- package/lib/models/generated/apply-text-style.model.d.ts +7 -0
- package/lib/models/generated/borders-style.model.d.ts +8 -0
- package/lib/models/generated/break.model.d.ts +5 -0
- package/lib/models/generated/cell.model.d.ts +32 -0
- package/lib/models/generated/column-section.model.d.ts +7 -0
- package/lib/models/generated/column.model.d.ts +5 -0
- package/lib/models/generated/command.model.d.ts +60 -0
- package/lib/models/generated/delete.model.d.ts +5 -0
- package/lib/models/generated/document-name.model.d.ts +5 -0
- package/lib/models/generated/document.model.d.ts +7 -0
- package/lib/models/generated/docx.model.d.ts +43 -0
- package/lib/models/generated/edge-target.model.d.ts +5 -0
- package/lib/models/generated/edge.model.d.ts +24 -0
- package/lib/models/generated/element.model.d.ts +9 -0
- package/lib/models/generated/file-source.model.d.ts +4 -0
- package/lib/models/generated/format.model.d.ts +7 -0
- package/lib/models/generated/heading.model.d.ts +12 -0
- package/lib/models/generated/image-data.model.d.ts +6 -0
- package/lib/models/generated/image.model.d.ts +31 -0
- package/lib/models/generated/insert-break.model.d.ts +6 -0
- package/lib/models/generated/insert-element.model.d.ts +5 -0
- package/lib/models/generated/insert-image.model.d.ts +6 -0
- package/lib/models/generated/insert-link.model.d.ts +7 -0
- package/lib/models/generated/insert-styled-text.model.d.ts +7 -0
- package/lib/models/generated/insert-tab.model.d.ts +4 -0
- package/lib/models/generated/insert-table-columns.model.d.ts +7 -0
- package/lib/models/generated/insert-table-rows.model.d.ts +7 -0
- package/lib/models/generated/insert-table.model.d.ts +8 -0
- package/lib/models/generated/insert-text.model.d.ts +5 -0
- package/lib/models/generated/last-document-revision.model.d.ts +9 -0
- package/lib/models/generated/link-data.model.d.ts +5 -0
- package/lib/models/generated/link.model.d.ts +7 -0
- package/lib/models/generated/margins.model.d.ts +7 -0
- package/lib/models/generated/numbering-level.model.d.ts +14 -0
- package/lib/models/generated/numbering.model.d.ts +7 -0
- package/lib/models/generated/operation.model.d.ts +8 -0
- package/lib/models/generated/page-numbers.model.d.ts +8 -0
- package/lib/models/generated/paragraph-style.model.d.ts +18 -0
- package/lib/models/generated/paragraph.model.d.ts +6 -0
- package/lib/models/generated/remove-numberings.model.d.ts +5 -0
- package/lib/models/generated/remove-table-columns.model.d.ts +6 -0
- package/lib/models/generated/remove-table-rows.model.d.ts +6 -0
- package/lib/models/generated/replace-by-text.model.d.ts +6 -0
- package/lib/models/generated/replace.model.d.ts +19 -0
- package/lib/models/generated/resize-table-columns.model.d.ts +9 -0
- package/lib/models/generated/restore-numberings.model.d.ts +7 -0
- package/lib/models/generated/restore-paragraph-styles.model.d.ts +5 -0
- package/lib/models/generated/restore-table.model.d.ts +6 -0
- package/lib/models/generated/restore-text-styles.model.d.ts +5 -0
- package/lib/models/generated/restore.model.d.ts +22 -0
- package/lib/models/generated/revision.model.d.ts +9 -0
- package/lib/models/generated/row.model.d.ts +9 -0
- package/lib/models/generated/tab.model.d.ts +6 -0
- package/lib/models/generated/table-cell.model.d.ts +6 -0
- package/lib/models/generated/table.model.d.ts +18 -0
- package/lib/models/generated/target.model.d.ts +9 -0
- package/lib/models/generated/text-style.model.d.ts +14 -0
- package/package.json +35 -0
- package/public-api.d.ts +42 -0
- package/src/_ngx-noder.theme.scss +22 -0
- package/src/assets/fonts/nc-iconfont.css +333 -0
- package/src/assets/fonts/nc-iconfont.eot +0 -0
- package/src/assets/fonts/nc-iconfont.svg +110 -0
- package/src/assets/fonts/nc-iconfont.ttf +0 -0
- package/src/assets/fonts/nc-iconfont.woff +0 -0
- package/src/lib/+shared/add-link-dialog/_add-link-dialog.theme.scss +21 -0
- package/src/lib/+shared/editor/_editor.theme.scss +35 -0
- package/src/lib/+shared/editor/custom-components/external-element/element-toolbar/_element-toolbar.theme.scss +10 -0
- package/src/lib/+shared/editor-header/_editor-header.theme.scss +106 -0
- package/src/lib/+shared/editor-toolbar/_editor-toolbar.theme.scss +33 -0
- package/src/lib/+shared/editor-toolbar/numbering/_numbering.theme.scss +29 -0
- package/src/lib/+shared/insert-table/_insert-table.theme.scss +22 -0
- package/src/styles.scss +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 TALRACE
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# NgxNoder
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Rich Text Editor for Angular with basic WORD features and ability to create and use your own custom components. The package also provides customizable toolbar, header, custom search in editor and basic interfaces of custom components which you can overwrite to suit your needs in your application.\
|
|
6
|
+
#### You can get information about the API and more NgxNoder examples from the [documentation].
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Run this command to add ngx-noder package to your project
|
|
11
|
+
```console
|
|
12
|
+
npm i @talrace/ngx-noder
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Editor
|
|
16
|
+
|
|
17
|
+
Import editor module. This is basic module and provides creating, editing and viewing document functionality.
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { EditorModule } from '@talrace/ngx-noder';
|
|
21
|
+
|
|
22
|
+
@NgModule({
|
|
23
|
+
// ...
|
|
24
|
+
imports: [EditorModule],
|
|
25
|
+
// ...
|
|
26
|
+
})
|
|
27
|
+
export class SomeModule{}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If you need save your changes in document, you need provide CommandsService in your module. This service provides passing commands from the editor to your application for further saving and applying them to your document.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { CommandsService } from '@talrace/ngx-noder';
|
|
34
|
+
|
|
35
|
+
@NgModule({
|
|
36
|
+
// ...
|
|
37
|
+
provides: [CommandsService],
|
|
38
|
+
// ...
|
|
39
|
+
})
|
|
40
|
+
export class SomeModule{}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Editor Toolbar
|
|
44
|
+
|
|
45
|
+
Import editor toolbar module, if you need toolbar for your editor. This module provides ready-made toolbar with buttons that covers all basic logic of the document content editing functionality.
|
|
46
|
+
```typescript
|
|
47
|
+
import { EditorToolbarModule } from '@talrace/ngx-noder';
|
|
48
|
+
|
|
49
|
+
@NgModule({
|
|
50
|
+
// ...
|
|
51
|
+
imports: [EditorToolbarModule],
|
|
52
|
+
// ...
|
|
53
|
+
})
|
|
54
|
+
export class SomeModule{}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Editor Header
|
|
58
|
+
|
|
59
|
+
Import standalone editor header component, if you need header for your editor. This component provides editor header component with buttons that contains basic functional with document and part of the document content editing functionality.
|
|
60
|
+
```typescript
|
|
61
|
+
import { EditorHeaderComponent } from '@talrace/ngx-noder';
|
|
62
|
+
|
|
63
|
+
@NgModule({
|
|
64
|
+
// ...
|
|
65
|
+
imports: [EditorHeaderComponent],
|
|
66
|
+
// ...
|
|
67
|
+
})
|
|
68
|
+
export class SomeModule{}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Editor Search
|
|
72
|
+
|
|
73
|
+
Import standalone editor search component, if you need custom search in your editor. This component provides custom search component and search and replace functionality in editor.
|
|
74
|
+
```typescript
|
|
75
|
+
import { EditorSearchDialogComponent } from '@talrace/ngx-noder';
|
|
76
|
+
|
|
77
|
+
@NgModule({
|
|
78
|
+
// ...
|
|
79
|
+
imports: [EditorSearchDialogComponent],
|
|
80
|
+
// ...
|
|
81
|
+
})
|
|
82
|
+
export class SomeModule{}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Editor Service
|
|
86
|
+
|
|
87
|
+
Provide Editor Service in your component with editor if you need to send commands to editor or gets some document status data. This service provides functionality of send data or commands to the editor and receive document state data or document interaction mode
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { EditorService } from '@talrace/ngx-noder';
|
|
91
|
+
|
|
92
|
+
@NgModule({
|
|
93
|
+
// ...
|
|
94
|
+
provides: [EditorService],
|
|
95
|
+
// ...
|
|
96
|
+
})
|
|
97
|
+
export class SomeModule {}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Usage
|
|
101
|
+
|
|
102
|
+
Example of full-featured NgxNoder with toolbar, header, custom search and receiving commands from editor.
|
|
103
|
+
|
|
104
|
+
app.module.ts
|
|
105
|
+
```typescript
|
|
106
|
+
import { NgModule } from '@angular/core';
|
|
107
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
108
|
+
import { AppComponent } from './app.component';
|
|
109
|
+
import {
|
|
110
|
+
EditorHeaderComponent,
|
|
111
|
+
EditorModule,
|
|
112
|
+
EditorSearchDialogComponent,
|
|
113
|
+
EditorToolbarModule
|
|
114
|
+
} from '@talrace/ngx-noder';
|
|
115
|
+
|
|
116
|
+
@NgModule({
|
|
117
|
+
declarations: [AppComponent],
|
|
118
|
+
imports: [
|
|
119
|
+
BrowserModule,
|
|
120
|
+
EditorHeaderComponent,
|
|
121
|
+
EditorModule,
|
|
122
|
+
EditorSearchDialogComponent,
|
|
123
|
+
EditorToolbarModule
|
|
124
|
+
],
|
|
125
|
+
providers: [CommandsService],
|
|
126
|
+
bootstrap: [AppComponent]
|
|
127
|
+
})
|
|
128
|
+
export class AppModule{}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
app.component.html
|
|
132
|
+
```html
|
|
133
|
+
<app-editor-header
|
|
134
|
+
[title]="title"
|
|
135
|
+
[isViewOnly]="isViewOnly$ | async"
|
|
136
|
+
(openFileFromDisk)="onConvertFile($event)"
|
|
137
|
+
(addCustomElement)="addCustomElement($event)"
|
|
138
|
+
(insertPageBreak)="onInsertPageBreak()"
|
|
139
|
+
(createDocument)="createDocument()"
|
|
140
|
+
(changeMode)="onModeChanged($event.value)"
|
|
141
|
+
(saveAs)="onSave()"
|
|
142
|
+
(print)="onPrint()"
|
|
143
|
+
(insertImage)="onInsertImage($event)"
|
|
144
|
+
(renameDocumentTitle)="onRenameDocumentTitle($event)"></app-editor-header>
|
|
145
|
+
<app-editor-toolbar
|
|
146
|
+
[isViewOnly]="isViewOnly$ | async"
|
|
147
|
+
[styles]="styles$ | async"
|
|
148
|
+
[historyInfo]="historyInfo$ | async"
|
|
149
|
+
(changeParagraphStyle)="onSetParagraphStyle($event)"
|
|
150
|
+
(changeTextStyle)="onSetTextStyle($event)"
|
|
151
|
+
(setNumberingTemplateType)="onSetNumberingTemplateType($event)"
|
|
152
|
+
(removeNumberings)="onRemoveNumberings()"
|
|
153
|
+
(undo)="onUndo()"
|
|
154
|
+
(redo)="onRedo()"></app-editor-toolbar>
|
|
155
|
+
<app-editor
|
|
156
|
+
#editor
|
|
157
|
+
[content]="content$ | async"></app-editor>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
app.component.ts
|
|
161
|
+
```typescript
|
|
162
|
+
import { Store } from '@ngxs/store';
|
|
163
|
+
import { BehaviorSubject, filter, Observable, Subscription, take, tap } from 'rxjs';
|
|
164
|
+
import {
|
|
165
|
+
BreakTypes,
|
|
166
|
+
CommandsService,
|
|
167
|
+
DEFAULT_FILE_NAME,
|
|
168
|
+
DocxModel,
|
|
169
|
+
EditorComponent,
|
|
170
|
+
EditorSearchDialogComponent,
|
|
171
|
+
EditorService,
|
|
172
|
+
ElementDataModel,
|
|
173
|
+
Mode,
|
|
174
|
+
NumberingLevelModel,
|
|
175
|
+
RevisionHelper,
|
|
176
|
+
TextStyleModel
|
|
177
|
+
} from '@talrace/ngx-noder';
|
|
178
|
+
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
179
|
+
|
|
180
|
+
import { CreateOperation } from "../../store/operations/operations.actions";
|
|
181
|
+
import { NoderState } from '../../store/noder/noder.state';
|
|
182
|
+
import { ObserverComponent } from '../../../+shared/abstract/observer.component';
|
|
183
|
+
|
|
184
|
+
@Component({
|
|
185
|
+
selector: 'app-root',
|
|
186
|
+
templateUrl: './app.component.html',
|
|
187
|
+
styleUrls: ['./app.component.scss']
|
|
188
|
+
})
|
|
189
|
+
export class AppComponent extends ObserverComponent implements OnInit {
|
|
190
|
+
isViewOnly$: Observable<boolean>;
|
|
191
|
+
|
|
192
|
+
documentId: number;
|
|
193
|
+
|
|
194
|
+
get content$(): Observable<DocxModel> {
|
|
195
|
+
return this._content$.asObservable();
|
|
196
|
+
}
|
|
197
|
+
private _content$ = new BehaviorSubject<DocxModel>(RevisionHelper.getEmptyDocxModel());
|
|
198
|
+
|
|
199
|
+
@ViewChild('editor', { static: true }) editor: EditorComponent;
|
|
200
|
+
|
|
201
|
+
constructor(
|
|
202
|
+
private editorService: EditorService,
|
|
203
|
+
private store: Store,
|
|
204
|
+
private commandService: CommandsService
|
|
205
|
+
) {
|
|
206
|
+
super();
|
|
207
|
+
const mode: Mode = this.store.selectSnapshot(NoderState.mode);
|
|
208
|
+
this.editorService.setIsViewOnly(mode !== Mode.Edit);
|
|
209
|
+
this.isViewOnly$ = this.editorService.isViewOnly$;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
ngOnInit() {
|
|
213
|
+
this.subscriptions.push(
|
|
214
|
+
this.createCommandSubscription()
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
onPrint(): void {
|
|
219
|
+
this.editor.printDocument();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
onInsertPageBreak(): void {
|
|
223
|
+
this.editorService.insertBreak(BreakTypes.Page);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
onSetTextStyle(value: TextStyleModel): void {
|
|
227
|
+
this.editorService.setTextStyles(value);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
onSetNumberingTemplateType(value: NumberingLevelModel[]): void {
|
|
231
|
+
this.editorService.setNumberingTemplateType(value);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
addCustomElement(model: ElementDataModel): void {
|
|
235
|
+
this.editorService.createCustomComponent(model);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
onUndo(): void {
|
|
239
|
+
this.editorService.undo();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
private onOpenSearch(): void {
|
|
243
|
+
this.dialog.open(EditorSearchDialogComponent, {
|
|
244
|
+
position: { top: '0px', right: '0px' },
|
|
245
|
+
hasBackdrop: false
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
private createCommandSubscription(): Subscription {
|
|
250
|
+
return this.commandService.createCommand$
|
|
251
|
+
.pipe(
|
|
252
|
+
filter(x => !!x),
|
|
253
|
+
tap(command => {
|
|
254
|
+
this.store.dispatch(new CreateOperation(command));
|
|
255
|
+
})
|
|
256
|
+
)
|
|
257
|
+
.subscribe()
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
app.component.scss
|
|
263
|
+
```scss
|
|
264
|
+
// styles of your app component
|
|
265
|
+
:host {
|
|
266
|
+
height: inherit;
|
|
267
|
+
width: 100%;
|
|
268
|
+
display: flex;
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
overflow: hidden;
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
[documentation]: https://npmjs.talrace.com/text/ngx-noder
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { catchError, finalize, map, share } from 'rxjs/operators';
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
4
|
+
import { throwError } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/common/http";
|
|
7
|
+
import * as i2 from "@ngxs/store";
|
|
8
|
+
export class BaseApiService {
|
|
9
|
+
constructor(http, store) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
this.store = store;
|
|
12
|
+
this.apiRelativePath = '/api/';
|
|
13
|
+
this._inFlight = {};
|
|
14
|
+
}
|
|
15
|
+
handleError(response) {
|
|
16
|
+
console.error(`${response.status} - ${response.statusText || response.error}`);
|
|
17
|
+
return throwError(() => response);
|
|
18
|
+
}
|
|
19
|
+
httpGet(url, ctor, headers = null, useApiRelativePath = true) {
|
|
20
|
+
if (this._inFlight[url.toLowerCase()]) {
|
|
21
|
+
return this._inFlight[url.toLowerCase()];
|
|
22
|
+
}
|
|
23
|
+
const request = this.http
|
|
24
|
+
.get(useApiRelativePath ? `${this.apiRelativePath}${url}` : url, { observe: 'response', headers: this.getHeaders(headers) })
|
|
25
|
+
.pipe(map((res) => this.mapType(res, ctor)), share(), catchError((error) => this.handleError(error)), finalize(() => this.clearInFlight(url)));
|
|
26
|
+
this._inFlight[url.toLowerCase()] = request;
|
|
27
|
+
return request;
|
|
28
|
+
}
|
|
29
|
+
httpGetBlob(url) {
|
|
30
|
+
if (this._inFlight[url.toLowerCase()]) {
|
|
31
|
+
return this._inFlight[url.toLowerCase()];
|
|
32
|
+
}
|
|
33
|
+
return this.http.get(`${this.apiRelativePath}${url}`, {
|
|
34
|
+
responseType: 'blob',
|
|
35
|
+
headers: this.getHeaders()
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
httpPost(url, ctor, data = null, headers = null, useApiRelativePath = true) {
|
|
39
|
+
const request = this.http
|
|
40
|
+
.post(useApiRelativePath ? this.apiRelativePath + url : url, data, {
|
|
41
|
+
observe: 'response',
|
|
42
|
+
headers: this.getHeaders(headers)
|
|
43
|
+
})
|
|
44
|
+
.pipe(map((res) => this.mapType(res, ctor)), share(), catchError((error) => this.handleError(error)));
|
|
45
|
+
return request;
|
|
46
|
+
}
|
|
47
|
+
httpPostFile(url, file) {
|
|
48
|
+
const formData = new FormData();
|
|
49
|
+
formData.set('file', file);
|
|
50
|
+
return this.httpPost(url, x => x, formData);
|
|
51
|
+
}
|
|
52
|
+
httpPut(url, ctor, data = null, headers = null) {
|
|
53
|
+
const request = this.http
|
|
54
|
+
.put(this.apiRelativePath + url, data, { observe: 'response', headers: this.getHeaders(headers) })
|
|
55
|
+
.pipe(map((res) => this.mapType(res, ctor)), share(), catchError((error) => this.handleError(error)));
|
|
56
|
+
return request;
|
|
57
|
+
}
|
|
58
|
+
httpDelete(url, id, ctor, headers = null) {
|
|
59
|
+
const path = id ? this.apiRelativePath + url + '/' + id : this.apiRelativePath + url;
|
|
60
|
+
const request = this.http
|
|
61
|
+
.delete(path, {
|
|
62
|
+
observe: 'response',
|
|
63
|
+
headers: this.getHeaders(headers)
|
|
64
|
+
})
|
|
65
|
+
.pipe(map((res) => this.mapType(res, ctor)), share());
|
|
66
|
+
request.subscribe({ error: (error) => this.handleError(error) });
|
|
67
|
+
return request;
|
|
68
|
+
}
|
|
69
|
+
getHeaders(headers = null) {
|
|
70
|
+
if (!headers) {
|
|
71
|
+
headers = new HttpHeaders();
|
|
72
|
+
}
|
|
73
|
+
return headers.set('require-user', 'true');
|
|
74
|
+
}
|
|
75
|
+
clearInFlight(url) {
|
|
76
|
+
if (this._inFlight[url.toLowerCase()]) {
|
|
77
|
+
delete this._inFlight[url.toLowerCase()];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
mapType(res, ctor) {
|
|
81
|
+
const val = res.status === 204 ? null : res.body;
|
|
82
|
+
if (val === null) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
if (val === '[]') {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
if (Array.isArray(val)) {
|
|
89
|
+
return val.map(x => ctor(x));
|
|
90
|
+
}
|
|
91
|
+
return ctor(val);
|
|
92
|
+
}
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BaseApiService, deps: [{ token: i1.HttpClient }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
94
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: BaseApiService, ngImport: i0 }); }
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BaseApiService, decorators: [{
|
|
97
|
+
type: Directive
|
|
98
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.Store }] });
|
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1hcGkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub2Rlci9zcmMvbGliLytzaGFyZWQvYWJzdHJhY3QvYmFzZS1hcGkuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxHQUFHLEVBQU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T09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHZhbCA9PT0gJ1tdJykge1xuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB9XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbCkpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWwubWFwKHggPT4gY3Rvcih4KSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGN0b3IodmFsKTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ObserverComponent {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.subscriptions = [];
|
|
6
|
+
}
|
|
7
|
+
ngOnDestroy() {
|
|
8
|
+
this.clearSubscriptions();
|
|
9
|
+
}
|
|
10
|
+
clearSubscriptions() {
|
|
11
|
+
while (this.subscriptions.length) {
|
|
12
|
+
const s = this.subscriptions.shift();
|
|
13
|
+
if (s && s.unsubscribe) {
|
|
14
|
+
s.unsubscribe();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ObserverComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: ObserverComponent, ngImport: i0 }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ObserverComponent, decorators: [{
|
|
22
|
+
type: Directive
|
|
23
|
+
}] });
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzZXJ2ZXIuY29tcG9uZW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Z09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5jbGVhclN1YnNjcmlwdGlvbnMoKTtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgY2xlYXJTdWJzY3JpcHRpb25zKCk6IHZvaWQge1xuICAgICAgICB3aGlsZSAodGhpcy5zdWJzY3JpcHRpb25zLmxlbmd0aCkge1xuICAgICAgICAgICAgY29uc3QgcyA9IHRoaXMuc3Vic2NyaXB0aW9ucy5zaGlmdCgpO1xuICAgICAgICAgICAgaWYgKHMgJiYgcy51bnN1YnNjcmliZSkge1xuICAgICAgICAgICAgICAgIHMudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Inject } from '@angular/core';
|
|
3
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
4
|
+
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
5
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/material/dialog";
|
|
8
|
+
import * as i2 from "@angular/material/button";
|
|
9
|
+
import * as i3 from "@angular/material/icon";
|
|
10
|
+
export class ConfirmDialogComponent {
|
|
11
|
+
constructor(data, ref) {
|
|
12
|
+
this.data = data;
|
|
13
|
+
this.ref = ref;
|
|
14
|
+
}
|
|
15
|
+
onClose(status) {
|
|
16
|
+
this.ref.close(status);
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ConfirmDialogComponent, isStandalone: true, selector: "app-confirm-dialog", ngImport: i0, template: "<p class=\"title\">{{ data.title ? data.title : 'Confirmation' }}</p>\n<div class=\"content\">\n <p>{{ data.message }}</p>\n</div>\n<div class=\"actions\">\n <button\n id=\"confirm-dialog-cancel-btn\"\n mat-button\n (click)=\"onClose(false)\">\n <mat-icon\n fontSet=\"nc-icon\"\n fontIcon=\"icon-cancel-thin\"></mat-icon>\n {{ data.cancel ? data.cancel : 'Cancel' }}\n </button>\n <button\n id=\"confirm-dialog-confirm-btn\"\n mat-raised-button\n class=\"delete-btn\"\n color=\"primary\"\n (click)=\"onClose(true)\">\n <mat-icon\n fontSet=\"nc-icon\"\n fontIcon=\"icon-done-thin\"></mat-icon>\n {{ data.confirm ? data.confirm : 'Delete' }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-width:400px;max-width:440px;min-height:208px}.title{font-size:18px;font-weight:700;text-transform:capitalize;padding:24px 24px 12px;margin:0}.content{display:flex;flex:1;font-size:16px;line-height:20px;padding:20px 24px 16px}.content p{margin:0;overflow:hidden;text-overflow:ellipsis}.actions{display:flex;justify-content:center;margin-bottom:24px;gap:8px}.actions button{height:40px;width:120px}.actions button mat-icon{font-size:24px;height:24px;width:24px}.actions button .mat-button-toggle-label-content{padding:0 2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ standalone: true, imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule], selector: 'app-confirm-dialog', template: "<p class=\"title\">{{ data.title ? data.title : 'Confirmation' }}</p>\n<div class=\"content\">\n <p>{{ data.message }}</p>\n</div>\n<div class=\"actions\">\n <button\n id=\"confirm-dialog-cancel-btn\"\n mat-button\n (click)=\"onClose(false)\">\n <mat-icon\n fontSet=\"nc-icon\"\n fontIcon=\"icon-cancel-thin\"></mat-icon>\n {{ data.cancel ? data.cancel : 'Cancel' }}\n </button>\n <button\n id=\"confirm-dialog-confirm-btn\"\n mat-raised-button\n class=\"delete-btn\"\n color=\"primary\"\n (click)=\"onClose(true)\">\n <mat-icon\n fontSet=\"nc-icon\"\n fontIcon=\"icon-done-thin\"></mat-icon>\n {{ data.confirm ? data.confirm : 'Delete' }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-width:400px;max-width:440px;min-height:208px}.title{font-size:18px;font-weight:700;text-transform:capitalize;padding:24px 24px 12px;margin:0}.content{display:flex;flex:1;font-size:16px;line-height:20px;padding:20px 24px 16px}.content p{margin:0;overflow:hidden;text-overflow:ellipsis}.actions{display:flex;justify-content:center;margin-bottom:24px;gap:8px}.actions button{height:40px;width:120px}.actions button mat-icon{font-size:24px;height:24px;width:24px}.actions button .mat-button-toggle-label-content{padding:0 2px}\n"] }]
|
|
24
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
25
|
+
type: Inject,
|
|
26
|
+
args: [MAT_DIALOG_DATA]
|
|
27
|
+
}] }, { type: i1.MatDialogRef }] });
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvK3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AgICAgIDxtYXQtaWNvblxuICAgICAgICAgICAgZm9udFNldD1cIm5jLWljb25cIlxuICAgICAgICAgICAgZm9udEljb249XCJpY29uLWRvbmUtdGhpblwiPjwvbWF0LWljb24+XG4gICAgICAgIHt7IGRhdGEuY29uZmlybSA/IGRhdGEuY29uZmlybSA6ICdEZWxldGUnIH19XG4gICAgPC9idXR0b24+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const DEFAULT_FILE_NAME = 'Untitled document';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC1maWxlLW5hbWUuY29uc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2NvbnN0YW50cy9kZWZhdWx0LWZpbGUtbmFtZS5jb25zdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxpQkFBaUIsR0FBRyxtQkFBbUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBERUZBVUxUX0ZJTEVfTkFNRSA9ICdVbnRpdGxlZCBkb2N1bWVudCc7XG4iXX0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const PaginatorSizes = [5, 10, 20, 50];
|
|
2
|
+
export const DefaultPageSize = 20;
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdG9yLXNpemVzLmNvbnN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvK3NoYXJlZC9jb25zdGFudHMvcGFnaW5hdG9yLXNpemVzLmNvbnN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxDQUFDLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBRTlDLE1BQU0sQ0FBQyxNQUFNLGVBQWUsR0FBRyxFQUFFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgUGFnaW5hdG9yU2l6ZXMgPSBbNSwgMTAsIDIwLCA1MF07XG5cbmV4cG9ydCBjb25zdCBEZWZhdWx0UGFnZVNpemUgPSAyMDtcbiJdfQ==
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export class EventEmitting {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.eventRegistry = {};
|
|
4
|
+
this.defaultHandlers = {};
|
|
5
|
+
}
|
|
6
|
+
addEventListener(eventName, callback, toStart = false) {
|
|
7
|
+
this.eventRegistry[eventName] ??= [];
|
|
8
|
+
const listeners = this.eventRegistry[eventName];
|
|
9
|
+
if (listeners.includes(callback)) {
|
|
10
|
+
return callback;
|
|
11
|
+
}
|
|
12
|
+
if (toStart) {
|
|
13
|
+
listeners.unshift(callback);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
listeners.push(callback);
|
|
17
|
+
}
|
|
18
|
+
return callback;
|
|
19
|
+
}
|
|
20
|
+
removeEventListener(eventName, callback) {
|
|
21
|
+
if (!this.eventRegistry[eventName]) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const index = this.eventRegistry[eventName].indexOf(callback);
|
|
25
|
+
if (index < 0) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.eventRegistry[eventName].splice(index, 1);
|
|
29
|
+
}
|
|
30
|
+
emit(eventName, data) {
|
|
31
|
+
const listeners = this.eventRegistry[eventName]?.slice() || [];
|
|
32
|
+
const defaultHandler = this.defaultHandlers[eventName];
|
|
33
|
+
if (!listeners.length && !defaultHandler) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
data ??= {};
|
|
37
|
+
data['type'] ??= eventName;
|
|
38
|
+
for (const listener of listeners) {
|
|
39
|
+
listener(data, this);
|
|
40
|
+
}
|
|
41
|
+
if (!defaultHandler) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
defaultHandler(data, this);
|
|
45
|
+
}
|
|
46
|
+
signal(eventName, data) {
|
|
47
|
+
const listeners = this.eventRegistry[eventName]?.slice() || [];
|
|
48
|
+
if (!listeners.length) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
for (const listener of listeners) {
|
|
52
|
+
listener(data, this);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
setDefaultHandler(eventName, callback) {
|
|
56
|
+
this.defaultHandlers[eventName] = callback;
|
|
57
|
+
}
|
|
58
|
+
removeDefaultHandler(eventName) {
|
|
59
|
+
if (!this.defaultHandlers || !this.defaultHandlers[eventName]) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
delete this.defaultHandlers[eventName];
|
|
63
|
+
}
|
|
64
|
+
removeAllListeners(eventName) {
|
|
65
|
+
if (!this.eventRegistry[eventName] || !this.eventRegistry[eventName].length) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.eventRegistry[eventName] = [];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtZW1pdHRpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2VkaXRvci9jb3JlL2Jhc2UvZXZlbnQtZW1pdHRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFnQixhQ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0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgZGVsZXRlIHRoaXMuZGVmYXVsdEhhbmRsZXJzW2V2ZW50TmFtZV07XG4gICAgfVxuXG4gICAgcmVtb3ZlQWxsTGlzdGVuZXJzKGV2ZW50TmFtZTogc3RyaW5nKTogdm9pZCB7XG4gICAgICAgIGlmICghdGhpcy5ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gfHwgIXRoaXMuZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSBbXTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var EdgeType;
|
|
2
|
+
(function (EdgeType) {
|
|
3
|
+
EdgeType[EdgeType["Header"] = 0] = "Header";
|
|
4
|
+
EdgeType[EdgeType["Footer"] = 1] = "Footer";
|
|
5
|
+
})(EdgeType || (EdgeType = {}));
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRnZS10eXBlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2VkaXRvci9jb3JlL2NvbXBvbmVudHMvZWRnZXMvZWRnZS10eXBlLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksUUFHWDtBQUhELFdBQVksUUFBUTtJQUNoQiwyQ0FBTSxDQUFBO0lBQ04sMkNBQU0sQ0FBQTtBQUNWLENBQUMsRUFIVyxRQUFRLEtBQVIsUUFBUSxRQUduQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIEVkZ2VUeXBlIHtcbiAgICBIZWFkZXIsXG4gICAgRm9vdGVyXG59XG4iXX0=
|