@bagelink/vue 1.4.159 → 1.4.163
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/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/calendar/CalendarPopover.vue.d.ts +2 -0
- package/dist/components/calendar/CalendarPopover.vue.d.ts.map +1 -1
- package/dist/components/calendar/CalendarTypes.d.ts +2 -0
- package/dist/components/calendar/CalendarTypes.d.ts.map +1 -1
- package/dist/components/calendar/Index.vue.d.ts +2 -0
- package/dist/components/calendar/Index.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioGroup.vue.d.ts +6 -0
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/index.vue.d.ts +1 -0
- package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.mjs +22 -22
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Modal.vue +45 -23
- package/src/components/calendar/CalendarPopover.vue +20 -24
- package/src/components/calendar/CalendarTypes.ts +2 -0
- package/src/components/calendar/Index.vue +5 -5
- package/src/components/calendar/views/WeekView.vue +7 -1
- package/src/components/form/inputs/RadioGroup.vue +22 -6
- package/src/components/form/inputs/RichText/index.vue +275 -149
- package/src/components/form/inputs/SelectInput.vue +2 -2
- package/src/styles/appearance.css +10 -1
- package/src/styles/layout.css +2 -1
- package/src/styles/theme.css +1 -0
|
@@ -39,6 +39,8 @@ const props = defineProps<{
|
|
|
39
39
|
hide?: string[]
|
|
40
40
|
// Control autofocus behavior
|
|
41
41
|
autofocus?: boolean
|
|
42
|
+
// Text color
|
|
43
|
+
textColor?: string
|
|
42
44
|
}>()
|
|
43
45
|
|
|
44
46
|
const emit = defineEmits(['update:modelValue'])
|
|
@@ -414,8 +416,8 @@ function showInlineToolbarForSelection() {
|
|
|
414
416
|
const rangeClone = range.cloneRange()
|
|
415
417
|
inlineToolbarSelection.value = selection
|
|
416
418
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
+
// Store the cloned range for later use
|
|
420
|
+
; (inlineToolbarSelection.value as any)._storedRange = rangeClone
|
|
419
421
|
|
|
420
422
|
showInlineToolbar.value = true
|
|
421
423
|
}
|
|
@@ -1480,7 +1482,7 @@ function createNewTable(doc: Document) {
|
|
|
1480
1482
|
console.log('Trying to add edit button to new table...')
|
|
1481
1483
|
if (doc && (doc as any).__addEditButtonsToTables) {
|
|
1482
1484
|
console.log('Calling __addEditButtonsToTables...')
|
|
1483
|
-
|
|
1485
|
+
; (doc as any).__addEditButtonsToTables()
|
|
1484
1486
|
} else {
|
|
1485
1487
|
console.log('__addEditButtonsToTables not found, calling setupTableEditButtons...')
|
|
1486
1488
|
setupTableEditButtons(doc)
|
|
@@ -1582,13 +1584,13 @@ function deleteEmbed() {
|
|
|
1582
1584
|
|
|
1583
1585
|
// Expose openLinkModal to editor state
|
|
1584
1586
|
; (editor.state as any).openLinkModal = openLinkModal
|
|
1585
|
-
|
|
1587
|
+
; (editor.state as any).showTooltipMessage = showTooltipMessage
|
|
1586
1588
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1589
|
+
// Expose openTableEditor to editor state
|
|
1590
|
+
; (editor.state as any).openTableEditor = openTableEditor
|
|
1591
|
+
; (editor.state as any).openImageModal = openImageModal
|
|
1592
|
+
; (editor.state as any).openEmbedModal = openEmbedModal
|
|
1593
|
+
; (editor.state as any).openVideoModal = openVideoModal
|
|
1592
1594
|
|
|
1593
1595
|
// Table manipulation functions
|
|
1594
1596
|
function mergeCellRight() {
|
|
@@ -1916,6 +1918,12 @@ function handleTableContextMenu(event: MouseEvent) {
|
|
|
1916
1918
|
}
|
|
1917
1919
|
}
|
|
1918
1920
|
|
|
1921
|
+
// Close context menu when clicking outside
|
|
1922
|
+
function closeTableContextMenu() {
|
|
1923
|
+
showTableContextMenu.value = false
|
|
1924
|
+
contextMenuCell.value = null
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1919
1927
|
// Handle clicks outside context menu
|
|
1920
1928
|
// function handleDocumentClick(event: MouseEvent) {
|
|
1921
1929
|
// if (showTableContextMenu.value) {
|
|
@@ -2515,7 +2523,7 @@ async function initEditor() {
|
|
|
2515
2523
|
min-height: 200px;
|
|
2516
2524
|
font-family: sans-serif !important;
|
|
2517
2525
|
line-height: 1.5;
|
|
2518
|
-
color: inherit;
|
|
2526
|
+
color: ${props.textColor || 'inherit'};
|
|
2519
2527
|
background: transparent;
|
|
2520
2528
|
max-width: 1060px;
|
|
2521
2529
|
margin: 0 auto;
|
|
@@ -2902,28 +2910,38 @@ defineExpose({
|
|
|
2902
2910
|
<div class="bagel-input" v-bind="attrs">
|
|
2903
2911
|
<label v-if="label">{{ label }}</label>
|
|
2904
2912
|
|
|
2905
|
-
<div
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
+
<div
|
|
2914
|
+
class="rounded" :class="[
|
|
2915
|
+
{
|
|
2916
|
+
'rich-text-editor pt-05 px-05 pb-075': !basic,
|
|
2917
|
+
'rich-text-editor--basic': basic,
|
|
2918
|
+
'fullscreen-mode': editor.state.isFullscreen,
|
|
2919
|
+
},
|
|
2920
|
+
]"
|
|
2921
|
+
>
|
|
2922
|
+
<EditorToolbar
|
|
2923
|
+
v-if="editor.state.hasInit && shouldShowToolbar" :config="effectiveToolbarConfig"
|
|
2913
2924
|
:selectedStyles="editor.state.selectedStyles" :hide-images="hideImages" :hide-videos="hideVideos"
|
|
2914
2925
|
:hide-embeds="hideEmbed" :hide-tables="hideTables" :hide-alignment="hideAlignment"
|
|
2915
2926
|
:hide-directions="hideDirections" :hide-h5-h6="hideH5H6" :hide="effectiveHideArray"
|
|
2916
|
-
@action="commands.execute"
|
|
2927
|
+
@action="commands.execute"
|
|
2928
|
+
/>
|
|
2917
2929
|
<div class="editor-container" :class="{ 'split-view': editor.state.isSplitView }">
|
|
2918
|
-
<div
|
|
2919
|
-
|
|
2920
|
-
|
|
2930
|
+
<div
|
|
2931
|
+
class="content-area radius-1"
|
|
2932
|
+
:style="{ height: editor.state.isFullscreen ? 'calc(100vh - 4rem)' : editorHeight }"
|
|
2933
|
+
>
|
|
2934
|
+
<iframe
|
|
2935
|
+
id="rich-text-iframe" ref="iframe" class="editableContent" title="Editor" srcdoc=""
|
|
2921
2936
|
sandbox="allow-same-origin allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-scripts allow-top-navigation allow-top-navigation-by-user-activation"
|
|
2922
|
-
@load="initEditor" @contextmenu="handleTableContextMenu"
|
|
2937
|
+
@load="initEditor" @contextmenu="handleTableContextMenu"
|
|
2938
|
+
/>
|
|
2923
2939
|
</div>
|
|
2924
|
-
<CodeEditor
|
|
2940
|
+
<CodeEditor
|
|
2941
|
+
v-if="editor.state.isSplitView" v-model="editor.state.content" language="html"
|
|
2925
2942
|
:height="editor.state.isFullscreen ? 'calc(100vh - 4rem)' : editorHeight"
|
|
2926
|
-
@update:modelValue="editor.updateState.content('html')"
|
|
2943
|
+
@update:modelValue="editor.updateState.content('html')"
|
|
2944
|
+
/>
|
|
2927
2945
|
</div>
|
|
2928
2946
|
<div v-if="debug" class="flex pt-05">
|
|
2929
2947
|
<p class="txt12 txt-gray mb-0 p-0">
|
|
@@ -2938,39 +2956,51 @@ defineExpose({
|
|
|
2938
2956
|
<Btn thin color="gray" icon="download" @click="debugMethods?.downloadSession">
|
|
2939
2957
|
Download Log
|
|
2940
2958
|
</Btn>
|
|
2941
|
-
<Btn
|
|
2942
|
-
|
|
2959
|
+
<Btn
|
|
2960
|
+
thin color="gray" icon="content_copy"
|
|
2961
|
+
@click="copyText(debugMethods?.exportDebugWithPrompt() || '')"
|
|
2962
|
+
>
|
|
2943
2963
|
Copy Log
|
|
2944
2964
|
</Btn>
|
|
2945
2965
|
</div>
|
|
2946
2966
|
</div>
|
|
2947
2967
|
|
|
2948
2968
|
<!-- Inline Toolbar -->
|
|
2949
|
-
<div
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2969
|
+
<div
|
|
2970
|
+
v-if="showInlineToolbar" class="inline-toolbar" :style="{
|
|
2971
|
+
position: 'fixed',
|
|
2972
|
+
top: `${inlineToolbarPosition.top}px`,
|
|
2973
|
+
left: `${inlineToolbarPosition.left}px`,
|
|
2974
|
+
zIndex: 99,
|
|
2975
|
+
}"
|
|
2976
|
+
>
|
|
2955
2977
|
<div class="inline-toolbar-content">
|
|
2956
|
-
<Btn
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
<Btn
|
|
2978
|
+
<Btn
|
|
2979
|
+
thin flat icon="format_bold" :class="{ active: editor.state.selectedStyles.has('bold') }"
|
|
2980
|
+
@click="runInlineAction('bold')"
|
|
2981
|
+
/>
|
|
2982
|
+
<Btn
|
|
2983
|
+
thin flat icon="format_italic" :class="{ active: editor.state.selectedStyles.has('italic') }"
|
|
2984
|
+
@click="runInlineAction('italic')"
|
|
2985
|
+
/>
|
|
2986
|
+
<Btn
|
|
2987
|
+
thin flat icon="format_underlined"
|
|
2961
2988
|
:class="{ active: editor.state.selectedStyles.has('underline') }"
|
|
2962
|
-
@click="runInlineAction('underline')"
|
|
2989
|
+
@click="runInlineAction('underline')"
|
|
2990
|
+
/>
|
|
2963
2991
|
<span class="separator">|</span>
|
|
2964
2992
|
<Btn thin flat icon="add_link" @click="runInlineAction('link')" />
|
|
2965
2993
|
</div>
|
|
2966
2994
|
</div>
|
|
2967
2995
|
<!-- Table Context Menu -->
|
|
2968
|
-
<div
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2996
|
+
<div
|
|
2997
|
+
v-if="showTableContextMenu" class="table-context-menu" :style="{
|
|
2998
|
+
position: 'fixed',
|
|
2999
|
+
top: `${contextMenuPosition.y}px`,
|
|
3000
|
+
left: `${contextMenuPosition.x}px`,
|
|
3001
|
+
zIndex: 1001,
|
|
3002
|
+
}"
|
|
3003
|
+
>
|
|
2974
3004
|
<div class="context-menu-content" @click.stop>
|
|
2975
3005
|
<div class="menu-header">
|
|
2976
3006
|
<span>Table Actions</span>
|
|
@@ -2979,42 +3009,60 @@ defineExpose({
|
|
|
2979
3009
|
</button>
|
|
2980
3010
|
</div>
|
|
2981
3011
|
<div class="px-025">
|
|
2982
|
-
<Btn
|
|
2983
|
-
|
|
3012
|
+
<Btn
|
|
3013
|
+
v-if="canMergeRight" full-width align-txt="start" thin flat icon="start"
|
|
3014
|
+
class="context-menu-btn" @click="mergeCellRight(); showTableContextMenu = false"
|
|
3015
|
+
>
|
|
2984
3016
|
Merge Right
|
|
2985
3017
|
</Btn>
|
|
2986
|
-
<Btn
|
|
2987
|
-
|
|
3018
|
+
<Btn
|
|
3019
|
+
v-if="canMergeDown" full-width align-txt="start" thin flat icon="text_select_move_down"
|
|
3020
|
+
class="context-menu-btn" @click="mergeCellDown(); showTableContextMenu = false"
|
|
3021
|
+
>
|
|
2988
3022
|
Merge Down
|
|
2989
3023
|
</Btn>
|
|
2990
|
-
<Btn
|
|
2991
|
-
|
|
3024
|
+
<Btn
|
|
3025
|
+
v-if="canSplit" full-width align-txt="start" thin flat icon="call_split"
|
|
3026
|
+
class="context-menu-btn" @click="splitCell(); showTableContextMenu = false"
|
|
3027
|
+
>
|
|
2992
3028
|
Split Cell
|
|
2993
3029
|
</Btn>
|
|
2994
3030
|
<div v-if="canMergeRight || canMergeDown || canSplit" class="context-menu-separator" />
|
|
2995
|
-
<Btn
|
|
2996
|
-
|
|
3031
|
+
<Btn
|
|
3032
|
+
full-width align-txt="start" thin flat icon="add_row_above" class="context-menu-btn"
|
|
3033
|
+
@click="insertRowAbove(); showTableContextMenu = false"
|
|
3034
|
+
>
|
|
2997
3035
|
Insert Row Above
|
|
2998
3036
|
</Btn>
|
|
2999
|
-
<Btn
|
|
3000
|
-
|
|
3037
|
+
<Btn
|
|
3038
|
+
full-width align-txt="start" thin flat icon="add_row_below" class="context-menu-btn"
|
|
3039
|
+
@click="insertRowBelow(); showTableContextMenu = false"
|
|
3040
|
+
>
|
|
3001
3041
|
Insert Row Below
|
|
3002
3042
|
</Btn>
|
|
3003
|
-
<Btn
|
|
3004
|
-
|
|
3043
|
+
<Btn
|
|
3044
|
+
full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
|
|
3045
|
+
@click="deleteRow(); showTableContextMenu = false"
|
|
3046
|
+
>
|
|
3005
3047
|
Delete Row
|
|
3006
3048
|
</Btn>
|
|
3007
3049
|
<div class="context-menu-separator" />
|
|
3008
|
-
<Btn
|
|
3009
|
-
|
|
3050
|
+
<Btn
|
|
3051
|
+
full-width align-txt="start" thin flat icon="add_column_left" class="context-menu-btn"
|
|
3052
|
+
@click="insertColumnLeft(); showTableContextMenu = false"
|
|
3053
|
+
>
|
|
3010
3054
|
Insert Column Left
|
|
3011
3055
|
</Btn>
|
|
3012
|
-
<Btn
|
|
3013
|
-
|
|
3056
|
+
<Btn
|
|
3057
|
+
full-width align-txt="start" thin flat icon="add_column_right" class="context-menu-btn"
|
|
3058
|
+
@click="insertColumnRight(); showTableContextMenu = false"
|
|
3059
|
+
>
|
|
3014
3060
|
Insert Column Right
|
|
3015
3061
|
</Btn>
|
|
3016
|
-
<Btn
|
|
3017
|
-
|
|
3062
|
+
<Btn
|
|
3063
|
+
full-width align-txt="start" thin flat icon="remove" class="context-menu-btn"
|
|
3064
|
+
@click="deleteColumn(); showTableContextMenu = false"
|
|
3065
|
+
>
|
|
3018
3066
|
Delete Column
|
|
3019
3067
|
</Btn>
|
|
3020
3068
|
</div>
|
|
@@ -3024,10 +3072,14 @@ defineExpose({
|
|
|
3024
3072
|
<!-- Link Modal -->
|
|
3025
3073
|
<Modal v-model:visible="showLinkModal" title="Add Link" width="400">
|
|
3026
3074
|
<div class="flex gap-05 align-items-end">
|
|
3027
|
-
<TextInput
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3075
|
+
<TextInput
|
|
3076
|
+
v-model="linkForm.url" label="URL" type="url" placeholder="https://example.com"
|
|
3077
|
+
@keydown.enter="submitLink"
|
|
3078
|
+
/>
|
|
3079
|
+
<Btn
|
|
3080
|
+
icon="open_in_new" class="mb-05 radius-1" flat :disabled="!isValidUrl(linkForm.url)"
|
|
3081
|
+
@click="visitLink"
|
|
3082
|
+
/>
|
|
3031
3083
|
</div>
|
|
3032
3084
|
<CheckInput v-model="linkForm.openInNewTab" label="Open in new tab" type="checkbox" class="mb-2 mt-05" />
|
|
3033
3085
|
<template #footer>
|
|
@@ -3042,36 +3094,54 @@ defineExpose({
|
|
|
3042
3094
|
</div>
|
|
3043
3095
|
|
|
3044
3096
|
<!-- Image Modal -->
|
|
3045
|
-
<Modal
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3097
|
+
<Modal
|
|
3098
|
+
v-model:visible="showImageModal" :title="pendingImageData?.existingImage ? 'Edit Image' : 'Insert Image'"
|
|
3099
|
+
width="500"
|
|
3100
|
+
>
|
|
3101
|
+
<TextInput
|
|
3102
|
+
v-model="imageForm.src" label="Image URL" type="url" placeholder="https://example.com/image.jpg"
|
|
3103
|
+
@keydown.enter="submitImage"
|
|
3104
|
+
/>
|
|
3049
3105
|
<TextInput v-model="imageForm.alt" label="Alt Text" placeholder="Describe the image" />
|
|
3050
3106
|
<div class="flex gap-1">
|
|
3051
|
-
<TextInput
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3107
|
+
<TextInput
|
|
3108
|
+
v-model="imageForm.width" label="Width" placeholder="100% or 500px or auto"
|
|
3109
|
+
help="Examples: 100%, 500px, auto"
|
|
3110
|
+
/>
|
|
3111
|
+
<TextInput
|
|
3112
|
+
v-model="imageForm.height" label="Height" placeholder="auto or 300px"
|
|
3113
|
+
help="Examples: auto, 300px"
|
|
3114
|
+
/>
|
|
3055
3115
|
</div>
|
|
3056
3116
|
<TextInput v-model="imageForm.credit" label="Photo Credit" placeholder="Photographer name (optional)" />
|
|
3057
|
-
<CheckInput
|
|
3058
|
-
|
|
3117
|
+
<CheckInput
|
|
3118
|
+
v-model="imageForm.figcaption" label="Show alt text as caption"
|
|
3119
|
+
help="Photo credit will always be shown if provided"
|
|
3120
|
+
/>
|
|
3059
3121
|
<template #footer>
|
|
3060
3122
|
<div class="flex gap-05 w-100 ">
|
|
3061
3123
|
<Btn value="Cancel" flat thin @click="showImageModal = false" />
|
|
3062
|
-
<Btn
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3124
|
+
<Btn
|
|
3125
|
+
v-if="pendingImageData?.existingImage" value="Delete Image" color="red" flat thin icon="delete"
|
|
3126
|
+
@click="deleteImage"
|
|
3127
|
+
/>
|
|
3128
|
+
<Btn
|
|
3129
|
+
class="ms-auto" :value="pendingImageData?.existingImage ? 'Save Changes' : 'Insert Image'"
|
|
3130
|
+
:disabled="!imageForm.src" @click="submitImage"
|
|
3131
|
+
/>
|
|
3066
3132
|
</div>
|
|
3067
3133
|
</template>
|
|
3068
3134
|
</Modal>
|
|
3069
3135
|
|
|
3070
3136
|
<!-- Embed Modal -->
|
|
3071
|
-
<Modal
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3137
|
+
<Modal
|
|
3138
|
+
v-model:visible="showEmbedModal" :title="pendingEmbedData?.existingEmbed ? 'Edit Embed' : 'Insert Embed'"
|
|
3139
|
+
width="500"
|
|
3140
|
+
>
|
|
3141
|
+
<TextInput
|
|
3142
|
+
v-model="embedForm.src" label="Embed URL or Code" type="url"
|
|
3143
|
+
placeholder="https://www.youtube.com/embed/... or paste iframe code" @keydown.enter="submitEmbed"
|
|
3144
|
+
/>
|
|
3075
3145
|
<div class="flex gap-1">
|
|
3076
3146
|
<TextInput v-model="embedForm.width" label="Width" placeholder="560" />
|
|
3077
3147
|
<TextInput v-model="embedForm.height" label="Height" placeholder="315" />
|
|
@@ -3080,19 +3150,25 @@ defineExpose({
|
|
|
3080
3150
|
<template #footer>
|
|
3081
3151
|
<div class="flex gap-05 w-100">
|
|
3082
3152
|
<Btn value="Cancel" flat thin @click="showEmbedModal = false" />
|
|
3083
|
-
<Btn
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3153
|
+
<Btn
|
|
3154
|
+
v-if="pendingEmbedData?.existingEmbed" value="Delete Embed" color="red" flat thin icon="delete"
|
|
3155
|
+
@click="deleteEmbed"
|
|
3156
|
+
/>
|
|
3157
|
+
<Btn
|
|
3158
|
+
:value="pendingEmbedData?.existingEmbed ? 'Save Changes' : 'Insert Embed'"
|
|
3159
|
+
:disabled="!embedForm.src" class="ms-auto" @click="submitEmbed"
|
|
3160
|
+
/>
|
|
3087
3161
|
</div>
|
|
3088
3162
|
</template>
|
|
3089
3163
|
</Modal>
|
|
3090
3164
|
<!-- Video Modal -->
|
|
3091
3165
|
<Modal v-model:visible="showVideoModal" title="Insert Video" width="500">
|
|
3092
3166
|
<div class="grid gap-0">
|
|
3093
|
-
<TextInput
|
|
3167
|
+
<TextInput
|
|
3168
|
+
v-model="videoForm.src" label="Video URL or Embed Code" type="url"
|
|
3094
3169
|
placeholder="Paste YouTube URL, video file URL, or iframe embed code..."
|
|
3095
|
-
:class="{ error: videoForm.src && !isValidVideoUrl(videoForm.src) }" @keydown.enter="submitVideo"
|
|
3170
|
+
:class="{ error: videoForm.src && !isValidVideoUrl(videoForm.src) }" @keydown.enter="submitVideo"
|
|
3171
|
+
/>
|
|
3096
3172
|
|
|
3097
3173
|
<div v-if="videoForm.src && !isValidVideoUrl(videoForm.src)" class="flex gap-025 opacity-5 -mt-05">
|
|
3098
3174
|
<Icon name="warning" />
|
|
@@ -3101,17 +3177,21 @@ defineExpose({
|
|
|
3101
3177
|
</p>
|
|
3102
3178
|
</div>
|
|
3103
3179
|
|
|
3104
|
-
<TextInput
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3180
|
+
<TextInput
|
|
3181
|
+
v-model="videoForm.width" label="Width" placeholder="100% or 500px or 50vw"
|
|
3182
|
+
help="Examples: 100%, 500px, 50vw, 300"
|
|
3183
|
+
/>
|
|
3184
|
+
|
|
3185
|
+
<SelectInput
|
|
3186
|
+
v-model="videoForm.aspectRatio" label="Aspect Ratio" :options="[
|
|
3187
|
+
{ value: '16:9', label: '16:9 (Standard)' },
|
|
3188
|
+
{ value: '4:3', label: '4:3 (Classic)' },
|
|
3189
|
+
{ value: '9:16', label: '9:16 (Vertical/Shorts)' },
|
|
3190
|
+
{ value: '21:9', label: '21:9 (Cinematic)' },
|
|
3191
|
+
{ value: '1:1', label: '1:1 (Square)' },
|
|
3192
|
+
{ value: 'custom', label: 'Custom' },
|
|
3193
|
+
]"
|
|
3194
|
+
/>
|
|
3115
3195
|
|
|
3116
3196
|
<div v-if="videoForm.aspectRatio === 'custom'" class="grid grid-wrap-2 gap-05">
|
|
3117
3197
|
<TextInput v-model="videoForm.customWidth" label="Width ratio" placeholder="16" type="number" />
|
|
@@ -3124,8 +3204,10 @@ defineExpose({
|
|
|
3124
3204
|
<CheckInput v-model="videoForm.mute" label="Mute" />
|
|
3125
3205
|
<CheckInput v-model="videoForm.loop" label="Loop" />
|
|
3126
3206
|
<CheckInput v-model="videoForm.showCaption" class="grid-span-2" label="Show caption below video" />
|
|
3127
|
-
<TextInput
|
|
3128
|
-
|
|
3207
|
+
<TextInput
|
|
3208
|
+
v-if="videoForm.showCaption" v-model="videoForm.caption" label="Caption" class="grid-span-2"
|
|
3209
|
+
placeholder="Describe the video content"
|
|
3210
|
+
/>
|
|
3129
3211
|
</div>
|
|
3130
3212
|
|
|
3131
3213
|
<!-- Video Preview -->
|
|
@@ -3134,27 +3216,35 @@ defineExpose({
|
|
|
3134
3216
|
Preview:
|
|
3135
3217
|
</p>
|
|
3136
3218
|
<div class="overflow-hidden flex justify-content-center">
|
|
3137
|
-
<BglVideo
|
|
3219
|
+
<BglVideo
|
|
3220
|
+
:src="videoForm.src" class=""
|
|
3138
3221
|
:aspect-ratio="videoForm.aspectRatio === 'custom' && videoForm.customWidth && videoForm.customHeight ? `${videoForm.customWidth}:${videoForm.customHeight}` : videoForm.aspectRatio"
|
|
3139
3222
|
:autoplay="false" :mute="videoForm.mute" :controls="videoForm.controls"
|
|
3140
|
-
:loop="videoForm.loop"
|
|
3223
|
+
:loop="videoForm.loop"
|
|
3224
|
+
/>
|
|
3141
3225
|
</div>
|
|
3142
3226
|
</Card>
|
|
3143
3227
|
</div>
|
|
3144
3228
|
<template #footer>
|
|
3145
3229
|
<div class="flex gap-05 w-100 ">
|
|
3146
3230
|
<Btn value="Cancel" flat thin @click="showVideoModal = false" />
|
|
3147
|
-
<Btn
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3231
|
+
<Btn
|
|
3232
|
+
v-if="pendingVideoData?.existingVideo" value="Delete Video" color="red" flat thin icon="delete"
|
|
3233
|
+
@click="deleteVideo"
|
|
3234
|
+
/>
|
|
3235
|
+
<Btn
|
|
3236
|
+
value="Insert Video" class="ms-auto" :disabled="!videoForm.src || !isValidVideoUrl(videoForm.src)"
|
|
3237
|
+
@click="submitVideo"
|
|
3238
|
+
/>
|
|
3151
3239
|
</div>
|
|
3152
3240
|
</template>
|
|
3153
3241
|
</Modal>
|
|
3154
3242
|
|
|
3155
3243
|
<!-- Table Editor Modal -->
|
|
3156
|
-
<Modal
|
|
3157
|
-
|
|
3244
|
+
<Modal
|
|
3245
|
+
v-model:visible="showTableEditor" :title="pendingTableData?.existingTable ? 'Edit Table' : 'Insert Table'"
|
|
3246
|
+
width="700"
|
|
3247
|
+
>
|
|
3158
3248
|
<template #default>
|
|
3159
3249
|
<div class="grid grid-wrap-4 m_grid-wrap-2 gap-col-1 table-editor testMe1">
|
|
3160
3250
|
<!-- Structure Section -->
|
|
@@ -3170,26 +3260,40 @@ defineExpose({
|
|
|
3170
3260
|
<!-- Cell Text Alignment -->
|
|
3171
3261
|
<div class="grid-span-1">
|
|
3172
3262
|
<label class="label">Cell Text Alignment</label>
|
|
3173
|
-
<div
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
<Btn
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3263
|
+
<div
|
|
3264
|
+
class="flex gap-025 mt-025 radius-1 p-05 w-fit"
|
|
3265
|
+
style="height: var(--input-height); background: var(--input-bg);"
|
|
3266
|
+
>
|
|
3267
|
+
<Btn
|
|
3268
|
+
:class="{ activeBtn: tableForm.alignment === 'left' }" flat thin icon="format_align_left"
|
|
3269
|
+
title="Align Left" @click="tableForm.alignment = 'left'"
|
|
3270
|
+
/>
|
|
3271
|
+
<Btn
|
|
3272
|
+
:class="{ activeBtn: tableForm.alignment === 'center' }" flat thin
|
|
3273
|
+
icon="format_align_center" title="Align Center" @click="tableForm.alignment = 'center'"
|
|
3274
|
+
/>
|
|
3275
|
+
<Btn
|
|
3276
|
+
:class="{ activeBtn: tableForm.alignment === 'right' }" flat thin icon="format_align_right"
|
|
3277
|
+
title="Align Right" @click="tableForm.alignment = 'right'"
|
|
3278
|
+
/>
|
|
3181
3279
|
</div>
|
|
3182
3280
|
</div>
|
|
3183
3281
|
|
|
3184
3282
|
<!-- Text Direction -->
|
|
3185
3283
|
<div class="grid-span-1">
|
|
3186
3284
|
<label class="label">Text Direction</label>
|
|
3187
|
-
<div
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
<Btn
|
|
3192
|
-
|
|
3285
|
+
<div
|
|
3286
|
+
class="flex gap-025 mt-025 radius-1 p-025 w-fit"
|
|
3287
|
+
style="height: var(--input-height); background: var(--input-bg);"
|
|
3288
|
+
>
|
|
3289
|
+
<Btn
|
|
3290
|
+
:class="{ activeBtn: tableForm.direction === 'ltr' }" flat thin value="LTR"
|
|
3291
|
+
title="Left to Right" @click="tableForm.direction = 'ltr'"
|
|
3292
|
+
/>
|
|
3293
|
+
<Btn
|
|
3294
|
+
:class="{ activeBtn: tableForm.direction === 'rtl' }" flat thin value="RTL"
|
|
3295
|
+
title="Right to Left" @click="tableForm.direction = 'rtl'"
|
|
3296
|
+
/>
|
|
3193
3297
|
</div>
|
|
3194
3298
|
</div>
|
|
3195
3299
|
<!-- Style Section -->
|
|
@@ -3204,8 +3308,10 @@ defineExpose({
|
|
|
3204
3308
|
<NumberInput v-model="tableForm.cellPadding" label="Cell Padding (px)" :min="2" :max="20" />
|
|
3205
3309
|
<NumberInput v-model="tableForm.borderWidth" label="Border Width (px)" :min="0" :max="5" />
|
|
3206
3310
|
<ColorInput v-model="tableForm.borderColor" label="Border Color" />
|
|
3207
|
-
<CheckInput
|
|
3208
|
-
|
|
3311
|
+
<CheckInput
|
|
3312
|
+
v-model="tableForm.fixedLayout" label="Fixed cell width (doesn't change by content)"
|
|
3313
|
+
class="grid-span-4 m_grid-span-2"
|
|
3314
|
+
/>
|
|
3209
3315
|
|
|
3210
3316
|
<!-- Cell Colors -->
|
|
3211
3317
|
<div class="flex gap-05 white-space mt-0 grid-span-4 m_grid-span-2 pt-1 pb-05">
|
|
@@ -3215,8 +3321,10 @@ defineExpose({
|
|
|
3215
3321
|
</p>
|
|
3216
3322
|
<div class="line" />
|
|
3217
3323
|
</div>
|
|
3218
|
-
<ColorInput
|
|
3219
|
-
|
|
3324
|
+
<ColorInput
|
|
3325
|
+
v-model="tableForm.cellBgColor" class="grid-span-2 m_grid-span-1"
|
|
3326
|
+
label="Background Color"
|
|
3327
|
+
/>
|
|
3220
3328
|
<ColorInput v-model="tableForm.cellTextColor" class="grid-span-2 m_grid-span-1" label="Text Color" />
|
|
3221
3329
|
<!-- Alternating Rows -->
|
|
3222
3330
|
<div class="flex gap-05 white-space mt-0 grid-span-4 m_grid-span-2 pt-1 pb-05">
|
|
@@ -3228,21 +3336,35 @@ defineExpose({
|
|
|
3228
3336
|
</div>
|
|
3229
3337
|
<CheckInput v-model="tableForm.showHeaders" label="Show header row" class="grid-span-4 m_grid-span-2" />
|
|
3230
3338
|
<!-- Header Colors -->
|
|
3231
|
-
<div
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
<ColorInput
|
|
3236
|
-
|
|
3339
|
+
<div
|
|
3340
|
+
v-if="tableForm.showHeaders"
|
|
3341
|
+
class="grid-span-4 m_grid-span-2 grid-wrap-4 m_grid-wrap-2 grid gap-col-1 border-bottom pb-05 mb-05"
|
|
3342
|
+
>
|
|
3343
|
+
<ColorInput
|
|
3344
|
+
v-model="tableForm.headerBgColor" class="grid-span-2 m_grid-span-1"
|
|
3345
|
+
label="Header Background Color"
|
|
3346
|
+
/>
|
|
3347
|
+
<ColorInput
|
|
3348
|
+
v-model="tableForm.headerTextColor" class="grid-span-2 m_grid-span-1"
|
|
3349
|
+
label="Header Text Color"
|
|
3350
|
+
/>
|
|
3237
3351
|
</div>
|
|
3238
|
-
<CheckInput
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3352
|
+
<CheckInput
|
|
3353
|
+
v-model="tableForm.alternateRows" label="Alternating Row Colors"
|
|
3354
|
+
class="grid-span-4 m_grid-span-2"
|
|
3355
|
+
/>
|
|
3356
|
+
<div
|
|
3357
|
+
v-if="tableForm.alternateRows"
|
|
3358
|
+
class="grid grid-wrap-4 m_grid-wrap-2 gap-col-1 grid-span-4 m_grid-span-2 border-bottom pb-05 mb-05"
|
|
3359
|
+
>
|
|
3360
|
+
<ColorInput
|
|
3361
|
+
v-model="tableForm.alternateRowBgColor" class="grid-span-2 m_grid-span-1"
|
|
3362
|
+
label="Alternate Row Background:"
|
|
3363
|
+
/>
|
|
3364
|
+
<ColorInput
|
|
3365
|
+
v-model="tableForm.alternateRowTextColor" class="grid-span-2 m_grid-span-1"
|
|
3366
|
+
label="Alternate Row Text:"
|
|
3367
|
+
/>
|
|
3246
3368
|
</div>
|
|
3247
3369
|
</div>
|
|
3248
3370
|
<!-- Table Preview -->
|
|
@@ -3258,10 +3380,14 @@ defineExpose({
|
|
|
3258
3380
|
|
|
3259
3381
|
<template #footer>
|
|
3260
3382
|
<Btn value="Cancel" flat thin @click="showTableEditor = false" />
|
|
3261
|
-
<Btn
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3383
|
+
<Btn
|
|
3384
|
+
v-if="pendingTableData?.existingTable" value="Delete Table" color="red" flat thin icon="delete"
|
|
3385
|
+
@click="deleteTable"
|
|
3386
|
+
/>
|
|
3387
|
+
<Btn
|
|
3388
|
+
:value="pendingTableData?.existingTable ? 'Save' : 'Insert Table'" class="ms-auto"
|
|
3389
|
+
@click="submitTable"
|
|
3390
|
+
/>
|
|
3265
3391
|
</template>
|
|
3266
3392
|
</Modal>
|
|
3267
3393
|
</template>
|
|
@@ -3385,7 +3511,7 @@ defineExpose({
|
|
|
3385
3511
|
}
|
|
3386
3512
|
|
|
3387
3513
|
.inline-toolbar-content {
|
|
3388
|
-
background: var(--bgl-
|
|
3514
|
+
background: var(--bgl-box-bg, white);
|
|
3389
3515
|
border: 1px solid var(--border-color, #dddddd);
|
|
3390
3516
|
border-radius: 8px;
|
|
3391
3517
|
padding: 0.25rem;
|