@ckeditor/ckeditor5-template 39.0.1 → 40.0.0
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/CHANGELOG.md +1 -1
- package/LICENSE.md +4 -4
- package/README.md +7 -7
- package/build/template.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +1 -2
- package/lang/translations/ar.po +1 -4
- package/lang/translations/bg.po +1 -4
- package/lang/translations/bn.po +1 -4
- package/lang/translations/ca.po +1 -4
- package/lang/translations/cs.po +1 -4
- package/lang/translations/da.po +1 -4
- package/lang/translations/de.po +1 -4
- package/lang/translations/el.po +1 -4
- package/lang/translations/en-au.po +1 -4
- package/lang/translations/en.po +1 -4
- package/lang/translations/es.po +1 -4
- package/lang/translations/et.po +1 -4
- package/lang/translations/fi.po +1 -4
- package/lang/translations/fr.po +1 -4
- package/lang/translations/gl.po +1 -4
- package/lang/translations/he.po +1 -4
- package/lang/translations/hi.po +1 -4
- package/lang/translations/hr.po +1 -4
- package/lang/translations/hu.po +1 -4
- package/lang/translations/id.po +1 -4
- package/lang/translations/it.po +1 -4
- package/lang/translations/ja.po +1 -4
- package/lang/translations/ko.po +1 -4
- package/lang/translations/lt.po +1 -4
- package/lang/translations/lv.po +1 -4
- package/lang/translations/ms.po +1 -4
- package/lang/translations/nl.po +1 -4
- package/lang/translations/no.po +1 -4
- package/lang/translations/pl.po +1 -4
- package/lang/translations/pt-br.po +1 -4
- package/lang/translations/pt.po +1 -4
- package/lang/translations/ro.po +1 -4
- package/lang/translations/ru.po +1 -4
- package/lang/translations/sk.po +1 -4
- package/lang/translations/sr.po +1 -4
- package/lang/translations/sv.po +1 -4
- package/lang/translations/th.po +1 -4
- package/lang/translations/tr.po +1 -4
- package/lang/translations/uk.po +1 -4
- package/lang/translations/uz.po +1 -4
- package/lang/translations/vi.po +1 -4
- package/lang/translations/zh-cn.po +1 -4
- package/lang/translations/zh.po +1 -4
- package/package.json +3 -8
- package/src/augmentation.d.ts +23 -23
- package/src/index.d.ts +13 -13
- package/src/index.js +1 -1
- package/src/template.d.ts +115 -115
- package/src/template.js +1 -1
- package/src/templatecommand.d.ts +23 -23
- package/src/templatecommand.js +1 -1
- package/src/templateediting.d.ts +30 -30
- package/src/templateediting.js +1 -1
- package/src/templateui.d.ts +29 -29
- package/src/templateui.js +1 -1
- package/src/ui/templatelistbuttonview.d.ts +104 -104
- package/src/ui/templatelistbuttonview.js +1 -1
- package/src/ui/templatelistitemview.d.ts +34 -34
- package/src/ui/templatelistitemview.js +1 -1
- package/src/ui/templatelistview.d.ts +38 -0
- package/src/ui/templatelistview.js +23 -0
- package/theme/template.css +95 -187
- package/build/translations/sq.js +0 -1
- package/lang/translations/sq.po +0 -41
- package/src/ui/templateforminfoview.d.ts +0 -51
- package/src/ui/templateforminfoview.js +0 -23
- package/src/ui/templateformsearchfieldview.d.ts +0 -43
- package/src/ui/templateformsearchfieldview.js +0 -23
- package/src/ui/templateformview.d.ts +0 -110
- package/src/ui/templateformview.js +0 -23
- package/theme/icons/loupe.svg +0 -1
package/theme/template.css
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
3
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
4
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
5
|
+
*
|
|
2
6
|
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
7
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
8
|
*/
|
|
5
9
|
|
|
6
|
-
@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
|
|
7
10
|
@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
|
|
8
11
|
|
|
9
12
|
:root {
|
|
10
13
|
--ck-template-dropdown-view-width: 345px;
|
|
11
14
|
--ck-template-dropdown-view-height: 300px;
|
|
12
|
-
--ck-template-list-height: 245px;
|
|
13
15
|
--ck-template-icon-size: 45px;
|
|
14
|
-
--ck-template-search-field-horizontal-spacing: calc(var(--ck-icon-size) + var(--ck-spacing-medium));
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.ck.ck-template-form {
|
|
@@ -21,215 +22,122 @@
|
|
|
21
22
|
--ck-template-dropdown-view-width: 260px;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
& > .ck-
|
|
25
|
-
|
|
26
|
-
padding: calc(2 * var(--ck-spacing-large)) var(--ck-spacing-large);
|
|
27
|
-
text-align: center;
|
|
28
|
-
|
|
29
|
-
& * {
|
|
30
|
-
white-space: normal;
|
|
31
|
-
text-align: center;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
& > span:first-child {
|
|
35
|
-
display: block;
|
|
36
|
-
font-weight: bold;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
& > span:last-child {
|
|
40
|
-
margin-top: var(--ck-spacing-medium);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* Hide the entire list when nothing was found */
|
|
44
|
-
&:not(.ck-hidden) ~ .ck-list {
|
|
45
|
-
display: none;
|
|
46
|
-
}
|
|
25
|
+
& > .ck-labeled-field-view {
|
|
26
|
+
padding: var(--ck-spacing-large);
|
|
47
27
|
}
|
|
48
28
|
|
|
49
|
-
& > .ck
|
|
50
|
-
|
|
51
|
-
padding: var(--ck-spacing-large);
|
|
52
|
-
overflow-x: hidden;
|
|
53
|
-
overflow-y: auto;
|
|
54
|
-
overscroll-behavior: contain;
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* This is a dirty way to increase the selector specificity and override the default rounded corners
|
|
58
|
-
* of a list inside a dropdown panel
|
|
59
|
-
*/
|
|
60
|
-
@nest .ck-rounded-corners & {
|
|
61
|
-
border-radius: 0;
|
|
62
|
-
}
|
|
29
|
+
& > .ck-search__results {
|
|
30
|
+
border-top: 1px solid var(--ck-color-base-border);
|
|
63
31
|
|
|
64
|
-
& > .ck.ck-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
32
|
+
& > .ck.ck-list.ck-template-list {
|
|
33
|
+
max-height: var(--ck-template-dropdown-view-height);
|
|
34
|
+
padding: var(--ck-spacing-large);
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
overflow-y: auto;
|
|
37
|
+
overscroll-behavior: contain;
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* This is a dirty way to increase the selector specificity and override the default rounded corners
|
|
41
|
+
* of a list inside a dropdown panel
|
|
42
|
+
*/
|
|
43
|
+
@nest .ck-rounded-corners & {
|
|
44
|
+
border-radius: 0;
|
|
68
45
|
}
|
|
69
46
|
|
|
70
|
-
& > .ck.ck-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
border-radius: var(--ck-border-radius);
|
|
75
|
-
|
|
76
|
-
/* Crop the icon when the border-radius is large */
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
|
|
79
|
-
display: grid;
|
|
80
|
-
grid-template-columns: var(--ck-template-icon-size) 1fr;
|
|
81
|
-
grid-template-rows: var(--ck-template-icon-size);
|
|
82
|
-
grid-auto-columns: 1fr;
|
|
83
|
-
|
|
84
|
-
gap: var(--ck-spacing-large) var(--ck-spacing-large);
|
|
85
|
-
grid-auto-flow: column dense;
|
|
86
|
-
align-items: center;
|
|
87
|
-
grid-template-areas: "ck-template-icon ck-template-content";
|
|
88
|
-
|
|
89
|
-
&:not(:focus) {
|
|
90
|
-
border-color: var(--ck-color-dropdown-panel-background);
|
|
47
|
+
& > .ck.ck-list__item {
|
|
48
|
+
/* This is an easy way to address the problem of spacings between hidden and visible list items */
|
|
49
|
+
&:not(.ck-hidden) ~ .ck.ck-list__item {
|
|
50
|
+
margin-top: var(--ck-spacing-large);
|
|
91
51
|
}
|
|
92
52
|
|
|
93
|
-
& > .ck.ck-
|
|
94
|
-
width:
|
|
95
|
-
height: auto;
|
|
96
|
-
grid-area: ck-template-icon;
|
|
53
|
+
& > .ck.ck-button {
|
|
54
|
+
width: 100%;
|
|
97
55
|
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
border-radius: var(--ck-border-radius);
|
|
98
58
|
|
|
99
|
-
/*
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
& * {
|
|
103
|
-
color: unset;
|
|
104
|
-
|
|
105
|
-
&:not([fill]) {
|
|
106
|
-
fill: unset;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
59
|
+
/* Crop the icon when the border-radius is large */
|
|
60
|
+
overflow: hidden;
|
|
110
61
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
height: 100%;
|
|
116
|
-
grid-area: ck-template-content;
|
|
117
|
-
min-width: 0;
|
|
118
|
-
margin: 0;
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: var(--ck-template-icon-size) 1fr;
|
|
64
|
+
grid-template-rows: var(--ck-template-icon-size);
|
|
65
|
+
grid-auto-columns: 1fr;
|
|
119
66
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
color: var(--ck-color-text);
|
|
125
|
-
line-height: 1.1;
|
|
67
|
+
gap: var(--ck-spacing-large) var(--ck-spacing-large);
|
|
68
|
+
grid-auto-flow: column dense;
|
|
69
|
+
align-items: center;
|
|
70
|
+
grid-template-areas: "ck-template-icon ck-template-content";
|
|
126
71
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
text-overflow: ellipsis;
|
|
72
|
+
&:not(:focus) {
|
|
73
|
+
border-color: var(--ck-color-dropdown-panel-background);
|
|
130
74
|
}
|
|
131
75
|
|
|
132
|
-
& .ck-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
76
|
+
& > .ck.ck-icon {
|
|
77
|
+
width: var(--ck-template-icon-size);
|
|
78
|
+
height: auto;
|
|
79
|
+
grid-area: ck-template-icon;
|
|
80
|
+
margin: 0;
|
|
137
81
|
|
|
138
|
-
/*
|
|
139
|
-
|
|
82
|
+
/* Override default rules for icons to allow any fill color. */
|
|
83
|
+
color: unset;
|
|
140
84
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
text-overflow: ellipsis;
|
|
144
|
-
-webkit-box-orient: vertical;
|
|
145
|
-
-webkit-line-clamp: 2;
|
|
146
|
-
}
|
|
85
|
+
& * {
|
|
86
|
+
color: unset;
|
|
147
87
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
line-height: inherit;
|
|
153
|
-
font-size: inherit;
|
|
88
|
+
&:not([fill]) {
|
|
89
|
+
fill: unset;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
154
92
|
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
93
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
@mixin ck-dir rtl {
|
|
182
|
-
right: var(--ck-spacing-medium);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
& .ck-input {
|
|
187
|
-
width: 100%;
|
|
94
|
+
& > .ck-template-form__text-part {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
justify-content: space-evenly;
|
|
98
|
+
height: 100%;
|
|
99
|
+
grid-area: ck-template-content;
|
|
100
|
+
min-width: 0;
|
|
101
|
+
margin: 0;
|
|
102
|
+
|
|
103
|
+
& > .ck.ck-button__label {
|
|
104
|
+
display: block;
|
|
105
|
+
font-weight: bold;
|
|
106
|
+
font-size: var(--ck-font-size-base);
|
|
107
|
+
color: var(--ck-color-text);
|
|
108
|
+
line-height: 1.1;
|
|
109
|
+
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
text-overflow: ellipsis;
|
|
113
|
+
}
|
|
188
114
|
|
|
189
|
-
|
|
190
|
-
|
|
115
|
+
& .ck-template-form__description {
|
|
116
|
+
display: -webkit-box;
|
|
117
|
+
font-size: 0.85em;
|
|
118
|
+
color: var(--ck-color-text);
|
|
119
|
+
line-height: 1.1;
|
|
191
120
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
}
|
|
121
|
+
/* Leave some tiny spacing between title and description. */
|
|
122
|
+
margin-top: var(--ck-spacing-tiny);
|
|
196
123
|
|
|
197
|
-
|
|
198
|
-
|
|
124
|
+
white-space: normal;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
-webkit-box-orient: vertical;
|
|
128
|
+
-webkit-line-clamp: 2;
|
|
129
|
+
}
|
|
199
130
|
|
|
200
|
-
|
|
201
|
-
|
|
131
|
+
& mark {
|
|
132
|
+
background: var(--ck-color-highlight-background);
|
|
133
|
+
vertical-align: initial;
|
|
134
|
+
font-weight: inherit;
|
|
135
|
+
line-height: inherit;
|
|
136
|
+
font-size: inherit;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
202
139
|
}
|
|
203
140
|
}
|
|
204
141
|
}
|
|
205
|
-
|
|
206
|
-
& .ck-template-form__clear-search {
|
|
207
|
-
position: absolute;
|
|
208
|
-
top: 50%;
|
|
209
|
-
transform: translateY(-50%);
|
|
210
|
-
min-width: auto;
|
|
211
|
-
min-height: auto;
|
|
212
|
-
|
|
213
|
-
background: none;
|
|
214
|
-
opacity: .5;
|
|
215
|
-
padding: 0;
|
|
216
|
-
|
|
217
|
-
@mixin ck-dir ltr {
|
|
218
|
-
right: var(--ck-spacing-medium);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
@mixin ck-dir rtl {
|
|
222
|
-
left: var(--ck-spacing-medium);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
&:hover {
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
& > .ck-template-form__info:not(:only-child),
|
|
232
|
-
& > .ck.ck-list {
|
|
233
|
-
border-top: 1px solid var(--ck-color-base-border);
|
|
234
142
|
}
|
|
235
143
|
}
|
package/build/translations/sq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e){const t=e.sq=e.sq||{};t.dictionary=Object.assign(t.dictionary||{},{Clear:"Pastro","Insert template":"","No templates available.":"",'No templates were found matching "%0".':"","Please try a different phrase or check the spelling.":"","Search template":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/lang/translations/sq.po
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# !!! IMPORTANT !!!
|
|
4
|
-
#
|
|
5
|
-
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
-
# translations is possible ONLY via the Transifex online service.
|
|
7
|
-
#
|
|
8
|
-
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
-
#
|
|
10
|
-
# To learn more, check out the official contributor's guide:
|
|
11
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
-
#
|
|
13
|
-
msgid ""
|
|
14
|
-
msgstr ""
|
|
15
|
-
"Language-Team: Albanian (https://app.transifex.com/ckeditor/teams/11143/sq/)\n"
|
|
16
|
-
"Language: sq\n"
|
|
17
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
-
|
|
19
|
-
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
|
-
msgid "Insert template"
|
|
21
|
-
msgstr ""
|
|
22
|
-
|
|
23
|
-
msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
|
|
24
|
-
msgid "No templates available."
|
|
25
|
-
msgstr ""
|
|
26
|
-
|
|
27
|
-
msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
|
|
28
|
-
msgid "No templates were found matching \"%0\"."
|
|
29
|
-
msgstr ""
|
|
30
|
-
|
|
31
|
-
msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
|
|
32
|
-
msgid "Please try a different phrase or check the spelling."
|
|
33
|
-
msgstr ""
|
|
34
|
-
|
|
35
|
-
msgctxt "The label of the input allowing users to search templates."
|
|
36
|
-
msgid "Search template"
|
|
37
|
-
msgstr ""
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Pastro"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module template/ui/templateforminfoview
|
|
7
|
-
*/
|
|
8
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { View } from 'ckeditor5/src/ui';
|
|
10
|
-
/**
|
|
11
|
-
* A view displaying an information text related to different states of the template form view.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
export default class TemplateFormInfoView extends View {
|
|
16
|
-
/**
|
|
17
|
-
* Controls whether the view is visible.
|
|
18
|
-
*
|
|
19
|
-
* @observable
|
|
20
|
-
* @default false
|
|
21
|
-
*/
|
|
22
|
-
isVisible: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Controls the primary line of text in the info.
|
|
25
|
-
*
|
|
26
|
-
* @observable
|
|
27
|
-
* @default ''
|
|
28
|
-
*/
|
|
29
|
-
primaryText: string;
|
|
30
|
-
/**
|
|
31
|
-
* Controls the secondary line of text in the info.
|
|
32
|
-
*
|
|
33
|
-
* @observable
|
|
34
|
-
* @default ''
|
|
35
|
-
*/
|
|
36
|
-
secondaryText: string;
|
|
37
|
-
/**
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
constructor(locale: Locale);
|
|
41
|
-
/**
|
|
42
|
-
* Displays the text informing about the feature being misconfigured.
|
|
43
|
-
*/
|
|
44
|
-
setNoTemplatesAvailableText(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Displays the text informing about no templates matching the search query.
|
|
47
|
-
*
|
|
48
|
-
* @param query The search query.
|
|
49
|
-
*/
|
|
50
|
-
setNoTemplatesFoundText(query: string): void;
|
|
51
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* +---------------------------------------------------------------------------------+
|
|
8
|
-
* | |
|
|
9
|
-
* | Hello stranger! |
|
|
10
|
-
* | |
|
|
11
|
-
* | |
|
|
12
|
-
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
-
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
-
* | are forbidden and will result in legal consequences. |
|
|
15
|
-
* | |
|
|
16
|
-
* | |
|
|
17
|
-
* +---------------------------------------------------------------------------------+
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
import{View as _0x2aa218}from'ckeditor5/src/ui';export default class h extends _0x2aa218{constructor(_0x5e3bbb){super(_0x5e3bbb);const _0x255244=this['bindTemplate'];this['set']({'isVisible':!0x1,'primaryText':'','secondaryText':''}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__info',_0x255244['if']('isVisible','ck-hidden',_0x5e174f=>!_0x5e174f)]},'children':[{'tag':'span','children':[{'text':[_0x255244['to']('primaryText')]}]},{'tag':'span','children':[{'text':[_0x255244['to']('secondaryText')]}]}]});}['setNoTemplatesAvailableText'](){const {t:t}=this['locale'];this['primaryText']=t('No\x20templates\x20available.'),this['secondaryText']='';}['setNoTemplatesFoundText'](_0x33922d){const {t:t}=this['locale'];this['primaryText']=t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x33922d),this['secondaryText']=t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');}}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module template/ui/templateformsearchfieldview
|
|
7
|
-
*/
|
|
8
|
-
import { ButtonView, IconView, type InputView, LabeledFieldView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
/**
|
|
11
|
-
* A search text field allowing to filter the list of templates.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
* @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView
|
|
15
|
-
*/
|
|
16
|
-
export default class TemplateFormSearchFieldView extends LabeledFieldView<InputView> {
|
|
17
|
-
/**
|
|
18
|
-
* The loupe icon displayed next to the {@link #fieldView}.
|
|
19
|
-
*/
|
|
20
|
-
loupeIconView: IconView;
|
|
21
|
-
/**
|
|
22
|
-
* The button that clears and focuses the {@link #fieldView}.
|
|
23
|
-
*/
|
|
24
|
-
clearButtonView: ButtonView;
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
constructor(locale: Locale, viewCreator: ConstructorParameters<typeof LabeledFieldView<InputView>>[1]);
|
|
29
|
-
/**
|
|
30
|
-
* Resets the search field to its default state.
|
|
31
|
-
*/
|
|
32
|
-
reset(): void;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* An event fired when the field is reset using the
|
|
36
|
-
* {@link module:template/ui/templateformsearchfieldview~TemplateFormSearchFieldView#clearButtonView}.
|
|
37
|
-
*
|
|
38
|
-
* @eventName ~TemplateFormSearchFieldView#reset
|
|
39
|
-
*/
|
|
40
|
-
export type TemplateFormSearchFieldViewResetEvent = {
|
|
41
|
-
name: 'reset';
|
|
42
|
-
args: [];
|
|
43
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* +---------------------------------------------------------------------------------+
|
|
8
|
-
* | |
|
|
9
|
-
* | Hello stranger! |
|
|
10
|
-
* | |
|
|
11
|
-
* | |
|
|
12
|
-
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
-
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
-
* | are forbidden and will result in legal consequences. |
|
|
15
|
-
* | |
|
|
16
|
-
* | |
|
|
17
|
-
* +---------------------------------------------------------------------------------+
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
import{ButtonView as _0x45bbf3,IconView as _0x2dfd28,LabeledFieldView as _0xe30804}from'ckeditor5/src/ui';import _0x47df75 from'../../theme/icons/loupe.svg';import{icons as _0x399f16}from'ckeditor5/src/core';export default class w extends _0xe30804{constructor(_0x2ab53a,_0x2ca02d){super(_0x2ab53a,_0x2ca02d);const t=_0x2ab53a['t'];this['label']=t('Search\x20template'),this['loupeIconView']=new _0x2dfd28(),this['loupeIconView']['content']=_0x47df75,this['clearButtonView']=new _0x45bbf3(_0x2ab53a),this['clearButtonView']['set']({'label':t('Clear'),'icon':_0x399f16['cancel'],'class':'ck-template-form__clear-search','isVisible':!0x1,'tooltip':!0x0}),this['clearButtonView']['on']('execute',()=>{this['reset'](),this['focus'](),this['fire']('reset');}),this['clearButtonView']['bind']('isVisible')['to'](this['fieldView'],'isEmpty',_0x5769d8=>!_0x5769d8),this['fieldWrapperChildren']['add'](this['loupeIconView'],0x0),this['fieldWrapperChildren']['add'](this['clearButtonView']);}['reset'](){this['fieldView']['value']=this['fieldView']['element']['value']='',this['clearButtonView']['isVisible']=!0x1;}}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module template/ui/templateformview
|
|
7
|
-
*/
|
|
8
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { View, ListView, type ViewCollection } from 'ckeditor5/src/ui';
|
|
10
|
-
import TemplateFormInfoView from './templateforminfoview';
|
|
11
|
-
import TemplateFormSearchFieldView from './templateformsearchfieldview';
|
|
12
|
-
import { type TemplateDefinition } from '../template';
|
|
13
|
-
/**
|
|
14
|
-
* A class representing the panel with a list of available templates.
|
|
15
|
-
*
|
|
16
|
-
* @extends module:ui/view~View
|
|
17
|
-
*/
|
|
18
|
-
export default class TemplateFormView extends View {
|
|
19
|
-
/**
|
|
20
|
-
* Tracks information about the DOM focus in the form.
|
|
21
|
-
*
|
|
22
|
-
* @readonly
|
|
23
|
-
*/
|
|
24
|
-
focusTracker: FocusTracker;
|
|
25
|
-
/**
|
|
26
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
27
|
-
*
|
|
28
|
-
* @readonly
|
|
29
|
-
*/
|
|
30
|
-
keystrokes: KeystrokeHandler;
|
|
31
|
-
/**
|
|
32
|
-
* The definition of the template that the button will apply when executed.
|
|
33
|
-
*
|
|
34
|
-
* @readonly
|
|
35
|
-
*/
|
|
36
|
-
templatesDefinitions: Array<TemplateDefinition>;
|
|
37
|
-
/**
|
|
38
|
-
* The templates list view.
|
|
39
|
-
*/
|
|
40
|
-
templateListView: TemplateListView;
|
|
41
|
-
/**
|
|
42
|
-
* A search text field allowing to filter the {@link #templateListView list of templates}.
|
|
43
|
-
*/
|
|
44
|
-
searchFieldView: TemplateFormSearchFieldView;
|
|
45
|
-
/**
|
|
46
|
-
* A view displaying information text when the feature is not configured or no templates were
|
|
47
|
-
* found for the particular phrase.
|
|
48
|
-
*/
|
|
49
|
-
infoView: TemplateFormInfoView;
|
|
50
|
-
/**
|
|
51
|
-
* The collection of the child views inside of the list item {@link #element}.
|
|
52
|
-
*
|
|
53
|
-
* @readonly
|
|
54
|
-
*/
|
|
55
|
-
children: ViewCollection;
|
|
56
|
-
/**
|
|
57
|
-
* Creates an instance of the {@link module:template/ui/templateformview~TemplateFormView} class.
|
|
58
|
-
*
|
|
59
|
-
* @param locale The localization services instance.
|
|
60
|
-
* @param templatesDefinitions Definitions of the templates.
|
|
61
|
-
*/
|
|
62
|
-
constructor(locale: Locale, templatesDefinitions: Array<TemplateDefinition>);
|
|
63
|
-
/**
|
|
64
|
-
* @inheritDoc
|
|
65
|
-
*/
|
|
66
|
-
render(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Focuses the {@link #searchFieldView} if some templates were configured.
|
|
69
|
-
*/
|
|
70
|
-
focus(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Resets the form to its initial state (no search query, all available templates are listed).
|
|
73
|
-
*/
|
|
74
|
-
reset(): void;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* The template list view class with filtering and sorting.
|
|
78
|
-
*
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
declare class TemplateListView extends ListView {
|
|
82
|
-
/**
|
|
83
|
-
* Filters the list of templates according to a specified regular expression. The filtered list is sorted so that items that
|
|
84
|
-
* match the regular expression in their titles are displayed first.
|
|
85
|
-
*
|
|
86
|
-
* Matching items highlight the regular expression (query) in their titles and/or descriptions.
|
|
87
|
-
*
|
|
88
|
-
* See {@link #unfilter}.
|
|
89
|
-
*
|
|
90
|
-
* **Note**: The `Collection` (also `ViewCollection`) class does not provide sorting functionality. Thus, the functionality
|
|
91
|
-
* implemented in this method is **extremely inefficient** because it clones the entire collection, sorts it as an array,
|
|
92
|
-
* then purges the original collection and sets it from scratch with the sorted array. Purging and resetting the
|
|
93
|
-
* collection triggers an avalanche of `add` and `remove` events synchronously handled by the `Template` (UI bindings)
|
|
94
|
-
* and **rendered in the DOM**. As long as sorting takes shorter than rendering of the DOM this should not be noticeable
|
|
95
|
-
* but the moment it does not, the UI will start glitching. A proper `Collection#sort` is needed to work around
|
|
96
|
-
* this overhead (see https://github.com/ckeditor/ckeditor5/issues/2065).
|
|
97
|
-
*
|
|
98
|
-
* @param regExp A regular expression used to match the list title and description.
|
|
99
|
-
* @returns True if some list items matched the regular expression. False otherwise.
|
|
100
|
-
*/
|
|
101
|
-
filter(regExp: RegExp): boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Resets the filtering of the list of templates. Removes highlighting in titles and descriptions
|
|
104
|
-
* of list items and restores the default order of the list (as in editor configuration).
|
|
105
|
-
*
|
|
106
|
-
* See {@link #filter}.
|
|
107
|
-
*/
|
|
108
|
-
unfilter(): void;
|
|
109
|
-
}
|
|
110
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* +---------------------------------------------------------------------------------+
|
|
8
|
-
* | |
|
|
9
|
-
* | Hello stranger! |
|
|
10
|
-
* | |
|
|
11
|
-
* | |
|
|
12
|
-
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
-
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
-
* | are forbidden and will result in legal consequences. |
|
|
15
|
-
* | |
|
|
16
|
-
* | |
|
|
17
|
-
* +---------------------------------------------------------------------------------+
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
const _0x1b7f=['arrowright','setNoTemplatesAvailableText','set','ck-template-list','extendTemplate','unfilter','forEach','_filterTemplates','fieldView','input','listenTo','tab','shift\x20+\x20tab','delegate','arrowdown','filter','title','templatesDefinitions','get','templateListView','buttonView','clear','reset','keystrokes','createCollection','searchFieldView','value','isVisible','items','_createTemplateListView','element','first','ck-template-form','children','includes','setTemplate','infoView','add','stopPropagation','map','_focusCycler','length','sort','arrowup','focusTracker','highlightText','setNoTemplatesFoundText','toLowerCase','templateDefinition','render','div','addMany','focus'];(function(_0x442635,_0x1b7f44){const _0x2b672a=function(_0x53a12e){while(--_0x53a12e){_0x442635['push'](_0x442635['shift']());}};_0x2b672a(++_0x1b7f44);}(_0x1b7f,0x182));const _0x2b67=function(_0x442635,_0x1b7f44){_0x442635=_0x442635-0x0;let _0x2b672a=_0x1b7f[_0x442635];return _0x2b672a;};import{FocusTracker as _0x2a386a,KeystrokeHandler as _0x4869a0}from'ckeditor5/src/utils';import{View as _0x29a596,ListView as _0x30a8d5,createLabeledInputText as _0x3f14dd,FocusCycler as _0x223917,injectCssTransitionDisabler as _0x44142b}from'ckeditor5/src/ui';import _0x125c78 from'./templatelistbuttonview';import _0x7fbf6d from'./templateforminfoview';import _0x58676b from'./templateformsearchfieldview';import{escapeRegExp as _0x4471da}from'lodash-es';import _0x6f96cd from'./templatelistitemview';export default class f extends _0x29a596{constructor(_0x3d1b6c,_0x338466){super(_0x3d1b6c),this['focusTracker']=new _0x2a386a(),this[_0x2b67('0x8')]=new _0x4869a0(),this[_0x2b67('0x2')]=_0x338466,this['templateListView']=this[_0x2b67('0xe')](_0x3d1b6c,_0x338466),this[_0x2b67('0xa')]=this['_createSearchFieldView'](_0x3d1b6c),this[_0x2b67('0x15')]=new _0x7fbf6d(_0x3d1b6c),_0x338466[_0x2b67('0x1a')]||(this[_0x2b67('0x15')]['isVisible']=!0x0,this['infoView'][_0x2b67('0x27')]()),this[_0x2b67('0x12')]=this[_0x2b67('0x9')](_0x338466['length']?[this[_0x2b67('0xa')],this[_0x2b67('0x15')],this[_0x2b67('0x4')]]:[this[_0x2b67('0x15')]]),this[_0x2b67('0x19')]=new _0x223917({'focusables':this[_0x2b67('0x12')],'focusTracker':this[_0x2b67('0x1d')],'keystrokeHandler':this[_0x2b67('0x8')],'actions':{'focusPrevious':_0x2b67('0x32'),'focusNext':_0x2b67('0x31')}}),this[_0x2b67('0x14')]({'tag':_0x2b67('0x23'),'attributes':{'class':['ck',_0x2b67('0x11')],'tabindex':'-1'},'children':this[_0x2b67('0x12')]}),_0x44142b(this);}[_0x2b67('0x22')](){if(super[_0x2b67('0x22')](),!this[_0x2b67('0x2')][_0x2b67('0x1a')])return;const _0x275cd5=_0x29cea1=>_0x29cea1[_0x2b67('0x17')]();this['focusTracker'][_0x2b67('0x16')](this[_0x2b67('0xa')]['element']),this['focusTracker']['add'](this[_0x2b67('0x4')][_0x2b67('0xf')]),this[_0x2b67('0x8')]['listenTo'](this[_0x2b67('0xf')]),this['keystrokes'][_0x2b67('0x28')](_0x2b67('0x26'),_0x275cd5),this[_0x2b67('0x8')][_0x2b67('0x28')]('arrowleft',_0x275cd5),this['keystrokes'][_0x2b67('0x28')](_0x2b67('0x1c'),_0x275cd5),this[_0x2b67('0x8')][_0x2b67('0x28')](_0x2b67('0x34'),_0x275cd5);}[_0x2b67('0x25')](){this[_0x2b67('0x2')]['length']&&this[_0x2b67('0xa')][_0x2b67('0x25')]();}['reset'](){this['templatesDefinitions'][_0x2b67('0x1a')]&&(this['searchFieldView']['reset'](),this['_filterTemplates']());}[_0x2b67('0x2d')](_0x3bb556){if(!this[_0x2b67('0x2')][_0x2b67('0x1a')])return;let _0x5c3d2f=!0x1;if(_0x3bb556)for(const _0x2f8f19 of this[_0x2b67('0x4')]['items']){_0x2f8f19[_0x2b67('0x12')][_0x2b67('0x10')][_0x2b67('0x21')][_0x2b67('0x1')]['toLowerCase']()[_0x2b67('0x13')](_0x3bb556[_0x2b67('0x20')]())?_0x2f8f19['isVisible']=!0x0:_0x2f8f19[_0x2b67('0xc')]=!0x1;const _0x25a4a5=new RegExp(_0x4471da(_0x3bb556),'ig');_0x5c3d2f=this[_0x2b67('0x4')][_0x2b67('0x0')](_0x25a4a5);}else this[_0x2b67('0x4')][_0x2b67('0x2b')](),_0x5c3d2f=!0x0;this['infoView'][_0x2b67('0xc')]=!_0x5c3d2f,_0x5c3d2f||this[_0x2b67('0x15')][_0x2b67('0x1f')](_0x3bb556);}[_0x2b67('0xe')](_0x29f91e,_0x1df87a){const _0x473616=new L(_0x29f91e);return _0x473616[_0x2b67('0x2a')]({'attributes':{'class':[_0x2b67('0x29')]}}),_0x473616['items'][_0x2b67('0x24')](_0x1df87a[_0x2b67('0x18')]((_0x44a4bd,_0x56ea10)=>{const _0x1027aa=new _0x6f96cd(_0x29f91e,_0x56ea10),_0x2ca856=new _0x125c78(_0x29f91e,_0x44a4bd);return _0x1027aa[_0x2b67('0x5')]=_0x2ca856,_0x1027aa['children'][_0x2b67('0x16')](_0x2ca856),_0x1027aa[_0x2b67('0x12')][_0x2b67('0x33')]('execute')['to'](this),_0x1027aa;})),_0x473616;}['_createSearchFieldView'](_0x43cd6a){const _0x55a70e=new _0x58676b(_0x43cd6a,_0x3f14dd);return this[_0x2b67('0x30')](_0x55a70e[_0x2b67('0x2e')],_0x2b67('0x2f'),()=>{this[_0x2b67('0x2d')](_0x55a70e[_0x2b67('0x2e')]['element'][_0x2b67('0xb')]);}),_0x55a70e['on']('reset',()=>{this[_0x2b67('0x7')]();}),_0x55a70e;}}class L extends _0x30a8d5{['filter'](_0x427f4b){const _0x197fc3=new Map(),_0x3ded16=this[_0x2b67('0xd')][_0x2b67('0x18')](_0x5ca18e=>{const _0x1ce5ff=_0x5ca18e[_0x2b67('0x5')]['isMatching'](_0x427f4b);return _0x5ca18e[_0x2b67('0xc')]=!!_0x1ce5ff,_0x5ca18e[_0x2b67('0x5')][_0x2b67('0x1e')](_0x1ce5ff?_0x427f4b:null),_0x1ce5ff&&_0x197fc3[_0x2b67('0x28')](_0x5ca18e,_0x1ce5ff),_0x5ca18e;})[_0x2b67('0x1b')](M)['sort']((_0x1fa9fe,_0x48a01f)=>{const _0x385ad1=_0x197fc3[_0x2b67('0x3')](_0x1fa9fe),_0xd15a8a=_0x197fc3[_0x2b67('0x3')](_0x48a01f);return _0x385ad1&&!_0xd15a8a?-0x1:_0xd15a8a&&!_0x385ad1?0x1:_0x385ad1||_0xd15a8a?_0x385ad1[_0x2b67('0x1')]&&!_0xd15a8a['title']?-0x1:!_0x385ad1['title']&&_0xd15a8a['title']?0x1:0x0:0x0;});return this['items'][_0x2b67('0x6')](),this[_0x2b67('0xd')]['addMany'](_0x3ded16),!!_0x197fc3['size'];}['unfilter'](){const _0x3617a2=this['items'][_0x2b67('0x18')](_0x248289=>_0x248289)[_0x2b67('0x1b')](M);_0x3617a2[_0x2b67('0x2c')](_0x1c75a1=>{_0x1c75a1[_0x2b67('0xc')]=!0x0,_0x1c75a1['buttonView']['highlightText'](null);}),this[_0x2b67('0xd')][_0x2b67('0x6')](),this[_0x2b67('0xd')][_0x2b67('0x24')](_0x3617a2);}}function M(_0x5ea2e2,_0x30b699){return _0x5ea2e2['originalIndex']-_0x30b699['originalIndex'];}
|