@sd-angular/core 19.0.0-beta.4 → 19.0.0-beta.41
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/assets/scss/ckeditor5.scss +60 -2
- package/assets/scss/core/bootstrap.scss +17 -0
- package/assets/scss/core/grid.scss +40 -0
- package/assets/scss/sd-core.scss +1 -0
- package/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar.component.d.ts +15 -0
- package/components/badge/src/badge.component.d.ts +77 -19
- package/components/button/src/button.component.d.ts +26 -28
- package/components/document-builder/index.d.ts +1 -0
- package/components/document-builder/src/document-builder.component.d.ts +20 -37
- package/components/document-builder/src/document-builder.model.d.ts +11 -10
- 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 +43 -0
- package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +50 -0
- package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +5 -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/{image-upload.plugin.d.ts → image-upload/image-upload.plugin.d.ts} +0 -4
- package/components/document-builder/src/plugins/index.d.ts +11 -5
- package/components/document-builder/src/plugins/{page-orientation.plugin.d.ts → 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/index.d.ts +3 -0
- package/components/mini-editor/index.d.ts +2 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +90 -0
- package/components/mini-editor/src/mini-editor.model.d.ts +42 -0
- package/components/side-drawer/src/side-drawer.component.d.ts +1 -2
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +11 -10
- package/components/table/src/directives/index.d.ts +2 -0
- package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +9 -0
- package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
- package/components/table/src/models/table-column.model.d.ts +32 -32
- package/components/table/src/models/table-command.model.d.ts +7 -3
- package/components/table/src/models/table-item.model.d.ts +5 -3
- package/components/table/src/models/table-option-export.model.d.ts +3 -2
- package/components/table/src/models/table-option-selector.model.d.ts +11 -10
- package/components/table/src/models/table-option.model.d.ts +10 -8
- package/components/table/src/services/table-filter/table-filter.model.d.ts +2 -2
- package/components/table/src/table.component.d.ts +33 -35
- package/components/view/index.d.ts +1 -0
- package/components/view/src/view.component.d.ts +16 -0
- package/components/workflow/src/models/index.d.ts +1 -0
- package/directives/index.d.ts +1 -0
- package/directives/src/sd-href.directive.d.ts +9 -0
- package/fesm2022/sd-angular-core-components-avatar.mjs +90 -0
- package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-badge.mjs +102 -91
- package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +64 -96
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +3860 -963
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- 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 +326 -0
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
- 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-side-drawer.mjs +21 -8
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +724 -472
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +1 -1
- 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 +33 -43
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +3 -0
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +80 -27
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +257 -361
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +145 -245
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +137 -271
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +138 -276
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +174 -336
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +130 -283
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +5 -2
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +303 -419
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +133 -226
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- 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 +54 -19
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules.mjs +1 -1
- package/fesm2022/sd-angular-core-pipes.mjs +21 -1
- package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +2 -2
- 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 +10 -6
- 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/forms/autocomplete/src/autocomplete.component.d.ts +51 -56
- package/forms/date/src/date.component.d.ts +41 -45
- package/forms/date-range/src/date-range.component.d.ts +28 -33
- package/forms/datetime/src/datetime.component.d.ts +41 -45
- package/forms/input/src/input.component.d.ts +46 -56
- package/forms/input-number/src/input-number.component.d.ts +47 -54
- package/forms/select/src/select.component.d.ts +54 -58
- package/forms/textarea/src/textarea.component.d.ts +34 -41
- package/modules/index.d.ts +1 -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/sidebar-v1/components/sidebar/sidebar.component.d.ts +1 -0
- package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +5 -2
- package/modules/layout/configurations/layout.configuration.d.ts +3 -0
- package/modules/layout/services/storage/storage.service.d.ts +1 -0
- package/package.json +96 -78
- package/pipes/index.d.ts +1 -0
- package/pipes/src/empty.pipe.d.ts +7 -0
- package/sd-angular-core-19.0.0-beta.41.tgz +0 -0
- package/services/confirm/src/lib/confirm.service.d.ts +1 -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/utilities/extensions/src/string.extension.d.ts +2 -0
- package/utilities/models/index.d.ts +3 -0
- package/utilities/models/src/filter.model.d.ts +14 -2
- 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/pattern.model.d.ts +1 -1
- package/utilities/models/src/unwrap-signal.model.d.ts +6 -0
- package/components/document-builder/src/plugins/comment.plugin.d.ts +0 -4
- package/components/document-builder/src/plugins/table-fit.plugin.d.ts +0 -4
- package/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
- package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
- 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/components/document-builder/src/plugins/{variable.plugin.d.ts → variable/variable.plugin.d.ts} +0 -0
|
@@ -17,15 +17,73 @@
|
|
|
17
17
|
// Import the editor styles.
|
|
18
18
|
// @import '@ckeditor/ckeditor5-editor-classic/dist/index.css';
|
|
19
19
|
@import '@ckeditor/ckeditor5-essentials/dist/index.css';
|
|
20
|
+
@import '@ckeditor/ckeditor5-page-break/dist/index.css';
|
|
20
21
|
@import '@ckeditor/ckeditor5-autoformat/dist/index.css';
|
|
21
22
|
@import '@ckeditor/ckeditor5-basic-styles/dist/index.css';
|
|
22
23
|
// @import '@ckeditor/ckeditor5-block-quote/dist/index.css';
|
|
23
24
|
@import '@ckeditor/ckeditor5-heading/dist/index.css';
|
|
24
|
-
@import '@ckeditor/ckeditor5-image/dist/index.css';
|
|
25
|
+
// @import '@ckeditor/ckeditor5-image/dist/index.css';
|
|
26
|
+
@import '@ckeditor/ckeditor5-image/dist/index-editor.css';
|
|
25
27
|
@import '@ckeditor/ckeditor5-indent/dist/index.css';
|
|
26
28
|
@import '@ckeditor/ckeditor5-link/dist/index.css';
|
|
27
29
|
@import '@ckeditor/ckeditor5-list/dist/index.css';
|
|
28
30
|
// @import '@ckeditor/ckeditor5-media-embed/dist/index.css';
|
|
29
31
|
@import '@ckeditor/ckeditor5-paste-from-office/dist/index.css';
|
|
30
|
-
|
|
32
|
+
|
|
33
|
+
// hung.pham16: không sử dụng default styles của ckeditor vì server không hỗ trợ
|
|
34
|
+
// @import '@ckeditor/ckeditor5-table/dist/index.css';
|
|
35
|
+
@import '@ckeditor/ckeditor5-table/dist/index-editor.css';
|
|
36
|
+
|
|
31
37
|
// @import '@ckeditor/ckeditor5-mention/dist/index.css';
|
|
38
|
+
|
|
39
|
+
// Custom toolbar
|
|
40
|
+
.ck-editor {
|
|
41
|
+
/* --- 1. GIẢM KÍCH THƯỚC ICON VÀ CHỮ --- */
|
|
42
|
+
/* Giảm cỡ chữ trong dropdown (mặc định khoảng 13px) */
|
|
43
|
+
--ck-font-size-base: 11px !important;
|
|
44
|
+
|
|
45
|
+
/* Giảm kích thước Icon (mặc định 20px) */
|
|
46
|
+
--ck-icon-size: 16px !important;
|
|
47
|
+
|
|
48
|
+
/* --- 2. TỐI ƯU KHOẢNG CÁCH (Padding/Margin) --- */
|
|
49
|
+
|
|
50
|
+
/* Giảm khoảng cách giữa các nút */
|
|
51
|
+
--ck-spacing-small: 2px !important;
|
|
52
|
+
--ck-spacing-standard: 6px !important;
|
|
53
|
+
--ck-spacing-large: 8px !important;
|
|
54
|
+
|
|
55
|
+
/* */
|
|
56
|
+
--ck-color-table-focused-cell-background: transparent !important;
|
|
57
|
+
--ck-table-content-default-border-color: transparent !important;
|
|
58
|
+
|
|
59
|
+
//
|
|
60
|
+
--ck-insert-table-dropdown-padding: 10px;
|
|
61
|
+
--ck-insert-table-dropdown-box-height: 16px;
|
|
62
|
+
--ck-insert-table-dropdown-box-width: 16px;
|
|
63
|
+
--ck-insert-table-dropdown-box-margin: 1px;
|
|
64
|
+
|
|
65
|
+
--ck-focus-ring: 1px solid var(--ck-color-base-border);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Giảm độ cao của thanh toolbar (cho gọn) */
|
|
69
|
+
.ck-toolbar {
|
|
70
|
+
min-height: 32px !important; /* Mặc định thường là 40px */
|
|
71
|
+
padding: 2px !important;
|
|
72
|
+
|
|
73
|
+
/* Làm màu nền toolbar nhạt hơn cho hiện đại */
|
|
74
|
+
background: #f8f9fa !important;
|
|
75
|
+
border-bottom: 1px solid #e0e0e0 !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ck-toolbar__items {
|
|
79
|
+
/* Chỉnh nút bấm trong toolbar nhỏ lại */
|
|
80
|
+
> .ck-button {
|
|
81
|
+
padding: 2px 4px !important; /* Giảm padding trái phải của nút */
|
|
82
|
+
min-height: 24px !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Chỉnh lại dropdown (Heading, Font Size) cho khớp */
|
|
86
|
+
> .ck-dropdown {
|
|
87
|
+
min-height: 24px !important;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -81,6 +81,23 @@
|
|
|
81
81
|
.fs-#{$i} {
|
|
82
82
|
font-size: #{$i}px !important;
|
|
83
83
|
}
|
|
84
|
+
|
|
85
|
+
// Gap
|
|
86
|
+
.gap-#{$i} {
|
|
87
|
+
gap: #{$i}px !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.gap-y-#{$i} {
|
|
91
|
+
row-gap: #{$i}px !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.gap-x-#{$i} {
|
|
95
|
+
column-gap: #{$i}px !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.flex-1 {
|
|
100
|
+
flex: 1;
|
|
84
101
|
}
|
|
85
102
|
|
|
86
103
|
.w-full {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
CSS GRID UTILITIES
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* 1. Kích hoạt Grid cơ bản */
|
|
6
|
+
.sd-grid-container {
|
|
7
|
+
display: grid;
|
|
8
|
+
column-gap: 8px;
|
|
9
|
+
row-gap: 0px;
|
|
10
|
+
|
|
11
|
+
/* 2. Định nghĩa tổng số cột của Grid Cha (từ 1 đến 12 cột) */
|
|
12
|
+
@for $i from 1 through 12 {
|
|
13
|
+
&.grid-cols-#{$i} {
|
|
14
|
+
/* Dùng minmax(0, 1fr) thay vì 1fr để chống vỡ layout khi nội dung text quá dài */
|
|
15
|
+
grid-template-columns: repeat($i, minmax(0, 1fr));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* 3. Tiện ích chiếm CỘT (Column Spanning) cho phần tử con */
|
|
20
|
+
@for $i from 1 through 12 {
|
|
21
|
+
.col-span-#{$i} {
|
|
22
|
+
grid-column: span #{$i} / span #{$i};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/* Chiếm toàn bộ số cột hiện có (Full width) */
|
|
26
|
+
.col-span-full {
|
|
27
|
+
grid-column: 1 / -1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 4. Tiện ích chiếm HÀNG (Row Spanning) cho phần tử con */
|
|
31
|
+
@for $i from 1 through 12 {
|
|
32
|
+
.row-span-#{$i} {
|
|
33
|
+
grid-row: span #{$i} / span #{$i};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/* Chiếm toàn bộ hàng (Full height) */
|
|
37
|
+
.row-span-full {
|
|
38
|
+
grid-row: 1 / -1;
|
|
39
|
+
}
|
|
40
|
+
}
|
package/assets/scss/sd-core.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/avatar.component';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdAvatar implements OnInit {
|
|
4
|
+
#private;
|
|
5
|
+
src: string | undefined | null;
|
|
6
|
+
size: number;
|
|
7
|
+
name: string;
|
|
8
|
+
isUrl: boolean;
|
|
9
|
+
initials: string;
|
|
10
|
+
bgColor: string;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
handleError(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdAvatar, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdAvatar, "sd-avatar", never, { "src": { "alias": "src"; "required": true; }; "size": { "alias": "size"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -1,27 +1,85 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { SdColor, SdSize } from '@sd-angular/core/utilities/models';
|
|
3
|
+
import { MaterialIconFontSet } from '@sd-angular/core/utilities/models';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
export type SdBadgeType = 'tag' | 'round' | 'icon';
|
|
4
6
|
export declare class SdBadge {
|
|
5
7
|
defaultIcon: string;
|
|
6
|
-
type:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
icon: string | undefined | null;
|
|
22
|
-
size: SdSize;
|
|
23
|
-
sdClick: EventEmitter<any>;
|
|
8
|
+
type: import("@angular/core").InputSignalWithTransform<SdBadgeType, SdBadgeType | null | undefined>;
|
|
9
|
+
color: import("@angular/core").InputSignalWithTransform<SdColor, SdColor | null | undefined>;
|
|
10
|
+
primary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
11
|
+
secondary: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
|
+
success: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
13
|
+
info: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
14
|
+
warning: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
error: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
16
|
+
fontSet: import("@angular/core").InputSignalWithTransform<MaterialIconFontSet, MaterialIconFontSet | null | undefined>;
|
|
17
|
+
title: import("@angular/core").InputSignal<string | number | null | undefined>;
|
|
18
|
+
description: import("@angular/core").InputSignal<string | null | undefined>;
|
|
19
|
+
tooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
20
|
+
icon: import("@angular/core").InputSignal<string | null | undefined>;
|
|
21
|
+
size: import("@angular/core").InputSignalWithTransform<SdSize, SdSize | null | undefined>;
|
|
22
|
+
click: EventEmitter<Event>;
|
|
24
23
|
onClick: (event: Event) => void;
|
|
24
|
+
effectiveColor: import("@angular/core").Signal<SdColor>;
|
|
25
|
+
baseColorClasses: import("@angular/core").Signal<{
|
|
26
|
+
'c-primary': boolean;
|
|
27
|
+
'c-secondary': boolean;
|
|
28
|
+
'c-info': boolean;
|
|
29
|
+
'c-success': boolean;
|
|
30
|
+
'c-warning': boolean;
|
|
31
|
+
'c-error': boolean;
|
|
32
|
+
}>;
|
|
33
|
+
iconColorClasses: import("@angular/core").Signal<{
|
|
34
|
+
'c-primary': boolean;
|
|
35
|
+
'c-black400': boolean;
|
|
36
|
+
'c-info': boolean;
|
|
37
|
+
'c-success': boolean;
|
|
38
|
+
'c-warning': boolean;
|
|
39
|
+
'c-error': boolean;
|
|
40
|
+
}>;
|
|
41
|
+
iconSizeAndFontClasses: import("@angular/core").Signal<{
|
|
42
|
+
'c-xs': boolean;
|
|
43
|
+
'c-sm': boolean;
|
|
44
|
+
'c-md': boolean;
|
|
45
|
+
'c-lg': boolean;
|
|
46
|
+
'material-icons': boolean;
|
|
47
|
+
'material-icons-outlined': boolean;
|
|
48
|
+
'material-icons-round': boolean;
|
|
49
|
+
'material-icons-sharp': boolean;
|
|
50
|
+
}>;
|
|
51
|
+
tagIconCombinedClasses: import("@angular/core").Signal<{
|
|
52
|
+
'c-primary': boolean;
|
|
53
|
+
'c-secondary': boolean;
|
|
54
|
+
'c-info': boolean;
|
|
55
|
+
'c-success': boolean;
|
|
56
|
+
'c-warning': boolean;
|
|
57
|
+
'c-error': boolean;
|
|
58
|
+
'c-xs': boolean;
|
|
59
|
+
'c-sm': boolean;
|
|
60
|
+
'c-md': boolean;
|
|
61
|
+
'c-lg': boolean;
|
|
62
|
+
'material-icons': boolean;
|
|
63
|
+
'material-icons-outlined': boolean;
|
|
64
|
+
'material-icons-round': boolean;
|
|
65
|
+
'material-icons-sharp': boolean;
|
|
66
|
+
}>;
|
|
67
|
+
iconCombinedClasses: import("@angular/core").Signal<{
|
|
68
|
+
'c-primary': boolean;
|
|
69
|
+
'c-black400': boolean;
|
|
70
|
+
'c-info': boolean;
|
|
71
|
+
'c-success': boolean;
|
|
72
|
+
'c-warning': boolean;
|
|
73
|
+
'c-error': boolean;
|
|
74
|
+
'c-xs': boolean;
|
|
75
|
+
'c-sm': boolean;
|
|
76
|
+
'c-md': boolean;
|
|
77
|
+
'c-lg': boolean;
|
|
78
|
+
'material-icons': boolean;
|
|
79
|
+
'material-icons-outlined': boolean;
|
|
80
|
+
'material-icons-round': boolean;
|
|
81
|
+
'material-icons-sharp': boolean;
|
|
82
|
+
}>;
|
|
25
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdBadge, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdBadge, "sd-badge", never, { "
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdBadge, "sd-badge", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "secondary": { "alias": "secondary"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "info": { "alias": "info"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
|
|
27
85
|
}
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
3
|
-
import { SdColor } from '@sd-angular/core/utilities/models';
|
|
3
|
+
import { MaterialIconFontSet, SdColor } from '@sd-angular/core/utilities/models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
export type SdButtonType = 'fill' | 'light' | 'outline' | 'link';
|
|
6
|
+
export type SdButtonSize = 'sm' | 'md' | 'lg';
|
|
5
7
|
export declare class SdButton extends SdBaseSecureComponent implements OnInit, OnDestroy {
|
|
6
8
|
#private;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
title: string |
|
|
14
|
-
width: string |
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
get disabledAttr(): "true" | null;
|
|
23
|
-
set _disabled(value: '' | boolean | undefined | null);
|
|
24
|
-
loading: boolean;
|
|
25
|
-
click: EventEmitter<Event>;
|
|
26
|
-
constructor();
|
|
27
|
-
ngOnInit(): void;
|
|
28
|
-
onInternalClick(event: Event): void;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
get buttonClasses(): {
|
|
9
|
+
private el;
|
|
10
|
+
autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
11
|
+
type: import("@angular/core").InputSignalWithTransform<SdButtonType, SdButtonType | null | undefined>;
|
|
12
|
+
color: import("@angular/core").InputSignalWithTransform<SdColor, SdColor | null | undefined>;
|
|
13
|
+
size: import("@angular/core").InputSignalWithTransform<SdButtonSize, SdButtonSize | null | undefined>;
|
|
14
|
+
fontSet: import("@angular/core").InputSignalWithTransform<MaterialIconFontSet, MaterialIconFontSet | null | undefined>;
|
|
15
|
+
title: import("@angular/core").InputSignal<string | null | undefined>;
|
|
16
|
+
width: import("@angular/core").InputSignal<string | null | undefined>;
|
|
17
|
+
tooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
18
|
+
prefixIcon: import("@angular/core").InputSignal<string | null | undefined>;
|
|
19
|
+
suffixIcon: import("@angular/core").InputSignal<string | null | undefined>;
|
|
20
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
autoId: import("@angular/core").Signal<string | undefined>;
|
|
23
|
+
buttonClasses: import("@angular/core").Signal<{
|
|
31
24
|
'c-square': boolean | "" | null | undefined;
|
|
32
25
|
'c-sm': boolean;
|
|
33
26
|
'c-md': boolean;
|
|
34
27
|
'c-lg': boolean;
|
|
35
28
|
'c-disabled': boolean;
|
|
36
|
-
}
|
|
29
|
+
}>;
|
|
30
|
+
click: import("@angular/core").OutputEmitterRef<Event>;
|
|
31
|
+
constructor();
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
onInternalClick(event: Event): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
37
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdButton, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdButton, "sd-button", never, { "
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdButton, "sd-button", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fontSet": { "alias": "fontSet"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "click": "click"; }, never, never, true, never>;
|
|
39
37
|
}
|
|
@@ -1,67 +1,48 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { ClassicEditor, ModelRange } from 'ckeditor5';
|
|
3
|
-
import {
|
|
3
|
+
import { CkCommentPlugin } from './plugins';
|
|
4
|
+
import { SdDocumentBuilderHeading, SdDocumentBuilderOption, SdDocumentBuilderVariable, SdEditorConfig } from './document-builder.model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class SdDocumentBuilder {
|
|
6
7
|
#private;
|
|
7
8
|
option: SdDocumentBuilderOption;
|
|
8
9
|
disabled: boolean;
|
|
9
10
|
set _disabled(val: boolean | '' | undefined | null);
|
|
11
|
+
contentChange: EventEmitter<string>;
|
|
10
12
|
Editor: typeof ClassicEditor;
|
|
11
13
|
config: SdEditorConfig;
|
|
12
|
-
contentChange: EventEmitter<string>;
|
|
13
14
|
ngOnInit(): void;
|
|
14
15
|
ngOnDestroy(): void;
|
|
15
16
|
onReady(editor: ClassicEditor): void;
|
|
16
|
-
scrollToComment: (markerId: string) => void;
|
|
17
17
|
setContent: (html: string) => void;
|
|
18
18
|
getContent: () => string;
|
|
19
19
|
setOrientation: (orientation: "PORTRAIT" | "LANDSCAPE") => void;
|
|
20
20
|
getOrientation: () => "PORTRAIT" | "LANDSCAPE";
|
|
21
|
-
getVariables: () => SdDocumentBuilderVariable[];
|
|
22
|
-
getComments(): SdDocumentBuilderComment[];
|
|
23
21
|
scrollToTop(): void;
|
|
24
22
|
heading: {
|
|
25
|
-
getHeadings: () => SdDocumentBuilderHeading[];
|
|
26
|
-
scrollToHeading: (id: string) => void;
|
|
27
|
-
};
|
|
28
|
-
comment: {
|
|
29
|
-
/**
|
|
30
|
-
* Lấy tất cả comments trong document
|
|
31
|
-
* @returns Danh sách tất cả comments
|
|
32
|
-
*/
|
|
33
|
-
all: () => SdDocumentBuilderComment[];
|
|
34
|
-
/**
|
|
35
|
-
* Thêm comment vào vùng text đang được chọn
|
|
36
|
-
* @param comment - Dữ liệu comment
|
|
37
|
-
* @param data - Dữ liệu extra data
|
|
38
|
-
* @returns SdDocumentBuilderComment hoặc null nếu không có text được chọn
|
|
39
|
-
*/
|
|
40
|
-
add: <T = any>(range: ModelRange, comment: string, data?: T) => SdDocumentBuilderComment<T> | null;
|
|
41
23
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @
|
|
44
|
-
* @param commentData - Dữ liệu mới
|
|
45
|
-
* @returns Comment đã cập nhật hoặc null
|
|
24
|
+
* Lấy tất cả headings trong document
|
|
25
|
+
* @returns Danh sách tất cả headings
|
|
46
26
|
*/
|
|
47
|
-
|
|
27
|
+
all: () => SdDocumentBuilderHeading[];
|
|
48
28
|
/**
|
|
49
|
-
*
|
|
50
|
-
* @param
|
|
51
|
-
* @returns Comment hoặc null
|
|
29
|
+
* Scroll tới vị trí của heading
|
|
30
|
+
* @param id - ID của heading cần scroll tới
|
|
52
31
|
*/
|
|
53
|
-
|
|
32
|
+
scroll: (id: string) => void;
|
|
33
|
+
};
|
|
34
|
+
getCommentPluginAPI(): CkCommentPlugin | null;
|
|
35
|
+
variable: {
|
|
54
36
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @
|
|
57
|
-
* @returns true nếu xóa thành công, false nếu không tìm thấy
|
|
37
|
+
* Lấy tất cả variabes trong document
|
|
38
|
+
* @returns Danh sách tất cả variables
|
|
58
39
|
*/
|
|
59
|
-
|
|
40
|
+
all: <T = any>() => SdDocumentBuilderVariable<T>[];
|
|
60
41
|
/**
|
|
61
|
-
* Scroll
|
|
62
|
-
* @param
|
|
42
|
+
* Scroll tới vị trí của variable
|
|
43
|
+
* @param uuid - uuid của variable FE sẽ tự sinh sau mỗi lần drop vào editor
|
|
63
44
|
*/
|
|
64
|
-
scroll: (
|
|
45
|
+
scroll: (uuid: string) => void;
|
|
65
46
|
};
|
|
66
47
|
/**
|
|
67
48
|
* Xuất file Word có Header/Footer
|
|
@@ -76,6 +57,8 @@ export declare class SdDocumentBuilder {
|
|
|
76
57
|
header?: string;
|
|
77
58
|
footer?: string;
|
|
78
59
|
}): void;
|
|
60
|
+
hightSelectRange: (range: ModelRange) => void;
|
|
61
|
+
removeHighlightSeclectRange: () => void;
|
|
79
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdDocumentBuilder, never>;
|
|
80
63
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdDocumentBuilder, "sd-document-builder", never, { "option": { "alias": "option"; "required": true; }; "_disabled": { "alias": "disabled"; "required": false; }; }, { "contentChange": "contentChange"; }, never, never, true, never>;
|
|
81
64
|
}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { EditorConfig, EventInfo, ModelDocumentSelection,
|
|
1
|
+
import { EditorConfig, EventInfo, ModelDocumentSelection, ViewDataTransfer } from 'ckeditor5';
|
|
2
|
+
import { CkCommentConfig } from './plugins/ck-comment/ck-comment.plugin.model';
|
|
2
3
|
export type SdEditorConfig = EditorConfig & {
|
|
3
4
|
getOption?: () => SdDocumentBuilderOption;
|
|
4
5
|
};
|
|
5
6
|
export interface SdDocumentBuilderOption {
|
|
6
7
|
onDropVariable?: (variable: SdDocumentBuilderVariable, dropIndex: number) => boolean | Promise<boolean | SdDocumentBuilderVariable>;
|
|
7
|
-
|
|
8
|
-
onSelectComment?: (markerId: string) => void;
|
|
8
|
+
comment?: CkCommentConfig;
|
|
9
9
|
onSelection?: (selection: ModelDocumentSelection, $event: EventInfo<string, unknown>) => void;
|
|
10
10
|
onOrientation?: (orientation: 'PORTRAIT' | 'LANDSCAPE') => void;
|
|
11
|
+
onPaste?: (data: SdPasteEventData) => void | Promise<void>;
|
|
11
12
|
orientation?: 'PORTRAIT' | 'LANDSCAPE';
|
|
12
13
|
}
|
|
13
14
|
export interface SdDocumentBuilderVariable<T = any> {
|
|
14
15
|
id: string;
|
|
16
|
+
uuid?: string;
|
|
15
17
|
value: string;
|
|
16
18
|
display: string;
|
|
17
19
|
data?: T;
|
|
18
20
|
}
|
|
19
|
-
export interface SdDocumentBuilderComment<T = any> {
|
|
20
|
-
markerId: string;
|
|
21
|
-
selectedText: string;
|
|
22
|
-
comment?: string;
|
|
23
|
-
createdAt?: Date;
|
|
24
|
-
data?: T;
|
|
25
|
-
}
|
|
26
21
|
export interface SdDocumentBuilderHeading {
|
|
27
22
|
id: string;
|
|
28
23
|
text: string;
|
|
29
24
|
level: number;
|
|
30
25
|
type: string;
|
|
31
26
|
}
|
|
27
|
+
export interface SdPasteEventData {
|
|
28
|
+
html?: string;
|
|
29
|
+
text: string;
|
|
30
|
+
source: 'word' | 'excel' | 'google-docs' | 'web' | 'unknown';
|
|
31
|
+
dataTransfer: ViewDataTransfer;
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin để thêm margin-bottom: 4px cho các block elements
|
|
4
|
+
* (paragraph, heading, list, table) thông qua downcast conversion
|
|
5
|
+
*/
|
|
6
|
+
export declare class BlockSpace extends Plugin {
|
|
7
|
+
static get pluginName(): string;
|
|
8
|
+
init(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Plugin, ContextualBalloon } from 'ckeditor5';
|
|
2
|
+
import { CkComment, CkCommentConfig, CkCommentColors } from './ck-comment.plugin.model';
|
|
3
|
+
export declare class CkCommentPlugin extends Plugin {
|
|
4
|
+
#private;
|
|
5
|
+
static get pluginName(): string;
|
|
6
|
+
static get requires(): (typeof ContextualBalloon)[];
|
|
7
|
+
static readonly PENDING_MARKER_ID = "__pending_comment__";
|
|
8
|
+
static readonly DEFAULT_SEARCH_RANGE = 5;
|
|
9
|
+
static readonly DEFAULT_COLORS: CkCommentColors;
|
|
10
|
+
init(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Thiết lập config với callbacks
|
|
13
|
+
*/
|
|
14
|
+
setConfig(config: CkCommentConfig): void;
|
|
15
|
+
/**
|
|
16
|
+
* Thêm comment và tạo marker
|
|
17
|
+
*/
|
|
18
|
+
addComment(comment: CkComment): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Xóa comment theo id
|
|
21
|
+
*/
|
|
22
|
+
removeComment(id: string | number): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Chọn comment theo id - chỉ thêm class highlight, không bôi đen text
|
|
25
|
+
*/
|
|
26
|
+
selectComment(id: string | number, scrollIntoView?: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Thiết lập tất cả comments (khôi phục từ dữ liệu)
|
|
29
|
+
*/
|
|
30
|
+
setComments(comments: CkComment[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* Lấy tất cả comments
|
|
33
|
+
*/
|
|
34
|
+
get comments(): CkComment[];
|
|
35
|
+
/**
|
|
36
|
+
* Thiết lập pending highlight cho selection (khi user đang nhập nội dung comment)
|
|
37
|
+
*/
|
|
38
|
+
setPendingSelection(startPath: number[], endPath: number[]): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Xóa pending highlight và fire onCancelPending callback
|
|
41
|
+
*/
|
|
42
|
+
clearPendingSelection(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ModelRange } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* Comment status based on text changes
|
|
4
|
+
*/
|
|
5
|
+
export type CkCommentStatus = 'normal' | 'modified' | 'broken';
|
|
6
|
+
/**
|
|
7
|
+
* Color configuration for comment markers
|
|
8
|
+
*/
|
|
9
|
+
export interface CkCommentColors {
|
|
10
|
+
marker?: string;
|
|
11
|
+
markerSelected?: string;
|
|
12
|
+
markerPending?: string;
|
|
13
|
+
markerModified?: string;
|
|
14
|
+
markerBroken?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Comment data structure for CkCommentPlugin
|
|
18
|
+
*/
|
|
19
|
+
export interface CkComment<T = any> {
|
|
20
|
+
id: string | number;
|
|
21
|
+
startPath: number[];
|
|
22
|
+
endPath: number[];
|
|
23
|
+
originalText: string;
|
|
24
|
+
currentText: string;
|
|
25
|
+
status: CkCommentStatus;
|
|
26
|
+
data?: T;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Config for CkCommentPlugin
|
|
30
|
+
*/
|
|
31
|
+
export interface CkCommentConfig {
|
|
32
|
+
onPendingComment?: (comment: CkComment) => void;
|
|
33
|
+
onAddComment?: (comment: CkComment) => void;
|
|
34
|
+
onSelectComment?: (id: string | number) => void;
|
|
35
|
+
onRemoveComment?: (id: string | number) => void;
|
|
36
|
+
onChange?: (comments: CkComment[]) => void;
|
|
37
|
+
onCancelPending?: () => void;
|
|
38
|
+
searchRange?: number;
|
|
39
|
+
debug?: boolean;
|
|
40
|
+
colors?: CkCommentColors;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Data returned when user selects text for comment
|
|
44
|
+
*/
|
|
45
|
+
export interface CkCommentSelection {
|
|
46
|
+
range: ModelRange;
|
|
47
|
+
startPath: number[];
|
|
48
|
+
endPath: number[];
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Plugin } from 'ckeditor5';
|
|
2
|
+
export declare class ImageCustomPlugin extends Plugin {
|
|
3
|
+
static get pluginName(): "ImageCustomPlugin";
|
|
4
|
+
init(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Xử lý sự kiện chèn ảnh
|
|
7
|
+
*/
|
|
8
|
+
private handleImageInsert;
|
|
9
|
+
/**
|
|
10
|
+
* Xử lý sự kiện thay đổi attribute ảnh
|
|
11
|
+
*/
|
|
12
|
+
private handleImageAttributeChange;
|
|
13
|
+
/**
|
|
14
|
+
* Xử lý sự kiện thay đổi style ảnh - thêm float inline style cho căn chỉnh
|
|
15
|
+
*/
|
|
16
|
+
private handleImageStyleChange;
|
|
17
|
+
/**
|
|
18
|
+
* Áp dụng custom styles cho element ảnh
|
|
19
|
+
*/
|
|
20
|
+
private applyCustomStyles;
|
|
21
|
+
/**
|
|
22
|
+
* Tìm container ck-widget (element figure)
|
|
23
|
+
* CKEditor wrap ảnh block trong <figure class="ck-widget"><img></figure>
|
|
24
|
+
*/
|
|
25
|
+
private findWidgetElement;
|
|
26
|
+
/**
|
|
27
|
+
* Tìm element img thực tế bên trong widget structure
|
|
28
|
+
* CKEditor wrap ảnh block trong <figure class="ck-widget"><img></figure>
|
|
29
|
+
*/
|
|
30
|
+
private findImgElement;
|
|
31
|
+
}
|