quasar 2.6.3 → 2.6.6

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 (143) hide show
  1. package/dist/api/Notify.json +1 -1
  2. package/dist/api/QBreadcrumbsEl.json +1 -1
  3. package/dist/api/QBtn.json +1 -1
  4. package/dist/api/QBtnDropdown.json +1 -1
  5. package/dist/api/QDialog.json +12 -1
  6. package/dist/api/QExpansionItem.json +1 -1
  7. package/dist/api/QImg.json +23 -0
  8. package/dist/api/QItem.json +1 -1
  9. package/dist/api/QRouteTab.json +1 -1
  10. package/dist/api/QVideo.json +43 -0
  11. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  12. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  13. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  14. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  15. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  16. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  17. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  18. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  19. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  20. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  21. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  22. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  26. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  41. package/dist/icon-set/themify.umd.prod.js +1 -1
  42. package/dist/lang/ar-TN.umd.prod.js +1 -1
  43. package/dist/lang/ar.umd.prod.js +1 -1
  44. package/dist/lang/az-Latn.umd.prod.js +1 -1
  45. package/dist/lang/bg.umd.prod.js +1 -1
  46. package/dist/lang/bn.umd.prod.js +1 -1
  47. package/dist/lang/ca.umd.prod.js +1 -1
  48. package/dist/lang/cs.umd.prod.js +1 -1
  49. package/dist/lang/da.umd.prod.js +1 -1
  50. package/dist/lang/de.umd.prod.js +1 -1
  51. package/dist/lang/el.umd.prod.js +1 -1
  52. package/dist/lang/en-GB.umd.prod.js +1 -1
  53. package/dist/lang/en-US.umd.prod.js +1 -1
  54. package/dist/lang/eo.umd.prod.js +1 -1
  55. package/dist/lang/es.umd.prod.js +1 -1
  56. package/dist/lang/et.umd.prod.js +1 -1
  57. package/dist/lang/eu.umd.prod.js +1 -1
  58. package/dist/lang/fa-IR.umd.prod.js +1 -1
  59. package/dist/lang/fa.umd.prod.js +1 -1
  60. package/dist/lang/fi.umd.prod.js +1 -1
  61. package/dist/lang/fr.umd.prod.js +1 -1
  62. package/dist/lang/gn.umd.prod.js +1 -1
  63. package/dist/lang/he.umd.prod.js +1 -1
  64. package/dist/lang/hr.umd.prod.js +1 -1
  65. package/dist/lang/hu.umd.prod.js +1 -1
  66. package/dist/lang/id.umd.prod.js +1 -1
  67. package/dist/lang/is.umd.prod.js +1 -1
  68. package/dist/lang/it.umd.prod.js +1 -1
  69. package/dist/lang/ja.umd.prod.js +1 -1
  70. package/dist/lang/km.umd.prod.js +1 -1
  71. package/dist/lang/ko-KR.umd.prod.js +1 -1
  72. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  73. package/dist/lang/kz.umd.prod.js +1 -1
  74. package/dist/lang/lt.umd.prod.js +1 -1
  75. package/dist/lang/lu.umd.prod.js +1 -1
  76. package/dist/lang/lv.umd.prod.js +1 -1
  77. package/dist/lang/ml.umd.prod.js +1 -1
  78. package/dist/lang/ms.umd.prod.js +1 -1
  79. package/dist/lang/my.umd.prod.js +1 -1
  80. package/dist/lang/nb-NO.umd.prod.js +1 -1
  81. package/dist/lang/nl.umd.prod.js +1 -1
  82. package/dist/lang/pl.umd.prod.js +1 -1
  83. package/dist/lang/pt-BR.umd.prod.js +1 -1
  84. package/dist/lang/pt.umd.prod.js +1 -1
  85. package/dist/lang/ro.umd.prod.js +1 -1
  86. package/dist/lang/ru.umd.prod.js +1 -1
  87. package/dist/lang/sk.umd.prod.js +1 -1
  88. package/dist/lang/sl.umd.prod.js +1 -1
  89. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  90. package/dist/lang/sr.umd.prod.js +1 -1
  91. package/dist/lang/sv.umd.prod.js +1 -1
  92. package/dist/lang/ta.umd.prod.js +1 -1
  93. package/dist/lang/th.umd.prod.js +1 -1
  94. package/dist/lang/tr.umd.prod.js +1 -1
  95. package/dist/lang/ug.umd.prod.js +1 -1
  96. package/dist/lang/uk.umd.prod.js +1 -1
  97. package/dist/lang/vi.umd.prod.js +1 -1
  98. package/dist/lang/zh-CN.umd.prod.js +1 -1
  99. package/dist/lang/zh-TW.umd.prod.js +1 -1
  100. package/dist/quasar.cjs.prod.js +2 -2
  101. package/dist/quasar.css +7 -4
  102. package/dist/quasar.esm.prod.js +2 -2
  103. package/dist/quasar.prod.css +1 -1
  104. package/dist/quasar.rtl.css +13 -10
  105. package/dist/quasar.rtl.prod.css +1 -1
  106. package/dist/quasar.sass +7 -5
  107. package/dist/quasar.umd.js +100 -53
  108. package/dist/quasar.umd.prod.js +2 -2
  109. package/dist/types/api/qnotify.d.ts +0 -1
  110. package/dist/types/api/validation.d.ts +1 -1
  111. package/dist/types/index.d.ts +43 -4
  112. package/dist/vetur/quasar-attributes.json +16 -0
  113. package/dist/vetur/quasar-tags.json +5 -1
  114. package/dist/web-types/web-types.json +48 -8
  115. package/package.json +1 -3
  116. package/src/components/btn/use-btn.json +1 -1
  117. package/src/components/dialog/QDialog.js +7 -7
  118. package/src/components/dialog/QDialog.json +10 -1
  119. package/src/components/dialog/QDialog.sass +2 -2
  120. package/src/components/dialog-plugin/DialogPlugin.js +4 -4
  121. package/src/components/editor/QEditor.js +10 -4
  122. package/src/components/icon/QIcon.js +1 -1
  123. package/src/components/img/QImg.js +5 -0
  124. package/src/components/img/QImg.json +19 -1
  125. package/src/components/menu/QMenu.js +2 -1
  126. package/src/components/table/QTable.js +1 -1
  127. package/src/components/tooltip/QTooltip.js +2 -1
  128. package/src/components/tree/QTree.sass +1 -1
  129. package/src/components/video/QVideo.js +17 -1
  130. package/src/components/video/QVideo.json +36 -0
  131. package/src/components/virtual-scroll/QVirtualScroll.sass +4 -1
  132. package/src/components/virtual-scroll/use-virtual-scroll.js +19 -21
  133. package/src/composables/private/use-portal.js +15 -2
  134. package/src/composables/private/use-router-link.json +1 -1
  135. package/src/history.js +2 -2
  136. package/src/plugins/Notify.json +1 -1
  137. package/src/utils/copy-to-clipboard.js +1 -1
  138. package/src/utils/patterns.js +8 -0
  139. package/src/utils/private/date-persian.js +0 -9
  140. package/src/utils/private/position-engine.js +0 -5
  141. package/src/utils/private/sort.js +0 -11
  142. package/src/utils/private/web-storage.js +1 -1
  143. package/src/utils/uid.js +1 -1
@@ -15,27 +15,30 @@ const scrollToEdges = [
15
15
  'end-force'
16
16
  ]
17
17
 
18
- let id = 1
19
18
  const filterProto = Array.prototype.filter
20
19
 
21
20
  const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.body).overflowAnchor === void 0
22
21
  ? noop
23
- : function (id, index) {
24
- const ssId = id + '_ss'
22
+ : function (contentEl, index) {
23
+ requestAnimationFrame(() => {
24
+ if (contentEl === void 0) {
25
+ return
26
+ }
25
27
 
26
- let styleSheet = document.getElementById(ssId)
28
+ const children = contentEl.children || []
27
29
 
28
- if (styleSheet === null) {
29
- styleSheet = document.createElement('style')
30
- styleSheet.type = 'text/css'
31
- styleSheet.id = ssId
32
- document.head.appendChild(styleSheet)
33
- }
30
+ filterProto
31
+ .call(children, el => el.dataset && el.dataset.qVsAnchor !== void 0)
32
+ .forEach(el => {
33
+ delete el.dataset.qVsAnchor
34
+ })
34
35
 
35
- if (styleSheet.qChildIndex !== index) {
36
- styleSheet.qChildIndex = index
37
- styleSheet.innerHTML = `#${ id } > *:nth-child(${ index }) { overflow-anchor: auto }`
38
- }
36
+ const el = children[ index ]
37
+
38
+ if (el && el.dataset) {
39
+ el.dataset.qVsAnchor = ''
40
+ }
41
+ })
39
42
  }
40
43
 
41
44
  function sumFn (acc, h) {
@@ -231,8 +234,6 @@ export function useVirtualScroll ({
231
234
 
232
235
  let prevScrollStart, prevToIndex, localScrollViewSize, virtualScrollSizesAgg = [], virtualScrollSizes
233
236
 
234
- const vsId = 'qvs_' + id++
235
-
236
237
  const virtualScrollPaddingBefore = ref(0)
237
238
  const virtualScrollPaddingAfter = ref(0)
238
239
  const virtualScrollSliceSizeComputed = ref({})
@@ -418,7 +419,7 @@ export function useVirtualScroll ({
418
419
  })
419
420
  }
420
421
 
421
- setOverflowAnchor(vsId, toIndex - from + 1)
422
+ setOverflowAnchor(contentEl, toIndex - from)
422
423
 
423
424
  const sizeBefore = alignEnd !== void 0 ? virtualScrollSizes.slice(from, toIndex).reduce(sumFn, 0) : 0
424
425
 
@@ -644,7 +645,6 @@ export function useVirtualScroll ({
644
645
  class: 'q-virtual-scroll__content',
645
646
  key: 'content',
646
647
  ref: contentRef,
647
- id: vsId,
648
648
  tabindex: -1
649
649
  }, content.flat()),
650
650
 
@@ -718,9 +718,7 @@ export function useVirtualScroll ({
718
718
  }
719
719
  })
720
720
 
721
- setOverflowAnchor !== noop && onBeforeUnmount(() => {
722
- const styleSheet = document.getElementById(vsId + '_ss')
723
- styleSheet !== null && styleSheet.remove()
721
+ __QUASAR_SSR__ || onBeforeUnmount(() => {
724
722
  onVirtualScrollEvt.cancel()
725
723
  })
726
724
 
@@ -26,11 +26,16 @@ function isOnGlobalDialog (vm) {
26
26
  // You MUST specify "inheritAttrs: false" in your component
27
27
 
28
28
  export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
29
+ // showing, including while in show/hide transition
29
30
  const portalIsActive = ref(false)
30
31
 
32
+ // showing & not in any show/hide transition
33
+ const portalIsAccessible = ref(false)
34
+
31
35
  if (__QUASAR_SSR_SERVER__) {
32
36
  return {
33
37
  portalIsActive,
38
+ portalIsAccessible,
34
39
 
35
40
  showPortal: noop,
36
41
  hidePortal: noop,
@@ -45,9 +50,12 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
45
50
  function showPortal (isReady) {
46
51
  if (isReady === true) {
47
52
  removeFocusWaitFlag(focusObj)
53
+ portalIsAccessible.value = true
48
54
  return
49
55
  }
50
56
 
57
+ portalIsAccessible.value = false
58
+
51
59
  if (portalIsActive.value === false) {
52
60
  if (onGlobalDialog === false && portalEl === null) {
53
61
  portalEl = createGlobalNode()
@@ -62,7 +70,11 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
62
70
  }
63
71
  }
64
72
 
65
- function hidePortal () {
73
+ function hidePortal (isReady) {
74
+ portalIsAccessible.value = false
75
+
76
+ if (isReady !== true) { return }
77
+
66
78
  removeFocusWaitFlag(focusObj)
67
79
  portalIsActive.value = false
68
80
 
@@ -78,7 +90,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
78
90
  }
79
91
  }
80
92
 
81
- onUnmounted(hidePortal)
93
+ onUnmounted(() => { hidePortal(true) })
82
94
 
83
95
  // expose publicly needed stuff for portal utils
84
96
  Object.assign(vm.proxy, { __qPortalInnerRef: innerRef })
@@ -88,6 +100,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
88
100
  hidePortal,
89
101
 
90
102
  portalIsActive,
103
+ portalIsAccessible,
91
104
 
92
105
  renderPortal: () => (
93
106
  onGlobalDialog === true
@@ -39,7 +39,7 @@
39
39
  "href": {
40
40
  "type": "String",
41
41
  "desc": "Native <a> link href attribute; Has priority over the 'to'/'exact'/'replace'/'active-class'/'exact-active-class' props",
42
- "examples": [ "http://quasar.dev" ],
42
+ "examples": [ "https://quasar.dev" ],
43
43
  "category": "navigation",
44
44
  "addedIn": "v2.4"
45
45
  },
package/src/history.js CHANGED
@@ -11,9 +11,9 @@ function filterInvalidPath (path) {
11
11
  }
12
12
 
13
13
  function normalizeExitPath (path) {
14
- path.startsWith('#') === true && (path = path.substr(1))
14
+ path.startsWith('#') === true && (path = path.substring(1))
15
15
  path.startsWith('/') === false && (path = '/' + path)
16
- path.endsWith('/') === true && (path = path.substr(0, path.length - 1))
16
+ path.endsWith('/') === true && (path = path.substring(0, path.length - 1))
17
17
  return '#' + path
18
18
  }
19
19
 
@@ -357,7 +357,7 @@
357
357
 
358
358
  "actions": {
359
359
  "type": "Array",
360
- "tsType": "QNotifyActions",
360
+ "tsType": "QNotifyAction",
361
361
  "desc": "Notification actions (buttons); Unless 'noDismiss' is true, clicking/tapping on the button will close the notification; Also check 'closeBtn' convenience prop",
362
362
  "definition": {
363
363
  "handler": {
@@ -1,7 +1,7 @@
1
1
  function fallback (text) {
2
2
  const area = document.createElement('textarea')
3
3
  area.value = text
4
- area.contentEditable = true
4
+ area.contentEditable = 'true'
5
5
  area.style.position = 'fixed' // avoid scrolling to bottom
6
6
 
7
7
  document.body.appendChild(area)
@@ -14,6 +14,14 @@ export const testPattern = {
14
14
  fulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(v),
15
15
  timeOrFulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v),
16
16
 
17
+ // -- RFC 5322 --
18
+ // -- Added in v2.6.6 --
19
+ // This is a basic helper validation.
20
+ // For something more complex (like RFC 822) you should write and use your own rule.
21
+ // We won't be accepting PRs to enhance the one below because of the reason above.
22
+ // eslint-disable-next-line
23
+ email: v => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v),
24
+
17
25
  hexColor: v => hex.test(v),
18
26
  hexaColor: v => hexa.test(v),
19
27
  hexOrHexaColor: v => hexOrHexa.test(v),
@@ -27,15 +27,6 @@ export function toGregorian (jy, jm, jd) {
27
27
  return d2g(j2d(jy, jm, jd))
28
28
  }
29
29
 
30
- /*
31
- Checks whether a Jalaali date is valid or not.
32
- */
33
- export function isValidJalaaliDate (jy, jm, jd) {
34
- return jy >= -61 && jy <= 3177
35
- && jm >= 1 && jm <= 12
36
- && jd >= 1 && jd <= jalaaliMonthLength(jy, jm)
37
- }
38
-
39
30
  /*
40
31
  Is this a leap year or not?
41
32
  */
@@ -48,11 +48,6 @@ export function parsePosition (pos, rtl) {
48
48
  }
49
49
  }
50
50
 
51
- export function validateCover (val) {
52
- if (val === true || val === false) { return true }
53
- return validatePosition(val)
54
- }
55
-
56
51
  export function getAnchorProps (el, offset) {
57
52
  let { top, left, right, bottom, width, height } = el.getBoundingClientRect()
58
53
 
@@ -1,14 +1,3 @@
1
- export function sortString (a, b) {
2
- if (typeof a !== 'string') {
3
- throw new TypeError('The value for sorting must be a String')
4
- }
5
- return a.localeCompare(b)
6
- }
7
-
8
- export function sortNumber (a, b) {
9
- return a - b
10
- }
11
-
12
1
  export function sortDate (a, b) {
13
2
  return (new Date(a)) - (new Date(b))
14
3
  }
@@ -36,7 +36,7 @@ function decode (value) {
36
36
  return value
37
37
  }
38
38
 
39
- const type = value.substr(0, 8)
39
+ const type = value.substring(0, 8)
40
40
  const source = value.substring(9)
41
41
 
42
42
  switch (type) {
package/src/utils/uid.js CHANGED
@@ -9,7 +9,7 @@ const hexBytes = new Array(256)
9
9
 
10
10
  // Pre-calculate toString(16) for speed
11
11
  for (let i = 0; i < 256; i++) {
12
- hexBytes[ i ] = (i + 0x100).toString(16).substr(1)
12
+ hexBytes[ i ] = (i + 0x100).toString(16).substring(1)
13
13
  }
14
14
 
15
15
  // Use best available PRNG