@bagelink/vue 1.4.139 → 1.4.145

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 (73) hide show
  1. package/dist/components/Btn.vue.d.ts.map +1 -1
  2. package/dist/components/Carousel.vue.d.ts +1 -1
  3. package/dist/components/Modal.vue.d.ts +3 -0
  4. package/dist/components/Modal.vue.d.ts.map +1 -1
  5. package/dist/components/Slider.vue.d.ts +1 -1
  6. package/dist/components/Slider.vue.d.ts.map +1 -1
  7. package/dist/components/analytics/BarChart.vue.d.ts +11 -3
  8. package/dist/components/analytics/BarChart.vue.d.ts.map +1 -1
  9. package/dist/components/analytics/LineChart.vue.d.ts +9 -0
  10. package/dist/components/analytics/LineChart.vue.d.ts.map +1 -1
  11. package/dist/components/analytics/PieChart.vue.d.ts +30 -2
  12. package/dist/components/analytics/PieChart.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/RichText/components/EditorToolbar.vue.d.ts +8 -0
  14. package/dist/components/form/inputs/RichText/components/EditorToolbar.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/RichText/components/TableGridSelector.vue.d.ts +9 -0
  16. package/dist/components/form/inputs/RichText/components/TableGridSelector.vue.d.ts.map +1 -0
  17. package/dist/components/form/inputs/RichText/composables/useCommands.d.ts.map +1 -1
  18. package/dist/components/form/inputs/RichText/composables/useEditor.d.ts +0 -14
  19. package/dist/components/form/inputs/RichText/composables/useEditor.d.ts.map +1 -1
  20. package/dist/components/form/inputs/RichText/composables/useEditorKeyboard.d.ts.map +1 -1
  21. package/dist/components/form/inputs/RichText/config.d.ts.map +1 -1
  22. package/dist/components/form/inputs/RichText/index.vue.d.ts +15 -15
  23. package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
  24. package/dist/components/form/inputs/RichText/richTextTypes.d.ts +1 -3
  25. package/dist/components/form/inputs/RichText/richTextTypes.d.ts.map +1 -1
  26. package/dist/components/form/inputs/RichText/utils/commands.d.ts.map +1 -1
  27. package/dist/components/form/inputs/RichText/utils/formatting.d.ts.map +1 -1
  28. package/dist/components/form/inputs/RichText/utils/media-clean.d.ts +2 -0
  29. package/dist/components/form/inputs/RichText/utils/media-clean.d.ts.map +1 -0
  30. package/dist/components/form/inputs/RichText/utils/media.d.ts +4 -4
  31. package/dist/components/form/inputs/RichText/utils/media.d.ts.map +1 -1
  32. package/dist/components/form/inputs/RichText/utils/selection.d.ts.map +1 -1
  33. package/dist/components/form/inputs/RichText/utils/table.d.ts +1 -1
  34. package/dist/components/form/inputs/RichText/utils/table.d.ts.map +1 -1
  35. package/dist/components/index.d.ts +1 -0
  36. package/dist/components/index.d.ts.map +1 -1
  37. package/dist/components/layout/AppContent.vue.d.ts.map +1 -1
  38. package/dist/components/layout/AppLayout.vue.d.ts.map +1 -1
  39. package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
  40. package/dist/index.cjs +123 -22
  41. package/dist/index.mjs +123 -22
  42. package/dist/style.css +1 -1
  43. package/package.json +1 -1
  44. package/src/components/Btn.vue +50 -42
  45. package/src/components/Modal.vue +49 -50
  46. package/src/components/analytics/BarChart.vue +118 -7
  47. package/src/components/analytics/KpiCard.vue +2 -2
  48. package/src/components/analytics/LineChart.vue +189 -105
  49. package/src/components/analytics/PieChart.vue +392 -49
  50. package/src/components/dataTable/DataTable.vue +1 -1
  51. package/src/components/form/inputs/RichText/CheckList.md +23 -0
  52. package/src/components/form/inputs/RichText/components/EditorToolbar.vue +243 -27
  53. package/src/components/form/inputs/RichText/components/TableGridSelector.vue +94 -0
  54. package/src/components/form/inputs/RichText/composables/useCommands.ts +45 -0
  55. package/src/components/form/inputs/RichText/composables/useEditor.ts +13 -10
  56. package/src/components/form/inputs/RichText/composables/useEditorKeyboard.ts +3 -128
  57. package/src/components/form/inputs/RichText/config.ts +33 -10
  58. package/src/components/form/inputs/RichText/editor.css +300 -33
  59. package/src/components/form/inputs/RichText/index.vue +3271 -130
  60. package/src/components/form/inputs/RichText/richTextTypes.ts +7 -3
  61. package/src/components/form/inputs/RichText/utils/commands.ts +851 -90
  62. package/src/components/form/inputs/RichText/utils/formatting.ts +17 -15
  63. package/src/components/form/inputs/RichText/utils/media-clean.ts +0 -0
  64. package/src/components/form/inputs/RichText/utils/media.ts +133 -67
  65. package/src/components/form/inputs/RichText/utils/selection.ts +40 -11
  66. package/src/components/form/inputs/RichText/utils/table.ts +1 -1
  67. package/src/components/index.ts +1 -0
  68. package/src/components/layout/AppContent.vue +26 -26
  69. package/src/components/layout/AppLayout.vue +21 -3
  70. package/src/components/layout/AppSidebar.vue +5 -2
  71. package/src/styles/layout.css +267 -0
  72. package/src/styles/mobilLayout.css +266 -0
  73. package/src/styles/modal.css +3 -17
@@ -9,10 +9,10 @@ export const tableTools: ToolbarConfig = [
9
9
  'insertColumnLeft',
10
10
  'insertColumnRight',
11
11
  'deleteColumn',
12
- 'alignLeft',
13
- 'alignCenter',
14
- 'alignRight',
15
- 'alignJustify',
12
+ 'tableAlignLeft',
13
+ 'tableAlignCenter',
14
+ 'tableAlignRight',
15
+ 'tableAlignJustify',
16
16
  'deleteTable'
17
17
  ]
18
18
 
@@ -33,10 +33,21 @@ export const basicToolbarConfig: ToolbarConfig = [
33
33
  'italic',
34
34
  'underline',
35
35
  'separator',
36
+ 'alignMenu',
37
+ 'ltrDirection',
38
+ 'rtlDirection',
39
+ 'separator',
40
+ 'insertTable',
41
+ 'separator',
36
42
  'link',
37
43
  'image',
44
+ 'video',
38
45
  'embed',
39
46
  'clear',
47
+ 'separator',
48
+ 'undo',
49
+ 'redo',
50
+ 'separator',
40
51
  'splitView',
41
52
  'fullScreen',
42
53
  ]
@@ -65,6 +76,7 @@ export const fullToolbarConfig: ToolbarConfig = [
65
76
  'separator',
66
77
  'link',
67
78
  'image',
79
+ 'video',
68
80
  'embed',
69
81
  'separator',
70
82
  'splitView',
@@ -78,12 +90,15 @@ export const fullToolbarConfig: ToolbarConfig = [
78
90
  ]
79
91
 
80
92
  export const toolbarOptions: ToolbarOption[] = [
81
- { name: 'h1', label: 'h1', icon: 'format_h1' },
82
- { name: 'h2', label: 'h2', icon: 'format_h2' },
83
- { name: 'h3', label: 'h3', icon: 'format_h3' },
84
- { name: 'h4', label: 'h4', icon: 'format_h4' },
85
- { name: 'h5', label: 'h5', icon: 'format_h5' },
86
- { name: 'h6', label: 'h6', icon: 'format_h6' },
93
+ { name: 'headingsMenu', label: 'Headings', icon: 'title' },
94
+ { name: 'mediaMenu', label: 'Media', icon: 'perm_media' },
95
+ { name: 'alignMenu', label: 'Alignment', icon: 'format_align_left' },
96
+ { name: 'h1', label: 'Heading 1', icon: 'format_h1' },
97
+ { name: 'h2', label: 'Heading 2', icon: 'format_h2' },
98
+ { name: 'h3', label: 'Heading 3', icon: 'format_h3' },
99
+ { name: 'h4', label: 'Heading 4', icon: 'format_h4' },
100
+ { name: 'h5', label: 'Heading 5', icon: 'format_h5' },
101
+ { name: 'h6', label: 'Heading 6', icon: 'format_h6' },
87
102
  { name: 'p', label: 'Paragraph', icon: 'format_paragraph' },
88
103
  { name: 'blockquote', label: 'Blockquote', icon: 'format_quote' },
89
104
  { name: 'bold', label: 'Bold', icon: 'format_bold' },
@@ -93,6 +108,7 @@ export const toolbarOptions: ToolbarOption[] = [
93
108
  { name: 'unorderedList', label: 'Unordered List', icon: 'format_list_bulleted' },
94
109
  { name: 'link', label: 'Link', icon: 'add_link' },
95
110
  { name: 'image', label: 'Image', icon: 'add_photo_alternate' },
111
+ { name: 'video', label: 'Video', icon: 'play_circle' },
96
112
  { name: 'embed', label: 'Embed', icon: 'media_link' },
97
113
  { name: 'splitView', label: 'Split View', icon: 'code' },
98
114
  { name: 'clear', label: 'Clear Formatting', icon: 'format_clear' },
@@ -100,6 +116,10 @@ export const toolbarOptions: ToolbarOption[] = [
100
116
  { name: 'alignCenter', label: 'Align Center', icon: 'format_align_center' },
101
117
  { name: 'alignRight', label: 'Align Right', icon: 'format_align_right' },
102
118
  { name: 'alignJustify', label: 'Align Justify', icon: 'format_align_justify' },
119
+ { name: 'tableAlignLeft', label: 'Table Align Left', icon: 'format_align_left' },
120
+ { name: 'tableAlignCenter', label: 'Table Align Center', icon: 'format_align_center' },
121
+ { name: 'tableAlignRight', label: 'Table Align Right', icon: 'format_align_right' },
122
+ { name: 'tableAlignJustify', label: 'Table Align Justify', icon: 'format_align_justify' },
103
123
  { name: 'indent', label: 'Indent', icon: 'format_indent_increase' },
104
124
  { name: 'outdent', label: 'Outdent', icon: 'format_indent_decrease' },
105
125
  { name: 'fontColor', label: 'Font Color', icon: 'format_color_text' },
@@ -119,4 +139,7 @@ export const toolbarOptions: ToolbarOption[] = [
119
139
  { name: 'redo', label: 'Redo', icon: 'redo' },
120
140
  { name: 'separator' },
121
141
  { name: 'fullScreen', label: 'Full Screen', icon: 'fullscreen', class: 'ms-auto' },
142
+ { name: 'textDirection', label: 'Text Direction (RTL/LTR)', icon: 'format_textdirection_r_to_l' },
143
+ { name: 'ltrDirection', label: 'Left to Right', icon: 'format_textdirection_l_to_r' },
144
+ { name: 'rtlDirection', label: 'Right to Left', icon: 'format_textdirection_r_to_l' },
122
145
  ]
@@ -1,57 +1,324 @@
1
+ /* RichText Editor Scoped Styles */
2
+ .richtext-editor-content,
3
+ body.richtext-editor-content {
4
+ margin: 0;
5
+ padding: 8px;
6
+ min-height: 200px;
7
+ font-family: sans-serif !important;
8
+ line-height: 1.5;
9
+ color: inherit;
10
+ background: transparent;
11
+ max-width: 1060px;
12
+ margin: 0 auto;
13
+ }
14
+
15
+ /* Fallback styles for iframe body */
1
16
  body {
2
- margin: 0;
3
- padding: 8px;
4
- min-height: 200px;
5
- font-family: sans-serif;
6
- line-height: 1.5;
7
- color: inherit;
8
- background: transparent;
9
- max-width: 1060px;
10
- margin: 0 auto;
17
+ margin: 0;
18
+ padding: 8px;
19
+ min-height: 200px;
20
+ font-family: sans-serif !important;
21
+ line-height: 1.5;
22
+ color: inherit;
23
+ background: transparent;
24
+ max-width: 1060px;
25
+ margin: 0 auto;
26
+ }
27
+
28
+ .richtext-editor-content table,
29
+ body.richtext-editor-content table {
30
+ border-collapse: collapse;
31
+ margin-bottom: 1rem;
32
+ }
33
+
34
+ .richtext-editor-content th,
35
+ .richtext-editor-content td,
36
+ body.richtext-editor-content th,
37
+ body.richtext-editor-content td {
38
+ padding: 1rem;
39
+ border: 1px solid #2a2a2a;
40
+ line-height: 1.5;
41
+ text-align: unset;
42
+ }
43
+
44
+ .richtext-editor-content th,
45
+ body.richtext-editor-content th {
46
+ background-color: #f4f4f4;
11
47
  }
12
48
 
49
+ /* Fallback table styles */
13
50
  table {
14
- border-collapse: collapse;
15
- margin-bottom: 1rem;
51
+ border-collapse: collapse;
52
+ margin-bottom: 1rem;
16
53
  }
17
54
 
18
55
  th,
19
56
  td {
20
- padding: 1rem;
21
- text-align: left;
22
- border: 1px solid #2a2a2a;
23
- line-height: 1.5;
57
+ padding: 1rem;
58
+ border: 1px solid #2a2a2a;
59
+ line-height: 1.5;
60
+ text-align: unset;
24
61
  }
25
62
 
26
63
  th {
27
- background-color: #f4f4f4;
64
+ background-color: #f4f4f4;
28
65
  }
29
66
 
30
67
  /* Add styles for embedded content */
31
- iframe {
32
- max-width: 100%;
33
- border: none;
34
- display: block;
35
- margin: 1em auto;
68
+ .richtext-editor-content iframe {
69
+ max-width: 100%;
70
+ border: 1px solid var(--border-color, #ddd);
71
+ border-radius: 8px;
72
+ display: block;
73
+ margin: 1em auto;
74
+ min-height: 200px;
75
+ background: white;
76
+ }
77
+
78
+ /* Video placeholder styles */
79
+ .richtext-editor-content .video-placeholder {
80
+ width: 100%;
81
+ height: auto;
82
+ min-height: 50px;
83
+ background-color: var(--bgl-gray-20);
84
+ border-radius: 8px;
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ flex-direction: column;
89
+ color: inherit;
90
+ font-size: 14px;
91
+ transition: all 0.2s ease;
92
+ overflow: hidden;
93
+ }
94
+
95
+ .richtext-editor-content .video-placeholder.has-thumbnail {
96
+ position: relative;
97
+ }
98
+
99
+ .richtext-editor-content .video-placeholder-icon {
100
+ font-size: 48px;
101
+ margin-bottom: 10px;
102
+ opacity: 0.7;
103
+ }
104
+
105
+ .richtext-editor-content .video-placeholder-description {
106
+ text-align: center;
107
+ }
108
+
109
+ .richtext-editor-content .video-thumbnail {
110
+ width: 100%;
111
+ height: 100%;
112
+ object-fit: cover;
113
+ border-radius: 8px;
114
+ position: absolute;
115
+ top: 0;
116
+ left: 0;
117
+ }
118
+
119
+ .richtext-editor-content .video-overlay {
120
+ position: absolute;
121
+ top: 0;
122
+ left: 0;
123
+ width: 100%;
124
+ height: 100%;
125
+ background-color: rgba(0, 0, 0, 0.3);
126
+ display: flex;
127
+ align-items: center;
128
+ justify-content: center;
129
+ border-radius: 8px;
130
+
131
+ }
132
+
133
+ .richtext-editor-content .video-overlay-icon::after {
134
+ content: "▶";
135
+ font-size: 50px;
136
+ color: white;
137
+ filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
138
+
139
+ }
140
+
141
+ /* Video container styles */
142
+ .richtext-editor-content .video-container {
143
+ width: 100%;
144
+ height: auto;
145
+ }
146
+
147
+ /* Embed iframe styles */
148
+ .richtext-editor-content .embed-iframe {
149
+ width: 100%;
150
+ height: 315px;
151
+ border: 1px solid var(--border-color, #ddd);
152
+ border-radius: 8px;
153
+ background: white;
154
+ }
155
+
156
+ .richtext-editor-content .embed-iframe.responsive {
157
+ aspect-ratio: 16/9;
158
+ height: auto;
159
+ }
160
+
161
+ /* Image figure styles */
162
+ .richtext-editor-content .image-figure {
163
+ margin: 2rem auto;
164
+ text-align: end;
165
+ max-width: 100%;
166
+ cursor: pointer;
167
+ transition: opacity 0.2s ease;
168
+ }
169
+
170
+ .richtext-editor-content .image-figure:hover {
171
+ opacity: 0.8;
172
+ }
173
+
174
+ .richtext-editor-content .image-figure img {
175
+ display: block;
176
+ max-width: 100%;
177
+ height: auto;
178
+ margin: 0 auto;
179
+ pointer-events: none;
180
+ }
181
+
182
+ .richtext-editor-content .image-figure figcaption {
183
+ margin-top: 0.5rem;
184
+ font-size: 0.9em;
185
+ padding: 0 1rem;
186
+ pointer-events: none;
187
+ text-align: center;
188
+ line-height: 1.4;
189
+ }
190
+
191
+ .richtext-editor-content .image-figure figcaption .alt-text {
192
+ font-weight: 400;
193
+ color: inherit;
194
+ }
195
+
196
+ .richtext-editor-content .image-figure figcaption .photo-credit {
197
+ font-weight: 100;
198
+ opacity: 0.8;
36
199
  }
37
200
 
38
201
  /* Responsive iframe wrapper */
39
- div:has(> iframe) {
40
- position: relative;
41
- width: 100%;
42
- margin: 1em 0;
43
- text-align: center;
202
+ .richtext-editor-content div:has(> iframe) {
203
+ position: relative;
204
+ width: 100%;
205
+ margin: 1em 0;
206
+ text-align: center;
44
207
  }
45
208
 
46
209
  /* Ensure iframes don't overflow their containers */
47
- div:has(> iframe) iframe {
48
- max-width: 100%;
49
- margin: 0;
210
+ .richtext-editor-content div:has(> iframe) iframe {
211
+ max-width: 100%;
212
+ margin: 0;
50
213
  }
51
214
 
52
215
  /* Add a subtle border to distinguish embedded content */
53
- iframe:not([class*='editableContent']) {
54
- border: 1px solid var(--border-color);
55
- border-radius: 4px;
56
- background: white;
216
+ .richtext-editor-content iframe:not([class*='editableContent']) {
217
+ border: 1px solid var(--border-color);
218
+ border-radius: 4px;
219
+ background: white;
220
+ }
221
+
222
+ /* Video figure styles */
223
+ .richtext-editor-content .video-figure {
224
+ margin: 2rem auto;
225
+ text-align: center;
226
+ max-width: 100%;
227
+ cursor: pointer;
228
+ transition: var(--bgl-transition);
229
+ }
230
+
231
+ .richtext-editor-content .video-figure:hover {
232
+ cursor: pointer;
233
+ filter: brightness(90%);
234
+ --bgl-transition-400: all 400ms ease;
235
+ }
236
+
237
+ .richtext-editor-content .video-figure:active {
238
+ filter: var(--bgl-active-filter);
239
+ }
240
+
241
+ .richtext-editor-content .video-figure .video-container {
242
+ display: block;
243
+ max-width: 100%;
244
+ margin: 0 auto;
245
+ }
246
+
247
+ .richtext-editor-content .video-figure .bgl_vid {
248
+ width: 100%;
249
+ margin: 0 auto;
250
+ }
251
+
252
+ .richtext-editor-content .video-figure .bgl_vid.vid_short {
253
+ max-width: 56.25vh;
254
+ margin: 0 auto;
255
+ }
256
+
257
+ .richtext-editor-content .video-figure .bgl_vid iframe,
258
+ .richtext-editor-content .video-figure .bgl_vid video,
259
+ .richtext-editor-content .video-figure .bgl_vid .video-placeholder {
260
+ width: 100%;
261
+ height: auto;
262
+ display: block;
263
+ margin: auto;
264
+ border-radius: 8px;
265
+ overflow: hidden;
266
+ }
267
+
268
+ /* Video placeholder specific styles */
269
+ .richtext-editor-content .video-figure .bgl_vid .video-placeholder {
270
+ transition: all 0.2s ease;
271
+ }
272
+
273
+ .richtext-editor-content .video-figure:hover .bgl_vid .video-placeholder {
274
+ filter: var(--bgl-hover-filter);
275
+ }
276
+
277
+ .richtext-editor-content .video-figure .bgl_vid .video-placeholder img {
278
+ pointer-events: none;
279
+ }
280
+
281
+ .richtext-editor-content .video-figure figcaption {
282
+ margin-top: 0.5rem;
283
+ font-size: 0.9em;
284
+ padding: 0 1rem;
285
+ color: inherit;
286
+ text-align: center;
57
287
  }
288
+
289
+ /* Embed figure styles */
290
+ .richtext-editor-content .embed-figure {
291
+ margin: 2rem auto;
292
+ text-align: center;
293
+ max-width: 100%;
294
+ cursor: pointer;
295
+ transition: all 0.3s ease;
296
+ }
297
+
298
+ .richtext-editor-content .embed-figure:hover {
299
+ filter: var(--bgl-hover-filter);
300
+ }
301
+
302
+ .richtext-editor-content .embed-figure iframe {
303
+ display: block;
304
+ max-width: 100%;
305
+ width: 100%;
306
+ margin: 0 auto;
307
+ border: 1px solid var(--border-color, #ddd);
308
+ border-radius: 8px;
309
+ background: white;
310
+ transition: all 0.3s ease;
311
+ pointer-events: none;
312
+ }
313
+
314
+ .richtext-editor-content .embed-figure:hover iframe {
315
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
316
+ }
317
+
318
+ .richtext-editor-content .embed-figure figcaption {
319
+ margin-top: 0.5rem;
320
+ font-size: 0.9em;
321
+ padding: 0 1rem;
322
+ color: inherit;
323
+ text-align: center;
324
+ }