@ckeditor/ckeditor5-merge-fields 43.1.0-alpha.2 → 43.1.0-alpha.3
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/build/merge-fields.js +1 -1
- package/dist/index-editor.css +57 -48
- package/dist/index.css +63 -52
- package/dist/index.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/contexts.json +1 -0
- package/package.json +7 -7
- package/src/index.js +1 -1
- package/src/insertmergefieldblockcommand.js +1 -1
- package/src/insertmergefieldcommand.js +1 -1
- package/src/mergefields.js +1 -1
- package/src/mergefieldsediting.js +1 -1
- package/src/mergefieldsui.js +1 -1
- package/src/previewmergefieldscommand.js +1 -1
- package/src/ui/mergefieldslistview.js +1 -1
- package/src/ui/mergefieldspanelview.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/theme/mergefields.css +50 -41
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x2b52(){var _0x266e75=['706014oABFVf','2smmFpY','64ksytoa','1794499FKoEDt','2487ghEsxi','141XnMaom','374373HgLaWR','filter','3059810hcTwvz','items','17144CgUpSD','16887380mSDsTf'];_0x2b52=function(){return _0x266e75;};return _0x2b52();}var _0x20781c=_0x18e4;(function(_0x389182,_0x436c4b){var _0x2d3e71=_0x18e4,_0x413cc1=_0x389182();while(!![]){try{var _0x52080e=-parseInt(_0x2d3e71(0x116))/0x1*(parseInt(_0x2d3e71(0x113))/0x2)+parseInt(_0x2d3e71(0x117))/0x3*(-parseInt(_0x2d3e71(0x110))/0x4)+-parseInt(_0x2d3e71(0x10e))/0x5+parseInt(_0x2d3e71(0x112))/0x6+-parseInt(_0x2d3e71(0x115))/0x7+parseInt(_0x2d3e71(0x114))/0x8*(-parseInt(_0x2d3e71(0x10c))/0x9)+parseInt(_0x2d3e71(0x111))/0xa;if(_0x52080e===_0x436c4b)break;else _0x413cc1['push'](_0x413cc1['shift']());}catch(_0x5505c8){_0x413cc1['push'](_0x413cc1['shift']());}}}(_0x2b52,0x61fe7));function _0x18e4(_0xebe874,_0x191dde){var _0x2b52d8=_0x2b52();return _0x18e4=function(_0x18e4c0,_0xacd8c3){_0x18e4c0=_0x18e4c0-0x10c;var _0x11496c=_0x2b52d8[_0x18e4c0];return _0x11496c;},_0x18e4(_0xebe874,_0x191dde);}import{ListView as _0x14dd88,filterGroupAndItemNames as _0x23918c}from'ckeditor5/src/ui.js';export default class U extends _0x14dd88{[_0x20781c(0x10d)](_0x261707){var _0x25b82e=_0x20781c;return _0x23918c(_0x261707,this[_0x25b82e(0x10f)]);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0xd3cf(){const _0x2e914e=['bindTemplate','4230117BiEQRZ','392oXvZHI','set','div','2865996vqYueE','9725232CFrIIC','8721365EHHlhP','1283223KyGqqo','11871664BNMnZz','ck-merge-fields-form__status','6GBTBIn','ck-merge-fields-form','text','27801SfuEaA','setTemplate'];_0xd3cf=function(){return _0x2e914e;};return _0xd3cf();}(function(_0x5e6588,_0x4c29de){const _0x451d8d=_0xa69f,_0x58dd3e=_0x5e6588();while(!![]){try{const _0x18f5d2=parseInt(_0x451d8d(0x159))/0x1+parseInt(_0x451d8d(0x153))/0x2*(-parseInt(_0x451d8d(0x14f))/0x3)+parseInt(_0x451d8d(0x156))/0x4+parseInt(_0x451d8d(0x158))/0x5*(parseInt(_0x451d8d(0x14c))/0x6)+-parseInt(_0x451d8d(0x15a))/0x7+parseInt(_0x451d8d(0x157))/0x8+-parseInt(_0x451d8d(0x152))/0x9;if(_0x18f5d2===_0x4c29de)break;else _0x58dd3e['push'](_0x58dd3e['shift']());}catch(_0x49e803){_0x58dd3e['push'](_0x58dd3e['shift']());}}}(_0xd3cf,0xee9c8));function _0xa69f(_0x3ae018,_0x2cff9c){const _0xd3cf59=_0xd3cf();return _0xa69f=function(_0xa69fba,_0x2106ee){_0xa69fba=_0xa69fba-0x14c;let _0x56baf7=_0xd3cf59[_0xa69fba];return _0x56baf7;},_0xa69f(_0x3ae018,_0x2cff9c);}import{View as _0x58f60c}from'ckeditor5/src/ui.js';export default class $ extends _0x58f60c{constructor(_0x879f44){const _0x2f1fd4=_0xa69f;super(_0x879f44),this[_0x2f1fd4(0x154)](_0x2f1fd4(0x14e),'');const _0x37095e=this[_0x2f1fd4(0x151)];this[_0x2f1fd4(0x150)]({'tag':_0x2f1fd4(0x155),'attributes':{'class':['ck',_0x2f1fd4(0x14d)]},'children':[{'tag':_0x2f1fd4(0x155),'attributes':{'class':['ck',_0x2f1fd4(0x15b)]},'children':[{'text':_0x37095e['to'](_0x2f1fd4(0x14e))}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x4b0f29,_0x436276,_0x53deef){const t=_0x4b0f29['t'];switch(_0x436276){case'Search\x20merge\x20field':return t('Search\x20merge\x20field');case'No\x20merge\x20fields\x20found':return t('No\x20merge\x20fields\x20found');case'No\x20merge\x20fields\x20available':return t('No\x20merge\x20fields\x20available');case'Insert\x20merge\x20field':return t('Insert\x20merge\x20field');case'Merge\x20field':return t('Merge\x20field');case'Merge\x20fields\x20preview':return t('Merge\x20fields\x20preview');case'Labels':return t('Labels');case'Default\x20values':return t('Default\x20values');case'No\x20data\x20available':return t('No\x20data\x20available');case'WARNING_MISSING_DATA_USED_DEFAULT_VALUE':return t({'string':'Default\x20value\x20is\x20used.','id':'WARNING_MISSING_DATA_USED_DEFAULT_VALUE'});case'WARNING_MISSING_DEFAULT_VALUE':return t({'string':'Default\x20value\x20not\x20available.','id':'WARNING_MISSING_DEFAULT_VALUE'});case'WARNING_MISSING_DATA':return t({'string':'Value\x20not\x20available.','id':'WARNING_MISSING_DATA'});default:return _0x436276;}}
|
package/theme/mergefields.css
CHANGED
|
@@ -17,70 +17,74 @@
|
|
|
17
17
|
--ck-color-merge-fields-value-outline: hsl(0, 0%, 57%);
|
|
18
18
|
--ck-color-merge-fields-with-warning-outline: hsl(15, 80%, 59%);
|
|
19
19
|
|
|
20
|
+
--ck-color-merge-fields-block-outline: hsl(0, 0%, 87%);
|
|
21
|
+
--ck-color-merge-fields-block-background: hsl(0, 0%, 98%);
|
|
22
|
+
|
|
20
23
|
--ck-color-merge-fields-affix-color: hsl(218, 82%, 57%);
|
|
21
24
|
}
|
|
22
25
|
|
|
26
|
+
/* stylelint-disable no-descending-specificity */
|
|
23
27
|
.ck .ck-merge-field-block {
|
|
24
|
-
display: flex;
|
|
25
28
|
margin: 0.9em auto;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: center;
|
|
28
29
|
|
|
29
30
|
&:hover {
|
|
30
31
|
transition: none;
|
|
31
32
|
cursor: default;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
/* When there is no actual data in the block, center the content (label or warning).
|
|
36
|
+
In other cases, the integrator has to style the content as they wish. */
|
|
37
|
+
&:not(.ck-merge-field-block_with-warning):not(.ck-merge-field-block_with-value),
|
|
38
|
+
&.ck-merge-field-block_with-warning_no-default,
|
|
39
|
+
&.ck-merge-field-block_with-warning_missing-data {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
|
|
44
|
+
&:not(.ck-merge-field-block_with-warning_no-default):not(.ck-merge-field-block_with-warning_missing-data) {
|
|
45
|
+
background-color: var(--ck-color-merge-fields-block-background);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.ck-merge-field-block_with-warning,
|
|
50
|
+
&.ck-merge-field-block_with-value {
|
|
51
|
+
/* Make sure the content in the block does not overflow. */
|
|
36
52
|
& .ck-merge-field {
|
|
37
53
|
overflow: hidden;
|
|
38
|
-
display: flex;
|
|
39
|
-
justify-content: center;
|
|
40
54
|
}
|
|
41
55
|
|
|
56
|
+
/* Style the merge field label displayed in the corner. */
|
|
42
57
|
&::before {
|
|
43
58
|
position: absolute;
|
|
44
59
|
z-index: 1;
|
|
45
60
|
top: var(--ck-spacing-medium);
|
|
46
61
|
left: var(--ck-spacing-medium);
|
|
47
|
-
background: hsl(0 0% 98%);
|
|
48
62
|
padding: var(--ck-spacing-tiny) 1px;
|
|
49
63
|
border-radius: 2px;
|
|
50
64
|
line-height: 1em;
|
|
51
65
|
font-family: var(--ck-font-face);
|
|
66
|
+
background-color: hsl(0, 0%, 100%);
|
|
52
67
|
}
|
|
53
|
-
}
|
|
54
68
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
&::before {
|
|
61
|
-
content: attr(data-merge-field-block-label) ' ' url('data:image/svg+xml,%3Csvg width="12" height="12" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M12 6C12 9.31371 9.31371 12 6 12C2.68629 12 0 9.31371 0 6C0 2.68629 2.68629 0 6 0C9.31371 0 12 2.68629 12 6ZM5.27988 2.40003H6.71988V6.72003H5.27988V2.40003ZM6.72009 8.16003H5.28009V9.60003H6.72009V8.16003Z" fill="%23DB3700"/%3E%3C/svg%3E');
|
|
62
|
-
outline: 1px solid var(--ck-color-merge-fields-with-warning-outline);
|
|
69
|
+
&:not(.ck-merge-field-block_with-value) {
|
|
70
|
+
&::before {
|
|
71
|
+
content: attr(data-merge-field-block-label) ' ' url('data:image/svg+xml,%3Csvg width="12" height="12" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M12 6C12 9.31371 9.31371 12 6 12C2.68629 12 0 9.31371 0 6C0 2.68629 2.68629 0 6 0C9.31371 0 12 2.68629 12 6ZM5.27988 2.40003H6.71988V6.72003H5.27988V2.40003ZM6.72009 8.16003H5.28009V9.60003H6.72009V8.16003Z" fill="%23DB3700"/%3E%3C/svg%3E');
|
|
72
|
+
outline: 1px solid var(--ck-color-merge-fields-with-warning-outline);
|
|
73
|
+
}
|
|
63
74
|
}
|
|
64
75
|
|
|
65
|
-
&:not(
|
|
66
|
-
|
|
76
|
+
&:not(.ck-merge-field-block_with-warning) {
|
|
77
|
+
&::before {
|
|
78
|
+
content: attr(data-merge-field-block-label);
|
|
79
|
+
outline: 1px solid var(--ck-color-merge-fields-value-outline);
|
|
80
|
+
}
|
|
67
81
|
}
|
|
68
82
|
}
|
|
69
83
|
|
|
84
|
+
&:not(:hover):not(.ck-widget_selected),
|
|
70
85
|
&.ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before,
|
|
71
86
|
&.ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after {
|
|
72
|
-
outline: 1px solid var(--ck-color-merge-fields-outline);
|
|
73
|
-
|
|
74
|
-
&.ck-merge-field-block_with-warning {
|
|
75
|
-
outline: 1px solid var(--ck-color-merge-fields-with-warning-outline);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&.ck-merge-field-block_with-value {
|
|
80
|
-
&::before {
|
|
81
|
-
content: attr(data-merge-field-block-label);
|
|
82
|
-
outline: 1px solid var(--ck-color-merge-fields-value-outline);
|
|
83
|
-
}
|
|
87
|
+
outline: 1px solid var(--ck-color-merge-fields-block-outline);
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
&[dir="rtl"]::before {
|
|
@@ -89,27 +93,32 @@
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
|
|
92
|
-
/* stylelint-disable no-descending-specificity */
|
|
93
96
|
.ck .ck-merge-field {
|
|
97
|
+
border-radius: 2px;
|
|
98
|
+
|
|
94
99
|
&:hover {
|
|
95
100
|
transition: none;
|
|
96
101
|
cursor: default;
|
|
97
102
|
}
|
|
98
103
|
|
|
99
|
-
&:not(
|
|
100
|
-
/* Styles for textual (inline) merge fields only. */
|
|
104
|
+
&:not(.ck-merge-field_with-warning):not(.ck-merge-field_with-value) {
|
|
101
105
|
padding-top: var(--ck-merge-fields-paddings-vertical);
|
|
102
106
|
padding-bottom: var(--ck-merge-fields-paddings-vertical);
|
|
103
|
-
-webkit-user-select: none;
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
outline-offset: 0;
|
|
106
|
-
margin: 0 1px 0 2px;
|
|
107
|
-
line-height: 0;
|
|
108
|
-
border-radius: 2px;
|
|
109
107
|
|
|
110
108
|
&:not(:hover):not(.ck-widget_selected) {
|
|
111
109
|
outline: 1px solid var(--ck-color-merge-fields-outline);
|
|
110
|
+
line-height: 1.1em;
|
|
112
111
|
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:not(.ck-merge-field-block *) {
|
|
115
|
+
/* Styles for textual (inline) merge fields only. */
|
|
116
|
+
-webkit-user-select: none;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
margin: 0 1px 0 2px;
|
|
119
|
+
line-height: 0;
|
|
120
|
+
padding-top: var(--ck-merge-fields-paddings-vertical);
|
|
121
|
+
padding-bottom: var(--ck-merge-fields-paddings-vertical);
|
|
113
122
|
|
|
114
123
|
&.ck-merge-field_with-warning {
|
|
115
124
|
white-space: normal;
|
|
@@ -174,7 +183,6 @@
|
|
|
174
183
|
padding-right: 0.15em;
|
|
175
184
|
}
|
|
176
185
|
}
|
|
177
|
-
/* stylelint-enable no-descending-specificity */
|
|
178
186
|
|
|
179
187
|
.ck .ck-merge-fields-form {
|
|
180
188
|
padding: var(--ck-spacing-medium);
|
|
@@ -197,3 +205,4 @@
|
|
|
197
205
|
.ck-editor__editable:not(.ck-read-only) .ck-widget.ck-merge-field-block .ck-merge-field {
|
|
198
206
|
pointer-events: none;
|
|
199
207
|
}
|
|
208
|
+
/* stylelint-enable no-descending-specificity */
|