@bagelink/vue 1.4.141 → 1.4.147

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 (70) 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/media-clean.d.ts +2 -0
  28. package/dist/components/form/inputs/RichText/utils/media-clean.d.ts.map +1 -0
  29. package/dist/components/form/inputs/RichText/utils/media.d.ts +4 -4
  30. package/dist/components/form/inputs/RichText/utils/media.d.ts.map +1 -1
  31. package/dist/components/form/inputs/RichText/utils/selection.d.ts.map +1 -1
  32. package/dist/components/form/inputs/RichText/utils/table.d.ts +1 -1
  33. package/dist/components/form/inputs/RichText/utils/table.d.ts.map +1 -1
  34. package/dist/components/index.d.ts +1 -0
  35. package/dist/components/index.d.ts.map +1 -1
  36. package/dist/components/layout/AppContent.vue.d.ts.map +1 -1
  37. package/dist/components/layout/AppLayout.vue.d.ts.map +1 -1
  38. package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
  39. package/dist/index.cjs +123 -22
  40. package/dist/index.mjs +123 -22
  41. package/dist/style.css +1 -1
  42. package/package.json +1 -1
  43. package/src/components/Btn.vue +50 -42
  44. package/src/components/Modal.vue +49 -50
  45. package/src/components/analytics/BarChart.vue +118 -7
  46. package/src/components/analytics/KpiCard.vue +2 -2
  47. package/src/components/analytics/LineChart.vue +189 -105
  48. package/src/components/analytics/PieChart.vue +392 -49
  49. package/src/components/form/inputs/RichText/CheckList.md +23 -0
  50. package/src/components/form/inputs/RichText/components/EditorToolbar.vue +243 -38
  51. package/src/components/form/inputs/RichText/components/TableGridSelector.vue +94 -0
  52. package/src/components/form/inputs/RichText/composables/useCommands.ts +4 -1
  53. package/src/components/form/inputs/RichText/composables/useEditor.ts +6 -6
  54. package/src/components/form/inputs/RichText/composables/useEditorKeyboard.ts +1 -0
  55. package/src/components/form/inputs/RichText/config.ts +23 -11
  56. package/src/components/form/inputs/RichText/editor.css +300 -33
  57. package/src/components/form/inputs/RichText/index.vue +3014 -75
  58. package/src/components/form/inputs/RichText/richTextTypes.ts +2 -3
  59. package/src/components/form/inputs/RichText/utils/commands.ts +279 -50
  60. package/src/components/form/inputs/RichText/utils/media-clean.ts +0 -0
  61. package/src/components/form/inputs/RichText/utils/media.ts +133 -67
  62. package/src/components/form/inputs/RichText/utils/selection.ts +10 -2
  63. package/src/components/form/inputs/RichText/utils/table.ts +1 -1
  64. package/src/components/index.ts +1 -0
  65. package/src/components/layout/AppContent.vue +26 -26
  66. package/src/components/layout/AppLayout.vue +21 -3
  67. package/src/components/layout/AppSidebar.vue +5 -2
  68. package/src/styles/layout.css +267 -0
  69. package/src/styles/mobilLayout.css +266 -0
  70. package/src/styles/modal.css +3 -17
@@ -68,7 +68,7 @@ export function isStyleActive(style: string, doc: Document) {
68
68
  // Text alignment
69
69
  alignLeft: (el) => {
70
70
  const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
71
- return (paragraph as HTMLElement)?.style.textAlign === 'left'
71
+ return (paragraph as HTMLElement)?.style.textAlign === 'start'
72
72
  },
73
73
  alignCenter: (el) => {
74
74
  const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
@@ -76,7 +76,7 @@ export function isStyleActive(style: string, doc: Document) {
76
76
  },
77
77
  alignRight: (el) => {
78
78
  const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
79
- return (paragraph as HTMLElement)?.style.textAlign === 'right'
79
+ return (paragraph as HTMLElement)?.style.textAlign === 'end'
80
80
  },
81
81
  alignJustify: (el) => {
82
82
  const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
@@ -87,6 +87,14 @@ export function isStyleActive(style: string, doc: Document) {
87
87
  textDirection: (el) => {
88
88
  const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
89
89
  return (paragraph as HTMLElement)?.dir === 'rtl'
90
+ },
91
+ ltrDirection: (el) => {
92
+ const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
93
+ return (paragraph as HTMLElement)?.dir === 'ltr'
94
+ },
95
+ rtlDirection: (el) => {
96
+ const paragraph = el.closest('p, h1, h2, h3, h4, h5, h6')
97
+ return (paragraph as HTMLElement)?.dir === 'rtl'
90
98
  }
91
99
  }
92
100
 
@@ -209,7 +209,7 @@ export function deleteColumn(range: Range) {
209
209
  }
210
210
  }
211
211
 
212
- export function alignColumn(range: Range, alignment: 'left' | 'center' | 'right' | 'justify') {
212
+ export function alignColumn(range: Range, alignment: 'start' | 'center' | 'end' | 'justify') {
213
213
  const cell = range.startContainer.parentElement?.closest('td')
214
214
  if (!cell) return
215
215
 
@@ -2,6 +2,7 @@ export { default as Accordion } from './Accordion.vue'
2
2
  export { default as AccordionItem } from './AccordionItem.vue'
3
3
  export { default as AddressSearch } from './AddressSearch.vue'
4
4
  export { default as Alert } from './Alert.vue'
5
+ export * from './analytics'
5
6
  export { default as Avatar } from './Avatar.vue'
6
7
  export { default as Badge } from './Badge.vue'
7
8
  export { default as BglVideo } from './BglVideo.vue'
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { inject } from 'vue'
2
+ import { inject, computed, onMounted, ref } from 'vue'
3
3
  import { Btn, PageTitle } from '@bagelink/vue'
4
4
 
5
5
  interface Props {
@@ -25,22 +25,30 @@ const menuState = inject('menuState') as {
25
25
  }
26
26
 
27
27
  // Inject sidebar card style state
28
- const sidebarCardStyle = inject('sidebarCardStyle', { value: true })
28
+ const sidebarCardStyle = inject('sidebarCardStyle', { value: false })
29
+
30
+ // Computed property to check if sidebar has card style
31
+ const hasSidebarCard = computed(() => {
32
+ // Check if there's an AppSidebar with card class in the DOM
33
+ const sidebar = document.querySelector('.app-sidebar .card')
34
+ return sidebar !== null || sidebarCardStyle?.value
35
+ })
29
36
  </script>
30
37
 
31
38
  <template>
32
39
  <div class="app-content h-100p flex column" :class="{
33
- 'paddingAppContent': sidebarCardStyle?.value,
40
+ 'paddingAppContent': hasSidebarCard,
34
41
  }">
35
42
  <!-- Header -->
36
- <header class="app-header flex align-items-center space-between py-1 min-h60px w-100p m_flex-wrap" :class="{
43
+ <header class="app-header flex align-items-center space-between py-1 m_pt-025 m_pb-05 min-h60px w-100p m_flex-wrap" :class="{
37
44
  'border-bottom': border,
38
- 'px-1': !sidebarCardStyle?.value,
39
- }">
45
+ 'px-1': !hasSidebarCard,
46
+ 'm_px-1': hasSidebarCard
47
+ }">
40
48
  <!-- Left Side -->
41
- <div class="flex align-items-center gap-col-075 m_flex-wrap">
49
+ <div class="flex align-items-center gap-col-075 m_flex-wrap m_pe-075">
42
50
  <!-- Menu Toggle Button -->
43
- <Btn v-if="showMenuButton" flat icon="dock_to_right" @click="menuState.toggleMenu" />
51
+ <Btn v-if="showMenuButton" flat icon="dock_to_right" class="menuToggleButton" @click="menuState.toggleMenu" />
44
52
 
45
53
  <!-- Back Button -->
46
54
  <Btn v-if="showBackButton" flat icon="arrow_back" :to="backTo" class="back-btn" />
@@ -60,21 +68,21 @@ const sidebarCardStyle = inject('sidebarCardStyle', { value: true })
60
68
  </div>
61
69
 
62
70
  <!-- Right Side -->
63
- <div class="flex align-items-center gap-row-05 m_flex-grow-1">
71
+ <div class="flex align-items-center gap-row-05 m_flex-grow-1 endNavTools">
64
72
  <slot name="header-right" />
65
73
  </div>
66
74
  </header>
67
75
 
68
76
  <!-- Page Content -->
69
- <main class="pageContent flex-grow overflow py-1 w-100p m_p-05 m_scrollbar-gutter-stable-both m_vw100" :class="{
70
- 'px-1': !sidebarCardStyle?.value,
77
+ <main class="pageContent flex-grow overflow pt-1 pb-05 w-100p m_p-05 m_scrollbar-gutter-stable-both m_vw100" :class="{
78
+ 'px-1': !hasSidebarCard,
71
79
  }">
72
80
  <slot name="content">
73
81
  <!-- Default slot for content without explicit template -->
74
82
  <slot />
75
83
  </slot>
76
84
  </main>
77
- </div>
85
+ </div>
78
86
  </template>
79
87
 
80
88
  <style>
@@ -98,27 +106,19 @@ const sidebarCardStyle = inject('sidebarCardStyle', { value: true })
98
106
  </style>
99
107
 
100
108
  <style scoped>
101
- .paddingAppContent {
102
- padding-inline-start: 0.5rem;
103
- padding-inline-end: 1rem;
104
- }
105
-
106
- body:has(.sidebar-collapsed) .paddingAppContent {
107
- padding-inline-start: 1.5rem;
108
- }
109
109
  .app-content {
110
- height: 100vh;
110
+ height: 100vh;
111
111
  }
112
-
112
+
113
113
  .app-header {
114
- flex-shrink: 0;
114
+ flex-shrink: 0;
115
115
  }
116
-
116
+
117
117
  main {
118
- min-height: 0; /* חשוב לאפשר overflow נכון */
118
+ min-height: 0;
119
119
  }
120
120
  @media screen and (max-width: 910px) {
121
- .paddingAppContent {
121
+ .app-header {
122
122
  padding-inline: 0.5rem;
123
123
  }
124
124
  }
@@ -38,11 +38,11 @@ function closeOnMobile() {
38
38
  // Computed styles for main content margin
39
39
  const mainContentStyles = computed(() => {
40
40
  if (isMobile.value) {
41
- return { marginLeft: '0' }
41
+ return { marginInlineStart: '0' }
42
42
  }
43
43
  const collapsedWidth = props.sidebarCardStyle ? '82px' : '66px'
44
44
  return {
45
- marginLeft: isOpen.value ? props.sidebarWidth : collapsedWidth
45
+ marginInlineStart: isOpen.value ? props.sidebarWidth : collapsedWidth
46
46
  }
47
47
  })
48
48
 
@@ -56,6 +56,9 @@ provide('menuState', {
56
56
  sidebarCollapsedWidth: props.sidebarCardStyle ? '82px' : '66px'
57
57
  })
58
58
 
59
+ // Provide sidebar card style based on prop
60
+ provide('sidebarCardStyle', { value: props.sidebarCardStyle })
61
+
59
62
  // Initialize
60
63
  onMounted(() => {
61
64
  checkMobile()
@@ -101,6 +104,14 @@ onUnmounted(() => {
101
104
  height: 100vh;
102
105
  overflow: hidden;
103
106
  }
107
+ .app-layout:has(.cardWrapSide) {
108
+ padding-inline-start: 0.5rem;
109
+ padding-inline-end: 1rem;
110
+ }
111
+
112
+ .app-layout:has(.sidebar-collapsed .cardWrapSide) {
113
+ padding-inline-start: 1.5rem;
114
+ }
104
115
 
105
116
  /* Overlay for mobile */
106
117
  .overlay {
@@ -114,11 +125,18 @@ onUnmounted(() => {
114
125
  .main-content {
115
126
  flex: 1;
116
127
  overflow: hidden;
117
- transition: margin-left 400ms ease;
128
+ transition: margin-inline-start 400ms ease;
118
129
  min-height: 100vh
119
130
  }
120
131
 
121
132
  .page-content {
122
133
  overflow: auto;
123
134
  }
135
+ @media screen and (max-width: 910px) {
136
+ .app-layout:has(.cardWrapSide),
137
+ .app-layout:has(.sidebar-collapsed .cardWrapSide) {
138
+ padding-inline-start: 0rem;
139
+ padding-inline-end: 0rem;
140
+ }
141
+ }
124
142
  </style>
@@ -65,7 +65,7 @@ const sidebarStyles = computed(() => {
65
65
  let width = '280px'
66
66
 
67
67
  if (!menuState.isMobile.value) {
68
- const collapsedWidth = props.card ? '82px' : '76px'
68
+ const collapsedWidth = props.card ? '82px' : '68px'
69
69
  width = menuState.isOpen.value ? menuState.sidebarWidth : collapsedWidth
70
70
  }
71
71
 
@@ -100,7 +100,7 @@ function logout() {
100
100
  ...(props.card && { borderRadius: 'var(--card-border-radius)' }),
101
101
  }"
102
102
  :class="{
103
- card: props.card,
103
+ 'card cardWrapSide': props.card,
104
104
  'ps-05': !menuState.isOpen.value,
105
105
  'scrollbar-gutter-both': menuState.isOpen.value,
106
106
  aside_frame: props.frame,
@@ -267,5 +267,8 @@ function logout() {
267
267
  .sidebar-mobile-closed {
268
268
  transform: translateX(-100%);
269
269
  }
270
+ [dir="rtl"] .sidebar-mobile-closed {
271
+ transform: translateX(100%);
272
+ }
270
273
  }
271
274
  </style>