@ckeditor/ckeditor5-merge-fields 0.0.0-nightly-20240717.0 → 0.0.1
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/LICENSE.md +5 -5
- package/README.md +3 -35
- package/package.json +4 -25
- package/CHANGELOG.md +0 -4
- package/build/merge-fields.js +0 -4
- package/ckeditor5-metadata.json +0 -23
- package/dist/index-content.css +0 -4
- package/dist/index-editor.css +0 -119
- package/dist/index.css +0 -155
- package/dist/index.js +0 -23
- package/lang/contexts.json +0 -14
- package/src/augmentation.d.ts +0 -25
- package/src/augmentation.js +0 -23
- package/src/index.d.ts +0 -12
- package/src/index.js +0 -23
- package/src/insertmergefieldcommand.d.ts +0 -31
- package/src/insertmergefieldcommand.js +0 -23
- package/src/mergefields.d.ts +0 -56
- package/src/mergefields.js +0 -23
- package/src/mergefieldsconfig.d.ts +0 -145
- package/src/mergefieldsconfig.js +0 -23
- package/src/mergefieldsediting.d.ts +0 -76
- package/src/mergefieldsediting.js +0 -23
- package/src/mergefieldsui.d.ts +0 -36
- package/src/mergefieldsui.js +0 -23
- package/src/previewmergefieldscommand.d.ts +0 -40
- package/src/previewmergefieldscommand.js +0 -23
- package/src/ui/mergefieldslistview.d.ts +0 -22
- package/src/ui/mergefieldslistview.js +0 -23
- package/src/ui/mergefieldspanelview.d.ts +0 -16
- package/src/ui/mergefieldspanelview.js +0 -23
- package/src/utils/common-translations.d.ts +0 -9
- package/src/utils/common-translations.js +0 -23
- package/theme/icons/insert-merge-field.svg +0 -7
- package/theme/icons/preview-merge-fields.svg +0 -8
- package/theme/icons/warning.svg +0 -3
- package/theme/insert-dropdown.css +0 -48
- package/theme/mergefields.css +0 -102
package/src/mergefields.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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 merge-fields/mergefields
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
-
import { Widget } from 'ckeditor5/src/widget.js';
|
|
11
|
-
import MergeFieldsEditing from './mergefieldsediting.js';
|
|
12
|
-
import MergeFieldsUI from './mergefieldsui.js';
|
|
13
|
-
/**
|
|
14
|
-
* The merge fields feature.
|
|
15
|
-
*
|
|
16
|
-
* For a detailed overview, check the {@glink features/merge-fields Merge fields} feature documentation.
|
|
17
|
-
*
|
|
18
|
-
* @extends module:core/plugin~Plugin
|
|
19
|
-
*/
|
|
20
|
-
export default class MergeFields extends Plugin {
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
static get requires(): readonly ["Mention", typeof MergeFieldsEditing, typeof MergeFieldsUI, typeof Widget];
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get pluginName(): "MergeFields";
|
|
29
|
-
/**
|
|
30
|
-
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
31
|
-
*/
|
|
32
|
-
getMergeFieldsIds(): Array<string>;
|
|
33
|
-
/**
|
|
34
|
-
* Returns an object with default merge fields values.
|
|
35
|
-
*
|
|
36
|
-
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
37
|
-
*
|
|
38
|
-
* Values defined as functions are evaluated and their result is returned.
|
|
39
|
-
*/
|
|
40
|
-
getDefaultValues(): MergeFieldsValues;
|
|
41
|
-
/**
|
|
42
|
-
* Returns an object with merge fields values defined for given data set.
|
|
43
|
-
*
|
|
44
|
-
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
45
|
-
*
|
|
46
|
-
* Values defined as functions are evaluated and their result is returned.
|
|
47
|
-
*
|
|
48
|
-
* If the data set is not found, it throws an error.
|
|
49
|
-
*
|
|
50
|
-
* @param dataSetId
|
|
51
|
-
* @param useDefaultValues If set to `true`, merge field default value will be used for these merge fields, for which the data
|
|
52
|
-
* was not defined. If default value is not configured for given merge field, `null` will be still returned.
|
|
53
|
-
*/
|
|
54
|
-
getDataSetValues(dataSetId: string, useDefaultValues?: boolean): MergeFieldsValues;
|
|
55
|
-
}
|
|
56
|
-
export type MergeFieldsValues = Record<string, string | null>;
|
package/src/mergefields.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2024, 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 _0x3e3d2b=_0x1bb3;(function(_0x22ec6c,_0x180e6b){const _0x41c5ec=_0x1bb3,_0x257640=_0x22ec6c();while(!![]){try{const _0x29f389=-parseInt(_0x41c5ec(0xb8))/0x1*(parseInt(_0x41c5ec(0xb1))/0x2)+parseInt(_0x41c5ec(0xb4))/0x3*(-parseInt(_0x41c5ec(0xbb))/0x4)+-parseInt(_0x41c5ec(0xc2))/0x5*(parseInt(_0x41c5ec(0xb5))/0x6)+parseInt(_0x41c5ec(0xb7))/0x7+-parseInt(_0x41c5ec(0xb6))/0x8+-parseInt(_0x41c5ec(0xbc))/0x9+parseInt(_0x41c5ec(0xc4))/0xa*(parseInt(_0x41c5ec(0xc1))/0xb);if(_0x29f389===_0x180e6b)break;else _0x257640['push'](_0x257640['shift']());}catch(_0x2a348c){_0x257640['push'](_0x257640['shift']());}}}(_0x1f5c,0x1a9bc));import{Plugin as _0x45a9bb}from'ckeditor5/src/core.js';import{Widget as _0x1220f0}from'ckeditor5/src/widget.js';import _0x2aa78d from'./mergefieldsediting.js';function _0x1bb3(_0x4fb6f2,_0x13a06e){const _0x1f5c8d=_0x1f5c();return _0x1bb3=function(_0x1bb361,_0x5529d0){_0x1bb361=_0x1bb361-0xb0;let _0x218f82=_0x1f5c8d[_0x1bb361];return _0x218f82;},_0x1bb3(_0x4fb6f2,_0x13a06e);}import _0x58fb51 from'./mergefieldsui.js';export default class l extends _0x45a9bb{static get[_0x3e3d2b(0xc0)](){const _0x131db8=_0x3e3d2b;return[_0x131db8(0xbd),_0x2aa78d,_0x58fb51,_0x1220f0];}static get[_0x3e3d2b(0xbe)](){const _0x445e18=_0x3e3d2b;return _0x445e18(0xb3);}[_0x3e3d2b(0xc3)](){const _0x4a12bb=_0x3e3d2b;return this[_0x4a12bb(0xb9)][_0x4a12bb(0xc5)][_0x4a12bb(0xc6)](_0x2aa78d)[_0x4a12bb(0xc3)]();}[_0x3e3d2b(0xba)](){const _0x271fc3=_0x3e3d2b,_0x596850=this[_0x271fc3(0xb9)][_0x271fc3(0xc5)][_0x271fc3(0xc6)](_0x2aa78d),_0x5694b7={},_0x276e03=this[_0x271fc3(0xc3)]();for(const _0x3a9719 of _0x276e03)_0x5694b7[_0x3a9719]=_0x596850[_0x271fc3(0xb2)](_0x3a9719);return _0x5694b7;}[_0x3e3d2b(0xb0)](_0x577532,_0x56f47a=!0x1){const _0x405341=_0x3e3d2b,_0x570313=this[_0x405341(0xb9)][_0x405341(0xc5)][_0x405341(0xc6)](_0x2aa78d),_0x500e4f={},_0x5827a6=this[_0x405341(0xc3)]();for(const _0x1e7dc2 of _0x5827a6){let _0xbbf42b=_0x570313[_0x405341(0xbf)](_0x1e7dc2,_0x577532);null===_0xbbf42b&&_0x56f47a&&(_0xbbf42b=_0x570313[_0x405341(0xb2)](_0x1e7dc2)),_0x500e4f[_0x1e7dc2]=_0xbbf42b;}return _0x500e4f;}}function _0x1f5c(){const _0x4e2457=['getMergeFieldDefaultValue','MergeFields','282HDCRrO','54aVQjBG','428376uQpVTq','1135974EHyWZR','3TKIubz','editor','getDefaultValues','7764bmetUh','46197uDBgtp','Mention','pluginName','getMergeFieldValue','requires','781ofLFrY','51115hnYuoD','getMergeFieldsIds','56090XBGote','plugins','get','getDataSetValues','78928zUfcDp'];_0x1f5c=function(){return _0x4e2457;};return _0x1f5c();}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
6
|
-
/**
|
|
7
|
-
* @module merge-fields/mergefieldsconfig
|
|
8
|
-
* @publicApi
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* The configuration of the merge fields feature.
|
|
12
|
-
*
|
|
13
|
-
* The properties defined in this config are set in the `config.mergeFields` namespace.
|
|
14
|
-
*
|
|
15
|
-
* ```ts
|
|
16
|
-
* ClassicEditor
|
|
17
|
-
* .create( editorElement, {
|
|
18
|
-
* mergeFields: {
|
|
19
|
-
* // Merge fields configuration.
|
|
20
|
-
* }
|
|
21
|
-
* } )
|
|
22
|
-
* .then( ... )
|
|
23
|
-
* .catch( ... );
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
27
|
-
*/
|
|
28
|
-
export interface MergeFieldsConfig {
|
|
29
|
-
/**
|
|
30
|
-
* The definitions of the merge fields that can be used in the editor.
|
|
31
|
-
* It's allowed to define them in any combination of groups and individual merge fields.
|
|
32
|
-
* The order of the definitions is respected when displaying the merge fields in the UI dropdown
|
|
33
|
-
* except that merge fields that are not assigned to any group are displayed at the
|
|
34
|
-
* very bottom of the list.
|
|
35
|
-
*/
|
|
36
|
-
definitions?: Array<GroupDefinition | MergeFieldDefinition>;
|
|
37
|
-
/**
|
|
38
|
-
* A prefix used to identify merge fields in the editor data.
|
|
39
|
-
*
|
|
40
|
-
* A list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
41
|
-
*
|
|
42
|
-
* @default '\{\{'
|
|
43
|
-
*/
|
|
44
|
-
prefix?: string;
|
|
45
|
-
/**
|
|
46
|
-
* A suffix used to identify merge fields in the editor data.
|
|
47
|
-
*
|
|
48
|
-
* A list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
49
|
-
*
|
|
50
|
-
* @default '\}\}'
|
|
51
|
-
*/
|
|
52
|
-
suffix?: string;
|
|
53
|
-
/**
|
|
54
|
-
* The data sets that can be displayed in place of the merge fields in the editor.
|
|
55
|
-
*
|
|
56
|
-
* @default []
|
|
57
|
-
*/
|
|
58
|
-
dataSets?: Array<DataSetDefinition>;
|
|
59
|
-
/**
|
|
60
|
-
* Determines the available preview modes in the dropdown and menu bar. Possible values are:
|
|
61
|
-
*
|
|
62
|
-
* * `'$labels'` - adds the option to display the labels of the merge fields.
|
|
63
|
-
* * `'$defaultValues'` - adds the option to display the default values.
|
|
64
|
-
* * `'$dataSets'` - adds the options to display each of the configured data sets.
|
|
65
|
-
*
|
|
66
|
-
* At least one mode must be enabled. If more than one preview mode is configured,
|
|
67
|
-
* you can add `previewMergeFields` button to the toolbar to switch between them,
|
|
68
|
-
* and the menu bar button will be added automatically to the `View` category.
|
|
69
|
-
*
|
|
70
|
-
* @default [ '$labels', '$defaultValues', '$dataSets' ]
|
|
71
|
-
*/
|
|
72
|
-
previewModes?: Array<string>;
|
|
73
|
-
/**
|
|
74
|
-
* A name of the preview mode that should be active when the editor is initialized. Possible values are:
|
|
75
|
-
*
|
|
76
|
-
* * `'$labels'` - displays the labels of the merge fields,
|
|
77
|
-
* * `'$defaultValues'` - displays the default values,
|
|
78
|
-
* * one of the configured {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#dataSets data sets} identifiers.
|
|
79
|
-
*
|
|
80
|
-
* If not set, it will default to the one of the {@link ~MergeFieldsConfig#previewModes available preview modes} with the priority as
|
|
81
|
-
* in the list above.
|
|
82
|
-
*/
|
|
83
|
-
initialPreviewMode?: string;
|
|
84
|
-
}
|
|
85
|
-
export type GroupDefinition = {
|
|
86
|
-
/**
|
|
87
|
-
* The unique identifier of the group. If {@link GroupDefinition#groupLabel} is not specified, it will be used as a label
|
|
88
|
-
* in the UI.
|
|
89
|
-
*/
|
|
90
|
-
groupId: string;
|
|
91
|
-
/**
|
|
92
|
-
* The human-readable label of the group.
|
|
93
|
-
*/
|
|
94
|
-
groupLabel?: string;
|
|
95
|
-
/**
|
|
96
|
-
* The array of merge field or group definitions that belong to the group.
|
|
97
|
-
*/
|
|
98
|
-
definitions: Array<GroupDefinition | MergeFieldDefinition>;
|
|
99
|
-
};
|
|
100
|
-
export type MergeFieldDefinition = {
|
|
101
|
-
/**
|
|
102
|
-
* The unique identifier of the merge field. If {@link MergeFieldDefinition#label} is not specified, it will be used as a label.
|
|
103
|
-
*
|
|
104
|
-
* A list of allowed characters includes: `a-z`, `A-Z`, `0-9` and `_.-` characters.
|
|
105
|
-
*/
|
|
106
|
-
id: string;
|
|
107
|
-
/**
|
|
108
|
-
* The human-readable label of the merge field.
|
|
109
|
-
*/
|
|
110
|
-
label?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Default value of the merge field used if value in the dataset is not provided.
|
|
113
|
-
*/
|
|
114
|
-
defaultValue?: string | ((editor: Editor) => string);
|
|
115
|
-
};
|
|
116
|
-
export type DataSetDefinition = {
|
|
117
|
-
/**
|
|
118
|
-
* A unique identifier of the data set. It should not start with `$` as it is reserved for internal use.
|
|
119
|
-
*/
|
|
120
|
-
id: string;
|
|
121
|
-
/**
|
|
122
|
-
* A human-readable label of the data set.
|
|
123
|
-
*/
|
|
124
|
-
label: string;
|
|
125
|
-
/**
|
|
126
|
-
* The data to be displayed in the editor in place of merge fields when the data set is previewed.
|
|
127
|
-
*
|
|
128
|
-
* The keys of this object are merge field names, while values are the merge field values.
|
|
129
|
-
*
|
|
130
|
-
* For example:
|
|
131
|
-
*
|
|
132
|
-
* ```ts
|
|
133
|
-
* const mergeFieldsConfig = {
|
|
134
|
-
* dataSets: [
|
|
135
|
-
* id: 'customDataSet',
|
|
136
|
-
* values: {
|
|
137
|
-
* companyName: 'CKSource',
|
|
138
|
-
* productName: 'CKEditor 5'
|
|
139
|
-
* }
|
|
140
|
-
* ]
|
|
141
|
-
* };
|
|
142
|
-
* ```
|
|
143
|
-
*/
|
|
144
|
-
values: Record<string, string | ((editor: Editor) => string)>;
|
|
145
|
-
};
|
package/src/mergefieldsconfig.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2024, 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
|
-
export{};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
-
import type { MergeFieldDefinition } from './mergefieldsconfig.js';
|
|
7
|
-
/**
|
|
8
|
-
* The merge fields editing feature.
|
|
9
|
-
*/
|
|
10
|
-
export default class MergeFieldsEditing extends Plugin {
|
|
11
|
-
licenseKey: string;
|
|
12
|
-
/**
|
|
13
|
-
* The current preview mode for merge fields. Determines the merge field values displayed in the editor.
|
|
14
|
-
*
|
|
15
|
-
* @observable
|
|
16
|
-
*/
|
|
17
|
-
previewMode: string;
|
|
18
|
-
/**
|
|
19
|
-
* All configured preview modes, available to be set as a value for {@link ~#previewMode}.
|
|
20
|
-
*/
|
|
21
|
-
readonly availablePreviewModes: Array<string>;
|
|
22
|
-
/**
|
|
23
|
-
* A flat list of all merge field definitions.
|
|
24
|
-
*/
|
|
25
|
-
flattenedMergeFieldDefinitions: Array<MergeFieldDefinition>;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static get pluginName(): "MergeFieldsEditing";
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
constructor(editor: Editor);
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
init(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves the label for the merge field with the given id.
|
|
40
|
-
*
|
|
41
|
-
* If the merge field definition for given id was not found, or a label was not specified, the merge field id is returned instead.
|
|
42
|
-
*/
|
|
43
|
-
getLabel(id: string): string;
|
|
44
|
-
/**
|
|
45
|
-
* Returns the default value for the merge field with the given id.
|
|
46
|
-
*
|
|
47
|
-
* If the merge field default value was specified as a callback, it will be executed and the result will be returned.
|
|
48
|
-
*
|
|
49
|
-
* If the merge field definition for given id was not found, or a default value was not specified, `null` is returned.
|
|
50
|
-
*/
|
|
51
|
-
getMergeFieldDefaultValue(id: string): string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Returns the value specified for merge field with the given in given data set.
|
|
54
|
-
*
|
|
55
|
-
* If the merge field value was specified as a callback, it will be executed and the result will be returned.
|
|
56
|
-
*
|
|
57
|
-
* If the merge field definition for given id was not found, or the data set has no value for this merge field, `null` is returned.
|
|
58
|
-
*/
|
|
59
|
-
getMergeFieldValue(id: string, dataSetId: string): string | null;
|
|
60
|
-
/**
|
|
61
|
-
* Returns ids of all merge fields that are present in the document.
|
|
62
|
-
*/
|
|
63
|
-
getDocumentMergeFieldsIds(): Array<string>;
|
|
64
|
-
/**
|
|
65
|
-
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
66
|
-
*/
|
|
67
|
-
getMergeFieldsIds(): Array<string>;
|
|
68
|
-
/**
|
|
69
|
-
* Returns the merge field definition for the given id.
|
|
70
|
-
*/
|
|
71
|
-
getDefinition(id: string): MergeFieldDefinition;
|
|
72
|
-
/**
|
|
73
|
-
* @inheritDoc
|
|
74
|
-
*/
|
|
75
|
-
destroy(): void;
|
|
76
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2024, 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 _0x3f3d34=_0x2944;(function(_0x47d42c,_0x1db788){const _0x2896d5=_0x2944,_0x210243=_0x47d42c();while(!![]){try{const _0x19e8cd=parseInt(_0x2896d5(0x126))/0x1+-parseInt(_0x2896d5(0x142))/0x2+-parseInt(_0x2896d5(0x125))/0x3*(-parseInt(_0x2896d5(0x14c))/0x4)+parseInt(_0x2896d5(0x147))/0x5+parseInt(_0x2896d5(0x10d))/0x6+-parseInt(_0x2896d5(0xca))/0x7+parseInt(_0x2896d5(0x15b))/0x8;if(_0x19e8cd===_0x1db788)break;else _0x210243['push'](_0x210243['shift']());}catch(_0x3de469){_0x210243['push'](_0x210243['shift']());}}}(_0x2337,0xb5b86));import{toWidget as _0x54bb62,viewToModelPositionOutsideModelElement as _0x26a1ae}from'ckeditor5/src/widget.js';import{Plugin as _0x21b106}from'ckeditor5/src/core.js';import{IconView as _0x404a6e}from'ckeditor5/src/ui.js';import{CKEditorError as _0x43fc26}from'ckeditor5/src/utils.js';import _0x11ce23 from'./insertmergefieldcommand.js';function _0x2337(){const _0x127121=['createRangeIn','mergeFields.definitions','position','merge-fields-invalid-preview-mode-set','_mergeFieldRegExp','editingDowncast','setCustomProperty','startsWith','_createTextualMergeField','ck-merge-field__content','groupId','has','merge-fields-invalid-license-key','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_no-default','ck-merge-field__icon','merge-fields-data-set-not-found','mergeFields.suffix','MergeFieldsEditing','split','concat','_validateConfig','getAttribute','mergeFields.previewModes','function','move','_getDefaultDefinition','reduce','2616198GkClyV','next','createUIElement','mergeFieldsLicenseKeyTrial','\x20]+','type','_mergeFieldElements','join','matchAll','document','set','_registerConversionPostFixer','value','reconvertItem','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-definition','createContainerElement','createRange','slice','mergeFieldsLicenseKeyTrialLimit:operations','checkChild','delete','getShiftedBy','init','mapper','363iKNXcO','1310402XKfnRG','insert','createPositionAt','_validatePreviewMode','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20format\x20painter\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_default-value-used','listenTo','WARNING_MISSING_DATA','reverse','define','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-data','_mergeFieldPrefix','startOffset','viewToModelPosition','getChanges','commands','find','for','createPositionBefore','createElement','_getAvailablePreviewModes','nodeAfter','render','mergeFieldsLicenseKeyValid','consume','ck-merge-field','_trackAddedMergeFields','modelCursor','1571324SMTHzf','WARNING_MISSING_DEFAULT_VALUE','$labels','_refreshMergeFields','push','27560RaeRdm','name','defaultValue','ck-merge-field__affix','merge-fields-trial-license-key-reached-limit-changes','7448hPJFLw','_licenseKeyCheckInterval','dataPipeline:transparentRendering','availablePreviewModes','dataDowncast','differ','config','_getFlattenedMergeFieldDefinitions','getChildren','definitions','getMergeFieldDefaultValue','registerPostFixer','licenseKey','WARNING_MISSING_DEFINITION','register','3985072EtodWD','index','_prepareViewElementData','change:previewMode','model','merge-fields-invalid-preview-modes-configuration','schema','add','rootName','flattenedMergeFieldDefinitions','merge-fields-invalid-prefix-or-suffix','merge-fields-invalid-id','_defineSchema','includes','offsetSize','test','getItems','isLocal','path','editor','upcast','span','text','getDefinition','getLabel','mergeField','merge-fields-duplicate-data-set-id','merge-fields-prefix-and-suffix-must-differ','destroy','_defineConverters','mergeFields.initialPreviewMode','info','hasClass','merge-fields-duplicate-merge-field-id','toDomElement','from','conversion','start','WARNING_MISSING_DATA_USED_DEFAULT_VALUE','insertObject','merge-fields-duplicate-group-id','every','values','_createMergeFieldWidget','pluginName','createPositionAfter','previewMode','6617765FYSHYT','element','$text','nextSibling','mergeFields.prefix','mergeFields.dataSets','createText','_mergeFieldSuffix','$defaultValues','innerHTML','get','length','mergeFieldsLicenseKeyInvalid','root','elementToElement','getPath','insertMergeField','forEach','getMergeFieldValue','$dataSets','getDocumentMergeFieldsIds','$graveyard','map','getMergeFieldsIds','batch','remove','mergeFieldsData','label','previewMergeFields','editing','data','change:data','ck-merge-field\x20ck-merge-field_with-value','parent','endsWith','mergeFieldStatus','appendChild','$inlineObject','bind','getAttributes'];_0x2337=function(){return _0x127121;};return _0x2337();}import _0xee60f9 from'./previewmergefieldscommand.js';function _0x2944(_0x3a7dc0,_0x5b7d3d){const _0x2337a1=_0x2337();return _0x2944=function(_0x294486,_0x59e4a7){_0x294486=_0x294486-0x9f;let _0x52d097=_0x2337a1[_0x294486];return _0x52d097;},_0x2944(_0x3a7dc0,_0x5b7d3d);}import _0x2a3924 from'../theme/icons/warning.svg';export default class o extends _0x21b106{static get[_0x3f3d34(0xc7)](){const _0x5cf4d2=_0x3f3d34;return _0x5cf4d2(0x103);}constructor(_0x3526c8){const _0x17910c=_0x3f3d34;super(_0x3526c8),this[_0x17910c(0xa4)]=[],_0x3526c8[_0x17910c(0x152)][_0x17910c(0x12f)](_0x17910c(0x108),[_0x17910c(0x144),_0x17910c(0xd2),_0x17910c(0xdd)]),_0x3526c8[_0x17910c(0x152)][_0x17910c(0x12f)](_0x17910c(0xcf),[]),_0x3526c8[_0x17910c(0x152)][_0x17910c(0x12f)](_0x17910c(0xf3),[]),_0x3526c8[_0x17910c(0x152)][_0x17910c(0x12f)](_0x17910c(0xce),'{{'),_0x3526c8[_0x17910c(0x152)][_0x17910c(0x12f)](_0x17910c(0x102),'}}'),this[_0x17910c(0x131)]=_0x3526c8[_0x17910c(0x152)][_0x17910c(0xd4)](_0x17910c(0xce)),this[_0x17910c(0xd1)]=_0x3526c8[_0x17910c(0x152)][_0x17910c(0xd4)](_0x17910c(0x102)),this[_0x17910c(0xa4)]=this[_0x17910c(0x153)](),this[_0x17910c(0x106)]();const _0x5f272e='\x5c'+this[_0x17910c(0x131)][_0x17910c(0x104)]('')[_0x17910c(0x114)]('\x5c'),_0x3daac8='\x5c'+this[_0x17910c(0xd1)][_0x17910c(0x104)]('')[_0x17910c(0x114)]('\x5c');this[_0x17910c(0xf6)]=new RegExp('('+_0x5f272e+'[^'+(_0x5f272e+_0x3daac8)+_0x17910c(0x111)+_0x3daac8+')','g'),this[_0x17910c(0x14f)]=this[_0x17910c(0x13a)]();const _0x1ad2fa=_0x3526c8[_0x17910c(0x152)][_0x17910c(0xd4)](_0x17910c(0xb9))||this[_0x17910c(0x14f)][0x0];this[_0x17910c(0x129)](_0x1ad2fa),this[_0x17910c(0x117)](_0x17910c(0xc9),_0x1ad2fa),this[_0x17910c(0x113)]=new Set(),this[_0x17910c(0x14d)]=null;}[_0x3f3d34(0x123)](){const _0xba8a71=_0x3f3d34,_0x5d41ae=this[_0xba8a71(0xae)];_0x5d41ae[_0xba8a71(0x135)][_0xba8a71(0xa2)](_0xba8a71(0xda),new _0x11ce23(_0x5d41ae)),_0x5d41ae[_0xba8a71(0x135)][_0xba8a71(0xa2)](_0xba8a71(0xe6),new _0xee60f9(_0x5d41ae)),this[_0xba8a71(0xa7)](),this[_0xba8a71(0xb8)](),this['on'](_0xba8a71(0x15e),(_0x29e19f,_0x5263f7,_0x4ab1c5)=>{const _0x15796f=_0xba8a71;this[_0x15796f(0x129)](_0x4ab1c5),this[_0x15796f(0x145)]();}),this[_0xba8a71(0x12c)](_0x5d41ae[_0xba8a71(0x9f)][_0xba8a71(0x116)],_0xba8a71(0xe9),()=>{const _0x33f328=_0xba8a71;this[_0x33f328(0x140)]();}),_0x5d41ae[_0xba8a71(0xe7)][_0xba8a71(0x124)]['on'](_0xba8a71(0x133),_0x26a1ae(_0x5d41ae[_0xba8a71(0x9f)],_0x144ba6=>_0x144ba6[_0xba8a71(0xbb)](_0xba8a71(0x13f)))),this[_0xba8a71(0x118)](),this[_0xba8a71(0x158)]=_0x5d41ae[_0xba8a71(0x152)][_0xba8a71(0xd4)](_0xba8a71(0x158));const _0x2a1c62=this[_0xba8a71(0xae)];this[_0xba8a71(0x14d)]=setInterval(()=>{const _0x1f1508=_0xba8a71;let _0x867e3c;for(const _0xae9aae in _0x2a1c62){const _0x51a3e2=_0xae9aae,_0x508c7a=_0x2a1c62[_0x51a3e2];if(_0x1f1508(0x110)===_0x508c7a||_0x1f1508(0xd6)===_0x508c7a||_0x1f1508(0x13d)===_0x508c7a||_0x1f1508(0x11f)===_0x508c7a){delete _0x2a1c62[_0x51a3e2],_0x867e3c=_0x508c7a;break;}}if(_0x1f1508(0xd6)===_0x867e3c)throw clearInterval(this[_0x1f1508(0x14d)]),new _0x43fc26(_0x1f1508(0xfe),null);if(_0x1f1508(0x110)===_0x867e3c&&console[_0x1f1508(0xba)](_0x1f1508(0x12a)),_0x1f1508(0x11f)===_0x867e3c)throw clearInterval(this[_0x1f1508(0x14d)]),new _0x43fc26(_0x1f1508(0x14b),null);_0x1f1508(0x13d)===_0x867e3c&&clearInterval(this[_0x1f1508(0x14d)]);},0x3e8);}[_0x3f3d34(0xb3)](_0x22efff){const _0x34d658=_0x3f3d34,_0x4a7add=this[_0x34d658(0xb2)](_0x22efff);return _0x4a7add[_0x34d658(0xe5)]||_0x4a7add['id'];}[_0x3f3d34(0x156)](_0x31d27b){const _0x346a43=_0x3f3d34,_0x18e7a8=this[_0x346a43(0xb2)](_0x31d27b);return void 0x0===_0x18e7a8[_0x346a43(0x149)]?null:_0x346a43(0x109)==typeof _0x18e7a8[_0x346a43(0x149)]?_0x18e7a8[_0x346a43(0x149)](this[_0x346a43(0xae)]):_0x18e7a8[_0x346a43(0x149)];}[_0x3f3d34(0xdc)](_0x5233bc,_0xc5c5cb){const _0x44fe9e=_0x3f3d34,_0x3d5917=this[_0x44fe9e(0xae)][_0x44fe9e(0x152)][_0x44fe9e(0xd4)](_0x44fe9e(0xcf))[_0x44fe9e(0x136)](_0x637984=>_0x637984['id']===_0xc5c5cb);if(!_0x3d5917)throw new _0x43fc26(_0x44fe9e(0x101),null);const _0xef966a=this[_0x44fe9e(0xb2)](_0x5233bc),_0x191aa0=_0x3d5917[_0x44fe9e(0xc5)][_0xef966a['id']];return void 0x0===_0x191aa0?null:_0x44fe9e(0x109)==typeof _0x191aa0?_0x191aa0(this[_0x44fe9e(0xae)]):_0x191aa0;}[_0x3f3d34(0xde)](){const _0x26fc96=_0x3f3d34,_0x25ff79=new Set();for(const _0x277c85 of this[_0x26fc96(0x113)])_0x26fc96(0xdf)!==_0x277c85[_0x26fc96(0xd7)][_0x26fc96(0xa3)]&&_0x25ff79[_0x26fc96(0xa2)](_0x277c85[_0x26fc96(0x107)]('id'));return Array[_0x26fc96(0xbe)](_0x25ff79);}[_0x3f3d34(0xe1)](){const _0x557168=_0x3f3d34,_0x1b1041=this[_0x557168(0xa4)][_0x557168(0xe0)](_0x44afb9=>_0x44afb9['id']),_0x266155=this[_0x557168(0xde)]();return Array[_0x557168(0xbe)](new Set([..._0x1b1041,..._0x266155]));}[_0x3f3d34(0xb2)](_0x1a24ad){const _0x12bdef=_0x3f3d34;return this[_0x12bdef(0xa4)][_0x12bdef(0x136)](_0xc27fb2=>_0xc27fb2['id']===_0x1a24ad)||this[_0x12bdef(0x10b)](_0x1a24ad);}[_0x3f3d34(0xb7)](){const _0xc8bb7e=_0x3f3d34;this[_0xc8bb7e(0x14d)]&&clearInterval(this[_0xc8bb7e(0x14d)]);}[_0x3f3d34(0x153)](){const _0xed8b2a=_0x3f3d34,_0x556f13=new Set(),_0x3495eb=this[_0xed8b2a(0xae)];return this[_0xed8b2a(0xae)][_0xed8b2a(0x152)][_0xed8b2a(0xd4)](_0xed8b2a(0xf3))[_0xed8b2a(0x10c)]((_0x1582ce,_0x15ee84)=>{const _0x283f67=_0xed8b2a;if(_0x283f67(0xfc)in _0x15ee84){if(_0x556f13[_0x283f67(0xfd)](_0x15ee84[_0x283f67(0xfc)]))throw new _0x43fc26(_0x283f67(0xc3),_0x3495eb,{'duplicateId':_0x15ee84[_0x283f67(0xfc)]});_0x556f13[_0x283f67(0xa2)](_0x15ee84[_0x283f67(0xfc)]);}return _0x283f67(0xfc)in _0x15ee84?function _0x8fea1b(_0x391ea2,_0x426116){const _0x9864f6=_0x283f67;for(const _0x217fea of _0x426116[_0x9864f6(0x155)]){if(_0x9864f6(0xfc)in _0x217fea){if(_0x556f13[_0x9864f6(0xfd)](_0x217fea[_0x9864f6(0xfc)]))throw new _0x43fc26(_0x9864f6(0xc3),_0x3495eb,{'duplicateId':_0x217fea[_0x9864f6(0xfc)]});_0x556f13[_0x9864f6(0xa2)](_0x217fea[_0x9864f6(0xfc)]);}_0x391ea2=_0x9864f6(0xfc)in _0x217fea?_0x8fea1b(_0x391ea2,_0x217fea):_0x391ea2[_0x9864f6(0x105)](_0x217fea);}return _0x391ea2;}[_0x283f67(0xf0)](_0x3495eb)(_0x1582ce,_0x15ee84):_0x1582ce[_0x283f67(0x105)](_0x15ee84);},new Array());}[_0x3f3d34(0x106)](){const _0x1d14cc=_0x3f3d34,_0x54daf7=/^['"`!#%:;=@{}~$()*+/?[\\\]^|]+$/;if(!_0x54daf7[_0x1d14cc(0xaa)](this[_0x1d14cc(0x131)])||!_0x54daf7[_0x1d14cc(0xaa)](this[_0x1d14cc(0xd1)]))throw new _0x43fc26(_0x1d14cc(0xa5),this,{'prefix':this[_0x1d14cc(0x131)],'suffix':this[_0x1d14cc(0xd1)]});const _0x162424=/^[a-zA-Z0-9_.-]+$/,_0x765c11=new Set();if(this[_0x1d14cc(0xa4)][_0x1d14cc(0xe0)](_0x21efe9=>{const _0xcc440e=_0x1d14cc;if(!_0x162424[_0xcc440e(0xaa)](_0x21efe9['id']))throw new _0x43fc26(_0xcc440e(0xa6),this,{'incorrectId':_0x21efe9['id']});if(_0x765c11[_0xcc440e(0xfd)](_0x21efe9['id']))throw new _0x43fc26(_0xcc440e(0xbc),this,{'duplicateId':_0x21efe9['id']});_0x765c11[_0xcc440e(0xa2)](_0x21efe9['id']);}),this[_0x1d14cc(0x131)]===this[_0x1d14cc(0xd1)])throw new _0x43fc26(_0x1d14cc(0xb6),this);const _0x9523ca=this[_0x1d14cc(0xae)][_0x1d14cc(0x152)][_0x1d14cc(0xd4)](_0x1d14cc(0x108)),_0x27a312=[_0x1d14cc(0x144),_0x1d14cc(0xd2),_0x1d14cc(0xdd)];if(!_0x9523ca[_0x1d14cc(0xd5)]||!_0x9523ca[_0x1d14cc(0xc4)](_0x92b574=>_0x27a312[_0x1d14cc(0xa8)](_0x92b574)))throw new _0x43fc26(_0x1d14cc(0xa0),this,{'invalidConfig':_0x9523ca});const _0x31580e=new Set(),_0x9af5c=this[_0x1d14cc(0xae)][_0x1d14cc(0x152)][_0x1d14cc(0xd4)](_0x1d14cc(0xcf));for(const _0x8a88c3 of _0x9af5c){if(_0x31580e[_0x1d14cc(0xfd)](_0x8a88c3['id']))throw new _0x43fc26(_0x1d14cc(0xb5),this,{'duplicateId':_0x8a88c3['id']});_0x31580e[_0x1d14cc(0xa2)](_0x8a88c3['id']);}}[_0x3f3d34(0x13a)](){const _0x139a09=_0x3f3d34,_0x2bc225=this[_0x139a09(0xae)][_0x139a09(0x152)][_0x139a09(0xd4)](_0x139a09(0x108)),_0x4c4b35=[];if(_0x2bc225[_0x139a09(0xa8)](_0x139a09(0x144))&&_0x4c4b35[_0x139a09(0x146)](_0x139a09(0x144)),_0x2bc225[_0x139a09(0xa8)](_0x139a09(0xd2))&&_0x4c4b35[_0x139a09(0x146)](_0x139a09(0xd2)),_0x2bc225[_0x139a09(0xa8)](_0x139a09(0xdd))){const _0x5c2280=this[_0x139a09(0xae)][_0x139a09(0x152)][_0x139a09(0xd4)](_0x139a09(0xcf));_0x4c4b35[_0x139a09(0x146)](..._0x5c2280[_0x139a09(0xe0)](_0x2af30f=>_0x2af30f['id']));}return _0x4c4b35;}[_0x3f3d34(0xa7)](){const _0x7522cd=_0x3f3d34;this[_0x7522cd(0xae)][_0x7522cd(0x9f)][_0x7522cd(0xa1)][_0x7522cd(0x15a)](_0x7522cd(0xb4),{'inheritAllFrom':_0x7522cd(0xef),'allowAttributes':['id'],'allowWhere':_0x7522cd(0xcc)});}[_0x3f3d34(0xb8)](){const _0x407d4c=_0x3f3d34,_0x47b6e0=this[_0x407d4c(0xae)][_0x407d4c(0xbf)];_0x47b6e0[_0x407d4c(0x137)](_0x407d4c(0xaf))[_0x407d4c(0xa2)](_0x12db49=>{const _0x18ea8d=_0x407d4c;_0x12db49['on'](_0x18ea8d(0xb1),(_0x5a1201,_0x1726ec,_0x2cd378)=>{const _0x2612aa=_0x18ea8d,{consumable:_0x18552e,writer:_0x1eb207,safeInsert:_0x25a43e,updateConversionResult:_0x5e6ddb}=_0x2cd378,{viewItem:_0x3dfd4e}=_0x1726ec;if(!_0x18552e[_0x2612aa(0xaa)](_0x3dfd4e))return;const _0x56f149=_0x3dfd4e[_0x2612aa(0xe8)][_0x2612aa(0x104)](this[_0x2612aa(0xf6)])[_0x2612aa(0xe0)](_0x466939=>_0x1eb207[_0x2612aa(0xd0)](_0x466939));if(0x1===_0x56f149[_0x2612aa(0xd5)])return;_0x18552e[_0x2612aa(0x13e)](_0x3dfd4e);let _0x5324a2=_0x1726ec[_0x2612aa(0x141)];const _0x24d4f1=_0x1726ec[_0x2612aa(0x141)];for(const _0x590444 of _0x56f149)if(_0x590444[_0x2612aa(0xe8)][_0x2612aa(0xf9)](this[_0x2612aa(0x131)])&&_0x590444[_0x2612aa(0xe8)][_0x2612aa(0xec)](this[_0x2612aa(0xd1)])){const _0x599cde=_0x590444[_0x2612aa(0xe8)][_0x2612aa(0x11e)](this[_0x2612aa(0x131)][_0x2612aa(0xd5)],_0x590444[_0x2612aa(0xe8)][_0x2612aa(0xd5)]-this[_0x2612aa(0xd1)][_0x2612aa(0xd5)]),_0x477d08=_0x1eb207[_0x2612aa(0x139)](_0x2612aa(0xb4),{'id':_0x599cde});if(!_0x25a43e(_0x477d08,_0x5324a2))continue;if(_0x5e6ddb(_0x477d08,_0x1726ec),_0x477d08[_0x2612aa(0xd9)]()[_0x2612aa(0xd5)]>_0x5324a2[_0x2612aa(0xad)][_0x2612aa(0xd5)]){const _0x311c9e=_0x1eb207[_0x2612aa(0x11d)](_0x24d4f1,_0x5324a2);_0x1eb207[_0x2612aa(0x10a)](_0x311c9e,_0x1eb207[_0x2612aa(0x138)](_0x477d08));}_0x5324a2=_0x1eb207[_0x2612aa(0xc8)](_0x477d08);}else _0x1eb207[_0x2612aa(0x127)](_0x590444,_0x5324a2),_0x5324a2=_0x5324a2[_0x2612aa(0x122)](_0x590444[_0x2612aa(0xa9)]);});}),_0x47b6e0[_0x407d4c(0x137)](_0x407d4c(0xf7))[_0x407d4c(0xd8)]({'model':_0x407d4c(0xb4),'view':(_0x114697,{writer:_0x185ce5})=>this[_0x407d4c(0xc6)](_0x114697,_0x185ce5)}),_0x47b6e0[_0x407d4c(0x137)](_0x407d4c(0x150))[_0x407d4c(0xd8)]({'model':_0x407d4c(0xb4),'view':(_0x1f35dd,{writer:_0xc307bc,options:_0x49d17f})=>this[_0x407d4c(0xfa)](_0x1f35dd,_0xc307bc,_0x49d17f[_0x407d4c(0xe4)])});}[_0x3f3d34(0xc6)](_0x46a54b,_0x50cc1c){const _0x399b55=_0x3f3d34,{label:_0x571cab,classes:_0x4a7d9a,status:_0x45367e}=this[_0x399b55(0x15d)](_0x46a54b),_0x4c2839=this[_0x399b55(0x131)],_0xfb8666=this[_0x399b55(0xd1)];let _0xefb2a4;return _0x399b55(0x144)===this[_0x399b55(0xc9)]?_0xefb2a4=_0x50cc1c[_0x399b55(0x11c)](_0x399b55(0xb0),{'class':_0x4a7d9a},[_0x50cc1c[_0x399b55(0x10f)](_0x399b55(0xb0),{'class':_0x399b55(0x14a)},function(_0x406725){const _0x504b4f=_0x399b55,_0x227e99=this[_0x504b4f(0xbd)](_0x406725);return _0x227e99[_0x504b4f(0xd3)]=_0x4c2839,_0x227e99;}),_0x50cc1c[_0x399b55(0x11c)](_0x399b55(0xb0),{'class':_0x399b55(0xfb)},_0x50cc1c[_0x399b55(0xd0)](String(_0x571cab))),_0x50cc1c[_0x399b55(0x10f)](_0x399b55(0xb0),{'class':_0x399b55(0x14a)},function(_0x58d2ac){const _0x120af1=_0x399b55,_0x8c93ad=this[_0x120af1(0xbd)](_0x58d2ac);return _0x8c93ad[_0x120af1(0xd3)]=_0xfb8666,_0x8c93ad;})]):_0x45367e?(_0xefb2a4=_0x50cc1c[_0x399b55(0x11c)](_0x399b55(0xb0),{'class':_0x4a7d9a},[_0x50cc1c[_0x399b55(0xd0)](String(_0x571cab)),_0x50cc1c[_0x399b55(0x10f)](_0x399b55(0xb0),{'class':_0x399b55(0x100)},function(_0x19957e){const _0x5f235d=_0x399b55,_0x59ba70=this[_0x5f235d(0xbd)](_0x19957e),_0x7d83d=new _0x404a6e();return _0x7d83d[_0x5f235d(0x117)]({'content':_0x2a3924}),_0x7d83d[_0x5f235d(0x13c)](),_0x59ba70[_0x5f235d(0xee)](_0x7d83d[_0x5f235d(0xcb)]),_0x59ba70;})]),_0x50cc1c[_0x399b55(0xf8)](_0x399b55(0xed),_0x45367e,_0xefb2a4)):_0xefb2a4=_0x50cc1c[_0x399b55(0x11c)](_0x399b55(0xb0),{'class':_0x4a7d9a},[_0x50cc1c[_0x399b55(0xd0)](String(_0x571cab))]),_0x50cc1c[_0x399b55(0xf8)](_0x399b55(0xb4),!0x0,_0xefb2a4),_0x54bb62(_0xefb2a4,_0x50cc1c);}[_0x3f3d34(0x15d)](_0x46d913){const _0x47b301=_0x3f3d34,_0x21a7bb=this[_0x47b301(0xa4)][_0x47b301(0x136)](_0x579318=>_0x579318['id']===_0x46d913[_0x47b301(0x107)]('id'));if(!_0x21a7bb)return _0x47b301(0x144)===this[_0x47b301(0xc9)]?{'label':_0x46d913[_0x47b301(0x107)]('id'),'classes':_0x47b301(0x13f)}:{'label':_0x46d913[_0x47b301(0x107)]('id'),'classes':_0x47b301(0x11b),'status':_0x47b301(0x159)};const _0x59880b=this[_0x47b301(0xb3)](_0x21a7bb['id']),_0x504025=this[_0x47b301(0x156)](_0x46d913[_0x47b301(0x107)]('id'));if(_0x47b301(0x144)===this[_0x47b301(0xc9)])return{'label':_0x59880b,'classes':_0x47b301(0x13f)};if(_0x47b301(0xd2)===this[_0x47b301(0xc9)])return _0x504025?{'label':_0x504025,'classes':_0x47b301(0xea)}:{'label':_0x59880b,'classes':_0x47b301(0xff),'status':_0x47b301(0x143)};const _0x5bf486=this[_0x47b301(0xae)][_0x47b301(0x152)][_0x47b301(0xd4)](_0x47b301(0xcf))[_0x47b301(0x136)](_0x49e45b=>_0x49e45b['id']===this[_0x47b301(0xc9)])[_0x47b301(0xc5)][_0x21a7bb['id']];return _0x5bf486?{'label':_0x47b301(0x109)==typeof _0x5bf486?_0x5bf486(this[_0x47b301(0xae)]):_0x5bf486,'classes':_0x47b301(0xea)}:_0x504025?{'label':_0x504025,'classes':_0x47b301(0x12b),'status':_0x47b301(0xc1)}:{'label':_0x59880b,'classes':_0x47b301(0x130),'status':_0x47b301(0x12d)};}[_0x3f3d34(0xfa)](_0x37b9be,_0x3f7322,_0x3838b4){const _0x31bc4d=_0x3f3d34,_0x30c9ac=_0x37b9be[_0x31bc4d(0x107)]('id'),_0x513172=_0x3838b4&&_0x3838b4[_0x30c9ac]?_0x3838b4[_0x30c9ac]:this[_0x31bc4d(0x131)]+_0x30c9ac+this[_0x31bc4d(0xd1)],_0x5d1017=_0x3f7322[_0x31bc4d(0xd0)](_0x513172),_0x559802=_0x3f7322[_0x31bc4d(0x11c)](_0x31bc4d(0xb0));return _0x3f7322[_0x31bc4d(0xf8)](_0x31bc4d(0x14e),!0x0,_0x559802),_0x3f7322[_0x31bc4d(0x127)](_0x3f7322[_0x31bc4d(0x128)](_0x559802,0x0),_0x5d1017),_0x559802;}[_0x3f3d34(0x145)](){const _0x2c3857=_0x3f3d34;this[_0x2c3857(0x113)][_0x2c3857(0xdb)](_0x338d00=>{const _0x7f2830=_0x2c3857;_0x7f2830(0xdf)!==_0x338d00[_0x7f2830(0xd7)][_0x7f2830(0xa3)]&&this[_0x7f2830(0xae)][_0x7f2830(0xe7)][_0x7f2830(0x11a)](_0x338d00);});}[_0x3f3d34(0x129)](_0xadda2f){const _0x6a658f=_0x3f3d34;if(!this[_0x6a658f(0x14f)][_0x6a658f(0xa8)](_0xadda2f))throw new _0x43fc26(_0x6a658f(0xf5),this,{'availablePreviewModes':this[_0x6a658f(0x14f)],'previewMode':_0xadda2f});}[_0x3f3d34(0x140)](){const _0x2aa305=_0x3f3d34;for(const _0x13410f of this[_0x2aa305(0xae)][_0x2aa305(0x9f)][_0x2aa305(0x116)][_0x2aa305(0x151)][_0x2aa305(0x134)]({'includeChangesInGraveyard':!0x0})){if(_0x2aa305(0x127)!==_0x13410f[_0x2aa305(0x112)]||_0x2aa305(0xcc)===_0x13410f[_0x2aa305(0x148)])continue;if(_0x2aa305(0xb4)===_0x13410f[_0x2aa305(0x148)]){this[_0x2aa305(0x113)][_0x2aa305(0xa2)](_0x13410f[_0x2aa305(0xf4)][_0x2aa305(0x13b)]);continue;}const _0x68f748=this[_0x2aa305(0xae)][_0x2aa305(0x9f)][_0x2aa305(0xf2)](_0x13410f[_0x2aa305(0xf4)][_0x2aa305(0x13b)]);for(const _0x1b2629 of _0x68f748[_0x2aa305(0xab)]())_0x1b2629['is'](_0x2aa305(0xcb),_0x2aa305(0xb4))&&this[_0x2aa305(0x113)][_0x2aa305(0xa2)](_0x1b2629);}}[_0x3f3d34(0x118)](){const _0x5ecf61=_0x3f3d34,_0xbef0bc=this[_0x5ecf61(0xae)];_0xbef0bc[_0x5ecf61(0x9f)][_0x5ecf61(0x116)][_0x5ecf61(0x157)](_0x575278=>{const _0x35451a=_0x5ecf61;if(!_0x575278[_0x35451a(0xe2)][_0x35451a(0xac)])return!0x1;const _0x1b8490=[],_0x134b4d=new Set(),_0x1a558c=this[_0x35451a(0xf6)];let _0x4b0e60=!0x1;for(const _0x4756b of _0xbef0bc[_0x35451a(0x9f)][_0x35451a(0x116)][_0x35451a(0x151)][_0x35451a(0x134)]())if(_0x35451a(0x127)===_0x4756b[_0x35451a(0x112)]||_0x35451a(0xe3)===_0x4756b[_0x35451a(0x112)]){let _0x142293=_0x35451a(0xcc)==_0x4756b[_0x35451a(0x148)]?_0x4756b[_0x35451a(0xf4)][_0x35451a(0xeb)]:_0x4756b[_0x35451a(0xf4)][_0x35451a(0x13b)];if(!_0x142293)continue;_0x142293['is'](_0x35451a(0xcc))&&(_0x142293=_0x142293[_0x35451a(0xeb)]),_0x27c94f(_0x142293);}for(const _0x371bf1 of _0x1b8490[_0x35451a(0x12e)]()){const {match:_0x19c813,item:_0x967e35}=_0x371bf1,_0xd92fcf=_0x575278[_0x35451a(0x128)](_0x967e35,_0x19c813[_0x35451a(0x15c)]),_0x4dd633=_0xd92fcf[_0x35451a(0x122)](_0x19c813[0x0][_0x35451a(0xd5)]),_0x9b724b=_0x575278[_0x35451a(0x11d)](_0xd92fcf,_0x4dd633),_0x402f89=_0x19c813[0x0],_0x4574ab=_0x402f89[_0x35451a(0x11e)](this[_0x35451a(0x131)][_0x35451a(0xd5)],_0x402f89[_0x35451a(0xd5)]-this[_0x35451a(0xd1)][_0x35451a(0xd5)]),_0x57d751=_0xf30648(_0x9b724b);_0x57d751[_0x35451a(0x117)]('id',_0x4574ab);const _0x514fb4=_0x575278[_0x35451a(0x139)](_0x35451a(0xb4),_0x57d751);_0xbef0bc[_0x35451a(0x9f)][_0x35451a(0xa1)][_0x35451a(0x120)](_0x9b724b[_0x35451a(0xc0)],_0x35451a(0xb4))?_0xbef0bc[_0x35451a(0x9f)][_0x35451a(0xc2)](_0x514fb4,_0x9b724b):_0x575278[_0x35451a(0xe3)](_0x9b724b),_0x4b0e60=!0x0;}return _0x4b0e60;function _0x27c94f(_0x1a0930){const _0x5a9413=_0x35451a;let _0x54c721='',_0xd68ba6=0x0;if(!_0x134b4d[_0x5a9413(0xfd)](_0x1a0930))for(const _0x335092 of _0x1a0930[_0x5a9413(0x154)]()){const _0xb76952=_0x335092[_0x5a9413(0xcd)];if(_0x335092['is'](_0x5a9413(0xcc))&&(''===_0x54c721&&_0x335092[_0x5a9413(0x132)]&&(_0xd68ba6=_0x335092[_0x5a9413(0x132)]),_0x54c721+=_0x335092[_0x5a9413(0xe8)]),!_0xb76952||_0xb76952['is'](_0x5a9413(0xcb))){for(const _0x8c0fea of _0x54c721[_0x5a9413(0x115)](_0x1a558c))_0x8c0fea[_0x5a9413(0x15c)]=_0x8c0fea[_0x5a9413(0x15c)]+_0xd68ba6,_0x1b8490[_0x5a9413(0x146)]({'match':_0x8c0fea,'item':_0x1a0930});_0x134b4d[_0x5a9413(0xa2)](_0x1a0930),_0x54c721='';}_0x335092['is'](_0x5a9413(0xcb))&&_0x27c94f(_0x335092);}}function _0xf30648(_0x3c03ac){const _0x43bcfd=_0x35451a,_0x510c2c=_0x3c03ac[_0x43bcfd(0xab)](),_0x4bb690=_0x510c2c[_0x43bcfd(0x10e)]()[_0x43bcfd(0x119)],_0x134d5e=new Map(_0x4bb690[_0x43bcfd(0xf1)]());for(const _0x5d5c98 of _0x510c2c)for(const [_0x1f38fa,_0x2d7146]of _0x134d5e)_0x5d5c98[_0x43bcfd(0x107)](_0x1f38fa)!==_0x2d7146&&_0x134d5e[_0x43bcfd(0x121)](_0x1f38fa);return _0x134d5e;}});}[_0x3f3d34(0x10b)](_0x135c5f){return{'id':_0x135c5f};}}
|
package/src/mergefieldsui.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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 merge-fields/mergefieldsui
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
-
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
10
|
-
import '../theme/mergefields.css';
|
|
11
|
-
import '../theme/insert-dropdown.css';
|
|
12
|
-
/**
|
|
13
|
-
* The merge fields UI feature.
|
|
14
|
-
*/
|
|
15
|
-
export default class MergeFieldsUI extends Plugin {
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
static get requires(): readonly [typeof ContextualBalloon];
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
static get pluginName(): "MergeFieldsUI";
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
constructor(editor: Editor);
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
init(): void;
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
afterInit(): void;
|
|
36
|
-
}
|