imatrix-ui 2.8.97-dw-tmp37 → 2.8.97-dw-tmp39
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/lib/super-ui.common.1.js +368 -0
- package/lib/super-ui.css +1 -0
- package/lib/super-ui.umd.1.js +368 -0
- package/lib/super-ui.umd.min.1.js +2 -0
- package/lib/super-ui.umd.min.js +67 -0
- package/package.json +1 -1
- package/src/views/dsc-component/Sidebar/index.vue +2 -2
- package/gulpfile.js +0 -20
- package/lib/breadcrumb.js +0 -1
- package/lib/department-tree-inline.js +0 -1
- package/lib/department-tree.js +0 -1
- package/lib/department-user-tree-inline.js +0 -1
- package/lib/department-user-tree.js +0 -1
- package/lib/dynamic-source-select.js +0 -1
- package/lib/fs-preview.js +0 -1
- package/lib/fs-upload-list.js +0 -1
- package/lib/fs-upload.js +0 -1
- package/lib/hamburger.js +0 -1
- package/lib/index.js +0 -58
- package/lib/index.js.gz +0 -0
- package/lib/multipart-upload.js +0 -1
- package/lib/organization-input.js +0 -1
- package/lib/plugins.js +0 -58
- package/lib/plugins.js.gz +0 -0
- package/lib/remove-department.js +0 -1
- package/lib/remove-user.js +0 -1
- package/lib/remove-workgroup.js +0 -1
- package/lib/rich-editor.js +0 -1
- package/lib/scan-code-input.js +0 -1
- package/lib/secret-info.js +0 -1
- package/lib/super-grid.js +0 -1
- package/lib/super-nine-grid.js +0 -1
- package/lib/svg-icon.js +0 -1
- package/lib/valid-code.js +0 -1
- package/lib/workflow-button.js +0 -1
- package/lib/workflow-history-list.js +0 -1
- package/lib/workgroup-tree-inline.js +0 -1
- package/lib/workgroup-tree.js +0 -1
- package/lib/workgroup-user-tree-inline.js +0 -1
- package/lib/workgroup-user-tree.js +0 -1
- package/lib/year-range-picker.js +0 -1
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -71
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -108
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -245
- package/packages/department-tree-inline/src/search-result.vue +0 -176
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
- package/packages/department-user-tree/src/department-user-tree.vue +0 -101
- package/packages/department-user-tree-inline/index.js +0 -6
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
- package/packages/department-user-tree-inline/src/search-result.vue +0 -197
- package/packages/directives/prevent-reclick.js +0 -19
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
- package/packages/dynamic-source-select/src/events.js +0 -55
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -226
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
- package/packages/fs-upload/src/fs-upload-single.vue +0 -312
- package/packages/fs-upload/src/fs-upload.vue +0 -189
- package/packages/fs-upload/src/see-big-picture.vue +0 -55
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -38
- package/packages/index.js +0 -90
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -73
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -542
- package/packages/plugins/export-data-new.js +0 -453
- package/packages/plugins/export-data.js +0 -361
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -43
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -172
- package/packages/remove-department/src/remove-dept-service.js +0 -20
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -20
- package/packages/remove-user/src/remove-user.vue +0 -195
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -278
- package/packages/rich-editor/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/viewer.vue +0 -103
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -33
- package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
- package/packages/scan-code-input/src/scan-code-input.vue +0 -116
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -90
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -763
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -250
- package/packages/super-grid/src/dynamic-input.vue +0 -1279
- package/packages/super-grid/src/eventBus.js +0 -2
- package/packages/super-grid/src/events.js +0 -55
- package/packages/super-grid/src/formValidatorUtil.js +0 -226
- package/packages/super-grid/src/formatter.js +0 -181
- package/packages/super-grid/src/group-column.vue +0 -100
- package/packages/super-grid/src/header-context-menu.vue +0 -87
- package/packages/super-grid/src/index-column.vue +0 -51
- package/packages/super-grid/src/normal-column copy.vue +0 -769
- package/packages/super-grid/src/normal-column.vue +0 -769
- package/packages/super-grid/src/public-methods.js +0 -31
- package/packages/super-grid/src/row-operation.vue +0 -161
- package/packages/super-grid/src/search-button.vue +0 -66
- package/packages/super-grid/src/search-condition-input.vue +0 -61
- package/packages/super-grid/src/search-condition-list.vue +0 -59
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -386
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -162
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
- package/packages/super-grid/src/search-form.vue +0 -634
- package/packages/super-grid/src/search-methods.js +0 -387
- package/packages/super-grid/src/selection-column.vue +0 -43
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service-static.js +0 -1313
- package/packages/super-grid/src/super-grid-service.js +0 -561
- package/packages/super-grid/src/super-grid-static.vue +0 -3229
- package/packages/super-grid/src/super-grid.vue +0 -2793
- package/packages/super-grid/src/utils.js +0 -763
- package/packages/super-grid/src/view-image-dialog.vue +0 -130
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -103
- package/packages/super-nine-grid/src/custom-formatter.js +0 -66
- package/packages/super-nine-grid/src/formatter.js +0 -132
- package/packages/super-nine-grid/src/search-form-number.vue +0 -38
- package/packages/super-nine-grid/src/search-form.vue +0 -430
- package/packages/super-nine-grid/src/search-methods.js +0 -134
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -91
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
- package/packages/super-nine-grid/src/utils.js +0 -261
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/utils.js +0 -152
- package/packages/utils/value-set.js +0 -86
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -95
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -325
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
- package/packages/workgroup-user-tree-inline/index.js +0 -6
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -51
- package/webpack.commonjs.js +0 -60
- package/webpack.components.js +0 -75
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
((typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] || []).push([[1],{
|
|
2
|
+
|
|
3
|
+
/***/ "c4a9":
|
|
4
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getTinymce; });
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
var getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };
|
|
16
|
+
var getTinymce = function () {
|
|
17
|
+
var global = getGlobal();
|
|
18
|
+
return global && global.tinymce ? global.tinymce : null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
|
|
23
|
+
|
|
24
|
+
/***/ }),
|
|
25
|
+
|
|
26
|
+
/***/ "ca72":
|
|
27
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28
|
+
|
|
29
|
+
"use strict";
|
|
30
|
+
__webpack_require__.r(__webpack_exports__);
|
|
31
|
+
|
|
32
|
+
// CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js
|
|
33
|
+
/**
|
|
34
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
var validEvents = [
|
|
41
|
+
'onActivate',
|
|
42
|
+
'onAddUndo',
|
|
43
|
+
'onBeforeAddUndo',
|
|
44
|
+
'onBeforeExecCommand',
|
|
45
|
+
'onBeforeGetContent',
|
|
46
|
+
'onBeforeRenderUI',
|
|
47
|
+
'onBeforeSetContent',
|
|
48
|
+
'onBeforePaste',
|
|
49
|
+
'onBlur',
|
|
50
|
+
'onChange',
|
|
51
|
+
'onClearUndos',
|
|
52
|
+
'onClick',
|
|
53
|
+
'onContextMenu',
|
|
54
|
+
'onCopy',
|
|
55
|
+
'onCut',
|
|
56
|
+
'onDblclick',
|
|
57
|
+
'onDeactivate',
|
|
58
|
+
'onDirty',
|
|
59
|
+
'onDrag',
|
|
60
|
+
'onDragDrop',
|
|
61
|
+
'onDragEnd',
|
|
62
|
+
'onDragGesture',
|
|
63
|
+
'onDragOver',
|
|
64
|
+
'onDrop',
|
|
65
|
+
'onExecCommand',
|
|
66
|
+
'onFocus',
|
|
67
|
+
'onFocusIn',
|
|
68
|
+
'onFocusOut',
|
|
69
|
+
'onGetContent',
|
|
70
|
+
'onHide',
|
|
71
|
+
'onInit',
|
|
72
|
+
'onKeyDown',
|
|
73
|
+
'onKeyPress',
|
|
74
|
+
'onKeyUp',
|
|
75
|
+
'onLoadContent',
|
|
76
|
+
'onMouseDown',
|
|
77
|
+
'onMouseEnter',
|
|
78
|
+
'onMouseLeave',
|
|
79
|
+
'onMouseMove',
|
|
80
|
+
'onMouseOut',
|
|
81
|
+
'onMouseOver',
|
|
82
|
+
'onMouseUp',
|
|
83
|
+
'onNodeChange',
|
|
84
|
+
'onObjectResizeStart',
|
|
85
|
+
'onObjectResized',
|
|
86
|
+
'onObjectSelected',
|
|
87
|
+
'onPaste',
|
|
88
|
+
'onPostProcess',
|
|
89
|
+
'onPostRender',
|
|
90
|
+
'onPreProcess',
|
|
91
|
+
'onProgressState',
|
|
92
|
+
'onRedo',
|
|
93
|
+
'onRemove',
|
|
94
|
+
'onReset',
|
|
95
|
+
'onSaveContent',
|
|
96
|
+
'onSelectionChange',
|
|
97
|
+
'onSetAttrib',
|
|
98
|
+
'onSetContent',
|
|
99
|
+
'onShow',
|
|
100
|
+
'onSubmit',
|
|
101
|
+
'onUndo',
|
|
102
|
+
'onVisualAid'
|
|
103
|
+
];
|
|
104
|
+
var isValidKey = function (key) { return validEvents.map(function (event) { return event.toLowerCase(); }).indexOf(key.toLowerCase()) !== -1; };
|
|
105
|
+
var bindHandlers = function (initEvent, listeners, editor) {
|
|
106
|
+
Object.keys(listeners)
|
|
107
|
+
.filter(isValidKey)
|
|
108
|
+
.forEach(function (key) {
|
|
109
|
+
var handler = listeners[key];
|
|
110
|
+
if (typeof handler === 'function') {
|
|
111
|
+
if (key === 'onInit') {
|
|
112
|
+
handler(initEvent, editor);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
editor.on(key.substring(2), function (e) { return handler(e, editor); });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
var bindModelHandlers = function (ctx, editor) {
|
|
121
|
+
var modelEvents = ctx.$props.modelEvents ? ctx.$props.modelEvents : null;
|
|
122
|
+
var normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents;
|
|
123
|
+
editor.on(normalizedEvents ? normalizedEvents : 'change input undo redo', function () {
|
|
124
|
+
ctx.$emit('input', editor.getContent({ format: ctx.$props.outputFormat }));
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
var initEditor = function (initEvent, ctx, editor) {
|
|
128
|
+
var value = ctx.$props.value ? ctx.$props.value : '';
|
|
129
|
+
var initialValue = ctx.$props.initialValue ? ctx.$props.initialValue : '';
|
|
130
|
+
editor.setContent(value || (ctx.initialized ? ctx.cache : initialValue));
|
|
131
|
+
// Always bind the value listener in case users use :value instead of v-model
|
|
132
|
+
ctx.$watch('value', function (val, prevVal) {
|
|
133
|
+
if (editor && typeof val === 'string' && val !== prevVal && val !== editor.getContent({ format: ctx.$props.outputFormat })) {
|
|
134
|
+
editor.setContent(val);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
// checks if the v-model shorthand is used (which sets an v-on:input listener) and then binds either
|
|
138
|
+
// specified the events or defaults to "change keyup" event and emits the editor content on that event
|
|
139
|
+
if (ctx.$listeners.input) {
|
|
140
|
+
bindModelHandlers(ctx, editor);
|
|
141
|
+
}
|
|
142
|
+
bindHandlers(initEvent, ctx.$listeners, editor);
|
|
143
|
+
ctx.initialized = true;
|
|
144
|
+
};
|
|
145
|
+
var unique = 0;
|
|
146
|
+
var uuid = function (prefix) {
|
|
147
|
+
var time = Date.now();
|
|
148
|
+
var random = Math.floor(Math.random() * 1000000000);
|
|
149
|
+
unique++;
|
|
150
|
+
return prefix + '_' + random + unique + String(time);
|
|
151
|
+
};
|
|
152
|
+
var isTextarea = function (element) {
|
|
153
|
+
return element !== null && element.tagName.toLowerCase() === 'textarea';
|
|
154
|
+
};
|
|
155
|
+
var normalizePluginArray = function (plugins) {
|
|
156
|
+
if (typeof plugins === 'undefined' || plugins === '') {
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
return Array.isArray(plugins) ? plugins : plugins.split(' ');
|
|
160
|
+
};
|
|
161
|
+
var mergePlugins = function (initPlugins, inputPlugins) {
|
|
162
|
+
return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
|
|
163
|
+
};
|
|
164
|
+
var isNullOrUndefined = function (value) { return value === null || value === undefined; };
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
// CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js
|
|
168
|
+
/**
|
|
169
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
172
|
+
* LICENSE file in the root directory of this source tree.
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
var createState = function () {
|
|
177
|
+
return {
|
|
178
|
+
listeners: [],
|
|
179
|
+
scriptId: uuid('tiny-script'),
|
|
180
|
+
scriptLoaded: false
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
var CreateScriptLoader = function () {
|
|
184
|
+
var state = createState();
|
|
185
|
+
var injectScriptTag = function (scriptId, doc, url, callback) {
|
|
186
|
+
var scriptTag = doc.createElement('script');
|
|
187
|
+
scriptTag.referrerPolicy = 'origin';
|
|
188
|
+
scriptTag.type = 'application/javascript';
|
|
189
|
+
scriptTag.id = scriptId;
|
|
190
|
+
scriptTag.src = url;
|
|
191
|
+
var handler = function () {
|
|
192
|
+
scriptTag.removeEventListener('load', handler);
|
|
193
|
+
callback();
|
|
194
|
+
};
|
|
195
|
+
scriptTag.addEventListener('load', handler);
|
|
196
|
+
if (doc.head) {
|
|
197
|
+
doc.head.appendChild(scriptTag);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
var load = function (doc, url, callback) {
|
|
201
|
+
if (state.scriptLoaded) {
|
|
202
|
+
callback();
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
state.listeners.push(callback);
|
|
206
|
+
if (!doc.getElementById(state.scriptId)) {
|
|
207
|
+
injectScriptTag(state.scriptId, doc, url, function () {
|
|
208
|
+
state.listeners.forEach(function (fn) { return fn(); });
|
|
209
|
+
state.scriptLoaded = true;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
// Only to be used by tests.
|
|
215
|
+
var reinitialize = function () {
|
|
216
|
+
state = createState();
|
|
217
|
+
};
|
|
218
|
+
return {
|
|
219
|
+
load: load,
|
|
220
|
+
reinitialize: reinitialize
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
var ScriptLoader = CreateScriptLoader();
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
// EXTERNAL MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js
|
|
227
|
+
var TinyMCE = __webpack_require__("c4a9");
|
|
228
|
+
|
|
229
|
+
// CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js
|
|
230
|
+
/**
|
|
231
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
234
|
+
* LICENSE file in the root directory of this source tree.
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
var editorProps = {
|
|
238
|
+
apiKey: String,
|
|
239
|
+
cloudChannel: String,
|
|
240
|
+
id: String,
|
|
241
|
+
init: Object,
|
|
242
|
+
initialValue: String,
|
|
243
|
+
inline: Boolean,
|
|
244
|
+
modelEvents: [String, Array],
|
|
245
|
+
plugins: [String, Array],
|
|
246
|
+
tagName: String,
|
|
247
|
+
toolbar: [String, Array],
|
|
248
|
+
value: String,
|
|
249
|
+
disabled: Boolean,
|
|
250
|
+
tinymceScriptSrc: String,
|
|
251
|
+
outputFormat: {
|
|
252
|
+
type: String,
|
|
253
|
+
validator: function (prop) { return prop === 'html' || prop === 'text'; }
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js
|
|
258
|
+
/**
|
|
259
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
262
|
+
* LICENSE file in the root directory of this source tree.
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
265
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
266
|
+
__assign = Object.assign || function(t) {
|
|
267
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
268
|
+
s = arguments[i];
|
|
269
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
270
|
+
t[p] = s[p];
|
|
271
|
+
}
|
|
272
|
+
return t;
|
|
273
|
+
};
|
|
274
|
+
return __assign.apply(this, arguments);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var renderInline = function (h, id, tagName) {
|
|
281
|
+
return h(tagName ? tagName : 'div', {
|
|
282
|
+
attrs: { id: id }
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
var renderIframe = function (h, id) {
|
|
286
|
+
return h('textarea', {
|
|
287
|
+
attrs: { id: id },
|
|
288
|
+
style: { visibility: 'hidden' }
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
var initialise = function (ctx) { return function () {
|
|
292
|
+
var finalInit = __assign(__assign({}, ctx.$props.init), { readonly: ctx.$props.disabled, selector: "#" + ctx.elementId, plugins: mergePlugins(ctx.$props.init && ctx.$props.init.plugins, ctx.$props.plugins), toolbar: ctx.$props.toolbar || (ctx.$props.init && ctx.$props.init.toolbar), inline: ctx.inlineEditor, setup: function (editor) {
|
|
293
|
+
ctx.editor = editor;
|
|
294
|
+
editor.on('init', function (e) { return initEditor(e, ctx, editor); });
|
|
295
|
+
if (ctx.$props.init && typeof ctx.$props.init.setup === 'function') {
|
|
296
|
+
ctx.$props.init.setup(editor);
|
|
297
|
+
}
|
|
298
|
+
} });
|
|
299
|
+
if (isTextarea(ctx.element)) {
|
|
300
|
+
ctx.element.style.visibility = '';
|
|
301
|
+
ctx.element.style.display = '';
|
|
302
|
+
}
|
|
303
|
+
Object(TinyMCE["a" /* getTinymce */])().init(finalInit);
|
|
304
|
+
}; };
|
|
305
|
+
var Editor = {
|
|
306
|
+
props: editorProps,
|
|
307
|
+
created: function () {
|
|
308
|
+
this.elementId = this.$props.id || uuid('tiny-vue');
|
|
309
|
+
this.inlineEditor = (this.$props.init && this.$props.init.inline) || this.$props.inline;
|
|
310
|
+
this.initialized = false;
|
|
311
|
+
},
|
|
312
|
+
watch: {
|
|
313
|
+
disabled: function () {
|
|
314
|
+
this.editor.setMode(this.disabled ? 'readonly' : 'design');
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
mounted: function () {
|
|
318
|
+
this.element = this.$el;
|
|
319
|
+
if (Object(TinyMCE["a" /* getTinymce */])() !== null) {
|
|
320
|
+
initialise(this)();
|
|
321
|
+
}
|
|
322
|
+
else if (this.element && this.element.ownerDocument) {
|
|
323
|
+
var channel = this.$props.cloudChannel ? this.$props.cloudChannel : '5';
|
|
324
|
+
var apiKey = this.$props.apiKey ? this.$props.apiKey : 'no-api-key';
|
|
325
|
+
var scriptSrc = isNullOrUndefined(this.$props.tinymceScriptSrc) ?
|
|
326
|
+
"https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js" :
|
|
327
|
+
this.$props.tinymceScriptSrc;
|
|
328
|
+
ScriptLoader.load(this.element.ownerDocument, scriptSrc, initialise(this));
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
beforeDestroy: function () {
|
|
332
|
+
if (Object(TinyMCE["a" /* getTinymce */])() !== null) {
|
|
333
|
+
Object(TinyMCE["a" /* getTinymce */])().remove(this.editor);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
deactivated: function () {
|
|
337
|
+
var _a;
|
|
338
|
+
if (!this.inlineEditor) {
|
|
339
|
+
this.cache = this.editor.getContent();
|
|
340
|
+
(_a = Object(TinyMCE["a" /* getTinymce */])()) === null || _a === void 0 ? void 0 : _a.remove(this.editor);
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
activated: function () {
|
|
344
|
+
if (!this.inlineEditor && this.initialized) {
|
|
345
|
+
initialise(this)();
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
render: function (h) {
|
|
349
|
+
return this.inlineEditor ? renderInline(h, this.elementId, this.$props.tagName) : renderIframe(h, this.elementId);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
// CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js
|
|
354
|
+
/**
|
|
355
|
+
* Copyright (c) 2018-present, Ephox, Inc.
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
358
|
+
* LICENSE file in the root directory of this source tree.
|
|
359
|
+
*
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
/* harmony default export */ var ts = __webpack_exports__["default"] = (Editor);
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
/***/ })
|
|
366
|
+
|
|
367
|
+
}]);
|
|
368
|
+
//# sourceMappingURL=super-ui.umd.1.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(("undefined"!==typeof self?self:this)["webpackJsonpsuper_ui"]=("undefined"!==typeof self?self:this)["webpackJsonpsuper_ui"]||[]).push([[1],{c4a9:function(n,t,e){"use strict";(function(n){e.d(t,"a",(function(){return i}));var o=function(){return"undefined"!==typeof window?window:n},i=function(){var n=o();return n&&n.tinymce?n.tinymce:null}}).call(this,e("c8ba"))},ca72:function(n,t,e){"use strict";e.r(t);var o=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],i=function(n){return-1!==o.map((function(n){return n.toLowerCase()})).indexOf(n.toLowerCase())},r=function(n,t,e){Object.keys(t).filter(i).forEach((function(o){var i=t[o];"function"===typeof i&&("onInit"===o?i(n,e):e.on(o.substring(2),(function(n){return i(n,e)})))}))},s=function(n,t){var e=n.$props.modelEvents?n.$props.modelEvents:null,o=Array.isArray(e)?e.join(" "):e;t.on(o||"change input undo redo",(function(){n.$emit("input",t.getContent({format:n.$props.outputFormat}))}))},a=function(n,t,e){var o=t.$props.value?t.$props.value:"",i=t.$props.initialValue?t.$props.initialValue:"";e.setContent(o||(t.initialized?t.cache:i)),t.$watch("value",(function(n,o){e&&"string"===typeof n&&n!==o&&n!==e.getContent({format:t.$props.outputFormat})&&e.setContent(n)})),t.$listeners.input&&s(t,e),r(n,t.$listeners,e),t.initialized=!0},u=0,c=function(n){var t=Date.now(),e=Math.floor(1e9*Math.random());return u++,n+"_"+e+u+String(t)},p=function(n){return null!==n&&"textarea"===n.tagName.toLowerCase()},l=function(n){return"undefined"===typeof n||""===n?[]:Array.isArray(n)?n:n.split(" ")},d=function(n,t){return l(n).concat(l(t))},f=function(n){return null===n||void 0===n},h=function(){return{listeners:[],scriptId:c("tiny-script"),scriptLoaded:!1}},y=function(){var n=h(),t=function(n,t,e,o){var i=t.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=n,i.src=e;var r=function(){i.removeEventListener("load",r),o()};i.addEventListener("load",r),t.head&&t.head.appendChild(i)},e=function(e,o,i){n.scriptLoaded?i():(n.listeners.push(i),e.getElementById(n.scriptId)||t(n.scriptId,e,o,(function(){n.listeners.forEach((function(n){return n()})),n.scriptLoaded=!0})))},o=function(){n=h()};return{load:e,reinitialize:o}},m=y(),v=e("c4a9"),g={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],value:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(n){return"html"===n||"text"===n}}},$=function(){return $=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var i in t=arguments[e],t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},$.apply(this,arguments)},b=function(n,t,e){return n(e||"div",{attrs:{id:t}})},C=function(n,t){return n("textarea",{attrs:{id:t},style:{visibility:"hidden"}})},S=function(n){return function(){var t=$($({},n.$props.init),{readonly:n.$props.disabled,selector:"#"+n.elementId,plugins:d(n.$props.init&&n.$props.init.plugins,n.$props.plugins),toolbar:n.$props.toolbar||n.$props.init&&n.$props.init.toolbar,inline:n.inlineEditor,setup:function(t){n.editor=t,t.on("init",(function(e){return a(e,n,t)})),n.$props.init&&"function"===typeof n.$props.init.setup&&n.$props.init.setup(t)}});p(n.element)&&(n.element.style.visibility="",n.element.style.display=""),Object(v["a"])().init(t)}},w={props:g,created:function(){this.elementId=this.$props.id||c("tiny-vue"),this.inlineEditor=this.$props.init&&this.$props.init.inline||this.$props.inline,this.initialized=!1},watch:{disabled:function(){this.editor.setMode(this.disabled?"readonly":"design")}},mounted:function(){if(this.element=this.$el,null!==Object(v["a"])())S(this)();else if(this.element&&this.element.ownerDocument){var n=this.$props.cloudChannel?this.$props.cloudChannel:"5",t=this.$props.apiKey?this.$props.apiKey:"no-api-key",e=f(this.$props.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/"+t+"/tinymce/"+n+"/tinymce.min.js":this.$props.tinymceScriptSrc;m.load(this.element.ownerDocument,e,S(this))}},beforeDestroy:function(){null!==Object(v["a"])()&&Object(v["a"])().remove(this.editor)},deactivated:function(){var n;this.inlineEditor||(this.cache=this.editor.getContent(),null===(n=Object(v["a"])())||void 0===n||n.remove(this.editor))},activated:function(){!this.inlineEditor&&this.initialized&&S(this)()},render:function(n){return this.inlineEditor?b(n,this.elementId,this.$props.tagName):C(n,this.elementId)}};t["default"]=w}}]);
|
|
2
|
+
//# sourceMappingURL=super-ui.umd.min.1.js.map
|