@hkyhy/marsun-components-core 0.1.89 → 0.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/components/Audit/AuditLogList.d.ts +27 -0
- package/dist/components/Audit/AuditLogList.js +272 -0
- package/dist/components/Audit/AuditLogList.js.map +1 -0
- package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
- package/dist/components/Audit/formatAuditCurl.js +115 -0
- package/dist/components/Audit/formatAuditCurl.js.map +1 -0
- package/dist/components/Audit/formatAuditJson.d.ts +15 -0
- package/dist/components/Audit/formatAuditJson.js +135 -0
- package/dist/components/Audit/formatAuditJson.js.map +1 -0
- package/dist/components/Audit/index.d.ts +3 -0
- package/dist/components/Audit/style.module.scss.js +30 -0
- package/dist/components/Audit/style.module.scss.js.map +1 -0
- package/dist/components/Audit/types.d.ts +39 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.d.ts +13 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.js +36 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.d.ts +21 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.js +80 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/levelLegend.module.scss.js +10 -0
- package/dist/components/Disposition/AlertDispositionPanel/levelLegend.module.scss.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/style.module.scss.js +11 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.d.ts +51 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.js +26 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.js.map +1 -0
- package/dist/components/Disposition/DispositionBar/index.js.map +1 -0
- package/dist/components/Disposition/DispositionBar/style.module.scss.js.map +1 -0
- package/dist/components/Disposition/index.d.ts +4 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
- package/dist/components/Editor/VariablePicker.d.ts +19 -0
- package/dist/components/Editor/VariablePicker.js +55 -0
- package/dist/components/Editor/VariablePicker.js.map +1 -0
- package/dist/components/Editor/index.d.ts +7 -0
- package/dist/components/Editor/index.js +21 -0
- package/dist/components/Editor/index.js.map +1 -0
- package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
- package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
- package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
- package/dist/components/Editor/variableMention.d.ts +37 -0
- package/dist/components/Editor/variableMention.js +64 -0
- package/dist/components/Editor/variableMention.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
- package/dist/components/FormInfo/RichTextField/index.js +82 -0
- package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +5 -0
- package/dist/components/FormInfo/fields.js +32 -23
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +4 -0
- package/dist/components/StateBar/StateBar.d.ts +19 -6
- package/dist/components/StateBar/StateBar.js +87 -50
- package/dist/components/StateBar/StateBar.js.map +1 -1
- package/dist/components/StateBar/style.module.scss.js +13 -10
- package/dist/components/StateBar/style.module.scss.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
- package/dist/components/Tools/Inbox/index.d.ts +2 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
- package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
- package/dist/components/Tools/index.d.ts +5 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/editor.d.ts +5 -0
- package/dist/editor.js +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/form-info.js +33 -29
- package/dist/form-info.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +799 -759
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +4 -1
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
- package/dist/styles/global.css +4 -1
- package/dist/utils/copyText.d.ts +4 -0
- package/dist/utils/copyText.js +21 -0
- package/dist/utils/copyText.js.map +1 -0
- package/package.json +9 -1
- package/dist/components/DispositionBar/index.js.map +0 -1
- /package/dist/components/{DispositionBar → Disposition/AlertDispositionPanel}/style.module.scss.js.map +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/index.d.ts +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/index.js +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/style.module.scss.js +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as K, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as i, useMemo as N } from "react";
|
|
3
|
+
import "../../../node_modules/@ckeditor/ckeditor5-utils/dist/index.js";
|
|
4
|
+
import "../../../node_modules/@ckeditor/ckeditor5-engine/dist/index.js";
|
|
5
|
+
import { Bold as x, Italic as R } from "../../../node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js";
|
|
6
|
+
import { Widget as T } from "../../../node_modules/@ckeditor/ckeditor5-widget/dist/index.js";
|
|
7
|
+
import { Undo as $ } from "../../../node_modules/@ckeditor/ckeditor5-undo/dist/index.js";
|
|
8
|
+
import { ClassicEditor as W } from "../../../node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js";
|
|
9
|
+
import { Essentials as k } from "../../../node_modules/@ckeditor/ckeditor5-essentials/dist/index.js";
|
|
10
|
+
import { Paragraph as v } from "../../../node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js";
|
|
11
|
+
import { List as P } from "../../../node_modules/@ckeditor/ckeditor5-list/dist/index.js";
|
|
12
|
+
import "../../../node_modules/@ckeditor/ckeditor5-mention/dist/index.js";
|
|
13
|
+
import { CKEditor as b } from "../../../node_modules/@ckeditor/ckeditor5-react/dist/index.js";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import { wrapVarTokensForDisplay as q } from "../variableMention.js";
|
|
16
|
+
import { MsgVarWidget as w, insertMsgVar as B } from "../msgVarTokenPlugin.js";
|
|
17
|
+
import { VariablePicker as F } from "../VariablePicker.js";
|
|
18
|
+
import t from "./style.module.scss.js";
|
|
19
|
+
const or = ({
|
|
20
|
+
value: n = "",
|
|
21
|
+
onChange: d,
|
|
22
|
+
disabled: a = !1,
|
|
23
|
+
readOnly: l = !1,
|
|
24
|
+
placeholder: f,
|
|
25
|
+
minHeight: E = 140,
|
|
26
|
+
className: p,
|
|
27
|
+
enableVariableMention: o = !1,
|
|
28
|
+
variables: L,
|
|
29
|
+
catalogError: C
|
|
30
|
+
}) => {
|
|
31
|
+
const u = i(null), g = i(null), e = i(d);
|
|
32
|
+
e.current = d;
|
|
33
|
+
const c = i(!1), D = i(
|
|
34
|
+
o ? q(n || "") : n || ""
|
|
35
|
+
), j = N(() => ({
|
|
36
|
+
licenseKey: "GPL",
|
|
37
|
+
toolbar: ["undo", "redo", "|", "bold", "italic", "|", "bulletedList", "numberedList"],
|
|
38
|
+
placeholder: f,
|
|
39
|
+
plugins: o ? [k, v, x, R, P, $, T, w] : [k, v, x, R, P, $]
|
|
40
|
+
}), [o, f]), h = a || l;
|
|
41
|
+
return /* @__PURE__ */ K(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
ref: u,
|
|
45
|
+
className: p ? `${t.root} ${t["rich-text-editor"]} ${p}` : `${t.root} ${t["rich-text-editor"]}`,
|
|
46
|
+
style: { "--rte-min-height": `${E}px` },
|
|
47
|
+
"data-disabled": a ? "1" : "0",
|
|
48
|
+
"data-readonly": l ? "1" : "0",
|
|
49
|
+
"data-var-mention": o ? "1" : "0",
|
|
50
|
+
children: [
|
|
51
|
+
o ? /* @__PURE__ */ m("div", { className: t["var-toolbar"], children: /* @__PURE__ */ m(
|
|
52
|
+
F,
|
|
53
|
+
{
|
|
54
|
+
variables: L,
|
|
55
|
+
catalogError: C,
|
|
56
|
+
disabled: h,
|
|
57
|
+
getPopupContainer: () => u.current || document.body,
|
|
58
|
+
onPick: (r) => {
|
|
59
|
+
const s = g.current;
|
|
60
|
+
s && B(s, r);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
) }) : null,
|
|
64
|
+
/* @__PURE__ */ m("div", { className: t["editor-host"], children: /* @__PURE__ */ m(
|
|
65
|
+
b,
|
|
66
|
+
{
|
|
67
|
+
editor: W,
|
|
68
|
+
config: j,
|
|
69
|
+
disabled: h,
|
|
70
|
+
onReady: (r) => {
|
|
71
|
+
g.current = r, c.current = !0;
|
|
72
|
+
try {
|
|
73
|
+
r.setData(D.current);
|
|
74
|
+
} finally {
|
|
75
|
+
queueMicrotask(() => {
|
|
76
|
+
c.current = !1;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
onChange: (r, s) => {
|
|
81
|
+
var y;
|
|
82
|
+
c.current || (y = e.current) == null || y.call(e, s.getData());
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
) })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
or as RichTextEditor
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","sources":["../../../../src/components/Editor/RichTextEditor/RichTextEditor.tsx"],"sourcesContent":["import React, { useMemo, useRef } from 'react';\nimport {\n Bold,\n ClassicEditor,\n Essentials,\n Italic,\n List,\n Paragraph,\n Undo,\n Widget,\n type Editor,\n} from 'ckeditor5';\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport 'ckeditor5/ckeditor5.css';\nimport { wrapVarTokensForDisplay, type VariableMentionItem } from '../variableMention';\nimport { MsgVarWidget, insertMsgVar } from '../msgVarTokenPlugin';\nimport { VariablePicker } from '../VariablePicker';\nimport styles from './style.module.scss';\n\nexport type RichTextEditorProps = {\n value?: string;\n onChange?: (html: string) => void;\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n minHeight?: number;\n className?: string;\n /**\n * 开启变量色块 +「插入变量」按钮(catalog 注入;禁 FE DEFAULT_VARS)。\n * 无 `/` 触发;色块为原子 widget。\n */\n enableVariableMention?: boolean;\n variables?: VariableMentionItem[];\n /** catalog 失败短文案(按钮 disabled 提示) */\n catalogError?: string;\n};\n\n/**\n * CKEditor 5 + Coze/Dify 风「插入变量」按钮;正文 msgVar 原子色块。\n */\nexport const RichTextEditor: React.FC<RichTextEditorProps> = ({\n value = '',\n onChange,\n disabled = false,\n readOnly = false,\n placeholder,\n minHeight = 140,\n className,\n enableVariableMention = false,\n variables,\n catalogError,\n}) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const editorRef = useRef<Editor | null>(null);\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n const suppressChangeRef = useRef(false);\n\n const initialHtmlRef = useRef(\n enableVariableMention ? wrapVarTokensForDisplay(value || '') : value || '',\n );\n\n const config = useMemo(() => {\n const plugins = enableVariableMention\n ? [Essentials, Paragraph, Bold, Italic, List, Undo, Widget, MsgVarWidget]\n : [Essentials, Paragraph, Bold, Italic, List, Undo];\n return {\n licenseKey: 'GPL' as const,\n toolbar: ['undo', 'redo', '|', 'bold', 'italic', '|', 'bulletedList', 'numberedList'],\n placeholder,\n plugins,\n };\n }, [enableVariableMention, placeholder]);\n\n const locked = disabled || readOnly;\n\n return (\n <div\n ref={rootRef}\n className={\n className\n ? `${styles.root} ${styles['rich-text-editor']} ${className}`\n : `${styles.root} ${styles['rich-text-editor']}`\n }\n style={{ ['--rte-min-height' as string]: `${minHeight}px` }}\n data-disabled={disabled ? '1' : '0'}\n data-readonly={readOnly ? '1' : '0'}\n data-var-mention={enableVariableMention ? '1' : '0'}\n >\n {enableVariableMention ? (\n <div className={styles['var-toolbar']}>\n <VariablePicker\n variables={variables}\n catalogError={catalogError}\n disabled={locked}\n getPopupContainer={() => rootRef.current || document.body}\n onPick={(key) => {\n const editor = editorRef.current;\n if (!editor) return;\n insertMsgVar(editor, key);\n }}\n />\n </div>\n ) : null}\n <div className={styles['editor-host']}>\n <CKEditor\n editor={ClassicEditor}\n config={config}\n disabled={locked}\n onReady={(editor) => {\n editorRef.current = editor;\n suppressChangeRef.current = true;\n try {\n editor.setData(initialHtmlRef.current);\n } finally {\n queueMicrotask(() => {\n suppressChangeRef.current = false;\n });\n }\n }}\n onChange={(_evt, editor) => {\n if (suppressChangeRef.current) return;\n onChangeRef.current?.(editor.getData());\n }}\n />\n </div>\n </div>\n );\n};\n\nexport default RichTextEditor;\n"],"names":["RichTextEditor","value","onChange","disabled","readOnly","placeholder","minHeight","className","enableVariableMention","variables","catalogError","rootRef","useRef","editorRef","onChangeRef","suppressChangeRef","initialHtmlRef","wrapVarTokensForDisplay","config","useMemo","Essentials","Paragraph","Bold","Italic","List","Undo","Widget","MsgVarWidget","locked","jsxs","styles","jsx","VariablePicker","key","editor","insertMsgVar","CKEditor","ClassicEditor","_evt","_a"],"mappings":";;;;;;;;;;;;;;;;;;AAwCO,MAAMA,KAAgD,CAAC;AAAA,EAC5D,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,uBAAAC,IAAwB;AAAA,EACxB,WAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACJ,QAAMC,IAAUC,EAAuB,IAAI,GACrCC,IAAYD,EAAsB,IAAI,GACtCE,IAAcF,EAAOV,CAAQ;AACnC,EAAAY,EAAY,UAAUZ;AACtB,QAAMa,IAAoBH,EAAO,EAAK,GAEhCI,IAAiBJ;AAAA,IACrBJ,IAAwBS,EAAwBhB,KAAS,EAAE,IAAIA,KAAS;AAAA,EAAA,GAGpEiB,IAASC,EAAQ,OAId;AAAA,IACL,YAAY;AAAA,IACZ,SAAS,CAAC,QAAQ,QAAQ,KAAK,QAAQ,UAAU,KAAK,gBAAgB,cAAc;AAAA,IACpF,aAAAd;AAAA,IACA,SAPcG,IACZ,CAACY,GAAYC,GAAWC,GAAMC,GAAQC,GAAMC,GAAMC,GAAQC,CAAY,IACtE,CAACP,GAAYC,GAAWC,GAAMC,GAAQC,GAAMC,CAAI;AAAA,EAKlD,IAED,CAACjB,GAAuBH,CAAW,CAAC,GAEjCuB,IAASzB,KAAYC;AAE3B,SACE,gBAAAyB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKlB;AAAA,MACL,WACEJ,IACI,GAAGuB,EAAO,IAAI,IAAIA,EAAO,kBAAkB,CAAC,IAAIvB,CAAS,KACzD,GAAGuB,EAAO,IAAI,IAAIA,EAAO,kBAAkB,CAAC;AAAA,MAElD,OAAO,EAAG,oBAA+B,GAAGxB,CAAS,KAAA;AAAA,MACrD,iBAAeH,IAAW,MAAM;AAAA,MAChC,iBAAeC,IAAW,MAAM;AAAA,MAChC,oBAAkBI,IAAwB,MAAM;AAAA,MAE/C,UAAA;AAAA,QAAAA,IACC,gBAAAuB,EAAC,OAAA,EAAI,WAAWD,EAAO,aAAa,GAClC,UAAA,gBAAAC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,WAAAvB;AAAA,YACA,cAAAC;AAAA,YACA,UAAUkB;AAAA,YACV,mBAAmB,MAAMjB,EAAQ,WAAW,SAAS;AAAA,YACrD,QAAQ,CAACsB,MAAQ;AACf,oBAAMC,IAASrB,EAAU;AACzB,cAAKqB,KACLC,EAAaD,GAAQD,CAAG;AAAA,YAC1B;AAAA,UAAA;AAAA,QAAA,GAEJ,IACE;AAAA,QACJ,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAO,aAAa,GAClC,UAAA,gBAAAC;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,QAAQC;AAAA,YACR,QAAAnB;AAAA,YACA,UAAUU;AAAA,YACV,SAAS,CAACM,MAAW;AACnB,cAAArB,EAAU,UAAUqB,GACpBnB,EAAkB,UAAU;AAC5B,kBAAI;AACF,gBAAAmB,EAAO,QAAQlB,EAAe,OAAO;AAAA,cACvC,UAAA;AACE,+BAAe,MAAM;AACnB,kBAAAD,EAAkB,UAAU;AAAA,gBAC9B,CAAC;AAAA,cACH;AAAA,YACF;AAAA,YACA,UAAU,CAACuB,GAAMJ,MAAW;;AAC1B,cAAInB,EAAkB,YACtBwB,IAAAzB,EAAY,YAAZ,QAAAyB,EAAA,KAAAzB,GAAsBoB,EAAO;YAC/B;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const t = "_root_16i7d_1", o = {
|
|
2
|
+
root: t,
|
|
3
|
+
"rich-text-editor": "_rich-text-editor_16i7d_27",
|
|
4
|
+
"var-toolbar": "_var-toolbar_16i7d_32",
|
|
5
|
+
"editor-host": "_editor-host_16i7d_38"
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as default,
|
|
9
|
+
t as root
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariableMentionItem } from './variableMention';
|
|
3
|
+
export type VariablePickerProps = {
|
|
4
|
+
variables?: VariableMentionItem[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** catalog 加载失败短文案;有值时优先于「暂无变量」 */
|
|
7
|
+
catalogError?: string;
|
|
8
|
+
onPick: (key: string) => void;
|
|
9
|
+
/** 按钮文案,默认「插入变量」 */
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
size?: 'small' | 'middle' | 'large';
|
|
12
|
+
className?: string;
|
|
13
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Coze/Dify 风格:点选插入变量(中文 + code)。无 `/` 触发。
|
|
17
|
+
*/
|
|
18
|
+
export declare const VariablePicker: React.FC<VariablePickerProps>;
|
|
19
|
+
export default VariablePicker;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as b, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Dropdown as f, Button as h } from "antd";
|
|
3
|
+
import { useMemo as g } from "react";
|
|
4
|
+
import { filterVariableFeed as w } from "./variableMention.js";
|
|
5
|
+
import n from "../FormInfo/VariableMentionInput/style.module.scss.js";
|
|
6
|
+
const V = ({
|
|
7
|
+
variables: o,
|
|
8
|
+
disabled: i,
|
|
9
|
+
catalogError: r,
|
|
10
|
+
onPick: m,
|
|
11
|
+
buttonText: c = "插入变量",
|
|
12
|
+
size: d = "small",
|
|
13
|
+
className: p,
|
|
14
|
+
getPopupContainer: k
|
|
15
|
+
}) => {
|
|
16
|
+
const a = g(() => w(o, ""), [o]), t = a.length === 0, s = r ? `目录失败:${r}` : t ? "暂无 catalog 变量" : void 0, u = t ? [
|
|
17
|
+
{
|
|
18
|
+
key: "__empty",
|
|
19
|
+
disabled: !0,
|
|
20
|
+
label: s || "暂无变量"
|
|
21
|
+
}
|
|
22
|
+
] : a.map((e) => ({
|
|
23
|
+
key: e.key,
|
|
24
|
+
label: /* @__PURE__ */ b("span", { className: n["var-mention-option"], children: [
|
|
25
|
+
e.label ? /* @__PURE__ */ l("span", { className: n["var-mention-label"], children: e.label }) : null,
|
|
26
|
+
/* @__PURE__ */ l("span", { className: n["var-mention-token"], children: e.key })
|
|
27
|
+
] }),
|
|
28
|
+
onClick: () => m(e.key)
|
|
29
|
+
}));
|
|
30
|
+
return /* @__PURE__ */ l(
|
|
31
|
+
f,
|
|
32
|
+
{
|
|
33
|
+
disabled: i || t,
|
|
34
|
+
trigger: ["click"],
|
|
35
|
+
getPopupContainer: k,
|
|
36
|
+
dropdownRender: (e) => /* @__PURE__ */ l("div", { onMouseDown: (y) => y.preventDefault(), children: e }),
|
|
37
|
+
menu: { items: u },
|
|
38
|
+
children: /* @__PURE__ */ l(
|
|
39
|
+
h,
|
|
40
|
+
{
|
|
41
|
+
type: "default",
|
|
42
|
+
size: d,
|
|
43
|
+
disabled: i || t,
|
|
44
|
+
title: s,
|
|
45
|
+
className: p,
|
|
46
|
+
children: c
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
V as VariablePicker
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=VariablePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariablePicker.js","sources":["../../../src/components/Editor/VariablePicker.tsx"],"sourcesContent":["import { Button, Dropdown } from 'antd';\nimport type { MenuProps } from 'antd';\nimport React, { useMemo } from 'react';\nimport { filterVariableFeed, type VariableMentionItem } from './variableMention';\nimport styles from '../FormInfo/VariableMentionInput/style.module.scss';\n\nexport type VariablePickerProps = {\n variables?: VariableMentionItem[];\n disabled?: boolean;\n /** catalog 加载失败短文案;有值时优先于「暂无变量」 */\n catalogError?: string;\n onPick: (key: string) => void;\n /** 按钮文案,默认「插入变量」 */\n buttonText?: string;\n size?: 'small' | 'middle' | 'large';\n className?: string;\n getPopupContainer?: (node: HTMLElement) => HTMLElement;\n};\n\n/**\n * Coze/Dify 风格:点选插入变量(中文 + code)。无 `/` 触发。\n */\nexport const VariablePicker: React.FC<VariablePickerProps> = ({\n variables,\n disabled,\n catalogError,\n onPick,\n buttonText = '插入变量',\n size = 'small',\n className,\n getPopupContainer,\n}) => {\n const list = useMemo(() => filterVariableFeed(variables, ''), [variables]);\n const empty = list.length === 0;\n const tip = catalogError ? `目录失败:${catalogError}` : empty ? '暂无 catalog 变量' : undefined;\n\n const items: MenuProps['items'] = empty\n ? [\n {\n key: '__empty',\n disabled: true,\n label: tip || '暂无变量',\n },\n ]\n : list.map((v) => ({\n key: v.key,\n label: (\n <span className={styles['var-mention-option']}>\n {v.label ? <span className={styles['var-mention-label']}>{v.label}</span> : null}\n <span className={styles['var-mention-token']}>{v.key}</span>\n </span>\n ),\n onClick: () => onPick(v.key),\n }));\n\n return (\n <Dropdown\n disabled={disabled || empty}\n trigger={['click']}\n getPopupContainer={getPopupContainer}\n dropdownRender={(menu) => <div onMouseDown={(e) => e.preventDefault()}>{menu}</div>}\n menu={{ items }}\n >\n <Button\n type=\"default\"\n size={size}\n disabled={disabled || empty}\n title={tip}\n className={className}\n >\n {buttonText}\n </Button>\n </Dropdown>\n );\n};\n\nexport default VariablePicker;\n"],"names":["VariablePicker","variables","disabled","catalogError","onPick","buttonText","size","className","getPopupContainer","list","useMemo","filterVariableFeed","empty","tip","items","v","jsxs","styles","jsx","Dropdown","menu","e","Button"],"mappings":";;;;;AAsBO,MAAMA,IAAgD,CAAC;AAAA,EAC5D,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,mBAAAC;AACF,MAAM;AACJ,QAAMC,IAAOC,EAAQ,MAAMC,EAAmBV,GAAW,EAAE,GAAG,CAACA,CAAS,CAAC,GACnEW,IAAQH,EAAK,WAAW,GACxBI,IAAMV,IAAe,QAAQA,CAAY,KAAKS,IAAQ,kBAAkB,QAExEE,IAA4BF,IAC9B;AAAA,IACE;AAAA,MACE,KAAK;AAAA,MACL,UAAU;AAAA,MACV,OAAOC,KAAO;AAAA,IAAA;AAAA,EAChB,IAEFJ,EAAK,IAAI,CAACM,OAAO;AAAA,IACf,KAAKA,EAAE;AAAA,IACP,OACE,gBAAAC,EAAC,QAAA,EAAK,WAAWC,EAAO,oBAAoB,GACzC,UAAA;AAAA,MAAAF,EAAE,0BAAS,QAAA,EAAK,WAAWE,EAAO,mBAAmB,GAAI,UAAAF,EAAE,MAAA,CAAM,IAAU;AAAA,wBAC3E,QAAA,EAAK,WAAWE,EAAO,mBAAmB,GAAI,YAAE,IAAA,CAAI;AAAA,IAAA,GACvD;AAAA,IAEF,SAAS,MAAMb,EAAOW,EAAE,GAAG;AAAA,EAAA,EAC3B;AAEN,SACE,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAUjB,KAAYU;AAAA,MACtB,SAAS,CAAC,OAAO;AAAA,MACjB,mBAAAJ;AAAA,MACA,gBAAgB,CAACY,MAAS,gBAAAF,EAAC,OAAA,EAAI,aAAa,CAACG,MAAMA,EAAE,eAAA,GAAmB,UAAAD,EAAA,CAAK;AAAA,MAC7E,MAAM,EAAE,OAAAN,EAAA;AAAA,MAER,UAAA,gBAAAI;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,MAAAhB;AAAA,UACA,UAAUJ,KAAYU;AAAA,UACtB,OAAOC;AAAA,UACP,WAAAN;AAAA,UAEC,UAAAF;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { RichTextEditor } from './RichTextEditor';
|
|
2
|
+
export type { RichTextEditorProps } from './RichTextEditor';
|
|
3
|
+
export { MSG_VAR_TOKEN_CLASS, VAR_PLACEHOLDER_RE, toVarToken, filterVariableFeed, formatVariableOptionLabel, toMentionFeedItem, normalizeMentionHtmlToVarTokens, wrapVarTokensForDisplay, upliftVarTokensToMentions, insertVarTokenAt, } from './variableMention';
|
|
4
|
+
export type { VariableMentionItem } from './variableMention';
|
|
5
|
+
export { MsgVarWidget, insertMsgVar } from './msgVarTokenPlugin';
|
|
6
|
+
export { VariablePicker } from './VariablePicker';
|
|
7
|
+
export type { VariablePickerProps } from './VariablePicker';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MSG_VAR_TOKEN_CLASS as a, VAR_PLACEHOLDER_RE as i, filterVariableFeed as n, formatVariableOptionLabel as V, insertVarTokenAt as l, normalizeMentionHtmlToVarTokens as m, toMentionFeedItem as p, toVarToken as s, upliftVarTokensToMentions as T, wrapVarTokensForDisplay as f } from "./variableMention.js";
|
|
2
|
+
import { MsgVarWidget as M, insertMsgVar as x } from "./msgVarTokenPlugin.js";
|
|
3
|
+
import { VariablePicker as E } from "./VariablePicker.js";
|
|
4
|
+
import { RichTextEditor as r } from "./RichTextEditor/RichTextEditor.js";
|
|
5
|
+
export {
|
|
6
|
+
a as MSG_VAR_TOKEN_CLASS,
|
|
7
|
+
M as MsgVarWidget,
|
|
8
|
+
r as RichTextEditor,
|
|
9
|
+
i as VAR_PLACEHOLDER_RE,
|
|
10
|
+
E as VariablePicker,
|
|
11
|
+
n as filterVariableFeed,
|
|
12
|
+
V as formatVariableOptionLabel,
|
|
13
|
+
x as insertMsgVar,
|
|
14
|
+
l as insertVarTokenAt,
|
|
15
|
+
m as normalizeMentionHtmlToVarTokens,
|
|
16
|
+
p as toMentionFeedItem,
|
|
17
|
+
s as toVarToken,
|
|
18
|
+
T as upliftVarTokensToMentions,
|
|
19
|
+
f as wrapVarTokensForDisplay
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Plugin, Widget, Editor } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* 正文变量原子色块:isObject inline widget。
|
|
4
|
+
* 不可改内部字符;Backspace/Delete 整颗删(对齐 Coze/Dify chip)。
|
|
5
|
+
*/
|
|
6
|
+
export declare class MsgVarWidget extends Plugin {
|
|
7
|
+
#private;
|
|
8
|
+
static get pluginName(): "MsgVarWidget";
|
|
9
|
+
static get requires(): readonly [typeof Widget];
|
|
10
|
+
init(): void;
|
|
11
|
+
}
|
|
12
|
+
/** 在选区插入原子变量色块,并焦点回编辑器 */
|
|
13
|
+
export declare function insertMsgVar(editor: Editor, key: string): void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var m = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var f = (e, n, t) => n.has(e) || m("Cannot " + t);
|
|
5
|
+
var c = (e, n, t) => n.has(e) ? m("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, t);
|
|
6
|
+
var a = (e, n, t) => (f(e, n, "access private method"), t);
|
|
7
|
+
import { Plugin as h } from "../../node_modules/@ckeditor/ckeditor5-core/dist/index.js";
|
|
8
|
+
import "../../node_modules/@ckeditor/ckeditor5-utils/dist/index.js";
|
|
9
|
+
import "../../node_modules/@ckeditor/ckeditor5-engine/dist/index.js";
|
|
10
|
+
import { Widget as p, viewToModelPositionOutsideModelElement as v, toWidget as V } from "../../node_modules/@ckeditor/ckeditor5-widget/dist/index.js";
|
|
11
|
+
import "../../node_modules/@ckeditor/ckeditor5-list/dist/index.js";
|
|
12
|
+
import "../../node_modules/@ckeditor/ckeditor5-mention/dist/index.js";
|
|
13
|
+
import { toVarToken as k } from "./variableMention.js";
|
|
14
|
+
var s, g, d;
|
|
15
|
+
class P extends h {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
c(this, s);
|
|
19
|
+
}
|
|
20
|
+
static get pluginName() {
|
|
21
|
+
return "MsgVarWidget";
|
|
22
|
+
}
|
|
23
|
+
static get requires() {
|
|
24
|
+
return [p];
|
|
25
|
+
}
|
|
26
|
+
init() {
|
|
27
|
+
const t = this.editor;
|
|
28
|
+
a(this, s, g).call(this), a(this, s, d).call(this), t.editing.mapper.on(
|
|
29
|
+
"viewToModelPosition",
|
|
30
|
+
v(
|
|
31
|
+
t.model,
|
|
32
|
+
(r) => r.hasClass("msg-var-token")
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
s = new WeakSet(), g = function() {
|
|
38
|
+
this.editor.model.schema.register("msgVar", {
|
|
39
|
+
inheritAllFrom: "$inlineObject",
|
|
40
|
+
allowAttributes: ["key"]
|
|
41
|
+
});
|
|
42
|
+
}, d = function() {
|
|
43
|
+
const t = this.editor.conversion;
|
|
44
|
+
t.for("editingDowncast").elementToElement({
|
|
45
|
+
model: "msgVar",
|
|
46
|
+
view: (r, { writer: o }) => {
|
|
47
|
+
const i = String(r.getAttribute("key") || ""), u = l(o, i);
|
|
48
|
+
return V(u, o, { label: `变量 ${i}` });
|
|
49
|
+
}
|
|
50
|
+
}), t.for("dataDowncast").elementToElement({
|
|
51
|
+
model: "msgVar",
|
|
52
|
+
view: (r, { writer: o }) => {
|
|
53
|
+
const i = String(r.getAttribute("key") || "");
|
|
54
|
+
return l(o, i);
|
|
55
|
+
}
|
|
56
|
+
}), t.for("upcast").elementToElement({
|
|
57
|
+
view: {
|
|
58
|
+
name: "span",
|
|
59
|
+
classes: ["msg-var-token"]
|
|
60
|
+
},
|
|
61
|
+
model: (r, { writer: o }) => {
|
|
62
|
+
const i = w(r);
|
|
63
|
+
return i ? o.createElement("msgVar", { key: i }) : null;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
function l(e, n) {
|
|
68
|
+
const t = e.createContainerElement("span", {
|
|
69
|
+
class: "msg-var-token",
|
|
70
|
+
"data-var": n
|
|
71
|
+
});
|
|
72
|
+
return e.insert(e.createPositionAt(t, 0), e.createText(k(n))), t;
|
|
73
|
+
}
|
|
74
|
+
function w(e) {
|
|
75
|
+
const n = String(e.getAttribute("data-var") || "").trim();
|
|
76
|
+
if (n) return n;
|
|
77
|
+
let t = "";
|
|
78
|
+
for (const o of e.getChildren())
|
|
79
|
+
(o.is("$text") || o.is("$textProxy")) && (t += o.data);
|
|
80
|
+
const r = t.match(/^\{\{(\w+)\}\}$/);
|
|
81
|
+
return (r == null ? void 0 : r[1]) ?? "";
|
|
82
|
+
}
|
|
83
|
+
function S(e, n) {
|
|
84
|
+
const t = String(n || "").trim();
|
|
85
|
+
t && (e.model.change((r) => {
|
|
86
|
+
const o = r.createElement("msgVar", { key: t });
|
|
87
|
+
e.model.insertContent(o);
|
|
88
|
+
}), e.editing.view.focus());
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
P as MsgVarWidget,
|
|
92
|
+
S as insertMsgVar
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=msgVarTokenPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msgVarTokenPlugin.js","sources":["../../../src/components/Editor/msgVarTokenPlugin.ts"],"sourcesContent":["import {\n Plugin,\n Widget,\n toWidget,\n viewToModelPositionOutsideModelElement,\n type Editor,\n type ViewDowncastWriter,\n type ViewElement,\n} from 'ckeditor5';\nimport { toVarToken } from './variableMention';\n\n/**\n * 正文变量原子色块:isObject inline widget。\n * 不可改内部字符;Backspace/Delete 整颗删(对齐 Coze/Dify chip)。\n */\nexport class MsgVarWidget extends Plugin {\n public static get pluginName() {\n return 'MsgVarWidget' as const;\n }\n\n public static get requires() {\n return [Widget] as const;\n }\n\n public init(): void {\n const editor = this.editor;\n this.#defineSchema();\n this.#defineConverters();\n\n editor.editing.mapper.on(\n 'viewToModelPosition',\n viewToModelPositionOutsideModelElement(editor.model, (viewElement) =>\n viewElement.hasClass('msg-var-token'),\n ),\n );\n }\n\n #defineSchema(): void {\n const schema = this.editor.model.schema;\n schema.register('msgVar', {\n inheritAllFrom: '$inlineObject',\n allowAttributes: ['key'],\n });\n }\n\n #defineConverters(): void {\n const conversion = this.editor.conversion;\n\n conversion.for('editingDowncast').elementToElement({\n model: 'msgVar',\n view: (modelItem, { writer }) => {\n const key = String(modelItem.getAttribute('key') || '');\n const widgetElement = createMsgVarView(writer, key);\n return toWidget(widgetElement, writer, { label: `变量 ${key}` });\n },\n });\n\n conversion.for('dataDowncast').elementToElement({\n model: 'msgVar',\n view: (modelItem, { writer }) => {\n const key = String(modelItem.getAttribute('key') || '');\n return createMsgVarView(writer, key);\n },\n });\n\n conversion.for('upcast').elementToElement({\n view: {\n name: 'span',\n classes: ['msg-var-token'],\n },\n model: (viewElement, { writer }) => {\n const key = resolveKeyFromView(viewElement);\n if (!key) return null;\n return writer.createElement('msgVar', { key });\n },\n });\n }\n}\n\nfunction createMsgVarView(writer: ViewDowncastWriter, key: string): ViewElement {\n const span = writer.createContainerElement('span', {\n class: 'msg-var-token',\n 'data-var': key,\n });\n writer.insert(writer.createPositionAt(span, 0), writer.createText(toVarToken(key)));\n return span;\n}\n\nfunction resolveKeyFromView(viewElement: ViewElement): string {\n const fromAttr = String(viewElement.getAttribute('data-var') || '').trim();\n if (fromAttr) return fromAttr;\n let text = '';\n for (const child of viewElement.getChildren()) {\n if (child.is('$text') || child.is('$textProxy')) {\n text += child.data;\n }\n }\n const m = text.match(/^\\{\\{(\\w+)\\}\\}$/);\n return m?.[1] ?? '';\n}\n\n/** 在选区插入原子变量色块,并焦点回编辑器 */\nexport function insertMsgVar(editor: Editor, key: string): void {\n const k = String(key || '').trim();\n if (!k) return;\n editor.model.change((writer) => {\n const el = writer.createElement('msgVar', { key: k });\n editor.model.insertContent(el);\n });\n editor.editing.view.focus();\n}\n"],"names":["MsgVarWidget","Plugin","__privateAdd","_MsgVarWidget_instances","Widget","editor","__privateMethod","defineSchema_fn","defineConverters_fn","viewToModelPositionOutsideModelElement","viewElement","conversion","modelItem","writer","key","widgetElement","createMsgVarView","toWidget","resolveKeyFromView","span","toVarToken","fromAttr","text","child","m","insertMsgVar","k","el"],"mappings":";;;;;;;;;;;;;;AAeO,MAAMA,UAAqBC,EAAO;AAAA,EAAlC;AAAA;AAAA,IAAAC,EAAA,MAAAC;AAAA;AAAA,EACL,WAAkB,aAAa;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,WAAkB,WAAW;AAC3B,WAAO,CAACC,CAAM;AAAA,EAChB;AAAA,EAEO,OAAa;AAClB,UAAMC,IAAS,KAAK;AACpB,IAAAC,EAAA,MAAKH,GAAAI,GAAL,YACAD,EAAA,MAAKH,GAAAK,GAAL,YAEAH,EAAO,QAAQ,OAAO;AAAA,MACpB;AAAA,MACAI;AAAA,QAAuCJ,EAAO;AAAA,QAAO,CAACK,MACpDA,EAAY,SAAS,eAAe;AAAA,MAAA;AAAA,IACtC;AAAA,EAEJ;AA0CF;AA9DOP,IAAA,eAsBLI,IAAA,WAAsB;AAEpB,EADe,KAAK,OAAO,MAAM,OAC1B,SAAS,UAAU;AAAA,IACxB,gBAAgB;AAAA,IAChB,iBAAiB,CAAC,KAAK;AAAA,EAAA,CACxB;AACH,GAEAC,IAAA,WAA0B;AACxB,QAAMG,IAAa,KAAK,OAAO;AAE/B,EAAAA,EAAW,IAAI,iBAAiB,EAAE,iBAAiB;AAAA,IACjD,OAAO;AAAA,IACP,MAAM,CAACC,GAAW,EAAE,QAAAC,QAAa;AAC/B,YAAMC,IAAM,OAAOF,EAAU,aAAa,KAAK,KAAK,EAAE,GAChDG,IAAgBC,EAAiBH,GAAQC,CAAG;AAClD,aAAOG,EAASF,GAAeF,GAAQ,EAAE,OAAO,MAAMC,CAAG,IAAI;AAAA,IAC/D;AAAA,EAAA,CACD,GAEDH,EAAW,IAAI,cAAc,EAAE,iBAAiB;AAAA,IAC9C,OAAO;AAAA,IACP,MAAM,CAACC,GAAW,EAAE,QAAAC,QAAa;AAC/B,YAAMC,IAAM,OAAOF,EAAU,aAAa,KAAK,KAAK,EAAE;AACtD,aAAOI,EAAiBH,GAAQC,CAAG;AAAA,IACrC;AAAA,EAAA,CACD,GAEDH,EAAW,IAAI,QAAQ,EAAE,iBAAiB;AAAA,IACxC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,eAAe;AAAA,IAAA;AAAA,IAE3B,OAAO,CAACD,GAAa,EAAE,QAAAG,QAAa;AAClC,YAAMC,IAAMI,EAAmBR,CAAW;AAC1C,aAAKI,IACED,EAAO,cAAc,UAAU,EAAE,KAAAC,GAAK,IAD5B;AAAA,IAEnB;AAAA,EAAA,CACD;AACH;AAGF,SAASE,EAAiBH,GAA4BC,GAA0B;AAC9E,QAAMK,IAAON,EAAO,uBAAuB,QAAQ;AAAA,IACjD,OAAO;AAAA,IACP,YAAYC;AAAA,EAAA,CACb;AACD,SAAAD,EAAO,OAAOA,EAAO,iBAAiBM,GAAM,CAAC,GAAGN,EAAO,WAAWO,EAAWN,CAAG,CAAC,CAAC,GAC3EK;AACT;AAEA,SAASD,EAAmBR,GAAkC;AAC5D,QAAMW,IAAW,OAAOX,EAAY,aAAa,UAAU,KAAK,EAAE,EAAE,KAAA;AACpE,MAAIW,EAAU,QAAOA;AACrB,MAAIC,IAAO;AACX,aAAWC,KAASb,EAAY;AAC9B,KAAIa,EAAM,GAAG,OAAO,KAAKA,EAAM,GAAG,YAAY,OAC5CD,KAAQC,EAAM;AAGlB,QAAMC,IAAIF,EAAK,MAAM,iBAAiB;AACtC,UAAOE,KAAA,gBAAAA,EAAI,OAAM;AACnB;AAGO,SAASC,EAAapB,GAAgBS,GAAmB;AAC9D,QAAMY,IAAI,OAAOZ,KAAO,EAAE,EAAE,KAAA;AAC5B,EAAKY,MACLrB,EAAO,MAAM,OAAO,CAACQ,MAAW;AAC9B,UAAMc,IAAKd,EAAO,cAAc,UAAU,EAAE,KAAKa,GAAG;AACpD,IAAArB,EAAO,MAAM,cAAcsB,CAAE;AAAA,EAC/B,CAAC,GACDtB,EAAO,QAAQ,KAAK,MAAA;AACtB;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 变量占位工具:存盘 `{{key}}`(与 marsun_msg_center render 对齐)。
|
|
3
|
+
* 插入走「插入变量」按钮(VariablePicker);正文为原子 widget。
|
|
4
|
+
* 禁止 FE DEFAULT_VARS。
|
|
5
|
+
*/
|
|
6
|
+
export type VariableMentionItem = {
|
|
7
|
+
key: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
};
|
|
11
|
+
/** 编辑区色块 class(RTE content + Input 展示) */
|
|
12
|
+
export declare const MSG_VAR_TOKEN_CLASS = "msg-var-token";
|
|
13
|
+
/** 双花括号占位 */
|
|
14
|
+
export declare const VAR_PLACEHOLDER_RE: RegExp;
|
|
15
|
+
export declare function toVarToken(key: string): string;
|
|
16
|
+
/** 下拉展示:中文 label + code(无前导 /) */
|
|
17
|
+
export declare function formatVariableOptionLabel(v: VariableMentionItem): string;
|
|
18
|
+
export declare function filterVariableFeed(variables: VariableMentionItem[] | undefined, query: string): VariableMentionItem[];
|
|
19
|
+
/** CKEditor Mention feed item:id 须以 marker 开头;text 为插入的 {{key}} */
|
|
20
|
+
export declare function toMentionFeedItem(v: VariableMentionItem): {
|
|
21
|
+
id: string;
|
|
22
|
+
text: string;
|
|
23
|
+
key: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 将 CKEditor mention 节点规范为字面 `{{key}}` 色块 span(存盘/预览用)。
|
|
28
|
+
*/
|
|
29
|
+
export declare function normalizeMentionHtmlToVarTokens(html: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* 读入编辑器前:裸 `{{key}}` / 旧色块 → 带 data-var 的 span,供 MsgVarWidget upcast。
|
|
32
|
+
*/
|
|
33
|
+
export declare function wrapVarTokensForDisplay(html: string): string;
|
|
34
|
+
/** @deprecated 兼容旧名;等同 wrapVarTokensForDisplay */
|
|
35
|
+
export declare function upliftVarTokensToMentions(html: string): string;
|
|
36
|
+
/** 在纯文本光标处插入 `{{key}}` */
|
|
37
|
+
export declare function insertVarTokenAt(text: string, key: string, caret?: number): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const i = "msg-var-token", g = /\{\{(\w+)\}\}/g;
|
|
2
|
+
function c(n) {
|
|
3
|
+
return `{{${String(n || "").trim()}}}`;
|
|
4
|
+
}
|
|
5
|
+
function f(n) {
|
|
6
|
+
const t = String(n.key || "").trim(), r = String(n.label || "").trim();
|
|
7
|
+
return r && r !== t ? `${r} ${t}` : t;
|
|
8
|
+
}
|
|
9
|
+
function S(n, t) {
|
|
10
|
+
const r = Array.isArray(n) ? n : [], a = String(t || "").replace(/^\//, "").trim().toLowerCase();
|
|
11
|
+
return a ? r.filter((e) => {
|
|
12
|
+
const s = String(e.key || "").toLowerCase(), o = String(e.label || "").toLowerCase();
|
|
13
|
+
return s.includes(a) || o.includes(a);
|
|
14
|
+
}) : r;
|
|
15
|
+
}
|
|
16
|
+
function m(n) {
|
|
17
|
+
const t = String(n.key || "").trim();
|
|
18
|
+
return {
|
|
19
|
+
id: `/${t}`,
|
|
20
|
+
text: c(t),
|
|
21
|
+
key: t,
|
|
22
|
+
label: n.label
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function u(n) {
|
|
26
|
+
return String(n || "").replace(
|
|
27
|
+
/<span\b[^>]*\bdata-mention="\/(\w+)"[^>]*>[\s\S]*?<\/span>/gi,
|
|
28
|
+
(t, r) => `<span class="${i}" data-var="${r}">{{${r}}}</span>`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function p(n) {
|
|
32
|
+
let t = u(String(n || ""));
|
|
33
|
+
const r = new RegExp(
|
|
34
|
+
`<span\\b([^>]*\\bclass="[^"]*${i}[^"]*"[^>]*)>\\{\\{(\\w+)\\}\\}<\\/span>`,
|
|
35
|
+
"gi"
|
|
36
|
+
);
|
|
37
|
+
return t = t.replace(r, (a, e, s) => /\bdata-var=/.test(e) ? `<span${e}>{{${s}}}</span>` : `<span class="${i}" data-var="${s}">{{${s}}}</span>`), t = t.replace(/(^|>)([^<]*)/g, (a, e, s) => {
|
|
38
|
+
const o = s.replace(
|
|
39
|
+
/\{\{(\w+)\}\}/g,
|
|
40
|
+
($, l) => `<span class="${i}" data-var="${l}">{{${l}}}</span>`
|
|
41
|
+
);
|
|
42
|
+
return `${e}${o}`;
|
|
43
|
+
}), t;
|
|
44
|
+
}
|
|
45
|
+
function b(n) {
|
|
46
|
+
return p(n);
|
|
47
|
+
}
|
|
48
|
+
function d(n, t, r = -1) {
|
|
49
|
+
const a = c(t), e = String(n || "");
|
|
50
|
+
return r < 0 || r > e.length ? `${e}${a}` : `${e.slice(0, r)}${a}${e.slice(r)}`;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
i as MSG_VAR_TOKEN_CLASS,
|
|
54
|
+
g as VAR_PLACEHOLDER_RE,
|
|
55
|
+
S as filterVariableFeed,
|
|
56
|
+
f as formatVariableOptionLabel,
|
|
57
|
+
d as insertVarTokenAt,
|
|
58
|
+
u as normalizeMentionHtmlToVarTokens,
|
|
59
|
+
m as toMentionFeedItem,
|
|
60
|
+
c as toVarToken,
|
|
61
|
+
b as upliftVarTokensToMentions,
|
|
62
|
+
p as wrapVarTokensForDisplay
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=variableMention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variableMention.js","sources":["../../../src/components/Editor/variableMention.ts"],"sourcesContent":["/**\n * 变量占位工具:存盘 `{{key}}`(与 marsun_msg_center render 对齐)。\n * 插入走「插入变量」按钮(VariablePicker);正文为原子 widget。\n * 禁止 FE DEFAULT_VARS。\n */\n\nexport type VariableMentionItem = {\n key: string;\n label?: string;\n type?: string;\n};\n\n/** 编辑区色块 class(RTE content + Input 展示) */\nexport const MSG_VAR_TOKEN_CLASS = 'msg-var-token';\n\n/** 双花括号占位 */\nexport const VAR_PLACEHOLDER_RE = /\\{\\{(\\w+)\\}\\}/g;\n\nexport function toVarToken(key: string): string {\n return `{{${String(key || '').trim()}}}`;\n}\n\n/** 下拉展示:中文 label + code(无前导 /) */\nexport function formatVariableOptionLabel(v: VariableMentionItem): string {\n const key = String(v.key || '').trim();\n const label = String(v.label || '').trim();\n if (label && label !== key) return `${label} ${key}`;\n return key;\n}\n\nexport function filterVariableFeed(\n variables: VariableMentionItem[] | undefined,\n query: string,\n): VariableMentionItem[] {\n const list = Array.isArray(variables) ? variables : [];\n const q = String(query || '')\n .replace(/^\\//, '')\n .trim()\n .toLowerCase();\n if (!q) return list;\n return list.filter((v) => {\n const key = String(v.key || '').toLowerCase();\n const label = String(v.label || '').toLowerCase();\n return key.includes(q) || label.includes(q);\n });\n}\n\n/** CKEditor Mention feed item:id 须以 marker 开头;text 为插入的 {{key}} */\nexport function toMentionFeedItem(v: VariableMentionItem): {\n id: string;\n text: string;\n key: string;\n label?: string;\n} {\n const key = String(v.key || '').trim();\n return {\n id: `/${key}`,\n text: toVarToken(key),\n key,\n label: v.label,\n };\n}\n\n/**\n * 将 CKEditor mention 节点规范为字面 `{{key}}` 色块 span(存盘/预览用)。\n */\nexport function normalizeMentionHtmlToVarTokens(html: string): string {\n return String(html || '').replace(\n /<span\\b[^>]*\\bdata-mention=\"\\/(\\w+)\"[^>]*>[\\s\\S]*?<\\/span>/gi,\n (_m, key: string) => `<span class=\"${MSG_VAR_TOKEN_CLASS}\" data-var=\"${key}\">{{${key}}}</span>`,\n );\n}\n\n/**\n * 读入编辑器前:裸 `{{key}}` / 旧色块 → 带 data-var 的 span,供 MsgVarWidget upcast。\n */\nexport function wrapVarTokensForDisplay(html: string): string {\n let s = normalizeMentionHtmlToVarTokens(String(html || ''));\n const tokenSpanRe = new RegExp(\n `<span\\\\b([^>]*\\\\bclass=\"[^\"]*${MSG_VAR_TOKEN_CLASS}[^\"]*\"[^>]*)>\\\\{\\\\{(\\\\w+)\\\\}\\\\}<\\\\/span>`,\n 'gi',\n );\n s = s.replace(tokenSpanRe, (_m, attrs: string, key: string) => {\n if (/\\bdata-var=/.test(attrs)) return `<span${attrs}>{{${key}}}</span>`;\n return `<span class=\"${MSG_VAR_TOKEN_CLASS}\" data-var=\"${key}\">{{${key}}}</span>`;\n });\n s = s.replace(/(^|>)([^<]*)/g, (_full, prefix: string, text: string) => {\n const next = text.replace(\n /\\{\\{(\\w+)\\}\\}/g,\n (_m, key: string) =>\n `<span class=\"${MSG_VAR_TOKEN_CLASS}\" data-var=\"${key}\">{{${key}}}</span>`,\n );\n return `${prefix}${next}`;\n });\n return s;\n}\n\n/** @deprecated 兼容旧名;等同 wrapVarTokensForDisplay */\nexport function upliftVarTokensToMentions(html: string): string {\n return wrapVarTokensForDisplay(html);\n}\n\n/** 在纯文本光标处插入 `{{key}}` */\nexport function insertVarTokenAt(text: string, key: string, caret = -1): string {\n const token = toVarToken(key);\n const src = String(text || '');\n if (caret < 0 || caret > src.length) return `${src}${token}`;\n return `${src.slice(0, caret)}${token}${src.slice(caret)}`;\n}\n"],"names":["MSG_VAR_TOKEN_CLASS","VAR_PLACEHOLDER_RE","toVarToken","key","formatVariableOptionLabel","v","label","filterVariableFeed","variables","query","list","q","toMentionFeedItem","normalizeMentionHtmlToVarTokens","html","_m","wrapVarTokensForDisplay","s","tokenSpanRe","attrs","_full","prefix","text","next","upliftVarTokensToMentions","insertVarTokenAt","caret","token","src"],"mappings":"AAaO,MAAMA,IAAsB,iBAGtBC,IAAqB;AAE3B,SAASC,EAAWC,GAAqB;AAC9C,SAAO,KAAK,OAAOA,KAAO,EAAE,EAAE,MAAM;AACtC;AAGO,SAASC,EAA0BC,GAAgC;AACxE,QAAMF,IAAM,OAAOE,EAAE,OAAO,EAAE,EAAE,KAAA,GAC1BC,IAAQ,OAAOD,EAAE,SAAS,EAAE,EAAE,KAAA;AACpC,SAAIC,KAASA,MAAUH,IAAY,GAAGG,CAAK,KAAKH,CAAG,KAC5CA;AACT;AAEO,SAASI,EACdC,GACAC,GACuB;AACvB,QAAMC,IAAO,MAAM,QAAQF,CAAS,IAAIA,IAAY,CAAA,GAC9CG,IAAI,OAAOF,KAAS,EAAE,EACzB,QAAQ,OAAO,EAAE,EACjB,KAAA,EACA,YAAA;AACH,SAAKE,IACED,EAAK,OAAO,CAACL,MAAM;AACxB,UAAMF,IAAM,OAAOE,EAAE,OAAO,EAAE,EAAE,YAAA,GAC1BC,IAAQ,OAAOD,EAAE,SAAS,EAAE,EAAE,YAAA;AACpC,WAAOF,EAAI,SAASQ,CAAC,KAAKL,EAAM,SAASK,CAAC;AAAA,EAC5C,CAAC,IALcD;AAMjB;AAGO,SAASE,EAAkBP,GAKhC;AACA,QAAMF,IAAM,OAAOE,EAAE,OAAO,EAAE,EAAE,KAAA;AAChC,SAAO;AAAA,IACL,IAAI,IAAIF,CAAG;AAAA,IACX,MAAMD,EAAWC,CAAG;AAAA,IACpB,KAAAA;AAAA,IACA,OAAOE,EAAE;AAAA,EAAA;AAEb;AAKO,SAASQ,EAAgCC,GAAsB;AACpE,SAAO,OAAOA,KAAQ,EAAE,EAAE;AAAA,IACxB;AAAA,IACA,CAACC,GAAIZ,MAAgB,gBAAgBH,CAAmB,eAAeG,CAAG,OAAOA,CAAG;AAAA,EAAA;AAExF;AAKO,SAASa,EAAwBF,GAAsB;AAC5D,MAAIG,IAAIJ,EAAgC,OAAOC,KAAQ,EAAE,CAAC;AAC1D,QAAMI,IAAc,IAAI;AAAA,IACtB,gCAAgClB,CAAmB;AAAA,IACnD;AAAA,EAAA;AAEF,SAAAiB,IAAIA,EAAE,QAAQC,GAAa,CAACH,GAAII,GAAehB,MACzC,cAAc,KAAKgB,CAAK,IAAU,QAAQA,CAAK,MAAMhB,CAAG,cACrD,gBAAgBH,CAAmB,eAAeG,CAAG,OAAOA,CAAG,WACvE,GACDc,IAAIA,EAAE,QAAQ,iBAAiB,CAACG,GAAOC,GAAgBC,MAAiB;AACtE,UAAMC,IAAOD,EAAK;AAAA,MAChB;AAAA,MACA,CAACP,GAAIZ,MACH,gBAAgBH,CAAmB,eAAeG,CAAG,OAAOA,CAAG;AAAA,IAAA;AAEnE,WAAO,GAAGkB,CAAM,GAAGE,CAAI;AAAA,EACzB,CAAC,GACMN;AACT;AAGO,SAASO,EAA0BV,GAAsB;AAC9D,SAAOE,EAAwBF,CAAI;AACrC;AAGO,SAASW,EAAiBH,GAAcnB,GAAauB,IAAQ,IAAY;AAC9E,QAAMC,IAAQzB,EAAWC,CAAG,GACtByB,IAAM,OAAON,KAAQ,EAAE;AAC7B,SAAII,IAAQ,KAAKA,IAAQE,EAAI,SAAe,GAAGA,CAAG,GAAGD,CAAK,KACnD,GAAGC,EAAI,MAAM,GAAGF,CAAK,CAAC,GAAGC,CAAK,GAAGC,EAAI,MAAMF,CAAK,CAAC;AAC1D;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { VariableMentionItem } from '../../Editor/variableMention';
|
|
3
|
+
export type RichTextFieldProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
labelTips?: ReactNode | ((props: RichTextFieldProps) => ReactNode);
|
|
7
|
+
rule?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
minHeight?: number;
|
|
12
|
+
enableVariableMention?: boolean;
|
|
13
|
+
variables?: VariableMentionItem[];
|
|
14
|
+
catalogError?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
/** remount 键(换文档时传入) */
|
|
17
|
+
editorKey?: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
export declare const RichTextField: ComponentType<RichTextFieldProps>;
|
|
21
|
+
export default RichTextField;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as R from "@kne/react-form-antd";
|
|
3
|
+
import T from "classnames";
|
|
4
|
+
import { Suspense as N, lazy as u } from "react";
|
|
5
|
+
import h from "./style.module.scss.js";
|
|
6
|
+
const y = u(
|
|
7
|
+
() => import("../../Editor/index.js").then((e) => ({ default: e.RichTextEditor }))
|
|
8
|
+
), b = ({
|
|
9
|
+
value: e = "",
|
|
10
|
+
onChange: i,
|
|
11
|
+
disabled: t,
|
|
12
|
+
readOnly: o,
|
|
13
|
+
placeholder: a,
|
|
14
|
+
minHeight: c = 140,
|
|
15
|
+
enableVariableMention: s,
|
|
16
|
+
variables: l,
|
|
17
|
+
catalogError: n,
|
|
18
|
+
className: d,
|
|
19
|
+
editorKey: m,
|
|
20
|
+
id: f
|
|
21
|
+
}) => /* @__PURE__ */ r(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: T(
|
|
25
|
+
"marsun-form-rich-text",
|
|
26
|
+
h["form-rich-text"],
|
|
27
|
+
t && h["form-rich-text-disabled"],
|
|
28
|
+
d
|
|
29
|
+
),
|
|
30
|
+
"data-field-id": f,
|
|
31
|
+
children: /* @__PURE__ */ r(N, { fallback: /* @__PURE__ */ r("div", { className: h["form-rich-text-loading"], children: "加载编辑器…" }), children: /* @__PURE__ */ r(
|
|
32
|
+
y,
|
|
33
|
+
{
|
|
34
|
+
value: e,
|
|
35
|
+
onChange: i,
|
|
36
|
+
disabled: t,
|
|
37
|
+
readOnly: o,
|
|
38
|
+
placeholder: a,
|
|
39
|
+
minHeight: c,
|
|
40
|
+
enableVariableMention: s,
|
|
41
|
+
variables: l,
|
|
42
|
+
catalogError: n
|
|
43
|
+
},
|
|
44
|
+
m || "rte"
|
|
45
|
+
) })
|
|
46
|
+
}
|
|
47
|
+
), x = (e) => {
|
|
48
|
+
const { useDecorator: i } = R.hooks, {
|
|
49
|
+
variables: t,
|
|
50
|
+
catalogError: o,
|
|
51
|
+
placeholder: a,
|
|
52
|
+
className: c,
|
|
53
|
+
enableVariableMention: s,
|
|
54
|
+
readOnly: l,
|
|
55
|
+
minHeight: n,
|
|
56
|
+
editorKey: d,
|
|
57
|
+
...m
|
|
58
|
+
} = e;
|
|
59
|
+
return i({
|
|
60
|
+
fieldName: "richTextEditor",
|
|
61
|
+
...m
|
|
62
|
+
})((p) => /* @__PURE__ */ r(
|
|
63
|
+
b,
|
|
64
|
+
{
|
|
65
|
+
...p,
|
|
66
|
+
variables: t,
|
|
67
|
+
catalogError: o,
|
|
68
|
+
placeholder: a,
|
|
69
|
+
className: c,
|
|
70
|
+
enableVariableMention: s,
|
|
71
|
+
readOnly: l,
|
|
72
|
+
minHeight: n,
|
|
73
|
+
editorKey: d
|
|
74
|
+
}
|
|
75
|
+
));
|
|
76
|
+
};
|
|
77
|
+
x.displayName = "RichTextField";
|
|
78
|
+
const k = x;
|
|
79
|
+
export {
|
|
80
|
+
k as RichTextField
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/FormInfo/RichTextField/index.tsx"],"sourcesContent":["import * as ReactFormAntd from '@kne/react-form-antd';\nimport classNames from 'classnames';\nimport type { ComponentType, FC, ReactNode } from 'react';\nimport { Suspense, lazy } from 'react';\nimport type { VariableMentionItem } from '@/components/Editor/variableMention';\nimport styles from './style.module.scss';\n\nconst RichTextEditor = lazy(() =>\n import('@/components/Editor').then((m) => ({ default: m.RichTextEditor })),\n);\n\nexport type RichTextFieldProps = {\n name: string;\n label?: ReactNode;\n labelTips?: ReactNode | ((props: RichTextFieldProps) => ReactNode);\n rule?: string;\n disabled?: boolean;\n readOnly?: boolean;\n placeholder?: string;\n minHeight?: number;\n enableVariableMention?: boolean;\n variables?: VariableMentionItem[];\n catalogError?: string;\n className?: string;\n /** remount 键(换文档时传入) */\n editorKey?: string;\n [key: string]: unknown;\n};\n\ntype FieldRenderProps = {\n value?: string;\n onChange?: (v: string) => void;\n disabled?: boolean;\n id?: string;\n};\n\ntype KneHooks = {\n useDecorator: (\n opts: Record<string, unknown>,\n ) => (Comp: ComponentType<FieldRenderProps>) => ReactNode;\n};\n\n/**\n * FormInfo 富文本字段:外观对齐 Input;L2 Editor 懒加载;「插入变量」+ 原子色块。\n */\nconst RichTextControl: FC<\n FieldRenderProps & {\n readOnly?: boolean;\n placeholder?: string;\n minHeight?: number;\n enableVariableMention?: boolean;\n variables?: VariableMentionItem[];\n catalogError?: string;\n className?: string;\n editorKey?: string;\n }\n> = ({\n value = '',\n onChange,\n disabled,\n readOnly,\n placeholder,\n minHeight = 140,\n enableVariableMention,\n variables,\n catalogError,\n className,\n editorKey,\n id,\n}) => (\n <div\n className={classNames(\n 'marsun-form-rich-text',\n styles['form-rich-text'],\n disabled && styles['form-rich-text-disabled'],\n className,\n )}\n data-field-id={id}\n >\n <Suspense fallback={<div className={styles['form-rich-text-loading']}>加载编辑器…</div>}>\n <RichTextEditor\n key={editorKey || 'rte'}\n value={value}\n onChange={onChange}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={placeholder}\n minHeight={minHeight}\n enableVariableMention={enableVariableMention}\n variables={variables}\n catalogError={catalogError}\n />\n </Suspense>\n </div>\n);\n\nconst RichTextFieldInner: FC<RichTextFieldProps> = (props) => {\n const { useDecorator } = (ReactFormAntd as unknown as { hooks: KneHooks }).hooks;\n const {\n variables,\n catalogError,\n placeholder,\n className,\n enableVariableMention,\n readOnly,\n minHeight,\n editorKey,\n ...rest\n } = props;\n const render = useDecorator({\n fieldName: 'richTextEditor',\n ...rest,\n });\n return render((fieldProps) => (\n <RichTextControl\n {...fieldProps}\n variables={variables}\n catalogError={catalogError}\n placeholder={placeholder}\n className={className}\n enableVariableMention={enableVariableMention}\n readOnly={readOnly}\n minHeight={minHeight}\n editorKey={editorKey}\n />\n ));\n};\n\nRichTextFieldInner.displayName = 'RichTextField';\n\nexport const RichTextField = RichTextFieldInner as ComponentType<RichTextFieldProps>;\n\nexport default RichTextField;\n"],"names":["RichTextEditor","lazy","m","RichTextControl","value","onChange","disabled","readOnly","placeholder","minHeight","enableVariableMention","variables","catalogError","className","editorKey","id","jsx","classNames","styles","Suspense","RichTextFieldInner","props","useDecorator","ReactFormAntd","rest","fieldProps","RichTextField"],"mappings":";;;;;AAOA,MAAMA,IAAiBC;AAAA,EAAK,MAC1B,OAAO,uBAAqB,EAAE,KAAK,CAACC,OAAO,EAAE,SAASA,EAAE,iBAAiB;AAC3E,GAoCMC,IAWF,CAAC;AAAA,EACH,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,uBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAC,EAAO,gBAAgB;AAAA,MACvBZ,KAAYY,EAAO,yBAAyB;AAAA,MAC5CL;AAAA,IAAA;AAAA,IAEF,iBAAeE;AAAA,IAEf,UAAA,gBAAAC,EAACG,GAAA,EAAS,UAAU,gBAAAH,EAAC,OAAA,EAAI,WAAWE,EAAO,wBAAwB,GAAG,UAAA,SAAA,CAAM,GAC1E,UAAA,gBAAAF;AAAA,MAAChB;AAAA,MAAA;AAAA,QAEC,OAAAI;AAAA,QACA,UAAAC;AAAA,QACA,UAAAC;AAAA,QACA,UAAAC;AAAA,QACA,aAAAC;AAAA,QACA,WAAAC;AAAA,QACA,uBAAAC;AAAA,QACA,WAAAC;AAAA,QACA,cAAAC;AAAA,MAAA;AAAA,MATKE,KAAa;AAAA,IAAA,EAUpB,CACF;AAAA,EAAA;AACF,GAGIM,IAA6C,CAACC,MAAU;AAC5D,QAAM,EAAE,cAAAC,MAAkBC,EAAiD,OACrE;AAAA,IACJ,WAAAZ;AAAA,IACA,cAAAC;AAAA,IACA,aAAAJ;AAAA,IACA,WAAAK;AAAA,IACA,uBAAAH;AAAA,IACA,UAAAH;AAAA,IACA,WAAAE;AAAA,IACA,WAAAK;AAAA,IACA,GAAGU;AAAA,EAAA,IACDH;AAKJ,SAJeC,EAAa;AAAA,IAC1B,WAAW;AAAA,IACX,GAAGE;AAAA,EAAA,CACJ,EACa,CAACC,MACb,gBAAAT;AAAA,IAACb;AAAA,IAAA;AAAA,MACE,GAAGsB;AAAA,MACJ,WAAAd;AAAA,MACA,cAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,WAAAK;AAAA,MACA,uBAAAH;AAAA,MACA,UAAAH;AAAA,MACA,WAAAE;AAAA,MACA,WAAAK;AAAA,IAAA;AAAA,EAAA,CAEH;AACH;AAEAM,EAAmB,cAAc;AAE1B,MAAMM,IAAgBN;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
"form-rich-text": "_form-rich-text_ryn8i_2",
|
|
3
|
+
"form-rich-text-disabled": "_form-rich-text-disabled_ryn8i_48",
|
|
4
|
+
"form-rich-text-loading": "_form-rich-text-loading_ryn8i_54"
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
r as default
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { VariableMentionItem } from '../../Editor/variableMention';
|
|
3
|
+
export type VariableMentionFieldProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
labelTips?: ReactNode | ((props: VariableMentionFieldProps) => ReactNode);
|
|
7
|
+
rule?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
enableVariableMention?: boolean;
|
|
11
|
+
variables?: VariableMentionItem[];
|
|
12
|
+
catalogError?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
export declare const VariableMentionField: ComponentType<VariableMentionFieldProps>;
|
|
17
|
+
export default VariableMentionField;
|