@sd-angular/core 19.0.0-beta.8 → 19.0.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +686 -33
- package/assets/scss/ckeditor5.scss +61 -4
- package/assets/scss/core/bootstrap.scss +17 -0
- package/assets/scss/core/form.scss +32 -6
- package/assets/scss/core/grid.scss +40 -0
- package/assets/scss/sd-core.scss +5 -0
- package/assets/scss/themes/material-theme.scss +82 -40
- package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +5 -5
- package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +12 -18
- package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +9 -10
- package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +3 -3
- package/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar.component.d.ts +19 -0
- package/components/badge/src/badge.component.d.ts +77 -19
- package/components/button/src/button.component.d.ts +30 -28
- package/components/chart/index.d.ts +4 -0
- package/components/chart/src/bar-chart.component.d.ts +18 -0
- package/components/chart/src/doughnut-chart.component.d.ts +16 -0
- package/components/chart/src/line-chart.component.d.ts +18 -0
- package/components/chart/src/pie-chart.component.d.ts +16 -0
- package/components/code-editor/index.d.ts +1 -0
- package/components/code-editor/src/code-editor.component.d.ts +25 -0
- package/components/document-builder/index.d.ts +1 -0
- package/components/document-builder/src/document-builder.component.d.ts +13 -42
- package/components/document-builder/src/document-builder.model.d.ts +15 -12
- package/components/document-builder/src/plugins/block-space/block-space.plugin.d.ts +9 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +44 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +57 -0
- package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +1 -0
- package/components/document-builder/src/plugins/highlight-range/highlight-range.plugin.d.ts +4 -0
- package/components/document-builder/src/plugins/image-custom/image-custom.plugin.d.ts +31 -0
- package/components/document-builder/src/plugins/index.d.ts +7 -2
- package/components/document-builder/src/plugins/page-orientation/page-orientation.plugin.d.ts +2 -2
- package/components/document-builder/src/plugins/paste-handler/filters/bookmark.d.ts +14 -0
- package/components/document-builder/src/plugins/paste-handler/filters/br.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/image.d.ts +25 -0
- package/components/document-builder/src/plugins/paste-handler/filters/list.d.ts +29 -0
- package/components/document-builder/src/plugins/paste-handler/filters/parse.d.ts +35 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removeboldwrapper.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removemsattributes.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removestyleblock.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/removexmlns.d.ts +15 -0
- package/components/document-builder/src/plugins/paste-handler/filters/replacemsfootnotes.d.ts +54 -0
- package/components/document-builder/src/plugins/paste-handler/filters/replacetabswithinprewithspaces.d.ts +24 -0
- package/components/document-builder/src/plugins/paste-handler/filters/space.d.ts +27 -0
- package/components/document-builder/src/plugins/paste-handler/filters/table.d.ts +16 -0
- package/components/document-builder/src/plugins/paste-handler/filters/utils.d.ts +25 -0
- package/components/document-builder/src/plugins/paste-handler/index.d.ts +35 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts +31 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/googlesheetsnormalizer.d.ts +31 -0
- package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts +29 -0
- package/components/document-builder/src/plugins/paste-handler/types.d.ts +30 -0
- package/components/document-builder/src/plugins/table-custom/index.d.ts +34 -0
- package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +39 -0
- package/components/editor/index.d.ts +3 -0
- package/components/editor/src/configurations/editor.configuration.d.ts +12 -0
- package/components/editor/src/configurations/index.d.ts +1 -0
- package/components/editor/src/editor.component.d.ts +42 -0
- package/components/editor/src/models/editor.model.d.ts +8 -0
- package/components/editor/src/models/image-upload.plugin.model.d.ts +20 -0
- package/components/editor/src/models/index.d.ts +2 -0
- package/components/editor/src/plugins/image-upload/image-upload.plugin.d.ts +22 -0
- package/components/editor/src/plugins/image-upload/utils/batch.utils.d.ts +14 -0
- package/components/editor/src/plugins/image-upload/utils/index.d.ts +3 -0
- package/components/editor/src/plugins/image-upload/utils/style.utils.d.ts +2 -0
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +3 -0
- package/components/index.d.ts +6 -0
- package/components/mini-editor/index.d.ts +2 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +91 -0
- package/components/mini-editor/src/mini-editor.model.d.ts +44 -0
- package/components/modal/index.d.ts +1 -1
- package/components/modal/src/modal.component.d.ts +26 -0
- package/components/section/index.d.ts +1 -0
- package/components/section/src/section-item/section-item.component.d.ts +7 -0
- package/components/section/src/section.component.d.ts +11 -11
- package/components/side-drawer/src/side-drawer.component.d.ts +11 -24
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -1
- package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +3 -15
- package/components/table/index.d.ts +2 -0
- package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
- package/components/table/src/components/column-title/column-title.component.d.ts +10 -0
- package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +18 -11
- package/components/table/src/components/desktop-cell/view/view.component.d.ts +24 -0
- package/components/table/src/components/external-filter/external-filter.component.d.ts +1 -1
- package/components/table/src/components/index.d.ts +1 -0
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +11 -10
- package/components/table/src/components/selector-action/selector-action.component.d.ts +5 -3
- package/components/table/src/directives/index.d.ts +4 -0
- package/components/table/src/directives/sd-table-cell-def.directive.d.ts +2 -3
- package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +8 -0
- package/components/table/src/directives/sd-table-expand-def.directive.d.ts +0 -1
- package/components/table/src/directives/sd-table-filter-def.directive.d.ts +4 -6
- package/components/table/src/directives/sd-table-footer-def.directive.d.ts +2 -3
- package/components/table/src/directives/sd-table-title-def.directive.d.ts +8 -0
- package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
- package/components/table/src/models/table-column.model.d.ts +49 -40
- package/components/table/src/models/table-command.model.d.ts +7 -3
- package/components/table/src/models/table-item.model.d.ts +5 -4
- package/components/table/src/models/table-option-config.model.d.ts +3 -0
- package/components/table/src/models/table-option-export.model.d.ts +3 -2
- package/components/table/src/models/table-option-selector.model.d.ts +17 -10
- package/components/table/src/models/table-option.model.d.ts +15 -8
- package/components/table/src/services/index.d.ts +3 -0
- package/components/table/src/services/table-export/table-export.service.d.ts +26 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +6 -5
- package/components/table/src/services/table-format/table-format.service.d.ts +16 -0
- package/components/table/src/table.component.d.ts +46 -53
- package/components/upload-file/src/configurations/upload-file.configuration.d.ts +34 -1
- package/components/upload-file/src/services/upload-file.service.d.ts +0 -1
- package/components/upload-file/src/upload-file.component.d.ts +52 -54
- package/components/view/index.d.ts +1 -0
- package/components/view/src/view.component.d.ts +16 -0
- package/components/workflow/src/models/form-generic-component.model.d.ts +5 -4
- package/components/workflow/src/models/form-generic-expression.model.d.ts +1 -0
- package/components/workflow/src/models/index.d.ts +1 -0
- package/components/workflow/src/pipes/html.pipe.d.ts +4 -4
- package/directives/index.d.ts +2 -0
- package/directives/src/sd-href.directive.d.ts +9 -0
- package/directives/src/sd-tooltip.directive.d.ts +26 -0
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs +79 -154
- package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-avatar.mjs +103 -0
- package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-badge.mjs +101 -91
- package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +70 -96
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-chart.mjs +290 -0
- package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs +127 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-document-builder.mjs +4005 -611
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +933 -0
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-history.mjs +1 -1
- package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-mini-editor.mjs +332 -0
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-modal.mjs +63 -92
- package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
- package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +41 -43
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-side-drawer.mjs +78 -84
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +151 -241
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +1394 -1254
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +390 -443
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-view.mjs +45 -0
- package/fesm2022/sd-angular-core-components-view.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-workflow.mjs +165 -168
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +6 -0
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +286 -27
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +289 -363
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +170 -189
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs +184 -194
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +180 -242
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +178 -270
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +177 -285
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +210 -337
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +169 -286
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +3 -2
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +390 -447
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +167 -226
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-authom.mjs +359 -0
- package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -0
- package/fesm2022/sd-angular-core-modules-keycloak.mjs +126 -0
- package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -0
- package/fesm2022/sd-angular-core-modules-layout.mjs +709 -456
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-permission.mjs +160 -74
- package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules.mjs +2 -1
- package/fesm2022/sd-angular-core-modules.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-api.mjs +5 -10
- package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +9 -7
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs +173 -0
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -0
- package/fesm2022/sd-angular-core-services-notify.mjs +2 -2
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services.mjs +1 -0
- package/fesm2022/sd-angular-core-services.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs +58 -80
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs +15 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core.mjs +0 -1
- package/fesm2022/sd-angular-core.mjs.map +1 -1
- package/forms/autocomplete/src/autocomplete.component.d.ts +55 -55
- package/forms/chip/src/chip.component.d.ts +37 -40
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +37 -38
- package/forms/date/src/date.component.d.ts +48 -46
- package/forms/date-range/src/date-range.component.d.ts +35 -34
- package/forms/datetime/src/datetime.component.d.ts +48 -49
- package/forms/input/src/input.component.d.ts +54 -57
- package/forms/input-number/src/input-number.component.d.ts +53 -54
- package/forms/select/src/select.component.d.ts +67 -64
- package/forms/textarea/src/textarea.component.d.ts +40 -43
- package/modules/authom/authom.configuration.d.ts +17 -0
- package/modules/authom/authom.interceptor.d.ts +3 -0
- package/modules/authom/authom.module.d.ts +16 -0
- package/modules/authom/authom.service.d.ts +32 -0
- package/modules/authom/index.d.ts +35 -0
- package/modules/index.d.ts +2 -1
- package/modules/keycloak/index.d.ts +4 -0
- package/modules/keycloak/keycloak.configuration.d.ts +11 -0
- package/modules/keycloak/keycloak.interceptor.d.ts +2 -0
- package/modules/keycloak/keycloak.module.d.ts +18 -0
- package/modules/keycloak/keycloak.service.d.ts +14 -0
- package/modules/layout/components/index.d.ts +2 -0
- package/modules/layout/components/layout-main/layout-main.component.d.ts +8 -12
- package/modules/layout/components/page/page.component.d.ts +5 -7
- package/modules/layout/components/sidebar-mobile-v1/components/sidebar/sidebar.component.d.ts +35 -0
- package/modules/layout/components/sidebar-mobile-v1/components/user/user.component.d.ts +24 -0
- package/modules/layout/components/sidebar-mobile-v1/main.component.d.ts +21 -0
- package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +22 -29
- package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +11 -17
- package/modules/layout/components/sidebar-v1/main.component.d.ts +14 -14
- package/modules/layout/configurations/layout.configuration.d.ts +46 -3
- package/modules/layout/modules/forbidden/pages/root/root.component.d.ts +3 -8
- package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +2 -5
- package/modules/layout/modules/not-found/pages/root/root.component.d.ts +3 -8
- package/modules/layout/pipes/high-light-search.pipe.d.ts +1 -1
- package/modules/layout/services/index.d.ts +1 -0
- package/modules/layout/services/layout.service.d.ts +10 -0
- package/modules/layout/services/menu/menu.model.d.ts +4 -1
- package/modules/layout/services/storage/storage.service.d.ts +0 -3
- package/modules/permission/src/configurations/permission.configuration.d.ts +56 -2
- package/modules/permission/src/directives/permission.directive.d.ts +5 -8
- package/modules/permission/src/guards/permission.guard.d.ts +2 -1
- package/modules/permission/src/services/permission.service.d.ts +6 -9
- package/package.json +107 -79
- package/public-api.d.ts +0 -1
- package/sd-angular-core-19.0.0-beta.81.tgz +0 -0
- package/services/api/src/api.model.d.ts +6 -1
- package/services/confirm/src/lib/confirm.service.d.ts +5 -0
- package/services/docx/index.d.ts +1 -0
- package/services/docx/src/lib/docx.model.d.ts +9 -0
- package/services/docx/src/lib/docx.service.d.ts +13 -0
- package/services/docx/src/public-api.d.ts +2 -0
- package/services/index.d.ts +1 -0
- package/services/notify/index.d.ts +1 -0
- package/services/notify/src/notify.model.d.ts +1 -1
- package/services/notify/src/notify.service.d.ts +5 -5
- package/utilities/extensions/src/string.extension.d.ts +3 -0
- package/utilities/extensions/src/utility.extension.d.ts +1 -0
- package/utilities/models/index.d.ts +3 -0
- package/utilities/models/src/filter.model.d.ts +17 -4
- package/utilities/models/src/icon.model.d.ts +2 -0
- package/utilities/models/src/nested-key-of.model.d.ts +5 -0
- package/utilities/models/src/order.model.d.ts +2 -1
- package/utilities/models/src/paging.model.d.ts +2 -1
- package/utilities/models/src/pattern.model.d.ts +1 -1
- package/utilities/models/src/unwrap-signal.model.d.ts +6 -0
- package/components/document-builder/src/plugins/comment/comment.plugin.d.ts +0 -4
- package/components/document-builder/src/plugins/table-fit/table-fit.plugin.d.ts +0 -4
- package/components/modal/src/modal/modal.component.d.ts +0 -31
- package/components/table/src/components/desktop-cell-view/desktop-cell-view.component.d.ts +0 -14
- package/fesm2022/sd-angular-core-guards-permission.mjs +0 -155
- package/fesm2022/sd-angular-core-guards-permission.mjs.map +0 -1
- package/fesm2022/sd-angular-core-guards.mjs +0 -6
- package/fesm2022/sd-angular-core-guards.mjs.map +0 -1
- package/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
- package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
- package/guards/index.d.ts +0 -1
- package/guards/permission/index.d.ts +0 -4
- package/guards/permission/src/configurations/index.d.ts +0 -1
- package/guards/permission/src/configurations/permission.configuration.d.ts +0 -8
- package/guards/permission/src/directives/index.d.ts +0 -1
- package/guards/permission/src/directives/permission.directive.d.ts +0 -12
- package/guards/permission/src/guards/index.d.ts +0 -1
- package/guards/permission/src/guards/permission.guard.d.ts +0 -13
- package/guards/permission/src/services/index.d.ts +0 -1
- package/guards/permission/src/services/permission.service.d.ts +0 -15
- package/modules/oidc/dynamic-sts.loader.d.ts +0 -11
- package/modules/oidc/index.d.ts +0 -2
- package/modules/oidc/oidc.configuration.d.ts +0 -11
- package/modules/oidc/oidc.module.d.ts +0 -14
- package/sd-angular-core-19.0.0-beta.8.tgz +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/parse
|
|
7
|
+
*/
|
|
8
|
+
import { type StylesProcessor, type ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Parses the provided HTML extracting contents of `<body>` and `<style>` tags.
|
|
11
|
+
*
|
|
12
|
+
* @param htmlString HTML string to be parsed.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parsePasteOfficeHtml(htmlString: string, stylesProcessor: StylesProcessor): PasteOfficeHtmlParseResult;
|
|
15
|
+
/**
|
|
16
|
+
* The result of {@link ~parsePasteOfficeHtml}.
|
|
17
|
+
*/
|
|
18
|
+
export interface PasteOfficeHtmlParseResult {
|
|
19
|
+
/**
|
|
20
|
+
* Parsed body content as a traversable structure.
|
|
21
|
+
*/
|
|
22
|
+
body: ViewDocumentFragment;
|
|
23
|
+
/**
|
|
24
|
+
* Entire body content as a string.
|
|
25
|
+
*/
|
|
26
|
+
bodyString: string;
|
|
27
|
+
/**
|
|
28
|
+
* Array of native `CSSStyleSheet` objects, each representing separate `style` tag from the source HTML.
|
|
29
|
+
*/
|
|
30
|
+
styles: Array<CSSStyleSheet>;
|
|
31
|
+
/**
|
|
32
|
+
* All `style` tags contents combined in the order of occurrence into one string.
|
|
33
|
+
*/
|
|
34
|
+
stylesString: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removeboldwrapper
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Removes the `<b>` tag wrapper added by Google Docs to a copied content.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeBoldWrapper(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removegooglesheetstag
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Removes the `<google-sheets-html-origin>` tag wrapper added by Google Sheets to a copied content.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeGoogleSheetsTag(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removeinvalidtablewidth
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Removes the `width:0px` style from table pasted from Google Sheets and `width="0"` attribute from Word tables.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeInvalidTableWidth(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removemsattributes
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Cleanup MS attributes like styles, attributes and elements.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeMSAttributes(documentFragment: ViewDocumentFragment): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removestyleblock
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Removes `<style>` block added by Google Sheets to a copied content.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeStyleBlock(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/removexmlns
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Removes the `xmlns` attribute from table pasted from Google Sheets.
|
|
11
|
+
*
|
|
12
|
+
* @param documentFragment element `data.content` obtained from clipboard
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function removeXmlns(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/replacemsfootnotes
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewDocumentFragment, ViewUpcastWriter } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Replaces MS Word specific footnotes references and definitions with proper elements.
|
|
11
|
+
*
|
|
12
|
+
* Things to know about MS Word footnotes:
|
|
13
|
+
*
|
|
14
|
+
* * Footnote references in Word are marked with `mso-footnote-id` style.
|
|
15
|
+
* * Word does not support nested footnotes, so references within definitions are ignored.
|
|
16
|
+
* * Word appends extra spaces after footnote references within definitions, which are trimmed.
|
|
17
|
+
* * Footnote definitions list is marked with `mso-element: footnote-list` style it contain `mso-element: footnote` elements.
|
|
18
|
+
* * Footnote definition might contain tables, lists and other elements, not only text. They are placed directly within `li` element,
|
|
19
|
+
* without any wrapper (in opposition to text content of the definition, which is placed within `MsoFootnoteText` element).
|
|
20
|
+
*
|
|
21
|
+
* Example pseudo document showing MS Word footnote structure:
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <p>Text with footnote<a style='mso-footnote-id:ftn1'>[1]</a> reference.</p>
|
|
25
|
+
*
|
|
26
|
+
* <div style='mso-element:footnote-list'>
|
|
27
|
+
* <div style='mso-element:footnote' id=ftn1>
|
|
28
|
+
* <p class=MsoFootnoteText><a style='mso-footnote-id:ftn1'>[1]</a> Footnote content</p>
|
|
29
|
+
* <table class="MsoTableGrid">...</table>
|
|
30
|
+
* </div>
|
|
31
|
+
* </div>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Will be transformed into:
|
|
35
|
+
*
|
|
36
|
+
* ```html
|
|
37
|
+
* <p>Text with footnote<sup class="footnote"><a id="ref-footnote-ftn1" href="#footnote-ftn1">1</a></sup> reference.</p>
|
|
38
|
+
*
|
|
39
|
+
* <ol class="footnotes">
|
|
40
|
+
* <li class="footnote-definition" id="footnote-ftn1">
|
|
41
|
+
* <a href="#ref-footnote-ftn1" class="footnote-backlink">^</a>
|
|
42
|
+
* <div class="footnote-content">
|
|
43
|
+
* <p>Footnote content</p>
|
|
44
|
+
* <table>...</table>
|
|
45
|
+
* </div>
|
|
46
|
+
* </li>
|
|
47
|
+
* </ol>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param documentFragment `data.content` obtained from clipboard.
|
|
51
|
+
* @param writer The view writer instance.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare function replaceMSFootnotes(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/replacetabswithinprewithspaces
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewDocumentFragment, ViewUpcastWriter } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Replaces tab characters with spaces in text nodes that are inside elements styled with `white-space: pre-wrap`.
|
|
11
|
+
*
|
|
12
|
+
* This is a workaround for incorrect detection of pre-like formatting in the DOM converter for pasted Google Docs documents.
|
|
13
|
+
* When an element uses `white-space: pre-wrap`, the editor reduces tab characters to a single space, causing
|
|
14
|
+
* inconsistent spacing in pasted content. This function replaces tabs with spaces to ensure visual consistency.
|
|
15
|
+
* This is intended as a temporary solution.
|
|
16
|
+
*
|
|
17
|
+
* See: https://github.com/ckeditor/ckeditor5/issues/18995
|
|
18
|
+
*
|
|
19
|
+
* @param documentFragment The `data.content` element obtained from the clipboard.
|
|
20
|
+
* @param writer The upcast writer used to manipulate the view structure.
|
|
21
|
+
* @param tabWidth The number of spaces to replace each tab with. Defaults to 8.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function replaceTabsWithinPreWithSpaces(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter, tabWidth: number): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/space
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Replaces last space preceding elements closing tag with ` `. Such operation prevents spaces from being removed
|
|
10
|
+
* during further DOM/View processing (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).
|
|
11
|
+
* This method also takes into account Word specific `<o:p></o:p>` empty tags.
|
|
12
|
+
* Additionally multiline sequences of spaces and new lines between tags are removed (see #39 and #40).
|
|
13
|
+
*
|
|
14
|
+
* @param htmlString HTML string in which spacing should be normalized.
|
|
15
|
+
* @returns Input HTML with spaces normalized.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function normalizeSpacing(htmlString: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes spacing in special Word `spacerun spans` (`<span style='mso-spacerun:yes'>\s+</span>`) by replacing
|
|
21
|
+
* all spaces with ` ` pairs. This prevents spaces from being removed during further DOM/View processing
|
|
22
|
+
* (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).
|
|
23
|
+
*
|
|
24
|
+
* @param htmlDocument Native `Document` object in which spacing should be normalized.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function normalizeSpacerunSpans(htmlDocument: Document): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/table
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewUpcastWriter, type ViewDocumentFragment } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* Applies border none for table and cells without a border specified.
|
|
11
|
+
* Normalizes style length units to px.
|
|
12
|
+
* Handles left block table alignment.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function transformTables(documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter, hasTablePropertiesPlugin?: boolean, hasExtendedTableBlockAlignment?: boolean): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/filters/utils
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes CSS length value to 'px'.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function convertCssLengthToPx(value: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns true for value with 'px' unit.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function isPx(value?: string): value is string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a rounded 'px' value.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function toPx(value: number): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/pastefromoffice
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, ClipboardPipeline } from 'ckeditor5';
|
|
9
|
+
/**
|
|
10
|
+
* The Paste from Office plugin.
|
|
11
|
+
*
|
|
12
|
+
* This plugin handles content pasted from Office apps and transforms it (if necessary)
|
|
13
|
+
* to a valid structure which can then be understood by the editor features.
|
|
14
|
+
*
|
|
15
|
+
* Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~PasteFromOfficeNormalizer normalizers}.
|
|
16
|
+
* This plugin includes following normalizers:
|
|
17
|
+
* * {@link module:paste-from-office/normalizers/mswordnormalizer~PasteFromOfficeMSWordNormalizer Microsoft Word normalizer}
|
|
18
|
+
* * {@link module:paste-from-office/normalizers/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}
|
|
19
|
+
*
|
|
20
|
+
* For more information about this feature check the {@glink api/paste-from-office package page}.
|
|
21
|
+
*/
|
|
22
|
+
export declare class PasteHandler extends Plugin {
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "PasteHandler";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get requires(): readonly [typeof ClipboardPipeline];
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
init(): void;
|
|
35
|
+
}
|
package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/normalizers/googledocsnormalizer
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewDocument } from 'ckeditor5';
|
|
9
|
+
import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Normalizer for the content pasted from Google Docs.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare class GoogleDocsNormalizer implements PasteFromOfficeNormalizer {
|
|
16
|
+
readonly document: ViewDocument;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new `GoogleDocsNormalizer` instance.
|
|
19
|
+
*
|
|
20
|
+
* @param document View document.
|
|
21
|
+
*/
|
|
22
|
+
constructor(document: ViewDocument);
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
isActive(htmlString: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
execute(data: PasteFromOfficeNormalizerData): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/normalizers/googlesheetsnormalizer
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewDocument } from 'ckeditor5';
|
|
9
|
+
import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Normalizer for the content pasted from Google Sheets.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare class GoogleSheetsNormalizer implements PasteFromOfficeNormalizer {
|
|
16
|
+
readonly document: ViewDocument;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new `GoogleSheetsNormalizer` instance.
|
|
19
|
+
*
|
|
20
|
+
* @param document View document.
|
|
21
|
+
*/
|
|
22
|
+
constructor(document: ViewDocument);
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
isActive(htmlString: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
execute(data: PasteFromOfficeNormalizerData): void;
|
|
31
|
+
}
|
package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type ViewDocument } from 'ckeditor5';
|
|
6
|
+
import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../types';
|
|
7
|
+
/**
|
|
8
|
+
* Normalizer for the content pasted from Microsoft Word.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PasteFromOfficeMSWordNormalizer implements PasteFromOfficeNormalizer {
|
|
11
|
+
readonly document: ViewDocument;
|
|
12
|
+
readonly hasMultiLevelListPlugin: boolean;
|
|
13
|
+
readonly hasTablePropertiesPlugin: boolean;
|
|
14
|
+
readonly hasExtendedTableBlockAlignment: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new `PasteFromOfficeMSWordNormalizer` instance.
|
|
17
|
+
*
|
|
18
|
+
* @param document View document.
|
|
19
|
+
*/
|
|
20
|
+
constructor(document: ViewDocument, hasMultiLevelListPlugin?: boolean, hasTablePropertiesPlugin?: boolean, hasExtendedTableBlockAlignment?: boolean);
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
isActive(htmlString: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
execute(data: PasteFromOfficeNormalizerData): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module paste-from-office/normalizer
|
|
7
|
+
*/
|
|
8
|
+
import type { ClipboardInputTransformationData } from 'ckeditor5';
|
|
9
|
+
import type { PasteOfficeHtmlParseResult } from './filters/parse';
|
|
10
|
+
/**
|
|
11
|
+
* Interface defining a content transformation pasted from an external editor.
|
|
12
|
+
*
|
|
13
|
+
* Normalizers are registered by the {@link module:paste-from-office/pastefromoffice~PasteFromOffice} plugin and run on
|
|
14
|
+
* {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
15
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
16
|
+
*/
|
|
17
|
+
export interface PasteFromOfficeNormalizer {
|
|
18
|
+
/**
|
|
19
|
+
* Must return `true` if the `htmlString` contains content which this normalizer can transform.
|
|
20
|
+
*/
|
|
21
|
+
isActive(htmlString: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Executes the normalization of a given data.
|
|
24
|
+
*/
|
|
25
|
+
execute(data: PasteFromOfficeNormalizerData): void;
|
|
26
|
+
}
|
|
27
|
+
export interface PasteFromOfficeNormalizerData extends ClipboardInputTransformationData {
|
|
28
|
+
_isTransformedWithPasteFromOffice?: boolean;
|
|
29
|
+
_parsedData: PasteOfficeHtmlParseResult;
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Plugin } from 'ckeditor5';
|
|
2
|
+
export declare class TableCustom extends Plugin {
|
|
3
|
+
init(): void;
|
|
4
|
+
/**
|
|
5
|
+
* Parse border style from CSS shorthand (e.g., "1px solid red" or "none")
|
|
6
|
+
*/
|
|
7
|
+
private _parseBorderStyleFromShorthand;
|
|
8
|
+
/**
|
|
9
|
+
* Apply default table width
|
|
10
|
+
*/
|
|
11
|
+
private _applyTableDefaults;
|
|
12
|
+
/**
|
|
13
|
+
* Apply default borders to all cells in a table
|
|
14
|
+
* Nếu cell đã có border rồi thì bỏ qua
|
|
15
|
+
*/
|
|
16
|
+
private _applyCellBorders;
|
|
17
|
+
/**
|
|
18
|
+
* Setup listener to preserve cell/table styles when model changes
|
|
19
|
+
*/
|
|
20
|
+
private _setupStylePreservationOnModelChange;
|
|
21
|
+
/**
|
|
22
|
+
* Find tables that need border fixes from model changes
|
|
23
|
+
*/
|
|
24
|
+
private _findTablesNeedingFix;
|
|
25
|
+
/**
|
|
26
|
+
* Find parent table element
|
|
27
|
+
*/
|
|
28
|
+
private _findParentTable;
|
|
29
|
+
/**
|
|
30
|
+
* Cleanup listeners when plugin is destroyed
|
|
31
|
+
* Note: this.listenTo() listeners are automatically cleaned up by super.destroy()
|
|
32
|
+
*/
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
import { Plugin, Widget } from 'ckeditor5';
|
|
2
|
+
import { SdDocumentBuilderVariable } from '../../document-builder.model';
|
|
2
3
|
export declare class VariablePlugin extends Plugin {
|
|
3
4
|
#private;
|
|
5
|
+
static get pluginName(): "VariablePlugin";
|
|
4
6
|
static get requires(): (typeof Widget)[];
|
|
5
7
|
init(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Lấy tất cả variables trong document.
|
|
10
|
+
* @returns Danh sách tất cả variables (bao gồm bindingValue nếu đã binding)
|
|
11
|
+
*/
|
|
12
|
+
all<T = any>(): SdDocumentBuilderVariable<T>[];
|
|
13
|
+
/**
|
|
14
|
+
* Scroll tới vị trí của variable theo uuid.
|
|
15
|
+
* @param uuid - uuid của variable (FE tự sinh sau mỗi lần drop)
|
|
16
|
+
*/
|
|
17
|
+
scroll(uuid: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Gán giá trị cho TẤT CẢ variable có cùng id trong document.
|
|
20
|
+
* Nếu value rỗng → tự động gọi clearValue(id).
|
|
21
|
+
* @param id - id của variable definition
|
|
22
|
+
* @param value - giá trị binding cần hiển thị
|
|
23
|
+
* @returns số instance đã được cập nhật
|
|
24
|
+
*/
|
|
25
|
+
bindValue(id: string, value: string): number;
|
|
26
|
+
/**
|
|
27
|
+
* Xóa binding value của TẤT CẢ variable có cùng id.
|
|
28
|
+
* @param id - id của variable definition
|
|
29
|
+
* @returns số instance đã được cập nhật
|
|
30
|
+
*/
|
|
31
|
+
clearValue(id: string): number;
|
|
32
|
+
/**
|
|
33
|
+
* Batch bind nhiều variables theo map { id → value }.
|
|
34
|
+
* Toàn bộ thực hiện trong 1 model.change() → 1 undo step duy nhất.
|
|
35
|
+
* @param map - { [id]: boundValue }
|
|
36
|
+
*/
|
|
37
|
+
bindValues(map: Record<string, string>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Batch clear binding của nhiều variables.
|
|
40
|
+
* @param ids - danh sách id cần clear; nếu không truyền/rỗng → clear TẤT CẢ
|
|
41
|
+
*/
|
|
42
|
+
clearValues(ids?: string[]): void;
|
|
43
|
+
/** Xóa toàn bộ binding values trong document. Shorthand của clearValues(). */
|
|
44
|
+
clearAllValues(): void;
|
|
6
45
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface SdEditorUploadFileDetail {
|
|
3
|
+
idOrKey: string;
|
|
4
|
+
cdn: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
export type SdEditorUploadFileFuncUpload = (files: File[]) => Promise<SdEditorUploadFileDetail[]>;
|
|
8
|
+
export interface ISdEditorConfiguration {
|
|
9
|
+
key?: string;
|
|
10
|
+
upload: SdEditorUploadFileFuncUpload;
|
|
11
|
+
}
|
|
12
|
+
export declare const SD_EDITOR_CONFIGURATION: InjectionToken<ISdEditorConfiguration>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './editor.configuration';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { ClassicEditor } from 'ckeditor5';
|
|
3
|
+
import { EditorOption, SdEditorOption } from './models';
|
|
4
|
+
import { SdCustomValidator, SdFormControl } from '@sd-angular/core/forms/models';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SdEditor {
|
|
7
|
+
#private;
|
|
8
|
+
readonly option: import("@angular/core").InputSignal<SdEditorOption>;
|
|
9
|
+
readonly height: import("@angular/core").InputSignal<string>;
|
|
10
|
+
readonly maxHeight: import("@angular/core").InputSignal<string>;
|
|
11
|
+
readonly maxlength: import("@angular/core").InputSignal<number | undefined>;
|
|
12
|
+
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
13
|
+
readonly helperText: import("@angular/core").InputSignal<string | undefined>;
|
|
14
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
17
|
+
readonly hideInlineError: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
18
|
+
readonly inlineError: import("@angular/core").InputSignal<string | undefined>;
|
|
19
|
+
readonly placeholder: import("@angular/core").InputSignal<string | undefined>;
|
|
20
|
+
readonly validator: import("@angular/core").InputSignal<SdCustomValidator | undefined>;
|
|
21
|
+
readonly form: import("@angular/core").InputSignalWithTransform<FormGroup<any> | undefined, any>;
|
|
22
|
+
readonly key: import("@angular/core").InputSignal<string | undefined>;
|
|
23
|
+
readonly autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
24
|
+
readonly autoId: import("@angular/core").Signal<string | undefined>;
|
|
25
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
26
|
+
readonly valueModel: import("@angular/core").ModelSignal<string>;
|
|
27
|
+
readonly sdChange: import("@angular/core").OutputEmitterRef<string>;
|
|
28
|
+
readonly sdBlur: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
29
|
+
readonly sdFocus: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
30
|
+
readonly _textLength: import("@angular/core").WritableSignal<number>;
|
|
31
|
+
readonly formControl: SdFormControl;
|
|
32
|
+
readonly isOverLimit: import("@angular/core").Signal<boolean>;
|
|
33
|
+
get errorMessage(): string | undefined;
|
|
34
|
+
readonly Editor: typeof ClassicEditor;
|
|
35
|
+
readonly editorConfig: import("@angular/core").Signal<EditorOption>;
|
|
36
|
+
constructor();
|
|
37
|
+
onReady: (editor: ClassicEditor) => void;
|
|
38
|
+
focusEditor: () => void | undefined;
|
|
39
|
+
upload: () => Promise<string>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdEditor, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdEditor, "sd-editor", never, { "option": { "alias": "option"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdBlur": "sdBlur"; "sdFocus": "sdFocus"; }, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorConfig } from 'ckeditor5';
|
|
2
|
+
import { SdEditorImageConfig } from './image-upload.plugin.model';
|
|
3
|
+
export interface SdEditorOption {
|
|
4
|
+
imageConfig?: SdEditorImageConfig;
|
|
5
|
+
}
|
|
6
|
+
export type EditorOption = EditorConfig & {
|
|
7
|
+
getOption?: () => SdEditorOption;
|
|
8
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SdEditorUploadFileDetail } from '../configurations';
|
|
2
|
+
export interface SdEditorImageUploadValidation {
|
|
3
|
+
minWidth?: number;
|
|
4
|
+
minHeight?: number;
|
|
5
|
+
maxWidth?: number;
|
|
6
|
+
maxHeight?: number;
|
|
7
|
+
maxSizeMB?: number;
|
|
8
|
+
allowedFormats?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface SdEditorImageConfig {
|
|
11
|
+
/** 'immediate': upload ngay khi chọn ảnh.
|
|
12
|
+
** 'deferred': lưu tạm, upload thì viewChild component rồi gọi upload() */
|
|
13
|
+
uploadMode?: 'immediate' | 'deferred';
|
|
14
|
+
uploadFn?: (files: File[]) => Promise<SdEditorUploadFileDetail[]>;
|
|
15
|
+
validation?: SdEditorImageUploadValidation;
|
|
16
|
+
maxConcurrentUploads?: number;
|
|
17
|
+
batchSize?: number;
|
|
18
|
+
maxImagesPerSelection?: number;
|
|
19
|
+
lazyLoad?: boolean;
|
|
20
|
+
}
|