@bagelink/vue 1.12.42 → 1.12.44

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,103 +1,102 @@
1
1
  {
2
- "name": "@bagelink/vue",
3
- "type": "module",
4
- "version": "1.12.42",
5
- "description": "Bagel core sdk packages",
6
- "author": {
7
- "name": "Bagel Studio",
8
- "email": "hi@bagelstudio.co.il"
9
- },
10
- "license": "MIT",
11
- "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/vue#readme",
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/bageldb/bagelink.git",
15
- "directory": "packages/vue"
16
- },
17
- "bugs": "https://github.com/bageldb/bagelink/issues",
18
- "keywords": [],
19
- "sideEffects": false,
20
- "exports": {
21
- "./tsconfig.json": "./tsconfig.json",
22
- "./package.json": "./package.json",
23
- "./src": "./src/index.ts",
24
- "./src/components": "./src/components/index.ts",
25
- "./src/plugins": "./src/plugins/index.ts",
26
- "./src/utils": "./src/utils/index.ts",
27
- "./src/types": "./src/types/index.ts",
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "require": "./dist/index.cjs",
31
- "import": "./dist/index.mjs"
32
- },
33
- "./style.css": "./dist/style.css",
34
- "./*": "./*"
35
- },
36
- "main": "./dist/index.cjs",
37
- "module": "./dist/index.mjs",
38
- "types": "./dist/index.d.ts",
39
- "typesVersions": {
40
- "*": {
41
- "*": [
42
- "./dist/*",
43
- "./dist/index.d.ts"
44
- ]
45
- }
46
- },
47
- "bin": {
48
- "generateFormSchema": "./bin/generateFormSchema.ts",
49
- "experimentalGenTypedRoutes": "./bin/experimentalGenTypedRoutes.ts"
50
- },
51
- "files": [
52
- "dist",
53
- "src",
54
- "./vite.config.ts",
55
- "bin/utils.ts",
56
- "bin/generateFormSchema.ts",
57
- "bin/experimentalGenTypedRoutes.ts"
58
- ],
59
- "devDependencies": {
60
- "@types/leaflet": "^1.9.18",
61
- "@types/signature_pad": "^4.0.0",
62
- "swiper": "^12.0.3",
63
- "vue": "^3.5.32",
64
- "vue-component-type-helpers": "^2.2.10"
65
- },
66
- "peerDependencies": {
67
- "@bagelink/sdk": "*",
68
- "type-fest": "^4",
69
- "vue": "*",
70
- "vue-component-type-helpers": ">=2.2.10",
71
- "vue-draggable-next": "^2.2.1",
72
- "vue-router": "*"
73
- },
74
- "peerDependenciesMeta": {
75
- "vue-draggable-next": {
76
- "optional": true
77
- }
78
- },
79
- "scripts": {
80
- "prepublishOnly": "pnpm build",
81
- "dev": "tsx watch src/index.ts",
82
- "build": "vite build",
83
- "test-build": "pnpm build && node test-build.js",
84
- "start": "tsx src/index.ts",
85
- "test": "vitest"
86
- },
87
- "publishConfig": {
88
- "access": "public"
89
- },
90
- "dependencies": {
91
- "@bagelink/utils": "workspace:*",
92
- "@floating-ui/dom": "^1.7.5",
93
- "@oddbird/popover-polyfill": "^0.6.1",
94
- "@vueuse/core": "^13.3.0",
95
- "@zxcvbn-ts/core": "^3.0.4",
96
- "axios": "^1.9.0",
97
- "floating-vue": "^5.2.2",
98
- "libphonenumber-js": "1.12.9",
99
- "signature_pad": "^5.0.9",
100
- "vue-i18n": "^11.2.8",
101
- "vue-toastification": "^2.0.0-rc.5"
102
- }
103
- }
2
+ "name": "@bagelink/vue",
3
+ "type": "module",
4
+ "version": "1.12.44",
5
+ "description": "Bagel core sdk packages",
6
+ "author": {
7
+ "name": "Bagel Studio",
8
+ "email": "hi@bagelstudio.co.il"
9
+ },
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/vue#readme",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/bageldb/bagelink.git",
15
+ "directory": "packages/vue"
16
+ },
17
+ "bugs": "https://github.com/bageldb/bagelink/issues",
18
+ "keywords": [],
19
+ "sideEffects": false,
20
+ "exports": {
21
+ "./tsconfig.json": "./tsconfig.json",
22
+ "./package.json": "./package.json",
23
+ "./src": "./src/index.ts",
24
+ "./src/components": "./src/components/index.ts",
25
+ "./src/plugins": "./src/plugins/index.ts",
26
+ "./src/utils": "./src/utils/index.ts",
27
+ "./src/types": "./src/types/index.ts",
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "require": "./dist/index.cjs",
31
+ "import": "./dist/index.mjs"
32
+ },
33
+ "./style.css": "./dist/style.css",
34
+ "./*": "./*"
35
+ },
36
+ "main": "./dist/index.cjs",
37
+ "module": "./dist/index.mjs",
38
+ "types": "./dist/index.d.ts",
39
+ "typesVersions": {
40
+ "*": {
41
+ "*": [
42
+ "./dist/*",
43
+ "./dist/index.d.ts"
44
+ ]
45
+ }
46
+ },
47
+ "bin": {
48
+ "generateFormSchema": "./bin/generateFormSchema.ts",
49
+ "experimentalGenTypedRoutes": "./bin/experimentalGenTypedRoutes.ts"
50
+ },
51
+ "files": [
52
+ "dist",
53
+ "src",
54
+ "./vite.config.ts",
55
+ "bin/utils.ts",
56
+ "bin/generateFormSchema.ts",
57
+ "bin/experimentalGenTypedRoutes.ts"
58
+ ],
59
+ "devDependencies": {
60
+ "@types/leaflet": "^1.9.18",
61
+ "@types/signature_pad": "^4.0.0",
62
+ "swiper": "^12.0.3",
63
+ "vue": "^3.5.32",
64
+ "vue-component-type-helpers": "^2.2.10"
65
+ },
66
+ "peerDependencies": {
67
+ "@bagelink/sdk": "*",
68
+ "type-fest": "^4",
69
+ "vue": "*",
70
+ "vue-component-type-helpers": ">=2.2.10",
71
+ "vue-draggable-next": "^2.2.1",
72
+ "vue-router": "*"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "vue-draggable-next": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ },
82
+ "dependencies": {
83
+ "@bagelink/utils": "1.12.42",
84
+ "@floating-ui/dom": "^1.7.5",
85
+ "@oddbird/popover-polyfill": "^0.6.1",
86
+ "@vueuse/core": "^13.3.0",
87
+ "@zxcvbn-ts/core": "^3.0.4",
88
+ "axios": "^1.9.0",
89
+ "floating-vue": "^5.2.2",
90
+ "libphonenumber-js": "1.12.9",
91
+ "signature_pad": "^5.0.9",
92
+ "vue-i18n": "^11.2.8",
93
+ "vue-toastification": "^2.0.0-rc.5"
94
+ },
95
+ "scripts": {
96
+ "dev": "tsx watch src/index.ts",
97
+ "build": "vite build",
98
+ "test-build": "pnpm build && node test-build.js",
99
+ "start": "tsx src/index.ts",
100
+ "test": "vitest"
101
+ }
102
+ }
@@ -61,6 +61,9 @@ const menuState = inject('menuState', {
61
61
  sidebarCollapsedWidth: string
62
62
  }
63
63
 
64
+ // visually "open" during transition — prevents logo/padding from jumping immediately
65
+ const isVisuallyOpen = computed(() => menuState.isOpen.value || isTransitioning.value)
66
+
64
67
  // Watch for changes in menu state to handle transitioning
65
68
  watch(
66
69
  () => menuState.isOpen.value,
@@ -70,7 +73,7 @@ watch(
70
73
  // Reset after transition completes
71
74
  setTimeout(() => {
72
75
  isTransitioning.value = false
73
- }, 300) // Match the CSS transition duration
76
+ }, 400) // Match the CSS transition duration
74
77
  }
75
78
  }
76
79
  )
@@ -144,7 +147,7 @@ const sidebarStyles = computed(() => {
144
147
 
145
148
  <template>
146
149
  <aside
147
- class="app-sidebar transition-400 fixed start top bottom h-100vh z-99 testMe1" :class="{
150
+ class="app-sidebar transition-400 fixed start top bottom h-100vh z-99" :class="{
148
151
  'sidebar-mobile-open': menuState.isMobile.value && menuState.isOpen.value,
149
152
  'sidebar-mobile-closed':
150
153
  menuState.isMobile.value && !menuState.isOpen.value,
@@ -160,16 +163,14 @@ const sidebarStyles = computed(() => {
160
163
  ...(props.card && { borderRadius: 'var(--card-border-radius)' }),
161
164
  }" :class="{
162
165
  'card cardWrapSide': props.card,
163
- 'ps-05': !menuState.isOpen.value,
164
- 'ps-0751': menuState.isOpen.value,
166
+ 'px-05': !isVisuallyOpen,
165
167
  'aside_frame': props.frame,
166
- }" class="overflow-hidden flex column flex-stretch gap-1 w100p pt-1 pb-05 h-100p"
168
+ }" class="overflow-hidden flex column flex-stretch gap-1 w100p pt-1 pb-05 h-100p testMe1"
167
169
  >
168
170
  <!-- Logo/Brand -->
169
171
  <router-link
170
- to="/" class="decoration-none flex siderbarLogoWrap" :class="{
171
- 'gap-05 ps-1': menuState.isOpen.value,
172
- 'gap-0 pe-05 mx-auto': !menuState.isOpen.value,
172
+ to="/" class="decoration-none flex siderbarLogoWrap gap-05"
173
+ :class="{ 'mx-1': isVisuallyOpen, 'mx-05': !isVisuallyOpen
173
174
  }"
174
175
  >
175
176
  <img
@@ -182,7 +183,7 @@ const sidebarStyles = computed(() => {
182
183
  </router-link>
183
184
 
184
185
  <!-- Navigation Links -->
185
- <nav class="sidebar-nav flex column flex-stretch gap-025 align-items-start ps-025" :class="{ 'justify-content-center': props.centerlinks }">
186
+ <nav class="sidebar-nav flex column flex-stretch gap-025 align-items-start" :class="{ 'justify-content-center': props.centerlinks }">
186
187
  <Btn
187
188
  v-for="link in props.navLinks" :key="link.to"
188
189
  :title="!menuState.isOpen.value && !menuState.isMobile.value ? resolveI18n(link.label) : ''" fullWidth
@@ -244,23 +245,13 @@ const sidebarStyles = computed(() => {
244
245
  overflow-y: auto;
245
246
  flex: 1;
246
247
  margin-inline: -0.05rem;
248
+ scrollbar-gutter: stable both-edges;
249
+
247
250
  }
248
251
 
249
252
  .cardWrapSide .bgl_icon-font {
250
253
  visibility: visible !important;
251
254
  }
252
- /* הסתרת גלילה בזמן שינוי גודל */
253
- .app-sidebar.transitioning .sidebar-nav {
254
- scrollbar-width: none;
255
- /* Firefox */
256
- -ms-overflow-style: none;
257
- /* IE and Edge */
258
- }
259
-
260
- .app-sidebar.transitioning .sidebar-nav::-webkit-scrollbar {
261
- display: none;
262
- /* Chrome, Safari and Opera */
263
- }
264
255
 
265
256
  /* אנימציות איטות לטקסט */
266
257
  .nav-text {
@@ -283,6 +274,36 @@ const sidebarStyles = computed(() => {
283
274
  gap: 0 !important;
284
275
  }
285
276
 
277
+ .app-sidebar.sidebar-collapsed .sidebar-nav {
278
+ padding: 0 !important;
279
+ margin-inline: -0.5rem !important;
280
+ align-items: center !important;
281
+ /* scrollbar-gutter: stable both-edges; */
282
+ }
283
+
284
+ /* בזמן האנימציה - שמור על ה-open state */
285
+ .app-sidebar.transitioning.sidebar-collapsed .bgl_btn_fullWidth {
286
+ width: 100% !important;
287
+ }
288
+
289
+ .app-sidebar.transitioning.sidebar-collapsed .bgl_btn-flex {
290
+ gap: revert !important;
291
+ }
292
+
293
+ .app-sidebar.transitioning.sidebar-collapsed .sidebar-nav {
294
+ align-items: flex-start !important;
295
+ padding: revert !important;
296
+ margin-inline: -0.05rem !important;
297
+ margin-block: 0 !important;
298
+ }
299
+
300
+
301
+ aside ::-webkit-scrollbar-track {
302
+ margin: 0 !important;
303
+ }
304
+
305
+
306
+
286
307
  /* אנימציות נכנסות ויוצאות */
287
308
  @media (min-width: 911px) {
288
309
  .app-sidebar {
@@ -18,6 +18,7 @@ import ToggleInput from '../components/form/inputs/ToggleInput.vue'
18
18
  import UploadInput from '../components/form/inputs/Upload/UploadInput.vue'
19
19
  import { useI18n, resolveI18n } from '../i18n'
20
20
  import { evaluateQuery } from '../utils/queryFilter'
21
+ import { EMAIL_REGEX } from '../utils/constants'
21
22
 
22
23
  export type FormState = 'idle' | 'submitting' | 'success' | 'error'
23
24
 
@@ -158,6 +159,11 @@ function validateField(key: string, field: FieldBuilder): boolean {
158
159
  return false
159
160
  }
160
161
 
162
+ if (field._type === 'email' && value && !EMAIL_REGEX.test(value)) {
163
+ validationErrors.value = { ...validationErrors.value, [key]: $t('form.invalidEmail') }
164
+ return false
165
+ }
166
+
161
167
  if (field._validations != null) {
162
168
  for (const validate of field._validations) {
163
169
  const result = validate(value)
@@ -284,6 +290,12 @@ function validateAll(): boolean {
284
290
  continue
285
291
  }
286
292
 
293
+ if (field._type === 'email' && value && !EMAIL_REGEX.test(value)) {
294
+ newErrors[key] = $t('form.invalidEmail')
295
+ isValid = false
296
+ continue
297
+ }
298
+
287
299
  if (field._validations != null) {
288
300
  for (const validate of field._validations) {
289
301
  const result = validate(value)
@@ -109,6 +109,14 @@
109
109
  transform: rotate(180deg);
110
110
  }
111
111
 
112
+ [dir="rtl"] .rotate-180-rtl,
113
+ [dir="rtl"] .rtl-rotate-180,
114
+ [dir="rtl"] .rotate-rtl,
115
+ [dir="rtl"] .rtl-rotate,
116
+ [dir="rtl"] .rtl-180 {
117
+ transform: rotate(180deg);
118
+ }
119
+
112
120
  .rotate-90 {
113
121
  transform: rotate(90deg);
114
122
  }
@@ -130,6 +138,15 @@
130
138
  transform: rotate(270deg);
131
139
  }
132
140
 
141
+
142
+ [dir="rtl"] .m_rotate-180-rtl,
143
+ [dir="rtl"] .m_rtl-rotate-180,
144
+ [dir="rtl"] .m_rotate-rtl,
145
+ [dir="rtl"] .m_rtl-rotate,
146
+ [dir="rtl"] .m_rtl-180 {
147
+ transform: rotate(180deg);
148
+ }
149
+
133
150
  .m_rotate-180 {
134
151
  transform: rotate(180deg);
135
152
  }
@@ -22,6 +22,9 @@ body>div ::-webkit-scrollbar-corner {
22
22
 
23
23
  .bgl-scrollbar-bordered::-webkit-scrollbar-track,
24
24
  .scrollbar-border::-webkit-scrollbar-track {
25
- margin-block: 0 !important;
26
25
  border-inline-start: 1px solid rgba(0, 0, 0, .08) !important;
26
+ }
27
+
28
+ .hide-scrollbar::-webkit-scrollbar {
29
+ display: none;
27
30
  }