@fewangsit/wangsvue 1.5.219-alpha.0 → 1.5.219-alpha.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/animation/index.es.js +54 -37
- package/assets/lottiejs/loading-page.es.js +14 -9
- package/assets/lottiejs/loading-plane.es.js +2 -2
- package/assets/lottiejs/loading-table.es.js +14 -9
- package/assets/lottiejs/no-data.es.js +14 -9
- package/backgroundimagecropper/index.es.js +61 -37
- package/badge/index.es.js +77 -67
- package/badgegroup/index.es.js +62 -50
- package/basecalendar/index.es.js +1258 -735
- package/basetree/index.es.js +213 -113
- package/breadcrumb/index.es.js +46 -38
- package/button/index.es.js +60 -54
- package/buttonbulkaction/index.es.js +168 -117
- package/buttoncopy/index.es.js +25 -22
- package/buttondownload/index.es.js +125 -76
- package/buttonfilter/index.es.js +21 -15
- package/buttonradio/index.es.js +91 -67
- package/buttonsearch/index.es.js +62 -46
- package/buttonselecttree/index.es.js +233 -172
- package/buttontoggle/index.es.js +8 -6
- package/calendar/index.es.js +113 -58
- package/card/index.es.js +44 -42
- package/checkbox/index.es.js +105 -74
- package/codesnippet/index.es.js +91 -71
- package/codesnippetadapter/index.es.js +25 -21
- package/columnlist/index.es.js +249 -171
- package/components.d.ts +0 -21
- package/config/defaultProps.es.js +9 -9
- package/config/index.es.js +11 -10
- package/config/locale.es.js +2 -2
- package/customcolumn/index.es.js +95 -78
- package/datatable/index.es.js +1071 -732
- package/dialog/index.es.js +54 -54
- package/dialogconfirm/index.es.js +90 -75
- package/dialogform/index.es.js +170 -133
- package/dialogselecttree/index.es.js +242 -194
- package/directives/focus.es.js +13 -8
- package/dropdown/index.es.js +250 -196
- package/editor/index.es.js +694 -498
- package/editorbutton/index.es.js +21 -19
- package/event-bus/index.es.js +3 -3
- package/event-bus/mitt.es.js +37 -20
- package/fieldwrapper/index.es.js +30 -25
- package/fileupload/index.es.js +230 -140
- package/filtercontainer/index.es.js +299 -222
- package/form/index.es.js +176 -126
- package/gallerypreview/index.es.js +138 -101
- package/icon/index.es.js +38 -36
- package/image/index.es.js +161 -108
- package/imagecompressor/index.es.js +616 -449
- package/imageinputinfo/index.es.js +26 -22
- package/inlinemessage/index.es.js +77 -65
- package/inputbadge/index.es.js +230 -156
- package/inputcurrency/index.es.js +146 -109
- package/inputemail/index.es.js +18 -16
- package/inputgroup/index.es.js +19 -16
- package/inputnumber/index.es.js +252 -182
- package/inputpassword/index.es.js +120 -94
- package/inputphonenumber/index.es.js +1017 -550
- package/inputrangenumber/index.es.js +129 -98
- package/inputtext/index.es.js +264 -189
- package/inputurl/index.es.js +31 -29
- package/invisiblefield/index.es.js +24 -16
- package/litedropdown/index.es.js +87 -81
- package/loading/index.es.js +21 -19
- package/loading-page-BXZ4fLOS.js +8 -0
- package/loading-page-BuLpsb_1.js +8 -0
- package/loading-page-CNqVBg__.js +4 -0
- package/loading-page-DbhhZih2.js +4 -0
- package/loading-page-DjfWXoOy.js +8 -0
- package/loading-page-S-KRY5zm.js +4 -0
- package/loading-plane-C1mi7Whv.js +4 -0
- package/loading-plane-CWq1hz_l.js +8 -0
- package/loading-table-B7LAXzAp.js +4 -0
- package/loading-table-BLmgKUsR.js +4 -0
- package/loading-table-CG7-cuhv.js +8 -0
- package/loading-table-CUPS49ta.js +4 -0
- package/loading-table-CuWWrTbv.js +8 -0
- package/loading-table-DbBzVwaZ.js +8 -0
- package/mentionlist/index.es.js +77 -44
- package/mentionsection/index.es.js +53 -43
- package/menu/index.es.js +65 -51
- package/menuitem/index.es.js +39 -37
- package/multirow/index.es.js +29 -28
- package/multiselect/index.es.js +184 -152
- package/no-data-B781skt3.js +4 -0
- package/no-data-CAksOnDl.js +4 -0
- package/no-data-DCsjBXQR.js +4 -0
- package/no-data-Dz0QOe7Q.js +8 -0
- package/no-data-_Huxiv9q.js +8 -0
- package/no-data-ybRQontJ.js +8 -0
- package/overlaypanel/index.es.js +49 -36
- package/package.json +1 -1
- package/paginator/index.es.js +36 -33
- package/plugins/WangsVue.es.js +63 -45
- package/plugins/formValidation.es.js +15 -11
- package/progressbar/index.es.js +39 -32
- package/quickfilter/index.es.js +94 -81
- package/stats.html +1 -1
- package/style.css +2 -2
- package/tabmenu/index.es.js +18 -16
- package/textarea/index.es.js +94 -72
- package/timeline/index.es.js +124 -102
- package/timelinecontentbytype/index.es.js +114 -92
- package/toast/index.es.js +67 -54
- package/toggleswitch/index.es.js +83 -66
- package/tree/index.es.js +306 -198
- package/treenode/index.es.js +464 -339
- package/treesearchinput/index.es.js +32 -26
- package/usergroup/index.es.js +83 -67
- package/username/index.es.js +99 -85
- package/utils/addAttachment.util.es.js +47 -21
- package/utils/baseToast.util.es.js +41 -33
- package/utils/convertJsonImage.util.es.js +24 -24
- package/utils/date.util.es.js +131 -106
- package/utils/exportToExcel.util.es.js +81 -47
- package/utils/filterOptions.util.es.js +8 -2
- package/utils/genPlaceholder.util.es.js +30 -16
- package/utils/getProjectPermission.util.es.js +15 -12
- package/utils/getSalesRole.util.es.js +4 -4
- package/utils/getUser.util.es.js +2 -2
- package/utils/getUserType.util.es.js +13 -8
- package/utils/isIntersect.es.js +4 -2
- package/utils/mergePropsWithDefaults.util.es.js +7 -6
- package/utils/object.util.es.js +88 -54
- package/utils/queryParamsStringfy.util.es.js +19 -11
- package/utils/role.util.es.js +5 -4
- package/utils/statusSeverity.util.es.js +20 -5
- package/utils/textFormatter.util.es.js +28 -50
- package/utils/toast.util.es.js +8 -5
- package/utils/xlsx.util.es.js +12 -6
- package/validatormessage/index.es.js +9 -9
- package/vendor/@popperjs/core/lib/createPopper.es.js +110 -83
- package/vendor/@popperjs/core/lib/dom-utils/contains.es.js +14 -13
- package/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.es.js +33 -18
- package/vendor/@popperjs/core/lib/dom-utils/getClippingRect.es.js +55 -31
- package/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.es.js +43 -22
- package/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.es.js +5 -5
- package/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.es.js +23 -13
- package/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.es.js +17 -9
- package/vendor/@popperjs/core/lib/dom-utils/getNodeName.es.js +3 -3
- package/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.es.js +11 -7
- package/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.es.js +42 -26
- package/vendor/@popperjs/core/lib/dom-utils/getParentNode.es.js +13 -10
- package/vendor/@popperjs/core/lib/dom-utils/getScrollParent.es.js +13 -7
- package/vendor/@popperjs/core/lib/dom-utils/getViewportRect.es.js +25 -15
- package/vendor/@popperjs/core/lib/dom-utils/getWindow.es.js +8 -7
- package/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.es.js +8 -6
- package/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.es.js +6 -6
- package/vendor/@popperjs/core/lib/dom-utils/instanceOf.es.js +16 -15
- package/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/isScrollParent.es.js +5 -5
- package/vendor/@popperjs/core/lib/dom-utils/isTableElement.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/listScrollParents.es.js +17 -11
- package/vendor/@popperjs/core/lib/enums.es.js +43 -20
- package/vendor/@popperjs/core/lib/modifiers/applyStyles.es.js +49 -25
- package/vendor/@popperjs/core/lib/modifiers/arrow.es.js +61 -26
- package/vendor/@popperjs/core/lib/modifiers/computeStyles.es.js +101 -69
- package/vendor/@popperjs/core/lib/modifiers/eventListeners.es.js +30 -16
- package/vendor/@popperjs/core/lib/modifiers/flip.es.js +99 -60
- package/vendor/@popperjs/core/lib/modifiers/hide.es.js +44 -31
- package/vendor/@popperjs/core/lib/modifiers/offset.es.js +32 -20
- package/vendor/@popperjs/core/lib/modifiers/popperOffsets.es.js +11 -11
- package/vendor/@popperjs/core/lib/modifiers/preventOverflow.es.js +91 -40
- package/vendor/@popperjs/core/lib/popper.es.js +14 -13
- package/vendor/@popperjs/core/lib/utils/computeAutoPlacement.es.js +29 -21
- package/vendor/@popperjs/core/lib/utils/computeOffsets.es.js +41 -36
- package/vendor/@popperjs/core/lib/utils/debounce.es.js +11 -7
- package/vendor/@popperjs/core/lib/utils/detectOverflow.es.js +42 -28
- package/vendor/@popperjs/core/lib/utils/expandToHashMap.es.js +5 -4
- package/vendor/@popperjs/core/lib/utils/getAltAxis.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getBasePlacement.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getFreshSideObject.es.js +2 -2
- package/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getOppositePlacement.es.js +5 -5
- package/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.es.js +5 -5
- package/vendor/@popperjs/core/lib/utils/getVariation.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/math.es.js +6 -4
- package/vendor/@popperjs/core/lib/utils/mergeByName.es.js +11 -10
- package/vendor/@popperjs/core/lib/utils/mergePaddingObject.es.js +4 -4
- package/vendor/@popperjs/core/lib/utils/orderModifiers.es.js +30 -22
- package/vendor/@popperjs/core/lib/utils/rectToClientRect.es.js +7 -7
- package/vendor/@popperjs/core/lib/utils/userAgent.es.js +9 -6
- package/vendor/@popperjs/core/lib/utils/within.es.js +8 -8
- package/vendor/@tiptap/core/dist/index.es.js +3494 -2000
- package/vendor/@tiptap/extension-bold/dist/index.es.js +29 -19
- package/vendor/@tiptap/extension-bubble-menu/dist/index.es.js +145 -71
- package/vendor/@tiptap/extension-bullet-list/dist/index.es.js +32 -19
- package/vendor/@tiptap/extension-code/dist/index.es.js +22 -14
- package/vendor/@tiptap/extension-document/dist/index.es.js +4 -4
- package/vendor/@tiptap/extension-floating-menu/dist/index.es.js +106 -51
- package/vendor/@tiptap/extension-heading/dist/index.es.js +38 -22
- package/vendor/@tiptap/extension-history/dist/index.es.js +11 -7
- package/vendor/@tiptap/extension-image/dist/index.es.js +20 -17
- package/vendor/@tiptap/extension-italic/dist/index.es.js +28 -18
- package/vendor/@tiptap/extension-link/dist/index.es.js +236 -147
- package/vendor/@tiptap/extension-list-item/dist/index.es.js +6 -6
- package/vendor/@tiptap/extension-mention/dist/index.es.js +98 -63
- package/vendor/@tiptap/extension-ordered-list/dist/index.es.js +38 -25
- package/vendor/@tiptap/extension-paragraph/dist/index.es.js +8 -6
- package/vendor/@tiptap/extension-placeholder/dist/index.es.js +34 -27
- package/vendor/@tiptap/extension-text/dist/index.es.js +3 -3
- package/vendor/@tiptap/extension-underline/dist/index.es.js +16 -10
- package/vendor/@tiptap/suggestion/dist/index.es.js +174 -90
- package/vendor/@tiptap/vue-3/dist/index.es.js +287 -188
- package/vendor/@wangs-ui/core/components/p-BU8h34na.es.js +17 -14
- package/vendor/@wangs-ui/core/components/p-C5lMEBcj.es.js +69 -55
- package/vendor/@wangs-ui/core/components/p-CKYwZoTo.es.js +26 -22
- package/vendor/@wangs-ui/core/components/p-CsoK-EWG.es.js +147 -102
- package/vendor/@wangs-ui/core/components/p-DPHEi31J.es.js +102 -77
- package/vendor/@wangs-ui/core/components/p-DTTCzifR.es.js +1298 -551
- package/vendor/@wangs-ui/core/components/p-Duri5p90.es.js +60 -49
- package/vendor/@wangs-ui/core/components/wangs-button.es.js +19 -15
- package/vendor/@wangs-ui/core/components/wangs-icon.es.js +3 -3
- package/vendor/@wangs-ui/core/components/wangs-input-otp.es.js +3 -3
- package/vendor/@wangs-ui/core/components/wangs-tab-menu.es.js +3 -3
- package/vendor/@wangs-ui/core/dist/esm/index-DCkh3cGv.es.js +116 -102
- package/vendor/@wangs-ui/vue/dist/index.es.js +77 -77
- package/vendor/base64toblob/base64toblob.es.js +31 -15
- package/vendor/highlight.js/es/core.es.js +5 -5
- package/vendor/highlight.js/es/languages/javascript.es.js +237 -193
- package/vendor/highlight.js/es/languages/json.es.js +18 -15
- package/vendor/highlight.js/es/languages/typescript.es.js +288 -228
- package/vendor/highlight.js/es/languages/vbscript-html.es.js +2 -2
- package/vendor/highlight.js/lib/core.es.js +1144 -666
- package/vendor/linkifyjs/dist/linkify.es.es.js +858 -405
- package/vendor/lodash/_Symbol.es.js +11 -8
- package/vendor/lodash/_baseGetTag.es.js +19 -12
- package/vendor/lodash/_baseTrim.es.js +13 -10
- package/vendor/lodash/_freeGlobal.es.js +10 -8
- package/vendor/lodash/_getRawTag.es.js +28 -15
- package/vendor/lodash/_objectToString.es.js +12 -9
- package/vendor/lodash/_root.es.js +12 -8
- package/vendor/lodash/_trimmedEndIndex.es.js +14 -11
- package/vendor/lodash/debounce.es.js +92 -54
- package/vendor/lodash/isObject.es.js +11 -9
- package/vendor/lodash/isObjectLike.es.js +10 -8
- package/vendor/lodash/isSymbol.es.js +14 -11
- package/vendor/lodash/now.es.js +12 -9
- package/vendor/lodash/throttle.es.js +25 -17
- package/vendor/lodash/toNumber.es.js +33 -23
- package/vendor/lodash-es/_DataView.es.js +4 -4
- package/vendor/lodash-es/_Hash.es.js +17 -16
- package/vendor/lodash-es/_ListCache.es.js +17 -16
- package/vendor/lodash-es/_Map.es.js +4 -4
- package/vendor/lodash-es/_MapCache.es.js +17 -16
- package/vendor/lodash-es/_Promise.es.js +4 -4
- package/vendor/lodash-es/_Set.es.js +4 -4
- package/vendor/lodash-es/_SetCache.es.js +12 -10
- package/vendor/lodash-es/_Stack.es.js +15 -15
- package/vendor/lodash-es/_Symbol.es.js +3 -3
- package/vendor/lodash-es/_Uint8Array.es.js +3 -3
- package/vendor/lodash-es/_WeakMap.es.js +4 -4
- package/vendor/lodash-es/_arrayEach.es.js +9 -5
- package/vendor/lodash-es/_arrayFilter.es.js +9 -6
- package/vendor/lodash-es/_arrayLikeKeys.es.js +21 -17
- package/vendor/lodash-es/_arrayPush.es.js +7 -5
- package/vendor/lodash-es/_arraySome.es.js +9 -6
- package/vendor/lodash-es/_assignValue.es.js +10 -7
- package/vendor/lodash-es/_assocIndexOf.es.js +9 -6
- package/vendor/lodash-es/_baseAssignValue.es.js +13 -9
- package/vendor/lodash-es/_baseClone.es.js +67 -49
- package/vendor/lodash-es/_baseCreate.es.js +15 -11
- package/vendor/lodash-es/_baseGetAllKeys.es.js +6 -6
- package/vendor/lodash-es/_baseGetTag.es.js +11 -7
- package/vendor/lodash-es/_baseIsArguments.es.js +6 -6
- package/vendor/lodash-es/_baseIsEqual.es.js +11 -5
- package/vendor/lodash-es/_baseIsEqualDeep.es.js +39 -26
- package/vendor/lodash-es/_baseIsMap.es.js +6 -6
- package/vendor/lodash-es/_baseIsNative.es.js +18 -12
- package/vendor/lodash-es/_baseIsSet.es.js +6 -6
- package/vendor/lodash-es/_baseIsTypedArray.es.js +11 -9
- package/vendor/lodash-es/_baseKeys.es.js +16 -11
- package/vendor/lodash-es/_baseTimes.es.js +7 -5
- package/vendor/lodash-es/_baseTrim.es.js +5 -5
- package/vendor/lodash-es/_baseUnary.es.js +4 -4
- package/vendor/lodash-es/_cacheHas.es.js +3 -3
- package/vendor/lodash-es/_cloneArrayBuffer.es.js +6 -5
- package/vendor/lodash-es/_cloneBuffer.es.js +11 -6
- package/vendor/lodash-es/_cloneDataView.es.js +5 -5
- package/vendor/lodash-es/_cloneRegExp.es.js +6 -5
- package/vendor/lodash-es/_cloneSymbol.es.js +5 -5
- package/vendor/lodash-es/_cloneTypedArray.es.js +5 -5
- package/vendor/lodash-es/_coreJsData.es.js +3 -3
- package/vendor/lodash-es/_defineProperty.es.js +7 -6
- package/vendor/lodash-es/_equalArrays.es.js +38 -28
- package/vendor/lodash-es/_equalByTag.es.js +55 -41
- package/vendor/lodash-es/_equalObjects.es.js +42 -28
- package/vendor/lodash-es/_freeGlobal.es.js +2 -2
- package/vendor/lodash-es/_getAllKeys.es.js +6 -6
- package/vendor/lodash-es/_getMapData.es.js +5 -5
- package/vendor/lodash-es/_getNative.es.js +6 -6
- package/vendor/lodash-es/_getPrototype.es.js +3 -3
- package/vendor/lodash-es/_getRawTag.es.js +20 -10
- package/vendor/lodash-es/_getSymbols.es.js +15 -8
- package/vendor/lodash-es/_getTag.es.js +31 -25
- package/vendor/lodash-es/_getValue.es.js +3 -3
- package/vendor/lodash-es/_hashClear.es.js +5 -4
- package/vendor/lodash-es/_hashDelete.es.js +5 -4
- package/vendor/lodash-es/_hashGet.es.js +11 -9
- package/vendor/lodash-es/_hashHas.es.js +7 -6
- package/vendor/lodash-es/_hashSet.es.js +8 -6
- package/vendor/lodash-es/_initCloneArray.es.js +10 -5
- package/vendor/lodash-es/_initCloneByTag.es.js +39 -38
- package/vendor/lodash-es/_initCloneObject.es.js +6 -6
- package/vendor/lodash-es/_isIndex.es.js +7 -5
- package/vendor/lodash-es/_isKeyable.es.js +4 -4
- package/vendor/lodash-es/_isMasked.es.js +7 -7
- package/vendor/lodash-es/_isPrototype.es.js +5 -5
- package/vendor/lodash-es/_listCacheClear.es.js +4 -3
- package/vendor/lodash-es/_listCacheDelete.es.js +17 -9
- package/vendor/lodash-es/_listCacheGet.es.js +5 -5
- package/vendor/lodash-es/_listCacheHas.es.js +4 -4
- package/vendor/lodash-es/_listCacheSet.es.js +11 -5
- package/vendor/lodash-es/_mapCacheClear.es.js +10 -9
- package/vendor/lodash-es/_mapCacheDelete.es.js +6 -5
- package/vendor/lodash-es/_mapCacheGet.es.js +4 -4
- package/vendor/lodash-es/_mapCacheHas.es.js +4 -4
- package/vendor/lodash-es/_mapCacheSet.es.js +7 -5
- package/vendor/lodash-es/_mapToArray.es.js +7 -6
- package/vendor/lodash-es/_nativeCreate.es.js +3 -3
- package/vendor/lodash-es/_nativeKeys.es.js +3 -3
- package/vendor/lodash-es/_nodeUtil.es.js +13 -6
- package/vendor/lodash-es/_objectToString.es.js +5 -4
- package/vendor/lodash-es/_overArg.es.js +4 -4
- package/vendor/lodash-es/_root.es.js +4 -3
- package/vendor/lodash-es/_setCacheAdd.es.js +5 -4
- package/vendor/lodash-es/_setCacheHas.es.js +3 -3
- package/vendor/lodash-es/_setToArray.es.js +7 -6
- package/vendor/lodash-es/_stackClear.es.js +5 -4
- package/vendor/lodash-es/_stackDelete.es.js +5 -4
- package/vendor/lodash-es/_stackGet.es.js +3 -3
- package/vendor/lodash-es/_stackHas.es.js +3 -3
- package/vendor/lodash-es/_stackSet.es.js +18 -13
- package/vendor/lodash-es/_toSource.es.js +9 -8
- package/vendor/lodash-es/_trimmedEndIndex.es.js +7 -6
- package/vendor/lodash-es/cloneDeep.es.js +5 -5
- package/vendor/lodash-es/debounce.es.js +84 -49
- package/vendor/lodash-es/eq.es.js +3 -3
- package/vendor/lodash-es/isArguments.es.js +9 -6
- package/vendor/lodash-es/isArray.es.js +2 -2
- package/vendor/lodash-es/isArrayLike.es.js +5 -5
- package/vendor/lodash-es/isBuffer.es.js +9 -4
- package/vendor/lodash-es/isEqual.es.js +4 -4
- package/vendor/lodash-es/isFunction.es.js +10 -9
- package/vendor/lodash-es/isLength.es.js +4 -4
- package/vendor/lodash-es/isMap.es.js +6 -5
- package/vendor/lodash-es/isObject.es.js +4 -4
- package/vendor/lodash-es/isObjectLike.es.js +3 -3
- package/vendor/lodash-es/isSet.es.js +6 -5
- package/vendor/lodash-es/isSymbol.es.js +6 -6
- package/vendor/lodash-es/isTypedArray.es.js +6 -5
- package/vendor/lodash-es/keys.es.js +6 -6
- package/vendor/lodash-es/now.es.js +4 -4
- package/vendor/lodash-es/stubArray.es.js +2 -2
- package/vendor/lodash-es/stubFalse.es.js +3 -3
- package/vendor/lodash-es/toNumber.es.js +25 -18
- package/vendor/lodash-es/toString.es.js +2 -2
- package/vendor/lodash-es/uniqueId.es.js +6 -6
- package/vendor/orderedmap/dist/index.es.js +65 -49
- package/vendor/primevue/api/api.esm.es.js +214 -121
- package/vendor/primevue/avatar/avatar.esm.es.js +44 -41
- package/vendor/primevue/avatar/style/avatarstyle.esm.es.js +12 -11
- package/vendor/primevue/avatargroup/avatargroup.esm.es.js +17 -16
- package/vendor/primevue/avatargroup/style/avatargroupstyle.esm.es.js +6 -5
- package/vendor/primevue/badge/badge.esm.es.js +21 -20
- package/vendor/primevue/badge/style/badgestyle.esm.es.js +19 -18
- package/vendor/primevue/base/style/basestyle.esm.es.js +88 -99
- package/vendor/primevue/basecomponent/basecomponent.esm.es.js +327 -261
- package/vendor/primevue/basedirective/basedirective.esm.es.js +257 -186
- package/vendor/primevue/baseicon/baseicon.esm.es.js +55 -49
- package/vendor/primevue/baseicon/style/baseiconstyle.esm.es.js +5 -35
- package/vendor/primevue/button/button.esm.es.js +76 -72
- package/vendor/primevue/button/style/buttonstyle.esm.es.js +46 -39
- package/vendor/primevue/card/card.esm.es.js +30 -29
- package/vendor/primevue/card/style/cardstyle.esm.es.js +6 -5
- package/vendor/primevue/checkbox/checkbox.esm.es.js +109 -101
- package/vendor/primevue/checkbox/style/checkboxstyle.esm.es.js +12 -11
- package/vendor/primevue/config/config.esm.es.js +76 -58
- package/vendor/primevue/dialog/dialog.esm.es.js +421 -281
- package/vendor/primevue/dialog/style/dialogstyle.esm.es.js +26 -22
- package/vendor/primevue/dropdown/dropdown.esm.es.js +956 -742
- package/vendor/primevue/dropdown/style/dropdownstyle.esm.es.js +33 -31
- package/vendor/primevue/fileupload/fileupload.esm.es.js +559 -450
- package/vendor/primevue/fileupload/style/fileuploadstyle.esm.es.js +14 -13
- package/vendor/primevue/focustrap/focustrap.esm.es.js +128 -90
- package/vendor/primevue/focustrap/style/focustrapstyle.esm.es.js +2 -2
- package/vendor/primevue/icons/angledoubleleft/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angledoubleright/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angledown/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleleft/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleright/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleup/index.esm.es.js +13 -11
- package/vendor/primevue/icons/blank/index.esm.es.js +13 -11
- package/vendor/primevue/icons/check/index.esm.es.js +13 -11
- package/vendor/primevue/icons/chevrondown/index.esm.es.js +13 -11
- package/vendor/primevue/icons/exclamationtriangle/index.esm.es.js +17 -13
- package/vendor/primevue/icons/eye/index.esm.es.js +13 -11
- package/vendor/primevue/icons/eyeslash/index.esm.es.js +13 -11
- package/vendor/primevue/icons/infocircle/index.esm.es.js +13 -11
- package/vendor/primevue/icons/plus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/refresh/index.esm.es.js +13 -11
- package/vendor/primevue/icons/search/index.esm.es.js +13 -11
- package/vendor/primevue/icons/searchminus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/searchplus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/spinner/index.esm.es.js +13 -11
- package/vendor/primevue/icons/times/index.esm.es.js +13 -11
- package/vendor/primevue/icons/timescircle/index.esm.es.js +13 -11
- package/vendor/primevue/icons/undo/index.esm.es.js +13 -11
- package/vendor/primevue/icons/upload/index.esm.es.js +13 -11
- package/vendor/primevue/icons/windowmaximize/index.esm.es.js +13 -11
- package/vendor/primevue/icons/windowminimize/index.esm.es.js +13 -11
- package/vendor/primevue/image/image.esm.es.js +280 -235
- package/vendor/primevue/image/style/imagestyle.esm.es.js +18 -17
- package/vendor/primevue/inputgroup/inputgroup.esm.es.js +17 -16
- package/vendor/primevue/inputgroup/style/inputgroupstyle.esm.es.js +6 -5
- package/vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js +17 -16
- package/vendor/primevue/inputgroupaddon/style/inputgroupaddonstyle.esm.es.js +6 -5
- package/vendor/primevue/inputnumber/inputnumber.esm.es.js +834 -566
- package/vendor/primevue/inputnumber/style/inputnumberstyle.esm.es.js +23 -22
- package/vendor/primevue/inputtext/inputtext.esm.es.js +32 -30
- package/vendor/primevue/inputtext/style/inputtextstyle.esm.es.js +13 -12
- package/vendor/primevue/menu/menu.esm.es.js +402 -304
- package/vendor/primevue/menu/style/menustyle.esm.es.js +14 -13
- package/vendor/primevue/message/message.esm.es.js +126 -112
- package/vendor/primevue/message/style/messagestyle.esm.es.js +9 -8
- package/vendor/primevue/multiselect/multiselect.esm.es.js +1083 -835
- package/vendor/primevue/multiselect/style/multiselectstyle.esm.es.js +38 -36
- package/vendor/primevue/overlayeventbus/overlayeventbus.esm.es.js +3 -3
- package/vendor/primevue/overlaypanel/overlaypanel.esm.es.js +275 -169
- package/vendor/primevue/overlaypanel/style/overlaypanelstyle.esm.es.js +9 -8
- package/vendor/primevue/paginator/paginator.esm.es.js +513 -469
- package/vendor/primevue/paginator/style/paginatorstyle.esm.es.js +50 -43
- package/vendor/primevue/password/password.esm.es.js +306 -233
- package/vendor/primevue/password/style/passwordstyle.esm.es.js +26 -24
- package/vendor/primevue/portal/portal.esm.es.js +17 -17
- package/vendor/primevue/progressbar/progressbar.esm.es.js +37 -35
- package/vendor/primevue/progressbar/style/progressbarstyle.esm.es.js +10 -9
- package/vendor/primevue/ripple/ripple.esm.es.js +90 -62
- package/vendor/primevue/ripple/style/ripplestyle.esm.es.js +6 -5
- package/vendor/primevue/selectbutton/selectbutton.esm.es.js +213 -167
- package/vendor/primevue/selectbutton/style/selectbuttonstyle.esm.es.js +14 -13
- package/vendor/primevue/skeleton/skeleton.esm.es.js +28 -26
- package/vendor/primevue/skeleton/style/skeletonstyle.esm.es.js +13 -11
- package/vendor/primevue/textarea/style/textareastyle.esm.es.js +12 -11
- package/vendor/primevue/textarea/textarea.esm.es.js +49 -33
- package/vendor/primevue/timeline/style/timelinestyle.esm.es.js +9 -8
- package/vendor/primevue/timeline/timeline.esm.es.js +53 -52
- package/vendor/primevue/toast/style/toaststyle.esm.es.js +54 -46
- package/vendor/primevue/toast/toast.esm.es.js +309 -260
- package/vendor/primevue/toasteventbus/toasteventbus.esm.es.js +3 -3
- package/vendor/primevue/toastservice/toastservice.esm.es.js +16 -15
- package/vendor/primevue/tooltip/style/tooltipstyle.esm.es.js +6 -5
- package/vendor/primevue/tooltip/tooltip.esm.es.js +383 -186
- package/vendor/primevue/usestyle/usestyle.esm.es.js +94 -64
- package/vendor/primevue/usetoast/usetoast.esm.es.js +9 -8
- package/vendor/primevue/utils/utils.esm.es.js +1078 -772
- package/vendor/primevue/virtualscroller/style/virtualscrollerstyle.esm.es.js +5 -67
- package/vendor/primevue/virtualscroller/virtualscroller.esm.es.js +655 -428
- package/vendor/prosemirror-commands/dist/index.es.js +454 -316
- package/vendor/prosemirror-history/dist/index.es.js +286 -178
- package/vendor/prosemirror-keymap/dist/index.es.js +68 -48
- package/vendor/prosemirror-model/dist/index.es.js +1905 -1436
- package/vendor/prosemirror-schema-list/dist/index.es.js +115 -73
- package/vendor/prosemirror-state/dist/index.es.js +467 -353
- package/vendor/prosemirror-transform/dist/index.es.js +1146 -829
- package/vendor/prosemirror-view/dist/index.es.js +4127 -2719
- package/vendor/rope-sequence/dist/index.es.js +165 -82
- package/vendor/simplebar-core/dist/index.es.js +670 -242
- package/vendor/simplebar-vue/dist/simplebar-vue.esm.es.js +73 -60
- package/vendor/single-spa/lib/es2015/esm/single-spa.min.es.js +511 -510
- package/vendor/tippy.js/dist/tippy.esm.es.js +971 -525
- package/vendor/vee-validate/dist/vee-validate.esm.es.js +1830 -1097
- package/vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js +740 -738
- package/vendor/w3c-keyname/index.es.js +25 -13
- package/wangsvue.es.js +167 -208
- package/wangsvue.esm.browser.js +49417 -48026
- package/wangsvue.system.js +67600 -234
- package/api/index.es.js +0 -149
- package/apiitem/index.es.js +0 -611
- package/assignmember/index.es.js +0 -434
- package/attachment/index.es.js +0 -118
- package/attachmentchangelog/index.es.js +0 -79
- package/attachmentitem/index.es.js +0 -231
- package/attachmentthumbnail/index.es.js +0 -83
- package/changelog/index.d.ts +0 -164
- package/changelog/index.es.js +0 -85
- package/changelogfilter/index.es.js +0 -113
- package/changelogpage/index.d.ts +0 -184
- package/changelogpage/index.es.js +0 -176
- package/checklist/index.es.js +0 -571
- package/checklistchangelog/index.es.js +0 -85
- package/comment/index.d.ts +0 -187
- package/comment/index.es.js +0 -267
- package/commentblock/index.es.js +0 -337
- package/confirmdeploy/index.es.js +0 -64
- package/dependencycol/index.es.js +0 -32
- package/description/index.es.js +0 -135
- package/descriptiontab/index.es.js +0 -30
- package/detailmember/index.d.ts +0 -77
- package/detailmember/index.es.js +0 -32
- package/detailmemberadmin/index.es.js +0 -210
- package/detailmemberleader/index.es.js +0 -164
- package/detailmemberlog/index.es.js +0 -117
- package/detailsprint/index.d.ts +0 -86
- package/detailsprint/index.es.js +0 -414
- package/dialogaddattachment/index.es.js +0 -273
- package/dialogaddchecklist/index.es.js +0 -120
- package/dialogaddeditapi/index.es.js +0 -87
- package/dialogaddpbi/index.es.js +0 -197
- package/dialogadjustmenttask/index.es.js +0 -484
- package/dialogadjustmenttaskheader/index.es.js +0 -193
- package/dialogapichangelog/index.es.js +0 -83
- package/dialogassignmember/index.es.js +0 -171
- package/dialogconfirmapproval/index.es.js +0 -54
- package/dialogconfirmchecklist/index.es.js +0 -189
- package/dialogconfirmdeletetask/index.es.js +0 -70
- package/dialogconfirmdeletetaskpermanently/index.es.js +0 -50
- package/dialogconfirmedit/index.es.js +0 -50
- package/dialogconfirmfinishtask/index.es.js +0 -50
- package/dialogconfirmrestoretask/index.es.js +0 -46
- package/dialogconfirmsprint/index.es.js +0 -42
- package/dialogcopyapi/index.es.js +0 -130
- package/dialogcustomdependency/index.es.js +0 -55
- package/dialogdetailchecklisttemplate/index.es.js +0 -214
- package/dialogdetailcomponent/index.es.js +0 -121
- package/dialogdetailpbi/index.es.js +0 -192
- package/dialogfinishreview/index.es.js +0 -126
- package/dialogimprovementtask/index.es.js +0 -191
- package/dialogmemberadmin/index.es.js +0 -93
- package/dialogpreparepbi/index.es.js +0 -93
- package/dialogpriorityvalue/index.es.js +0 -85
- package/dialogreportbug/index.es.js +0 -207
- package/dialogreviewleader/index.es.js +0 -280
- package/dialogsavechecklisttemplate/index.es.js +0 -127
- package/dialogselectproject/index.es.js +0 -69
- package/dialogsetduration/index.es.js +0 -109
- package/dialogsettasklink/index.es.js +0 -153
- package/dialogtestapi/index.es.js +0 -389
- package/eventlogtab/index.es.js +0 -50
- package/infotasktab/index.es.js +0 -186
- package/inputadditional/index.es.js +0 -62
- package/inputinitialname/index.d.ts +0 -118
- package/inputinitialname/index.es.js +0 -95
- package/inputrepositoryname/index.d.ts +0 -86
- package/inputrepositoryname/index.es.js +0 -41
- package/isrequiredtext/index.es.js +0 -16
- package/legend/index.es.js +0 -727
- package/legendlist/index.es.js +0 -33
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CgfbWppy.js +0 -1
- package/loading-page-CoC9UhfC.js +0 -4
- package/loading-page-CoXtqoc9.js +0 -4
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-page-f8D03l3G.js +0 -4
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-plane-CoXtqoc9.js +0 -4
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-ByUoWqUo.js +0 -4
- package/loading-table-BygEMzFM.js +0 -4
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-D9bw9OcI.js +0 -4
- package/loading-table-chOgXi94.js +0 -1
- package/no-data-CTKux8RI.js +0 -4
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-DLHO1L_u.js +0 -4
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-g0dJCy2p.js +0 -4
- package/no-data-y1X5WtcQ.js +0 -1
- package/notificationitem/index.d.ts +0 -107
- package/notificationitem/index.es.js +0 -333
- package/reviewitem/index.es.js +0 -65
- package/reviewtab/index.es.js +0 -44
- package/services/calendar.service.es.js +0 -32
- package/sonarqubesummary/index.es.js +0 -234
- package/sprintsummary/index.es.js +0 -73
- package/summaryaccordion/index.d.ts +0 -121
- package/summaryaccordion/index.es.js +0 -365
- package/taskdependency/index.es.js +0 -686
- package/taskdetail/index.d.ts +0 -82
- package/taskdetail/index.es.js +0 -491
- package/taskdetailpbi/index.d.ts +0 -35
- package/taskdetailpbi/index.es.js +0 -172
- package/taskdetailunassignedpbi/index.es.js +0 -261
- package/tasklink/index.es.js +0 -257
- package/tasklinkchangelog/index.es.js +0 -93
- package/tasklist/index.es.js +0 -92
- package/taskmore/index.es.js +0 -52
- package/taskstatusbadge/index.es.js +0 -18
- package/tasktable/index.d.ts +0 -87
- package/tasktable/index.es.js +0 -832
- package/ticket/index.es.js +0 -151
- package/tooltipspan/index.es.js +0 -30
- package/utils/updateSprintStatus.util.es.js +0 -17
- package/valueformdatainput/index.es.js +0 -70
- package/workcalendar/index.es.js +0 -351
package/editor/index.es.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { u as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { C as
|
|
6
|
-
import { D as
|
|
7
|
-
import { F as
|
|
8
|
-
import { H as
|
|
9
|
-
import { H as
|
|
10
|
-
import { I as
|
|
11
|
-
import { I as
|
|
12
|
-
import { L as
|
|
13
|
-
import { L as
|
|
14
|
-
import { M as
|
|
15
|
-
import { O as
|
|
16
|
-
import { P as
|
|
17
|
-
import { P as
|
|
18
|
-
import { T as
|
|
19
|
-
import { U as
|
|
20
|
-
import { V as
|
|
21
|
-
import { N as
|
|
22
|
-
import { _ as
|
|
23
|
-
import { _ as
|
|
24
|
-
import { t as
|
|
25
|
-
import { _ as
|
|
26
|
-
import {
|
|
27
|
-
import { s as
|
|
28
|
-
import { _ as
|
|
29
|
-
import { _ as
|
|
30
|
-
import { _ as
|
|
31
|
-
import { _ as
|
|
32
|
-
import { _ as
|
|
33
|
-
import { _ as
|
|
34
|
-
import { _ as
|
|
35
|
-
import { _ as
|
|
36
|
-
import { _ as
|
|
37
|
-
import { _ as
|
|
38
|
-
const
|
|
1
|
+
import { defineComponent, mergeModels, inject, useModel, onMounted, reactive, shallowRef, ref, computed, watch, resolveDirective, createElementBlock, openBlock, Fragment, createVNode, withCtx, createElementVNode, normalizeClass, createCommentVNode, createBlock, renderList, mergeProps, unref, createTextVNode, toDisplayString, withDirectives, nextTick } from "vue";
|
|
2
|
+
import { u as useField } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
+
import { B as Bold } from "../vendor/@tiptap/extension-bold/dist/index.es.js";
|
|
4
|
+
import { B as BulletList } from "../vendor/@tiptap/extension-bullet-list/dist/index.es.js";
|
|
5
|
+
import { C as Code } from "../vendor/@tiptap/extension-code/dist/index.es.js";
|
|
6
|
+
import { D as Document } from "../vendor/@tiptap/extension-document/dist/index.es.js";
|
|
7
|
+
import { F as FloatingMenu } from "../vendor/@tiptap/extension-floating-menu/dist/index.es.js";
|
|
8
|
+
import { H as Heading } from "../vendor/@tiptap/extension-heading/dist/index.es.js";
|
|
9
|
+
import { H as History } from "../vendor/@tiptap/extension-history/dist/index.es.js";
|
|
10
|
+
import { I as Image } from "../vendor/@tiptap/extension-image/dist/index.es.js";
|
|
11
|
+
import { I as Italic } from "../vendor/@tiptap/extension-italic/dist/index.es.js";
|
|
12
|
+
import { L as Link } from "../vendor/@tiptap/extension-link/dist/index.es.js";
|
|
13
|
+
import { L as ListItem } from "../vendor/@tiptap/extension-list-item/dist/index.es.js";
|
|
14
|
+
import { M as Mention } from "../vendor/@tiptap/extension-mention/dist/index.es.js";
|
|
15
|
+
import { O as OrderedList } from "../vendor/@tiptap/extension-ordered-list/dist/index.es.js";
|
|
16
|
+
import { P as Paragraph } from "../vendor/@tiptap/extension-paragraph/dist/index.es.js";
|
|
17
|
+
import { P as Placeholder } from "../vendor/@tiptap/extension-placeholder/dist/index.es.js";
|
|
18
|
+
import { T as Text } from "../vendor/@tiptap/extension-text/dist/index.es.js";
|
|
19
|
+
import { U as Underline } from "../vendor/@tiptap/extension-underline/dist/index.es.js";
|
|
20
|
+
import { V as VueNodeViewRenderer, a as VueRenderer, u as useEditor, E as EditorContent, F as FloatingMenu$1 } from "../vendor/@tiptap/vue-3/dist/index.es.js";
|
|
21
|
+
import { N as Node, m as mergeAttributes } from "../vendor/@tiptap/core/dist/index.es.js";
|
|
22
|
+
import { _ as _sfc_main$1 } from "../codesnippetadapter/index.es.js";
|
|
23
|
+
import { _ as _sfc_main$2 } from "../mentionsection/index.es.js";
|
|
24
|
+
import { t as tippy } from "../vendor/tippy.js/dist/tippy.esm.es.js";
|
|
25
|
+
import { _ as _sfc_main$3 } from "../mentionlist/index.es.js";
|
|
26
|
+
import { v as validateFileSize } from "../utils/addAttachment.util.es.js";
|
|
27
|
+
import { s as script } from "../vendor/primevue/menu/menu.esm.es.js";
|
|
28
|
+
import { _ as _sfc_main$8 } from "../button/index.es.js";
|
|
29
|
+
import { _ as _sfc_main$6 } from "../dialog/index.es.js";
|
|
30
|
+
import { _ as _sfc_main$4 } from "../fieldwrapper/index.es.js";
|
|
31
|
+
import { _ as _sfc_main$c } from "../form/index.es.js";
|
|
32
|
+
import { _ as _sfc_main$9 } from "../icon/index.es.js";
|
|
33
|
+
import { _ as _sfc_main$d } from "../inputtext/index.es.js";
|
|
34
|
+
import { _ as _sfc_main$7 } from "../inputurl/index.es.js";
|
|
35
|
+
import { _ as _sfc_main$b } from "../overlaypanel/index.es.js";
|
|
36
|
+
import { _ as _sfc_main$a } from "../validatormessage/index.es.js";
|
|
37
|
+
import { _ as _sfc_main$5 } from "../editorbutton/index.es.js";
|
|
38
|
+
const CodeSnippetExtension = Node.create({
|
|
39
39
|
name: "codeSnippet",
|
|
40
40
|
group: "block",
|
|
41
|
-
atom:
|
|
41
|
+
atom: true,
|
|
42
42
|
addAttributes() {
|
|
43
43
|
return {
|
|
44
44
|
code: {
|
|
@@ -53,25 +53,30 @@ const It = ke.create({
|
|
|
53
53
|
}
|
|
54
54
|
];
|
|
55
55
|
},
|
|
56
|
-
renderHTML({ HTMLAttributes
|
|
57
|
-
return ["codeSnippet",
|
|
56
|
+
renderHTML({ HTMLAttributes }) {
|
|
57
|
+
return ["codeSnippet", mergeAttributes(HTMLAttributes)];
|
|
58
58
|
},
|
|
59
59
|
addNodeView() {
|
|
60
|
-
return
|
|
60
|
+
return VueNodeViewRenderer(_sfc_main$1);
|
|
61
61
|
},
|
|
62
62
|
addCommands() {
|
|
63
63
|
return {
|
|
64
|
-
insertCodeSnippet: () => ({ commands
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
insertCodeSnippet: () => ({ commands }) => {
|
|
65
|
+
return commands.insertContent({
|
|
66
|
+
type: "codeSnippet",
|
|
67
|
+
attrs: { code: "" }
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
deleteCodeSnippet: () => ({ commands }) => {
|
|
71
|
+
return commands.deleteSelection();
|
|
72
|
+
}
|
|
69
73
|
};
|
|
70
74
|
}
|
|
71
|
-
})
|
|
75
|
+
});
|
|
76
|
+
const MentionSectionExtension = Node.create({
|
|
72
77
|
name: "mentionSection",
|
|
73
78
|
group: "block",
|
|
74
|
-
atom:
|
|
79
|
+
atom: true,
|
|
75
80
|
addAttributes() {
|
|
76
81
|
return {
|
|
77
82
|
title: {
|
|
@@ -89,90 +94,125 @@ const It = ke.create({
|
|
|
89
94
|
}
|
|
90
95
|
];
|
|
91
96
|
},
|
|
92
|
-
renderHTML({ HTMLAttributes
|
|
93
|
-
return ["mentionSection",
|
|
97
|
+
renderHTML({ HTMLAttributes }) {
|
|
98
|
+
return ["mentionSection", mergeAttributes(HTMLAttributes)];
|
|
94
99
|
},
|
|
95
100
|
addNodeView() {
|
|
96
|
-
return
|
|
101
|
+
return VueNodeViewRenderer(_sfc_main$2);
|
|
97
102
|
},
|
|
98
103
|
addCommands() {
|
|
99
104
|
return {
|
|
100
|
-
insertMentionSection: (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
deleteMentionSection: () => ({ commands: r }) => r.deleteSelection()
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}), Ht = () => ({
|
|
111
|
-
render: () => {
|
|
112
|
-
let r, g;
|
|
113
|
-
return {
|
|
114
|
-
onStart(m) {
|
|
115
|
-
r = new ft(xt, {
|
|
116
|
-
props: {
|
|
117
|
-
items: m.items,
|
|
118
|
-
command: m.command
|
|
119
|
-
},
|
|
120
|
-
editor: m.editor
|
|
121
|
-
}), m.clientRect && (g = yt("body", {
|
|
122
|
-
getReferenceClientRect: m.clientRect,
|
|
123
|
-
appendTo: () => document.body,
|
|
124
|
-
content: r.element,
|
|
125
|
-
showOnCreate: !0,
|
|
126
|
-
interactive: !0,
|
|
127
|
-
trigger: "manual",
|
|
128
|
-
placement: "bottom-start"
|
|
129
|
-
}));
|
|
130
|
-
},
|
|
131
|
-
onUpdate(m) {
|
|
132
|
-
r.updateProps(m), m.clientRect && g[0].setProps({
|
|
133
|
-
getReferenceClientRect: m.clientRect
|
|
105
|
+
insertMentionSection: (title) => ({ commands }) => {
|
|
106
|
+
return commands.insertContent({
|
|
107
|
+
type: "mentionSection",
|
|
108
|
+
attrs: {
|
|
109
|
+
title,
|
|
110
|
+
bodyText: null
|
|
111
|
+
}
|
|
134
112
|
});
|
|
135
113
|
},
|
|
136
|
-
|
|
137
|
-
return
|
|
138
|
-
},
|
|
139
|
-
onExit() {
|
|
140
|
-
g[0].destroy(), r.destroy();
|
|
114
|
+
deleteMentionSection: () => ({ commands }) => {
|
|
115
|
+
return commands.deleteSelection();
|
|
141
116
|
}
|
|
142
117
|
};
|
|
143
118
|
}
|
|
144
|
-
})
|
|
145
|
-
|
|
119
|
+
});
|
|
120
|
+
const suggestion = () => {
|
|
121
|
+
return {
|
|
122
|
+
render: () => {
|
|
123
|
+
let component;
|
|
124
|
+
let popup;
|
|
125
|
+
return {
|
|
126
|
+
onStart(props) {
|
|
127
|
+
component = new VueRenderer(_sfc_main$3, {
|
|
128
|
+
props: {
|
|
129
|
+
items: props.items,
|
|
130
|
+
command: props.command
|
|
131
|
+
},
|
|
132
|
+
editor: props.editor
|
|
133
|
+
});
|
|
134
|
+
if (!props.clientRect) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
popup = tippy("body", {
|
|
138
|
+
getReferenceClientRect: props.clientRect,
|
|
139
|
+
appendTo: () => document.body,
|
|
140
|
+
content: component.element,
|
|
141
|
+
showOnCreate: true,
|
|
142
|
+
interactive: true,
|
|
143
|
+
trigger: "manual",
|
|
144
|
+
placement: "bottom-start"
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
onUpdate(props) {
|
|
148
|
+
component.updateProps(props);
|
|
149
|
+
if (!props.clientRect) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
popup[0].setProps({
|
|
153
|
+
getReferenceClientRect: props.clientRect
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
onKeyDown(props) {
|
|
157
|
+
if (props.event.key === "Escape") {
|
|
158
|
+
popup[0].hide();
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
return component.ref.onKeyDown(props.event);
|
|
162
|
+
},
|
|
163
|
+
onExit() {
|
|
164
|
+
popup[0].destroy();
|
|
165
|
+
component.destroy();
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
const _hoisted_1 = ["title", "onClick"];
|
|
172
|
+
const _hoisted_2 = { class: "!text-[9px] !leading-3 !h-max !font-normal" };
|
|
173
|
+
const _hoisted_3 = {
|
|
174
|
+
class: /* @__PURE__ */ normalizeClass([
|
|
146
175
|
"flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm",
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
176
|
+
`[&_.separator::after]:content-['|']`,
|
|
177
|
+
`[&_.separator::after]:text-xl`,
|
|
178
|
+
`[&_.separator::after]:font-thin`,
|
|
179
|
+
`[&_.separator]:h-6`
|
|
151
180
|
])
|
|
152
|
-
}
|
|
153
|
-
|
|
181
|
+
};
|
|
182
|
+
const _hoisted_4 = {
|
|
183
|
+
class: /* @__PURE__ */ normalizeClass([
|
|
154
184
|
"flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm",
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
185
|
+
`[&_.separator::after]:content-['|']`,
|
|
186
|
+
`[&_.separator::after]:text-xl`,
|
|
187
|
+
`[&_.separator::after]:font-thin`,
|
|
188
|
+
`[&_.separator]:h-6`
|
|
159
189
|
])
|
|
160
|
-
}
|
|
161
|
-
|
|
190
|
+
};
|
|
191
|
+
const _hoisted_5 = { class: "flex flex-col gap-4" };
|
|
192
|
+
const _hoisted_6 = { class: "flex gap-2" };
|
|
193
|
+
const _hoisted_7 = { class: "flex-1" };
|
|
194
|
+
const _hoisted_8 = { class: "flex items-end" };
|
|
195
|
+
const _hoisted_9 = { class: "flex flex-wrap justify-center gap-2" };
|
|
196
|
+
const _hoisted_10 = ["src"];
|
|
197
|
+
const _hoisted_11 = { class: "flex flex-col justify-center w-28 h-28 items-center" };
|
|
198
|
+
const _hoisted_12 = { class: "relative py-[7px] px-3" };
|
|
199
|
+
const _hoisted_13 = {
|
|
200
|
+
class: /* @__PURE__ */ normalizeClass([
|
|
162
201
|
"flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm",
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
202
|
+
`[&_.separator::after]:content-['|']`,
|
|
203
|
+
`[&_.separator::after]:text-xl`,
|
|
204
|
+
`[&_.separator::after]:font-thin`,
|
|
205
|
+
`[&_.separator]:h-6`
|
|
167
206
|
])
|
|
168
|
-
}
|
|
207
|
+
};
|
|
208
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
169
209
|
__name: "Editor",
|
|
170
|
-
props: /* @__PURE__ */
|
|
210
|
+
props: /* @__PURE__ */ mergeModels({
|
|
171
211
|
modelValue: {},
|
|
172
212
|
initialValue: {},
|
|
173
213
|
placeholder: { default: "Tulis" },
|
|
174
214
|
editorState: { default: "editable" },
|
|
175
|
-
borderLess: { type: Boolean, default:
|
|
215
|
+
borderLess: { type: Boolean, default: false },
|
|
176
216
|
label: {},
|
|
177
217
|
useValidator: { type: Boolean },
|
|
178
218
|
fieldName: {},
|
|
@@ -183,107 +223,155 @@ const It = ke.create({
|
|
|
183
223
|
mandatory: { type: Boolean },
|
|
184
224
|
invalid: { type: Boolean },
|
|
185
225
|
showOptionalText: { type: Boolean, default: void 0 },
|
|
186
|
-
isImageUploadBase64: { type: Boolean, default:
|
|
226
|
+
isImageUploadBase64: { type: Boolean, default: false },
|
|
187
227
|
fetchMentionSuggestionFunction: {},
|
|
188
228
|
mentionedList: {},
|
|
189
229
|
editorWrapperClass: {},
|
|
190
230
|
toolbarWrapperClass: {},
|
|
191
231
|
contentWrapperClass: {}
|
|
192
232
|
}, {
|
|
193
|
-
modelValue: {},
|
|
194
|
-
modelModifiers: {},
|
|
195
|
-
mentionedList: {},
|
|
196
|
-
mentionedListModifiers: {}
|
|
233
|
+
"modelValue": {},
|
|
234
|
+
"modelModifiers": {},
|
|
235
|
+
"mentionedList": {},
|
|
236
|
+
"mentionedListModifiers": {}
|
|
197
237
|
}),
|
|
198
|
-
emits: /* @__PURE__ */
|
|
199
|
-
setup(
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
238
|
+
emits: /* @__PURE__ */ mergeModels(["update:modelValue", "postImageLocal", "deleteImageLocal", "blur", "focus", "update:mentionedList"], ["update:modelValue", "update:mentionedList"]),
|
|
239
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
240
|
+
const MenuPreset = inject("preset", {}).menu;
|
|
241
|
+
const props = __props;
|
|
242
|
+
const emit = __emit;
|
|
243
|
+
useModel(__props, "modelValue");
|
|
244
|
+
const modelMentionedList = useModel(__props, "mentionedList");
|
|
245
|
+
onMounted(() => {
|
|
246
|
+
if (props.useValidator) {
|
|
247
|
+
Object.assign(
|
|
248
|
+
field,
|
|
249
|
+
useField(
|
|
250
|
+
() => props.fieldName ?? "editorInput",
|
|
251
|
+
(value) => {
|
|
252
|
+
return nextTick(() => {
|
|
253
|
+
return setValidatorMessage(value);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
);
|
|
258
|
+
if (props.initialValue != null) field.value = props.initialValue;
|
|
259
|
+
if (props.modelValue != null) field.value = props.modelValue;
|
|
260
|
+
}
|
|
261
|
+
fetchMentionSuggestionFunction();
|
|
262
|
+
});
|
|
263
|
+
const linkFormShown = shallowRef(false);
|
|
264
|
+
const headingMenu = ref();
|
|
265
|
+
const editLinkOverlay = ref();
|
|
266
|
+
const root = ref();
|
|
267
|
+
const previewImages = ref([]);
|
|
268
|
+
const imageDialogUploader = shallowRef(false);
|
|
269
|
+
const inputURLImage = shallowRef();
|
|
270
|
+
const selectedImage = shallowRef();
|
|
271
|
+
const mentionSuggestionList = shallowRef();
|
|
272
|
+
const field = reactive({
|
|
273
|
+
value: props.modelValue
|
|
211
274
|
});
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
275
|
+
const isLoading = shallowRef(false);
|
|
276
|
+
const registeredMentionList = ref([]);
|
|
277
|
+
const mentionSectionTitle = shallowRef();
|
|
278
|
+
const inputPlaceholder = computed(
|
|
215
279
|
() => {
|
|
216
|
-
var
|
|
217
|
-
return
|
|
280
|
+
var _a;
|
|
281
|
+
return props.placeholder ?? "Tulis " + (props.label ? (_a = props.label) == null ? void 0 : _a.toLowerCase() : "");
|
|
218
282
|
}
|
|
219
|
-
)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
283
|
+
);
|
|
284
|
+
const editor = useEditor({
|
|
285
|
+
content: props.initialValue ?? props.modelValue,
|
|
286
|
+
onBlur: (e) => emit("blur", e),
|
|
287
|
+
onFocus: (e) => emit("focus", e),
|
|
223
288
|
onUpdate: () => {
|
|
224
|
-
var
|
|
225
|
-
|
|
289
|
+
var _a, _b;
|
|
290
|
+
emit("update:modelValue", ((_a = editor.value) == null ? void 0 : _a.getJSON()) ?? {});
|
|
291
|
+
field.value = ((_b = editor.value) == null ? void 0 : _b.getJSON()) ?? {};
|
|
226
292
|
},
|
|
227
|
-
onPaste: async (
|
|
228
|
-
let
|
|
229
|
-
const { items
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
293
|
+
onPaste: async (e) => {
|
|
294
|
+
let pastedFiles = [];
|
|
295
|
+
const { items } = e.clipboardData;
|
|
296
|
+
const processItem = (item) => {
|
|
297
|
+
return new Promise((resolve) => {
|
|
298
|
+
if (item.kind === "file") {
|
|
299
|
+
const file = item.getAsFile();
|
|
300
|
+
if (file) {
|
|
301
|
+
pastedFiles.push(file);
|
|
302
|
+
}
|
|
303
|
+
resolve();
|
|
304
|
+
} else {
|
|
305
|
+
resolve();
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
await Promise.all(Array.from(items).map(processItem));
|
|
237
310
|
try {
|
|
238
|
-
if (
|
|
239
|
-
const
|
|
240
|
-
await
|
|
311
|
+
if (pastedFiles.length) {
|
|
312
|
+
const validImages = pastedFiles.filter((file) => file.type.startsWith("image/")).filter((file) => validateFileSize(file, 10));
|
|
313
|
+
await setPreviewImages(validImages);
|
|
241
314
|
}
|
|
242
|
-
} catch (
|
|
243
|
-
console.error("Error pasting images:",
|
|
315
|
+
} catch (error) {
|
|
316
|
+
console.error("Error pasting images:", error);
|
|
244
317
|
} finally {
|
|
245
|
-
|
|
318
|
+
pastedFiles = [];
|
|
246
319
|
}
|
|
247
320
|
},
|
|
248
|
-
onSelectionUpdate(
|
|
249
|
-
var
|
|
250
|
-
const
|
|
321
|
+
onSelectionUpdate(selectedEvent) {
|
|
322
|
+
var _a;
|
|
323
|
+
const imageSelectedNode = selectedEvent.editor.getAttributes(
|
|
251
324
|
"image"
|
|
252
325
|
);
|
|
253
|
-
(
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
)
|
|
326
|
+
(_a = editor.value) == null ? void 0 : _a.state.doc.descendants((node) => {
|
|
327
|
+
if (node.type.name === "mention") {
|
|
328
|
+
registeredMentionList.value.push(node.attrs.id);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
registeredMentionList.value = Array.from(
|
|
332
|
+
new Set(registeredMentionList.value)
|
|
333
|
+
);
|
|
334
|
+
if (imageSelectedNode.title === "localImage") {
|
|
335
|
+
selectedImage.value = imageSelectedNode;
|
|
336
|
+
} else {
|
|
337
|
+
selectedImage.value = void 0;
|
|
338
|
+
}
|
|
258
339
|
},
|
|
259
|
-
editable:
|
|
340
|
+
editable: props.editorState === "editable",
|
|
260
341
|
extensions: [
|
|
261
|
-
|
|
342
|
+
Placeholder.configure({
|
|
262
343
|
emptyEditorClass: "is-editor-empty !text-general-200 !font-light",
|
|
263
|
-
placeholder:
|
|
264
|
-
includeChildren:
|
|
344
|
+
placeholder: inputPlaceholder.value,
|
|
345
|
+
includeChildren: false
|
|
265
346
|
}),
|
|
266
|
-
|
|
347
|
+
Document.extend({
|
|
267
348
|
addKeyboardShortcuts() {
|
|
268
349
|
return {
|
|
269
|
-
"Mod-\\": () =>
|
|
350
|
+
"Mod-\\": () => {
|
|
351
|
+
this.editor.commands.clearNodes();
|
|
352
|
+
return this.editor.commands.unsetAllMarks();
|
|
353
|
+
}
|
|
270
354
|
};
|
|
271
355
|
}
|
|
272
356
|
}),
|
|
273
357
|
// Blocks
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
358
|
+
Heading,
|
|
359
|
+
Paragraph,
|
|
360
|
+
Text,
|
|
361
|
+
Image.extend({
|
|
278
362
|
addKeyboardShortcuts() {
|
|
279
|
-
const
|
|
280
|
-
const { node
|
|
281
|
-
|
|
363
|
+
const deleteOrBackspace = () => {
|
|
364
|
+
const { node } = this.editor.state.selection;
|
|
365
|
+
if (node && node.type.name === "image" && node.attrs.title === "localImage") {
|
|
366
|
+
unsetImage();
|
|
367
|
+
return true;
|
|
368
|
+
}
|
|
369
|
+
return false;
|
|
282
370
|
};
|
|
283
371
|
return {
|
|
284
|
-
Insert: () =>
|
|
285
|
-
Backspace:
|
|
286
|
-
Delete:
|
|
372
|
+
Insert: () => setImageDialog(),
|
|
373
|
+
Backspace: deleteOrBackspace,
|
|
374
|
+
Delete: deleteOrBackspace
|
|
287
375
|
};
|
|
288
376
|
}
|
|
289
377
|
}).configure({
|
|
@@ -291,170 +379,186 @@ const It = ke.create({
|
|
|
291
379
|
class: "w-fit max-h-[300px] object-contain"
|
|
292
380
|
}
|
|
293
381
|
}),
|
|
294
|
-
|
|
382
|
+
CodeSnippetExtension.extend({
|
|
295
383
|
addKeyboardShortcuts() {
|
|
296
384
|
return {
|
|
297
|
-
"Mod-alt-c":
|
|
385
|
+
"Mod-alt-c": codeSnippetTrigger
|
|
298
386
|
};
|
|
299
387
|
}
|
|
300
388
|
}),
|
|
301
|
-
|
|
302
|
-
|
|
389
|
+
MentionSectionExtension,
|
|
390
|
+
OrderedList.configure({
|
|
303
391
|
HTMLAttributes: {
|
|
304
392
|
class: "list-decimal px-3 py-1"
|
|
305
393
|
}
|
|
306
394
|
}),
|
|
307
|
-
|
|
395
|
+
BulletList.configure({
|
|
308
396
|
HTMLAttributes: {
|
|
309
397
|
class: "list-disc px-3 py-1"
|
|
310
398
|
}
|
|
311
399
|
}),
|
|
312
|
-
|
|
400
|
+
ListItem,
|
|
313
401
|
// Marks
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
402
|
+
Bold,
|
|
403
|
+
Italic,
|
|
404
|
+
Underline,
|
|
405
|
+
Code,
|
|
406
|
+
Link.extend({
|
|
319
407
|
addKeyboardShortcuts() {
|
|
320
408
|
return {
|
|
321
|
-
"Mod-k": () =>
|
|
409
|
+
"Mod-k": () => openLinkForm()
|
|
322
410
|
};
|
|
323
411
|
}
|
|
324
412
|
}).configure({
|
|
325
|
-
openOnClick:
|
|
413
|
+
openOnClick: false
|
|
326
414
|
}),
|
|
327
|
-
|
|
328
|
-
|
|
415
|
+
History,
|
|
416
|
+
Mention.configure({
|
|
329
417
|
HTMLAttributes: {
|
|
330
418
|
class: "bg-primary-200 text-primary-800 rounded-[50px] px-1"
|
|
331
419
|
},
|
|
332
420
|
suggestion: {
|
|
333
|
-
items({ query
|
|
334
|
-
return ((
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
421
|
+
items({ query }) {
|
|
422
|
+
return ((mentionSuggestionList == null ? void 0 : mentionSuggestionList.value) ?? []).filter((item) => {
|
|
423
|
+
return item == null ? void 0 : item.fullName.toLowerCase().includes(query.toLowerCase());
|
|
424
|
+
}).map((item) => {
|
|
425
|
+
return {
|
|
426
|
+
id: item == null ? void 0 : item._id,
|
|
427
|
+
label: item == null ? void 0 : item.fullName,
|
|
428
|
+
nickName: item.nickName,
|
|
429
|
+
profilePicture: item.profilePicture
|
|
430
|
+
};
|
|
431
|
+
});
|
|
340
432
|
},
|
|
341
|
-
...
|
|
433
|
+
...suggestion()
|
|
342
434
|
}
|
|
343
435
|
}),
|
|
344
|
-
|
|
436
|
+
FloatingMenu
|
|
345
437
|
]
|
|
346
|
-
})
|
|
347
|
-
|
|
348
|
-
|
|
438
|
+
});
|
|
439
|
+
const toolbars = computed(() => {
|
|
440
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
441
|
+
if (!editor.value) return [];
|
|
349
442
|
const {
|
|
350
|
-
toggleBold
|
|
351
|
-
focus
|
|
352
|
-
toggleItalic
|
|
353
|
-
toggleUnderline
|
|
354
|
-
toggleBulletList
|
|
355
|
-
toggleCode
|
|
356
|
-
toggleOrderedList
|
|
357
|
-
unsetAllMarks
|
|
358
|
-
clearNodes
|
|
359
|
-
} =
|
|
443
|
+
toggleBold,
|
|
444
|
+
focus,
|
|
445
|
+
toggleItalic,
|
|
446
|
+
toggleUnderline,
|
|
447
|
+
toggleBulletList,
|
|
448
|
+
toggleCode,
|
|
449
|
+
toggleOrderedList,
|
|
450
|
+
unsetAllMarks,
|
|
451
|
+
clearNodes
|
|
452
|
+
} = editor.value.commands;
|
|
453
|
+
const isInlineCode = (_a = editor.value) == null ? void 0 : _a.isActive("code");
|
|
360
454
|
return [
|
|
361
455
|
{
|
|
362
456
|
label: "Aa",
|
|
363
457
|
iconPos: "right",
|
|
364
458
|
icon: "arrow-down",
|
|
365
459
|
class: "!gap-0 !w-[50px] !p-0 !m-0 [&_span]:leading-[22px]",
|
|
366
|
-
onClick: (
|
|
460
|
+
onClick: (_b = headingMenu.value) == null ? void 0 : _b.toggle
|
|
367
461
|
},
|
|
368
462
|
{
|
|
369
463
|
icon: "bold",
|
|
370
464
|
tooltipText: "Bold | Ctrl + B",
|
|
371
|
-
active: (
|
|
372
|
-
disabled:
|
|
465
|
+
active: (_c = editor.value) == null ? void 0 : _c.isActive("bold"),
|
|
466
|
+
disabled: isInlineCode,
|
|
373
467
|
onClick: () => {
|
|
374
|
-
|
|
468
|
+
focus();
|
|
469
|
+
toggleBold();
|
|
375
470
|
}
|
|
376
471
|
},
|
|
377
472
|
{
|
|
378
473
|
icon: "italic",
|
|
379
474
|
tooltipText: "Italic | Ctrl + I",
|
|
380
|
-
active: (
|
|
381
|
-
disabled:
|
|
475
|
+
active: (_d = editor.value) == null ? void 0 : _d.isActive("italic"),
|
|
476
|
+
disabled: isInlineCode,
|
|
382
477
|
onClick: () => {
|
|
383
|
-
|
|
478
|
+
focus();
|
|
479
|
+
toggleItalic();
|
|
384
480
|
}
|
|
385
481
|
},
|
|
386
482
|
{
|
|
387
483
|
icon: "underline",
|
|
388
484
|
class: "mr-3",
|
|
389
|
-
active: (
|
|
485
|
+
active: (_e = editor.value) == null ? void 0 : _e.isActive("underline"),
|
|
390
486
|
tooltipText: "Underline | Ctrl + U",
|
|
391
|
-
disabled:
|
|
487
|
+
disabled: isInlineCode,
|
|
392
488
|
onClick: () => {
|
|
393
|
-
|
|
489
|
+
focus();
|
|
490
|
+
toggleUnderline();
|
|
394
491
|
}
|
|
395
492
|
},
|
|
396
493
|
{
|
|
397
494
|
icon: "list-unordered",
|
|
398
495
|
tooltipText: "Bullet List | Ctrl + 7",
|
|
399
|
-
active: (
|
|
496
|
+
active: (_f = editor.value) == null ? void 0 : _f.isActive("bullet-list"),
|
|
400
497
|
onClick: () => {
|
|
401
|
-
|
|
498
|
+
focus();
|
|
499
|
+
toggleBulletList();
|
|
402
500
|
}
|
|
403
501
|
},
|
|
404
502
|
{
|
|
405
503
|
icon: "list-ordered",
|
|
406
504
|
tooltipText: "Numbered List | Ctrl + 8",
|
|
407
|
-
active: (
|
|
505
|
+
active: (_g = editor.value) == null ? void 0 : _g.isActive("ordered-list"),
|
|
408
506
|
class: "mr-3",
|
|
409
507
|
onClick: () => {
|
|
410
|
-
|
|
508
|
+
focus();
|
|
509
|
+
toggleOrderedList();
|
|
411
510
|
}
|
|
412
511
|
},
|
|
413
512
|
{
|
|
414
513
|
icon: "link-m",
|
|
415
514
|
tooltipText: "Link | Ctrl + K",
|
|
416
|
-
disabled: ((
|
|
417
|
-
onClick:
|
|
515
|
+
disabled: ((_h = editor.value) == null ? void 0 : _h.isActive("link")) || linkFormShown.value,
|
|
516
|
+
onClick: openLinkForm
|
|
418
517
|
},
|
|
419
518
|
{
|
|
420
519
|
icon: "image-add",
|
|
421
|
-
active: (
|
|
520
|
+
active: (_i = editor.value) == null ? void 0 : _i.isActive("image"),
|
|
422
521
|
tooltipText: "Image | Insert",
|
|
423
|
-
onClick: () =>
|
|
522
|
+
onClick: () => setImageDialog()
|
|
424
523
|
},
|
|
425
524
|
{
|
|
426
525
|
icon: "code-line",
|
|
427
|
-
active: (
|
|
526
|
+
active: (_j = editor.value) == null ? void 0 : _j.isActive("code"),
|
|
428
527
|
tooltipText: "Inline Code | Ctrl + E",
|
|
429
528
|
onClick: () => {
|
|
430
|
-
|
|
529
|
+
focus();
|
|
530
|
+
toggleCode();
|
|
431
531
|
}
|
|
432
532
|
},
|
|
433
533
|
{
|
|
434
534
|
icon: "code-box-line",
|
|
435
|
-
active: (
|
|
535
|
+
active: (_k = editor.value) == null ? void 0 : _k.isActive("codeSnippet"),
|
|
436
536
|
tooltipText: "Code Block | Ctrl + Alt + C",
|
|
437
537
|
onClick: () => {
|
|
438
|
-
|
|
538
|
+
codeSnippetTrigger();
|
|
439
539
|
}
|
|
440
540
|
},
|
|
441
541
|
{
|
|
442
542
|
icon: "format-clear",
|
|
443
543
|
tooltipText: "Clear Formatting Ctrl + \\",
|
|
444
|
-
disabled: !((
|
|
544
|
+
disabled: !((_l = editor.value) == null ? void 0 : _l.isActive("bold")) && !((_m = editor.value) == null ? void 0 : _m.isActive("underline")) && !((_n = editor.value) == null ? void 0 : _n.isActive("italic")) && !((_o = editor.value) == null ? void 0 : _o.isActive("code")) && !((_p = editor.value) == null ? void 0 : _p.isActive("heading")),
|
|
445
545
|
onClick: () => {
|
|
446
|
-
|
|
546
|
+
focus();
|
|
547
|
+
clearNodes();
|
|
548
|
+
unsetAllMarks();
|
|
447
549
|
}
|
|
448
550
|
}
|
|
449
551
|
];
|
|
450
|
-
})
|
|
552
|
+
});
|
|
553
|
+
const headings = shallowRef([
|
|
451
554
|
{
|
|
452
555
|
label: "Paragraf",
|
|
453
556
|
class: "p",
|
|
454
557
|
shortCut: "Ctrl+Alt+P",
|
|
455
558
|
command: () => {
|
|
456
|
-
var
|
|
457
|
-
(
|
|
559
|
+
var _a, _b;
|
|
560
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
561
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setParagraph();
|
|
458
562
|
}
|
|
459
563
|
},
|
|
460
564
|
{
|
|
@@ -462,8 +566,9 @@ const It = ke.create({
|
|
|
462
566
|
class: "heading-1",
|
|
463
567
|
shortCut: "Ctrl+Alt+1",
|
|
464
568
|
command: () => {
|
|
465
|
-
var
|
|
466
|
-
(
|
|
569
|
+
var _a, _b;
|
|
570
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
571
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 1 });
|
|
467
572
|
}
|
|
468
573
|
},
|
|
469
574
|
{
|
|
@@ -471,8 +576,9 @@ const It = ke.create({
|
|
|
471
576
|
class: "heading-2",
|
|
472
577
|
shortCut: "Ctrl+Alt+2",
|
|
473
578
|
command: () => {
|
|
474
|
-
var
|
|
475
|
-
(
|
|
579
|
+
var _a, _b;
|
|
580
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
581
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 2 });
|
|
476
582
|
}
|
|
477
583
|
},
|
|
478
584
|
{
|
|
@@ -480,8 +586,9 @@ const It = ke.create({
|
|
|
480
586
|
label: "Heading 3",
|
|
481
587
|
shortCut: "Ctrl+Alt+3",
|
|
482
588
|
command: () => {
|
|
483
|
-
var
|
|
484
|
-
(
|
|
589
|
+
var _a, _b;
|
|
590
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
591
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 3 });
|
|
485
592
|
}
|
|
486
593
|
},
|
|
487
594
|
{
|
|
@@ -489,8 +596,9 @@ const It = ke.create({
|
|
|
489
596
|
class: "heading-4",
|
|
490
597
|
shortCut: "Ctrl+Alt+4",
|
|
491
598
|
command: () => {
|
|
492
|
-
var
|
|
493
|
-
(
|
|
599
|
+
var _a, _b;
|
|
600
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
601
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 4 });
|
|
494
602
|
}
|
|
495
603
|
},
|
|
496
604
|
{
|
|
@@ -498,8 +606,9 @@ const It = ke.create({
|
|
|
498
606
|
class: "heading-5",
|
|
499
607
|
shortCut: "Ctrl+Alt+5",
|
|
500
608
|
command: () => {
|
|
501
|
-
var
|
|
502
|
-
(
|
|
609
|
+
var _a, _b;
|
|
610
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
611
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 5 });
|
|
503
612
|
}
|
|
504
613
|
},
|
|
505
614
|
{
|
|
@@ -507,180 +616,265 @@ const It = ke.create({
|
|
|
507
616
|
class: "heading-6",
|
|
508
617
|
shortCut: "Ctrl+Alt+6",
|
|
509
618
|
command: () => {
|
|
510
|
-
var
|
|
511
|
-
(
|
|
619
|
+
var _a, _b;
|
|
620
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
621
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setHeading({ level: 6 });
|
|
512
622
|
}
|
|
513
623
|
}
|
|
514
|
-
])
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
624
|
+
]);
|
|
625
|
+
const currentActiveLink = computed(() => {
|
|
626
|
+
var _a;
|
|
627
|
+
return (_a = editor.value) == null ? void 0 : _a.getAttributes("link");
|
|
628
|
+
});
|
|
629
|
+
const getInitialAnchorText = () => {
|
|
630
|
+
var _a;
|
|
631
|
+
const { href } = currentActiveLink.value;
|
|
632
|
+
const anchor = (_a = editor.value) == null ? void 0 : _a.view.dom.querySelector(`[href="${href}"]`);
|
|
633
|
+
return getSelectedText() || (anchor && (anchor == null ? void 0 : anchor.textContent) !== href ? anchor.textContent || void 0 : void 0);
|
|
634
|
+
};
|
|
635
|
+
const openLinkInNewTab = () => {
|
|
636
|
+
var _a;
|
|
637
|
+
window.open((_a = currentActiveLink.value) == null ? void 0 : _a.href, "_blank");
|
|
638
|
+
};
|
|
639
|
+
const copyLink = () => {
|
|
640
|
+
var _a;
|
|
641
|
+
window.navigator.clipboard.writeText((_a = currentActiveLink.value) == null ? void 0 : _a.href);
|
|
642
|
+
};
|
|
643
|
+
const unsetLinkFunction = () => {
|
|
644
|
+
var _a;
|
|
645
|
+
if (editor.value) {
|
|
646
|
+
const { unsetLink, focus } = ((_a = editor.value) == null ? void 0 : _a.commands) ?? {};
|
|
647
|
+
focus();
|
|
648
|
+
unsetLink();
|
|
532
649
|
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
650
|
+
};
|
|
651
|
+
const getSelectedText = () => {
|
|
652
|
+
if (editor.value) {
|
|
653
|
+
const { state } = editor.value;
|
|
654
|
+
const { from, to } = state.selection;
|
|
655
|
+
return state == null ? void 0 : state.doc.textBetween(from, to, " ");
|
|
537
656
|
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
657
|
+
};
|
|
658
|
+
const setImageDialog = () => {
|
|
659
|
+
imageDialogUploader.value = true;
|
|
660
|
+
return false;
|
|
661
|
+
};
|
|
662
|
+
const setPreviewImages = async (files) => {
|
|
663
|
+
if (props.isImageUploadBase64) {
|
|
664
|
+
const convertRes = await convertBase64(files[0]);
|
|
665
|
+
setImageFunction(convertRes);
|
|
666
|
+
} else {
|
|
667
|
+
emit("postImageLocal", {
|
|
668
|
+
image: files[0],
|
|
669
|
+
setImageCb: setImageFunction
|
|
546
670
|
});
|
|
547
|
-
}, Pe = (t) => {
|
|
548
|
-
const { files: e } = t.target;
|
|
549
|
-
le(e);
|
|
550
|
-
}, Ne = (t = {}) => {
|
|
551
|
-
if (typeof l.validatorMessage == "string" && l.invalid)
|
|
552
|
-
return l.validatorMessage;
|
|
553
|
-
if (typeof l.validatorMessage != "string") {
|
|
554
|
-
const { empty: e } = l.validatorMessage ?? {};
|
|
555
|
-
if (t.content === void 0 && l.mandatory && e)
|
|
556
|
-
return e ?? !0;
|
|
557
671
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
672
|
+
};
|
|
673
|
+
const changeImages = (event) => {
|
|
674
|
+
const { files } = event.target;
|
|
675
|
+
setPreviewImages(files);
|
|
676
|
+
};
|
|
677
|
+
const setValidatorMessage = (value = {}) => {
|
|
678
|
+
if (typeof props.validatorMessage === "string" && props.invalid) {
|
|
679
|
+
return props.validatorMessage;
|
|
680
|
+
} else if (typeof props.validatorMessage !== "string") {
|
|
681
|
+
const { empty } = props.validatorMessage ?? {};
|
|
682
|
+
if (value.content === void 0 && props.mandatory && empty) {
|
|
683
|
+
return empty ?? true;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return true;
|
|
687
|
+
};
|
|
688
|
+
const openLinkForm = (e) => {
|
|
689
|
+
var _a, _b, _c, _d;
|
|
690
|
+
const event = e ?? {
|
|
691
|
+
currentTarget: (_b = (_a = root.value) == null ? void 0 : _a.querySelector(".ic-link-m")) == null ? void 0 : _b.closest("button")
|
|
692
|
+
};
|
|
693
|
+
const { dom } = ((_c = editor.value) == null ? void 0 : _c.view) ?? {};
|
|
694
|
+
(_d = editLinkOverlay.value) == null ? void 0 : _d.toggle(event, dom);
|
|
695
|
+
return true;
|
|
696
|
+
};
|
|
697
|
+
const setLinkFunction = ({ formValues }) => {
|
|
698
|
+
var _a, _b;
|
|
699
|
+
if (!editor.value) return false;
|
|
700
|
+
const { setLink, insertContent, focus } = editor.value.commands;
|
|
701
|
+
const { url, text } = formValues;
|
|
702
|
+
const { state } = editor.value;
|
|
703
|
+
focus();
|
|
704
|
+
setLink({
|
|
705
|
+
href: url,
|
|
571
706
|
target: "_blank",
|
|
572
707
|
rel: "nofollow"
|
|
573
|
-
})
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
708
|
+
});
|
|
709
|
+
if ((_a = editor.value) == null ? void 0 : _a.isActive("link")) {
|
|
710
|
+
editor.value.chain().focus().command(({ tr, state: currState }) => {
|
|
711
|
+
const { $from, $to } = currState.selection;
|
|
712
|
+
const linkMark = state.schema.marks.link;
|
|
713
|
+
let start = $from.start(), end = $to.end();
|
|
714
|
+
state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {
|
|
715
|
+
if (node.isText && node.marks.some((mark) => mark.type === linkMark)) {
|
|
716
|
+
start = Math.min(start, pos);
|
|
717
|
+
end = Math.max(end, pos + node.nodeSize);
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
tr.insertText(text || url, start, end);
|
|
721
|
+
return true;
|
|
722
|
+
}).run();
|
|
723
|
+
} else if (state.selection.empty) {
|
|
724
|
+
insertContent(text || url);
|
|
725
|
+
}
|
|
726
|
+
(_b = editLinkOverlay.value) == null ? void 0 : _b.hide();
|
|
727
|
+
linkFormShown.value = false;
|
|
728
|
+
return true;
|
|
729
|
+
};
|
|
730
|
+
const setImageFunction = (imageUrl) => {
|
|
731
|
+
var _a, _b, _c, _d;
|
|
732
|
+
(_a = editor.value) == null ? void 0 : _a.commands.focus();
|
|
733
|
+
if (imageUrl) {
|
|
734
|
+
if (props.isImageUploadBase64) {
|
|
735
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setImage({
|
|
736
|
+
src: imageUrl,
|
|
737
|
+
title: "localImageBase64"
|
|
738
|
+
});
|
|
739
|
+
} else {
|
|
740
|
+
(_c = editor.value) == null ? void 0 : _c.commands.setImage({ src: imageUrl, title: "localImage" });
|
|
741
|
+
}
|
|
742
|
+
previewImages.value = Array.from(
|
|
743
|
+
/* @__PURE__ */ new Set([...previewImages.value, imageUrl])
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
if (inputURLImage.value) {
|
|
747
|
+
(_d = editor.value) == null ? void 0 : _d.commands.setImage({ src: inputURLImage.value });
|
|
748
|
+
previewImages.value = Array.from(
|
|
749
|
+
/* @__PURE__ */ new Set([...previewImages.value, inputURLImage.value])
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
inputURLImage.value = void 0;
|
|
753
|
+
goToNextLine();
|
|
754
|
+
};
|
|
755
|
+
const unsetImage = () => {
|
|
756
|
+
var _a;
|
|
757
|
+
if (selectedImage.value && selectedImage.value.title === "localImage") {
|
|
758
|
+
emit("deleteImageLocal", selectedImage.value);
|
|
759
|
+
}
|
|
760
|
+
(_a = editor.value) == null ? void 0 : _a.commands.deleteSelection();
|
|
761
|
+
};
|
|
762
|
+
const convertBase64 = (file) => {
|
|
763
|
+
return new Promise((resolve, reject) => {
|
|
764
|
+
const fileReader = new FileReader();
|
|
765
|
+
fileReader.readAsDataURL(file);
|
|
766
|
+
fileReader.onload = () => {
|
|
767
|
+
resolve(fileReader.result);
|
|
768
|
+
};
|
|
769
|
+
fileReader.onerror = (error) => {
|
|
770
|
+
reject(error);
|
|
771
|
+
};
|
|
772
|
+
});
|
|
773
|
+
};
|
|
774
|
+
const fetchMentionSuggestionFunction = async () => {
|
|
775
|
+
if (props.fetchMentionSuggestionFunction) {
|
|
776
|
+
isLoading.value = !isLoading.value;
|
|
603
777
|
try {
|
|
604
|
-
const { data
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
778
|
+
const { data } = await props.fetchMentionSuggestionFunction() ?? {};
|
|
779
|
+
mentionSuggestionList.value = data;
|
|
780
|
+
isLoading.value = !isLoading.value;
|
|
781
|
+
} catch (error) {
|
|
782
|
+
console.error(error);
|
|
608
783
|
}
|
|
609
784
|
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
785
|
+
};
|
|
786
|
+
const codeSnippetTrigger = () => {
|
|
787
|
+
var _a, _b;
|
|
788
|
+
const { insertCodeSnippet, deleteCodeSnippet } = (_a = editor.value) == null ? void 0 : _a.commands;
|
|
789
|
+
if ((_b = editor.value) == null ? void 0 : _b.isActive("codeSnippet")) {
|
|
790
|
+
deleteCodeSnippet();
|
|
791
|
+
} else {
|
|
792
|
+
insertCodeSnippet();
|
|
793
|
+
}
|
|
794
|
+
return false;
|
|
795
|
+
};
|
|
796
|
+
const goToNextLine = () => {
|
|
797
|
+
editor.value.commands.createParagraphNear();
|
|
798
|
+
};
|
|
799
|
+
const mentionSectionTrigger = (title) => {
|
|
800
|
+
var _a;
|
|
618
801
|
try {
|
|
619
|
-
const { insertMentionSection
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
802
|
+
const { insertMentionSection } = (_a = editor.value) == null ? void 0 : _a.commands;
|
|
803
|
+
insertMentionSection(title);
|
|
804
|
+
if (mentionSectionTitle.value !== title && mentionSectionTitle.value !== void 0) {
|
|
805
|
+
editorLoading();
|
|
806
|
+
}
|
|
807
|
+
mentionSectionTitle.value = title;
|
|
808
|
+
} catch (error) {
|
|
809
|
+
console.error(error);
|
|
623
810
|
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
811
|
+
};
|
|
812
|
+
const editorLoading = () => {
|
|
813
|
+
isLoading.value = true;
|
|
814
|
+
setTimeout(() => {
|
|
815
|
+
isLoading.value = false;
|
|
627
816
|
}, 100);
|
|
628
817
|
};
|
|
629
|
-
|
|
630
|
-
mentionSectionTrigger
|
|
631
|
-
})
|
|
632
|
-
|
|
818
|
+
__expose({
|
|
819
|
+
mentionSectionTrigger
|
|
820
|
+
});
|
|
821
|
+
watch(
|
|
822
|
+
() => props.invalid,
|
|
633
823
|
() => {
|
|
634
|
-
var
|
|
635
|
-
(
|
|
824
|
+
var _a;
|
|
825
|
+
(_a = field.validate) == null ? void 0 : _a.call(field);
|
|
636
826
|
}
|
|
637
|
-
)
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
"
|
|
827
|
+
);
|
|
828
|
+
watch(registeredMentionList, () => {
|
|
829
|
+
modelMentionedList.value = registeredMentionList.value;
|
|
830
|
+
});
|
|
831
|
+
return (_ctx, _cache) => {
|
|
832
|
+
const _directive_focus = resolveDirective("focus");
|
|
833
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
834
|
+
createVNode(_sfc_main$4, {
|
|
835
|
+
info: _ctx.fieldInfo,
|
|
836
|
+
label: props.label,
|
|
837
|
+
"label-class": props.labelClass,
|
|
838
|
+
mandatory: props.mandatory,
|
|
839
|
+
"show-optional-text": props.showOptionalText
|
|
648
840
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
|
|
841
|
+
default: withCtx(() => [
|
|
842
|
+
createElementVNode("div", {
|
|
651
843
|
ref_key: "root",
|
|
652
|
-
ref:
|
|
653
|
-
class:
|
|
844
|
+
ref: root,
|
|
845
|
+
class: normalizeClass([
|
|
654
846
|
"rounded-b text-grayscale-900 w-full",
|
|
655
847
|
"[&:has(:focus)]:border-general-200 border-general-100",
|
|
656
|
-
`${
|
|
848
|
+
`${_ctx.borderLess || _ctx.editorState === "readonly" ? "border-none" : "border-[0.5px]"}`,
|
|
657
849
|
// Inline Code
|
|
658
850
|
"[&_code]:bg-primary-100",
|
|
659
851
|
"[&_code]:rounded-md",
|
|
660
852
|
"[&_code]:p-[0.25em_0.3em]",
|
|
661
853
|
"[&_code]:text-[0.85rem]",
|
|
662
854
|
"[&_code]:!font-source-code-pro",
|
|
663
|
-
`${
|
|
855
|
+
`${props.editorWrapperClass}`
|
|
664
856
|
]),
|
|
665
857
|
"data-wv-name": "editor"
|
|
666
858
|
}, [
|
|
667
|
-
|
|
859
|
+
props.editorState === "editable" ? (openBlock(), createElementBlock("div", {
|
|
668
860
|
key: 0,
|
|
669
|
-
class:
|
|
861
|
+
class: normalizeClass([
|
|
670
862
|
"border-b-[0.5px] border-inherit px-3 py-1 flex gap-1 bg-general-50",
|
|
671
|
-
`${
|
|
863
|
+
`${props.toolbarWrapperClass}`
|
|
672
864
|
]),
|
|
673
865
|
"data-wv-section": "toolbar"
|
|
674
866
|
}, [
|
|
675
|
-
(
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
867
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(toolbars.value, (tool) => {
|
|
868
|
+
return openBlock(), createBlock(_sfc_main$5, mergeProps({ ref_for: true }, tool, {
|
|
869
|
+
key: tool.icon,
|
|
870
|
+
class: [{ "!bg-primary-50 ": tool.active }, tool.class]
|
|
871
|
+
}), null, 16, ["class"]);
|
|
872
|
+
}), 128))
|
|
873
|
+
], 2)) : createCommentVNode("", true),
|
|
874
|
+
!isLoading.value ? (openBlock(), createBlock(unref(EditorContent), {
|
|
681
875
|
key: 1,
|
|
682
|
-
class:
|
|
683
|
-
`${
|
|
876
|
+
class: normalizeClass([
|
|
877
|
+
`${props.editorState === "editable" ? "px-3 py-2" : ""} [&_*]:outline-none`,
|
|
684
878
|
"[&_.is-editor-empty:first-child::before]:text-general-200",
|
|
685
879
|
"[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]",
|
|
686
880
|
"[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]",
|
|
@@ -703,57 +897,57 @@ const It = ke.create({
|
|
|
703
897
|
"[&_img]:my-2",
|
|
704
898
|
// Inline Code
|
|
705
899
|
"[&_*:has(code)]:my-[0.25rem]",
|
|
706
|
-
`${
|
|
900
|
+
`${props.contentWrapperClass}`
|
|
707
901
|
]),
|
|
708
|
-
editor:
|
|
902
|
+
editor: unref(editor),
|
|
709
903
|
spellcheck: "false"
|
|
710
|
-
}, null, 8, ["class", "editor"])),
|
|
711
|
-
|
|
904
|
+
}, null, 8, ["class", "editor"])) : createCommentVNode("", true),
|
|
905
|
+
createVNode(unref(script), {
|
|
712
906
|
ref_key: "headingMenu",
|
|
713
|
-
ref:
|
|
714
|
-
model:
|
|
907
|
+
ref: headingMenu,
|
|
908
|
+
model: headings.value,
|
|
715
909
|
popup: ""
|
|
716
910
|
}, {
|
|
717
|
-
item:
|
|
718
|
-
var
|
|
911
|
+
item: withCtx(({ item }) => {
|
|
912
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
719
913
|
return [
|
|
720
|
-
|
|
721
|
-
class:
|
|
722
|
-
...(
|
|
723
|
-
|
|
914
|
+
createElementVNode("a", {
|
|
915
|
+
class: normalizeClass([
|
|
916
|
+
...(_a = unref(MenuPreset)) == null ? void 0 : _a.action.class,
|
|
917
|
+
item.class,
|
|
724
918
|
"flex items-center !justify-between h-[30px]",
|
|
725
919
|
{
|
|
726
|
-
"bg-primary-50": ((
|
|
920
|
+
"bg-primary-50": ((_b = unref(editor)) == null ? void 0 : _b.isActive("heading", { level: 1 })) && item.label === "Heading 1" || ((_c = unref(editor)) == null ? void 0 : _c.isActive("heading", { level: 2 })) && item.label === "Heading 2" || ((_d = unref(editor)) == null ? void 0 : _d.isActive("heading", { level: 3 })) && item.label === "Heading 3" || ((_e = unref(editor)) == null ? void 0 : _e.isActive("heading", { level: 4 })) && item.label === "Heading 4" || ((_f = unref(editor)) == null ? void 0 : _f.isActive("heading", { level: 5 })) && item.label === "Heading 5" || ((_g = unref(editor)) == null ? void 0 : _g.isActive("heading", { level: 6 })) && item.label === "Heading 6" || ((_h = unref(editor)) == null ? void 0 : _h.isActive("paragraph")) && item.label === "Paragraf"
|
|
727
921
|
}
|
|
728
922
|
]),
|
|
729
|
-
title:
|
|
730
|
-
onClick: (
|
|
731
|
-
var
|
|
732
|
-
return (
|
|
923
|
+
title: item.label,
|
|
924
|
+
onClick: ($event) => {
|
|
925
|
+
var _a2;
|
|
926
|
+
return (_a2 = item.command) == null ? void 0 : _a2.call(item, { item, originalEvent: $event });
|
|
733
927
|
}
|
|
734
928
|
}, [
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
], 10,
|
|
929
|
+
createTextVNode(toDisplayString(item.label) + " ", 1),
|
|
930
|
+
createElementVNode("code", _hoisted_2, toDisplayString(item.shortCut), 1)
|
|
931
|
+
], 10, _hoisted_1)
|
|
738
932
|
];
|
|
739
933
|
}),
|
|
740
934
|
_: 1
|
|
741
935
|
}, 8, ["model"]),
|
|
742
|
-
|
|
936
|
+
unref(editor) && props.editorState === "editable" ? (openBlock(), createBlock(unref(FloatingMenu$1), {
|
|
743
937
|
key: 2,
|
|
744
|
-
editor:
|
|
938
|
+
editor: unref(editor),
|
|
745
939
|
"should-show": () => {
|
|
746
|
-
var
|
|
747
|
-
return ((
|
|
940
|
+
var _a, _b;
|
|
941
|
+
return ((_a = unref(editor)) == null ? void 0 : _a.isActive("codeSnippet")) || ((_b = unref(editor)) == null ? void 0 : _b.isActive("mentionSection"));
|
|
748
942
|
},
|
|
749
943
|
"tippy-options": { placement: "top", zIndex: 9 },
|
|
750
944
|
class: "-mt-1.5 shadow-panel",
|
|
751
945
|
"plugin-key": "editLinkToolbar"
|
|
752
946
|
}, {
|
|
753
|
-
default:
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
onClick:
|
|
947
|
+
default: withCtx(() => [
|
|
948
|
+
createElementVNode("div", _hoisted_3, [
|
|
949
|
+
createVNode(_sfc_main$5, {
|
|
950
|
+
onClick: goToNextLine,
|
|
757
951
|
icon: "close",
|
|
758
952
|
severity: "secondary",
|
|
759
953
|
text: "",
|
|
@@ -762,46 +956,46 @@ const It = ke.create({
|
|
|
762
956
|
])
|
|
763
957
|
]),
|
|
764
958
|
_: 1
|
|
765
|
-
}, 8, ["editor", "should-show"])) :
|
|
766
|
-
|
|
959
|
+
}, 8, ["editor", "should-show"])) : createCommentVNode("", true),
|
|
960
|
+
unref(editor) && !linkFormShown.value && props.editorState === "editable" ? (openBlock(), createBlock(unref(FloatingMenu$1), {
|
|
767
961
|
key: 3,
|
|
768
|
-
editor:
|
|
962
|
+
editor: unref(editor),
|
|
769
963
|
"should-show": () => {
|
|
770
|
-
var
|
|
771
|
-
return (
|
|
964
|
+
var _a;
|
|
965
|
+
return (_a = unref(editor)) == null ? void 0 : _a.isActive("link");
|
|
772
966
|
},
|
|
773
967
|
"tippy-options": { placement: "bottom", zIndex: 9 },
|
|
774
968
|
class: "-mt-1.5 shadow-panel",
|
|
775
969
|
"plugin-key": "editLinkToolbar"
|
|
776
970
|
}, {
|
|
777
|
-
default:
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
onClick:
|
|
971
|
+
default: withCtx(() => [
|
|
972
|
+
createElementVNode("div", _hoisted_4, [
|
|
973
|
+
createVNode(_sfc_main$5, {
|
|
974
|
+
onClick: openLinkForm,
|
|
781
975
|
class: "!w-max",
|
|
782
976
|
label: "Edit Tautan",
|
|
783
977
|
severity: "secondary",
|
|
784
978
|
text: ""
|
|
785
979
|
}),
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
onClick:
|
|
980
|
+
_cache[4] || (_cache[4] = createElementVNode("span", { class: "separator" }, null, -1)),
|
|
981
|
+
createVNode(_sfc_main$5, {
|
|
982
|
+
onClick: openLinkInNewTab,
|
|
789
983
|
icon: "external-link",
|
|
790
984
|
severity: "secondary",
|
|
791
985
|
text: "",
|
|
792
986
|
"tooltip-text": "Buka di tab baru"
|
|
793
987
|
}),
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
onClick:
|
|
988
|
+
_cache[5] || (_cache[5] = createElementVNode("span", { class: "separator" }, null, -1)),
|
|
989
|
+
createVNode(_sfc_main$5, {
|
|
990
|
+
onClick: unsetLinkFunction,
|
|
797
991
|
icon: "link-unlink-m",
|
|
798
992
|
severity: "secondary",
|
|
799
993
|
text: "",
|
|
800
994
|
"tooltip-text": "Lepas tautan"
|
|
801
995
|
}),
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
onClick:
|
|
996
|
+
_cache[6] || (_cache[6] = createElementVNode("span", { class: "separator" }, null, -1)),
|
|
997
|
+
createVNode(_sfc_main$5, {
|
|
998
|
+
onClick: copyLink,
|
|
805
999
|
icon: "file-copy",
|
|
806
1000
|
severity: "secondary",
|
|
807
1001
|
text: "",
|
|
@@ -810,53 +1004,55 @@ const It = ke.create({
|
|
|
810
1004
|
])
|
|
811
1005
|
]),
|
|
812
1006
|
_: 1
|
|
813
|
-
}, 8, ["editor", "should-show"])) :
|
|
814
|
-
|
|
815
|
-
visible:
|
|
816
|
-
"onUpdate:visible":
|
|
1007
|
+
}, 8, ["editor", "should-show"])) : createCommentVNode("", true),
|
|
1008
|
+
createVNode(_sfc_main$6, {
|
|
1009
|
+
visible: imageDialogUploader.value,
|
|
1010
|
+
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => imageDialogUploader.value = $event),
|
|
817
1011
|
class: "w-[400px]",
|
|
818
1012
|
header: "Pilih Gambar"
|
|
819
1013
|
}, {
|
|
820
|
-
default:
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
"model-value":
|
|
826
|
-
"onUpdate:modelValue":
|
|
1014
|
+
default: withCtx(() => [
|
|
1015
|
+
createElementVNode("div", _hoisted_5, [
|
|
1016
|
+
createElementVNode("div", _hoisted_6, [
|
|
1017
|
+
createElementVNode("div", _hoisted_7, [
|
|
1018
|
+
createVNode(_sfc_main$7, {
|
|
1019
|
+
"model-value": inputURLImage.value,
|
|
1020
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputURLImage.value = $event),
|
|
827
1021
|
class: "w-[269px]",
|
|
828
1022
|
label: "URL Gambar"
|
|
829
1023
|
}, null, 8, ["model-value"])
|
|
830
1024
|
]),
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
onClick:
|
|
1025
|
+
createElementVNode("div", _hoisted_8, [
|
|
1026
|
+
createVNode(_sfc_main$8, {
|
|
1027
|
+
onClick: _cache[1] || (_cache[1] = ($event) => setImageFunction()),
|
|
834
1028
|
label: "Simpan",
|
|
835
1029
|
severity: "secondary"
|
|
836
1030
|
})
|
|
837
1031
|
])
|
|
838
1032
|
]),
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
(
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1033
|
+
createElementVNode("div", null, [
|
|
1034
|
+
_cache[8] || (_cache[8] = createElementVNode("p", null, "Baru Saja Ditambahkan", -1)),
|
|
1035
|
+
createElementVNode("div", _hoisted_9, [
|
|
1036
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(previewImages.value, (previewImage, index) => {
|
|
1037
|
+
return openBlock(), createElementBlock("img", {
|
|
1038
|
+
key: index,
|
|
1039
|
+
src: previewImage,
|
|
1040
|
+
alt: "preview",
|
|
1041
|
+
class: "w-28 h-28 object-scale-down rounded-lg"
|
|
1042
|
+
}, null, 8, _hoisted_10);
|
|
1043
|
+
}), 128)),
|
|
1044
|
+
createElementVNode("div", _hoisted_11, [
|
|
1045
|
+
createVNode(_sfc_main$9, {
|
|
850
1046
|
class: "!w-[70px] !h-[70px]",
|
|
851
1047
|
icon: "upload-2",
|
|
852
1048
|
severity: "primary"
|
|
853
1049
|
}),
|
|
854
|
-
|
|
855
|
-
default:
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
onChange:
|
|
1050
|
+
createVNode(_sfc_main$8, { severity: "secondary" }, {
|
|
1051
|
+
default: withCtx(() => [
|
|
1052
|
+
createElementVNode("div", _hoisted_12, [
|
|
1053
|
+
_cache[7] || (_cache[7] = createElementVNode("p", null, "Cari Gambar", -1)),
|
|
1054
|
+
createElementVNode("input", {
|
|
1055
|
+
onChange: changeImages,
|
|
860
1056
|
class: "opacity-0 absolute top-0 bottom-0 left-0 right-0",
|
|
861
1057
|
type: "file"
|
|
862
1058
|
}, null, 32)
|
|
@@ -871,21 +1067,21 @@ const It = ke.create({
|
|
|
871
1067
|
]),
|
|
872
1068
|
_: 1
|
|
873
1069
|
}, 8, ["visible"]),
|
|
874
|
-
|
|
1070
|
+
unref(editor) && props.editorState === "editable" ? (openBlock(), createBlock(unref(FloatingMenu$1), {
|
|
875
1071
|
key: 4,
|
|
876
|
-
editor:
|
|
1072
|
+
editor: unref(editor),
|
|
877
1073
|
"should-show": () => {
|
|
878
|
-
var
|
|
879
|
-
return !!((
|
|
1074
|
+
var _a;
|
|
1075
|
+
return !!((_a = unref(editor)) == null ? void 0 : _a.isActive("image"));
|
|
880
1076
|
},
|
|
881
1077
|
"tippy-options": { placement: "top", zIndex: 9 },
|
|
882
1078
|
class: "-mt-1.5 shadow-panel",
|
|
883
1079
|
"plugin-key": "editImageToolbar"
|
|
884
1080
|
}, {
|
|
885
|
-
default:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
onClick:
|
|
1081
|
+
default: withCtx(() => [
|
|
1082
|
+
createElementVNode("div", _hoisted_13, [
|
|
1083
|
+
createVNode(_sfc_main$5, {
|
|
1084
|
+
onClick: unsetImage,
|
|
889
1085
|
icon: "delete-bin",
|
|
890
1086
|
severity: "secondary",
|
|
891
1087
|
text: "",
|
|
@@ -894,56 +1090,56 @@ const It = ke.create({
|
|
|
894
1090
|
])
|
|
895
1091
|
]),
|
|
896
1092
|
_: 1
|
|
897
|
-
}, 8, ["editor", "should-show"])) :
|
|
1093
|
+
}, 8, ["editor", "should-show"])) : createCommentVNode("", true)
|
|
898
1094
|
], 2),
|
|
899
|
-
|
|
900
|
-
class:
|
|
901
|
-
message:
|
|
1095
|
+
createVNode(_sfc_main$a, {
|
|
1096
|
+
class: normalizeClass(_ctx.validatorMessageClass),
|
|
1097
|
+
message: field.errorMessage
|
|
902
1098
|
}, null, 8, ["class", "message"])
|
|
903
1099
|
]),
|
|
904
1100
|
_: 1
|
|
905
1101
|
}, 8, ["info", "label", "label-class", "mandatory", "show-optional-text"]),
|
|
906
|
-
|
|
1102
|
+
createVNode(_sfc_main$b, {
|
|
907
1103
|
ref_key: "editLinkOverlay",
|
|
908
|
-
ref:
|
|
1104
|
+
ref: editLinkOverlay,
|
|
909
1105
|
pt: {
|
|
910
1106
|
content: {
|
|
911
1107
|
class: ""
|
|
912
1108
|
}
|
|
913
1109
|
},
|
|
914
|
-
onHide:
|
|
1110
|
+
onHide: _cache[3] || (_cache[3] = ($event) => linkFormShown.value = false),
|
|
915
1111
|
"append-to": "self",
|
|
916
1112
|
class: "w-[342px] bg-white p-4"
|
|
917
1113
|
}, {
|
|
918
|
-
default:
|
|
919
|
-
c
|
|
920
|
-
onSubmit:
|
|
1114
|
+
default: withCtx(() => [
|
|
1115
|
+
createVNode(_sfc_main$c, {
|
|
1116
|
+
onSubmit: setLinkFunction,
|
|
921
1117
|
class: "!gap-0",
|
|
922
1118
|
"hide-stay-checkbox": ""
|
|
923
1119
|
}, {
|
|
924
|
-
fields:
|
|
925
|
-
var
|
|
1120
|
+
fields: withCtx(() => {
|
|
1121
|
+
var _a, _b;
|
|
926
1122
|
return [
|
|
927
|
-
|
|
1123
|
+
withDirectives(createVNode(_sfc_main$7, {
|
|
928
1124
|
"validator-message": { empty: "Masukan tautan yang valid" },
|
|
929
|
-
value: (
|
|
1125
|
+
value: (_a = currentActiveLink.value) == null ? void 0 : _a.href,
|
|
930
1126
|
"field-name": "url",
|
|
931
1127
|
label: "Tempel Tautan",
|
|
932
1128
|
mandatory: "",
|
|
933
1129
|
placeholder: "Tempel tautan baru",
|
|
934
1130
|
"use-validator": ""
|
|
935
1131
|
}, null, 8, ["value"]), [
|
|
936
|
-
[
|
|
1132
|
+
[_directive_focus]
|
|
937
1133
|
]),
|
|
938
|
-
|
|
939
|
-
value:
|
|
1134
|
+
createVNode(_sfc_main$d, {
|
|
1135
|
+
value: getInitialAnchorText(),
|
|
940
1136
|
"field-name": "text",
|
|
941
1137
|
label: "Teks Tampilan",
|
|
942
1138
|
placeholder: "Teks untuk ditampilkan",
|
|
943
1139
|
"use-validator": ""
|
|
944
1140
|
}, null, 8, ["value"]),
|
|
945
|
-
|
|
946
|
-
label: (
|
|
1141
|
+
createVNode(_sfc_main$8, {
|
|
1142
|
+
label: ((_b = unref(editor)) == null ? void 0 : _b.isActive("link")) ? "Simpan" : "Tambahkan",
|
|
947
1143
|
class: "w-max ml-auto",
|
|
948
1144
|
severity: "secondary",
|
|
949
1145
|
type: "submit"
|
|
@@ -960,5 +1156,5 @@ const It = ke.create({
|
|
|
960
1156
|
}
|
|
961
1157
|
});
|
|
962
1158
|
export {
|
|
963
|
-
|
|
1159
|
+
_sfc_main as _
|
|
964
1160
|
};
|