base.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /**
  2. * DevExtreme (ui/html_editor/themes/base.js)
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
  8. */
  9. "use strict";
  10. function _typeof(obj) {
  11. "@babel/helpers - typeof";
  12. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
  13. return typeof obj
  14. } : function(obj) {
  15. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj
  16. }, _typeof(obj)
  17. }
  18. Object.defineProperty(exports, "__esModule", {
  19. value: true
  20. });
  21. var _quill_importer = require("../quill_importer");
  22. function _defineProperties(target, props) {
  23. for (var i = 0; i < props.length; i++) {
  24. var descriptor = props[i];
  25. descriptor.enumerable = descriptor.enumerable || false;
  26. descriptor.configurable = true;
  27. if ("value" in descriptor) {
  28. descriptor.writable = true
  29. }
  30. Object.defineProperty(target, descriptor.key, descriptor)
  31. }
  32. }
  33. function _createClass(Constructor, protoProps, staticProps) {
  34. if (protoProps) {
  35. _defineProperties(Constructor.prototype, protoProps)
  36. }
  37. if (staticProps) {
  38. _defineProperties(Constructor, staticProps)
  39. }
  40. Object.defineProperty(Constructor, "prototype", {
  41. writable: false
  42. });
  43. return Constructor
  44. }
  45. function _classCallCheck(instance, Constructor) {
  46. if (!(instance instanceof Constructor)) {
  47. throw new TypeError("Cannot call a class as a function")
  48. }
  49. }
  50. function _inherits(subClass, superClass) {
  51. if ("function" !== typeof superClass && null !== superClass) {
  52. throw new TypeError("Super expression must either be null or a function")
  53. }
  54. subClass.prototype = Object.create(superClass && superClass.prototype, {
  55. constructor: {
  56. value: subClass,
  57. writable: true,
  58. configurable: true
  59. }
  60. });
  61. Object.defineProperty(subClass, "prototype", {
  62. writable: false
  63. });
  64. if (superClass) {
  65. _setPrototypeOf(subClass, superClass)
  66. }
  67. }
  68. function _setPrototypeOf(o, p) {
  69. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, p) {
  70. o.__proto__ = p;
  71. return o
  72. };
  73. return _setPrototypeOf(o, p)
  74. }
  75. function _createSuper(Derived) {
  76. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  77. return function() {
  78. var result, Super = _getPrototypeOf(Derived);
  79. if (hasNativeReflectConstruct) {
  80. var NewTarget = _getPrototypeOf(this).constructor;
  81. result = Reflect.construct(Super, arguments, NewTarget)
  82. } else {
  83. result = Super.apply(this, arguments)
  84. }
  85. return _possibleConstructorReturn(this, result)
  86. }
  87. }
  88. function _possibleConstructorReturn(self, call) {
  89. if (call && ("object" === _typeof(call) || "function" === typeof call)) {
  90. return call
  91. } else {
  92. if (void 0 !== call) {
  93. throw new TypeError("Derived constructors may only return object or undefined")
  94. }
  95. }
  96. return _assertThisInitialized(self)
  97. }
  98. function _assertThisInitialized(self) {
  99. if (void 0 === self) {
  100. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  101. }
  102. return self
  103. }
  104. function _isNativeReflectConstruct() {
  105. if ("undefined" === typeof Reflect || !Reflect.construct) {
  106. return false
  107. }
  108. if (Reflect.construct.sham) {
  109. return false
  110. }
  111. if ("function" === typeof Proxy) {
  112. return true
  113. }
  114. try {
  115. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  116. return true
  117. } catch (e) {
  118. return false
  119. }
  120. }
  121. function _getPrototypeOf(o) {
  122. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
  123. return o.__proto__ || Object.getPrototypeOf(o)
  124. };
  125. return _getPrototypeOf(o)
  126. }
  127. var Theme = (0, _quill_importer.getQuill)().import("core/theme");
  128. var BaseTheme = function(_Theme) {
  129. _inherits(BaseTheme, _Theme);
  130. var _super = _createSuper(BaseTheme);
  131. function BaseTheme(quill, options) {
  132. var _this;
  133. _classCallCheck(this, BaseTheme);
  134. _this = _super.call(this, quill, options);
  135. _this.quill.root.classList.add("dx-htmleditor-content");
  136. return _this
  137. }
  138. return _createClass(BaseTheme)
  139. }(Theme);
  140. exports.default = BaseTheme;