@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.
Files changed (515) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +274 -0
  3. package/esm2022/lib/+shared/abstract/base-api.service.mjs +99 -0
  4. package/esm2022/lib/+shared/abstract/observer.component.mjs +24 -0
  5. package/esm2022/lib/+shared/confirm-dialog/confirm-dialog.component.mjs +28 -0
  6. package/esm2022/lib/+shared/constants/default-file-name.const.mjs +2 -0
  7. package/esm2022/lib/+shared/constants/paginator-sizes.const.mjs +3 -0
  8. package/esm2022/lib/+shared/editor/core/base/event-emitting.mjs +71 -0
  9. package/esm2022/lib/+shared/editor/core/components/edges/edge-type.enum.mjs +6 -0
  10. package/esm2022/lib/+shared/editor/core/components/edges/edge.component.mjs +100 -0
  11. package/esm2022/lib/+shared/editor/core/components/edges/edges.mjs +104 -0
  12. package/esm2022/lib/+shared/editor/core/constants/alignments.const.mjs +8 -0
  13. package/esm2022/lib/+shared/editor/core/constants/clipboardEventTypes.const.mjs +6 -0
  14. package/esm2022/lib/+shared/editor/core/constants/content-style-change.const.mjs +15 -0
  15. package/esm2022/lib/+shared/editor/core/constants/display-values.const.mjs +8 -0
  16. package/esm2022/lib/+shared/editor/core/constants/document-info.const.mjs +13 -0
  17. package/esm2022/lib/+shared/editor/core/constants/editor-version.const.mjs +2 -0
  18. package/esm2022/lib/+shared/editor/core/constants/editor.const.mjs +62 -0
  19. package/esm2022/lib/+shared/editor/core/constants/unicode-chars.const.mjs +5 -0
  20. package/esm2022/lib/+shared/editor/core/document.mjs +134 -0
  21. package/esm2022/lib/+shared/editor/core/edit.session.mjs +1102 -0
  22. package/esm2022/lib/+shared/editor/core/editor.mjs +1279 -0
  23. package/esm2022/lib/+shared/editor/core/enums/break-types.enum.mjs +7 -0
  24. package/esm2022/lib/+shared/editor/core/enums/hrule.enum.mjs +7 -0
  25. package/esm2022/lib/+shared/editor/core/enums/mouse-button.enum.mjs +7 -0
  26. package/esm2022/lib/+shared/editor/core/enums/numbering-marker-type.enum.mjs +12 -0
  27. package/esm2022/lib/+shared/editor/core/enums/page-type.enum.mjs +7 -0
  28. package/esm2022/lib/+shared/editor/core/enums/vertical-alignment.enum.mjs +11 -0
  29. package/esm2022/lib/+shared/editor/core/helpers/content-style.helper.mjs +156 -0
  30. package/esm2022/lib/+shared/editor/core/helpers/delta.helper.mjs +18 -0
  31. package/esm2022/lib/+shared/editor/core/helpers/dom.helper.mjs +42 -0
  32. package/esm2022/lib/+shared/editor/core/helpers/event.helper.mjs +18 -0
  33. package/esm2022/lib/+shared/editor/core/helpers/font-metrics.helper.mjs +88 -0
  34. package/esm2022/lib/+shared/editor/core/helpers/format-style.helper.mjs +72 -0
  35. package/esm2022/lib/+shared/editor/core/helpers/line-width.helper.mjs +13 -0
  36. package/esm2022/lib/+shared/editor/core/helpers/numbering.helper.mjs +83 -0
  37. package/esm2022/lib/+shared/editor/core/helpers/page.helper.mjs +12 -0
  38. package/esm2022/lib/+shared/editor/core/helpers/paragraph-style.helper.mjs +41 -0
  39. package/esm2022/lib/+shared/editor/core/helpers/paragraph.helper.mjs +132 -0
  40. package/esm2022/lib/+shared/editor/core/helpers/position.helper.mjs +191 -0
  41. package/esm2022/lib/+shared/editor/core/helpers/print.rendering.helper.mjs +7 -0
  42. package/esm2022/lib/+shared/editor/core/helpers/rendering.helper.mjs +186 -0
  43. package/esm2022/lib/+shared/editor/core/helpers/unicode.helper.mjs +20 -0
  44. package/esm2022/lib/+shared/editor/core/interfaces/cell.interface.mjs +2 -0
  45. package/esm2022/lib/+shared/editor/core/interfaces/cursor-position.interface.mjs +2 -0
  46. package/esm2022/lib/+shared/editor/core/interfaces/font-metric-size.interface.mjs +2 -0
  47. package/esm2022/lib/+shared/editor/core/interfaces/layer.config.mjs +2 -0
  48. package/esm2022/lib/+shared/editor/core/interfaces/paragraph-info.interface.mjs +2 -0
  49. package/esm2022/lib/+shared/editor/core/interfaces/render-changes.interface.mjs +2 -0
  50. package/esm2022/lib/+shared/editor/core/interfaces/replace.interface.mjs +2 -0
  51. package/esm2022/lib/+shared/editor/core/interfaces/search-iteration.interface.mjs +2 -0
  52. package/esm2022/lib/+shared/editor/core/interfaces/toolbar-styles.interface.mjs +2 -0
  53. package/esm2022/lib/+shared/editor/core/interfaces/visible-line-info.interface.mjs +2 -0
  54. package/esm2022/lib/+shared/editor/core/interfaces/visible-range.interface.mjs +2 -0
  55. package/esm2022/lib/+shared/editor/core/keyboard/text-input.mjs +53 -0
  56. package/esm2022/lib/+shared/editor/core/layers/cursor.layer.mjs +103 -0
  57. package/esm2022/lib/+shared/editor/core/layers/edges.layer.mjs +99 -0
  58. package/esm2022/lib/+shared/editor/core/layers/lines.mjs +96 -0
  59. package/esm2022/lib/+shared/editor/core/layers/pages.layer.mjs +106 -0
  60. package/esm2022/lib/+shared/editor/core/layers/print.edges.layer.mjs +7 -0
  61. package/esm2022/lib/+shared/editor/core/layers/print.pages.layer.mjs +7 -0
  62. package/esm2022/lib/+shared/editor/core/layers/print.text.layer.mjs +7 -0
  63. package/esm2022/lib/+shared/editor/core/layers/renderloop.mjs +26 -0
  64. package/esm2022/lib/+shared/editor/core/layers/scrollbar.mjs +100 -0
  65. package/esm2022/lib/+shared/editor/core/layers/selection.layer.mjs +115 -0
  66. package/esm2022/lib/+shared/editor/core/layers/text.layer.mjs +124 -0
  67. package/esm2022/lib/+shared/editor/core/models/display-token.model.mjs +12 -0
  68. package/esm2022/lib/+shared/editor/core/models/distance.model.mjs +10 -0
  69. package/esm2022/lib/+shared/editor/core/models/edge-element.model.mjs +9 -0
  70. package/esm2022/lib/+shared/editor/core/models/format-ext.model.mjs +10 -0
  71. package/esm2022/lib/+shared/editor/core/models/indent.model.mjs +9 -0
  72. package/esm2022/lib/+shared/editor/core/models/line-info.model.mjs +9 -0
  73. package/esm2022/lib/+shared/editor/core/models/margin.model.mjs +16 -0
  74. package/esm2022/lib/+shared/editor/core/models/numbering-data.model.mjs +9 -0
  75. package/esm2022/lib/+shared/editor/core/models/render-changes.model.mjs +25 -0
  76. package/esm2022/lib/+shared/editor/core/paging/page-vertical-data.model.mjs +9 -0
  77. package/esm2022/lib/+shared/editor/core/paging/pages.wrap.mjs +219 -0
  78. package/esm2022/lib/+shared/editor/core/paging/paragraph.mjs +52 -0
  79. package/esm2022/lib/+shared/editor/core/paging/text-line-info.mjs +34 -0
  80. package/esm2022/lib/+shared/editor/core/point.mjs +13 -0
  81. package/esm2022/lib/+shared/editor/core/print.renderer.mjs +72 -0
  82. package/esm2022/lib/+shared/editor/core/range.mjs +94 -0
  83. package/esm2022/lib/+shared/editor/core/renderer.mjs +217 -0
  84. package/esm2022/lib/+shared/editor/core/search.mjs +231 -0
  85. package/esm2022/lib/+shared/editor/core/virtual.renderer.mjs +356 -0
  86. package/esm2022/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.mjs +35 -0
  87. package/esm2022/lib/+shared/editor/custom-components/external-element/external-element.service.mjs +6 -0
  88. package/esm2022/lib/+shared/editor/custom-components/external-element/external-elements.const.mjs +4 -0
  89. package/esm2022/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.mjs +2 -0
  90. package/esm2022/lib/+shared/editor/custom-components/external-element/external.component.mjs +41 -0
  91. package/esm2022/lib/+shared/editor/custom-components/external-element/models/element-data.model.mjs +9 -0
  92. package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-element.model.mjs +10 -0
  93. package/esm2022/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.mjs +15 -0
  94. package/esm2022/lib/+shared/editor/custom-components/image/components/image.component.mjs +87 -0
  95. package/esm2022/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.mjs +38 -0
  96. package/esm2022/lib/+shared/editor/custom-components/image/interfaces/size.mjs +2 -0
  97. package/esm2022/lib/+shared/editor/custom-components/image/resizer/coordinate.mjs +2 -0
  98. package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.mjs +19 -0
  99. package/esm2022/lib/+shared/editor/custom-components/image/resizer/direction.enum.mjs +12 -0
  100. package/esm2022/lib/+shared/editor/custom-components/image/resizer/resizer.component.mjs +106 -0
  101. package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-delta.mjs +2 -0
  102. package/esm2022/lib/+shared/editor/custom-components/image/resizer/size-wrapper.mjs +52 -0
  103. package/esm2022/lib/+shared/editor/custom-components/image/services/image-api.service.mjs +14 -0
  104. package/esm2022/lib/+shared/editor/custom-components/shared/abstract/base.component.mjs +57 -0
  105. package/esm2022/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.mjs +3 -0
  106. package/esm2022/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.mjs +43 -0
  107. package/esm2022/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.mjs +2 -0
  108. package/esm2022/lib/+shared/editor/custom-components/shared/services/component/component.service.mjs +64 -0
  109. package/esm2022/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.mjs +120 -0
  110. package/esm2022/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.mjs +55 -0
  111. package/esm2022/lib/+shared/editor/custom-components/shared/types/custom-content.mjs +2 -0
  112. package/esm2022/lib/+shared/editor/custom-components/tab/tab.component.mjs +43 -0
  113. package/esm2022/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.mjs +118 -0
  114. package/esm2022/lib/+shared/editor/custom-components/table/components/table-cell.component.mjs +95 -0
  115. package/esm2022/lib/+shared/editor/custom-components/table/components/table.component.mjs +293 -0
  116. package/esm2022/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.mjs +8 -0
  117. package/esm2022/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.mjs +6 -0
  118. package/esm2022/lib/+shared/editor/custom-components/table/models/cell-data.model.mjs +18 -0
  119. package/esm2022/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.mjs +9 -0
  120. package/esm2022/lib/+shared/editor/custom-components/table/models/row-data.model.mjs +8 -0
  121. package/esm2022/lib/+shared/editor/custom-components/table/models/selection-range.model.mjs +7 -0
  122. package/esm2022/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.mjs +74 -0
  123. package/esm2022/lib/+shared/editor/custom-components/table/selection/table-selection.mjs +358 -0
  124. package/esm2022/lib/+shared/editor/editor.component.mjs +103 -0
  125. package/esm2022/lib/+shared/editor/editor.module.mjs +85 -0
  126. package/esm2022/lib/+shared/editor/execution/models/cell-session-source.model.mjs +19 -0
  127. package/esm2022/lib/+shared/editor/execution/models/edge-session-source.model.mjs +15 -0
  128. package/esm2022/lib/+shared/editor/execution/models/general-properties.model.mjs +11 -0
  129. package/esm2022/lib/+shared/editor/execution/models/main-session-source.model.mjs +8 -0
  130. package/esm2022/lib/+shared/editor/execution/models/session-source.model.mjs +3 -0
  131. package/esm2022/lib/+shared/editor/execution/models/session.model.mjs +10 -0
  132. package/esm2022/lib/+shared/editor/execution/regulator.service.mjs +193 -0
  133. package/esm2022/lib/+shared/editor/helpers/break.helper.mjs +18 -0
  134. package/esm2022/lib/+shared/editor/helpers/content.helper.mjs +30 -0
  135. package/esm2022/lib/+shared/editor/helpers/format.helper.mjs +23 -0
  136. package/esm2022/lib/+shared/editor/helpers/indexed-element.helper.mjs +6 -0
  137. package/esm2022/lib/+shared/editor/helpers/tab.helper.mjs +6 -0
  138. package/esm2022/lib/+shared/editor/interaction/editor.service.mjs +309 -0
  139. package/esm2022/lib/+shared/editor/interaction/input.handler.mjs +160 -0
  140. package/esm2022/lib/+shared/editor/interaction/mouse.handler.mjs +49 -0
  141. package/esm2022/lib/+shared/editor/interfaces/contents.interface.mjs +2 -0
  142. package/esm2022/lib/+shared/editor/interfaces/insert-index.interface.mjs +2 -0
  143. package/esm2022/lib/+shared/editor/operation-history/operation-history.mjs +184 -0
  144. package/esm2022/lib/+shared/editor/operation-history/operation.type.mjs +2 -0
  145. package/esm2022/lib/+shared/editor/operation-history/operations-history-info.model.mjs +7 -0
  146. package/esm2022/lib/+shared/editor/operations/enums/command-type.enum.mjs +31 -0
  147. package/esm2022/lib/+shared/editor/operations/enums/target-type.enum.mjs +7 -0
  148. package/esm2022/lib/+shared/editor/operations/helpers/break-operations.helper.mjs +9 -0
  149. package/esm2022/lib/+shared/editor/operations/helpers/content-operations.helper.mjs +15 -0
  150. package/esm2022/lib/+shared/editor/operations/helpers/format-operations.helper.mjs +56 -0
  151. package/esm2022/lib/+shared/editor/operations/helpers/image-operations.helper.mjs +19 -0
  152. package/esm2022/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.mjs +43 -0
  153. package/esm2022/lib/+shared/editor/operations/helpers/link-operations.helper.mjs +28 -0
  154. package/esm2022/lib/+shared/editor/operations/helpers/numbering-operations.helper.mjs +55 -0
  155. package/esm2022/lib/+shared/editor/operations/helpers/operations-helper.helper.mjs +394 -0
  156. package/esm2022/lib/+shared/editor/operations/helpers/paragraph-operations.helper.mjs +83 -0
  157. package/esm2022/lib/+shared/editor/operations/helpers/save-commands.helper.mjs +118 -0
  158. package/esm2022/lib/+shared/editor/operations/helpers/tab-operations.helper.mjs +16 -0
  159. package/esm2022/lib/+shared/editor/operations/helpers/table-operations.helper.mjs +371 -0
  160. package/esm2022/lib/+shared/editor/operations/helpers/target-operations.helper.mjs +23 -0
  161. package/esm2022/lib/+shared/editor/positioning/selection.mjs +307 -0
  162. package/esm2022/lib/+shared/editor/store/editor.actions.mjs +13 -0
  163. package/esm2022/lib/+shared/editor-header/editor-header.component.mjs +314 -0
  164. package/esm2022/lib/+shared/editor-search/editor-search-dialog.component.mjs +71 -0
  165. package/esm2022/lib/+shared/editor-toolbar/color-picker/color-picker.component.mjs +32 -0
  166. package/esm2022/lib/+shared/editor-toolbar/constants/numbering-templates.const.mjs +1148 -0
  167. package/esm2022/lib/+shared/editor-toolbar/constants/svg-icons.const.mjs +157 -0
  168. package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.component.mjs +115 -0
  169. package/esm2022/lib/+shared/editor-toolbar/editor-toolbar.module.mjs +107 -0
  170. package/esm2022/lib/+shared/editor-toolbar/enums/alignment.enum.mjs +8 -0
  171. package/esm2022/lib/+shared/editor-toolbar/enums/numbering-template-type.enum.mjs +16 -0
  172. package/esm2022/lib/+shared/editor-toolbar/enums/numbering-type.enum.mjs +6 -0
  173. package/esm2022/lib/+shared/editor-toolbar/font/font.component.mjs +45 -0
  174. package/esm2022/lib/+shared/editor-toolbar/font-size/font-size.component.mjs +85 -0
  175. package/esm2022/lib/+shared/editor-toolbar/font-style/font-style.component.mjs +80 -0
  176. package/esm2022/lib/+shared/editor-toolbar/format/format.component.mjs +28 -0
  177. package/esm2022/lib/+shared/editor-toolbar/heading/heading.component.mjs +23 -0
  178. package/esm2022/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.mjs +55 -0
  179. package/esm2022/lib/+shared/editor-toolbar/numbering/numbering.component.mjs +53 -0
  180. package/esm2022/lib/+shared/editor-toolbar/print/print.component.mjs +18 -0
  181. package/esm2022/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.mjs +27 -0
  182. package/esm2022/lib/+shared/editor-toolbar/zoom/zoom.component.mjs +74 -0
  183. package/esm2022/lib/+shared/enums/mode.enum.mjs +7 -0
  184. package/esm2022/lib/+shared/helpers/print.helper.mjs +40 -0
  185. package/esm2022/lib/+shared/insert-table/insert-table.component.mjs +54 -0
  186. package/esm2022/lib/+shared/services/commands.service.mjs +20 -0
  187. package/esm2022/lib/+shared/services/custom-icon.service.mjs +34 -0
  188. package/esm2022/lib/models/generated/add-numbering.model.mjs +8 -0
  189. package/esm2022/lib/models/generated/apply-element-style.model.mjs +8 -0
  190. package/esm2022/lib/models/generated/apply-image-style.model.mjs +8 -0
  191. package/esm2022/lib/models/generated/apply-paragraph-style.model.mjs +12 -0
  192. package/esm2022/lib/models/generated/apply-text-style.model.mjs +12 -0
  193. package/esm2022/lib/models/generated/borders-style.model.mjs +8 -0
  194. package/esm2022/lib/models/generated/break.model.mjs +8 -0
  195. package/esm2022/lib/models/generated/cell.model.mjs +12 -0
  196. package/esm2022/lib/models/generated/column-section.model.mjs +8 -0
  197. package/esm2022/lib/models/generated/column.model.mjs +8 -0
  198. package/esm2022/lib/models/generated/command.model.mjs +116 -0
  199. package/esm2022/lib/models/generated/delete.model.mjs +8 -0
  200. package/esm2022/lib/models/generated/document-name.model.mjs +8 -0
  201. package/esm2022/lib/models/generated/document.model.mjs +8 -0
  202. package/esm2022/lib/models/generated/docx.model.mjs +12 -0
  203. package/esm2022/lib/models/generated/edge-target.model.mjs +8 -0
  204. package/esm2022/lib/models/generated/edge.model.mjs +8 -0
  205. package/esm2022/lib/models/generated/element.model.mjs +8 -0
  206. package/esm2022/lib/models/generated/file-source.model.mjs +8 -0
  207. package/esm2022/lib/models/generated/format.model.mjs +12 -0
  208. package/esm2022/lib/models/generated/heading.model.mjs +16 -0
  209. package/esm2022/lib/models/generated/image-data.model.mjs +8 -0
  210. package/esm2022/lib/models/generated/image.model.mjs +12 -0
  211. package/esm2022/lib/models/generated/insert-break.model.mjs +8 -0
  212. package/esm2022/lib/models/generated/insert-element.model.mjs +12 -0
  213. package/esm2022/lib/models/generated/insert-image.model.mjs +12 -0
  214. package/esm2022/lib/models/generated/insert-link.model.mjs +12 -0
  215. package/esm2022/lib/models/generated/insert-styled-text.model.mjs +12 -0
  216. package/esm2022/lib/models/generated/insert-tab.model.mjs +8 -0
  217. package/esm2022/lib/models/generated/insert-table-columns.model.mjs +8 -0
  218. package/esm2022/lib/models/generated/insert-table-rows.model.mjs +8 -0
  219. package/esm2022/lib/models/generated/insert-table.model.mjs +8 -0
  220. package/esm2022/lib/models/generated/insert-text.model.mjs +8 -0
  221. package/esm2022/lib/models/generated/last-document-revision.model.mjs +12 -0
  222. package/esm2022/lib/models/generated/link-data.model.mjs +8 -0
  223. package/esm2022/lib/models/generated/link.model.mjs +8 -0
  224. package/esm2022/lib/models/generated/margins.model.mjs +8 -0
  225. package/esm2022/lib/models/generated/numbering-level.model.mjs +12 -0
  226. package/esm2022/lib/models/generated/numbering.model.mjs +8 -0
  227. package/esm2022/lib/models/generated/operation.model.mjs +12 -0
  228. package/esm2022/lib/models/generated/page-numbers.model.mjs +8 -0
  229. package/esm2022/lib/models/generated/paragraph-style.model.mjs +8 -0
  230. package/esm2022/lib/models/generated/paragraph.model.mjs +12 -0
  231. package/esm2022/lib/models/generated/remove-numberings.model.mjs +8 -0
  232. package/esm2022/lib/models/generated/remove-table-columns.model.mjs +8 -0
  233. package/esm2022/lib/models/generated/remove-table-rows.model.mjs +8 -0
  234. package/esm2022/lib/models/generated/replace-by-text.model.mjs +8 -0
  235. package/esm2022/lib/models/generated/replace.model.mjs +40 -0
  236. package/esm2022/lib/models/generated/resize-table-columns.model.mjs +8 -0
  237. package/esm2022/lib/models/generated/restore-numberings.model.mjs +8 -0
  238. package/esm2022/lib/models/generated/restore-paragraph-styles.model.mjs +8 -0
  239. package/esm2022/lib/models/generated/restore-table.model.mjs +12 -0
  240. package/esm2022/lib/models/generated/restore-text-styles.model.mjs +8 -0
  241. package/esm2022/lib/models/generated/restore.model.mjs +8 -0
  242. package/esm2022/lib/models/generated/revision.model.mjs +12 -0
  243. package/esm2022/lib/models/generated/row.model.mjs +8 -0
  244. package/esm2022/lib/models/generated/tab.model.mjs +8 -0
  245. package/esm2022/lib/models/generated/table-cell.model.mjs +8 -0
  246. package/esm2022/lib/models/generated/table.model.mjs +12 -0
  247. package/esm2022/lib/models/generated/target.model.mjs +16 -0
  248. package/esm2022/lib/models/generated/text-style.model.mjs +8 -0
  249. package/esm2022/public-api.mjs +43 -0
  250. package/esm2022/talrace-ngx-noder.mjs +5 -0
  251. package/fesm2022/talrace-ngx-noder.mjs +13736 -0
  252. package/fesm2022/talrace-ngx-noder.mjs.map +1 -0
  253. package/index.d.ts +5 -0
  254. package/lib/+shared/abstract/base-api.service.d.ts +23 -0
  255. package/lib/+shared/abstract/observer.component.d.ts +10 -0
  256. package/lib/+shared/confirm-dialog/confirm-dialog.component.d.ts +16 -0
  257. package/lib/+shared/constants/default-file-name.const.d.ts +1 -0
  258. package/lib/+shared/constants/paginator-sizes.const.d.ts +2 -0
  259. package/lib/+shared/editor/core/base/event-emitting.d.ts +17 -0
  260. package/lib/+shared/editor/core/components/edges/edge-type.enum.d.ts +4 -0
  261. package/lib/+shared/editor/core/components/edges/edge.component.d.ts +45 -0
  262. package/lib/+shared/editor/core/components/edges/edges.d.ts +26 -0
  263. package/lib/+shared/editor/core/constants/alignments.const.d.ts +7 -0
  264. package/lib/+shared/editor/core/constants/clipboardEventTypes.const.d.ts +5 -0
  265. package/lib/+shared/editor/core/constants/content-style-change.const.d.ts +14 -0
  266. package/lib/+shared/editor/core/constants/display-values.const.d.ts +7 -0
  267. package/lib/+shared/editor/core/constants/document-info.const.d.ts +12 -0
  268. package/lib/+shared/editor/core/constants/editor-version.const.d.ts +1 -0
  269. package/lib/+shared/editor/core/constants/editor.const.d.ts +16 -0
  270. package/lib/+shared/editor/core/constants/unicode-chars.const.d.ts +1 -0
  271. package/lib/+shared/editor/core/document.d.ts +56 -0
  272. package/lib/+shared/editor/core/edit.session.d.ts +159 -0
  273. package/lib/+shared/editor/core/editor.d.ts +206 -0
  274. package/lib/+shared/editor/core/enums/break-types.enum.d.ts +5 -0
  275. package/lib/+shared/editor/core/enums/hrule.enum.d.ts +5 -0
  276. package/lib/+shared/editor/core/enums/mouse-button.enum.d.ts +5 -0
  277. package/lib/+shared/editor/core/enums/numbering-marker-type.enum.d.ts +10 -0
  278. package/lib/+shared/editor/core/enums/page-type.enum.d.ts +5 -0
  279. package/lib/+shared/editor/core/enums/vertical-alignment.enum.d.ts +9 -0
  280. package/lib/+shared/editor/core/helpers/content-style.helper.d.ts +16 -0
  281. package/lib/+shared/editor/core/helpers/delta.helper.d.ts +6 -0
  282. package/lib/+shared/editor/core/helpers/dom.helper.d.ts +10 -0
  283. package/lib/+shared/editor/core/helpers/event.helper.d.ts +4 -0
  284. package/lib/+shared/editor/core/helpers/font-metrics.helper.d.ts +32 -0
  285. package/lib/+shared/editor/core/helpers/format-style.helper.d.ts +11 -0
  286. package/lib/+shared/editor/core/helpers/line-width.helper.d.ts +5 -0
  287. package/lib/+shared/editor/core/helpers/numbering.helper.d.ts +19 -0
  288. package/lib/+shared/editor/core/helpers/page.helper.d.ts +4 -0
  289. package/lib/+shared/editor/core/helpers/paragraph-style.helper.d.ts +6 -0
  290. package/lib/+shared/editor/core/helpers/paragraph.helper.d.ts +27 -0
  291. package/lib/+shared/editor/core/helpers/position.helper.d.ts +34 -0
  292. package/lib/+shared/editor/core/helpers/print.rendering.helper.d.ts +6 -0
  293. package/lib/+shared/editor/core/helpers/rendering.helper.d.ts +26 -0
  294. package/lib/+shared/editor/core/helpers/unicode.helper.d.ts +4 -0
  295. package/lib/+shared/editor/core/interfaces/cell.interface.d.ts +5 -0
  296. package/lib/+shared/editor/core/interfaces/cursor-position.interface.d.ts +11 -0
  297. package/lib/+shared/editor/core/interfaces/font-metric-size.interface.d.ts +11 -0
  298. package/lib/+shared/editor/core/interfaces/layer.config.d.ts +13 -0
  299. package/lib/+shared/editor/core/interfaces/paragraph-info.interface.d.ts +7 -0
  300. package/lib/+shared/editor/core/interfaces/render-changes.interface.d.ts +10 -0
  301. package/lib/+shared/editor/core/interfaces/replace.interface.d.ts +4 -0
  302. package/lib/+shared/editor/core/interfaces/search-iteration.interface.d.ts +4 -0
  303. package/lib/+shared/editor/core/interfaces/toolbar-styles.interface.d.ts +18 -0
  304. package/lib/+shared/editor/core/interfaces/visible-line-info.interface.d.ts +5 -0
  305. package/lib/+shared/editor/core/interfaces/visible-range.interface.d.ts +11 -0
  306. package/lib/+shared/editor/core/keyboard/text-input.d.ts +10 -0
  307. package/lib/+shared/editor/core/layers/cursor.layer.d.ts +24 -0
  308. package/lib/+shared/editor/core/layers/edges.layer.d.ts +24 -0
  309. package/lib/+shared/editor/core/layers/lines.d.ts +21 -0
  310. package/lib/+shared/editor/core/layers/pages.layer.d.ts +27 -0
  311. package/lib/+shared/editor/core/layers/print.edges.layer.d.ts +4 -0
  312. package/lib/+shared/editor/core/layers/print.pages.layer.d.ts +4 -0
  313. package/lib/+shared/editor/core/layers/print.text.layer.d.ts +5 -0
  314. package/lib/+shared/editor/core/layers/renderloop.d.ts +8 -0
  315. package/lib/+shared/editor/core/layers/scrollbar.d.ts +41 -0
  316. package/lib/+shared/editor/core/layers/selection.layer.d.ts +19 -0
  317. package/lib/+shared/editor/core/layers/text.layer.d.ts +22 -0
  318. package/lib/+shared/editor/core/models/display-token.model.d.ts +27 -0
  319. package/lib/+shared/editor/core/models/distance.model.d.ts +6 -0
  320. package/lib/+shared/editor/core/models/edge-element.model.d.ts +7 -0
  321. package/lib/+shared/editor/core/models/format-ext.model.d.ts +5 -0
  322. package/lib/+shared/editor/core/models/indent.model.d.ts +7 -0
  323. package/lib/+shared/editor/core/models/line-info.model.d.ts +14 -0
  324. package/lib/+shared/editor/core/models/margin.model.d.ts +9 -0
  325. package/lib/+shared/editor/core/models/numbering-data.model.d.ts +11 -0
  326. package/lib/+shared/editor/core/models/render-changes.model.d.ts +14 -0
  327. package/lib/+shared/editor/core/paging/page-vertical-data.model.d.ts +8 -0
  328. package/lib/+shared/editor/core/paging/pages.wrap.d.ts +41 -0
  329. package/lib/+shared/editor/core/paging/paragraph.d.ts +44 -0
  330. package/lib/+shared/editor/core/paging/text-line-info.d.ts +17 -0
  331. package/lib/+shared/editor/core/point.d.ts +7 -0
  332. package/lib/+shared/editor/core/print.renderer.d.ts +25 -0
  333. package/lib/+shared/editor/core/range.d.ts +32 -0
  334. package/lib/+shared/editor/core/renderer.d.ts +60 -0
  335. package/lib/+shared/editor/core/search.d.ts +32 -0
  336. package/lib/+shared/editor/core/virtual.renderer.d.ts +93 -0
  337. package/lib/+shared/editor/custom-components/external-element/element-toolbar/element-toolbar.component.d.ts +14 -0
  338. package/lib/+shared/editor/custom-components/external-element/external-element.service.d.ts +7 -0
  339. package/lib/+shared/editor/custom-components/external-element/external-elements.const.d.ts +5 -0
  340. package/lib/+shared/editor/custom-components/external-element/external-sidenav.interface.d.ts +5 -0
  341. package/lib/+shared/editor/custom-components/external-element/external.component.d.ts +17 -0
  342. package/lib/+shared/editor/custom-components/external-element/models/element-data.model.d.ts +7 -0
  343. package/lib/+shared/editor/custom-components/external-element/models/external-element.model.d.ts +20 -0
  344. package/lib/+shared/editor/custom-components/external-element/models/external-sidenav.model.d.ts +7 -0
  345. package/lib/+shared/editor/custom-components/image/components/image.component.d.ts +31 -0
  346. package/lib/+shared/editor/custom-components/image/input-handler/image-input.handler.d.ts +13 -0
  347. package/lib/+shared/editor/custom-components/image/interfaces/size.d.ts +4 -0
  348. package/lib/+shared/editor/custom-components/image/resizer/coordinate.d.ts +4 -0
  349. package/lib/+shared/editor/custom-components/image/resizer/direction-wrapper.d.ts +9 -0
  350. package/lib/+shared/editor/custom-components/image/resizer/direction.enum.d.ts +10 -0
  351. package/lib/+shared/editor/custom-components/image/resizer/resizer.component.d.ts +26 -0
  352. package/lib/+shared/editor/custom-components/image/resizer/size-delta.d.ts +4 -0
  353. package/lib/+shared/editor/custom-components/image/resizer/size-wrapper.d.ts +19 -0
  354. package/lib/+shared/editor/custom-components/image/services/image-api.service.d.ts +8 -0
  355. package/lib/+shared/editor/custom-components/shared/abstract/base.component.d.ts +24 -0
  356. package/lib/+shared/editor/custom-components/shared/constants/custom-content-markers.const.d.ts +2 -0
  357. package/lib/+shared/editor/custom-components/shared/helpers/custom-component.hepler.d.ts +8 -0
  358. package/lib/+shared/editor/custom-components/shared/interfaces/custom-components.interface.d.ts +13 -0
  359. package/lib/+shared/editor/custom-components/shared/services/component/component.service.d.ts +21 -0
  360. package/lib/+shared/editor/custom-components/shared/services/custom-content/custom-content.service.d.ts +30 -0
  361. package/lib/+shared/editor/custom-components/shared/services/overlay/overlay.service.d.ts +18 -0
  362. package/lib/+shared/editor/custom-components/shared/types/custom-content.d.ts +5 -0
  363. package/lib/+shared/editor/custom-components/tab/tab.component.d.ts +15 -0
  364. package/lib/+shared/editor/custom-components/table/cell-resizer/cell-resizer.d.ts +31 -0
  365. package/lib/+shared/editor/custom-components/table/components/table-cell.component.d.ts +45 -0
  366. package/lib/+shared/editor/custom-components/table/components/table.component.d.ts +55 -0
  367. package/lib/+shared/editor/custom-components/table/enums/reisizer-side.enum.d.ts +6 -0
  368. package/lib/+shared/editor/custom-components/table/enums/vertical-merge.enum.d.ts +4 -0
  369. package/lib/+shared/editor/custom-components/table/models/cell-data.model.d.ts +11 -0
  370. package/lib/+shared/editor/custom-components/table/models/cell-resizer-parameters.model.d.ts +9 -0
  371. package/lib/+shared/editor/custom-components/table/models/row-data.model.d.ts +7 -0
  372. package/lib/+shared/editor/custom-components/table/models/selection-range.model.d.ts +17 -0
  373. package/lib/+shared/editor/custom-components/table/overlay-menu/overlay-menu.component.d.ts +37 -0
  374. package/lib/+shared/editor/custom-components/table/selection/table-selection.d.ts +74 -0
  375. package/lib/+shared/editor/editor.component.d.ts +43 -0
  376. package/lib/+shared/editor/editor.module.d.ts +30 -0
  377. package/lib/+shared/editor/execution/models/cell-session-source.model.d.ts +11 -0
  378. package/lib/+shared/editor/execution/models/edge-session-source.model.d.ts +11 -0
  379. package/lib/+shared/editor/execution/models/general-properties.model.d.ts +7 -0
  380. package/lib/+shared/editor/execution/models/main-session-source.model.d.ts +5 -0
  381. package/lib/+shared/editor/execution/models/session-source.model.d.ts +5 -0
  382. package/lib/+shared/editor/execution/models/session.model.d.ts +12 -0
  383. package/lib/+shared/editor/execution/regulator.service.d.ts +45 -0
  384. package/lib/+shared/editor/helpers/break.helper.d.ts +7 -0
  385. package/lib/+shared/editor/helpers/content.helper.d.ts +9 -0
  386. package/lib/+shared/editor/helpers/format.helper.d.ts +4 -0
  387. package/lib/+shared/editor/helpers/indexed-element.helper.d.ts +4 -0
  388. package/lib/+shared/editor/helpers/tab.helper.d.ts +3 -0
  389. package/lib/+shared/editor/interaction/editor.service.d.ts +194 -0
  390. package/lib/+shared/editor/interaction/input.handler.d.ts +25 -0
  391. package/lib/+shared/editor/interaction/mouse.handler.d.ts +14 -0
  392. package/lib/+shared/editor/interfaces/contents.interface.d.ts +22 -0
  393. package/lib/+shared/editor/interfaces/insert-index.interface.d.ts +3 -0
  394. package/lib/+shared/editor/operation-history/operation-history.d.ts +65 -0
  395. package/lib/+shared/editor/operation-history/operation.type.d.ts +24 -0
  396. package/lib/+shared/editor/operation-history/operations-history-info.model.d.ts +5 -0
  397. package/lib/+shared/editor/operations/enums/command-type.enum.d.ts +29 -0
  398. package/lib/+shared/editor/operations/enums/target-type.enum.d.ts +5 -0
  399. package/lib/+shared/editor/operations/helpers/break-operations.helper.d.ts +5 -0
  400. package/lib/+shared/editor/operations/helpers/content-operations.helper.d.ts +5 -0
  401. package/lib/+shared/editor/operations/helpers/format-operations.helper.d.ts +11 -0
  402. package/lib/+shared/editor/operations/helpers/image-operations.helper.d.ts +7 -0
  403. package/lib/+shared/editor/operations/helpers/indexed-element-operations.helper.d.ts +8 -0
  404. package/lib/+shared/editor/operations/helpers/link-operations.helper.d.ts +6 -0
  405. package/lib/+shared/editor/operations/helpers/numbering-operations.helper.d.ts +11 -0
  406. package/lib/+shared/editor/operations/helpers/operations-helper.helper.d.ts +52 -0
  407. package/lib/+shared/editor/operations/helpers/paragraph-operations.helper.d.ts +13 -0
  408. package/lib/+shared/editor/operations/helpers/save-commands.helper.d.ts +43 -0
  409. package/lib/+shared/editor/operations/helpers/tab-operations.helper.d.ts +4 -0
  410. package/lib/+shared/editor/operations/helpers/table-operations.helper.d.ts +30 -0
  411. package/lib/+shared/editor/operations/helpers/target-operations.helper.d.ts +6 -0
  412. package/lib/+shared/editor/positioning/selection.d.ts +50 -0
  413. package/lib/+shared/editor/store/editor.actions.d.ts +11 -0
  414. package/lib/+shared/editor-header/editor-header.component.d.ts +101 -0
  415. package/lib/+shared/editor-search/editor-search-dialog.component.d.ts +24 -0
  416. package/lib/+shared/editor-toolbar/color-picker/color-picker.component.d.ts +12 -0
  417. package/lib/+shared/editor-toolbar/constants/numbering-templates.const.d.ts +6 -0
  418. package/lib/+shared/editor-toolbar/constants/svg-icons.const.d.ts +12 -0
  419. package/lib/+shared/editor-toolbar/editor-toolbar.component.d.ts +44 -0
  420. package/lib/+shared/editor-toolbar/editor-toolbar.module.d.ts +28 -0
  421. package/lib/+shared/editor-toolbar/enums/alignment.enum.d.ts +6 -0
  422. package/lib/+shared/editor-toolbar/enums/numbering-template-type.enum.d.ts +14 -0
  423. package/lib/+shared/editor-toolbar/enums/numbering-type.enum.d.ts +4 -0
  424. package/lib/+shared/editor-toolbar/font/font.component.d.ts +13 -0
  425. package/lib/+shared/editor-toolbar/font-size/font-size.component.d.ts +24 -0
  426. package/lib/+shared/editor-toolbar/font-style/font-style.component.d.ts +24 -0
  427. package/lib/+shared/editor-toolbar/format/format.component.d.ts +12 -0
  428. package/lib/+shared/editor-toolbar/heading/heading.component.d.ts +8 -0
  429. package/lib/+shared/editor-toolbar/helpers/toolbar-styles.helper.d.ts +6 -0
  430. package/lib/+shared/editor-toolbar/numbering/numbering.component.d.ts +18 -0
  431. package/lib/+shared/editor-toolbar/print/print.component.d.ts +7 -0
  432. package/lib/+shared/editor-toolbar/undo-redo/undo-redo.component.d.ts +10 -0
  433. package/lib/+shared/editor-toolbar/zoom/zoom.component.d.ts +22 -0
  434. package/lib/+shared/enums/mode.enum.d.ts +5 -0
  435. package/lib/+shared/helpers/print.helper.d.ts +9 -0
  436. package/lib/+shared/insert-table/insert-table.component.d.ts +21 -0
  437. package/lib/+shared/services/commands.service.d.ts +10 -0
  438. package/lib/+shared/services/custom-icon.service.d.ts +11 -0
  439. package/lib/models/generated/add-numbering.model.d.ts +7 -0
  440. package/lib/models/generated/apply-element-style.model.d.ts +6 -0
  441. package/lib/models/generated/apply-image-style.model.d.ts +6 -0
  442. package/lib/models/generated/apply-paragraph-style.model.d.ts +7 -0
  443. package/lib/models/generated/apply-text-style.model.d.ts +7 -0
  444. package/lib/models/generated/borders-style.model.d.ts +8 -0
  445. package/lib/models/generated/break.model.d.ts +5 -0
  446. package/lib/models/generated/cell.model.d.ts +32 -0
  447. package/lib/models/generated/column-section.model.d.ts +7 -0
  448. package/lib/models/generated/column.model.d.ts +5 -0
  449. package/lib/models/generated/command.model.d.ts +60 -0
  450. package/lib/models/generated/delete.model.d.ts +5 -0
  451. package/lib/models/generated/document-name.model.d.ts +5 -0
  452. package/lib/models/generated/document.model.d.ts +7 -0
  453. package/lib/models/generated/docx.model.d.ts +43 -0
  454. package/lib/models/generated/edge-target.model.d.ts +5 -0
  455. package/lib/models/generated/edge.model.d.ts +24 -0
  456. package/lib/models/generated/element.model.d.ts +9 -0
  457. package/lib/models/generated/file-source.model.d.ts +4 -0
  458. package/lib/models/generated/format.model.d.ts +7 -0
  459. package/lib/models/generated/heading.model.d.ts +12 -0
  460. package/lib/models/generated/image-data.model.d.ts +6 -0
  461. package/lib/models/generated/image.model.d.ts +31 -0
  462. package/lib/models/generated/insert-break.model.d.ts +6 -0
  463. package/lib/models/generated/insert-element.model.d.ts +5 -0
  464. package/lib/models/generated/insert-image.model.d.ts +6 -0
  465. package/lib/models/generated/insert-link.model.d.ts +7 -0
  466. package/lib/models/generated/insert-styled-text.model.d.ts +7 -0
  467. package/lib/models/generated/insert-tab.model.d.ts +4 -0
  468. package/lib/models/generated/insert-table-columns.model.d.ts +7 -0
  469. package/lib/models/generated/insert-table-rows.model.d.ts +7 -0
  470. package/lib/models/generated/insert-table.model.d.ts +8 -0
  471. package/lib/models/generated/insert-text.model.d.ts +5 -0
  472. package/lib/models/generated/last-document-revision.model.d.ts +9 -0
  473. package/lib/models/generated/link-data.model.d.ts +5 -0
  474. package/lib/models/generated/link.model.d.ts +7 -0
  475. package/lib/models/generated/margins.model.d.ts +7 -0
  476. package/lib/models/generated/numbering-level.model.d.ts +14 -0
  477. package/lib/models/generated/numbering.model.d.ts +7 -0
  478. package/lib/models/generated/operation.model.d.ts +8 -0
  479. package/lib/models/generated/page-numbers.model.d.ts +8 -0
  480. package/lib/models/generated/paragraph-style.model.d.ts +18 -0
  481. package/lib/models/generated/paragraph.model.d.ts +6 -0
  482. package/lib/models/generated/remove-numberings.model.d.ts +5 -0
  483. package/lib/models/generated/remove-table-columns.model.d.ts +6 -0
  484. package/lib/models/generated/remove-table-rows.model.d.ts +6 -0
  485. package/lib/models/generated/replace-by-text.model.d.ts +6 -0
  486. package/lib/models/generated/replace.model.d.ts +19 -0
  487. package/lib/models/generated/resize-table-columns.model.d.ts +9 -0
  488. package/lib/models/generated/restore-numberings.model.d.ts +7 -0
  489. package/lib/models/generated/restore-paragraph-styles.model.d.ts +5 -0
  490. package/lib/models/generated/restore-table.model.d.ts +6 -0
  491. package/lib/models/generated/restore-text-styles.model.d.ts +5 -0
  492. package/lib/models/generated/restore.model.d.ts +22 -0
  493. package/lib/models/generated/revision.model.d.ts +9 -0
  494. package/lib/models/generated/row.model.d.ts +9 -0
  495. package/lib/models/generated/tab.model.d.ts +6 -0
  496. package/lib/models/generated/table-cell.model.d.ts +6 -0
  497. package/lib/models/generated/table.model.d.ts +18 -0
  498. package/lib/models/generated/target.model.d.ts +9 -0
  499. package/lib/models/generated/text-style.model.d.ts +14 -0
  500. package/package.json +35 -0
  501. package/public-api.d.ts +42 -0
  502. package/src/_ngx-noder.theme.scss +22 -0
  503. package/src/assets/fonts/nc-iconfont.css +333 -0
  504. package/src/assets/fonts/nc-iconfont.eot +0 -0
  505. package/src/assets/fonts/nc-iconfont.svg +110 -0
  506. package/src/assets/fonts/nc-iconfont.ttf +0 -0
  507. package/src/assets/fonts/nc-iconfont.woff +0 -0
  508. package/src/lib/+shared/add-link-dialog/_add-link-dialog.theme.scss +21 -0
  509. package/src/lib/+shared/editor/_editor.theme.scss +35 -0
  510. package/src/lib/+shared/editor/custom-components/external-element/element-toolbar/_element-toolbar.theme.scss +10 -0
  511. package/src/lib/+shared/editor-header/_editor-header.theme.scss +106 -0
  512. package/src/lib/+shared/editor-toolbar/_editor-toolbar.theme.scss +33 -0
  513. package/src/lib/+shared/editor-toolbar/numbering/_numbering.theme.scss +29 -0
  514. package/src/lib/+shared/insert-table/_insert-table.theme.scss +22 -0
  515. 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1hcGkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub2Rlci9zcmMvbGliLytzaGFyZWQvYWJzdHJhY3QvYmFzZS1hcGkuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxHQUFHLEVBQUUsS0FBSyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDbEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQWlDLFdBQVcsRUFBZ0IsTUFBTSxzQkFBc0IsQ0FBQztBQUNoRyxPQUFPLEVBQWMsVUFBVSxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7O0FBSTlDLE1BQU0sT0FBZ0IsY0FBYztJQUtoQyxZQUFzQixJQUFnQixFQUFZLEtBQVk7UUFBeEMs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0=
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzZXJ2ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvK3NoYXJlZC9hYnN0cmFjdC9vYnNlcnZlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBYSxNQUFNLGVBQWUsQ0FBQzs7QUFJckQsTUFBTSxPQUFnQixpQkFBaUI7SUFEdkM7UUFFSSxrQkFBYSxHQUFtQixFQUFFLENBQUM7S0FjdEM7SUFaRyxXQUFXO1FBQ1AsSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7SUFDOUIsQ0FBQztJQUVTLGtCQUFrQjtRQUN4QixPQUFPLElBQUksQ0FBQyxhQUFhLENBQ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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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vZGVyL3NyYy9saWIvK3NoYXJlZC9jb25maXJtLWRpYWxvZy9jb25maXJtLWRpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2NvbmZpcm0tZGlhbG9nL2NvbmZpcm0tZGlhbG9nLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDM0QsT0FBTyxFQUFFLGVBQWUsRUFBZ0IsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDMUYsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDOzs7OztBQWdCdkQsTUFBTSxPQUFPLHNCQUFzQjtJQUMvQixZQUE0QyxJQUFpQixFQUFVLEdBQXlDO1FBQ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ljb25cbiAgICAgICAgICAgIGZvbnRTZXQ9XCJuYy1pY29uXCJcbiAgICAgICAgICAgIGZvbnRJY29uPVwiaWNvbi1jYW5jZWwtdGhpblwiPjwvbWF0LWljb24+XG4gICAgICAgIHt7IGRhdGEuY2FuY2VsID8gZGF0YS5jYW5jZWwgOiAnQ2FuY2VsJyB9fVxuICAgIDwvYnV0dG9uPlxuICAgIDxidXR0b25cbiAgICAgICAgaWQ9XCJjb25maXJtLWRpYWxvZy1jb25maXJtLWJ0blwiXG4gICAgICAgIG1hdC1yYWlzZWQtYnV0dG9uXG4gICAgICAgIGNsYXNzPVwiZGVsZXRlLWJ0blwiXG4gICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgIChjbGljayk9XCJvbkNsb3NlKHRydWUpXCI+XG4gICAgICAgIDxtYXQtaWNvblxuICAgICAgICAgICAgZm9udFNldD1cIm5jLWljb25cIlxuICAgICAgICAgICAgZm9udEljb249XCJpY29uLWRvbmUtdGhpblwiPjwvbWF0LWljb24+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtZW1pdHRpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbm9kZXIvc3JjL2xpYi8rc2hhcmVkL2VkaXRvci9jb3JlL2Jhc2UvZXZlbnQtZW1pdHRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFnQixhQUFhO0lBQW5DO1FBQ0ksa0JBQWEsR0FBNkIsRUFBRSxDQUFDO1FBRTdDLG9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hbmRsZXJzW2V2ZW50TmFtZV07XG4gICAgfVxuXG4gICAgcmVtb3ZlQWxsTGlzdGVuZXJzKGV2ZW50TmFtZTogc3RyaW5nKTogdm9pZCB7XG4gICAgICAgIGlmICghdGhpcy5ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gfHwgIXRoaXMuZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSBbXTtcbiAgICB9XG59XG4iXX0=
@@ -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=