@bagelink/vue 1.6.47 → 1.6.51

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 (170) hide show
  1. package/bin/experimentalGenTypedRoutes.ts +18 -19
  2. package/bin/utils.ts +4 -4
  3. package/dist/components/AddressSearch.vue.d.ts.map +1 -1
  4. package/dist/components/Alert.vue.d.ts.map +1 -1
  5. package/dist/components/BglVideo.vue.d.ts.map +1 -1
  6. package/dist/components/Card.vue.d.ts.map +1 -1
  7. package/dist/components/Carousel.vue.d.ts +2 -2
  8. package/dist/components/Carousel.vue.d.ts.map +1 -1
  9. package/dist/components/Dropdown.vue.d.ts.map +1 -1
  10. package/dist/components/Flag.vue.d.ts.map +1 -1
  11. package/dist/components/IframeVue.vue.d.ts.map +1 -1
  12. package/dist/components/ListItem.vue.d.ts.map +1 -1
  13. package/dist/components/Loading.vue.d.ts.map +1 -1
  14. package/dist/components/Modal.vue.d.ts.map +1 -1
  15. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  16. package/dist/components/NavBar.vue.d.ts +1 -1
  17. package/dist/components/Pill.vue.d.ts.map +1 -1
  18. package/dist/components/Zoomer.vue.d.ts +0 -1
  19. package/dist/components/Zoomer.vue.d.ts.map +1 -1
  20. package/dist/components/analytics/LineChart.vue.d.ts.map +1 -1
  21. package/dist/components/analytics/PieChart.vue.d.ts +2 -1
  22. package/dist/components/analytics/PieChart.vue.d.ts.map +1 -1
  23. package/dist/components/analytics/index.d.ts +1 -1
  24. package/dist/components/analytics/index.d.ts.map +1 -1
  25. package/dist/components/calendar/CalendarPopover.vue.d.ts.map +1 -1
  26. package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
  27. package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -1
  28. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  29. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  30. package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
  31. package/dist/components/form/inputs/RangeInput.vue.d.ts +11 -11
  32. package/dist/components/form/inputs/RichText/components/EditorToolbar.vue.d.ts.map +1 -1
  33. package/dist/components/form/inputs/RichText/components/TableGridSelector.vue.d.ts.map +1 -1
  34. package/dist/components/form/inputs/RichText/utils/commands.d.ts.map +1 -1
  35. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  36. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  37. package/dist/components/layout/AppSidebar.vue.d.ts +1 -0
  38. package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
  39. package/dist/components/layout/Layout.vue.d.ts.map +1 -1
  40. package/dist/components/layout/Tabs.vue.d.ts.map +1 -1
  41. package/dist/components/layout/index.d.ts +3 -3
  42. package/dist/components/layout/index.d.ts.map +1 -1
  43. package/dist/index.cjs +34 -25
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.mjs +6668 -5883
  47. package/dist/plugins/useToast.d.ts.map +1 -1
  48. package/dist/style.css +1 -1
  49. package/package.json +5 -10
  50. package/src/components/AccordionItem.vue +11 -11
  51. package/src/components/AddToCalendar.vue +1 -1
  52. package/src/components/AddressSearch.vue +9 -8
  53. package/src/components/Alert.vue +2 -1
  54. package/src/components/Badge.vue +5 -5
  55. package/src/components/BglVideo.vue +44 -45
  56. package/src/components/Btn.vue +15 -15
  57. package/src/components/Card.vue +10 -8
  58. package/src/components/Carousel.vue +159 -162
  59. package/src/components/DataPreview.vue +1 -1
  60. package/src/components/DragOver.vue +6 -6
  61. package/src/components/Dropdown.vue +39 -38
  62. package/src/components/Flag.vue +7 -6
  63. package/src/components/Icon/Icon.vue +22 -22
  64. package/src/components/IframeVue.vue +5 -5
  65. package/src/components/Image.vue +17 -17
  66. package/src/components/ImportData.vue +79 -79
  67. package/src/components/ListItem.vue +20 -13
  68. package/src/components/Loading.vue +10 -9
  69. package/src/components/MapEmbed/Index.vue +24 -24
  70. package/src/components/Modal.vue +11 -9
  71. package/src/components/ModalForm.vue +9 -8
  72. package/src/components/NavBar.vue +6 -6
  73. package/src/components/Pagination.vue +27 -27
  74. package/src/components/Pill.vue +11 -12
  75. package/src/components/Rating.vue +2 -2
  76. package/src/components/Slider.vue +75 -75
  77. package/src/components/Spreadsheet/Index.vue +34 -34
  78. package/src/components/Spreadsheet/SpreadsheetTable.vue +3 -3
  79. package/src/components/Zoomer.vue +165 -170
  80. package/src/components/analytics/BarChart.vue +6 -6
  81. package/src/components/analytics/KpiCard.vue +2 -2
  82. package/src/components/analytics/LineChart.vue +63 -61
  83. package/src/components/analytics/PieChart.vue +104 -90
  84. package/src/components/analytics/index.ts +2 -2
  85. package/src/components/calendar/CalendarPopover.vue +1 -1
  86. package/src/components/calendar/Index.vue +1 -1
  87. package/src/components/calendar/views/AgendaView.vue +3 -3
  88. package/src/components/calendar/views/DayView.vue +6 -6
  89. package/src/components/calendar/views/MonthView.vue +2 -2
  90. package/src/components/calendar/views/WeekView.vue +18 -18
  91. package/src/components/dataTable/DataTable.vue +4 -4
  92. package/src/components/dataTable/useSorting.ts +1 -1
  93. package/src/components/dataTable/useTableData.ts +15 -15
  94. package/src/components/dataTable/useTableSelection.ts +15 -15
  95. package/src/components/dataTable/useTableVirtualization.ts +1 -1
  96. package/src/components/draggable/useDraggable.ts +42 -42
  97. package/src/components/form/BagelForm.vue +15 -15
  98. package/src/components/form/BglFieldSet.vue +5 -3
  99. package/src/components/form/BglMultiStepForm.vue +20 -21
  100. package/src/components/form/inputs/CheckInput.vue +2 -2
  101. package/src/components/form/inputs/CodeEditor/format.ts +7 -7
  102. package/src/components/form/inputs/CodeEditor/useHighlight.ts +6 -6
  103. package/src/components/form/inputs/ColorInput.vue +5 -4
  104. package/src/components/form/inputs/DateInput.vue +8 -9
  105. package/src/components/form/inputs/DatePicker.vue +24 -24
  106. package/src/components/form/inputs/EmailInput.vue +24 -24
  107. package/src/components/form/inputs/NumberInput.vue +26 -26
  108. package/src/components/form/inputs/OTP.vue +7 -7
  109. package/src/components/form/inputs/PasswordInput.vue +3 -2
  110. package/src/components/form/inputs/RadioGroup.vue +28 -25
  111. package/src/components/form/inputs/RadioPillsInput.vue +12 -12
  112. package/src/components/form/inputs/RangeInput.vue +21 -21
  113. package/src/components/form/inputs/RichText/components/EditorToolbar.vue +107 -92
  114. package/src/components/form/inputs/RichText/components/TableGridSelector.vue +64 -64
  115. package/src/components/form/inputs/RichText/components/gridBox.vue +10 -8
  116. package/src/components/form/inputs/RichText/composables/useCommands.ts +1 -1
  117. package/src/components/form/inputs/RichText/composables/useEditor.ts +12 -12
  118. package/src/components/form/inputs/RichText/composables/useEditorKeyboard.ts +1 -1
  119. package/src/components/form/inputs/RichText/index.vue +138 -138
  120. package/src/components/form/inputs/RichText/utils/commands.ts +84 -85
  121. package/src/components/form/inputs/RichText/utils/debug.ts +1 -1
  122. package/src/components/form/inputs/RichText/utils/formatting.ts +39 -39
  123. package/src/components/form/inputs/RichText/utils/selection.ts +28 -28
  124. package/src/components/form/inputs/RichText/utils/table.ts +19 -19
  125. package/src/components/form/inputs/SelectBtn.vue +1 -1
  126. package/src/components/form/inputs/SelectInput.vue +54 -54
  127. package/src/components/form/inputs/SignaturePad.vue +40 -40
  128. package/src/components/form/inputs/TableField.vue +1 -1
  129. package/src/components/form/inputs/TelInput.vue +54 -53
  130. package/src/components/form/inputs/TextInput.vue +19 -19
  131. package/src/components/form/inputs/ToggleInput.vue +2 -2
  132. package/src/components/form/inputs/Upload/useFileUpload.ts +6 -6
  133. package/src/components/form/useBagelFormState.ts +5 -5
  134. package/src/components/layout/AppLayout.vue +2 -2
  135. package/src/components/layout/AppSidebar.vue +77 -16
  136. package/src/components/layout/Layout.vue +12 -10
  137. package/src/components/layout/SidebarMenu.vue +4 -4
  138. package/src/components/layout/TabbedLayout.vue +17 -17
  139. package/src/components/layout/Tabs.vue +4 -5
  140. package/src/components/layout/TabsNav.vue +14 -14
  141. package/src/components/layout/index.ts +3 -5
  142. package/src/components/lightbox/Lightbox.vue +22 -22
  143. package/src/components/lightbox/index.ts +8 -8
  144. package/src/composables/index.ts +8 -8
  145. package/src/composables/useAddToCalendar.ts +13 -13
  146. package/src/composables/useDevice.ts +2 -2
  147. package/src/composables/useFormField.ts +4 -4
  148. package/src/composables/usePolling.ts +8 -8
  149. package/src/composables/useSchemaField.ts +38 -38
  150. package/src/composables/useTheme.ts +9 -9
  151. package/src/composables/useValidateFieldValue.ts +2 -2
  152. package/src/directives/pattern.ts +25 -25
  153. package/src/directives/ripple.ts +4 -4
  154. package/src/directives/vResize.ts +6 -6
  155. package/src/index.ts +1 -0
  156. package/src/plugins/bagel.ts +4 -4
  157. package/src/plugins/useToast.ts +56 -51
  158. package/src/styles/layout.css +1 -1
  159. package/src/types/index.ts +1 -1
  160. package/src/utils/BagelFormUtils.ts +7 -7
  161. package/src/utils/calendar/Helpers.ts +8 -8
  162. package/src/utils/calendar/dateUtils.ts +22 -22
  163. package/src/utils/calendar/time.ts +25 -25
  164. package/src/utils/calendar/week.ts +25 -25
  165. package/src/utils/elementUtils.ts +27 -27
  166. package/src/utils/sizeParsing.ts +2 -2
  167. package/src/utils/strings.ts +5 -5
  168. package/src/utils/tapDetector.ts +11 -11
  169. package/src/utils/useSearch.ts +29 -29
  170. package/vite.config.ts +0 -2
@@ -17,7 +17,7 @@ const htmlReplacers = {
17
17
  * @returns Plain text without HTML tags
18
18
  */
19
19
  export function clearHtml(value?: string) {
20
- if (!value) {return ''}
20
+ if (!value) { return '' }
21
21
  return Object.entries(htmlReplacers)
22
22
  .reduce(
23
23
  (
@@ -52,7 +52,7 @@ function getValueByPath(obj: any, path: string): any {
52
52
  let result = obj
53
53
 
54
54
  for (const key of keys) {
55
- if (null === result || result === undefined || 'object' !== typeof result) {
55
+ if (result === null || result === undefined || typeof result !== 'object') {
56
56
  return undefined
57
57
  }
58
58
  result = result[key]
@@ -71,7 +71,7 @@ function getValueByPath(obj: any, path: string): any {
71
71
  function calculateRelevance(stringValue: string, searchTerms: string[]): number {
72
72
  let score = 0
73
73
 
74
- if (0 === stringValue.length) {return 0}
74
+ if (stringValue.length === 0) { return 0 }
75
75
 
76
76
  // Track matched character count for density calculation
77
77
  let totalMatchedChars = 0
@@ -138,7 +138,7 @@ export interface SearchResult<T> {
138
138
  * @returns True if the value is a primitive
139
139
  */
140
140
  function isPrimitive(value: any): boolean {
141
- return 'string' === typeof value || 'number' === typeof value || 'boolean' === typeof value
141
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'
142
142
  }
143
143
 
144
144
  /**
@@ -147,10 +147,10 @@ function isPrimitive(value: any): boolean {
147
147
  * @returns String representation or empty string if value can't be converted
148
148
  */
149
149
  function toSearchableString(value: any): string {
150
- if (null === value || value === undefined) {return ''}
151
- if ('string' === typeof value) {return clearHtml(value)}
152
- if ('number' === typeof value || 'boolean' === typeof value) {return String(value)}
153
- if ('object' === typeof value && value instanceof Date) {return value.toISOString()}
150
+ if (value === null || value === undefined) { return '' }
151
+ if (typeof value === 'string') { return clearHtml(value) }
152
+ if (typeof value === 'number' || typeof value === 'boolean') { return String(value) }
153
+ if (typeof value === 'object' && value instanceof Date) { return value.toISOString() }
154
154
  return ''
155
155
  }
156
156
 
@@ -168,14 +168,14 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
168
168
  const itemsArray = toValue(items) || []
169
169
 
170
170
  // Return all items if search is empty or doesn't meet minimum character threshold
171
- if (!searchValue || searchValue.length < minChars) {return itemsArray}
171
+ if (!searchValue || searchValue.length < minChars) { return itemsArray }
172
172
 
173
173
  // Split search term into individual words for better matching
174
174
  const searchTerms = normalizeText(searchValue)
175
175
  .split(/\s+/)
176
- .filter(term => 1 < term.length)
176
+ .filter(term => term.length > 1)
177
177
 
178
- if (0 === searchTerms.length) {return itemsArray}
178
+ if (searchTerms.length === 0) { return itemsArray }
179
179
 
180
180
  // ---- Field weight configuration ----
181
181
  // Default field weights for common fields
@@ -209,7 +209,7 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
209
209
  // First check custom weights
210
210
  if (path in fieldWeights) {
211
211
  const customWeight = fieldWeights[path]
212
- if ('number' === typeof customWeight) {
212
+ if (typeof customWeight === 'number') {
213
213
  return customWeight
214
214
  }
215
215
  }
@@ -231,13 +231,13 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
231
231
  * @returns Array of flattened key paths
232
232
  */
233
233
  function collectAllKeys(obj: any, prefix = ''): string[] {
234
- if (!obj || 'object' !== typeof obj) {return []}
234
+ if (!obj || typeof obj !== 'object') { return [] }
235
235
 
236
236
  return Object.keys(obj).flatMap((key) => {
237
237
  const value = obj[key]
238
238
  const newPrefix = prefix ? `${prefix}.${key}` : key
239
239
 
240
- if (value && 'object' === typeof value && !Array.isArray(value)) {
240
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
241
241
  // Recurse for nested objects
242
242
  return [newPrefix, ...collectAllKeys(value, newPrefix)]
243
243
  }
@@ -281,7 +281,7 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
281
281
  const value = getValueByPath(item, String(keyPath))
282
282
 
283
283
  // Skip null/undefined values
284
- if (null === value || value === undefined) {continue}
284
+ if (value === null || value === undefined) { continue }
285
285
 
286
286
  // CASE 3.1: Handle array field values
287
287
  if (Array.isArray(value)) {
@@ -299,7 +299,7 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
299
299
  }
300
300
 
301
301
  // CASE 3.2: Handle object fields (skip and process their properties separately)
302
- if ('object' === typeof value && !isPrimitive(value)) {
302
+ if (typeof value === 'object' && !isPrimitive(value)) {
303
303
  continue
304
304
  }
305
305
 
@@ -322,19 +322,19 @@ export function searchItems<T>(params: SearchItemParams<T>): T[] {
322
322
  })
323
323
 
324
324
  // Filter items with non-zero relevance
325
- const nonZeroItems = scoredItems.filter(([, score]) => 0 < score)
325
+ const nonZeroItems = scoredItems.filter(([, score]) => score > 0)
326
326
 
327
327
  // Apply dynamic threshold based on score distribution
328
328
  let filteredItems = nonZeroItems
329
- if (0 < nonZeroItems.length) {
329
+ if (nonZeroItems.length > 0) {
330
330
  const maxScore = Math.max(...nonZeroItems.map(([, score]) => score))
331
331
 
332
332
  // If we have very high relevance items, filter out low relevance noise
333
- if (5 < maxScore) {
333
+ if (maxScore > 5) {
334
334
  // Items below 25% of max score are considered low relevance
335
335
  const threshold = maxScore * 0.25
336
336
  filteredItems = nonZeroItems.filter(([, score]) => score >= threshold)
337
- } else if (2 < maxScore) {
337
+ } else if (maxScore > 2) {
338
338
  // For medium relevance results, use a lower threshold
339
339
  const threshold = maxScore * 0.15
340
340
  filteredItems = nonZeroItems.filter(([, score]) => score >= threshold)
@@ -384,8 +384,8 @@ export function useSearch<T>(
384
384
  // Check if first argument is an array or ref (simplified usage)
385
385
  // If it's a params object, it won't have these characteristics
386
386
  const isArray = Array.isArray(paramsOrItems)
387
- const isFunction = 'function' === typeof paramsOrItems
388
- const isObject = 'object' === typeof paramsOrItems && null !== paramsOrItems
387
+ const isFunction = typeof paramsOrItems === 'function'
388
+ const isObject = typeof paramsOrItems === 'object' && paramsOrItems !== null
389
389
  const isRef = isObject && 'value' in paramsOrItems && !('items' in paramsOrItems)
390
390
 
391
391
  const isSimplifiedUsage = isArray || isFunction || isRef
@@ -416,14 +416,14 @@ export function useSearch<T>(
416
416
  () => toValue(searchTerm),
417
417
  async (newTerm) => {
418
418
  // Clear previous timeout if it exists
419
- if (null !== debounceTimeout) {
419
+ if (debounceTimeout !== null) {
420
420
  clearTimeout(debounceTimeout)
421
421
  }
422
422
 
423
- const term = 'string' === typeof newTerm ? newTerm : ''
423
+ const term = typeof newTerm === 'string' ? newTerm : ''
424
424
 
425
425
  // Allow initial/default fetch when minChars === 0 (including empty term)
426
- if (term.length < minChars && 0 < minChars) {
426
+ if (term.length < minChars && minChars > 0) {
427
427
  serverResults.value = []
428
428
  return
429
429
  }
@@ -454,11 +454,11 @@ export function useSearch<T>(
454
454
 
455
455
  // If using server-side search
456
456
  if (serverSearch) {
457
- if (term && 'string' === typeof term && term.length >= minChars) {
457
+ if (term && typeof term === 'string' && term.length >= minChars) {
458
458
  return serverResults.value as T[]
459
459
  }
460
460
  // If minChars is 0, allow default server results when empty
461
- if (0 === minChars) {return serverResults.value as T[]}
461
+ if (minChars === 0) { return serverResults.value as T[] }
462
462
  }
463
463
 
464
464
  // Otherwise use client-side filtering
@@ -467,10 +467,10 @@ export function useSearch<T>(
467
467
  // Create computed references
468
468
  const results = computed(() => getFilteredResults())
469
469
  const resultCount = computed(() => results.value.length)
470
- const hasResults = computed(() => 0 < resultCount.value)
470
+ const hasResults = computed(() => resultCount.value > 0)
471
471
  const isSearching = computed(() => {
472
472
  const term = getSearchTermValue()
473
- return !!term && 'string' === typeof term && term.length >= minChars
473
+ return !!term && typeof term === 'string' && term.length >= minChars
474
474
  })
475
475
 
476
476
  const result: SearchResult<T> = {
package/vite.config.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { resolve } from 'node:path'
2
2
  // import { fileURLToPath, URL } from 'node:url'
3
3
  import vue from '@vitejs/plugin-vue'
4
- import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
5
4
  import { defineConfig } from 'vite'
6
5
  import dts from 'vite-plugin-dts'
7
6
  import tsconfigPaths from 'vite-tsconfig-paths'
@@ -11,7 +10,6 @@ const indexDir = resolve(import.meta.dirname, 'src')
11
10
  export default defineConfig(() => ({
12
11
  plugins: [
13
12
  tsconfigPaths({ root: indexDir, }),
14
- ReactivityTransform(),
15
13
  vue(),
16
14
  dts({
17
15
  entryRoot: indexDir,