jodit 3.23.3 → 3.24.2
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/README.md +4 -4
- package/build/jodit.css +8 -3
- package/build/jodit.es2018.css +7 -2
- package/build/jodit.es2018.en.css +7 -2
- package/build/jodit.es2018.en.js +8384 -7869
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +8384 -7869
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +2954 -2414
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/build/plugins/debug/debug.es2018.en.js +8 -8
- package/build/plugins/debug/debug.es2018.en.min.js +1 -1
- package/build/plugins/debug/debug.es2018.js +8 -8
- package/build/plugins/debug/debug.es2018.min.js +1 -1
- package/build/plugins/debug/debug.js +8 -8
- package/build/plugins/debug/debug.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.js +38 -38
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.js +38 -38
- package/build/plugins/speech-recognize/speech-recognize.es2018.min.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.js +30 -30
- package/build/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/build/vdom.css +12 -1
- package/build/vdom.js +1445 -41
- package/package.json +23 -23
- package/src/core/constants.ts +10 -8
- package/src/core/dom/dom.test.js +25 -0
- package/src/core/dom/dom.ts +90 -41
- package/src/core/helpers/checker/has-browser-color-picker.ts +2 -2
- package/src/core/helpers/checker/index.ts +1 -0
- package/src/core/helpers/checker/is-boolean.ts +1 -1
- package/src/core/helpers/checker/is-marker.ts +20 -0
- package/src/core/helpers/normalize/normalize-css-value.ts +19 -0
- package/src/core/helpers/normalize/normalize-node.ts +2 -2
- package/src/core/helpers/size/position.test.js +198 -187
- package/src/core/helpers/utils/css.ts +7 -14
- package/src/core/plugin/plugin.ts +1 -1
- package/src/core/selection/interface.ts +24 -0
- package/src/core/selection/select.ts +69 -29
- package/src/core/selection/selection.test.js +5 -17
- package/src/core/selection/style/api/extract.ts +6 -7
- package/src/core/selection/style/api/finite-state-machine.ts +40 -35
- package/src/core/selection/style/api/get-suit-child.ts +3 -4
- package/src/core/selection/style/api/get-suit-parent.ts +3 -4
- package/src/core/selection/style/api/{element-has-same-style.ts → has-same-style.ts} +25 -6
- package/src/core/selection/style/api/index.ts +6 -6
- package/src/core/selection/style/api/is-inside-invisible-element.ts +1 -1
- package/src/core/selection/style/api/is-normal-node.ts +3 -3
- package/src/core/selection/style/api/is-same-attributes.ts +56 -0
- package/src/core/selection/style/api/is-suit-element.ts +22 -12
- package/src/core/selection/style/api/list/toggle-ordered-list.ts +100 -0
- package/src/core/selection/style/api/list/wrap-list.ts +71 -0
- package/src/core/selection/style/api/toggle-attributes.ts +251 -0
- package/src/core/selection/style/api/unwrap-children.ts +10 -8
- package/src/core/selection/style/api/wrap-unwrapped-text.ts +7 -8
- package/src/core/selection/style/api/{wrap-and-commit-style.ts → wrap.ts} +8 -11
- package/src/core/selection/style/apply-style.ts +32 -181
- package/src/core/selection/style/commit-style.ts +79 -4
- package/src/core/selection/style/style.test.js +457 -128
- package/src/core/selection/style/transactions.ts +256 -0
- package/src/core/ui/button/tooltip/tooltip.test.js +95 -76
- package/src/core/ui/popup/popup.test.js +158 -153
- package/src/{plugins/backspace/interface.d.ts → core/vdom/on-demand.ts} +7 -5
- package/src/core/vdom/render/index.ts +2 -4
- package/src/core/vdom/render/patcher.ts +14 -0
- package/src/core/vdom/v-dom-jodit.less +17 -0
- package/src/core/vdom/v-dom-jodit.ts +102 -3
- package/src/core/view/view.ts +2 -2
- package/src/index.ts +2 -0
- package/src/jodit.ts +5 -1
- package/src/langs/i18n.test.js +221 -216
- package/src/modules/dialog/dialog.less +9 -1
- package/src/modules/dialog/dialog.ts +25 -16
- package/src/modules/file-browser/data-provider.ts +44 -12
- package/src/modules/file-browser/file-browser.test.js +1019 -958
- package/src/modules/file-browser/file-browser.ts +0 -1
- package/src/modules/messages/messages.ts +3 -8
- package/src/plugins/backspace/backspace.test.js +2 -9
- package/src/plugins/backspace/backspace.ts +5 -0
- package/src/plugins/backspace/cases/check-join-neighbors.ts +7 -1
- package/src/plugins/backspace/cases/check-join-two-lists.ts +2 -1
- package/src/plugins/backspace/helpers.ts +9 -1
- package/src/plugins/backspace/interface.ts +31 -0
- package/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts +2 -1
- package/src/plugins/color/color.test.js +122 -119
- package/src/plugins/enter/enter.test.js +18 -5
- package/src/plugins/enter/enter.ts +9 -5
- package/src/plugins/enter/interface.ts +41 -0
- package/src/plugins/font/config.ts +8 -8
- package/src/plugins/font/font.test.js +18 -23
- package/src/plugins/hotkeys/hotkeys.test.js +35 -47
- package/src/plugins/iframe/iframe.test.js +206 -195
- package/src/plugins/image/image.ts +1 -1
- package/src/plugins/image-properties/config.ts +22 -0
- package/src/plugins/image-properties/image-properties.test.js +174 -93
- package/src/plugins/image-properties/templates/position-tab.ts +22 -1
- package/src/plugins/indent/indent.test.js +2 -8
- package/src/plugins/link/link.test.js +19 -0
- package/src/plugins/link/link.ts +25 -15
- package/src/plugins/placeholder/placeholder.ts +8 -7
- package/src/plugins/size/size.test.js +239 -225
- package/src/plugins/tab/cases/on-tab-inside-li.ts +131 -22
- package/src/plugins/tab/tab.test.js +95 -11
- package/src/plugins/tab/tab.ts +22 -2
- package/src/plugins/wrap-nodes/config.ts +11 -0
- package/src/plugins/wrap-nodes/wrap-nodes.ts +0 -1
- package/src/types/events.d.ts +4 -0
- package/src/types/file-browser.d.ts +17 -10
- package/src/types/select.d.ts +6 -1
- package/src/types/style.d.ts +72 -5
- package/src/types/uploader.d.ts +14 -0
- package/src/types/view.d.ts +2 -2
- package/types/core/async/async.d.ts +1 -1
- package/types/core/constants.d.ts +3 -3
- package/types/core/dom/dom.d.ts +6 -3
- package/types/core/helpers/checker/index.d.ts +1 -0
- package/types/core/helpers/checker/is-boolean.d.ts +1 -1
- package/types/core/helpers/checker/is-marker.d.ts +10 -0
- package/types/core/helpers/html/safe-html.d.ts +1 -1
- package/types/core/helpers/normalize/normalize-css-value.d.ts +2 -0
- package/types/core/helpers/normalize/normalize-node.d.ts +1 -1
- package/types/core/helpers/utils/append-script.d.ts +1 -1
- package/types/core/selection/interface.d.ts +19 -0
- package/types/core/selection/select.d.ts +22 -5
- package/types/core/selection/style/api/finite-state-machine.d.ts +10 -9
- package/types/core/selection/style/api/get-suit-child.d.ts +2 -3
- package/types/core/selection/style/api/get-suit-parent.d.ts +2 -3
- package/types/core/selection/style/api/{element-has-same-style.d.ts → has-same-style.d.ts} +2 -2
- package/types/core/selection/style/api/index.d.ts +6 -6
- package/types/core/selection/style/api/is-same-attributes.d.ts +12 -0
- package/types/core/selection/style/api/is-suit-element.d.ts +4 -4
- package/types/core/selection/style/api/{toggle → list}/toggle-ordered-list.d.ts +2 -3
- package/types/core/selection/style/api/{wrap-ordered-list.d.ts → list/wrap-list.d.ts} +2 -3
- package/types/core/selection/style/api/toggle-attributes.d.ts +11 -0
- package/types/core/selection/style/api/unwrap-children.d.ts +2 -2
- package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +2 -3
- package/types/core/selection/style/api/{wrap-and-commit-style.d.ts → wrap.d.ts} +2 -3
- package/types/core/selection/style/apply-style.d.ts +3 -3
- package/types/core/selection/style/commit-style.d.ts +6 -2
- package/types/core/selection/style/transactions.d.ts +29 -0
- package/types/core/ui/popup/popup.d.ts +1 -1
- package/types/core/view/view.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/modules/file-browser/builders/elements-map.d.ts +1 -1
- package/types/modules/file-browser/data-provider.d.ts +5 -0
- package/types/modules/messages/messages.d.ts +2 -1
- package/types/plugins/backspace/helpers.d.ts +5 -1
- package/types/plugins/backspace/interface.d.ts +21 -0
- package/types/plugins/enter/enter.d.ts +2 -0
- package/types/plugins/enter/interface.d.ts +32 -0
- package/types/plugins/image-properties/config.d.ts +19 -0
- package/types/plugins/link/link.d.ts +1 -1
- package/types/plugins/paste/interface.d.ts +2 -2
- package/types/plugins/tab/cases/on-tab-inside-li.d.ts +1 -1
- package/types/plugins/wrap-nodes/config.d.ts +10 -0
- package/types/types/events.d.ts +4 -0
- package/types/types/file-browser.d.ts +17 -10
- package/types/types/select.d.ts +6 -1
- package/types/types/storage.d.ts +1 -1
- package/types/types/style.d.ts +72 -5
- package/types/types/uploader.d.ts +14 -0
- package/types/types/view.d.ts +2 -2
- package/vdom.html +20 -0
- package/src/core/selection/style/api/toggle/toggle-css.ts +0 -136
- package/src/core/selection/style/api/toggle/toggle-ordered-list.ts +0 -54
- package/src/core/selection/style/api/toggle-commit-styles.ts +0 -35
- package/src/core/selection/style/api/wrap-ordered-list.ts +0 -42
- package/types/core/selection/style/api/toggle/toggle-css.d.ts +0 -12
- package/types/core/selection/style/api/toggle-commit-styles.d.ts +0 -13
package/build/vdom.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.
|
|
4
|
+
* Version: v3.24.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -451,7 +451,7 @@ exports.__classPrivateFieldIn = __classPrivateFieldIn;
|
|
|
451
451
|
|
|
452
452
|
/***/ }),
|
|
453
453
|
|
|
454
|
-
/***/
|
|
454
|
+
/***/ 77536:
|
|
455
455
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
456
456
|
|
|
457
457
|
|
|
@@ -463,13 +463,13 @@ exports.__classPrivateFieldIn = __classPrivateFieldIn;
|
|
|
463
463
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
464
464
|
exports.Async = void 0;
|
|
465
465
|
var tslib_1 = __webpack_require__(20255);
|
|
466
|
-
var async_1 = __webpack_require__(
|
|
467
|
-
var is_function_1 = __webpack_require__(
|
|
468
|
-
var is_plain_object_1 = __webpack_require__(
|
|
469
|
-
var is_promise_1 = __webpack_require__(
|
|
470
|
-
var is_string_1 = __webpack_require__(
|
|
471
|
-
var is_number_1 = __webpack_require__(
|
|
472
|
-
__webpack_require__(52378);
|
|
466
|
+
var async_1 = __webpack_require__(4696);
|
|
467
|
+
var is_function_1 = __webpack_require__(42096);
|
|
468
|
+
var is_plain_object_1 = __webpack_require__(79736);
|
|
469
|
+
var is_promise_1 = __webpack_require__(26335);
|
|
470
|
+
var is_string_1 = __webpack_require__(24421);
|
|
471
|
+
var is_number_1 = __webpack_require__(61817);
|
|
472
|
+
var assert_1 = __webpack_require__(52378);
|
|
473
473
|
var Async = (function () {
|
|
474
474
|
function Async() {
|
|
475
475
|
var _this = this;
|
|
@@ -520,10 +520,12 @@ var Async = (function () {
|
|
|
520
520
|
return timer;
|
|
521
521
|
};
|
|
522
522
|
Async.prototype.updateTimeout = function (label, timeout) {
|
|
523
|
+
void 0;
|
|
523
524
|
if (!label || !this.timers.has(label)) {
|
|
524
525
|
return null;
|
|
525
526
|
}
|
|
526
527
|
var callback = this.__callbacks.get(label);
|
|
528
|
+
void 0;
|
|
527
529
|
return this.setTimeout(callback, { label: label, timeout: timeout });
|
|
528
530
|
};
|
|
529
531
|
Async.prototype.clearLabel = function (label) {
|
|
@@ -717,7 +719,7 @@ exports.Async = Async;
|
|
|
717
719
|
|
|
718
720
|
/***/ }),
|
|
719
721
|
|
|
720
|
-
/***/
|
|
722
|
+
/***/ 22630:
|
|
721
723
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
722
724
|
|
|
723
725
|
|
|
@@ -728,12 +730,951 @@ exports.Async = Async;
|
|
|
728
730
|
*/
|
|
729
731
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
730
732
|
var tslib_1 = __webpack_require__(20255);
|
|
731
|
-
tslib_1.__exportStar(__webpack_require__(
|
|
733
|
+
tslib_1.__exportStar(__webpack_require__(77536), exports);
|
|
732
734
|
|
|
733
735
|
|
|
734
736
|
/***/ }),
|
|
735
737
|
|
|
736
|
-
/***/
|
|
738
|
+
/***/ 29411:
|
|
739
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
/*!
|
|
743
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
744
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
745
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
746
|
+
*/
|
|
747
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
748
|
+
exports.STATUSES = void 0;
|
|
749
|
+
exports.STATUSES = {
|
|
750
|
+
beforeInit: 'beforeInit',
|
|
751
|
+
ready: 'ready',
|
|
752
|
+
beforeDestruct: 'beforeDestruct',
|
|
753
|
+
destructed: 'destructed'
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
/***/ }),
|
|
758
|
+
|
|
759
|
+
/***/ 46163:
|
|
760
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
/*!
|
|
764
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
765
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
766
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
767
|
+
*/
|
|
768
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
769
|
+
exports.watch = exports.getPropertyDescriptor = void 0;
|
|
770
|
+
var tslib_1 = __webpack_require__(20255);
|
|
771
|
+
var is_function_1 = __webpack_require__(42096);
|
|
772
|
+
var is_plain_object_1 = __webpack_require__(79736);
|
|
773
|
+
var is_view_object_1 = __webpack_require__(96574);
|
|
774
|
+
var observable_1 = __webpack_require__(88418);
|
|
775
|
+
var statuses_1 = __webpack_require__(29411);
|
|
776
|
+
var split_array_1 = __webpack_require__(14556);
|
|
777
|
+
var error_1 = __webpack_require__(56964);
|
|
778
|
+
function getPropertyDescriptor(obj, prop) {
|
|
779
|
+
var desc;
|
|
780
|
+
do {
|
|
781
|
+
desc = Object.getOwnPropertyDescriptor(obj, prop);
|
|
782
|
+
obj = Object.getPrototypeOf(obj);
|
|
783
|
+
} while (!desc && obj);
|
|
784
|
+
return desc;
|
|
785
|
+
}
|
|
786
|
+
exports.getPropertyDescriptor = getPropertyDescriptor;
|
|
787
|
+
function watch(observeFields, context) {
|
|
788
|
+
return function (target, propertyKey) {
|
|
789
|
+
if (!(0, is_function_1.isFunction)(target[propertyKey])) {
|
|
790
|
+
throw (0, error_1.error)('Handler must be a Function');
|
|
791
|
+
}
|
|
792
|
+
var process = function (component) {
|
|
793
|
+
var callback = function (key) {
|
|
794
|
+
var _a;
|
|
795
|
+
var args = [];
|
|
796
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
797
|
+
args[_i - 1] = arguments[_i];
|
|
798
|
+
}
|
|
799
|
+
if (!component.isInDestruct) {
|
|
800
|
+
return (_a = component)[propertyKey].apply(_a, tslib_1.__spreadArray([key], tslib_1.__read(args), false));
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
(0, split_array_1.splitArray)(observeFields).forEach(function (field) {
|
|
804
|
+
if (/:/.test(field)) {
|
|
805
|
+
var _a = tslib_1.__read(field.split(':'), 2), objectPath = _a[0], eventName_1 = _a[1];
|
|
806
|
+
var ctx_1 = context;
|
|
807
|
+
var view_1 = (0, is_view_object_1.isViewObject)(component)
|
|
808
|
+
? component
|
|
809
|
+
: component.jodit;
|
|
810
|
+
if (objectPath.length) {
|
|
811
|
+
ctx_1 = component.get(objectPath);
|
|
812
|
+
}
|
|
813
|
+
if ((0, is_function_1.isFunction)(ctx_1)) {
|
|
814
|
+
ctx_1 = ctx_1(component);
|
|
815
|
+
}
|
|
816
|
+
view_1.events.on(ctx_1 || component, eventName_1, callback);
|
|
817
|
+
if (!ctx_1) {
|
|
818
|
+
view_1.events.on(eventName_1, callback);
|
|
819
|
+
}
|
|
820
|
+
component.hookStatus('beforeDestruct', function () {
|
|
821
|
+
view_1.events
|
|
822
|
+
.off(ctx_1 || component, eventName_1, callback)
|
|
823
|
+
.off(eventName_1, callback);
|
|
824
|
+
});
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
var parts = field.split('.'), _b = tslib_1.__read(parts, 1), key = _b[0], teil = parts.slice(1);
|
|
828
|
+
var value = component[key];
|
|
829
|
+
if ((0, is_plain_object_1.isPlainObject)(value)) {
|
|
830
|
+
var observableValue = (0, observable_1.observable)(value);
|
|
831
|
+
observableValue.on("change.".concat(teil.join('.')), callback);
|
|
832
|
+
}
|
|
833
|
+
var descriptor = getPropertyDescriptor(target, key);
|
|
834
|
+
Object.defineProperty(component, key, {
|
|
835
|
+
configurable: true,
|
|
836
|
+
set: function (v) {
|
|
837
|
+
var oldValue = value;
|
|
838
|
+
if (oldValue === v) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
value = v;
|
|
842
|
+
if (descriptor && descriptor.set) {
|
|
843
|
+
descriptor.set.call(component, v);
|
|
844
|
+
}
|
|
845
|
+
if ((0, is_plain_object_1.isPlainObject)(value)) {
|
|
846
|
+
value = (0, observable_1.observable)(value);
|
|
847
|
+
value.on("change.".concat(teil.join('.')), callback);
|
|
848
|
+
}
|
|
849
|
+
callback(key, oldValue, value);
|
|
850
|
+
},
|
|
851
|
+
get: function () {
|
|
852
|
+
if (descriptor && descriptor.get) {
|
|
853
|
+
return descriptor.get.call(component);
|
|
854
|
+
}
|
|
855
|
+
return value;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
});
|
|
859
|
+
};
|
|
860
|
+
if ((0, is_function_1.isFunction)(target.hookStatus)) {
|
|
861
|
+
target.hookStatus(statuses_1.STATUSES.ready, process);
|
|
862
|
+
}
|
|
863
|
+
else {
|
|
864
|
+
process(target);
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
exports.watch = watch;
|
|
869
|
+
exports["default"] = watch;
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
/***/ }),
|
|
873
|
+
|
|
874
|
+
/***/ 3808:
|
|
875
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
/*!
|
|
879
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
880
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
881
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
882
|
+
*/
|
|
883
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
884
|
+
exports.EventEmitter = void 0;
|
|
885
|
+
var tslib_1 = __webpack_require__(20255);
|
|
886
|
+
var store_1 = __webpack_require__(83611);
|
|
887
|
+
var is_string_1 = __webpack_require__(24421);
|
|
888
|
+
var is_function_1 = __webpack_require__(42096);
|
|
889
|
+
var is_array_1 = __webpack_require__(49781);
|
|
890
|
+
var error_1 = __webpack_require__(56964);
|
|
891
|
+
var split_array_1 = __webpack_require__(14556);
|
|
892
|
+
var EventEmitter = (function () {
|
|
893
|
+
function EventEmitter(doc) {
|
|
894
|
+
var _this = this;
|
|
895
|
+
this.__mutedEvents = new Set();
|
|
896
|
+
this.__key = '__JoditEventEmitterNamespaces';
|
|
897
|
+
this.__doc = document;
|
|
898
|
+
this.__prepareEvent = function (e) {
|
|
899
|
+
if (e.cancelBubble) {
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
if (e.composed && (0, is_function_1.isFunction)(e.composedPath) && e.composedPath()[0]) {
|
|
903
|
+
Object.defineProperty(e, 'target', {
|
|
904
|
+
value: e.composedPath()[0],
|
|
905
|
+
configurable: true,
|
|
906
|
+
enumerable: true
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
if (e.type.match(/^touch/) &&
|
|
910
|
+
e.changedTouches &&
|
|
911
|
+
e.changedTouches.length) {
|
|
912
|
+
['clientX', 'clientY', 'pageX', 'pageY'].forEach(function (key) {
|
|
913
|
+
Object.defineProperty(e, key, {
|
|
914
|
+
value: e.changedTouches[0][key],
|
|
915
|
+
configurable: true,
|
|
916
|
+
enumerable: true
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
if (!e.originalEvent) {
|
|
921
|
+
e.originalEvent = e;
|
|
922
|
+
}
|
|
923
|
+
if (e.type === 'paste' &&
|
|
924
|
+
e.clipboardData === undefined &&
|
|
925
|
+
_this.__doc.defaultView.clipboardData) {
|
|
926
|
+
Object.defineProperty(e, 'clipboardData', {
|
|
927
|
+
get: function () {
|
|
928
|
+
return _this.__doc.defaultView.clipboardData;
|
|
929
|
+
},
|
|
930
|
+
configurable: true,
|
|
931
|
+
enumerable: true
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
this.currents = [];
|
|
936
|
+
this.__stopped = [];
|
|
937
|
+
this.__isDestructed = false;
|
|
938
|
+
if (doc) {
|
|
939
|
+
this.__doc = doc;
|
|
940
|
+
}
|
|
941
|
+
this.__key += new Date().getTime();
|
|
942
|
+
}
|
|
943
|
+
EventEmitter.prototype.mute = function (event) {
|
|
944
|
+
this.__mutedEvents.add(event !== null && event !== void 0 ? event : '*');
|
|
945
|
+
return this;
|
|
946
|
+
};
|
|
947
|
+
EventEmitter.prototype.isMuted = function (event) {
|
|
948
|
+
if (event && this.__mutedEvents.has(event)) {
|
|
949
|
+
return true;
|
|
950
|
+
}
|
|
951
|
+
return this.__mutedEvents.has('*');
|
|
952
|
+
};
|
|
953
|
+
EventEmitter.prototype.unmute = function (event) {
|
|
954
|
+
this.__mutedEvents.delete(event !== null && event !== void 0 ? event : '*');
|
|
955
|
+
return this;
|
|
956
|
+
};
|
|
957
|
+
EventEmitter.prototype.__eachEvent = function (events, callback) {
|
|
958
|
+
var _this = this;
|
|
959
|
+
var eventParts = (0, split_array_1.splitArray)(events).map(function (e) { return e.trim(); });
|
|
960
|
+
eventParts.forEach(function (eventNameSpace) {
|
|
961
|
+
var eventAndNameSpace = eventNameSpace.split('.');
|
|
962
|
+
var namespace = eventAndNameSpace[1] || store_1.defaultNameSpace;
|
|
963
|
+
callback.call(_this, eventAndNameSpace[0], namespace);
|
|
964
|
+
});
|
|
965
|
+
};
|
|
966
|
+
EventEmitter.prototype.__getStore = function (subject) {
|
|
967
|
+
if (!subject) {
|
|
968
|
+
throw (0, error_1.error)('Need subject');
|
|
969
|
+
}
|
|
970
|
+
if (subject[this.__key] === undefined) {
|
|
971
|
+
var store = new store_1.EventHandlersStore();
|
|
972
|
+
Object.defineProperty(subject, this.__key, {
|
|
973
|
+
enumerable: false,
|
|
974
|
+
configurable: true,
|
|
975
|
+
writable: true,
|
|
976
|
+
value: store
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
return subject[this.__key];
|
|
980
|
+
};
|
|
981
|
+
EventEmitter.prototype.__removeStoreFromSubject = function (subject) {
|
|
982
|
+
if (subject[this.__key] !== undefined) {
|
|
983
|
+
Object.defineProperty(subject, this.__key, {
|
|
984
|
+
enumerable: false,
|
|
985
|
+
configurable: true,
|
|
986
|
+
writable: true,
|
|
987
|
+
value: undefined
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
EventEmitter.prototype.__triggerNativeEvent = function (element, event) {
|
|
992
|
+
var evt = this.__doc.createEvent('HTMLEvents');
|
|
993
|
+
if ((0, is_string_1.isString)(event)) {
|
|
994
|
+
evt.initEvent(event, true, true);
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
evt.initEvent(event.type, event.bubbles, event.cancelable);
|
|
998
|
+
[
|
|
999
|
+
'screenX',
|
|
1000
|
+
'screenY',
|
|
1001
|
+
'clientX',
|
|
1002
|
+
'clientY',
|
|
1003
|
+
'target',
|
|
1004
|
+
'srcElement',
|
|
1005
|
+
'currentTarget',
|
|
1006
|
+
'timeStamp',
|
|
1007
|
+
'which',
|
|
1008
|
+
'keyCode'
|
|
1009
|
+
].forEach(function (property) {
|
|
1010
|
+
Object.defineProperty(evt, property, {
|
|
1011
|
+
value: event[property],
|
|
1012
|
+
enumerable: true
|
|
1013
|
+
});
|
|
1014
|
+
});
|
|
1015
|
+
Object.defineProperty(evt, 'originalEvent', {
|
|
1016
|
+
value: event,
|
|
1017
|
+
enumerable: true
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
element.dispatchEvent(evt);
|
|
1021
|
+
};
|
|
1022
|
+
Object.defineProperty(EventEmitter.prototype, "current", {
|
|
1023
|
+
get: function () {
|
|
1024
|
+
return this.currents[this.currents.length - 1];
|
|
1025
|
+
},
|
|
1026
|
+
enumerable: false,
|
|
1027
|
+
configurable: true
|
|
1028
|
+
});
|
|
1029
|
+
EventEmitter.prototype.on = function (eventsOrSubjects, callbackOrEvents, optionsOrCallback, opts) {
|
|
1030
|
+
var _this = this;
|
|
1031
|
+
var subjects;
|
|
1032
|
+
var events;
|
|
1033
|
+
var callback;
|
|
1034
|
+
var options;
|
|
1035
|
+
if ((0, is_string_1.isString)(eventsOrSubjects) || (0, is_string_1.isStringArray)(eventsOrSubjects)) {
|
|
1036
|
+
subjects = this;
|
|
1037
|
+
events = eventsOrSubjects;
|
|
1038
|
+
callback = callbackOrEvents;
|
|
1039
|
+
options = optionsOrCallback;
|
|
1040
|
+
}
|
|
1041
|
+
else {
|
|
1042
|
+
subjects = eventsOrSubjects;
|
|
1043
|
+
events = callbackOrEvents;
|
|
1044
|
+
callback = optionsOrCallback;
|
|
1045
|
+
options = opts;
|
|
1046
|
+
}
|
|
1047
|
+
if (!((0, is_string_1.isString)(events) || (0, is_string_1.isStringArray)(events)) ||
|
|
1048
|
+
events.length === 0) {
|
|
1049
|
+
throw (0, error_1.error)('Need events names');
|
|
1050
|
+
}
|
|
1051
|
+
if (!(0, is_function_1.isFunction)(callback)) {
|
|
1052
|
+
throw (0, error_1.error)('Need event handler');
|
|
1053
|
+
}
|
|
1054
|
+
if ((0, is_array_1.isArray)(subjects)) {
|
|
1055
|
+
subjects.forEach(function (subj) {
|
|
1056
|
+
_this.on(subj, events, callback, options);
|
|
1057
|
+
});
|
|
1058
|
+
return this;
|
|
1059
|
+
}
|
|
1060
|
+
var subject = subjects;
|
|
1061
|
+
var store = this.__getStore(subject);
|
|
1062
|
+
var isDOMElement = (0, is_function_1.isFunction)(subject.addEventListener), self = this;
|
|
1063
|
+
var syntheticCallback = function (event) {
|
|
1064
|
+
var args = [];
|
|
1065
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1066
|
+
args[_i - 1] = arguments[_i];
|
|
1067
|
+
}
|
|
1068
|
+
if (self.isMuted(event)) {
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
return callback && callback.call.apply(callback, tslib_1.__spreadArray([this], tslib_1.__read(args), false));
|
|
1072
|
+
};
|
|
1073
|
+
if (isDOMElement) {
|
|
1074
|
+
syntheticCallback = function (event) {
|
|
1075
|
+
if (self.isMuted(event.type)) {
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
self.__prepareEvent(event);
|
|
1079
|
+
if (callback && callback.call(this, event) === false) {
|
|
1080
|
+
event.preventDefault();
|
|
1081
|
+
event.stopImmediatePropagation();
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
return;
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
this.__eachEvent(events, function (event, namespace) {
|
|
1088
|
+
if (event.length === 0) {
|
|
1089
|
+
throw (0, error_1.error)('Need event name');
|
|
1090
|
+
}
|
|
1091
|
+
if (store.indexOf(event, namespace, callback) === false) {
|
|
1092
|
+
var block = {
|
|
1093
|
+
event: event,
|
|
1094
|
+
originalCallback: callback,
|
|
1095
|
+
syntheticCallback: syntheticCallback
|
|
1096
|
+
};
|
|
1097
|
+
store.set(event, namespace, block, options === null || options === void 0 ? void 0 : options.top);
|
|
1098
|
+
if (isDOMElement) {
|
|
1099
|
+
var options_1 = [
|
|
1100
|
+
'touchstart',
|
|
1101
|
+
'touchend',
|
|
1102
|
+
'scroll',
|
|
1103
|
+
'mousewheel',
|
|
1104
|
+
'mousemove',
|
|
1105
|
+
'touchmove'
|
|
1106
|
+
].includes(event)
|
|
1107
|
+
? {
|
|
1108
|
+
passive: true
|
|
1109
|
+
}
|
|
1110
|
+
: false;
|
|
1111
|
+
subject.addEventListener(event, syntheticCallback, options_1);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
return this;
|
|
1116
|
+
};
|
|
1117
|
+
EventEmitter.prototype.one = function (eventsOrSubjects, callbackOrEvents, optionsOrCallback, opts) {
|
|
1118
|
+
var _this = this;
|
|
1119
|
+
var subjects;
|
|
1120
|
+
var events;
|
|
1121
|
+
var callback;
|
|
1122
|
+
var options;
|
|
1123
|
+
if ((0, is_string_1.isString)(eventsOrSubjects) || (0, is_string_1.isStringArray)(eventsOrSubjects)) {
|
|
1124
|
+
subjects = this;
|
|
1125
|
+
events = eventsOrSubjects;
|
|
1126
|
+
callback = callbackOrEvents;
|
|
1127
|
+
options = optionsOrCallback;
|
|
1128
|
+
}
|
|
1129
|
+
else {
|
|
1130
|
+
subjects = eventsOrSubjects;
|
|
1131
|
+
events = callbackOrEvents;
|
|
1132
|
+
callback = optionsOrCallback;
|
|
1133
|
+
options = opts;
|
|
1134
|
+
}
|
|
1135
|
+
var newCallback = function () {
|
|
1136
|
+
var args = [];
|
|
1137
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1138
|
+
args[_i] = arguments[_i];
|
|
1139
|
+
}
|
|
1140
|
+
_this.off(subjects, events, newCallback);
|
|
1141
|
+
return callback.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
|
|
1142
|
+
};
|
|
1143
|
+
this.on(subjects, events, newCallback, options);
|
|
1144
|
+
return this;
|
|
1145
|
+
};
|
|
1146
|
+
EventEmitter.prototype.off = function (eventsOrSubjects, callbackOrEvents, handler) {
|
|
1147
|
+
var _this = this;
|
|
1148
|
+
var subjects;
|
|
1149
|
+
var events;
|
|
1150
|
+
var callback;
|
|
1151
|
+
if ((0, is_string_1.isString)(eventsOrSubjects) || (0, is_string_1.isStringArray)(eventsOrSubjects)) {
|
|
1152
|
+
subjects = this;
|
|
1153
|
+
events = eventsOrSubjects;
|
|
1154
|
+
callback = callbackOrEvents;
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
subjects = eventsOrSubjects;
|
|
1158
|
+
events = callbackOrEvents;
|
|
1159
|
+
callback = handler;
|
|
1160
|
+
}
|
|
1161
|
+
if ((0, is_array_1.isArray)(subjects)) {
|
|
1162
|
+
subjects.forEach(function (subj) {
|
|
1163
|
+
_this.off(subj, events, callback);
|
|
1164
|
+
});
|
|
1165
|
+
return this;
|
|
1166
|
+
}
|
|
1167
|
+
var subject = subjects;
|
|
1168
|
+
var store = this.__getStore(subject);
|
|
1169
|
+
if (!((0, is_string_1.isString)(events) || (0, is_string_1.isStringArray)(events)) ||
|
|
1170
|
+
events.length === 0) {
|
|
1171
|
+
store.namespaces().forEach(function (namespace) {
|
|
1172
|
+
_this.off(subject, '.' + namespace);
|
|
1173
|
+
});
|
|
1174
|
+
this.__removeStoreFromSubject(subject);
|
|
1175
|
+
return this;
|
|
1176
|
+
}
|
|
1177
|
+
var isDOMElement = (0, is_function_1.isFunction)(subject.removeEventListener), removeEventListener = function (block) {
|
|
1178
|
+
if (isDOMElement) {
|
|
1179
|
+
subject.removeEventListener(block.event, block.syntheticCallback, false);
|
|
1180
|
+
}
|
|
1181
|
+
}, removeCallbackFromNameSpace = function (event, namespace) {
|
|
1182
|
+
if (event === '') {
|
|
1183
|
+
store.events(namespace).forEach(function (eventName) {
|
|
1184
|
+
if (eventName !== '') {
|
|
1185
|
+
removeCallbackFromNameSpace(eventName, namespace);
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
var blocks = store.get(event, namespace);
|
|
1191
|
+
if (!blocks || !blocks.length) {
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
if (!(0, is_function_1.isFunction)(callback)) {
|
|
1195
|
+
blocks.forEach(removeEventListener);
|
|
1196
|
+
blocks.length = 0;
|
|
1197
|
+
store.clearEvents(namespace, event);
|
|
1198
|
+
}
|
|
1199
|
+
else {
|
|
1200
|
+
var index = store.indexOf(event, namespace, callback);
|
|
1201
|
+
if (index !== false) {
|
|
1202
|
+
removeEventListener(blocks[index]);
|
|
1203
|
+
blocks.splice(index, 1);
|
|
1204
|
+
if (!blocks.length) {
|
|
1205
|
+
store.clearEvents(namespace, event);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
this.__eachEvent(events, function (event, namespace) {
|
|
1211
|
+
if (namespace === store_1.defaultNameSpace) {
|
|
1212
|
+
store.namespaces().forEach(function (namespace) {
|
|
1213
|
+
removeCallbackFromNameSpace(event, namespace);
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
removeCallbackFromNameSpace(event, namespace);
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
if (store.isEmpty()) {
|
|
1221
|
+
this.__removeStoreFromSubject(subject);
|
|
1222
|
+
}
|
|
1223
|
+
return this;
|
|
1224
|
+
};
|
|
1225
|
+
EventEmitter.prototype.stopPropagation = function (subjectOrEvents, eventsList) {
|
|
1226
|
+
var _this = this;
|
|
1227
|
+
var subject = (0, is_string_1.isString)(subjectOrEvents)
|
|
1228
|
+
? this
|
|
1229
|
+
: subjectOrEvents;
|
|
1230
|
+
var events = (0, is_string_1.isString)(subjectOrEvents)
|
|
1231
|
+
? subjectOrEvents
|
|
1232
|
+
: eventsList;
|
|
1233
|
+
if (typeof events !== 'string') {
|
|
1234
|
+
throw (0, error_1.error)('Need event names');
|
|
1235
|
+
}
|
|
1236
|
+
var store = this.__getStore(subject);
|
|
1237
|
+
this.__eachEvent(events, function (event, namespace) {
|
|
1238
|
+
var blocks = store.get(event, namespace);
|
|
1239
|
+
if (blocks) {
|
|
1240
|
+
_this.__stopped.push(blocks);
|
|
1241
|
+
}
|
|
1242
|
+
if (namespace === store_1.defaultNameSpace) {
|
|
1243
|
+
store
|
|
1244
|
+
.namespaces(true)
|
|
1245
|
+
.forEach(function (ns) {
|
|
1246
|
+
return _this.stopPropagation(subject, event + '.' + ns);
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
});
|
|
1250
|
+
};
|
|
1251
|
+
EventEmitter.prototype.__removeStop = function (currentBlocks) {
|
|
1252
|
+
if (currentBlocks) {
|
|
1253
|
+
var index = this.__stopped.indexOf(currentBlocks);
|
|
1254
|
+
index !== -1 && this.__stopped.splice(0, index + 1);
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
EventEmitter.prototype.__isStopped = function (currentBlocks) {
|
|
1258
|
+
return (currentBlocks !== undefined &&
|
|
1259
|
+
this.__stopped.indexOf(currentBlocks) !== -1);
|
|
1260
|
+
};
|
|
1261
|
+
EventEmitter.prototype.fire = function (subjectOrEvents, eventsList) {
|
|
1262
|
+
var _this = this;
|
|
1263
|
+
var args = [];
|
|
1264
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1265
|
+
args[_i - 2] = arguments[_i];
|
|
1266
|
+
}
|
|
1267
|
+
var result, result_value;
|
|
1268
|
+
var subject = (0, is_string_1.isString)(subjectOrEvents)
|
|
1269
|
+
? this
|
|
1270
|
+
: subjectOrEvents;
|
|
1271
|
+
var events = (0, is_string_1.isString)(subjectOrEvents)
|
|
1272
|
+
? subjectOrEvents
|
|
1273
|
+
: eventsList;
|
|
1274
|
+
var argumentsList = (0, is_string_1.isString)(subjectOrEvents)
|
|
1275
|
+
? tslib_1.__spreadArray([eventsList], tslib_1.__read(args), false) : args;
|
|
1276
|
+
var isDOMElement = (0, is_function_1.isFunction)(subject.dispatchEvent);
|
|
1277
|
+
if (!isDOMElement && !(0, is_string_1.isString)(events)) {
|
|
1278
|
+
throw (0, error_1.error)('Need events names');
|
|
1279
|
+
}
|
|
1280
|
+
var store = this.__getStore(subject);
|
|
1281
|
+
if (!(0, is_string_1.isString)(events) && isDOMElement) {
|
|
1282
|
+
this.__triggerNativeEvent(subject, eventsList);
|
|
1283
|
+
}
|
|
1284
|
+
else {
|
|
1285
|
+
this.__eachEvent(events, function (event, namespace) {
|
|
1286
|
+
if (isDOMElement) {
|
|
1287
|
+
_this.__triggerNativeEvent(subject, event);
|
|
1288
|
+
}
|
|
1289
|
+
else {
|
|
1290
|
+
var blocks_1 = store.get(event, namespace);
|
|
1291
|
+
if (blocks_1) {
|
|
1292
|
+
try {
|
|
1293
|
+
tslib_1.__spreadArray([], tslib_1.__read(blocks_1), false).every(function (block) {
|
|
1294
|
+
var _a;
|
|
1295
|
+
if (_this.__isStopped(blocks_1)) {
|
|
1296
|
+
return false;
|
|
1297
|
+
}
|
|
1298
|
+
_this.currents.push(event);
|
|
1299
|
+
result_value = (_a = block.syntheticCallback).call.apply(_a, tslib_1.__spreadArray([subject,
|
|
1300
|
+
event], tslib_1.__read(argumentsList), false));
|
|
1301
|
+
_this.currents.pop();
|
|
1302
|
+
if (result_value !== undefined) {
|
|
1303
|
+
result = result_value;
|
|
1304
|
+
}
|
|
1305
|
+
return true;
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
finally {
|
|
1309
|
+
_this.__removeStop(blocks_1);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
if (namespace === store_1.defaultNameSpace && !isDOMElement) {
|
|
1313
|
+
store
|
|
1314
|
+
.namespaces()
|
|
1315
|
+
.filter(function (ns) { return ns !== namespace; })
|
|
1316
|
+
.forEach(function (ns) {
|
|
1317
|
+
var result_second = _this.fire.apply(_this, tslib_1.__spreadArray([
|
|
1318
|
+
subject,
|
|
1319
|
+
event + '.' + ns
|
|
1320
|
+
], tslib_1.__read(argumentsList), false));
|
|
1321
|
+
if (result_second !== undefined) {
|
|
1322
|
+
result = result_second;
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
return result;
|
|
1330
|
+
};
|
|
1331
|
+
EventEmitter.prototype.destruct = function () {
|
|
1332
|
+
if (!this.__isDestructed) {
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
this.__isDestructed = true;
|
|
1336
|
+
this.off(this);
|
|
1337
|
+
this.__getStore(this).clear();
|
|
1338
|
+
this.__removeStoreFromSubject(this);
|
|
1339
|
+
};
|
|
1340
|
+
return EventEmitter;
|
|
1341
|
+
}());
|
|
1342
|
+
exports.EventEmitter = EventEmitter;
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
/***/ }),
|
|
1346
|
+
|
|
1347
|
+
/***/ 73852:
|
|
1348
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
/*!
|
|
1352
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1353
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1354
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1355
|
+
*/
|
|
1356
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1357
|
+
exports.Eventify = void 0;
|
|
1358
|
+
var tslib_1 = __webpack_require__(20255);
|
|
1359
|
+
var Eventify = (function () {
|
|
1360
|
+
function Eventify() {
|
|
1361
|
+
this.__map = new Map();
|
|
1362
|
+
}
|
|
1363
|
+
Eventify.prototype.on = function (name, func) {
|
|
1364
|
+
var _a;
|
|
1365
|
+
if (!this.__map.has(name)) {
|
|
1366
|
+
this.__map.set(name, new Set());
|
|
1367
|
+
}
|
|
1368
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.add(func);
|
|
1369
|
+
return this;
|
|
1370
|
+
};
|
|
1371
|
+
Eventify.prototype.off = function (name, func) {
|
|
1372
|
+
var _a;
|
|
1373
|
+
if (this.__map.has(name)) {
|
|
1374
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.delete(func);
|
|
1375
|
+
}
|
|
1376
|
+
return this;
|
|
1377
|
+
};
|
|
1378
|
+
Eventify.prototype.destruct = function () {
|
|
1379
|
+
this.__map.clear();
|
|
1380
|
+
};
|
|
1381
|
+
Eventify.prototype.emit = function (name) {
|
|
1382
|
+
var _a;
|
|
1383
|
+
var args = [];
|
|
1384
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1385
|
+
args[_i - 1] = arguments[_i];
|
|
1386
|
+
}
|
|
1387
|
+
var result;
|
|
1388
|
+
if (this.__map.has(name)) {
|
|
1389
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.forEach(function (cb) {
|
|
1390
|
+
result = cb.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
return result;
|
|
1394
|
+
};
|
|
1395
|
+
return Eventify;
|
|
1396
|
+
}());
|
|
1397
|
+
exports.Eventify = Eventify;
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
/***/ }),
|
|
1401
|
+
|
|
1402
|
+
/***/ 55395:
|
|
1403
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
/*!
|
|
1407
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1408
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1409
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1410
|
+
*/
|
|
1411
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1412
|
+
var tslib_1 = __webpack_require__(20255);
|
|
1413
|
+
tslib_1.__exportStar(__webpack_require__(3808), exports);
|
|
1414
|
+
tslib_1.__exportStar(__webpack_require__(73852), exports);
|
|
1415
|
+
tslib_1.__exportStar(__webpack_require__(88418), exports);
|
|
1416
|
+
tslib_1.__exportStar(__webpack_require__(83611), exports);
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
/***/ }),
|
|
1420
|
+
|
|
1421
|
+
/***/ 88418:
|
|
1422
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
/*!
|
|
1426
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1427
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1428
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1429
|
+
*/
|
|
1430
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1431
|
+
exports.observable = void 0;
|
|
1432
|
+
var tslib_1 = __webpack_require__(20255);
|
|
1433
|
+
var is_array_1 = __webpack_require__(49781);
|
|
1434
|
+
var is_equal_1 = __webpack_require__(32756);
|
|
1435
|
+
var is_plain_object_1 = __webpack_require__(79736);
|
|
1436
|
+
var watch_1 = __webpack_require__(46163);
|
|
1437
|
+
var OBSERVABLE_OBJECT = Symbol('observable-object');
|
|
1438
|
+
function isObservableObject(obj) {
|
|
1439
|
+
return obj[OBSERVABLE_OBJECT] !== undefined;
|
|
1440
|
+
}
|
|
1441
|
+
function observable(obj) {
|
|
1442
|
+
if (isObservableObject(obj)) {
|
|
1443
|
+
return obj;
|
|
1444
|
+
}
|
|
1445
|
+
var __lockEvent = {};
|
|
1446
|
+
var __onEvents = {};
|
|
1447
|
+
var on = function (event, callback) {
|
|
1448
|
+
if ((0, is_array_1.isArray)(event)) {
|
|
1449
|
+
event.map(function (e) { return on(e, callback); });
|
|
1450
|
+
return obj;
|
|
1451
|
+
}
|
|
1452
|
+
if (!__onEvents[event]) {
|
|
1453
|
+
__onEvents[event] = [];
|
|
1454
|
+
}
|
|
1455
|
+
__onEvents[event].push(callback);
|
|
1456
|
+
return obj;
|
|
1457
|
+
};
|
|
1458
|
+
var fire = function (event) {
|
|
1459
|
+
var attr = [];
|
|
1460
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1461
|
+
attr[_i - 1] = arguments[_i];
|
|
1462
|
+
}
|
|
1463
|
+
if ((0, is_array_1.isArray)(event)) {
|
|
1464
|
+
event.map(function (e) { return fire.apply(void 0, tslib_1.__spreadArray([e], tslib_1.__read(attr), false)); });
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
try {
|
|
1468
|
+
if (!__lockEvent[event] && __onEvents[event]) {
|
|
1469
|
+
__lockEvent[event] = true;
|
|
1470
|
+
__onEvents[event].forEach(function (clb) { return clb.call.apply(clb, tslib_1.__spreadArray([obj], tslib_1.__read(attr), false)); });
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
finally {
|
|
1474
|
+
__lockEvent[event] = false;
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
var initAccessors = function (dict, prefixes) {
|
|
1478
|
+
if (prefixes === void 0) { prefixes = []; }
|
|
1479
|
+
var store = {};
|
|
1480
|
+
if (isObservableObject(dict)) {
|
|
1481
|
+
return;
|
|
1482
|
+
}
|
|
1483
|
+
Object.defineProperty(dict, OBSERVABLE_OBJECT, {
|
|
1484
|
+
enumerable: false,
|
|
1485
|
+
value: true
|
|
1486
|
+
});
|
|
1487
|
+
Object.keys(dict).forEach(function (_key) {
|
|
1488
|
+
var key = _key;
|
|
1489
|
+
var prefix = prefixes.concat(key).filter(function (a) { return a.length; });
|
|
1490
|
+
store[key] = dict[key];
|
|
1491
|
+
var descriptor = (0, watch_1.getPropertyDescriptor)(dict, key);
|
|
1492
|
+
Object.defineProperty(dict, key, {
|
|
1493
|
+
set: function (value) {
|
|
1494
|
+
var oldValue = store[key];
|
|
1495
|
+
if (!(0, is_equal_1.isFastEqual)(store[key], value)) {
|
|
1496
|
+
fire([
|
|
1497
|
+
'beforeChange',
|
|
1498
|
+
"beforeChange.".concat(prefix.join('.'))
|
|
1499
|
+
], key, value);
|
|
1500
|
+
if ((0, is_plain_object_1.isPlainObject)(value)) {
|
|
1501
|
+
initAccessors(value, prefix);
|
|
1502
|
+
}
|
|
1503
|
+
if (descriptor && descriptor.set) {
|
|
1504
|
+
descriptor.set.call(obj, value);
|
|
1505
|
+
}
|
|
1506
|
+
else {
|
|
1507
|
+
store[key] = value;
|
|
1508
|
+
}
|
|
1509
|
+
var sum_1 = [];
|
|
1510
|
+
fire(tslib_1.__spreadArray([
|
|
1511
|
+
'change'
|
|
1512
|
+
], tslib_1.__read(prefix.reduce(function (rs, p) {
|
|
1513
|
+
sum_1.push(p);
|
|
1514
|
+
rs.push("change.".concat(sum_1.join('.')));
|
|
1515
|
+
return rs;
|
|
1516
|
+
}, [])), false), prefix.join('.'), oldValue, (value === null || value === void 0 ? void 0 : value.valueOf)
|
|
1517
|
+
? value.valueOf()
|
|
1518
|
+
: value);
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
get: function () {
|
|
1522
|
+
if (descriptor && descriptor.get) {
|
|
1523
|
+
return descriptor.get.call(obj);
|
|
1524
|
+
}
|
|
1525
|
+
return store[key];
|
|
1526
|
+
},
|
|
1527
|
+
enumerable: true,
|
|
1528
|
+
configurable: true
|
|
1529
|
+
});
|
|
1530
|
+
if ((0, is_plain_object_1.isPlainObject)(store[key])) {
|
|
1531
|
+
initAccessors(store[key], prefix);
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
Object.defineProperty(obj, 'on', {
|
|
1535
|
+
value: on
|
|
1536
|
+
});
|
|
1537
|
+
};
|
|
1538
|
+
initAccessors(obj);
|
|
1539
|
+
return obj;
|
|
1540
|
+
}
|
|
1541
|
+
exports.observable = observable;
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
/***/ }),
|
|
1545
|
+
|
|
1546
|
+
/***/ 83611:
|
|
1547
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1548
|
+
|
|
1549
|
+
|
|
1550
|
+
/*!
|
|
1551
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1552
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1553
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1554
|
+
*/
|
|
1555
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1556
|
+
exports.EventHandlersStore = exports.defaultNameSpace = void 0;
|
|
1557
|
+
var assert_1 = __webpack_require__(52378);
|
|
1558
|
+
var to_array_1 = __webpack_require__(1853);
|
|
1559
|
+
exports.defaultNameSpace = 'JoditEventDefaultNamespace';
|
|
1560
|
+
var EventHandlersStore = (function () {
|
|
1561
|
+
function EventHandlersStore() {
|
|
1562
|
+
this.__store = new Map();
|
|
1563
|
+
}
|
|
1564
|
+
EventHandlersStore.prototype.get = function (event, namespace) {
|
|
1565
|
+
if (this.__store.has(namespace)) {
|
|
1566
|
+
var ns = this.__store.get(namespace);
|
|
1567
|
+
void 0;
|
|
1568
|
+
return ns[event];
|
|
1569
|
+
}
|
|
1570
|
+
};
|
|
1571
|
+
EventHandlersStore.prototype.indexOf = function (event, namespace, originalCallback) {
|
|
1572
|
+
var blocks = this.get(event, namespace);
|
|
1573
|
+
if (blocks) {
|
|
1574
|
+
for (var i = 0; i < blocks.length; i += 1) {
|
|
1575
|
+
if (blocks[i].originalCallback === originalCallback) {
|
|
1576
|
+
return i;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
return false;
|
|
1581
|
+
};
|
|
1582
|
+
EventHandlersStore.prototype.namespaces = function (withoutDefault) {
|
|
1583
|
+
if (withoutDefault === void 0) { withoutDefault = false; }
|
|
1584
|
+
var nss = (0, to_array_1.toArray)(this.__store.keys());
|
|
1585
|
+
return withoutDefault ? nss.filter(function (ns) { return ns !== exports.defaultNameSpace; }) : nss;
|
|
1586
|
+
};
|
|
1587
|
+
EventHandlersStore.prototype.events = function (namespace) {
|
|
1588
|
+
var ns = this.__store.get(namespace);
|
|
1589
|
+
return ns ? Object.keys(ns) : [];
|
|
1590
|
+
};
|
|
1591
|
+
EventHandlersStore.prototype.set = function (event, namespace, data, onTop) {
|
|
1592
|
+
if (onTop === void 0) { onTop = false; }
|
|
1593
|
+
var ns = this.__store.get(namespace);
|
|
1594
|
+
if (!ns) {
|
|
1595
|
+
ns = {};
|
|
1596
|
+
this.__store.set(namespace, ns);
|
|
1597
|
+
}
|
|
1598
|
+
if (ns[event] === undefined) {
|
|
1599
|
+
ns[event] = [];
|
|
1600
|
+
}
|
|
1601
|
+
if (!onTop) {
|
|
1602
|
+
ns[event].push(data);
|
|
1603
|
+
}
|
|
1604
|
+
else {
|
|
1605
|
+
ns[event].unshift(data);
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
EventHandlersStore.prototype.clear = function () {
|
|
1609
|
+
this.__store.clear();
|
|
1610
|
+
};
|
|
1611
|
+
EventHandlersStore.prototype.clearEvents = function (namespace, event) {
|
|
1612
|
+
var ns = this.__store.get(namespace);
|
|
1613
|
+
if (ns && ns[event]) {
|
|
1614
|
+
delete ns[event];
|
|
1615
|
+
if (!Object.keys(ns).length) {
|
|
1616
|
+
this.__store.delete(namespace);
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
EventHandlersStore.prototype.isEmpty = function () {
|
|
1621
|
+
return this.__store.size === 0;
|
|
1622
|
+
};
|
|
1623
|
+
return EventHandlersStore;
|
|
1624
|
+
}());
|
|
1625
|
+
exports.EventHandlersStore = EventHandlersStore;
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
/***/ }),
|
|
1629
|
+
|
|
1630
|
+
/***/ 14556:
|
|
1631
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
/*!
|
|
1635
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1636
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1637
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1638
|
+
*/
|
|
1639
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1640
|
+
exports.splitArray = void 0;
|
|
1641
|
+
function splitArray(a) {
|
|
1642
|
+
return Array.isArray(a) ? a : a.split(/[,\s]+/);
|
|
1643
|
+
}
|
|
1644
|
+
exports.splitArray = splitArray;
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
/***/ }),
|
|
1648
|
+
|
|
1649
|
+
/***/ 1853:
|
|
1650
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
/*!
|
|
1654
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1655
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1656
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1657
|
+
*/
|
|
1658
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1659
|
+
exports.toArray = void 0;
|
|
1660
|
+
var reset_1 = __webpack_require__(80861);
|
|
1661
|
+
var is_native_function_1 = __webpack_require__(28069);
|
|
1662
|
+
exports.toArray = function toArray() {
|
|
1663
|
+
var _a;
|
|
1664
|
+
var args = [];
|
|
1665
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1666
|
+
args[_i] = arguments[_i];
|
|
1667
|
+
}
|
|
1668
|
+
var func = (0, is_native_function_1.isNativeFunction)(Array.from)
|
|
1669
|
+
? Array.from
|
|
1670
|
+
: (_a = (0, reset_1.reset)('Array.from')) !== null && _a !== void 0 ? _a : Array.from;
|
|
1671
|
+
return func.apply(Array, args);
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
/***/ }),
|
|
1676
|
+
|
|
1677
|
+
/***/ 4696:
|
|
737
1678
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
738
1679
|
|
|
739
1680
|
|
|
@@ -744,12 +1685,12 @@ tslib_1.__exportStar(__webpack_require__(36171), exports);
|
|
|
744
1685
|
*/
|
|
745
1686
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
746
1687
|
var tslib_1 = __webpack_require__(20255);
|
|
747
|
-
tslib_1.__exportStar(__webpack_require__(
|
|
1688
|
+
tslib_1.__exportStar(__webpack_require__(27512), exports);
|
|
748
1689
|
|
|
749
1690
|
|
|
750
1691
|
/***/ }),
|
|
751
1692
|
|
|
752
|
-
/***/
|
|
1693
|
+
/***/ 27512:
|
|
753
1694
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
754
1695
|
|
|
755
1696
|
|
|
@@ -783,7 +1724,7 @@ exports.clearTimeout = clearTimeout;
|
|
|
783
1724
|
|
|
784
1725
|
/***/ }),
|
|
785
1726
|
|
|
786
|
-
/***/
|
|
1727
|
+
/***/ 49781:
|
|
787
1728
|
/***/ (function(__unused_webpack_module, exports) {
|
|
788
1729
|
|
|
789
1730
|
|
|
@@ -802,7 +1743,31 @@ exports.isArray = isArray;
|
|
|
802
1743
|
|
|
803
1744
|
/***/ }),
|
|
804
1745
|
|
|
805
|
-
/***/
|
|
1746
|
+
/***/ 32756:
|
|
1747
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
/*!
|
|
1751
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1752
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1753
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1754
|
+
*/
|
|
1755
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1756
|
+
exports.isFastEqual = exports.isEqual = void 0;
|
|
1757
|
+
var stringify_1 = __webpack_require__(42554);
|
|
1758
|
+
function isEqual(a, b) {
|
|
1759
|
+
return a === b || (0, stringify_1.stringify)(a) === (0, stringify_1.stringify)(b);
|
|
1760
|
+
}
|
|
1761
|
+
exports.isEqual = isEqual;
|
|
1762
|
+
function isFastEqual(a, b) {
|
|
1763
|
+
return a === b;
|
|
1764
|
+
}
|
|
1765
|
+
exports.isFastEqual = isFastEqual;
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
/***/ }),
|
|
1769
|
+
|
|
1770
|
+
/***/ 42096:
|
|
806
1771
|
/***/ (function(__unused_webpack_module, exports) {
|
|
807
1772
|
|
|
808
1773
|
|
|
@@ -821,7 +1786,29 @@ exports.isFunction = isFunction;
|
|
|
821
1786
|
|
|
822
1787
|
/***/ }),
|
|
823
1788
|
|
|
824
|
-
/***/
|
|
1789
|
+
/***/ 28069:
|
|
1790
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
/*!
|
|
1794
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1795
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1796
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1797
|
+
*/
|
|
1798
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1799
|
+
exports.isNativeFunction = void 0;
|
|
1800
|
+
function isNativeFunction(f) {
|
|
1801
|
+
return (Boolean(f) &&
|
|
1802
|
+
(typeof f).toLowerCase() === 'function' &&
|
|
1803
|
+
(f === Function.prototype ||
|
|
1804
|
+
/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(f))));
|
|
1805
|
+
}
|
|
1806
|
+
exports.isNativeFunction = isNativeFunction;
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
/***/ }),
|
|
1810
|
+
|
|
1811
|
+
/***/ 61817:
|
|
825
1812
|
/***/ (function(__unused_webpack_module, exports) {
|
|
826
1813
|
|
|
827
1814
|
|
|
@@ -840,7 +1827,7 @@ exports.isNumber = isNumber;
|
|
|
840
1827
|
|
|
841
1828
|
/***/ }),
|
|
842
1829
|
|
|
843
|
-
/***/
|
|
1830
|
+
/***/ 79736:
|
|
844
1831
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
845
1832
|
|
|
846
1833
|
|
|
@@ -851,7 +1838,7 @@ exports.isNumber = isNumber;
|
|
|
851
1838
|
*/
|
|
852
1839
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
853
1840
|
exports.isPlainObject = void 0;
|
|
854
|
-
var is_window_1 = __webpack_require__(
|
|
1841
|
+
var is_window_1 = __webpack_require__(85994);
|
|
855
1842
|
function isPlainObject(obj) {
|
|
856
1843
|
if (!obj || typeof obj !== 'object' || obj.nodeType || (0, is_window_1.isWindow)(obj)) {
|
|
857
1844
|
return false;
|
|
@@ -864,7 +1851,7 @@ exports.isPlainObject = isPlainObject;
|
|
|
864
1851
|
|
|
865
1852
|
/***/ }),
|
|
866
1853
|
|
|
867
|
-
/***/
|
|
1854
|
+
/***/ 26335:
|
|
868
1855
|
/***/ (function(__unused_webpack_module, exports) {
|
|
869
1856
|
|
|
870
1857
|
|
|
@@ -883,7 +1870,7 @@ exports.isPromise = isPromise;
|
|
|
883
1870
|
|
|
884
1871
|
/***/ }),
|
|
885
1872
|
|
|
886
|
-
/***/
|
|
1873
|
+
/***/ 24421:
|
|
887
1874
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
888
1875
|
|
|
889
1876
|
|
|
@@ -894,7 +1881,7 @@ exports.isPromise = isPromise;
|
|
|
894
1881
|
*/
|
|
895
1882
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
896
1883
|
exports.isStringArray = exports.isString = void 0;
|
|
897
|
-
var is_array_1 = __webpack_require__(
|
|
1884
|
+
var is_array_1 = __webpack_require__(49781);
|
|
898
1885
|
function isString(value) {
|
|
899
1886
|
return typeof value === 'string';
|
|
900
1887
|
}
|
|
@@ -907,7 +1894,49 @@ exports.isStringArray = isStringArray;
|
|
|
907
1894
|
|
|
908
1895
|
/***/ }),
|
|
909
1896
|
|
|
910
|
-
/***/
|
|
1897
|
+
/***/ 96574:
|
|
1898
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
/*!
|
|
1902
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1903
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1904
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1905
|
+
*/
|
|
1906
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1907
|
+
exports.isViewObject = void 0;
|
|
1908
|
+
var is_function_1 = __webpack_require__(42096);
|
|
1909
|
+
function isViewObject(jodit) {
|
|
1910
|
+
return Boolean(jodit &&
|
|
1911
|
+
jodit instanceof Object &&
|
|
1912
|
+
(0, is_function_1.isFunction)(jodit.constructor) &&
|
|
1913
|
+
jodit.isView);
|
|
1914
|
+
}
|
|
1915
|
+
exports.isViewObject = isViewObject;
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
/***/ }),
|
|
1919
|
+
|
|
1920
|
+
/***/ 24021:
|
|
1921
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
/*!
|
|
1925
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1926
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1927
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1928
|
+
*/
|
|
1929
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1930
|
+
exports.isVoid = void 0;
|
|
1931
|
+
function isVoid(value) {
|
|
1932
|
+
return value === undefined || value === null;
|
|
1933
|
+
}
|
|
1934
|
+
exports.isVoid = isVoid;
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
/***/ }),
|
|
1938
|
+
|
|
1939
|
+
/***/ 85994:
|
|
911
1940
|
/***/ (function(__unused_webpack_module, exports) {
|
|
912
1941
|
|
|
913
1942
|
|
|
@@ -926,7 +1955,288 @@ exports.isWindow = isWindow;
|
|
|
926
1955
|
|
|
927
1956
|
/***/ }),
|
|
928
1957
|
|
|
929
|
-
/***/
|
|
1958
|
+
/***/ 42554:
|
|
1959
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
/*!
|
|
1963
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1964
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1965
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1966
|
+
*/
|
|
1967
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1968
|
+
exports.stringify = void 0;
|
|
1969
|
+
function stringify(value, options) {
|
|
1970
|
+
if (options === void 0) { options = {}; }
|
|
1971
|
+
if (typeof value !== 'object') {
|
|
1972
|
+
return String(value);
|
|
1973
|
+
}
|
|
1974
|
+
var excludeKeys = new Set(options.excludeKeys);
|
|
1975
|
+
var map = new WeakMap();
|
|
1976
|
+
var r = function (k, v) {
|
|
1977
|
+
if (excludeKeys.has(k)) {
|
|
1978
|
+
return;
|
|
1979
|
+
}
|
|
1980
|
+
if (typeof v === 'object' && v != null) {
|
|
1981
|
+
if (map.get(v)) {
|
|
1982
|
+
return '[refObject]';
|
|
1983
|
+
}
|
|
1984
|
+
map.set(v, true);
|
|
1985
|
+
}
|
|
1986
|
+
return v;
|
|
1987
|
+
};
|
|
1988
|
+
return JSON.stringify(value, r, options.prettify);
|
|
1989
|
+
}
|
|
1990
|
+
exports.stringify = stringify;
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
/***/ }),
|
|
1994
|
+
|
|
1995
|
+
/***/ 41579:
|
|
1996
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
/*!
|
|
2000
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2001
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2002
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2003
|
+
*/
|
|
2004
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2005
|
+
exports.isAbort = exports.abort = exports.options = exports.connection = exports.error = void 0;
|
|
2006
|
+
var errors_1 = __webpack_require__(45339);
|
|
2007
|
+
function error(message) {
|
|
2008
|
+
return new TypeError(message);
|
|
2009
|
+
}
|
|
2010
|
+
exports.error = error;
|
|
2011
|
+
function connection(message) {
|
|
2012
|
+
return new errors_1.ConnectionError(message);
|
|
2013
|
+
}
|
|
2014
|
+
exports.connection = connection;
|
|
2015
|
+
function options(message) {
|
|
2016
|
+
return new errors_1.OptionsError(message);
|
|
2017
|
+
}
|
|
2018
|
+
exports.options = options;
|
|
2019
|
+
function abort(message) {
|
|
2020
|
+
return new errors_1.AbortError(message);
|
|
2021
|
+
}
|
|
2022
|
+
exports.abort = abort;
|
|
2023
|
+
function isAbort(error) {
|
|
2024
|
+
return error instanceof errors_1.AbortError;
|
|
2025
|
+
}
|
|
2026
|
+
exports.isAbort = isAbort;
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
/***/ }),
|
|
2030
|
+
|
|
2031
|
+
/***/ 86768:
|
|
2032
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
/*!
|
|
2036
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2037
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2038
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2039
|
+
*/
|
|
2040
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2041
|
+
exports.AbortError = void 0;
|
|
2042
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2043
|
+
var AbortError = (function (_super) {
|
|
2044
|
+
tslib_1.__extends(AbortError, _super);
|
|
2045
|
+
function AbortError(m) {
|
|
2046
|
+
var _this = _super.call(this, m) || this;
|
|
2047
|
+
Object.setPrototypeOf(_this, AbortError.prototype);
|
|
2048
|
+
return _this;
|
|
2049
|
+
}
|
|
2050
|
+
return AbortError;
|
|
2051
|
+
}(Error));
|
|
2052
|
+
exports.AbortError = AbortError;
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
/***/ }),
|
|
2056
|
+
|
|
2057
|
+
/***/ 43380:
|
|
2058
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
/*!
|
|
2062
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2063
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2064
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2065
|
+
*/
|
|
2066
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2067
|
+
exports.ConnectionError = void 0;
|
|
2068
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2069
|
+
var ConnectionError = (function (_super) {
|
|
2070
|
+
tslib_1.__extends(ConnectionError, _super);
|
|
2071
|
+
function ConnectionError(m) {
|
|
2072
|
+
var _this = _super.call(this, m) || this;
|
|
2073
|
+
Object.setPrototypeOf(_this, ConnectionError.prototype);
|
|
2074
|
+
return _this;
|
|
2075
|
+
}
|
|
2076
|
+
return ConnectionError;
|
|
2077
|
+
}(Error));
|
|
2078
|
+
exports.ConnectionError = ConnectionError;
|
|
2079
|
+
|
|
2080
|
+
|
|
2081
|
+
/***/ }),
|
|
2082
|
+
|
|
2083
|
+
/***/ 45339:
|
|
2084
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
/*!
|
|
2088
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2089
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2090
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2091
|
+
*/
|
|
2092
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2093
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2094
|
+
tslib_1.__exportStar(__webpack_require__(86768), exports);
|
|
2095
|
+
tslib_1.__exportStar(__webpack_require__(43380), exports);
|
|
2096
|
+
tslib_1.__exportStar(__webpack_require__(47403), exports);
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
/***/ }),
|
|
2100
|
+
|
|
2101
|
+
/***/ 47403:
|
|
2102
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
/*!
|
|
2106
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2107
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2108
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2109
|
+
*/
|
|
2110
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2111
|
+
exports.OptionsError = void 0;
|
|
2112
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2113
|
+
var OptionsError = (function (_super) {
|
|
2114
|
+
tslib_1.__extends(OptionsError, _super);
|
|
2115
|
+
function OptionsError(m) {
|
|
2116
|
+
var _this = _super.call(this, m) || this;
|
|
2117
|
+
Object.setPrototypeOf(_this, OptionsError.prototype);
|
|
2118
|
+
return _this;
|
|
2119
|
+
}
|
|
2120
|
+
return OptionsError;
|
|
2121
|
+
}(TypeError));
|
|
2122
|
+
exports.OptionsError = OptionsError;
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
/***/ }),
|
|
2126
|
+
|
|
2127
|
+
/***/ 56964:
|
|
2128
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
/*!
|
|
2132
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2133
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2134
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2135
|
+
*/
|
|
2136
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2137
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2138
|
+
tslib_1.__exportStar(__webpack_require__(41579), exports);
|
|
2139
|
+
tslib_1.__exportStar(__webpack_require__(45339), exports);
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
/***/ }),
|
|
2143
|
+
|
|
2144
|
+
/***/ 69384:
|
|
2145
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
/*!
|
|
2149
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2150
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2151
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2152
|
+
*/
|
|
2153
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2154
|
+
exports.get = void 0;
|
|
2155
|
+
var tslib_1 = __webpack_require__(20255);
|
|
2156
|
+
var is_string_1 = __webpack_require__(24421);
|
|
2157
|
+
var is_void_1 = __webpack_require__(24021);
|
|
2158
|
+
function get(chain, obj) {
|
|
2159
|
+
var e_1, _a;
|
|
2160
|
+
if (!(0, is_string_1.isString)(chain) || !chain.length) {
|
|
2161
|
+
return null;
|
|
2162
|
+
}
|
|
2163
|
+
var parts = chain.split('.');
|
|
2164
|
+
var result = obj;
|
|
2165
|
+
try {
|
|
2166
|
+
try {
|
|
2167
|
+
for (var parts_1 = tslib_1.__values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) {
|
|
2168
|
+
var part = parts_1_1.value;
|
|
2169
|
+
if ((0, is_void_1.isVoid)(result[part])) {
|
|
2170
|
+
return null;
|
|
2171
|
+
}
|
|
2172
|
+
result = result[part];
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2176
|
+
finally {
|
|
2177
|
+
try {
|
|
2178
|
+
if (parts_1_1 && !parts_1_1.done && (_a = parts_1.return)) _a.call(parts_1);
|
|
2179
|
+
}
|
|
2180
|
+
finally { if (e_1) throw e_1.error; }
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
catch (_b) {
|
|
2184
|
+
return null;
|
|
2185
|
+
}
|
|
2186
|
+
if ((0, is_void_1.isVoid)(result)) {
|
|
2187
|
+
return null;
|
|
2188
|
+
}
|
|
2189
|
+
return result;
|
|
2190
|
+
}
|
|
2191
|
+
exports.get = get;
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
/***/ }),
|
|
2195
|
+
|
|
2196
|
+
/***/ 80861:
|
|
2197
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
/*!
|
|
2201
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2202
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
2203
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
2204
|
+
*/
|
|
2205
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2206
|
+
exports.reset = void 0;
|
|
2207
|
+
var get_1 = __webpack_require__(69384);
|
|
2208
|
+
var is_function_1 = __webpack_require__(42096);
|
|
2209
|
+
var map = {};
|
|
2210
|
+
var reset = function (key) {
|
|
2211
|
+
var _a, _b;
|
|
2212
|
+
if (!(key in map)) {
|
|
2213
|
+
var iframe = document.createElement('iframe');
|
|
2214
|
+
try {
|
|
2215
|
+
iframe.src = 'about:blank';
|
|
2216
|
+
document.body.appendChild(iframe);
|
|
2217
|
+
if (!iframe.contentWindow) {
|
|
2218
|
+
return null;
|
|
2219
|
+
}
|
|
2220
|
+
var func = (0, get_1.get)(key, iframe.contentWindow), bind = (0, get_1.get)(key.split('.').slice(0, -1).join('.'), iframe.contentWindow);
|
|
2221
|
+
if ((0, is_function_1.isFunction)(func)) {
|
|
2222
|
+
map[key] = func.bind(bind);
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
catch (e) {
|
|
2226
|
+
if (false) {}
|
|
2227
|
+
}
|
|
2228
|
+
finally {
|
|
2229
|
+
(_a = iframe.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(iframe);
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
return (_b = map[key]) !== null && _b !== void 0 ? _b : null;
|
|
2233
|
+
};
|
|
2234
|
+
exports.reset = reset;
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
/***/ }),
|
|
2238
|
+
|
|
2239
|
+
/***/ 93629:
|
|
930
2240
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
931
2241
|
|
|
932
2242
|
|
|
@@ -980,7 +2290,7 @@ exports.domToVDom = domToVDom;
|
|
|
980
2290
|
|
|
981
2291
|
/***/ }),
|
|
982
2292
|
|
|
983
|
-
/***/
|
|
2293
|
+
/***/ 18510:
|
|
984
2294
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
985
2295
|
|
|
986
2296
|
|
|
@@ -991,14 +2301,14 @@ exports.domToVDom = domToVDom;
|
|
|
991
2301
|
*/
|
|
992
2302
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
993
2303
|
var tslib_1 = __webpack_require__(20255);
|
|
994
|
-
tslib_1.__exportStar(__webpack_require__(
|
|
995
|
-
tslib_1.__exportStar(__webpack_require__(
|
|
996
|
-
tslib_1.__exportStar(__webpack_require__(
|
|
2304
|
+
tslib_1.__exportStar(__webpack_require__(89222), exports);
|
|
2305
|
+
tslib_1.__exportStar(__webpack_require__(2123), exports);
|
|
2306
|
+
tslib_1.__exportStar(__webpack_require__(67122), exports);
|
|
997
2307
|
|
|
998
2308
|
|
|
999
2309
|
/***/ }),
|
|
1000
2310
|
|
|
1001
|
-
/***/
|
|
2311
|
+
/***/ 89222:
|
|
1002
2312
|
/***/ (function(__unused_webpack_module, exports) {
|
|
1003
2313
|
|
|
1004
2314
|
|
|
@@ -1012,7 +2322,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
1012
2322
|
|
|
1013
2323
|
/***/ }),
|
|
1014
2324
|
|
|
1015
|
-
/***/
|
|
2325
|
+
/***/ 2123:
|
|
1016
2326
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1017
2327
|
|
|
1018
2328
|
|
|
@@ -1024,8 +2334,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
1024
2334
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1025
2335
|
exports.VDomRender = void 0;
|
|
1026
2336
|
var tslib_1 = __webpack_require__(20255);
|
|
1027
|
-
var helpers_1 = __webpack_require__(
|
|
1028
|
-
var async_1 = __webpack_require__(
|
|
2337
|
+
var helpers_1 = __webpack_require__(93629);
|
|
2338
|
+
var async_1 = __webpack_require__(22630);
|
|
1029
2339
|
var autobind_decorator_1 = __webpack_require__(70631);
|
|
1030
2340
|
var isProperty = function (key) { return key !== 'children'; };
|
|
1031
2341
|
var isNew = function (prev, next) {
|
|
@@ -1100,7 +2410,7 @@ var VDomRender = (function () {
|
|
|
1100
2410
|
};
|
|
1101
2411
|
VDomRender.prototype.commitDeletion = function (fiber, domParent) {
|
|
1102
2412
|
if (fiber === null || fiber === void 0 ? void 0 : fiber.dom) {
|
|
1103
|
-
domParent.removeChild(fiber.dom);
|
|
2413
|
+
fiber.dom.isConnected && domParent.removeChild(fiber.dom);
|
|
1104
2414
|
}
|
|
1105
2415
|
else {
|
|
1106
2416
|
this.commitDeletion(fiber === null || fiber === void 0 ? void 0 : fiber.child, domParent);
|
|
@@ -1198,7 +2508,7 @@ var VDomRender = (function () {
|
|
|
1198
2508
|
VDomRender.prototype.htmlToVDom = function (html) {
|
|
1199
2509
|
var box = document.createElement('div');
|
|
1200
2510
|
box.innerHTML = html;
|
|
1201
|
-
return (0, helpers_1.domToVDom)(box
|
|
2511
|
+
return (0, helpers_1.domToVDom)(box);
|
|
1202
2512
|
};
|
|
1203
2513
|
VDomRender = tslib_1.__decorate([
|
|
1204
2514
|
autobind_decorator_1.default
|
|
@@ -1210,7 +2520,7 @@ exports.VDomRender = VDomRender;
|
|
|
1210
2520
|
|
|
1211
2521
|
/***/ }),
|
|
1212
2522
|
|
|
1213
|
-
/***/
|
|
2523
|
+
/***/ 67122:
|
|
1214
2524
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1215
2525
|
|
|
1216
2526
|
|
|
@@ -1220,25 +2530,69 @@ exports.VDomRender = VDomRender;
|
|
|
1220
2530
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1221
2531
|
*/
|
|
1222
2532
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1223
|
-
exports.VDomJodit = void 0;
|
|
2533
|
+
exports.insertChar = exports.VDomJodit = void 0;
|
|
2534
|
+
var tslib_1 = __webpack_require__(20255);
|
|
1224
2535
|
__webpack_require__(8058);
|
|
1225
|
-
var render_1 = __webpack_require__(
|
|
2536
|
+
var render_1 = __webpack_require__(2123);
|
|
2537
|
+
var event_emitter_1 = __webpack_require__(55395);
|
|
1226
2538
|
var VDomJodit = (function () {
|
|
1227
2539
|
function VDomJodit(elm) {
|
|
2540
|
+
var _this = this;
|
|
1228
2541
|
var _a;
|
|
1229
2542
|
this.render = new render_1.VDomRender();
|
|
2543
|
+
this.render2 = new render_1.VDomRender();
|
|
2544
|
+
this.event = new event_emitter_1.EventEmitter();
|
|
1230
2545
|
this.container = document.createElement('div');
|
|
2546
|
+
this.editor = document.createElement('div');
|
|
2547
|
+
this.mirror = document.createElement('div');
|
|
2548
|
+
this.astMirror = document.createElement('pre');
|
|
1231
2549
|
elm.style.display = 'none';
|
|
1232
2550
|
(_a = elm.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.container, elm);
|
|
1233
|
-
this.
|
|
2551
|
+
this.editor.setAttribute('contenteditable', 'true');
|
|
1234
2552
|
this.container.classList.add('jodit-v-dom-container');
|
|
2553
|
+
this.editor.classList.add('jodit-v-dom-editor');
|
|
2554
|
+
this.astMirror.classList.add('jodit-v-dom-ast-mirror');
|
|
2555
|
+
this.container.appendChild(this.editor);
|
|
2556
|
+
this.container.appendChild(this.astMirror);
|
|
2557
|
+
this.container.appendChild(this.mirror);
|
|
1235
2558
|
this.value = elm.value;
|
|
2559
|
+
this.event.on(document, 'selectionchange', function () {
|
|
2560
|
+
console.log(111);
|
|
2561
|
+
});
|
|
2562
|
+
document.execCommand('defaultParagraphSeparator', false, 'p');
|
|
2563
|
+
var config = {
|
|
2564
|
+
attributes: true,
|
|
2565
|
+
childList: true,
|
|
2566
|
+
subtree: true,
|
|
2567
|
+
characterData: true
|
|
2568
|
+
};
|
|
2569
|
+
var callback = function (mutationList) {
|
|
2570
|
+
var e_1, _a;
|
|
2571
|
+
try {
|
|
2572
|
+
for (var mutationList_1 = tslib_1.__values(mutationList), mutationList_1_1 = mutationList_1.next(); !mutationList_1_1.done; mutationList_1_1 = mutationList_1.next()) {
|
|
2573
|
+
var mutation = mutationList_1_1.value;
|
|
2574
|
+
console.log(mutation);
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2578
|
+
finally {
|
|
2579
|
+
try {
|
|
2580
|
+
if (mutationList_1_1 && !mutationList_1_1.done && (_a = mutationList_1.return)) _a.call(mutationList_1);
|
|
2581
|
+
}
|
|
2582
|
+
finally { if (e_1) throw e_1.error; }
|
|
2583
|
+
}
|
|
2584
|
+
var vdom = _this.render2.htmlToVDom(_this.editor.innerHTML);
|
|
2585
|
+
_this.astMirror.textContent = JSON.stringify(vdom, null, ' ');
|
|
2586
|
+
_this.render2.render(vdom, _this.mirror);
|
|
2587
|
+
};
|
|
2588
|
+
var observer = new MutationObserver(callback);
|
|
2589
|
+
observer.observe(this.editor, config);
|
|
1236
2590
|
this.preventAllInputEvents();
|
|
1237
2591
|
}
|
|
1238
2592
|
Object.defineProperty(VDomJodit.prototype, "value", {
|
|
1239
2593
|
set: function (v) {
|
|
1240
2594
|
this.vdom = this.render.htmlToVDom(v);
|
|
1241
|
-
this.render.render(this.vdom, this.
|
|
2595
|
+
this.render.render(this.vdom, this.editor);
|
|
1242
2596
|
},
|
|
1243
2597
|
enumerable: false,
|
|
1244
2598
|
configurable: true
|
|
@@ -1248,12 +2602,62 @@ var VDomJodit = (function () {
|
|
|
1248
2602
|
};
|
|
1249
2603
|
VDomJodit.prototype.preventAllInputEvents = function () {
|
|
1250
2604
|
this.container.addEventListener('keydown', function (e) {
|
|
1251
|
-
e.preventDefault();
|
|
1252
2605
|
});
|
|
1253
2606
|
};
|
|
1254
2607
|
return VDomJodit;
|
|
1255
2608
|
}());
|
|
1256
2609
|
exports.VDomJodit = VDomJodit;
|
|
2610
|
+
var vdom = {
|
|
2611
|
+
type: 'div',
|
|
2612
|
+
props: {
|
|
2613
|
+
children: [
|
|
2614
|
+
{
|
|
2615
|
+
type: 'h1',
|
|
2616
|
+
props: {
|
|
2617
|
+
style: { color: '#f00' },
|
|
2618
|
+
children: [
|
|
2619
|
+
{
|
|
2620
|
+
type: 'TEXT_ELEMENT',
|
|
2621
|
+
props: {
|
|
2622
|
+
nodeValue: 'This is a title'
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
]
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
type: 'p',
|
|
2630
|
+
props: {
|
|
2631
|
+
className: 'test',
|
|
2632
|
+
children: [
|
|
2633
|
+
{
|
|
2634
|
+
type: 'TEXT_ELEMENT',
|
|
2635
|
+
props: {
|
|
2636
|
+
nodeValue: 'This is a paragraph'
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
]
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
]
|
|
2643
|
+
}
|
|
2644
|
+
};
|
|
2645
|
+
var state = {
|
|
2646
|
+
cursor: {
|
|
2647
|
+
startContainer: vdom.props.children[0].props.children[0],
|
|
2648
|
+
startOffset: 0
|
|
2649
|
+
},
|
|
2650
|
+
vdom: vdom
|
|
2651
|
+
};
|
|
2652
|
+
function insertChar(char) {
|
|
2653
|
+
var _a = state.cursor, startContainer = _a.startContainer, startOffset = _a.startOffset;
|
|
2654
|
+
var text = startContainer.props.nodeValue;
|
|
2655
|
+
var before = text.slice(0, startOffset);
|
|
2656
|
+
var after = text.slice(startOffset);
|
|
2657
|
+
startContainer.props.nodeValue = before + char + after;
|
|
2658
|
+
state.cursor.startOffset += 1;
|
|
2659
|
+
}
|
|
2660
|
+
exports.insertChar = insertChar;
|
|
1257
2661
|
|
|
1258
2662
|
|
|
1259
2663
|
/***/ }),
|
|
@@ -1308,7 +2712,7 @@ module.exports = {assert(){}};;
|
|
|
1308
2712
|
/******/ // startup
|
|
1309
2713
|
/******/ // Load entry module and return exports
|
|
1310
2714
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
1311
|
-
/******/ var __webpack_exports__ = __webpack_require__(
|
|
2715
|
+
/******/ var __webpack_exports__ = __webpack_require__(18510);
|
|
1312
2716
|
/******/
|
|
1313
2717
|
/******/ return __webpack_exports__;
|
|
1314
2718
|
/******/ })()
|