@finema/core 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +7 -2
  3. package/dist/runtime/components/FlexDeck/index.vue +79 -79
  4. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  5. package/dist/runtime/components/Form/Fields.vue +13 -13
  6. package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
  7. package/dist/runtime/components/Form/InputCheckboxGroup/index.vue +21 -21
  8. package/dist/runtime/components/Form/InputCurrency/index.vue +49 -49
  9. package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -0
  10. package/dist/runtime/components/Form/InputDateTime/index.d.vue.ts +1 -0
  11. package/dist/runtime/components/Form/InputDateTime/index.vue +63 -61
  12. package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +1 -0
  13. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +57 -56
  14. package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
  15. package/dist/runtime/components/Form/InputSelect/index.vue +46 -46
  16. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +62 -62
  17. package/dist/runtime/components/Form/InputTags/index.vue +54 -54
  18. package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
  19. package/dist/runtime/components/Form/InputTime/index.vue +38 -38
  20. package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
  21. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
  22. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +50 -50
  23. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +50 -50
  24. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +50 -50
  25. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadExtension.d.ts +9 -0
  26. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadExtension.js +38 -0
  27. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.d.vue.ts +4 -0
  28. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue +104 -0
  29. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue.d.ts +4 -0
  30. package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.d.vue.ts +8 -0
  31. package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue +147 -0
  32. package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue.d.ts +8 -0
  33. package/dist/runtime/components/Form/InputWYSIWYG/index.d.vue.ts +14 -2
  34. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +309 -210
  35. package/dist/runtime/components/Form/InputWYSIWYG/index.vue.d.ts +14 -2
  36. package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +12 -52
  37. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  38. package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
  39. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  40. package/dist/runtime/components/Form/fileState/MultipleFilesState.vue +75 -75
  41. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  42. package/dist/runtime/components/Form/index.vue +5 -5
  43. package/dist/runtime/components/Image.vue +28 -28
  44. package/dist/runtime/components/Log/index.vue +17 -17
  45. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  46. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  47. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  48. package/dist/runtime/components/Table/ColumnText.vue +1 -1
  49. package/dist/runtime/components/Table/Pagination.vue +46 -46
  50. package/dist/runtime/components/Table/Simple.vue +16 -16
  51. package/dist/runtime/server/tsconfig.json +3 -3
  52. package/package.json +3 -11
  53. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.d.vue.ts +0 -12
  54. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -38
  55. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue.d.ts +0 -12
@@ -1,72 +1,78 @@
1
1
  <template>
2
2
  <FieldWrapper v-bind="wrapperProps">
3
3
  <div :class="ui.container()">
4
- <div
5
- v-if="showToolbar"
6
- :class="ui.toolbar()"
4
+ <Editor
5
+ v-slot="{ editor }"
6
+ v-model="value"
7
+ content-type="html"
8
+ :editable="editable"
9
+ placeholder="Write, type '/' for commands..."
10
+ :autofocus="autoFocus"
11
+ class="min-h-[200px]"
12
+ :extensions="[
13
+ TextAlign.configure({
14
+ types: ['heading', 'paragraph'],
15
+ alignments: ['left', 'center', 'right', 'justify']
16
+ }),
17
+ ImageUpload.configure(image)
18
+ ]"
19
+ :ui="{
20
+ content: '',
21
+ base: ['min-h-[200px] w-full sm:px-3 py-1']
22
+ }"
23
+ :handlers="customHandlers"
7
24
  >
8
- <div
9
- v-for="(items, index) in menuItems"
10
- :key="index"
11
- :class="ui.toolbarGroup()"
25
+ <EditorToolbar
26
+ :editor="editor"
27
+ :items="toolbarItems"
28
+ :class="ui.toolbar()"
12
29
  >
13
- <button
14
- v-for="item in items"
15
- :key="item.name"
16
- :class="[ui.menuItem(), { [ui.menuItemActive()]: item.isActive?.() }]"
17
- type="button"
18
- :title="item.title"
19
- @click="item.action"
20
- >
21
- <Icon
22
- :name="item.icon"
23
- :class="ui.icon()"
30
+ <template #link>
31
+ <EditorLinkPopover
32
+ :editor="editor"
33
+ auto-open
24
34
  />
25
- </button>
26
- </div>
27
- </div>
28
- <ClientOnly>
29
- <EditorContent
35
+ </template>
36
+ </EditorToolbar>
37
+ <EditorToolbar
38
+ :editor="editor"
39
+ :items="imageToolbarItems(editor)"
40
+ layout="bubble"
41
+ :should-show="({ editor: editor2, view }) => {
42
+ return editor2.isActive('image') && view.hasFocus();
43
+ }"
44
+ />
45
+
46
+ <EditorSuggestionMenu
30
47
  :editor="editor"
31
- :class="ui.editorContent()"
48
+ :items="suggestionItems"
49
+ :append-to="appendToBody"
32
50
  />
33
- <template #fallback>
34
- <div
35
- class="prose min-h-[200px] px-4 py-2"
36
- v-html="value"
37
- />
38
- </template>
39
- </ClientOnly>
51
+ </Editor>
40
52
  </div>
41
53
  </FieldWrapper>
42
54
  </template>
43
55
 
44
56
  <script setup>
45
- import { computed, watch } from "vue";
46
- import { EditorContent, useEditor } from "@tiptap/vue-3";
47
- import StarterKit from "@tiptap/starter-kit";
48
- import Underline from "@tiptap/extension-underline";
49
- import TextAlign from "@tiptap/extension-text-align";
50
- import Link from "@tiptap/extension-link";
51
- import Image from "@tiptap/extension-image";
52
- import Youtube from "@tiptap/extension-youtube";
57
+ import { computed } from "vue";
53
58
  import { useFieldHOC } from "#core/composables/useForm";
54
59
  import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
55
60
  import { wysiwygTheme } from "#core/theme/wysiwyg";
56
61
  import { useUiConfig } from "#core/composables/useConfig";
62
+ import { TextAlign } from "@tiptap/extension-text-align";
63
+ import { ImageUpload } from "./EditorImageUploadExtension";
64
+ import EditorLinkPopover from "./EditorLinkPopover.vue";
57
65
  const props = defineProps({
58
- editable: { type: Boolean, required: false },
59
- autofocus: { type: Boolean, required: false },
60
- content: { type: String, required: false },
66
+ editable: { type: Boolean, required: false, default: () => true },
67
+ image: { type: Object, required: false, default: () => ({
68
+ bodyKey: "file",
69
+ responseURL: "url",
70
+ responsePath: "path",
71
+ responseName: "name",
72
+ responseSize: "size",
73
+ responseID: "id"
74
+ }) },
61
75
  toolbar: { type: Object, required: false },
62
- minHeight: { type: [String, Number], required: false },
63
- maxHeight: { type: [String, Number], required: false },
64
- size: { type: String, required: false, default: "md" },
65
- color: { type: String, required: false, default: "gray" },
66
- imageUpload: { type: Object, required: false },
67
- linkOptions: { type: Object, required: false },
68
- containerUi: { type: null, required: false },
69
- image: { type: Object, required: false },
70
76
  form: { type: Object, required: false },
71
77
  name: { type: String, required: true },
72
78
  errorMessage: { type: String, required: false },
@@ -86,196 +92,289 @@ const {
86
92
  value,
87
93
  wrapperProps
88
94
  } = useFieldHOC(props);
89
- const ui = computed(() => useUiConfig(wysiwygTheme, "wysiwyg")({
90
- size: props.size,
91
- color: props.color
92
- }));
93
- const showToolbar = computed(() => {
94
- if (!props.toolbar) return true;
95
- return Object.values(props.toolbar).some(Boolean);
96
- });
97
- const editor = useEditor({
98
- content: value.value,
99
- extensions: [
100
- StarterKit,
101
- Underline,
102
- TextAlign.configure({
103
- types: ["heading", "paragraph"]
95
+ const ui = computed(() => useUiConfig(wysiwygTheme, "wysiwyg")({}));
96
+ const appendToBody = false ? () => document.body : void 0;
97
+ const customHandlers = {
98
+ imageUpload: {
99
+ canExecute: (editor) => editor.can().insertContent({
100
+ type: "imageUpload"
104
101
  }),
105
- Link.configure({
106
- openOnClick: false
102
+ execute: (editor) => editor.chain().focus().insertContent({
103
+ type: "imageUpload"
107
104
  }),
108
- Image,
109
- Youtube
110
- ],
111
- editorProps: {
112
- attributes: {
113
- class: "prose px-4 py-2 focus:outline-none min-h-[200px]"
114
- }
115
- },
116
- onUpdate: ({
117
- editor: editor2
118
- }) => {
119
- value.value = editor2.getHTML();
105
+ isActive: (editor) => editor.isActive("imageUpload"),
106
+ isDisabled: void 0
120
107
  }
121
- });
122
- watch(value, (newValue) => {
123
- if (editor.value && newValue !== editor.value.getHTML()) {
124
- editor.value.commands.setContent(newValue);
125
- }
126
- });
127
- const toolbarConfig = {
128
- format: [
108
+ };
109
+ const imageToolbarItems = (editor) => {
110
+ const node = editor.state.doc.nodeAt(editor.state.selection.from);
111
+ return [[{
112
+ icon: "i-lucide-download",
113
+ to: node?.attrs?.src,
114
+ download: true,
115
+ tooltip: {
116
+ text: "Download"
117
+ }
118
+ }], [{
119
+ icon: "i-lucide-trash",
120
+ tooltip: {
121
+ text: "Delete"
122
+ },
123
+ onClick: () => {
124
+ const {
125
+ state
126
+ } = editor;
127
+ const {
128
+ selection
129
+ } = state;
130
+ const pos = selection.from;
131
+ const node2 = state.doc.nodeAt(pos);
132
+ if (node2 && node2.type.name === "image") {
133
+ editor.chain().focus().deleteRange({
134
+ from: pos,
135
+ to: pos + node2.nodeSize
136
+ }).run();
137
+ }
138
+ }
139
+ }]];
140
+ };
141
+ const toolbarItems = [
142
+ // Block types
143
+ [
129
144
  {
130
- key: "bold",
131
- name: "bold",
132
- icon: "ph:text-b-bold",
133
- action: () => editor.value?.chain().focus().toggleBold().run(),
134
- isActive: () => editor.value?.isActive("bold") || false,
135
- title: "\u0E15\u0E31\u0E27\u0E2B\u0E19\u0E32"
145
+ icon: "i-lucide-heading",
146
+ tooltip: {
147
+ text: "Headings"
148
+ },
149
+ content: {
150
+ align: "start"
151
+ },
152
+ items: [{
153
+ kind: "heading",
154
+ level: 1,
155
+ icon: "i-lucide-heading-1",
156
+ label: "Heading 1"
157
+ }, {
158
+ kind: "heading",
159
+ level: 2,
160
+ icon: "i-lucide-heading-2",
161
+ label: "Heading 2"
162
+ }, {
163
+ kind: "heading",
164
+ level: 3,
165
+ icon: "i-lucide-heading-3",
166
+ label: "Heading 3"
167
+ }, {
168
+ kind: "heading",
169
+ level: 4,
170
+ icon: "i-lucide-heading-4",
171
+ label: "Heading 4"
172
+ }]
136
173
  },
174
+ // Text alignment
137
175
  {
138
- key: "italic",
139
- name: "italic",
140
- icon: "ph:text-italic",
141
- action: () => editor.value?.chain().focus().toggleItalic().run(),
142
- isActive: () => editor.value?.isActive("italic") || false,
143
- title: "\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E35\u0E22\u0E07"
176
+ icon: "i-lucide-align-justify",
177
+ tooltip: {
178
+ text: "Text Align"
179
+ },
180
+ content: {
181
+ align: "end"
182
+ },
183
+ items: [
184
+ {
185
+ kind: "textAlign",
186
+ align: "left",
187
+ icon: "i-lucide-align-left",
188
+ label: "Align Left"
189
+ },
190
+ {
191
+ kind: "textAlign",
192
+ align: "center",
193
+ icon: "i-lucide-align-center",
194
+ label: "Align Center"
195
+ },
196
+ {
197
+ kind: "textAlign",
198
+ align: "right",
199
+ icon: "i-lucide-align-right",
200
+ label: "Align Right"
201
+ },
202
+ {
203
+ kind: "textAlign",
204
+ align: "justify",
205
+ icon: "i-lucide-align-justify",
206
+ label: "Align Justify"
207
+ }
208
+ ]
144
209
  },
145
210
  {
146
- key: "underline",
147
- name: "underline",
148
- icon: "ph:text-underline",
149
- action: () => editor.value?.chain().focus().toggleUnderline().run(),
150
- isActive: () => editor.value?.isActive("underline") || false,
151
- title: "\u0E02\u0E35\u0E14\u0E40\u0E2A\u0E49\u0E19\u0E43\u0E15\u0E49"
152
- }
153
- ],
154
- list: [
211
+ icon: "i-lucide-list",
212
+ tooltip: {
213
+ text: "Lists"
214
+ },
215
+ content: {
216
+ align: "start"
217
+ },
218
+ items: [{
219
+ kind: "bulletList",
220
+ icon: "i-lucide-list",
221
+ label: "Bullet List"
222
+ }, {
223
+ kind: "orderedList",
224
+ icon: "i-lucide-list-ordered",
225
+ label: "Ordered List"
226
+ }]
227
+ },
155
228
  {
156
- key: "bulletList",
157
- name: "bullet-list",
158
- icon: "ph:list-bullets",
159
- action: () => editor.value?.chain().focus().toggleBulletList().run(),
160
- isActive: () => editor.value?.isActive("bulletList") || false,
161
- title: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E31\u0E0D\u0E25\u0E31\u0E01\u0E29\u0E13\u0E4C"
229
+ kind: "blockquote",
230
+ icon: "i-lucide-text-quote",
231
+ tooltip: {
232
+ text: "Blockquote"
233
+ }
234
+ },
235
+ {
236
+ kind: "codeBlock",
237
+ icon: "i-lucide-square-code",
238
+ tooltip: {
239
+ text: "Code Block"
240
+ }
162
241
  },
163
242
  {
164
- key: "orderedList",
165
- name: "ordered-list",
166
- icon: "ph:list-numbers",
167
- action: () => editor.value?.chain().focus().toggleOrderedList().run(),
168
- isActive: () => editor.value?.isActive("orderedList") || false,
169
- title: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E25\u0E33\u0E14\u0E31\u0E1A"
243
+ kind: "horizontalRule",
244
+ icon: "i-lucide-separator-horizontal",
245
+ tooltip: {
246
+ text: "Horizontal Rule"
247
+ }
170
248
  }
171
249
  ],
172
- textAlign: [
250
+ // Text formatting
251
+ [{
252
+ kind: "mark",
253
+ mark: "bold",
254
+ icon: "i-lucide-bold",
255
+ tooltip: {
256
+ text: "Bold"
257
+ }
258
+ }, {
259
+ kind: "mark",
260
+ mark: "italic",
261
+ icon: "i-lucide-italic",
262
+ tooltip: {
263
+ text: "Italic"
264
+ }
265
+ }, {
266
+ kind: "mark",
267
+ mark: "underline",
268
+ icon: "i-lucide-underline",
269
+ tooltip: {
270
+ text: "Underline"
271
+ }
272
+ }, {
273
+ kind: "mark",
274
+ mark: "strike",
275
+ icon: "i-lucide-strikethrough",
276
+ tooltip: {
277
+ text: "Strikethrough"
278
+ }
279
+ }, {
280
+ kind: "mark",
281
+ mark: "code",
282
+ icon: "i-lucide-code",
283
+ tooltip: {
284
+ text: "Code"
285
+ }
286
+ }],
287
+ // Link & image
288
+ [
289
+ {
290
+ slot: "link"
291
+ },
292
+ ...props.image?.requestOptions ? [{
293
+ kind: "imageUpload",
294
+ icon: "i-lucide-image"
295
+ }] : []
296
+ ],
297
+ // History controls
298
+ [{
299
+ kind: "undo",
300
+ icon: "i-lucide-undo",
301
+ tooltip: {
302
+ text: "Undo"
303
+ }
304
+ }, {
305
+ kind: "redo",
306
+ icon: "i-lucide-redo",
307
+ tooltip: {
308
+ text: "Redo"
309
+ }
310
+ }]
311
+ ];
312
+ const suggestionItems = [
313
+ [
314
+ {
315
+ type: "label",
316
+ label: "Text"
317
+ },
318
+ {
319
+ kind: "paragraph",
320
+ label: "Paragraph",
321
+ icon: "i-lucide-type"
322
+ },
173
323
  {
174
- key: "textAlign",
175
- name: "align-left",
176
- icon: "ph:text-align-left",
177
- action: () => editor.value?.chain().focus().setTextAlign("left").run(),
178
- isActive: () => editor.value?.isActive({
179
- textAlign: "left"
180
- }) || false,
181
- title: "\u0E08\u0E31\u0E14\u0E0A\u0E34\u0E14\u0E0B\u0E49\u0E32\u0E22"
324
+ kind: "heading",
325
+ level: 1,
326
+ label: "Heading 1",
327
+ icon: "i-lucide-heading-1"
182
328
  },
183
329
  {
184
- key: "textAlign",
185
- name: "align-center",
186
- icon: "ph:text-align-center",
187
- action: () => editor.value?.chain().focus().setTextAlign("center").run(),
188
- isActive: () => editor.value?.isActive({
189
- textAlign: "center"
190
- }) || false,
191
- title: "\u0E08\u0E31\u0E14\u0E01\u0E36\u0E48\u0E07\u0E01\u0E25\u0E32\u0E07"
330
+ kind: "heading",
331
+ level: 2,
332
+ label: "Heading 2",
333
+ icon: "i-lucide-heading-2"
192
334
  },
193
335
  {
194
- key: "textAlign",
195
- name: "align-right",
196
- icon: "ph:text-align-right",
197
- action: () => editor.value?.chain().focus().setTextAlign("right").run(),
198
- isActive: () => editor.value?.isActive({
199
- textAlign: "right"
200
- }) || false,
201
- title: "\u0E08\u0E31\u0E14\u0E0A\u0E34\u0E14\u0E02\u0E27\u0E32"
336
+ kind: "heading",
337
+ level: 3,
338
+ label: "Heading 3",
339
+ icon: "i-lucide-heading-3"
202
340
  }
203
341
  ],
204
- media: [
342
+ [
205
343
  {
206
- key: "link",
207
- name: "link",
208
- icon: "ph:link-simple",
209
- action: () => {
210
- const url = window.prompt("URL");
211
- if (url) {
212
- editor.value?.chain().focus().setLink({
213
- href: url
214
- }).run();
215
- }
216
- },
217
- isActive: () => editor.value?.isActive("link") || false,
218
- title: "\u0E41\u0E17\u0E23\u0E01\u0E25\u0E34\u0E07\u0E01\u0E4C"
344
+ type: "label",
345
+ label: "Lists"
219
346
  },
220
347
  {
221
- key: "image",
222
- name: "image",
223
- icon: "ph:image",
224
- action: () => {
225
- const url = window.prompt("URL \u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E");
226
- if (url) {
227
- editor.value?.chain().focus().setImage({
228
- src: url
229
- }).run();
230
- }
231
- },
232
- title: "\u0E41\u0E17\u0E23\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"
348
+ kind: "bulletList",
349
+ label: "Bullet List",
350
+ icon: "i-lucide-list"
233
351
  },
234
352
  {
235
- key: "youtube",
236
- name: "video",
237
- icon: "ph:video-camera",
238
- action: () => {
239
- const url = window.prompt("URL \u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D");
240
- if (url) {
241
- editor.value?.chain().focus().setYoutubeVideo({
242
- src: url
243
- }).run();
244
- }
245
- },
246
- title: "\u0E41\u0E17\u0E23\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D"
353
+ kind: "orderedList",
354
+ label: "Numbered List",
355
+ icon: "i-lucide-list-ordered"
247
356
  }
248
357
  ],
249
- history: [
358
+ [
359
+ {
360
+ type: "label",
361
+ label: "Insert"
362
+ },
363
+ {
364
+ kind: "blockquote",
365
+ label: "Blockquote",
366
+ icon: "i-lucide-text-quote"
367
+ },
250
368
  {
251
- key: "undo",
252
- name: "undo",
253
- icon: "ph:arrow-counter-clockwise",
254
- action: () => editor.value?.chain().focus().undo().run(),
255
- title: "\u0E40\u0E25\u0E34\u0E01\u0E17\u0E33"
369
+ kind: "codeBlock",
370
+ label: "Code Block",
371
+ icon: "i-lucide-square-code"
256
372
  },
257
373
  {
258
- key: "redo",
259
- name: "redo",
260
- icon: "ph:arrow-clockwise",
261
- action: () => editor.value?.chain().focus().redo().run(),
262
- title: "\u0E17\u0E33\u0E43\u0E2B\u0E21\u0E48"
374
+ kind: "horizontalRule",
375
+ label: "Divider",
376
+ icon: "i-lucide-separator-horizontal"
263
377
  }
264
378
  ]
265
- };
266
- const menuItems = computed(() => {
267
- const items = [];
268
- Object.entries(toolbarConfig).forEach(([groupKey, groupItems]) => {
269
- const enabledItems = groupItems.filter((item) => {
270
- if (groupKey === "textAlign") {
271
- return props.toolbar?.textAlign;
272
- }
273
- return props.toolbar?.[item.key];
274
- });
275
- if (enabledItems.length > 0) {
276
- items.push(enabledItems);
277
- }
278
- });
279
- return items;
280
- });
379
+ ];
281
380
  </script>
@@ -1,7 +1,19 @@
1
1
  import type { IWYSIWYGFieldProps } from '#core/components/Form/InputWYSIWYG/types';
2
2
  declare const __VLS_export: import("vue").DefineComponent<IWYSIWYGFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IWYSIWYGFieldProps> & Readonly<{}>, {
3
- size: "xs" | "sm" | "md" | "lg" | "xl";
4
- color: "primary" | "gray";
3
+ image: {
4
+ requestOptions?: Omit<import("axios").AxiosRequestConfig, "baseURL"> & {
5
+ baseURL: string;
6
+ };
7
+ uploadPathURL?: string;
8
+ bodyKey?: string;
9
+ responseURL?: string;
10
+ responsePath?: string;
11
+ responseName?: string;
12
+ responseSize?: string;
13
+ responseID?: string;
14
+ maxSize?: number;
15
+ };
16
+ editable: boolean;
5
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
18
  declare const _default: typeof __VLS_export;
7
19
  export default _default;
@@ -3,60 +3,20 @@ import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/
3
3
  import type { AxiosRequestConfig } from 'axios';
4
4
  export interface IWYSIWYGFieldProps extends IFieldProps {
5
5
  editable?: boolean;
6
- autofocus?: boolean;
7
- content?: string;
8
- toolbar?: {
9
- bold?: boolean;
10
- italic?: boolean;
11
- underline?: boolean;
12
- strike?: boolean;
13
- code?: boolean;
14
- heading?: boolean | number[];
15
- paragraph?: boolean;
16
- bulletList?: boolean;
17
- orderedList?: boolean;
18
- blockquote?: boolean;
19
- codeBlock?: boolean;
20
- horizontalRule?: boolean;
21
- link?: boolean;
22
- image?: {
23
- requestOptions?: Omit<AxiosRequestConfig, 'baseURL'> & {
24
- baseURL: string;
25
- };
26
- uploadPathURL?: string;
27
- bodyKey?: string;
28
- responseURL?: string;
29
- responsePath?: string;
30
- responseName?: string;
31
- responseSize?: string;
32
- responseID?: string;
33
- accept?: string[] | string;
34
- maxSize?: number;
35
- } | boolean;
36
- youtube?: boolean;
37
- textAlign?: boolean;
38
- undo?: boolean;
39
- redo?: boolean;
40
- };
41
- minHeight?: string | number;
42
- maxHeight?: string | number;
43
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
44
- color?: 'primary' | 'gray';
45
- imageUpload?: {
46
- enabled?: boolean;
47
- uploadUrl?: string;
48
- maxSize?: number;
49
- accept?: string[];
50
- headers?: Record<string, string>;
51
- };
52
- linkOptions?: {
53
- openOnClick?: boolean;
54
- HTMLAttributes?: Record<string, any>;
55
- };
56
- containerUi?: any;
57
6
  image?: {
58
- requestOptions?: any;
7
+ requestOptions?: Omit<AxiosRequestConfig, 'baseURL'> & {
8
+ baseURL: string;
9
+ };
10
+ uploadPathURL?: string;
11
+ bodyKey?: string;
12
+ responseURL?: string;
13
+ responsePath?: string;
14
+ responseName?: string;
15
+ responseSize?: string;
16
+ responseID?: string;
17
+ maxSize?: number;
59
18
  };
19
+ toolbar?: {};
60
20
  }
61
21
  export type IWYSIWYGField = IFormFieldBase<INPUT_TYPES.WYSIWYG, IWYSIWYGFieldProps, {
62
22
  change?: (content: string) => void;