quasar 2.4.1 → 2.4.5

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 (182) hide show
  1. package/dist/api/BottomSheet.json +6 -2
  2. package/dist/api/LoadingBar.json +1 -1
  3. package/dist/api/Notify.json +25 -25
  4. package/dist/api/QAjaxBar.json +23 -4
  5. package/dist/api/QAvatar.json +1 -1
  6. package/dist/api/QBreadcrumbsEl.json +1 -1
  7. package/dist/api/QBtn.json +2 -2
  8. package/dist/api/QBtnDropdown.json +3 -3
  9. package/dist/api/QBtnToggle.json +1 -1
  10. package/dist/api/QCarousel.json +4 -4
  11. package/dist/api/QCarouselSlide.json +2 -2
  12. package/dist/api/QChatMessage.json +1 -1
  13. package/dist/api/QChip.json +4 -4
  14. package/dist/api/QExpansionItem.json +3 -3
  15. package/dist/api/QFab.json +2 -2
  16. package/dist/api/QFabAction.json +1 -1
  17. package/dist/api/QImg.json +2 -2
  18. package/dist/api/QLinearProgress.json +1 -1
  19. package/dist/api/QPagination.json +4 -4
  20. package/dist/api/QParallax.json +1 -1
  21. package/dist/api/QPullToRefresh.json +1 -1
  22. package/dist/api/QRadio.json +3 -1
  23. package/dist/api/QRating.json +3 -3
  24. package/dist/api/QRouteTab.json +1 -1
  25. package/dist/api/QSelect.json +2 -2
  26. package/dist/api/QStep.json +4 -4
  27. package/dist/api/QStepper.json +4 -4
  28. package/dist/api/QTab.json +1 -1
  29. package/dist/api/QTable.json +4 -4
  30. package/dist/api/QTimelineEntry.json +2 -2
  31. package/dist/api/QToggle.json +1 -1
  32. package/dist/api/QTree.json +1 -1
  33. package/dist/api/QVideo.json +11 -1
  34. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  36. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  37. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  39. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  40. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  41. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  42. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  43. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  44. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  45. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  46. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  47. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  56. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  62. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  63. package/dist/icon-set/themify.umd.prod.js +1 -1
  64. package/dist/lang/ar.umd.prod.js +1 -1
  65. package/dist/lang/az-Latn.umd.prod.js +1 -1
  66. package/dist/lang/bg.umd.prod.js +1 -1
  67. package/dist/lang/bn.umd.prod.js +1 -1
  68. package/dist/lang/ca.umd.prod.js +1 -1
  69. package/dist/lang/cs.umd.prod.js +1 -1
  70. package/dist/lang/da.umd.prod.js +1 -1
  71. package/dist/lang/de.umd.prod.js +1 -1
  72. package/dist/lang/el.umd.prod.js +1 -1
  73. package/dist/lang/en-GB.umd.prod.js +1 -1
  74. package/dist/lang/en-US.umd.prod.js +1 -1
  75. package/dist/lang/eo.umd.prod.js +1 -1
  76. package/dist/lang/es.umd.prod.js +1 -1
  77. package/dist/lang/et.umd.prod.js +1 -1
  78. package/dist/lang/fa-IR.umd.prod.js +1 -1
  79. package/dist/lang/fa.umd.prod.js +1 -1
  80. package/dist/lang/fi.umd.prod.js +1 -1
  81. package/dist/lang/fr.umd.prod.js +1 -1
  82. package/dist/lang/gn.umd.prod.js +1 -1
  83. package/dist/lang/he.umd.prod.js +1 -1
  84. package/dist/lang/hr.umd.prod.js +1 -1
  85. package/dist/lang/hu.umd.prod.js +1 -1
  86. package/dist/lang/id.umd.prod.js +1 -1
  87. package/dist/lang/is.umd.prod.js +1 -1
  88. package/dist/lang/it.umd.prod.js +1 -1
  89. package/dist/lang/ja.umd.prod.js +1 -1
  90. package/dist/lang/km.umd.prod.js +1 -1
  91. package/dist/lang/ko-KR.umd.prod.js +1 -1
  92. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  93. package/dist/lang/lt.umd.prod.js +1 -1
  94. package/dist/lang/lu.umd.prod.js +1 -1
  95. package/dist/lang/lv.umd.prod.js +1 -1
  96. package/dist/lang/ml.umd.prod.js +1 -1
  97. package/dist/lang/ms.umd.prod.js +1 -1
  98. package/dist/lang/nb-NO.umd.prod.js +1 -1
  99. package/dist/lang/nl.umd.prod.js +1 -1
  100. package/dist/lang/pl.umd.prod.js +1 -1
  101. package/dist/lang/pt-BR.umd.prod.js +1 -1
  102. package/dist/lang/pt.umd.prod.js +1 -1
  103. package/dist/lang/ro.umd.prod.js +1 -1
  104. package/dist/lang/ru.umd.prod.js +1 -1
  105. package/dist/lang/sk.umd.prod.js +1 -1
  106. package/dist/lang/sl.umd.prod.js +1 -1
  107. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  108. package/dist/lang/sr.umd.prod.js +1 -1
  109. package/dist/lang/sv.umd.prod.js +1 -1
  110. package/dist/lang/ta.umd.prod.js +1 -1
  111. package/dist/lang/th.umd.prod.js +1 -1
  112. package/dist/lang/tr.umd.prod.js +1 -1
  113. package/dist/lang/ug.umd.prod.js +1 -1
  114. package/dist/lang/uk.umd.prod.js +1 -1
  115. package/dist/lang/vi.umd.prod.js +1 -1
  116. package/dist/lang/zh-CN.umd.prod.js +1 -1
  117. package/dist/lang/zh-TW.umd.prod.js +1 -1
  118. package/dist/quasar.cjs.prod.js +2 -2
  119. package/dist/quasar.css +15 -14
  120. package/dist/quasar.esm.prod.js +2 -2
  121. package/dist/quasar.prod.css +1 -1
  122. package/dist/quasar.rtl.css +15 -14
  123. package/dist/quasar.rtl.prod.css +1 -1
  124. package/dist/quasar.sass +11 -13
  125. package/dist/quasar.umd.js +425 -286
  126. package/dist/quasar.umd.prod.js +2 -2
  127. package/dist/ssr-directives/Morph.js +1 -1
  128. package/dist/types/index.d.ts +29 -11
  129. package/dist/types/utils/date.d.ts +2 -1
  130. package/dist/vetur/quasar-attributes.json +13 -5
  131. package/dist/vetur/quasar-tags.json +4 -2
  132. package/dist/web-types/web-types.json +80 -62
  133. package/package.json +1 -1
  134. package/src/api.extends.json +1 -1
  135. package/src/components/ajax-bar/QAjaxBar.js +47 -26
  136. package/src/components/ajax-bar/QAjaxBar.json +22 -4
  137. package/src/components/breadcrumbs/QBreadcrumbs.js +3 -3
  138. package/src/components/breadcrumbs/QBreadcrumbsEl.js +2 -2
  139. package/src/components/btn/use-btn.js +5 -2
  140. package/src/components/btn-toggle/QBtnToggle.js +2 -0
  141. package/src/components/carousel/QCarouselSlide.json +2 -2
  142. package/src/components/chat/QChatMessage.json +1 -1
  143. package/src/components/dialog/QDialog.js +7 -5
  144. package/src/components/icon/QIcon.js +36 -32
  145. package/src/components/icon/QIcon.sass +0 -1
  146. package/src/components/img/QImg.json +2 -2
  147. package/src/components/layout/QLayout.js +49 -1
  148. package/src/components/linear-progress/QLinearProgress.json +1 -1
  149. package/src/components/menu/QMenu.js +6 -2
  150. package/src/components/pagination/QPagination.js +4 -4
  151. package/src/components/parallax/QParallax.json +1 -1
  152. package/src/components/radio/QRadio.js +2 -6
  153. package/src/components/radio/QRadio.json +1 -1
  154. package/src/components/range/QRange.js +67 -89
  155. package/src/components/rating/QRating.json +3 -3
  156. package/src/components/resize-observer/QResizeObserver.js +11 -10
  157. package/src/components/scroll-area/QScrollArea.js +5 -1
  158. package/src/components/scroll-area/QScrollArea.sass +1 -0
  159. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  160. package/src/components/select/QSelect.js +4 -1
  161. package/src/components/select/QSelect.json +1 -1
  162. package/src/components/slider/QSlider.js +20 -10
  163. package/src/components/slider/QSlider.sass +5 -6
  164. package/src/components/slider/use-slider.js +19 -16
  165. package/src/components/tabs/QTabs.js +27 -11
  166. package/src/components/timeline/QTimeline.sass +1 -2
  167. package/src/components/timeline/QTimelineEntry.json +1 -1
  168. package/src/components/tooltip/QTooltip.js +1 -2
  169. package/src/components/video/QVideo.js +4 -1
  170. package/src/components/video/QVideo.json +12 -1
  171. package/src/composables/private/use-field.js +13 -15
  172. package/src/composables/private/use-model-toggle.js +1 -1
  173. package/src/composables/private/use-portal.js +9 -7
  174. package/src/composables/private/use-tick.js +7 -14
  175. package/src/css/core/visibility.sass +0 -1
  176. package/src/css/variables.sass +4 -6
  177. package/src/plugins/BottomSheet.json +7 -1
  178. package/src/plugins/LoadingBar.json +1 -1
  179. package/src/plugins/Notify.json +22 -22
  180. package/src/utils/clone.js +53 -4
  181. package/src/utils/private/focus-manager.js +8 -10
  182. package/src/utils/private/global-dialog.js +4 -4
@@ -70,7 +70,8 @@ export default createComponent({
70
70
  const vm = getCurrentInstance()
71
71
  const { proxy: { $q } } = vm
72
72
 
73
- const { registerTick, prepareTick } = useTick()
73
+ const { registerTick: registerScrollTick } = useTick()
74
+ const { registerTimeout: registerFocusTimeout, removeTimeout: removeFocusTimeout } = useTimeout()
74
75
  const { registerTimeout } = useTimeout()
75
76
 
76
77
  const rootRef = ref(null)
@@ -178,7 +179,7 @@ export default createComponent({
178
179
  }
179
180
 
180
181
  function recalculateScroll () {
181
- registerTick(() => {
182
+ registerScrollTick(() => {
182
183
  if (vm.isDeactivated !== true && vm.isUnmounted !== true) {
183
184
  updateContainer({
184
185
  width: rootRef.value.offsetWidth,
@@ -186,8 +187,6 @@ export default createComponent({
186
187
  })
187
188
  }
188
189
  })
189
-
190
- prepareTick()
191
190
  }
192
191
 
193
192
  function updateContainer (domSize) {
@@ -346,11 +345,8 @@ export default createComponent({
346
345
  return true
347
346
  }
348
347
 
349
- const dirPrev = (props.vertical === true && keyCode === 38 /* ArrowUp */)
350
- || (props.vertical !== true && keyCode === 37 /* ArrowLeft */)
351
-
352
- const dirNext = (props.vertical === true && keyCode === 40 /* ArrowDown */)
353
- || (props.vertical !== true && keyCode === 39 /* ArrowRight */)
348
+ const dirPrev = keyCode === (props.vertical === true ? 38 /* ArrowUp */ : 37 /* ArrowLeft */)
349
+ const dirNext = keyCode === (props.vertical === true ? 40 /* ArrowDown */ : 39 /* ArrowRight */)
354
350
 
355
351
  const dir = dirPrev === true ? -1 : (dirNext === true ? 1 : void 0)
356
352
 
@@ -484,8 +480,28 @@ export default createComponent({
484
480
  }
485
481
  }
486
482
 
487
- function onFocusin () { hasFocus.value = true }
488
- function onFocusout () { hasFocus.value = false }
483
+ function onFocusin (e) {
484
+ removeFocusTimeout()
485
+
486
+ if (
487
+ hasFocus.value !== true
488
+ && rootRef.value !== null
489
+ && e.target
490
+ && typeof e.target.closest === 'function'
491
+ ) {
492
+ const tab = e.target.closest('.q-tab')
493
+
494
+ // if the target is contained by a QTab/QRouteTab
495
+ // (it might be other elements focused, like additional QBtn)
496
+ if (tab && rootRef.value.contains(tab) === true) {
497
+ hasFocus.value = true
498
+ }
499
+ }
500
+ }
501
+
502
+ function onFocusout () {
503
+ registerFocusTimeout(() => { hasFocus.value = false }, 30)
504
+ }
489
505
 
490
506
  function verifyRouteModel () {
491
507
  if ($tabs.avoidRouteWatcher !== true) {
@@ -20,7 +20,7 @@
20
20
  &__subtitle
21
21
  font-size: 12px
22
22
  margin-bottom: 8px
23
- opacity: .4
23
+ opacity: .6
24
24
  text-transform: uppercase
25
25
  letter-spacing: 1px
26
26
  font-weight: 700
@@ -240,4 +240,3 @@
240
240
 
241
241
  &__subtitle, &__content
242
242
  width: 50%
243
-
@@ -34,7 +34,7 @@
34
34
  "desc": "URL to the avatar image; Icon takes precedence if used, so it replaces avatar",
35
35
  "transformAssetUrls": true,
36
36
  "examples": [
37
- "(statics folder) src=\"statics/img/my-bg.png\"",
37
+ "(public folder) src=\"img/my-bg.png\"",
38
38
  "(assets folder) src=\"~assets/my-img.png\"",
39
39
  "(relative path format) :src=\"require('./my_img.jpg')\"",
40
40
  "(URL) src=\"https://placeimg.com/500/300/nature\""
@@ -92,7 +92,7 @@ export default createComponent({
92
92
  const selfOrigin = computed(() => parsePosition(props.self, $q.lang.rtl))
93
93
  const hideOnRouteChange = computed(() => props.persistent !== true)
94
94
 
95
- const { registerTick, removeTick, prepareTick } = useTick()
95
+ const { registerTick, removeTick } = useTick()
96
96
  const { registerTimeout, removeTimeout } = useTimeout()
97
97
  const { transition, transitionStyle } = useTransition(props, showing)
98
98
  const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = useScrollTarget(props, configureScrollTarget)
@@ -158,7 +158,6 @@ export default createComponent({
158
158
  updatePosition()
159
159
  configureScrollTarget()
160
160
  })
161
- prepareTick()
162
161
 
163
162
  if (unwatchPosition === void 0) {
164
163
  unwatchPosition = watch(
@@ -13,7 +13,9 @@ export default createComponent({
13
13
  src: {
14
14
  type: String,
15
15
  required: true
16
- }
16
+ },
17
+
18
+ title: String
17
19
  },
18
20
 
19
21
  setup (props) {
@@ -30,6 +32,7 @@ export default createComponent({
30
32
  }, [
31
33
  h('iframe', {
32
34
  src: props.src,
35
+ title: props.title,
33
36
  frameborder: '0',
34
37
  allowfullscreen: true
35
38
  })
@@ -11,9 +11,20 @@
11
11
  "desc": "The source url to display in an iframe",
12
12
  "required": true,
13
13
  "examples": [
14
- "src=\"https://www.youtube.com/embed/k3_tw44QsZQ\""
14
+ "https://www.youtube.com/embed/k3_tw44QsZQ"
15
15
  ],
16
16
  "category": "model"
17
+ },
18
+
19
+ "title": {
20
+ "type": "String",
21
+ "desc": "(Accessibility) Set the native 'title' attribute value of the inner iframe being used",
22
+ "required": false,
23
+ "examples": [
24
+ "My Daily Marathon"
25
+ ],
26
+ "category": "accessibility",
27
+ "addedIn": "v2.4.3"
17
28
  }
18
29
  }
19
30
  }
@@ -263,26 +263,24 @@ export default function (state) {
263
263
  state.targetUid.value = getTargetUid(val)
264
264
  })
265
265
 
266
- let focusFn
266
+ function focusHandler () {
267
+ const el = document.activeElement
268
+ let target = state.targetRef !== void 0 && state.targetRef.value
267
269
 
268
- function focus () {
269
- focusFn !== void 0 && removeFocusFn(focusFn)
270
- focusFn = addFocusFn(() => {
271
- focusFn = void 0
272
- const el = document.activeElement
273
- let target = state.targetRef !== void 0 && state.targetRef.value
274
-
275
- if (target && (el === null || el.id !== state.targetUid.value)) {
276
- target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
277
- if (target && target !== el) {
278
- target.focus()
279
- }
270
+ if (target && (el === null || el.id !== state.targetUid.value)) {
271
+ target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
272
+ if (target && target !== el) {
273
+ target.focus()
280
274
  }
281
- })
275
+ }
276
+ }
277
+
278
+ function focus () {
279
+ addFocusFn(focusHandler)
282
280
  }
283
281
 
284
282
  function blur () {
285
- focusFn !== void 0 && removeFocusFn(focusFn)
283
+ removeFocusFn(focusHandler)
286
284
  const el = document.activeElement
287
285
  if (el !== null && state.rootRef.value.contains(el)) {
288
286
  el.blur()
@@ -15,7 +15,7 @@ export const useModelToggleEmits = [
15
15
  'before-show', 'show', 'before-hide', 'hide'
16
16
  ]
17
17
 
18
- // handleShow/handleHide -> removeTick(), self (& emit show), prepareTick()
18
+ // handleShow/handleHide -> removeTick(), self (& emit show)
19
19
 
20
20
  export default function ({
21
21
  showing,
@@ -48,16 +48,18 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
48
48
  return
49
49
  }
50
50
 
51
- if (onGlobalDialog === false && portalEl === null) {
52
- portalEl = createGlobalNode()
53
- }
51
+ if (portalIsActive.value === false) {
52
+ if (onGlobalDialog === false && portalEl === null) {
53
+ portalEl = createGlobalNode()
54
+ }
54
55
 
55
- portalIsActive.value = true
56
+ portalIsActive.value = true
56
57
 
57
- // register portal
58
- portalList.push(vm.proxy)
58
+ // register portal
59
+ portalList.push(vm.proxy)
59
60
 
60
- addFocusWaitFlag(focusObj)
61
+ addFocusWaitFlag(focusObj)
62
+ }
61
63
  }
62
64
 
63
65
  function hidePortal () {
@@ -4,8 +4,6 @@ import { nextTick, onBeforeUnmount } from 'vue'
4
4
  * Usage:
5
5
  * registerTick(fn)
6
6
  * registerTick(fn)
7
- * ....
8
- * prepareTick()
9
7
  */
10
8
 
11
9
  export default function () {
@@ -18,22 +16,17 @@ export default function () {
18
16
  return {
19
17
  registerTick (fn) {
20
18
  tickFn = fn
19
+
20
+ nextTick(() => {
21
+ if (tickFn === fn) {
22
+ tickFn()
23
+ tickFn = void 0
24
+ }
25
+ })
21
26
  },
22
27
 
23
28
  removeTick () {
24
29
  tickFn = void 0
25
- },
26
-
27
- prepareTick () {
28
- if (tickFn !== void 0) {
29
- const fn = tickFn
30
- nextTick(() => {
31
- if (tickFn === fn) {
32
- tickFn()
33
- tickFn = void 0
34
- }
35
- })
36
- }
37
30
  }
38
31
  }
39
32
  }
@@ -160,4 +160,3 @@ body.desktop
160
160
  .q-focusable:focus, .q-manual-focusable--focused
161
161
  > .q-focus-helper
162
162
  opacity: .22
163
-
@@ -39,20 +39,18 @@ $flex-gutter: ('none': 0, 'xs': $flex-gutter-xs, 'sm': $flex-gutter-sm, 'md': $f
39
39
  // sorry for long line; we need .sass and it doesn't support multi-line list
40
40
  $sizes: ('xs': 0, 'sm': ($breakpoint-xs + 1), 'md': ($breakpoint-sm + 1), 'lg': ($breakpoint-md + 1), 'xl': ($breakpoint-lg + 1)) !default
41
41
 
42
- $breakpoint-xs-min: 0 !default
43
- $breakpoint-xs-max: $breakpoint-xs !default
42
+ $breakpoint-xs-max: (map-get($sizes, "sm") - 0.02) !default
44
43
 
45
44
  $breakpoint-sm-min: map-get($sizes, "sm") !default
46
- $breakpoint-sm-max: $breakpoint-sm !default
45
+ $breakpoint-sm-max: (map-get($sizes, "md") - 0.02) !default
47
46
 
48
47
  $breakpoint-md-min: map-get($sizes, "md") !default
49
- $breakpoint-md-max: $breakpoint-md !default
48
+ $breakpoint-md-max: (map-get($sizes, "lg") - 0.02) !default
50
49
 
51
50
  $breakpoint-lg-min: map-get($sizes, "lg") !default
52
- $breakpoint-lg-max: $breakpoint-lg !default
51
+ $breakpoint-lg-max: (map-get($sizes, "xl") - 0.02) !default
53
52
 
54
53
  $breakpoint-xl-min: map-get($sizes, "xl") !default
55
- $breakpoint-xl-max: 9999px !default
56
54
 
57
55
  $h1: (size: 6rem, line-height: 6rem, letter-spacing: -.01562em, weight: 300) !default
58
56
  $h2: (size: 3.75rem, line-height: 3.75rem, letter-spacing: -.00833em, weight: 300) !default
@@ -45,7 +45,7 @@
45
45
  "type": "String",
46
46
  "desc": "Path to an image for this action",
47
47
  "examples": [
48
- "(statics folder) statics/img/something.png",
48
+ "(public folder) img/something.png",
49
49
  "(relative path format) :src=\"require('./my_img.jpg')\"",
50
50
  "(URL) https://some-site.net/some-img.gif"
51
51
  ]
@@ -60,6 +60,12 @@
60
60
  "type": [ "String", "Number" ],
61
61
  "desc": "Action label",
62
62
  "examples": [ "Facebook" ]
63
+ },
64
+
65
+ "...": {
66
+ "type": "Any",
67
+ "desc": "Any other custom props",
68
+ "__exemption": [ "examples" ]
63
69
  }
64
70
  }
65
71
  },
@@ -10,7 +10,7 @@
10
10
  "definition": {
11
11
  "...props": {
12
12
  "type": "Object",
13
- "desc": "QAjaxBar component props",
13
+ "desc": "QAjaxBar component props, EXCEPT for 'hijack-filter'",
14
14
  "__exemption": [ "examples" ]
15
15
  }
16
16
  }
@@ -45,9 +45,9 @@
45
45
 
46
46
  "avatar": {
47
47
  "type": "String",
48
- "desc": "URL to an avatar/image; Suggestion: use statics folder",
48
+ "desc": "URL to an avatar/image; Suggestion: use public folder",
49
49
  "examples": [
50
- "(statics folder) statics/img/something.png",
50
+ "(public folder) img/something.png",
51
51
  "(relative path format) require('./my_img.jpg')",
52
52
  "(URL) https://some-site.net/some-img.gif"
53
53
  ]
@@ -204,9 +204,9 @@
204
204
 
205
205
  "avatar": {
206
206
  "type": "String",
207
- "desc": "URL to an avatar/image; Suggestion: use statics folder",
207
+ "desc": "URL to an avatar/image; Suggestion: public folder",
208
208
  "examples": [
209
- "(statics folder) statics/img/something.png",
209
+ "(public folder) img/something.png",
210
210
  "(relative path format) require('./my_img.jpg')",
211
211
  "(URL) https://some-site.net/some-img.gif"
212
212
  ]
@@ -258,7 +258,7 @@
258
258
  "desc": "Style definitions to be attributed to the badge",
259
259
  "examples": [
260
260
  "background-color: #ff0000",
261
- ":content-style=\"{ backgroundColor: '#ff0000' }\""
261
+ "{ backgroundColor: '#ff0000' }"
262
262
  ]
263
263
  },
264
264
  "badgeClass": {
@@ -266,7 +266,7 @@
266
266
  "desc": "Class definitions to be attributed to the badge",
267
267
  "examples": [
268
268
  "my-special-class",
269
- ":content-class=\"{ 'my-special-class': <condition> }\""
269
+ "{ 'my-special-class': <condition> }"
270
270
  ]
271
271
  },
272
272
 
@@ -279,7 +279,7 @@
279
279
  "desc": "Class definitions to be attributed to the progress bar",
280
280
  "examples": [
281
281
  "my-special-class",
282
- ":content-class=\"{ 'my-special-class': <condition> }\""
282
+ "{ 'my-special-class': <condition> }"
283
283
  ]
284
284
  },
285
285
 
@@ -387,9 +387,9 @@
387
387
 
388
388
  "avatar": {
389
389
  "type": "String",
390
- "desc": "URL to an avatar/image; Suggestion: use statics folder",
390
+ "desc": "URL to an avatar/image; Suggestion: use public folder",
391
391
  "examples": [
392
- "(statics folder) statics/img/something.png",
392
+ "(public folder) img/something.png",
393
393
  "(relative path format) require('./my_img.jpg')",
394
394
  "(URL) https://some-site.net/some-img.gif"
395
395
  ]
@@ -410,7 +410,7 @@
410
410
  "desc": "Class definitions to be attributed to the progress bar",
411
411
  "examples": [
412
412
  "my-special-class",
413
- ":content-class=\"{ 'my-special-class': <condition> }\""
413
+ "{ 'my-special-class': <condition> }"
414
414
  ]
415
415
  },
416
416
 
@@ -521,13 +521,13 @@
521
521
 
522
522
  "avatar": {
523
523
  "type": "String",
524
- "desc": "URL to an avatar/image; Suggestion: use statics folder",
524
+ "desc": "URL to an avatar/image; Suggestion: use public folder",
525
525
  "examples": [
526
- "(statics folder) statics/img/something.png",
526
+ "(public folder) img/something.png",
527
527
  "(relative path format) require('./my_img.jpg')",
528
528
  "(URL) https://some-site.net/some-img.gif"
529
529
  ]
530
- },
530
+ },
531
531
 
532
532
  "spinner": {
533
533
  "type": [ "Boolean", "Component" ],
@@ -570,7 +570,7 @@
570
570
  "desc": "Style definitions to be attributed to the badge",
571
571
  "examples": [
572
572
  "background-color: #ff0000",
573
- ":content-style=\"{ backgroundColor: '#ff0000' }\""
573
+ "{ backgroundColor: '#ff0000' }"
574
574
  ]
575
575
  },
576
576
  "badgeClass": {
@@ -578,7 +578,7 @@
578
578
  "desc": "Class definitions to be attributed to the badge",
579
579
  "examples": [
580
580
  "my-special-class",
581
- ":content-class=\"{ 'my-special-class': <condition> }\""
581
+ "{ 'my-special-class': <condition> }"
582
582
  ]
583
583
  },
584
584
 
@@ -591,7 +591,7 @@
591
591
  "desc": "Class definitions to be attributed to the progress bar",
592
592
  "examples": [
593
593
  "my-special-class",
594
- ":content-class=\"{ 'my-special-class': <condition> }\""
594
+ "{ 'my-special-class': <condition> }"
595
595
  ]
596
596
  },
597
597
 
@@ -701,13 +701,13 @@
701
701
 
702
702
  "avatar": {
703
703
  "type": "String",
704
- "desc": "URL to an avatar/image; Suggestion: use statics folder",
704
+ "desc": "URL to an avatar/image; Suggestion: use public folder",
705
705
  "examples": [
706
- "(statics folder) statics/img/something.png",
706
+ "(public folder) img/something.png",
707
707
  "(relative path format) require('./my_img.jpg')",
708
708
  "(URL) https://some-site.net/some-img.gif"
709
709
  ]
710
- },
710
+ },
711
711
 
712
712
  "spinner": {
713
713
  "type": [ "Boolean", "Component" ],
@@ -750,7 +750,7 @@
750
750
  "desc": "Style definitions to be attributed to the badge",
751
751
  "examples": [
752
752
  "background-color: #ff0000",
753
- ":content-style=\"{ backgroundColor: '#ff0000' }\""
753
+ "{ backgroundColor: '#ff0000' }"
754
754
  ]
755
755
  },
756
756
  "badgeClass": {
@@ -758,7 +758,7 @@
758
758
  "desc": "Class definitions to be attributed to the badge",
759
759
  "examples": [
760
760
  "my-special-class",
761
- ":content-class=\"{ 'my-special-class': <condition> }\""
761
+ "{ 'my-special-class': <condition> }"
762
762
  ]
763
763
  },
764
764
 
@@ -771,7 +771,7 @@
771
771
  "desc": "Class definitions to be attributed to the progress bar",
772
772
  "examples": [
773
773
  "my-special-class",
774
- ":content-class=\"{ 'my-special-class': <condition> }\""
774
+ "{ 'my-special-class': <condition> }"
775
775
  ]
776
776
  },
777
777
 
@@ -1,6 +1,55 @@
1
- export default function (data) {
2
- const s = JSON.stringify(data)
3
- if (s) {
4
- return JSON.parse(s)
1
+ // adapted from https://stackoverflow.com/a/40294058
2
+
3
+ export default function cloneDeep (data, hash = new WeakMap()) {
4
+ if (Object(data) !== data) return data
5
+ if (hash.has(data)) return hash.get(data)
6
+
7
+ const result = data instanceof Date
8
+ ? new Date(data)
9
+ : (data instanceof RegExp
10
+ ? new RegExp(data.source, data.flags)
11
+ : (data instanceof Set
12
+ ? new Set()
13
+ : (data instanceof Map
14
+ ? new Map()
15
+ : (typeof data.constructor !== 'function'
16
+ ? Object.create(null)
17
+ : (data.prototype !== void 0 && typeof data.prototype.constructor === 'function'
18
+ ? data
19
+ : new data.constructor()
20
+ )
21
+ )
22
+ )
23
+ )
24
+ )
25
+
26
+ if (typeof data.constructor === 'function' && typeof data.valueOf === 'function') {
27
+ const val = data.valueOf()
28
+
29
+ if (Object(val) !== val) {
30
+ const result = new data.constructor(val)
31
+
32
+ hash.set(data, result)
33
+
34
+ return result
35
+ }
5
36
  }
37
+
38
+ hash.set(data, result)
39
+
40
+ if (data instanceof Set) {
41
+ data.forEach(val => {
42
+ result.add(cloneDeep(val, hash))
43
+ })
44
+ }
45
+ else if (data instanceof Map) {
46
+ data.forEach((val, key) => {
47
+ result.set(key, cloneDeep(val, hash))
48
+ })
49
+ }
50
+
51
+ return Object.assign(
52
+ result,
53
+ ...Object.keys(data).map(key => ({ [ key ]: cloneDeep(data[ key ], hash) }))
54
+ )
6
55
  }
@@ -1,15 +1,17 @@
1
1
  let queue = []
2
- const waitFlags = []
2
+ let waitFlags = []
3
+
4
+ function clearFlag (flag) {
5
+ waitFlags = waitFlags.filter(entry => entry !== flag)
6
+ }
3
7
 
4
8
  export function addFocusWaitFlag (flag) {
9
+ clearFlag(flag)
5
10
  waitFlags.push(flag)
6
11
  }
7
12
 
8
13
  export function removeFocusWaitFlag (flag) {
9
- const index = waitFlags.indexOf(flag)
10
- if (index !== -1) {
11
- waitFlags.splice(index, 1)
12
- }
14
+ clearFlag(flag)
13
15
 
14
16
  if (waitFlags.length === 0 && queue.length > 0) {
15
17
  // only call last focus handler (can't focus multiple things at once)
@@ -24,13 +26,9 @@ export function addFocusFn (fn) {
24
26
  }
25
27
  else {
26
28
  queue.push(fn)
27
- return fn
28
29
  }
29
30
  }
30
31
 
31
32
  export function removeFocusFn (fn) {
32
- const index = queue.indexOf(fn)
33
- if (index !== -1) {
34
- queue.splice(index, 1)
35
- }
33
+ queue = queue.filter(entry => entry !== fn)
36
34
  }
@@ -147,14 +147,14 @@ export default function (DefaultComponent, supportsCustomComponent, parentApp) {
147
147
  applyState('show')
148
148
  }
149
149
 
150
- if (dialogRef.value !== null) {
151
- show()
152
- }
153
- else if (typeof DialogComponent.__asyncLoader === 'function') {
150
+ if (typeof DialogComponent.__asyncLoader === 'function') {
154
151
  DialogComponent.__asyncLoader().then(() => {
155
152
  nextTick(show)
156
153
  })
157
154
  }
155
+ else {
156
+ nextTick(show)
157
+ }
158
158
 
159
159
  return API
160
160
  }