@qxs-bns/components-wc 0.0.21 → 0.0.23

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.
Files changed (163) hide show
  1. package/es/base/define.mjs +1 -1
  2. package/es/base/define.mjs.map +1 -1
  3. package/es/editor/blocksuite-editor.mjs +3 -3
  4. package/es/editor/blocksuite-editor.mjs.map +1 -1
  5. package/es/editor/index.mjs +1 -1
  6. package/es/editor/index.mjs.map +1 -1
  7. package/es/entry-editor.mjs +2 -0
  8. package/es/entry-editor.mjs.map +1 -0
  9. package/es/entry-subject.mjs +2 -0
  10. package/es/entry-subject.mjs.map +1 -0
  11. package/es/index.mjs +1 -1
  12. package/es/subject/action.mjs +5 -5
  13. package/es/subject/action.mjs.map +1 -1
  14. package/es/subject/blank-fill.mjs +8 -8
  15. package/es/subject/blank-fill.mjs.map +1 -1
  16. package/es/subject/layout.mjs +4 -4
  17. package/es/subject/layout.mjs.map +1 -1
  18. package/es/subject/list.mjs +77 -77
  19. package/es/subject/list.mjs.map +1 -1
  20. package/es/subject/page-end.mjs +7 -7
  21. package/es/subject/page-end.mjs.map +1 -1
  22. package/es/subject/scale.mjs +7 -7
  23. package/es/subject/scale.mjs.map +1 -1
  24. package/es/subject/single.mjs +11 -11
  25. package/es/subject/single.mjs.map +1 -1
  26. package/es/subject/text-fill.mjs +32 -32
  27. package/es/subject/text-fill.mjs.map +1 -1
  28. package/lib/base/define.cjs +1 -1
  29. package/lib/base/define.cjs.map +1 -1
  30. package/lib/editor/blocksuite-editor.cjs +2 -2
  31. package/lib/editor/blocksuite-editor.cjs.map +1 -1
  32. package/lib/editor/index.cjs +1 -1
  33. package/lib/editor/index.cjs.map +1 -1
  34. package/lib/entry-editor.cjs +2 -0
  35. package/lib/entry-editor.cjs.map +1 -0
  36. package/lib/entry-subject.cjs +2 -0
  37. package/lib/entry-subject.cjs.map +1 -0
  38. package/lib/index.cjs +1 -1
  39. package/lib/subject/action.cjs +2 -2
  40. package/lib/subject/action.cjs.map +1 -1
  41. package/lib/subject/blank-fill.cjs +9 -9
  42. package/lib/subject/blank-fill.cjs.map +1 -1
  43. package/lib/subject/layout.cjs +4 -4
  44. package/lib/subject/layout.cjs.map +1 -1
  45. package/lib/subject/list.cjs +32 -32
  46. package/lib/subject/list.cjs.map +1 -1
  47. package/lib/subject/page-end.cjs +5 -5
  48. package/lib/subject/page-end.cjs.map +1 -1
  49. package/lib/subject/scale.cjs +10 -10
  50. package/lib/subject/scale.cjs.map +1 -1
  51. package/lib/subject/single.cjs +14 -14
  52. package/lib/subject/single.cjs.map +1 -1
  53. package/lib/subject/text-fill.cjs +40 -40
  54. package/lib/subject/text-fill.cjs.map +1 -1
  55. package/package.json +16 -1
  56. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs +0 -7
  57. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.mjs.map +0 -1
  58. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs +0 -7
  59. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.mjs.map +0 -1
  60. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs +0 -7
  61. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.mjs.map +0 -1
  62. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs +0 -7
  63. package/es/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.mjs.map +0 -1
  64. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
  65. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
  66. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs +0 -2
  67. package/es/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.mjs.map +0 -1
  68. package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
  69. package/es/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
  70. package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs +0 -2
  71. package/es/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.mjs.map +0 -1
  72. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs +0 -7
  73. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.mjs.map +0 -1
  74. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs +0 -7
  75. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.mjs.map +0 -1
  76. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs +0 -7
  77. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.mjs.map +0 -1
  78. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs +0 -7
  79. package/es/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.mjs.map +0 -1
  80. package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs +0 -2
  81. package/es/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.mjs.map +0 -1
  82. package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs +0 -2
  83. package/es/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.mjs.map +0 -1
  84. package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs +0 -2
  85. package/es/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
  86. package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
  87. package/es/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
  88. package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs +0 -2
  89. package/es/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
  90. package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs +0 -2
  91. package/es/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
  92. package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs +0 -2
  93. package/es/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
  94. package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs +0 -2
  95. package/es/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
  96. package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs +0 -2
  97. package/es/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.mjs.map +0 -1
  98. package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs +0 -2
  99. package/es/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.mjs.map +0 -1
  100. package/es/subject/rich-text.mjs +0 -27
  101. package/es/subject/rich-text.mjs.map +0 -1
  102. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs +0 -7
  103. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.cjs.map +0 -1
  104. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs +0 -7
  105. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs.map +0 -1
  106. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs +0 -7
  107. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs.map +0 -1
  108. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs +0 -7
  109. package/lib/node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.cjs.map +0 -1
  110. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
  111. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.19.0_@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
  112. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs +0 -2
  113. package/lib/node_modules/.pnpm/@tiptap_extension-placeholder@3.20.5_@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5_/node_modules/@tiptap/extension-placeholder/dist/index.cjs.map +0 -1
  114. package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
  115. package/lib/node_modules/.pnpm/@tiptap_extensions@3.19.0_@tiptap_core@3.19.0_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
  116. package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs +0 -2
  117. package/lib/node_modules/.pnpm/@tiptap_extensions@3.20.5_@tiptap_core@3.20.5_@tiptap_pm@3.20.5__@tiptap_pm@3.20.5/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
  118. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs +0 -7
  119. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.cjs.map +0 -1
  120. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs +0 -7
  121. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.cjs.map +0 -1
  122. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs +0 -8
  123. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.cjs.map +0 -1
  124. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs +0 -7
  125. package/lib/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.cjs.map +0 -1
  126. package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs +0 -2
  127. package/lib/node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.cjs.map +0 -1
  128. package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs +0 -2
  129. package/lib/node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.cjs.map +0 -1
  130. package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs +0 -2
  131. package/lib/node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.cjs.map +0 -1
  132. package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs +0 -2
  133. package/lib/node_modules/.pnpm/prosemirror-keymap@1.2.3/node_modules/prosemirror-keymap/dist/index.cjs.map +0 -1
  134. package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs +0 -2
  135. package/lib/node_modules/.pnpm/prosemirror-model@1.25.4/node_modules/prosemirror-model/dist/index.cjs.map +0 -1
  136. package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs +0 -2
  137. package/lib/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs.map +0 -1
  138. package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs +0 -2
  139. package/lib/node_modules/.pnpm/prosemirror-transform@1.11.0/node_modules/prosemirror-transform/dist/index.cjs.map +0 -1
  140. package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs +0 -2
  141. package/lib/node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.cjs.map +0 -1
  142. package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs +0 -2
  143. package/lib/node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.cjs.map +0 -1
  144. package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs +0 -2
  145. package/lib/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.cjs.map +0 -1
  146. package/lib/subject/rich-text.cjs +0 -27
  147. package/lib/subject/rich-text.cjs.map +0 -1
  148. package/types/base/define.d.ts +0 -1
  149. package/types/base/uid.d.ts +0 -1
  150. package/types/editor/blocksuite-editor.d.ts +0 -84
  151. package/types/editor/index.d.ts +0 -3
  152. package/types/index.d.ts +0 -4
  153. package/types/subject/action.d.ts +0 -23
  154. package/types/subject/blank-fill.d.ts +0 -49
  155. package/types/subject/index.d.ts +0 -20
  156. package/types/subject/layout.d.ts +0 -7
  157. package/types/subject/list.d.ts +0 -43
  158. package/types/subject/page-end.d.ts +0 -10
  159. package/types/subject/rich-text.d.ts +0 -30
  160. package/types/subject/scale.d.ts +0 -42
  161. package/types/subject/single.d.ts +0 -79
  162. package/types/subject/text-fill.d.ts +0 -54
  163. package/types/subject/type.d.ts +0 -7
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=200,e=function(){};e.prototype.append=function(n){return n.length?(n=e.from(n),!this.length&&n||n.length<t&&this.leafAppend(n)||this.length<t&&n.leafPrepend(this)||this.appendInner(n)):this},e.prototype.prepend=function(t){return t.length?e.from(t).append(this):this},e.prototype.appendInner=function(t){return new r(this,t)},e.prototype.slice=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=this.length),t>=n?e.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))},e.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},e.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},e.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},e.from=function(t){return t instanceof e?t:t&&t.length?new n(t):e.empty};var n=function(e){function n(t){e.call(this),this.values=t}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={length:{configurable:!0},depth:{configurable:!0}};return n.prototype.flatten=function(){return this.values},n.prototype.sliceInner=function(t,e){return 0==t&&e==this.length?this:new n(this.values.slice(t,e))},n.prototype.getInner=function(t){return this.values[t]},n.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},n.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},n.prototype.leafAppend=function(e){if(this.length+e.length<=t)return new n(this.values.concat(e.flatten()))},n.prototype.leafPrepend=function(e){if(this.length+e.length<=t)return new n(e.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(n.prototype,r),n}(e);e.empty=new n([]);var r=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;return!(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;return!(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(e);exports.default=e;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../../../node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js"],"sourcesContent":["var GOOD_LEAF_SIZE = 200;\n\n// :: class<T> A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\nvar RopeSequence = function RopeSequence () {};\n\nRopeSequence.prototype.append = function append (other) {\n if (!other.length) { return this }\n other = RopeSequence.from(other);\n\n return (!this.length && other) ||\n (other.length < GOOD_LEAF_SIZE && this.leafAppend(other)) ||\n (this.length < GOOD_LEAF_SIZE && other.leafPrepend(this)) ||\n this.appendInner(other)\n};\n\n// :: (union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Prepend an array or other rope to this one, returning a new rope.\nRopeSequence.prototype.prepend = function prepend (other) {\n if (!other.length) { return this }\n return RopeSequence.from(other).append(this)\n};\n\nRopeSequence.prototype.appendInner = function appendInner (other) {\n return new Append(this, other)\n};\n\n// :: (?number, ?number) → RopeSequence<T>\n// Create a rope repesenting a sub-sequence of this rope.\nRopeSequence.prototype.slice = function slice (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from >= to) { return RopeSequence.empty }\n return this.sliceInner(Math.max(0, from), Math.min(this.length, to))\n};\n\n// :: (number) → T\n// Retrieve the element at the given position from this rope.\nRopeSequence.prototype.get = function get (i) {\n if (i < 0 || i >= this.length) { return undefined }\n return this.getInner(i)\n};\n\n// :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\nRopeSequence.prototype.forEach = function forEach (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from <= to)\n { this.forEachInner(f, from, to, 0); }\n else\n { this.forEachInvertedInner(f, from, to, 0); }\n};\n\n// :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\nRopeSequence.prototype.map = function map (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n var result = [];\n this.forEach(function (elt, i) { return result.push(f(elt, i)); }, from, to);\n return result\n};\n\n// :: (?union<[T], RopeSequence<T>>) → RopeSequence<T>\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\nRopeSequence.from = function from (values) {\n if (values instanceof RopeSequence) { return values }\n return values && values.length ? new Leaf(values) : RopeSequence.empty\n};\n\nvar Leaf = /*@__PURE__*/(function (RopeSequence) {\n function Leaf(values) {\n RopeSequence.call(this);\n this.values = values;\n }\n\n if ( RopeSequence ) Leaf.__proto__ = RopeSequence;\n Leaf.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Leaf.prototype.constructor = Leaf;\n\n var prototypeAccessors = { length: { configurable: true },depth: { configurable: true } };\n\n Leaf.prototype.flatten = function flatten () {\n return this.values\n };\n\n Leaf.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n return new Leaf(this.values.slice(from, to))\n };\n\n Leaf.prototype.getInner = function getInner (i) {\n return this.values[i]\n };\n\n Leaf.prototype.forEachInner = function forEachInner (f, from, to, start) {\n for (var i = from; i < to; i++)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n for (var i = from - 1; i >= to; i--)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.leafAppend = function leafAppend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(this.values.concat(other.flatten())) }\n };\n\n Leaf.prototype.leafPrepend = function leafPrepend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(other.flatten().concat(this.values)) }\n };\n\n prototypeAccessors.length.get = function () { return this.values.length };\n\n prototypeAccessors.depth.get = function () { return 0 };\n\n Object.defineProperties( Leaf.prototype, prototypeAccessors );\n\n return Leaf;\n}(RopeSequence));\n\n// :: RopeSequence\n// The empty rope sequence.\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/(function (RopeSequence) {\n function Append(left, right) {\n RopeSequence.call(this);\n this.left = left;\n this.right = right;\n this.length = left.length + right.length;\n this.depth = Math.max(left.depth, right.depth) + 1;\n }\n\n if ( RopeSequence ) Append.__proto__ = RopeSequence;\n Append.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Append.prototype.constructor = Append;\n\n Append.prototype.flatten = function flatten () {\n return this.left.flatten().concat(this.right.flatten())\n };\n\n Append.prototype.getInner = function getInner (i) {\n return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length)\n };\n\n Append.prototype.forEachInner = function forEachInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from < leftLen &&\n this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false)\n { return false }\n if (to > leftLen &&\n this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false)\n { return false }\n };\n\n Append.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from > leftLen &&\n this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false)\n { return false }\n if (to < leftLen &&\n this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false)\n { return false }\n };\n\n Append.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n var leftLen = this.left.length;\n if (to <= leftLen) { return this.left.slice(from, to) }\n if (from >= leftLen) { return this.right.slice(from - leftLen, to - leftLen) }\n return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen))\n };\n\n Append.prototype.leafAppend = function leafAppend (other) {\n var inner = this.right.leafAppend(other);\n if (inner) { return new Append(this.left, inner) }\n };\n\n Append.prototype.leafPrepend = function leafPrepend (other) {\n var inner = this.left.leafPrepend(other);\n if (inner) { return new Append(inner, this.right) }\n };\n\n Append.prototype.appendInner = function appendInner (other) {\n if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1)\n { return new Append(this.left, new Append(this.right, other)) }\n return new Append(this, other)\n };\n\n return Append;\n}(RopeSequence));\n\nexport default RopeSequence;\n"],"names":["GOOD_LEAF_SIZE","RopeSequence","prototype","append","other","length","from","this","leafAppend","leafPrepend","appendInner","prepend","Append","slice","to","empty","sliceInner","Math","max","min","get","i","getInner","forEach","f","forEachInner","forEachInvertedInner","map","result","elt","push","values","Leaf","call","__proto__","Object","create","constructor","prototypeAccessors","configurable","depth","flatten","start","concat","defineProperties","left","right","leftLen","inner"],"mappings":"oEAAA,IAAIA,EAAiB,IAKjBC,EAAe,WAA0B,EAE7CA,EAAaC,UAAUC,OAAS,SAAiBC,GAC/C,OAAKA,EAAMC,QACXD,EAAQH,EAAaK,KAAKF,IAEjBG,KAAKF,QAAUD,GACrBA,EAAMC,OAASL,GAAkBO,KAAKC,WAAWJ,IACjDG,KAAKF,OAASL,GAAkBI,EAAMK,YAAYF,OACnDA,KAAKG,YAAYN,IANSG,IAO9B,EAIAN,EAAaC,UAAUS,QAAU,SAAkBP,GACjD,OAAKA,EAAMC,OACJJ,EAAaK,KAAKF,GAAOD,OAAOI,MADXA,IAE9B,EAEAN,EAAaC,UAAUQ,YAAc,SAAsBN,GACzD,OAAO,IAAIQ,EAAOL,KAAMH,EAC1B,EAIAH,EAAaC,UAAUW,MAAQ,SAAgBP,EAAMQ,GAInD,YAHgB,IAATR,IAAkBA,EAAO,QAClB,IAAPQ,IAAgBA,EAAKP,KAAKF,QAE7BC,GAAQQ,EAAab,EAAac,MAC/BR,KAAKS,WAAWC,KAAKC,IAAI,EAAGZ,GAAOW,KAAKE,IAAIZ,KAAKF,OAAQS,GAClE,EAIAb,EAAaC,UAAUkB,IAAM,SAAcC,GACzC,KAAIA,EAAI,GAAKA,GAAKd,KAAKF,QACvB,OAAOE,KAAKe,SAASD,EACvB,EAOApB,EAAaC,UAAUqB,QAAU,SAAkBC,EAAGlB,EAAMQ,QAC1C,IAATR,IAAkBA,EAAO,QAClB,IAAPQ,IAAgBA,EAAKP,KAAKF,QAE7BC,GAAQQ,EACRP,KAAKkB,aAAaD,EAAGlB,EAAMQ,EAAI,GAE/BP,KAAKmB,qBAAqBF,EAAGlB,EAAMQ,EAAI,EAC7C,EAKAb,EAAaC,UAAUyB,IAAM,SAAcH,EAAGlB,EAAMQ,QAClC,IAATR,IAAkBA,EAAO,QAClB,IAAPQ,IAAgBA,E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,KAAMG,EAC5C,EAEApC,EAAOV,UAAUO,YAAc,SAAsBL,GACnD,IAAI4C,EAAQzC,KAAKsC,KAAKpC,YAAYL,GAClC,GAAI4C,EAAS,OAAO,IAAIpC,EAAOoC,EAAOzC,KAAKuC,MAC7C,EAEAlC,EAAOV,UAAUQ,YAAc,SAAsBN,GACnD,OAAIG,KAAKsC,KAAKL,OAASvB,KAAKC,IAAIX,KAAKuC,MAAMN,MAAOpC,EAAMoC,OAAS,EACtD,IAAI5B,EAAOL,KAAKsC,KAAM,IAAIjC,EAAOL,KAAKuC,MAAO1C,IACjD,IAAIQ,EAAOL,KAAMH,EAC1B,EAEOQ,CACT,CAlE2B,CAkEzBX","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- "use strict";for(var e={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},t="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),n=0;n<10;n++)e[48+n]=e[96+n]=String(n);for(n=1;n<=24;n++)e[n+111]="F"+n;for(n=65;n<=90;n++)e[n]=String.fromCharCode(n+32),r[n]=String.fromCharCode(n);for(var a in e)r.hasOwnProperty(a)||(r[a]=e[a]);exports.base=e,exports.keyName=function(n){var a=!(t&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?r:e)[n.keyCode]||n.key||"Unidentified";return"Esc"==a&&(a="Escape"),"Del"==a&&(a="Delete"),"Left"==a&&(a="ArrowLeft"),"Up"==a&&(a="ArrowUp"),"Right"==a&&(a="ArrowRight"),"Down"==a&&(a="ArrowDown"),a},exports.shift=r;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../../node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.js"],"sourcesContent":["export var base = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 10: \"Enter\",\n 12: \"NumLock\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 44: \"PrintScreen\",\n 45: \"Insert\",\n 46: \"Delete\",\n 59: \";\",\n 61: \"=\",\n 91: \"Meta\",\n 92: \"Meta\",\n 106: \"*\",\n 107: \"+\",\n 108: \",\",\n 109: \"-\",\n 110: \".\",\n 111: \"/\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 160: \"Shift\",\n 161: \"Shift\",\n 162: \"Control\",\n 163: \"Control\",\n 164: \"Alt\",\n 165: \"Alt\",\n 173: \"-\",\n 186: \";\",\n 187: \"=\",\n 188: \",\",\n 189: \"-\",\n 190: \".\",\n 191: \"/\",\n 192: \"`\",\n 219: \"[\",\n 220: \"\\\\\",\n 221: \"]\",\n 222: \"'\"\n}\n\nexport var shift = {\n 48: \")\",\n 49: \"!\",\n 50: \"@\",\n 51: \"#\",\n 52: \"$\",\n 53: \"%\",\n 54: \"^\",\n 55: \"&\",\n 56: \"*\",\n 57: \"(\",\n 59: \":\",\n 61: \"+\",\n 173: \"_\",\n 186: \":\",\n 187: \"+\",\n 188: \"<\",\n 189: \"_\",\n 190: \">\",\n 191: \"?\",\n 192: \"~\",\n 219: \"{\",\n 220: \"|\",\n 221: \"}\",\n 222: \"\\\"\"\n}\n\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform)\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent)\n\n// Fill in the digit keys\nfor (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i)\n\n// The function keys\nfor (var i = 1; i <= 24; i++) base[i + 111] = \"F\" + i\n\n// And the alphabetic keys\nfor (var i = 65; i <= 90; i++) {\n base[i] = String.fromCharCode(i + 32)\n shift[i] = String.fromCharCode(i)\n}\n\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code]\n\nexport function keyName(event) {\n // On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.\n // On IE, shift effect is never included in `.key`.\n var ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||\n ie && event.shiftKey && event.key && event.key.length == 1 ||\n event.key == \"Unidentified\"\n var name = (!ignoreKey && event.key) ||\n (event.shiftKey ? shift : base)[event.keyCode] ||\n event.key || \"Unidentified\"\n // Edge sometimes produces wrong names (Issue #3)\n if (name == \"Esc\") name = \"Escape\"\n if (name == \"Del\") name = \"Delete\"\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n if (name == \"Left\") name = \"ArrowLeft\"\n if (name == \"Up\") name = \"ArrowUp\"\n if (name == \"Right\") name = \"ArrowRight\"\n if (name == \"Down\") name = \"ArrowDown\"\n return name\n}\n"],"names":["base","shift","mac","navigator","test","platform","ie","exec","userAgent","i","String","fromCharCode","code","hasOwnProperty","event","name","metaKey","shiftKey","ctrlKey","altKey","key","length","keyCode"],"mappings":"aAsFA,IAtFO,IAAIA,EAAO,CAChB,EAAG,YACH,EAAG,MACH,GAAI,QACJ,GAAI,UACJ,GAAI,QACJ,GAAI,QACJ,GAAI,UACJ,GAAI,MACJ,GAAI,WACJ,GAAI,SACJ,GAAI,IACJ,GAAI,SACJ,GAAI,WACJ,GAAI,MACJ,GAAI,OACJ,GAAI,YACJ,GAAI,UACJ,GAAI,aACJ,GAAI,YACJ,GAAI,cACJ,GAAI,SACJ,GAAI,SACJ,GAAI,IACJ,GAAI,IACJ,GAAI,OACJ,GAAI,OACJ,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,UACL,IAAK,aACL,IAAK,QACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,MACL,IAAK,MACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,IACL,IAAK,KAGIC,EAAQ,CACjB,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGHC,EAA0B,oBAAbC,WAA4B,MAAMC,KAAKD,UAAUE,UAC9DC,EAAyB,oBAAbH,WAA4B,gDAAgDI,KAAKJ,UAAUK,WAGlGC,EAAI,EAAGA,EAAI,GAAIA,IAAKT,EAAK,GAAKS,GAAKT,EAAK,GAAKS,GAAKC,OAAOD,GAGlE,IAASA,EAAI,EAAGA,GAAK,GAAIA,IAAKT,EAAKS,EAAI,KAAO,IAAMA,EAGpD,IAASA,EAAI,GAAIA,GAAK,GAAIA,IACxBT,EAAKS,GAAKC,OAAOC,aAAaF,EAAI,IAClCR,EAAMQ,GAAKC,OAAOC,aAAaF,GAIjC,IAAK,IAAIG,KAAQZ,EAAWC,EAAMY,eAAeD,KAAOX,EAAMW,GAAQZ,EAAKY,mCAEpE,SAAiBE,GAGtB,IAGIC,IAHYb,GAAOY,EAAME,SAAWF,EAAMG,WAAaH,EAAMI,UAAYJ,EAAMK,QAC/Eb,GAAMQ,EAAMG,UAAYH,EAAMM,KAA2B,GAApBN,EAAMM,IAAIC,QAClC,gBAAbP,EAAMM,MACgBN,EAAMM,MAC7BN,EAAMG,SAAWhB,EAAQD,GAAMc,EAAMQ,UACtCR,EAAMM,KAAO,eASf,MAPY,OAARL,IAAeA,EAAO,UACd,OAARA,IAAeA,EAAO,UAEd,QAARA,IAAgBA,EAAO,aACf,MAARA,IAAcA,EAAO,WACb,SAARA,IAAiBA,EAAO,cAChB,QAARA,IAAgBA,EAAO,aACpBA,CACT","x_google_ignoreList":[0]}
@@ -1,27 +0,0 @@
1
- "use strict";var t=require("lit"),e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.cjs"),i=require("../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.cjs"),o=require("../base/define.cjs"),s=require("./single.cjs");require("../editor/blocksuite-editor.cjs");var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,c=(t,e,i,o)=>{for(var s,c=o>1?void 0:o?n(e,i):e,a=t.length-1;a>=0;a--)(s=t[a])&&(c=(o?s(e,i,c):s(c))||c);return o&&c&&r(e,i,c),c};exports.SubjectRichText=class extends t.LitElement{constructor(){super(...arguments),this.orderIndex=0,this.customId="",this.isEdit=!1,this.isSave=!1,this.showAction=!0,this.isSet=!1,this.richTextContent="",this.examAnswerRelationType=0,this.uploadImage=async t=>new Promise((e,i)=>{const o=new FileReader;o.onload=t=>e(t.target?.result),o.onerror=i,o.readAsDataURL(t)}),this._content="",this._initialized=!1,this._editor=null,this.modelValue="",this.useModel=!1}createRenderRoot(){return this}willUpdate(t){t.has("richTextContent")&&!this._initialized&&(this._content=this.richTextContent,this._initialized=!0),t.has("modelValue")&&this.useModel&&(this._content=this.modelValue)}async toJSON(){return new Promise((t,e)=>{const i={customId:this.customId||void 0,answerType:"rich_text",orderIndex:this.orderIndex},o=this.isEdit?this.querySelector("qxs-blocksuite-editor")?.getContent?.()||this._content:this.richTextContent||this._content;if(!o||"<p></p>"===o)return void e(new s.SubjectError("富文本内容不能为空!","EMPTY_CONTENT","richTextContent",i));const r={answerType:"rich_text",richTextContent:o};this.customId&&(r.customId=this.customId),t(r)})}_emit(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e??null}))}disconnectedCallback(){super.disconnectedCallback(),this._editor=null}async _save(t){t?.stopImmediatePropagation();try{const t=await this.toJSON();this._content=t.richTextContent,this._emit("save",t)}catch(t){!function(t){const e=document.createElement("div");e.textContent=t,Object.assign(e.style,{position:"fixed",top:"20px",left:"50%",transform:"translateX(-50%)",padding:"10px 20px",borderRadius:"4px",fontSize:"13px",color:"#fff",background:"#f56c6c",zIndex:"99999",boxShadow:"0 4px 12px rgba(0,0,0,.15)",transition:"opacity .3s",opacity:"1"}),document.body.appendChild(e),setTimeout(()=>{e.style.opacity="0",setTimeout(()=>e.remove(),300)},2500)}(t.message)}}validate(){const t=[],e={customId:this.customId||void 0,answerType:"rich_text",orderIndex:this.orderIndex},i=this.isEdit?this.querySelector("qxs-blocksuite-editor")?.getContent?.()||this._content:this.richTextContent||this._content;return i&&"<p></p>"!==i||t.push(new s.SubjectError("富文本内容不能为空!","EMPTY_CONTENT","richTextContent",e)),t}_handleEditorInput(t){this._content=t.detail,this.useModel&&this.dispatchEvent(new CustomEvent("update:modelValue",{bubbles:!0,composed:!0,detail:this._content}))}render(){const e=this._content||this.richTextContent;return t.html`
2
- ${this.isEdit?t.html`<qxs-blocksuite-editor .content=${e} .uploadImage=${this.uploadImage} is-edit @input=${this._handleEditorInput}></qxs-blocksuite-editor>`:t.html`<qxs-blocksuite-editor .content=${e} .uploadImage=${this.uploadImage} readonly preview></qxs-blocksuite-editor>`}
3
- ${this.showAction?t.html`
4
- <qxs-subject-action
5
- ?is-edit=${this.isEdit}
6
- ?is-set=${this.isSet}
7
- ?show-other-option=${!1}
8
- ?hide-add-rich-text=${!0}
9
- exam-answer-relation-type=${this.examAnswerRelationType}
10
- @delete=${()=>this._emit("delete")}
11
- @save=${this._save}
12
- @edit=${()=>this._emit("edit")}
13
- @add=${t=>this._emit("add",t.detail)}
14
- ></qxs-subject-action>
15
- `:""}
16
- `}},exports.SubjectRichText.styles=t.css`
17
- :host {
18
- display: block;
19
- font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
20
- font-size: 12px;
21
- color: #5a5a5a;
22
- }
23
- qxs-blocksuite-editor {
24
- display: block;
25
- }
26
- `,c([e.property({type:Number,attribute:"order-index"})],exports.SubjectRichText.prototype,"orderIndex",2),c([e.property({type:String,attribute:"custom-id"})],exports.SubjectRichText.prototype,"customId",2),c([e.property({type:Boolean,attribute:"is-edit"})],exports.SubjectRichText.prototype,"isEdit",2),c([e.property({type:Boolean,attribute:"is-save"})],exports.SubjectRichText.prototype,"isSave",2),c([e.property({type:Boolean,attribute:"show-action"})],exports.SubjectRichText.prototype,"showAction",2),c([e.property({type:Boolean,attribute:"is-set"})],exports.SubjectRichText.prototype,"isSet",2),c([e.property({type:String,attribute:"rich-text-content"})],exports.SubjectRichText.prototype,"richTextContent",2),c([e.property({type:Number,attribute:"exam-answer-relation-type"})],exports.SubjectRichText.prototype,"examAnswerRelationType",2),c([e.property({type:Object,attribute:"upload-image"})],exports.SubjectRichText.prototype,"uploadImage",2),c([i.state()],exports.SubjectRichText.prototype,"_content",2),c([e.property({type:String,attribute:"model-value"})],exports.SubjectRichText.prototype,"modelValue",2),c([e.property({type:Boolean,attribute:"use-model"})],exports.SubjectRichText.prototype,"useModel",2),exports.SubjectRichText=c([o.safeCustomElement("qxs-subject-rich-text")],exports.SubjectRichText);
27
- //# sourceMappingURL=rich-text.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rich-text.cjs","sources":["../../../../packages/components-wc/src/subject/rich-text.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { safeCustomElement } from '../base/define'\nimport { SubjectError } from './single'\nimport '../editor/blocksuite-editor'\n\nfunction showToast(msg: string) {\n const el = document.createElement('div')\n el.textContent = msg\n Object.assign(el.style, {\n position: 'fixed', top: '20px', left: '50%', transform: 'translateX(-50%)',\n padding: '10px 20px', borderRadius: '4px', fontSize: '13px', color: '#fff',\n background: '#f56c6c', zIndex: '99999', boxShadow: '0 4px 12px rgba(0,0,0,.15)',\n transition: 'opacity .3s', opacity: '1',\n })\n document.body.appendChild(el)\n setTimeout(() => { el.style.opacity = '0'; setTimeout(() => el.remove(), 300) }, 2500)\n}\n\n@safeCustomElement('qxs-subject-rich-text')\nexport class SubjectRichText extends LitElement {\n createRenderRoot() { return this }\n\n static styles = css`\n :host {\n display: block;\n font-family: system-ui, -apple-system, \"PingFang SC\", \"Microsoft YaHei\", sans-serif;\n font-size: 12px;\n color: #5a5a5a;\n }\n qxs-blocksuite-editor {\n display: block;\n }\n `\n\n @property({ type: Number, attribute: 'order-index' }) orderIndex = 0\n @property({ type: String, attribute: 'custom-id' }) customId = ''\n @property({ type: Boolean, attribute: 'is-edit' }) isEdit = false\n @property({ type: Boolean, attribute: 'is-save' }) isSave = false\n @property({ type: Boolean, attribute: 'show-action' }) showAction = true\n @property({ type: Boolean, attribute: 'is-set' }) isSet = false\n @property({ type: String, attribute: 'rich-text-content' }) richTextContent = ''\n @property({ type: Number, attribute: 'exam-answer-relation-type' }) examAnswerRelationType = 0\n @property({ type: Object, attribute: 'upload-image' }) uploadImage: (file: File) => Promise<string> = async (file: File) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = (e) => resolve(e.target?.result as string)\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n }\n\n @state() private _content = ''\n private _initialized = false\n\n private _editor: HTMLElement | null = null\n\n // 双向绑定支持\n @property({ type: String, attribute: 'model-value' }) modelValue = ''\n @property({ type: Boolean, attribute: 'use-model' }) useModel = false\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('richTextContent') && !this._initialized) {\n this._content = this.richTextContent\n this._initialized = true\n }\n // 当外部 modelValue 变化时同步内部状态\n if (changed.has('modelValue') && this.useModel) {\n this._content = this.modelValue\n }\n }\n\n async toJSON(): Promise<any> {\n return new Promise((resolve, reject) => {\n const row = { customId: this.customId || undefined, answerType: 'rich_text', orderIndex: this.orderIndex }\n\n const content = this.isEdit\n ? (this.querySelector('qxs-blocksuite-editor') as any)?.getContent?.() || this._content\n : this.richTextContent || this._content\n\n if (!content || content === '<p></p>') {\n reject(new SubjectError('富文本内容不能为空!', 'EMPTY_CONTENT', 'richTextContent', row))\n return\n }\n const result: any = { answerType: 'rich_text', richTextContent: content }\n if (this.customId) { result.customId = this.customId }\n resolve(result)\n })\n }\n\n private _emit(name: string, detail?: unknown) {\n this.dispatchEvent(new CustomEvent(name, { bubbles: true, composed: true, detail: detail ?? null }))\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this._editor = null\n }\n\n private async _save(e?: Event) {\n e?.stopImmediatePropagation()\n try {\n const data = await this.toJSON()\n this._content = data.richTextContent\n this._emit('save', data)\n }\n catch (err: any) {\n showToast(err.message)\n }\n }\n\n validate(): SubjectError[] {\n const errors: SubjectError[] = []\n const row = { customId: this.customId || undefined, answerType: 'rich_text', orderIndex: this.orderIndex }\n\n const content = this.isEdit\n ? (this.querySelector('qxs-blocksuite-editor') as any)?.getContent?.() || this._content\n : this.richTextContent || this._content\n\n if (!content || content === '<p></p>') {\n errors.push(new SubjectError('富文本内容不能为空!', 'EMPTY_CONTENT', 'richTextContent', row))\n }\n\n return errors\n }\n\n private _handleEditorInput(e: CustomEvent) {\n this._content = e.detail\n // 双向绑定:通知外部更新\n if (this.useModel) {\n this.dispatchEvent(new CustomEvent('update:modelValue', {\n bubbles: true,\n composed: true,\n detail: this._content,\n }))\n }\n }\n\n render() {\n const content = this._content || this.richTextContent\n return html`\n ${this.isEdit\n ? html`<qxs-blocksuite-editor .content=${content} .uploadImage=${this.uploadImage} is-edit @input=${this._handleEditorInput}></qxs-blocksuite-editor>`\n : html`<qxs-blocksuite-editor .content=${content} .uploadImage=${this.uploadImage} readonly preview></qxs-blocksuite-editor>`\n }\n ${this.showAction\n ? html`\n <qxs-subject-action\n ?is-edit=${this.isEdit}\n ?is-set=${this.isSet}\n ?show-other-option=${false}\n ?hide-add-rich-text=${true}\n exam-answer-relation-type=${this.examAnswerRelationType}\n @delete=${() => this._emit('delete')}\n @save=${this._save}\n @edit=${() => this._emit('edit')}\n @add=${(e: CustomEvent) => this._emit('add', e.detail)}\n ></qxs-subject-action>\n `\n : ''}\n `\n }\n}\n\nexport function register() {}\n"],"names":["SubjectRichText","LitElement","constructor","super","arguments","this","orderIndex","customId","isEdit","isSave","showAction","isSet","richTextContent","examAnswerRelationType","uploadImage","async","Promise","resolve","reject","reader","FileReader","onload","e","target","result","onerror","readAsDataURL","file","_content","_initialized","_editor","modelValue","useModel","createRenderRoot","willUpdate","changed","has","toJSON","row","answerType","content","querySelector","getContent","SubjectError","_emit","name","detail","dispatchEvent","CustomEvent","bubbles","composed","disconnectedCallback","_save","stopImmediatePropagation","data","err","msg","el","document","createElement","textContent","Object","assign","style","position","top","left","transform","padding","borderRadius","fontSize","color","background","zIndex","boxShadow","transition","opacity","body","appendChild","setTimeout","remove","showToast","message","validate","errors","push","_handleEditorInput","render","html","styles","css","__decor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A,GACUL,EAAA,CAA3DC,EAAAA,SAAS,CAAEC,KAAMI,OAAQF,UAAW,uBArB1B/F,QAAAA,gBAqBiDgG,UAAA,kBAAA,GACQL,EAAA,CAAnEC,EAAAA,SAAS,CAAEC,KAAMC,OAAQC,UAAW,+BAtB1B/F,QAAAA,gBAsByDgG,UAAA,yBAAA,GACbL,EAAA,CAAtDC,EAAAA,SAAS,CAAEC,KAAMhC,OAAQkC,UAAW,kBAvB1B/F,QAAAA,gBAuB4CgG,UAAA,cAAA,GAStCL,EAAA,CAAhBQ,EAAAA,SAhCUnG,QAAAA,gBAgCMgG,UAAA,WAAA,GAMqCL,EAAA,CAArDC,EAAAA,SAAS,CAAEC,KAAMI,OAAQF,UAAW,iBAtC1B/F,QAAAA,gBAsC2CgG,UAAA,aAAA,GACDL,EAAA,CAApDC,EAAAA,SAAS,CAAEC,KAAMK,QAASH,UAAW,eAvC3B/F,QAAAA,gBAuC0CgG,UAAA,WAAA,GAvC1ChG,QAAAA,gBAAN2F,EAAA,CADNS,EAAAA,kBAAkB,0BACNpG,QAAAA"}
@@ -1 +0,0 @@
1
- export declare function safeCustomElement(tagName: string): (target: any) => any;
@@ -1 +0,0 @@
1
- export declare function uid(): string;
@@ -1,84 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class QxsBlocksuiteEditor extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- content: string;
5
- readonly: boolean;
6
- preview: boolean;
7
- isEdit: boolean;
8
- uploadImage: (file: File) => Promise<string>;
9
- modelValue: string;
10
- useModel: boolean;
11
- private _updatingFromModel;
12
- private _editor;
13
- private _pendingContent;
14
- private _pendingModelValue;
15
- private _tableRows;
16
- private _tableCols;
17
- private _hoverRow;
18
- private _hoverCol;
19
- private _tableDropdownOpen;
20
- private _isLoading;
21
- private _tableCellToolbar;
22
- private _tableEdgeHover;
23
- private _imageToolbar;
24
- private _imageMoreMenuVisible;
25
- private _hasSlashCommand;
26
- connectedCallback(): void;
27
- private _initEditor;
28
- private _tableEdgeDetectionSetup;
29
- private _setupTableEdgeDetection;
30
- private _handleTableEdgeMouseMove;
31
- private _checkSlashCommand;
32
- private _editorInitialized;
33
- firstUpdated(): void;
34
- updated(changed: Map<string, unknown>): void;
35
- willUpdate(changed: Map<string, unknown>): void;
36
- private _focusEditor;
37
- disconnectedCallback(): void;
38
- getContent(): string;
39
- private _applyFormat;
40
- private _toggleBold;
41
- private _toggleItalic;
42
- private _toggleUnderline;
43
- private _toggleStrike;
44
- private _toggleCode;
45
- private _setHeading;
46
- private _setParagraph;
47
- private _toggleBulletList;
48
- private _toggleOrderedList;
49
- private _toggleBlockquote;
50
- private _setTextAlign;
51
- private _setLink;
52
- private _unsetLink;
53
- private _insertTable;
54
- private _handleImageUpload;
55
- private _triggerImageUpload;
56
- private _insertTableByClick;
57
- private _insertHorizontalRule;
58
- private _showTableCellToolbar;
59
- private _getTableCellRow;
60
- private _getTableCellCol;
61
- private _hideTableCellToolbar;
62
- private _addTableRowAbove;
63
- private _addTableRowBelow;
64
- private _addTableColumnLeft;
65
- private _addTableColumnRight;
66
- private _deleteTableRow;
67
- private _deleteTableColumn;
68
- private _deleteTable;
69
- private _showImageToolbar;
70
- private _hideImageToolbar;
71
- private _toggleImageMoreMenu;
72
- private _deleteImage;
73
- private _insertImageAfter;
74
- private _setImageAlignLeft;
75
- private _setImageAlignCenter;
76
- private _setImageAlignRight;
77
- private _updateImageToolbarPosition;
78
- private _getTextLabel;
79
- private _getAlignLabel;
80
- private _updateBubbleMenuPosition;
81
- render(): import("lit").TemplateResult<1>;
82
- private _renderTableGrid;
83
- }
84
- export declare function register(): void;
@@ -1,3 +0,0 @@
1
- import { QxsBlocksuiteEditor } from './blocksuite-editor';
2
- export { QxsBlocksuiteEditor };
3
- export declare function register(): void;
package/types/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import './subject';
2
- import './editor';
3
- export * from './editor';
4
- export * from './subject';
@@ -1,23 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class QxsSubjectAction extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- isEdit: boolean;
5
- isSet: boolean;
6
- isKey: boolean;
7
- answerCheckType: number;
8
- showOtherOption: boolean;
9
- showRichText: boolean;
10
- hideAddRichText: boolean;
11
- pageEnd: boolean;
12
- examAnswerRelationType: number;
13
- private _modalOpen;
14
- private _currentCheckType;
15
- updated(changed: Map<string, unknown>): void;
16
- private _emit;
17
- private get _answerText();
18
- private _renderEditMode;
19
- private _renderViewMode;
20
- private _renderModal;
21
- render(): import("lit").TemplateResult<1>;
22
- }
23
- export declare function register(): void;
@@ -1,49 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SubjectError } from './single';
3
- export declare class QxsBlankFill extends LitElement {
4
- static styles: import("lit").CSSResult;
5
- orderIndex: number;
6
- title: string;
7
- customId: string;
8
- isEdit: boolean;
9
- isSave: boolean;
10
- isSet: boolean;
11
- isKey: boolean;
12
- showAction: boolean;
13
- showAnalysis: boolean;
14
- richTextContent: string;
15
- analysis: string;
16
- examAnswerRelationType: number;
17
- examExpand: string;
18
- examAnswerSetting: {
19
- isInOrder: boolean;
20
- isIgnoreCase: boolean;
21
- };
22
- uploadImage: (file: File) => Promise<string>;
23
- answerList: any[];
24
- modelValue: string;
25
- useModel: boolean;
26
- private _title;
27
- private _analysis;
28
- private _answers;
29
- private _isInOrder;
30
- private _isIgnoreCase;
31
- private _showRichText;
32
- private _richText;
33
- private readonly TITLE_MAX;
34
- willUpdate(changed: Map<string, unknown>): void;
35
- private _syncProps;
36
- private _emit;
37
- private _addBlank;
38
- private _onTitleInput;
39
- private _emitModelUpdate;
40
- private _handleAddTag;
41
- private _closeTag;
42
- toJSON(): Promise<any>;
43
- private _save;
44
- validate(): SubjectError[];
45
- private _renderPreview;
46
- private _renderEdit;
47
- render(): import("lit").TemplateResult<1>;
48
- }
49
- export declare function register(): void;
@@ -1,20 +0,0 @@
1
- import './action';
2
- import './blank-fill';
3
- import './layout';
4
- import './list';
5
- import './single';
6
- import './text-fill';
7
- import './scale';
8
- import './page-end';
9
- import './rich-text';
10
- import './type';
11
- export { QxsSubjectAction } from './action';
12
- export { QxsBlankFill } from './blank-fill';
13
- export { QxsSubjectLayout } from './layout';
14
- export { QxsSubjectList } from './list';
15
- export { QxsPageEnd } from './page-end';
16
- export { SubjectRichText } from './rich-text';
17
- export { QxsScale } from './scale';
18
- export { QxsSubjectSingle, SubjectError } from './single';
19
- export { QxsTextFill } from './text-fill';
20
- export { QxsSubjectType } from './type';
@@ -1,7 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class QxsSubjectLayout extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- showEdit: boolean;
5
- render(): import("lit").TemplateResult<1>;
6
- }
7
- export declare function register(): void;
@@ -1,43 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SubjectError } from './single';
3
- export declare class QxsSubjectList extends LitElement {
4
- static styles: import("lit").CSSResult;
5
- isPreview: boolean;
6
- uploadImage: (file: File) => Promise<string>;
7
- get subjectList(): any;
8
- set subjectList(v: any);
9
- attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
10
- private _list;
11
- private _sortMode;
12
- private _sortable;
13
- private get _isPreviewValue();
14
- private _initialDataProcessed;
15
- connectedCallback(): void;
16
- private _processAttributeList;
17
- firstUpdated(): void;
18
- updated(changed: Map<string, unknown>): void;
19
- disconnectedCallback(): void;
20
- private _initSortable;
21
- private _emit;
22
- toJSON(): Promise<any[]>;
23
- validate(): Promise<{
24
- valid: boolean;
25
- errors: SubjectError[];
26
- }>;
27
- get currentList(): any[];
28
- addSubject(type: string, index?: number, examAnswerRelationType?: number | null): void;
29
- addExam(items: any[]): void;
30
- uploadExcel(list: any[]): void;
31
- setAnswerRelation(answerRelations: any, customId: string, customAnswerId: string): void;
32
- private _orderIndex;
33
- private _pageIndex;
34
- private _totalPages;
35
- private _move;
36
- private _save;
37
- private _deleteByCustomId;
38
- private _delete;
39
- private _setEdit;
40
- private _renderItem;
41
- render(): import("lit").TemplateResult<1>;
42
- }
43
- export declare function register(): void;
@@ -1,10 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class QxsPageEnd extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- currentPageIndex: number;
5
- totalPage: number;
6
- showAction: boolean;
7
- private _emit;
8
- render(): import("lit").TemplateResult<1>;
9
- }
10
- export declare function register(): void;
@@ -1,30 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SubjectError } from './single';
3
- import '../editor/blocksuite-editor';
4
- export declare class SubjectRichText extends LitElement {
5
- createRenderRoot(): this;
6
- static styles: import("lit").CSSResult;
7
- orderIndex: number;
8
- customId: string;
9
- isEdit: boolean;
10
- isSave: boolean;
11
- showAction: boolean;
12
- isSet: boolean;
13
- richTextContent: string;
14
- examAnswerRelationType: number;
15
- uploadImage: (file: File) => Promise<string>;
16
- private _content;
17
- private _initialized;
18
- private _editor;
19
- modelValue: string;
20
- useModel: boolean;
21
- willUpdate(changed: Map<string, unknown>): void;
22
- toJSON(): Promise<any>;
23
- private _emit;
24
- disconnectedCallback(): void;
25
- private _save;
26
- validate(): SubjectError[];
27
- private _handleEditorInput;
28
- render(): import("lit").TemplateResult<1>;
29
- }
30
- export declare function register(): void;
@@ -1,42 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SubjectError } from './single';
3
- export declare class QxsScale extends LitElement {
4
- static styles: import("lit").CSSResult;
5
- orderIndex: number;
6
- title: string;
7
- customId: string;
8
- isEdit: boolean;
9
- isSave: boolean;
10
- isSet: boolean;
11
- showAction: boolean;
12
- showAnalysis: boolean;
13
- analysis: string;
14
- richTextContent: string;
15
- examAnswerRelationType: number;
16
- uploadImage: (file: File) => Promise<string>;
17
- get answerList(): any;
18
- set answerList(v: any);
19
- get scaleQuestions(): any;
20
- set scaleQuestions(v: any);
21
- private _answers;
22
- private _scaleQuestions;
23
- private _rowTitle;
24
- private _title;
25
- private _analysis;
26
- private _showRichText;
27
- private _richText;
28
- modelValue: string;
29
- useModel: boolean;
30
- private readonly TITLE_MAX;
31
- willUpdate(changed: Map<string, unknown>): void;
32
- private _syncProps;
33
- toJSON(): Promise<any>;
34
- private _emit;
35
- private _onTitleInput;
36
- private _save;
37
- validate(): SubjectError[];
38
- private _renderPreview;
39
- private _renderEdit;
40
- render(): import("lit").TemplateResult<1>;
41
- }
42
- export declare function register(): void;
@@ -1,79 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export interface SubjectErrorOptions {
3
- message: string;
4
- code?: string;
5
- field?: string;
6
- row?: any;
7
- }
8
- export declare class SubjectError extends Error {
9
- code: string;
10
- field?: string | undefined;
11
- row?: any | undefined;
12
- constructor(message: string, code?: string, field?: string | undefined, row?: any | undefined);
13
- static from(options: SubjectErrorOptions): SubjectError;
14
- }
15
- export declare class QxsSubjectSingle extends LitElement {
16
- static styles: import("lit").CSSResult;
17
- orderIndex: number;
18
- isEdit: boolean;
19
- isSave: boolean;
20
- isSet: boolean;
21
- isKey: boolean;
22
- showAction: boolean;
23
- showAnalysis: boolean;
24
- type: 'single' | 'multiple' | 'sort';
25
- answerCheckType: number;
26
- examAnswerRelationType: number;
27
- richTextContent: string;
28
- analysis: string;
29
- leastAnswerCount: number;
30
- examExpand: string;
31
- customId: string;
32
- examId: number;
33
- uploadImage: (file: File) => Promise<string>;
34
- get answerList(): any;
35
- set answerList(v: any);
36
- modelValue: string;
37
- useModel: boolean;
38
- private _answers;
39
- private _title;
40
- private _analysis;
41
- private _richText;
42
- private _showRichText;
43
- private _leastAnswerCount;
44
- private _answerCheckType;
45
- private _orderList;
46
- private _resultDialogOpen;
47
- private _resultDialogIndex;
48
- private _resultDialogValue;
49
- private _sortDropdownOpen;
50
- private readonly TITLE_MAX;
51
- private readonly ANSWER_MAX;
52
- connectedCallback(): void;
53
- disconnectedCallback(): void;
54
- private _handleDocumentClick;
55
- willUpdate(changed: Map<string, unknown>): void;
56
- private _syncProps;
57
- private _syncExamExpand;
58
- private _emit;
59
- private _label;
60
- private get _titlePlaceholder();
61
- private _setCorrect;
62
- private _onTitleInput;
63
- private _onAnswerInput;
64
- private _addAnswer;
65
- private _deleteAnswer;
66
- private _toggleSortItem;
67
- private _removeSortItem;
68
- private _getSortOrder;
69
- toJSON(): Promise<any>;
70
- validate(): SubjectError[];
71
- private _openResultDialog;
72
- private _saveResultDialog;
73
- private _renderResultDialog;
74
- private _save;
75
- private _renderPreview;
76
- private _renderEdit;
77
- render(): import("lit").TemplateResult<1>;
78
- }
79
- export declare function register(): void;
@@ -1,54 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { SubjectError } from './single';
3
- export declare class QxsTextFill extends LitElement {
4
- private readonly _iconPlus;
5
- private readonly _iconRemove;
6
- static styles: import("lit").CSSResult;
7
- orderIndex: number;
8
- title: string;
9
- customId: string;
10
- isEdit: boolean;
11
- isSave: boolean;
12
- isSet: boolean;
13
- isKey: boolean;
14
- showAction: boolean;
15
- showAnalysis: boolean;
16
- richTextContent: string;
17
- analysis: string;
18
- examAnswerRelationType: number;
19
- examExpand: string;
20
- examAnswerSetting: {
21
- isInOrder: boolean;
22
- isIgnoreCase: boolean;
23
- keywordCount: number;
24
- };
25
- uploadImage: (file: File) => Promise<string>;
26
- answerList: any[];
27
- modelValue: string;
28
- useModel: boolean;
29
- private _answers;
30
- private _title;
31
- private _analysis;
32
- private _isInOrder;
33
- private _isIgnoreCase;
34
- private _keywordCount;
35
- private _correct;
36
- private _showRichText;
37
- private _richText;
38
- private readonly TITLE_MAX;
39
- willUpdate(changed: Map<string, unknown>): void;
40
- private _syncProps;
41
- private _emit;
42
- private _onTitleInput;
43
- private _addTag;
44
- private _closeTag;
45
- toJSON(): Promise<any>;
46
- private _addAnswer;
47
- private _deleteAnswer;
48
- private _save;
49
- validate(): SubjectError[];
50
- private _renderPreview;
51
- private _renderEdit;
52
- render(): import("lit").TemplateResult<1>;
53
- }
54
- export declare function register(): void;
@@ -1,7 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class QxsSubjectType extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- private emit;
5
- render(): import("lit").TemplateResult<1>;
6
- }
7
- export declare function register(): void;