@bagelink/vue 1.6.31 → 1.6.36

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/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.6.31",
4
+ "version": "1.6.36",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
- "name": "Neveh Allon",
8
- "email": "neveh@bagelstudio.co.il",
9
- "url": "https://github.com/nevehallon"
7
+ "name": "Bagel Studio",
8
+ "email": "hi@bagelstudio.co.il"
10
9
  },
11
10
  "license": "MIT",
12
11
  "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/vue#readme",
@@ -0,0 +1,67 @@
1
+ <script setup lang="ts">
2
+ import type { IconType } from '@bagelink/vue'
3
+ import { Btn, Icon, Dropdown } from '@bagelink/vue'
4
+
5
+ export interface MenuItem {
6
+ icon: IconType
7
+ value: string
8
+ to: string
9
+ items?: MenuItem[]
10
+ }
11
+
12
+ defineProps<{ items: MenuItem[] }>()
13
+ </script>
14
+
15
+ <template>
16
+ <div class="flex space-between m_w-100vw overflow m_-ms-1 m_px-05 m_py-025 bglTopMenu">
17
+ <div class="flex gap-025 m_gap-05">
18
+ <template v-for="item in items" :key="item.value">
19
+ <Dropdown v-if="item.items" :value="item.value" iconEnd="keyboard_arrow_down">
20
+ <template #trigger="{ show }">
21
+ <Btn thin flat @click="show()">
22
+ <Icon :name="item.icon" size="0.8" style="margin-bottom: -0.1rem" />
23
+ <p class="-ms-025">
24
+ {{ item.value }}
25
+ </p>
26
+ <Icon name="keyboard_arrow_down" size="0.8" style="margin-bottom: -0.1rem" />
27
+ </Btn>
28
+ </template>
29
+ <Btn
30
+ v-for="subItem in item.items" :key="subItem.value" thin flat :to="subItem.to"
31
+ class="block m_px-025"
32
+ >
33
+ <Icon :name="subItem.icon" size="0.8" style="margin-bottom: -0.1rem" />
34
+ <p class="-ms-025">
35
+ {{ subItem.value }}
36
+ </p>
37
+ </Btn>
38
+ </Dropdown>
39
+ <Btn v-else thin flat :to="item.to" class="m_px-025">
40
+ <Icon :name="item.icon" size="0.9" style="margin-bottom: -0.1rem" />
41
+ <p class="-ms-025">
42
+ {{ item.value }}
43
+ </p>
44
+ </Btn>
45
+ </template>
46
+ </div>
47
+ <slot name="end" />
48
+ </div>
49
+ </template>
50
+
51
+ <style scoped>
52
+ .bgl_btn.router-link-active {
53
+ background-color: var(--bgl-gray-40);
54
+ }
55
+ </style>
56
+
57
+ <style>
58
+ @media (max-width: 910px) {
59
+ .bglTopMenu::-webkit-scrollbar {
60
+ height: 0px;
61
+ }
62
+
63
+ .bglTopMenu {
64
+ mask: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent);
65
+ }
66
+ }
67
+ </style>
@@ -61,7 +61,7 @@ function getItemRef(i: number) {
61
61
 
62
62
  <template>
63
63
  <div>
64
- <label v-if="label" class="txt12 txt-gray-90 mb-025">
64
+ <label v-if="label" class="txt12 txt-gray-90 mb-025 block">
65
65
  {{ label }}
66
66
  </label>
67
67
  <p v-if="helpText" class="txt12 txt-gray-50 mb-05">
@@ -72,7 +72,7 @@ function getItemRef(i: number) {
72
72
  style="display: flex; align-items: center; gap: 0.5rem;"
73
73
  >
74
74
  <slot :item="getItemRef(i)" :index="i" />
75
- <Btn v-if="allowDelete" v-tooltip="'Delete'" flat icon="delete" size="xs" @click="deleteItem(i)" />
75
+ <Btn v-if="allowDelete" v-tooltip="'Delete'" flat icon="delete" size="xs" class="mb-075" @click="deleteItem(i)" />
76
76
  </div>
77
77
  <Btn v-if="allowAdd" icon="add" size="small" value="Add" @click="addItem" />
78
78
  </div>
@@ -33,6 +33,8 @@ export const files = {
33
33
  options?: UploadOptions & { dirPath?: string, tags?: string[] }
34
34
  ): Promise<AxiosResponse<BglFile>> => {
35
35
  const formData = new FormData()
36
+ // Backend expects multipart field name "file"
37
+ formData.append('file', file)
36
38
  formData.append('upload', file)
37
39
  return axios.post(`/${getFileVersion()}/upload`, formData, {
38
40
  headers: { 'Content-Type': 'multipart/form-data' },
@@ -30,6 +30,7 @@ export { default as ListItem } from './ListItem.vue'
30
30
  export { default as ListView } from './ListView.vue'
31
31
  export { default as Loading } from './Loading.vue'
32
32
  export { default as MapEmbed } from './MapEmbed/Index.vue'
33
+ export { default as Menu } from './Menu.vue'
33
34
  export { default as Modal } from './Modal.vue'
34
35
  export { default as ModalConfirm } from './ModalConfirm.vue'
35
36
  export { default as ModalForm } from './ModalForm.vue'
@@ -31,7 +31,7 @@ const sidebarCardStyle = inject('sidebarCardStyle', { value: false })
31
31
  const hasSidebarCard = computed(() => {
32
32
  // Check if there's an AppSidebar with card class in the DOM
33
33
  const sidebar = document.querySelector('.app-sidebar .card')
34
- return null !== sidebar || sidebarCardStyle?.value
34
+ return sidebar !== null || sidebarCardStyle?.value
35
35
  })
36
36
  </script>
37
37
 
@@ -83,7 +83,7 @@ const hasSidebarCard = computed(() => {
83
83
 
84
84
  <!-- Page Content -->
85
85
  <main
86
- class="pageContent flex-grow overflow pt-1 pb-05 w-100p m_p-05 m_scrollbar-gutter-stable-both m_vw100"
86
+ class="pageContent flex-grow overflow pt-1 pb-05 w-100p m_p-05 m_scrollbar-gutter-auto m_vw100"
87
87
  :class="{
88
88
  'px-1': !hasSidebarCard,
89
89
  }"